summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-10-15 17:36:59 +0200
committerNoel Grandin <noel@peralex.com>2013-10-18 09:59:20 +0200
commit5c3382d57af73f8a78614a6f8960d5caec36f7b7 (patch)
treeef660018f06902a1e2c798e23ff9dd5b852ec83e
parentc60452f1b425adfd42f03d7640a073c039c2e054 (diff)
convert sw/source/core/text/*.cxx from String to OUString
Change-Id: Ifda1e87fb14d075bb0b1708efc12404c9ebc255a
-rw-r--r--sw/source/core/text/EnhancedPDFExportHelper.cxx32
-rw-r--r--sw/source/core/text/guess.cxx4
-rw-r--r--sw/source/core/text/porexp.cxx2
-rw-r--r--sw/source/core/text/porlay.cxx26
-rw-r--r--sw/source/core/text/porlin.cxx2
-rw-r--r--sw/source/core/text/pormulti.cxx2
-rw-r--r--sw/source/core/text/porref.cxx2
-rw-r--r--sw/source/core/text/porrst.cxx4
-rw-r--r--sw/source/core/text/portox.cxx2
-rw-r--r--sw/source/core/text/txtftn.cxx2
10 files changed, 39 insertions, 39 deletions
diff --git a/sw/source/core/text/EnhancedPDFExportHelper.cxx b/sw/source/core/text/EnhancedPDFExportHelper.cxx
index 1642a13f8d57..12800b1ec56f 100644
--- a/sw/source/core/text/EnhancedPDFExportHelper.cxx
+++ b/sw/source/core/text/EnhancedPDFExportHelper.cxx
@@ -678,7 +678,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
const SwNoTxtFrm* pNoTxtFrm = static_cast<const SwNoTxtFrm*>(pFly->Lower());
const SwNoTxtNode* pNoTxtNode = static_cast<const SwNoTxtNode*>(pNoTxtFrm->GetNode());
- const String aAlternateTxt( pNoTxtNode->GetTitle() );
+ const OUString aAlternateTxt( pNoTxtNode->GetTitle() );
mpPDFExtOutDevData->SetAlternateText( aAlternateTxt );
}
}
@@ -783,7 +783,7 @@ void SwTaggedPDFHelper::SetAttributes( vcl::PDFWriter::StructElement eType )
if ( bActualText )
{
- const String aActualTxt( rInf.GetTxt(), rInf.GetIdx(), pPor->GetLen() );
+ const OUString aActualTxt = rInf.GetTxt().copy( rInf.GetIdx(), pPor->GetLen() );
mpPDFExtOutDevData->SetActualText( aActualTxt );
}
@@ -1004,7 +1004,7 @@ void SwTaggedPDFHelper::BeginBlockStructureElements()
return;
sal_uInt16 nPDFType = USHRT_MAX;
- String aPDFType;
+ OUString aPDFType;
switch ( pFrm->GetType() )
{
@@ -1360,7 +1360,7 @@ void SwTaggedPDFHelper::BeginInlineStructureElements()
return;
sal_uInt16 nPDFType = USHRT_MAX;
- String aPDFType;
+ OUString aPDFType;
switch ( pPor->GetWhichPor() )
{
@@ -1670,14 +1670,14 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
{
// First, we create the destination, because there may be more
// than one link to this destination:
- String aURL( INetURLObject::decode(
+ OUString aURL( INetURLObject::decode(
p->rINetAttr.GetINetFmt().GetValue(),
INET_HEX_ESCAPE,
INetURLObject::DECODE_UNAMBIGUOUS,
RTL_TEXTENCODING_UTF8 ) );
// We have to distinguish between intern and real URLs
- const bool bIntern = '#' == aURL.GetChar( 0 );
+ const bool bIntern = '#' == aURL[0];
// _GetCrsr() is a SwShellCrsr, which is derived from
// SwSelPaintRects, therefore the rectangles of the current
@@ -1692,7 +1692,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
sal_Int32 nDestId = -1;
if ( bIntern )
{
- aURL.Erase( 0, 1 );
+ aURL = aURL.copy( 1 );
mrSh.SwCrsrShell::ClearMark();
JumpToSwMark( &mrSh, aURL );
@@ -1762,14 +1762,14 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
if ( RES_DRAWFRMFMT != pFrmFmt->Which() &&
SFX_ITEM_SET == pFrmFmt->GetAttrSet().GetItemState( RES_URL, sal_True, &pItem ) )
{
- String aURL( static_cast<const SwFmtURL*>(pItem)->GetURL() );
- const bool bIntern = '#' == aURL.GetChar( 0 );
+ OUString aURL( static_cast<const SwFmtURL*>(pItem)->GetURL() );
+ const bool bIntern = '#' == aURL[0];
// Create the destination for internal links:
sal_Int32 nDestId = -1;
if ( bIntern )
{
- aURL.Erase( 0, 1 );
+ aURL = aURL.copy( 1 );
mrSh.SwCrsrShell::ClearMark();
JumpToSwMark( &mrSh, aURL );
@@ -1855,7 +1855,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// Destination Rectangle
const SwGetRefField* pField =
(SwGetRefField*)pFirst->GetFld();
- const String& rRefName = pField->GetSetRefName();
+ const OUString& rRefName = pField->GetSetRefName();
mrSh.GotoRefMark( rRefName, pField->GetSubType(), pField->GetSeqNo() );
const SwRect& rDestRect = mrSh.GetCharRect();
@@ -1897,7 +1897,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
// #i44368# Links in Header/Footer
if ( bHeaderFooter )
{
- const String aDummy;
+ const OUString aDummy;
MakeHeaderFooterLinks( *pPDFExtOutDevData, *pTNd, rLinkRect, nDestId, aDummy, true );
}
}
@@ -2024,7 +2024,7 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
pPDFExtOutDevData->CreateDest( rDestRect.SVRect(), nDestPageNum );
// Outline entry text
- const String& rEntry = mrSh.getIDocumentOutlineNodesAccess()->getOutlineText( i );
+ const OUString& rEntry = mrSh.getIDocumentOutlineNodesAccess()->getOutlineText( i );
// Create a new outline item:
const sal_Int32 nOutlineId =
@@ -2080,11 +2080,11 @@ void SwEnhancedPDFExportHelper::EnhancedPDFExport()
const std::vector< vcl::PDFExtOutDevBookmarkEntry >::const_iterator aIEnd = rBookmarks.end();
while ( aIBeg != aIEnd )
{
- String aBookmarkName( aIBeg->aBookmark );
- const bool bIntern = '#' == aBookmarkName.GetChar( 0 );
+ OUString aBookmarkName( aIBeg->aBookmark );
+ const bool bIntern = '#' == aBookmarkName[0];
if ( bIntern )
{
- aBookmarkName.Erase( 0, 1 );
+ aBookmarkName = aBookmarkName.copy( 1 );
JumpToSwMark( &mrSh, aBookmarkName );
// Destination Rectangle
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index ac7ec406b0ee..63bc94d59f08 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -394,9 +394,9 @@ sal_Bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf,
#if OSL_DEBUG_LEVEL > 1
// e.g., Schif-fahrt, referes to our string
- const String aWord = xHyphWord->getWord();
+ const OUString aWord = xHyphWord->getWord();
// e.g., Schiff-fahrt, referes to the word after hyphenation
- const String aHyphenatedWord = xHyphWord->getHyphenatedWord();
+ const OUString aHyphenatedWord = xHyphWord->getHyphenatedWord();
// e.g., Schif-fahrt: 5, referes to our string
const sal_uInt16 nHyphenationPos = xHyphWord->getHyphenationPos();
(void)nHyphenationPos;
diff --git a/sw/source/core/text/porexp.cxx b/sw/source/core/text/porexp.cxx
index 4108c72606f1..d0b3f3f127de 100644
--- a/sw/source/core/text/porexp.cxx
+++ b/sw/source/core/text/porexp.cxx
@@ -47,7 +47,7 @@ sal_Bool SwExpandPortion::GetExpTxt( const SwTxtSizeInfo&, OUString &rTxt ) cons
void SwExpandPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString;
+ OUString aString;
rPH.Special( GetLen(), aString, GetWhichPor() );
}
diff --git a/sw/source/core/text/porlay.cxx b/sw/source/core/text/porlay.cxx
index 07ada0bb7199..8224bbb25322 100644
--- a/sw/source/core/text/porlay.cxx
+++ b/sw/source/core/text/porlay.cxx
@@ -679,12 +679,12 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
if( !g_pBreakIt->GetBreakIter().is() )
return;
- const String& rTxt = rNode.GetTxt();
+ const OUString& rTxt = rNode.GetTxt();
//
// HIDDEN TEXT INFORMATION
//
- Range aRange( 0, rTxt.Len() ? rTxt.Len() - 1 : 0 );
+ Range aRange( 0, !rTxt.isEmpty() ? rTxt.getLength() - 1 : 0 );
MultiSelection aHiddenMulti( aRange );
CalcHiddenRanges( rNode, aHiddenMulti );
@@ -840,8 +840,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
xub_StrLen nEnd =
(xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( rTxt, nChg, WEAK );
- if( nEnd > rTxt.Len() )
- nEnd = rTxt.Len();
+ if( nEnd > rTxt.getLength() )
+ nEnd = rTxt.getLength();
nScript = (sal_uInt8)GetI18NScriptTypeOfLanguage( (sal_uInt16)GetAppLanguage() );
@@ -852,7 +852,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
nChg = nEnd;
// Get next script type or set to weak in order to exit
- sal_uInt8 nNextScript = ( nEnd < rTxt.Len() ) ?
+ sal_uInt8 nNextScript = ( nEnd < rTxt.getLength() ) ?
(sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nEnd ) :
(sal_uInt8)WEAK;
@@ -868,7 +868,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// UPDATE THE SCRIPT INFO ARRAYS:
//
- while ( nChg < rTxt.Len() || ( aScriptChanges.empty() && !rTxt.Len() ) )
+ while ( nChg < rTxt.getLength() || ( aScriptChanges.empty() && rTxt.isEmpty() ) )
{
SAL_WARN_IF( i18n::ScriptType::WEAK == nScript,
"sw.core", "Inserting WEAK into SwScriptInfo structure" );
@@ -877,8 +877,8 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
xub_StrLen nSearchStt = nChg;
nChg = (xub_StrLen)g_pBreakIt->GetBreakIter()->endOfScript( rTxt, nSearchStt, nScript );
- if ( nChg > rTxt.Len() )
- nChg = rTxt.Len();
+ if ( nChg > rTxt.getLength() )
+ nChg = rTxt.getLength();
// #i28203#
// for 'complex' portions, we make sure that a portion does not contain more
@@ -891,7 +891,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
while( com::sun::star::i18n::CTLScriptType::CTL_UNKNOWN == nCurrentScriptType || nScriptType == nCurrentScriptType )
{
nNextCTLScriptStart = (xub_StrLen)ScriptTypeDetector::endOfCTLScriptType( rTxt, nNextCTLScriptStart );
- if( nNextCTLScriptStart < rTxt.Len() && nNextCTLScriptStart < nChg )
+ if( nNextCTLScriptStart < rTxt.getLength() && nNextCTLScriptStart < nChg )
nCurrentScriptType = ScriptTypeDetector::getCTLScriptType( rTxt, nNextCTLScriptStart );
else
break;
@@ -901,10 +901,10 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
// special case for dotted circle since it can be used with complex
// before a mark, so we want it associated with the mark's script
- if (nChg < rTxt.Len() && nChg > 0 && (i18n::ScriptType::WEAK ==
+ if (nChg < rTxt.getLength() && nChg > 0 && (i18n::ScriptType::WEAK ==
g_pBreakIt->GetBreakIter()->getScriptType(rTxt,nChg - 1)))
{
- int8_t nType = u_charType(rTxt.GetChar(nChg) );
+ int8_t nType = u_charType(rTxt[nChg] );
if (nType == U_NON_SPACING_MARK || nType == U_ENCLOSING_MARK ||
nType == U_COMBINING_SPACING_MARK )
{
@@ -932,7 +932,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
while ( nLastCompression < nChg )
{
- sal_Unicode cChar = rTxt.GetChar( nLastCompression );
+ sal_Unicode cChar = rTxt[ nLastCompression ];
// examine current character
switch ( cChar )
@@ -1154,7 +1154,7 @@ void SwScriptInfo::InitScriptInfo( const SwTxtNode& rNode, sal_Bool bRTL )
} // end of kashida search
}
- if ( nChg < rTxt.Len() )
+ if ( nChg < rTxt.getLength() )
nScript = (sal_uInt8)g_pBreakIt->GetBreakIter()->getScriptType( rTxt, nChg );
nLastCompression = nChg;
diff --git a/sw/source/core/text/porlin.cxx b/sw/source/core/text/porlin.cxx
index adbc4ac88715..de3124bcfc46 100644
--- a/sw/source/core/text/porlin.cxx
+++ b/sw/source/core/text/porlin.cxx
@@ -387,7 +387,7 @@ sal_Bool SwLinePortion::GetExpTxt( const SwTxtSizeInfo &, OUString & ) const
void SwLinePortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString;
+ OUString aString;
rPH.Special( GetLen(), aString, GetWhichPor(), Height(), Width() );
}
diff --git a/sw/source/core/text/pormulti.cxx b/sw/source/core/text/pormulti.cxx
index 95e0f91b588c..f3721f404920 100644
--- a/sw/source/core/text/pormulti.cxx
+++ b/sw/source/core/text/pormulti.cxx
@@ -635,7 +635,7 @@ SwRubyPortion::SwRubyPortion( const SwMultiCreator& rCreate, const SwFont& rFnt,
else
pRubyFont = NULL;
- String aStr( rRuby.GetText(), nOffs, STRING_LEN );
+ OUString aStr = rRuby.GetText().copy( nOffs );
SwFldPortion *pFld = new SwFldPortion( aStr, pRubyFont );
pFld->SetNextOffset( nOffs );
pFld->SetFollow( sal_True );
diff --git a/sw/source/core/text/porref.cxx b/sw/source/core/text/porref.cxx
index 897d81f0ad37..adad0f62a6da 100644
--- a/sw/source/core/text/porref.cxx
+++ b/sw/source/core/text/porref.cxx
@@ -94,7 +94,7 @@ void SwIsoRefPortion::Paint( const SwTxtPaintInfo &rInf ) const
void SwIsoRefPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString;
+ OUString aString;
rPH.Special( GetLen(), aString, GetWhichPor() );
}
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index cfc95529be6c..16a87ea73b85 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -530,12 +530,12 @@ void SwControlCharPortion::Paint( const SwTxtPaintInfo &rInf ) const
aTmpFont.SetProportion( nProp ); // a smaller font
SwFontSave aFontSave( rInf, &aTmpFont );
- String aOutString;
+ OUString aOutString;
switch ( mcChar )
{
case CHAR_ZWSP :
- aOutString = '/'; break;
+ aOutString = "/"; break;
// case CHAR_LRM :
// rTxt = sal_Unicode(0x2514); break;
// case CHAR_RLM :
diff --git a/sw/source/core/text/portox.cxx b/sw/source/core/text/portox.cxx
index ac113e03ec73..347ddbb43167 100644
--- a/sw/source/core/text/portox.cxx
+++ b/sw/source/core/text/portox.cxx
@@ -96,7 +96,7 @@ void SwIsoToxPortion::Paint( const SwTxtPaintInfo &rInf ) const
void SwIsoToxPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString;
+ OUString aString;
rPH.Special( GetLen(), aString, GetWhichPor() );
}
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 91d636a38fb4..5a3f7ac0448a 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -1546,7 +1546,7 @@ sal_Bool SwQuoVadisPortion::GetExpTxt( const SwTxtSizeInfo &, OUString &rTxt ) c
void SwQuoVadisPortion::HandlePortion( SwPortionHandler& rPH ) const
{
- String aString( aExpand );
+ OUString aString( aExpand );
aString += aErgo;
rPH.Special( GetLen(), aString, GetWhichPor() );
}