summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-14 09:36:56 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-14 10:53:28 +0000
commita932e780600e9cbd1d6e31348889e9350ccd3cf0 (patch)
tree30bfdfdbab91f76452ecdf0f4d373cda5adabd60 /slideshow
parent8c000c1f38fd603512cf94d166eb7b779aa8d529 (diff)
longparas: remove now broken STRING_LEN uses
Change-Id: I89799855925b7c246262ae56c2637e20e51cffee
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/shapes/gdimtftools.cxx13
1 files changed, 6 insertions, 7 deletions
diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx
index 3988cfbe8f5e..21c60e716913 100644
--- a/slideshow/source/engine/shapes/gdimtftools.cxx
+++ b/slideshow/source/engine/shapes/gdimtftools.cxx
@@ -21,7 +21,6 @@
// must be first
#include <canvas/debug.hxx>
#include <tools/diagnose_ex.h>
-#include <tools/string.hxx>
#include <gdimtftools.hxx>
#include <com/sun/star/document/XExporter.hpp>
@@ -241,20 +240,20 @@ sal_Int32 getNextActionOffset( MetaAction * pCurrAct )
switch (pCurrAct->GetType()) {
case META_TEXT_ACTION: {
MetaTextAction * pAct = static_cast<MetaTextAction *>(pCurrAct);
- return (pAct->GetLen() == (sal_uInt16)STRING_LEN
- ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen());
+ sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex());
+ return nLen;
}
case META_TEXTARRAY_ACTION: {
MetaTextArrayAction * pAct =
static_cast<MetaTextArrayAction *>(pCurrAct);
- return (pAct->GetLen() == (sal_uInt16)STRING_LEN
- ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen());
+ sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex());
+ return nLen;
}
case META_STRETCHTEXT_ACTION: {
MetaStretchTextAction * pAct =
static_cast<MetaStretchTextAction *>(pCurrAct);
- return (pAct->GetLen() == (sal_uInt16)STRING_LEN
- ? pAct->GetText().getLength() - pAct->GetIndex() : pAct->GetLen());
+ sal_Int32 nLen = std::min(pAct->GetLen(), pAct->GetText().getLength() - pAct->GetIndex());
+ return nLen;
}
case META_FLOATTRANSPARENT_ACTION: {
MetaFloatTransparentAction * pAct =