sw/source/core/text/frmcrsr.cxx | 4 +--- sw/source/core/text/guess.cxx | 8 +++----- sw/source/core/text/porlin.hxx | 1 - sw/source/core/text/porrst.cxx | 3 +-- sw/source/core/txtnode/fntcap.cxx | 4 +--- sw/source/core/txtnode/ndtxt.cxx | 6 +++--- 6 files changed, 9 insertions(+), 17 deletions(-)
New commits: commit 41d229b23c462cbee52bd5af01180009c8670746 Author: Caolán McNamara <caol...@redhat.com> Date: Wed Sep 4 12:17:22 2013 +0100 XubString->OUString Change-Id: I72b2678c79401320c355c7b6635a6180b01202f1 diff --git a/sw/source/core/text/frmcrsr.cxx b/sw/source/core/text/frmcrsr.cxx index cc77a91..c3021e4 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 ae5a8ff..ac7ec40 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 12f275b..68b93d7 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 74901cd..cfc9552 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 5a82414..f0e6e04 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 d0cd25a..f22047e 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();
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits