summaryrefslogtreecommitdiff
path: root/vcl/source/outdev
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-10-07 10:09:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-10-07 13:24:01 +0000
commitae625675a88db46d378cc29f6513bbb4fa6e62a7 (patch)
tree0c91981c8e7726a79b3f911b86e30ca7475e1974 /vcl/source/outdev
parent9bb6863fcf0784c70a95510b488f0162fe6deb37 (diff)
afl-eventtesting: creating OUString from super long sal_Unicode* is slow
the mpStr and mnLength arguments are always created from an OUString and the OUString aRun(rArgs.mpStr); creates a duplicate of the original string. Its way faster to pass the original OUString around instead. Change-Id: I3de0cc31654eb215362548b6aee435f9c0c3c9db Reviewed-on: https://gerrit.libreoffice.org/19221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'vcl/source/outdev')
-rw-r--r--vcl/source/outdev/font.cxx4
-rw-r--r--vcl/source/outdev/text.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/outdev/font.cxx b/vcl/source/outdev/font.cxx
index dcd2af30be0d..fd7b818ac871 100644
--- a/vcl/source/outdev/font.cxx
+++ b/vcl/source/outdev/font.cxx
@@ -2101,8 +2101,8 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay
int nCharPos = -1;
bool bRTL = false;
OUStringBuffer aMissingCodeBuf;
- while( rLayoutArgs.GetNextPos( &nCharPos, &bRTL) )
- aMissingCodeBuf.append( rLayoutArgs.mpStr[ nCharPos ] );
+ while (rLayoutArgs.GetNextPos( &nCharPos, &bRTL))
+ aMissingCodeBuf.append(rLayoutArgs.mrStr[nCharPos]);
rLayoutArgs.ResetPos();
OUString aMissingCodes = aMissingCodeBuf.makeStringAndClear();
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index c81e6f305892..d8757e057dd3 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -1298,7 +1298,7 @@ ImplLayoutArgs OutputDevice::ImplPrepareLayoutArgs( OUString& rStr,
nLayoutFlags |= SalLayoutFlags::RightAlign;
// set layout options
- ImplLayoutArgs aLayoutArgs( rStr.getStr(), rStr.getLength(), nMinIndex, nEndIndex, nLayoutFlags, maFont.GetLanguageTag(), pLayoutCache );
+ ImplLayoutArgs aLayoutArgs(rStr, nMinIndex, nEndIndex, nLayoutFlags, maFont.GetLanguageTag(), pLayoutCache);
int nOrientation = mpFontEntry ? mpFontEntry->mnOrientation : 0;
aLayoutArgs.SetOrientation( nOrientation );