diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-01-13 20:42:42 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-01-14 09:33:09 +0000 |
commit | d113e328ef045e8da2b3e6f6e9d82970e882d097 (patch) | |
tree | daeabd13f18e7ed5a84804c99557744c69f1c28e | |
parent | 06998741b877b1ae8a201eeea4d011c3b7a156c3 (diff) |
longparas: remove now broken STRING_LEN uses
Change-Id: Ie2de4680e07e26416fc52d4c22b5bececb190cc1
-rw-r--r-- | cppcanvas/source/mtfrenderer/implrenderer.cxx | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 8d92f519fd33..9b65a41b416f 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -79,7 +79,6 @@ #include "mtftools.hxx" #include "outdevstate.hxx" #include <basegfx/matrix/b2dhommatrixtools.hxx> -#include <tools/string.hxx> using namespace ::com::sun::star; @@ -2480,11 +2479,13 @@ namespace cppcanvas if (rVDev.GetDigitLanguage()) sText = convertToLocalizedNumerals(sText, rVDev.GetDigitLanguage()); + const sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); + createTextAction( pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen(), + nLen, NULL, rFactoryParms, bSubsettableActions ); @@ -2499,11 +2500,13 @@ namespace cppcanvas if (rVDev.GetDigitLanguage()) sText = convertToLocalizedNumerals(sText, rVDev.GetDigitLanguage()); + const sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); + createTextAction( pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen(), + nLen, pAct->GetDXArray(), rFactoryParms, bSubsettableActions ); @@ -2577,8 +2580,7 @@ namespace cppcanvas if (rVDev.GetDigitLanguage()) sText = convertToLocalizedNumerals(sText, rVDev.GetDigitLanguage()); - const sal_uInt16 nLen( pAct->GetLen() == (sal_uInt16)STRING_LEN ? - pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen() ); + const sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex()); // #i70897# Nothing to do, actually... if( nLen == 0 ) @@ -2598,7 +2600,7 @@ namespace cppcanvas // Last entry of pDXArray contains total width of the text sal_Int32* p=pDXArray.get(); - for( sal_uInt16 i=1; i<=nLen; ++i ) + for (sal_Int32 i=1; i<=nLen; ++i) { // calc ratio for every array entry, to // distribute rounding errors 'evenly' @@ -2613,7 +2615,7 @@ namespace cppcanvas pAct->GetPoint(), sText, pAct->GetIndex(), - pAct->GetLen() == (sal_uInt16)STRING_LEN ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen(), + nLen, pDXArray.get(), rFactoryParms, bSubsettableActions ); |