summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorAugust Sodora <augsod@gmail.com>2011-11-28 21:44:30 -0500
committerThorsten Behrens <tbehrens@suse.com>2011-12-01 11:10:28 +0100
commit443a7229f96806e6bbece775cc7cd643e1c4a042 (patch)
treec1753b0704662d7d2730abe26a44c3993f0225dd /sdext
parent549f928863d0c1625f0322f62bfdda827063725e (diff)
Remove uses of charAt
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/tree/writertreevisiting.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index 8cda4a5ff1f2..310c13327ad7 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -759,9 +759,10 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent)
if( !bRotatedFrame
&& ! rCurGC.isRotatedOrSkewed()
&& ! rNextGC.isRotatedOrSkewed()
- && pNext->Text.charAt( 0 ) != sal_Unicode(' ')
+ && pNext->Text.gerLength() > 0
+ && pNext->Text[0] != sal_Unicode(' ')
&& pCur->Text.getLength() > 0
- && pCur->Text.charAt( pCur->Text.getLength()-1 ) != sal_Unicode(' ')
+ && pCur->Text[pCur->Text.getLength() - 1] != sal_Unicode(' ')
)
{
// check for new line in paragraph
@@ -769,7 +770,7 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent)
{
// new line begins
// check whether a space would should be inserted or a hyphen removed
- sal_Unicode aLastCode = pCur->Text.charAt( pCur->Text.getLength()-1 );
+ sal_Unicode aLastCode = pCur->Text[pCur->Text.getLength() - 1];
if( aLastCode == '-'
|| aLastCode == 0x2010
|| (aLastCode >= 0x2012 && aLastCode <= 0x2015)