[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    [PATCH] Fix display of text with qoutes in kspread
From:       Peter Simonsson <psn () linux ! se>
Date:       2003-10-29 19:10:20
[Download RAW message or body]

Hi!
This patch should fix the display of text that has a single qoute at the 
beginning.
-- 
LLaP
Peter Simonsson

Kivio - http://www.koffice.org/kivio/

["kspread.diff" (text/x-diff)]

Index: kspread_cell.cc
===================================================================
RCS file: /home/kde/koffice/kspread/kspread_cell.cc,v
retrieving revision 1.521
diff -u -p -r1.521 kspread_cell.cc
--- kspread_cell.cc	23 Aug 2003 21:08:03 -0000	1.521
+++ kspread_cell.cc	29 Oct 2003 18:17:42 -0000
@@ -1290,7 +1290,14 @@ void KSpreadCell::setOutputText()
   else if( m_value.isString() )
   {
     if (!m_value.asString().isEmpty() && m_value.asString()[0]=='\'' )
+    {
       m_strOutText = m_value.asString().right( m_value.asString().length()-1);
+      
+      if(m_strOutText[m_strOutText.length() - 1] == '\'')
+      {
+        m_strOutText.truncate(m_strOutText.length() - 1);
+      }
+    }
     else
       m_strOutText = m_value.asString();
   }
@@ -4405,6 +4412,7 @@ void KSpreadCell::checkTextInput()
         m_value = KSpreadValue::empty();
         if(m_pTable->getFirstLetterUpper() && !m_strText.isEmpty())
             m_strText=m_strText[0].upper()+m_strText.right(m_strText.length()-1);
+        m_value.setValue(m_strText);
         //setFormatType(Text_format); // shouldn't be necessary. Won't apply with StringData anyway.
         return;
     }


_______________________________________________
koffice-devel mailing list
koffice-devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/koffice-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic