diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx index 54c20b1d8d2c..7003b6422bff 100644 --- a/sw/inc/pam.hxx +++ b/sw/inc/pam.hxx @@ -298,7 +298,7 @@ public: DECL_FIXEDMEMPOOL_NEWDEL(SwPaM); - String GetTxt() const; + OUString GetTxt() const; void InvalidatePaM(); }; diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 249f8385bc07..20f974fe7746 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -920,7 +920,7 @@ void SwDocTest::testTransliterate() m_pDoc->InsertString(aPaM, OUString("foobar")); aPaM.SetMark(); aPaM.GetPoint()->nContent = 0; - CPPUNIT_ASSERT_EQUAL(String("foobar"), aPaM.GetTxt()); + CPPUNIT_ASSERT_EQUAL(OUString("foobar"), aPaM.GetTxt()); CPPUNIT_ASSERT_EQUAL(OUString("FOOBAR"), translitTest(*m_pDoc, aPaM, diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx index cb89473467fe..c1b059b724ef 100644 --- a/sw/source/core/crsr/pam.cxx +++ b/sw/source/core/crsr/pam.cxx @@ -1059,9 +1059,9 @@ sal_Bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove ) return sal_True; } -String SwPaM::GetTxt() const +OUString SwPaM::GetTxt() const { - String aResult; + OUString aResult; SwNodeIndex aNodeIndex = Start()->nNode; @@ -1082,7 +1082,7 @@ String SwPaM::GetTxt() const if (pTxtNode != NULL) { - const String & aTmpStr = pTxtNode->GetTxt(); + const OUString aTmpStr = pTxtNode->GetTxt(); if (aNodeIndex == Start()->nNode) { @@ -1090,13 +1090,13 @@ String SwPaM::GetTxt() const if (End()->nNode == aNodeIndex) nEnd = End()->nContent.GetIndex(); else - nEnd = aTmpStr.Len(); + nEnd = aTmpStr.getLength(); - aResult += aTmpStr.Copy(Start()->nContent.GetIndex(), + aResult += aTmpStr.copy(Start()->nContent.GetIndex(), nEnd - Start()->nContent.GetIndex()) ; } else if (aNodeIndex == End()->nNode) - aResult += aTmpStr.Copy(0, End()->nContent.GetIndex()); + aResult += aTmpStr.copy(0, End()->nContent.GetIndex()); else aResult += aTmpStr; } diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx index 39526b997a93..f0b19519d350 100644 --- a/sw/source/ui/docvw/edtwin.cxx +++ b/sw/source/ui/docvw/edtwin.cxx @@ -860,16 +860,16 @@ void SwEditWin::FlushInBuffer() if (!rSh.GetCrsr()->HasMark()) rSh.GetCrsr()->SetMark(); rSh.GetCrsr()->GetMark()->nContent = 0; - String aLeftText( rSh.GetCrsr()->GetTxt() ); + OUString aLeftText( rSh.GetCrsr()->GetTxt() ); SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions(); xub_StrLen nExpandSelection = 0; - if (aLeftText.Len() > 0) + if (aLeftText.getLength() > 0) { sal_Unicode cChar = '\0'; - xub_StrLen nTmpPos = aLeftText.Len(); + sal_Int32 nTmpPos = aLeftText.getLength(); sal_Int16 nCheckMode = rCTLOptions.IsCTLSequenceCheckingRestricted() ? i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC; @@ -880,7 +880,7 @@ void SwEditWin::FlushInBuffer() for (xub_StrLen k = 0; k < m_aInBuffer.Len(); ++k) { cChar = m_aInBuffer.GetChar(k); - const xub_StrLen nPrevPos = static_cast(xISC->correctInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode )); + const sal_Int32 nPrevPos =xISC->correctInputSequence( aNewText, nTmpPos - 1, cChar, nCheckMode ); // valid sequence or sequence could be corrected: if (nPrevPos != aNewText.getLength()) @@ -903,7 +903,7 @@ void SwEditWin::FlushInBuffer() if (aChgText.Len()) { m_aInBuffer = aChgText; - nExpandSelection = aLeftText.Len() - static_cast< xub_StrLen >(nChgPos); + nExpandSelection = static_cast< xub_StrLen >(aLeftText.getLength() - nChgPos); } else m_aInBuffer.Erase();