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:
committed by
Miklos Vajna
parent
daaaaf7dcd
commit
2f7ed5fb63
@@ -298,7 +298,7 @@ public:
|
|||||||
|
|
||||||
DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
|
DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
|
||||||
|
|
||||||
String GetTxt() const;
|
OUString GetTxt() const;
|
||||||
void InvalidatePaM();
|
void InvalidatePaM();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -920,7 +920,7 @@ void SwDocTest::testTransliterate()
|
|||||||
m_pDoc->InsertString(aPaM, OUString("foobar"));
|
m_pDoc->InsertString(aPaM, OUString("foobar"));
|
||||||
aPaM.SetMark();
|
aPaM.SetMark();
|
||||||
aPaM.GetPoint()->nContent = 0;
|
aPaM.GetPoint()->nContent = 0;
|
||||||
CPPUNIT_ASSERT_EQUAL(String("foobar"), aPaM.GetTxt());
|
CPPUNIT_ASSERT_EQUAL(OUString("foobar"), aPaM.GetTxt());
|
||||||
|
|
||||||
CPPUNIT_ASSERT_EQUAL(OUString("FOOBAR"),
|
CPPUNIT_ASSERT_EQUAL(OUString("FOOBAR"),
|
||||||
translitTest(*m_pDoc, aPaM,
|
translitTest(*m_pDoc, aPaM,
|
||||||
|
@@ -1059,9 +1059,9 @@ sal_Bool GoPrevSection( SwPaM & rPam, SwMoveFn fnMove )
|
|||||||
return sal_True;
|
return sal_True;
|
||||||
}
|
}
|
||||||
|
|
||||||
String SwPaM::GetTxt() const
|
OUString SwPaM::GetTxt() const
|
||||||
{
|
{
|
||||||
String aResult;
|
OUString aResult;
|
||||||
|
|
||||||
SwNodeIndex aNodeIndex = Start()->nNode;
|
SwNodeIndex aNodeIndex = Start()->nNode;
|
||||||
|
|
||||||
@@ -1082,7 +1082,7 @@ String SwPaM::GetTxt() const
|
|||||||
|
|
||||||
if (pTxtNode != NULL)
|
if (pTxtNode != NULL)
|
||||||
{
|
{
|
||||||
const String & aTmpStr = pTxtNode->GetTxt();
|
const OUString aTmpStr = pTxtNode->GetTxt();
|
||||||
|
|
||||||
if (aNodeIndex == Start()->nNode)
|
if (aNodeIndex == Start()->nNode)
|
||||||
{
|
{
|
||||||
@@ -1090,13 +1090,13 @@ String SwPaM::GetTxt() const
|
|||||||
if (End()->nNode == aNodeIndex)
|
if (End()->nNode == aNodeIndex)
|
||||||
nEnd = End()->nContent.GetIndex();
|
nEnd = End()->nContent.GetIndex();
|
||||||
else
|
else
|
||||||
nEnd = aTmpStr.Len();
|
nEnd = aTmpStr.getLength();
|
||||||
|
|
||||||
aResult += aTmpStr.Copy(Start()->nContent.GetIndex(),
|
aResult += aTmpStr.copy(Start()->nContent.GetIndex(),
|
||||||
nEnd - Start()->nContent.GetIndex()) ;
|
nEnd - Start()->nContent.GetIndex()) ;
|
||||||
}
|
}
|
||||||
else if (aNodeIndex == End()->nNode)
|
else if (aNodeIndex == End()->nNode)
|
||||||
aResult += aTmpStr.Copy(0, End()->nContent.GetIndex());
|
aResult += aTmpStr.copy(0, End()->nContent.GetIndex());
|
||||||
else
|
else
|
||||||
aResult += aTmpStr;
|
aResult += aTmpStr;
|
||||||
}
|
}
|
||||||
|
@@ -860,16 +860,16 @@ void SwEditWin::FlushInBuffer()
|
|||||||
if (!rSh.GetCrsr()->HasMark())
|
if (!rSh.GetCrsr()->HasMark())
|
||||||
rSh.GetCrsr()->SetMark();
|
rSh.GetCrsr()->SetMark();
|
||||||
rSh.GetCrsr()->GetMark()->nContent = 0;
|
rSh.GetCrsr()->GetMark()->nContent = 0;
|
||||||
String aLeftText( rSh.GetCrsr()->GetTxt() );
|
OUString aLeftText( rSh.GetCrsr()->GetTxt() );
|
||||||
|
|
||||||
SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
|
SvtCTLOptions& rCTLOptions = SW_MOD()->GetCTLOptions();
|
||||||
|
|
||||||
xub_StrLen nExpandSelection = 0;
|
xub_StrLen nExpandSelection = 0;
|
||||||
if (aLeftText.Len() > 0)
|
if (aLeftText.getLength() > 0)
|
||||||
{
|
{
|
||||||
sal_Unicode cChar = '\0';
|
sal_Unicode cChar = '\0';
|
||||||
|
|
||||||
xub_StrLen nTmpPos = aLeftText.Len();
|
sal_Int32 nTmpPos = aLeftText.getLength();
|
||||||
sal_Int16 nCheckMode = rCTLOptions.IsCTLSequenceCheckingRestricted() ?
|
sal_Int16 nCheckMode = rCTLOptions.IsCTLSequenceCheckingRestricted() ?
|
||||||
i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC;
|
i18n::InputSequenceCheckMode::STRICT : i18n::InputSequenceCheckMode::BASIC;
|
||||||
|
|
||||||
@@ -880,7 +880,7 @@ void SwEditWin::FlushInBuffer()
|
|||||||
for (xub_StrLen k = 0; k < m_aInBuffer.Len(); ++k)
|
for (xub_StrLen k = 0; k < m_aInBuffer.Len(); ++k)
|
||||||
{
|
{
|
||||||
cChar = m_aInBuffer.GetChar(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:
|
// valid sequence or sequence could be corrected:
|
||||||
if (nPrevPos != aNewText.getLength())
|
if (nPrevPos != aNewText.getLength())
|
||||||
@@ -903,7 +903,7 @@ void SwEditWin::FlushInBuffer()
|
|||||||
if (aChgText.Len())
|
if (aChgText.Len())
|
||||||
{
|
{
|
||||||
m_aInBuffer = aChgText;
|
m_aInBuffer = aChgText;
|
||||||
nExpandSelection = aLeftText.Len() - static_cast< xub_StrLen >(nChgPos);
|
nExpandSelection = static_cast< xub_StrLen >(aLeftText.getLength() - nChgPos);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
m_aInBuffer.Erase();
|
m_aInBuffer.Erase();
|
||||||
|
Reference in New Issue
Block a user