String to OUString

Change-Id: I89f228b64c85b5844b3049206bf97877473a04d3
Reviewed-on: https://gerrit.libreoffice.org/4212
Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
Tested-by: Miklos Vajna <vmiklos@suse.cz>
This commit is contained in:
Matteo Casalin
2013-06-09 11:47:16 +02:00
committed by Miklos Vajna
parent daaaaf7dcd
commit 2f7ed5fb63
4 changed files with 13 additions and 13 deletions

View File

@@ -298,7 +298,7 @@ public:
DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
String GetTxt() const;
OUString GetTxt() const;
void InvalidatePaM();
};

View File

@@ -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,

View File

@@ -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;
}

View File

@@ -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();