summaryrefslogtreecommitdiff
path: root/cppcanvas
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-13 20:42:42 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-14 09:33:09 +0000
commitd113e328ef045e8da2b3e6f6e9d82970e882d097 (patch)
treedaeabd13f18e7ed5a84804c99557744c69f1c28e /cppcanvas
parent06998741b877b1ae8a201eeea4d011c3b7a156c3 (diff)
longparas: remove now broken STRING_LEN uses
Change-Id: Ie2de4680e07e26416fc52d4c22b5bececb190cc1
Diffstat (limited to 'cppcanvas')
-rw-r--r--cppcanvas/source/mtfrenderer/implrenderer.cxx16
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 );