[Libreoffice-commits] core.git: sw/inc sw/qa sw/source
Matteo Casalin
matteo.casalin at yahoo.com
Mon Jun 10 02:56:27 PDT 2013
sw/inc/pam.hxx | 2 +-
sw/qa/core/uwriter.cxx | 2 +-
sw/source/core/crsr/pam.cxx | 12 ++++++------
sw/source/ui/docvw/edtwin.cxx | 10 +++++-----
4 files changed, 13 insertions(+), 13 deletions(-)
New commits:
commit 2f7ed5fb633978f30d77d944ab626efc8a04db50
Author: Matteo Casalin <matteo.casalin at yahoo.com>
Date: Sun Jun 9 11:47:16 2013 +0200
String to OUString
Change-Id: I89f228b64c85b5844b3049206bf97877473a04d3
Reviewed-on: https://gerrit.libreoffice.org/4212
Reviewed-by: Miklos Vajna <vmiklos at suse.cz>
Tested-by: Miklos Vajna <vmiklos at suse.cz>
diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
index 54c20b1..7003b64 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 249f838..20f974f 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 cb89473..c1b059b 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 39526b9..f0b1951 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<xub_StrLen>(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();
More information about the Libreoffice-commits
mailing list