diff options
author | Noel Grandin <noel@peralex.com> | 2013-08-21 13:18:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-08-22 10:49:33 +0200 |
commit | 5527d5c4e064f417c4cd5f868e9fafffaa5aab41 (patch) | |
tree | b9bea6678c5fff5e9244de84d82921d8ad2fe580 /drawinglayer | |
parent | 3728952b56e0690f09ed375e683ff09bc3fbff71 (diff) |
convert drawinglayer module from String to OUString
Change-Id: I115dfd5ca7d343b220b2a3e8aa0565f9e4689042
Diffstat (limited to 'drawinglayer')
7 files changed, 29 insertions, 29 deletions
diff --git a/drawinglayer/source/attribute/fontattribute.cxx b/drawinglayer/source/attribute/fontattribute.cxx index 7f4316f00794..9f824ed7ade7 100644 --- a/drawinglayer/source/attribute/fontattribute.cxx +++ b/drawinglayer/source/attribute/fontattribute.cxx @@ -31,8 +31,8 @@ namespace drawinglayer { public: /// core data - String maFamilyName; // Font Family Name - String maStyleName; // Font Style Name + OUString maFamilyName; // Font Family Name + OUString maStyleName; // Font Style Name sal_uInt16 mnWeight; // Font weight /// bitfield @@ -45,8 +45,8 @@ namespace drawinglayer unsigned mbMonospaced : 1; ImpFontAttribute( - const String& rFamilyName, - const String& rStyleName, + const OUString& rFamilyName, + const OUString& rStyleName, sal_uInt16 nWeight, bool bSymbol, bool bVertical, @@ -83,8 +83,8 @@ namespace drawinglayer } // data read access - const String& getFamilyName() const { return maFamilyName; } - const String& getStyleName() const { return maStyleName; } + const OUString& getFamilyName() const { return maFamilyName; } + const OUString& getStyleName() const { return maStyleName; } sal_uInt16 getWeight() const { return mnWeight; } bool getSymbol() const { return mbSymbol; } bool getVertical() const { return mbVertical; } @@ -116,8 +116,8 @@ namespace drawinglayer } FontAttribute::FontAttribute( - const String& rFamilyName, - const String& rStyleName, + const OUString& rFamilyName, + const OUString& rStyleName, sal_uInt16 nWeight, bool bSymbol, bool bVertical, @@ -161,12 +161,12 @@ namespace drawinglayer return rCandidate.mpFontAttribute == mpFontAttribute; } - const String& FontAttribute::getFamilyName() const + const OUString& FontAttribute::getFamilyName() const { return mpFontAttribute->getFamilyName(); } - const String& FontAttribute::getStyleName() const + const OUString& FontAttribute::getStyleName() const { return mpFontAttribute->getStyleName(); } diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index 258ccecdb530..d1b6b32ef265 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -38,7 +38,7 @@ namespace drawinglayer void TextDecoratedPortionPrimitive2D::impCreateGeometryContent( std::vector< Primitive2DReference >& rTarget, basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, - const String& rText, + const OUString& rText, xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, @@ -311,7 +311,7 @@ namespace drawinglayer // TextSimplePortionPrimitive2D parameters const basegfx::B2DHomMatrix& rNewTransform, - const String& rText, + const OUString& rText, xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx index 409f225403b5..9fa8901e8826 100644 --- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx +++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx @@ -215,7 +215,7 @@ namespace drawinglayer } double TextLayouterDevice::getTextWidth( - const String& rText, + const OUString& rText, sal_uInt32 nIndex, sal_uInt32 nLength) const { @@ -224,14 +224,14 @@ namespace drawinglayer bool TextLayouterDevice::getTextOutlines( basegfx::B2DPolyPolygonVector& rB2DPolyPolyVector, - const String& rText, + const OUString& rText, sal_uInt32 nIndex, sal_uInt32 nLength, const ::std::vector< double >& rDXArray) const { const sal_uInt32 nDXArrayCount(rDXArray.size()); sal_uInt32 nTextLength(nLength); - const sal_uInt32 nStringLength(rText.Len()); + const sal_uInt32 nStringLength(rText.getLength()); if(nTextLength + nIndex > nStringLength) { @@ -273,12 +273,12 @@ namespace drawinglayer } basegfx::B2DRange TextLayouterDevice::getTextBoundRect( - const String& rText, + const OUString& rText, sal_uInt32 nIndex, sal_uInt32 nLength) const { sal_uInt32 nTextLength(nLength); - const sal_uInt32 nStringLength(rText.Len()); + const sal_uInt32 nStringLength(rText.getLength()); if(nTextLength + nIndex > nStringLength) { @@ -322,7 +322,7 @@ namespace drawinglayer void TextLayouterDevice::addTextRectActions( const Rectangle& rRectangle, - const String& rText, + const OUString& rText, sal_uInt16 nStyle, GDIMetaFile& rGDIMetaFile) const { @@ -331,13 +331,13 @@ namespace drawinglayer } ::std::vector< double > TextLayouterDevice::getTextArray( - const String& rText, + const OUString& rText, sal_uInt32 nIndex, sal_uInt32 nLength) const { ::std::vector< double > aRetval; sal_uInt32 nTextLength(nLength); - const sal_uInt32 nStringLength(rText.Len()); + const sal_uInt32 nStringLength(rText.getLength()); if(nTextLength + nIndex > nStringLength) { diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index 16f60f585fa0..ae9618861622 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -220,7 +220,7 @@ namespace drawinglayer TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D( const basegfx::B2DHomMatrix& rNewTransform, - const String& rText, + const OUString& rText, xub_StrLen aTextPosition, xub_StrLen aTextLength, const ::std::vector< double >& rDXArray, @@ -243,7 +243,7 @@ namespace drawinglayer mnWidthToFill(nWidthToFill) { #if OSL_DEBUG_LEVEL > 0 - const xub_StrLen aStringLength(getText().Len()); + const sal_Int32 aStringLength(getText().getLength()); OSL_ENSURE(aStringLength >= getTextPosition() && aStringLength >= getTextPosition() + getTextLength(), "TextSimplePortionPrimitive2D with text out of range (!)"); #endif diff --git a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx index ce7ed3792578..956b8a0d07db 100644 --- a/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textstrikeoutprimitive2d.cxx @@ -89,7 +89,7 @@ namespace drawinglayer const double fStrikeCharCount(fabs(getWidth()/fStrikeCharWidth)); const sal_uInt32 nStrikeCharCount(static_cast< sal_uInt32 >(fStrikeCharCount + 0.5)); std::vector<double> aDXArray(nStrikeCharCount); - String aStrikeoutString; + OUString aStrikeoutString; for(sal_uInt32 a(0); a < nStrikeCharCount; a++) { @@ -102,7 +102,7 @@ namespace drawinglayer getObjectTransformation(), aStrikeoutString, 0, - aStrikeoutString.Len(), + aStrikeoutString.getLength(), aDXArray, getFontAttribute(), getLocale(), diff --git a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx index 0dbd56ea379c..46ad65bc7a60 100644 --- a/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx +++ b/drawinglayer/source/processor2d/vclhelperbufferdevice.cxx @@ -292,7 +292,7 @@ namespace drawinglayer if(bDoSaveForVisualControl) { - SvFileStream aNew((const String&)String( "c:\\content.bmp" ), STREAM_WRITE|STREAM_TRUNC); + SvFileStream aNew( "c:\\content.bmp", STREAM_WRITE|STREAM_TRUNC); WriteDIB(aContent, aNew, false, true); } @@ -303,7 +303,7 @@ namespace drawinglayer if(bDoSaveForVisualControl) { - SvFileStream aNew((const String&)String( "c:\\transparence.bmp" ), STREAM_WRITE|STREAM_TRUNC); + SvFileStream aNew( "c:\\transparence.bmp", STREAM_WRITE|STREAM_TRUNC); WriteDIB(aAlphaMask.GetBitmap(), aNew, false, true); } @@ -316,7 +316,7 @@ namespace drawinglayer if(bDoSaveForVisualControl) { - SvFileStream aNew((const String&)String( "c:\\mask.bmp" ), STREAM_WRITE|STREAM_TRUNC); + SvFileStream aNew( "c:\\mask.bmp", STREAM_WRITE|STREAM_TRUNC); WriteDIB(aMask, aNew, false, true); } diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 3eb8001e4234..16661498958d 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -274,7 +274,7 @@ namespace drawinglayer mpOutputDevice->SetFont(aFont); mpOutputDevice->SetTextColor(Color(aRGBFontColor)); - String aText( rTextCandidate.getText() ); + OUString aText( rTextCandidate.getText() ); xub_StrLen nPos = rTextCandidate.getTextPosition(); xub_StrLen nLen = rTextCandidate.getTextLength(); @@ -295,7 +295,7 @@ namespace drawinglayer nChars = nWidthToFill / nWidth; OUStringBuffer aFilled; - comphelper::string::padToLength(aFilled, (sal_uInt16)nChars, aText.GetChar(0)); + comphelper::string::padToLength(aFilled, (sal_uInt16)nChars, aText[0]); aText = aFilled.makeStringAndClear(); nPos = 0; nLen = nChars; |