--Boundary-00=_fSPo/RgvgNPCGIi Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Ok here comes an updated patch... On Thursday 30 October 2003 10.08, David Faure wrote: > On Wednesday 29 October 2003 20:10, Peter Simonsson wrote: > > This patch should fix the display of text that has a single qoute at the > > beginning. > > My hero! > > > =A0 =A0if (!m_value.asString().isEmpty() && m_value.asString()[0]=3D= =3D'\'' ) > > + =A0 =A0{ > > =A0 =A0 =A0 =A0m_strOutText =3D m_value.asString().right( > > m_value.asString().length()-1); > > This could me .mid(1) > =46ixed > > + =A0 =A0 =A0if(m_strOutText[m_strOutText.length() - 1] =3D=3D '\'') > > This should first check for !m_strOutText.isEmpty(), otherwise a single > quote as value will let this go out of bounds. > Hmm, in fact, why did you add this? I thought this was only about > '012345 > not about > '012345' > (but maybe the latter is supposed to do the same and I just didn't realiz= e) Ok I was wrong about this part.. removed > > > @@ -4405,6 +4412,7 @@ void KSpreadCell::checkTextInput() > > =A0 =A0 =A0 =A0 =A0m_value =3D KSpreadValue::empty(); > > This line can be removed then? > Done > > =A0 =A0 =A0 =A0 =A0if(m_pTable->getFirstLetterUpper() && !m_strText.isE= mpty()) > > =A0 =A0 =A0 =A0 =A0 =A0 > > =A0m_strText=3Dm_strText[0].upper()+m_strText.right(m_strText.length()-= 1); + > > =A0 =A0 =A0 =A0m_value.setValue(m_strText); > > =A0 =A0 =A0 =A0 =A0//setFormatType(Text_format); // shouldn't be necess= ary. Won't > > apply with StringData anyway. return; > > =A0 =A0 =A0} > Hope you like this one better :) =2D-=20 LLaP Peter Simonsson Kivio - http://www.koffice.org/kivio/ --Boundary-00=_fSPo/RgvgNPCGIi Content-Type: text/x-diff; charset="iso-8859-1"; name="kspread.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kspread.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 30 Oct 2003 11:18:26 -0000 @@ -1290,7 +1290,7 @@ 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); + m_strOutText = m_value.asString().mid(1); else m_strOutText = m_value.asString(); } @@ -4402,10 +4402,11 @@ void KSpreadCell::checkTextInput() // then we don't parse as a value, but as string. if ( str.isEmpty() || formatType() == Text_format || str.at(0)=='\'' ) { - m_value = KSpreadValue::empty(); if(m_pTable->getFirstLetterUpper() && !m_strText.isEmpty()) m_strText=m_strText[0].upper()+m_strText.right(m_strText.length()-1); - //setFormatType(Text_format); // shouldn't be necessary. Won't apply with StringData anyway. + + m_value.setValue(m_strText); + //setFormatType(Text_formatsetValue(m_strText);); // shouldn't be necessary. Won't apply with StringData anyway. return; } --Boundary-00=_fSPo/RgvgNPCGIi Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ koffice-devel mailing list koffice-devel@mail.kde.org http://mail.kde.org/mailman/listinfo/koffice-devel --Boundary-00=_fSPo/RgvgNPCGIi--