summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-09-04 12:17:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2013-09-04 15:36:05 +0100
commit41d229b23c462cbee52bd5af01180009c8670746 (patch)
tree8694860825dcec5c07b2a3a45cab5764d2148383
parenta97e46f0024e99312dd16d14b0501404babcdd8d (diff)
XubString->OUString
Change-Id: I72b2678c79401320c355c7b6635a6180b01202f1
-rw-r--r--sw/source/core/text/frmcrsr.cxx4
-rw-r--r--sw/source/core/text/guess.cxx8
-rw-r--r--sw/source/core/text/porlin.hxx1
-rw-r--r--sw/source/core/text/porrst.cxx3
-rw-r--r--sw/source/core/txtnode/fntcap.cxx4
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx6
6 files changed, 9 insertions, 17 deletions
diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx
index cc77a915f9d5..c3021e4f1281 100644
--- a/sw/source/core/text/frmcrsr.cxx
+++ b/sw/source/core/text/frmcrsr.cxx
@@ -1518,9 +1518,7 @@ void SwTxtFrm::FillCrsrPos( SwFillData& rFill ) const
SwTwips nSpace = 0;
if( FILL_TAB != rFill.Mode() )
{
-static sal_Char const sDoubleSpace[] = " ";
- const XubString aTmp( sDoubleSpace, RTL_TEXTENCODING_MS_1252 );
-
+ const OUString aTmp(" ");
SwDrawTextInfo aDrawInf( pSh, *pOut, 0, aTmp, 0, 2 );
nSpace = pFnt->_GetTxtSize( aDrawInf ).Width()/2;
}
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx
index ae5a8ff763c4..ac7ec406b0ee 100644
--- a/sw/source/core/text/guess.cxx
+++ b/sw/source/core/text/guess.cxx
@@ -537,25 +537,23 @@ bool SwTxtGuess::AlternativeSpelling( const SwTxtFormatInfo &rInf,
const xub_StrLen nPos )
{
// get word boundaries
- xub_StrLen nWordLen;
-
Boundary aBound =
g_pBreakIt->GetBreakIter()->getWordBoundary( rInf.GetTxt(), nPos,
g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
WordType::DICTIONARY_WORD, sal_True );
nBreakStart = (xub_StrLen)aBound.startPos;
- nWordLen = static_cast<xub_StrLen>(aBound.endPos - nBreakStart);
+ sal_Int32 nWordLen = aBound.endPos - nBreakStart;
// if everything else fails, we want to cut at nPos
nCutPos = nPos;
- XubString aTxt( rInf.GetTxt().copy( nBreakStart, nWordLen ) );
+ OUString aTxt( rInf.GetTxt().copy( nBreakStart, nWordLen ) );
// check, if word has alternative spelling
Reference< XHyphenator > xHyph( ::GetHyphenator() );
OSL_ENSURE( xHyph.is(), "Hyphenator is missing");
//! subtract 1 since the UNO-interface is 0 based
- xHyphWord = xHyph->queryAlternativeSpelling( OUString(aTxt),
+ xHyphWord = xHyph->queryAlternativeSpelling( aTxt,
g_pBreakIt->GetLocale( rInf.GetFont()->GetLanguage() ),
nPos - nBreakStart, rInf.GetHyphValues() );
return xHyphWord.is() && xHyphWord->isAlternativeSpelling();
diff --git a/sw/source/core/text/porlin.hxx b/sw/source/core/text/porlin.hxx
index 12f275bd8b21..68b93d76a5ac 100644
--- a/sw/source/core/text/porlin.hxx
+++ b/sw/source/core/text/porlin.hxx
@@ -25,7 +25,6 @@
#include <libxml/xmlwriter.h>
#endif
-class XubString;
class SwTxtSizeInfo;
class SwTxtPaintInfo;
class SwTxtFormatInfo;
diff --git a/sw/source/core/text/porrst.cxx b/sw/source/core/text/porrst.cxx
index 74901cd5de4d..cfc95529be6c 100644
--- a/sw/source/core/text/porrst.cxx
+++ b/sw/source/core/text/porrst.cxx
@@ -164,8 +164,7 @@ void SwKernPortion::Paint( const SwTxtPaintInfo &rInf ) const
if( rInf.GetFont()->IsPaintBlank() )
{
- static sal_Char const sDoubleSpace[] = " ";
- XubString aTxtDouble( sDoubleSpace, RTL_TEXTENCODING_MS_1252 );
+ OUString aTxtDouble(" ");
//
SwRect aClipRect;
rInf.CalcRect( *this, &aClipRect, 0 );
diff --git a/sw/source/core/txtnode/fntcap.cxx b/sw/source/core/txtnode/fntcap.cxx
index 5a82414206af..f0e6e04df8c1 100644
--- a/sw/source/core/txtnode/fntcap.cxx
+++ b/sw/source/core/txtnode/fntcap.cxx
@@ -317,8 +317,6 @@ void SwDoDrawCapital::Do()
void SwDoDrawCapital::DrawSpace( Point &rPos )
{
- static sal_Char const sDoubleSpace[] = " ";
-
long nDiff = rInf.GetPos().X() - rPos.X();
Point aPos( rPos );
@@ -343,7 +341,7 @@ void SwDoDrawCapital::DrawSpace( Point &rPos )
{
rInf.ApplyAutoColor();
GetOut().DrawStretchText( aPos, nDiff,
- XubString( sDoubleSpace, RTL_TEXTENCODING_MS_1252 ), 0, 2 );
+ OUString(" "), 0, 2 );
}
rPos.X() = rInf.GetPos().X() + rInf.GetWidth();
}
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index d0cd25a26862..f22047e5e1e9 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -3067,15 +3067,15 @@ sal_Bool SwTxtNode::GetExpandTxt( SwTxtNode& rDestNd, const SwIndex* pDestIdx,
{
case RES_TXTATR_FIELD:
{
- XubString const aExpand(
+ OUString const aExpand(
static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
->ExpandField(true));
- if( aExpand.Len() )
+ if (!aExpand.isEmpty())
{
++aDestIdx; // dahinter einfuegen;
OUString const ins(
rDestNd.InsertText( aExpand, aDestIdx));
- SAL_INFO_IF(ins.getLength() != aExpand.Len(),
+ SAL_INFO_IF(ins.getLength() != aExpand.getLength(),
"sw.core", "GetExpandTxt lossage");
aDestIdx = nInsPos + nAttrStartIdx;
nInsPos = nInsPos + ins.getLength();