diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-13 10:04:18 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-13 10:04:18 +0000 |
commit | deecab601a0512c2f621dc070b0ef5f3d6905370 (patch) | |
tree | 98c16be7d8bdc5289edafe40eff6803a5c2e33cb | |
parent | c364fc1fc3555fc26dbcc04feaac2436cb8b6b7d (diff) |
longparas: xub_StrLen->sal_Int32
Change-Id: I171caa791e1d2a0baa4444a460a7f20ad5428571
7 files changed, 28 insertions, 30 deletions
diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx b/drawinglayer/source/primitive2d/textbreakuphelper.cxx index 33554bd92624..a5aab77f806c 100644 --- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx +++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx @@ -57,7 +57,7 @@ namespace drawinglayer { } - void TextBreakupHelper::breakupPortion(Primitive2DVector& rTempResult, sal_uInt32 nIndex, sal_uInt32 nLength, bool bWordLineMode) + void TextBreakupHelper::breakupPortion(Primitive2DVector& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode) { if(nLength && !(nIndex == mrSource.getTextPosition() && nLength == mrSource.getTextLength())) { @@ -87,7 +87,7 @@ namespace drawinglayer else { // get from DXArray - const sal_uInt32 nIndex2(static_cast< sal_uInt32 >(nIndex - mrSource.getTextPosition())); + const sal_Int32 nIndex2(nIndex - mrSource.getTextPosition()); fOffset = mrSource.getDXArray()[nIndex2 - 1]; } diff --git a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx index d1b6b32ef265..66f90ad80406 100644 --- a/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textdecoratedprimitive2d.cxx @@ -39,8 +39,8 @@ namespace drawinglayer std::vector< Primitive2DReference >& rTarget, basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, const OUString& rText, - xub_StrLen aTextPosition, - xub_StrLen aTextLength, + sal_Int32 nTextPosition, + sal_Int32 nTextLength, const ::std::vector< double >& rDXArray, const attribute::FontAttribute& rFontAttribute) const { @@ -49,8 +49,8 @@ namespace drawinglayer new TextSimplePortionPrimitive2D( rDecTrans.getB2DHomMatrix(), rText, - aTextPosition, - aTextLength, + nTextPosition, + nTextLength, rDXArray, rFontAttribute, getLocale(), @@ -79,7 +79,7 @@ namespace drawinglayer if(rDXArray.empty()) { - fTextWidth = aTextLayouter.getTextWidth(rText, aTextPosition, aTextLength); + fTextWidth = aTextLayouter.getTextWidth(rText, nTextPosition, nTextLength); } else { @@ -308,12 +308,11 @@ namespace drawinglayer } TextDecoratedPortionPrimitive2D::TextDecoratedPortionPrimitive2D( - // TextSimplePortionPrimitive2D parameters const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText, - xub_StrLen aTextPosition, - xub_StrLen aTextLength, + sal_Int32 nTextPosition, + sal_Int32 nTextLength, const ::std::vector< double >& rDXArray, const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, @@ -332,7 +331,7 @@ namespace drawinglayer bool bEmphasisMarkBelow, TextRelief eTextRelief, bool bShadow) - : TextSimplePortionPrimitive2D(rNewTransform, rText, aTextPosition, aTextLength, rDXArray, rFontAttribute, rLocale, rFontColor), + : TextSimplePortionPrimitive2D(rNewTransform, rText, nTextPosition, nTextLength, rDXArray, rFontAttribute, rLocale, rFontColor), maOverlineColor(rOverlineColor), maTextlineColor(rTextlineColor), meFontOverline(eFontOverline), diff --git a/drawinglayer/source/primitive2d/textprimitive2d.cxx b/drawinglayer/source/primitive2d/textprimitive2d.cxx index ae9618861622..0341dcc99704 100644 --- a/drawinglayer/source/primitive2d/textprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/textprimitive2d.cxx @@ -221,8 +221,8 @@ namespace drawinglayer TextSimplePortionPrimitive2D::TextSimplePortionPrimitive2D( const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText, - xub_StrLen aTextPosition, - xub_StrLen aTextLength, + sal_Int32 nTextPosition, + sal_Int32 nTextLength, const ::std::vector< double >& rDXArray, const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, @@ -232,8 +232,8 @@ namespace drawinglayer : BufferedDecompositionPrimitive2D(), maTextTransform(rNewTransform), maText(rText), - maTextPosition(aTextPosition), - maTextLength(aTextLength), + mnTextPosition(nTextPosition), + mnTextLength(nTextLength), maDXArray(rDXArray), maFontAttribute(rFontAttribute), maLocale(rLocale), diff --git a/drawinglayer/source/processor2d/vclprocessor2d.cxx b/drawinglayer/source/processor2d/vclprocessor2d.cxx index 7f2ab70ffc6e..0063ad727085 100644 --- a/drawinglayer/source/processor2d/vclprocessor2d.cxx +++ b/drawinglayer/source/processor2d/vclprocessor2d.cxx @@ -263,8 +263,8 @@ namespace drawinglayer mpOutputDevice->SetTextColor(Color(aRGBFontColor)); OUString aText( rTextCandidate.getText() ); - xub_StrLen nPos = rTextCandidate.getTextPosition(); - xub_StrLen nLen = rTextCandidate.getTextLength(); + sal_Int32 nPos = rTextCandidate.getTextPosition(); + sal_Int32 nLen = rTextCandidate.getTextLength(); sal_Int32* pDXArray = aTransformedDXArray.size() ? &(aTransformedDXArray[0]) : NULL ; @@ -283,7 +283,7 @@ namespace drawinglayer nChars = nWidthToFill / nWidth; OUStringBuffer aFilled; - comphelper::string::padToLength(aFilled, (sal_uInt16)nChars, aText[0]); + comphelper::string::padToLength(aFilled, nChars, aText[0]); aText = aFilled.makeStringAndClear(); nPos = 0; nLen = nChars; diff --git a/include/drawinglayer/primitive2d/textbreakuphelper.hxx b/include/drawinglayer/primitive2d/textbreakuphelper.hxx index 4a3996353a93..2f5cfbfc7286 100644 --- a/include/drawinglayer/primitive2d/textbreakuphelper.hxx +++ b/include/drawinglayer/primitive2d/textbreakuphelper.hxx @@ -50,7 +50,7 @@ namespace drawinglayer bool mbNoDXArray : 1; /// create a portion from nIndex to nLength and append to rTempResult - void breakupPortion(Primitive2DVector& rTempResult, sal_uInt32 nIndex, sal_uInt32 nLength, bool bWordLineMode); + void breakupPortion(Primitive2DVector& rTempResult, sal_Int32 nIndex, sal_Int32 nLength, bool bWordLineMode); /// breakup complete primitive void breakup(BreakupUnit aBreakupUnit); diff --git a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx index e12b18608350..8a2d055ed4cd 100644 --- a/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textdecoratedprimitive2d.hxx @@ -73,8 +73,8 @@ namespace drawinglayer std::vector< Primitive2DReference >& rTarget, basegfx::tools::B2DHomMatrixBufferedOnDemandDecompose& rDecTrans, const OUString& rText, - xub_StrLen aTextPosition, - xub_StrLen aTextLength, + sal_Int32 nTextPosition, + sal_Int32 nTextLength, const ::std::vector< double >& rDXArray, const attribute::FontAttribute& rFontAttribute) const; @@ -85,12 +85,11 @@ namespace drawinglayer public: /// constructor TextDecoratedPortionPrimitive2D( - /// TextSimplePortionPrimitive2D parameters const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText, - xub_StrLen aTextPosition, - xub_StrLen aTextLength, + sal_Int32 nTextPosition, + sal_Int32 nTextLength, const ::std::vector< double >& rDXArray, const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, diff --git a/include/drawinglayer/primitive2d/textprimitive2d.hxx b/include/drawinglayer/primitive2d/textprimitive2d.hxx index 06d9068cc0ee..2eda670f3529 100644 --- a/include/drawinglayer/primitive2d/textprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/textprimitive2d.hxx @@ -100,10 +100,10 @@ namespace drawinglayer OUString maText; /// The index from where on maText is used - xub_StrLen maTextPosition; + sal_Int32 mnTextPosition; /// The length for maText usage, starting from maTextPosition - xub_StrLen maTextLength; + sal_Int32 mnTextLength; /// The DX array in logic units ::std::vector< double > maDXArray; @@ -131,8 +131,8 @@ namespace drawinglayer TextSimplePortionPrimitive2D( const basegfx::B2DHomMatrix& rNewTransform, const OUString& rText, - xub_StrLen aTextPosition, - xub_StrLen aTextLength, + sal_Int32 nTextPosition, + sal_Int32 nTextLength, const ::std::vector< double >& rDXArray, const attribute::FontAttribute& rFontAttribute, const ::com::sun::star::lang::Locale& rLocale, @@ -149,8 +149,8 @@ namespace drawinglayer /// data read access const basegfx::B2DHomMatrix& getTextTransform() const { return maTextTransform; } const OUString& getText() const { return maText; } - xub_StrLen getTextPosition() const { return maTextPosition; } - xub_StrLen getTextLength() const { return maTextLength; } + sal_Int32 getTextPosition() const { return mnTextPosition; } + sal_Int32 getTextLength() const { return mnTextLength; } const ::std::vector< double >& getDXArray() const { return maDXArray; } const attribute::FontAttribute& getFontAttribute() const { return maFontAttribute; } const ::com::sun::star::lang::Locale& getLocale() const { return maLocale; } |