diff options
author | Szabolcs <szabolcs450@gmail.com> | 2020-03-30 17:12:05 +0200 |
---|---|---|
committer | László Németh <nemeth@numbertext.org> | 2020-04-20 11:12:59 +0200 |
commit | 68531e459e7a922319e6bfe8b7a5282ba0320182 (patch) | |
tree | dc8d822bcf89e71bd96221653a1d6549f46bc954 /filter | |
parent | 9283cd9e13cd3e0dd7d6b831d930128931862a40 (diff) |
tdf#123346 DOCX VML shape export: fix arrow marker
In some cases at import there are extra space separated
numbers at the end of the names of arrow objects.
Remove these extra numbers before they could interfere
with the choice of markers.
See commit 2d3b7a07c02c90d2d64a630ab84886ef3096edfc
(tdf#100491 fix DOCX import shape line with arrow marker).
Co_Author: Balázs Regényi
Change-Id: I2156502b0ce5cd755a731359398a40edabb603a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91375
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/msfilter/escherex.cxx | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index 2abe567fdbeb..443d533ecadb 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -887,6 +887,11 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart, OUString aArrowStartName = *o3tl::doAccess<OUString>(aAny); sal_uInt16 nWhich = bLineStart ? sal_uInt16(XATTR_LINESTART) : sal_uInt16(XATTR_LINEEND); + // remove extra space separated number + sal_Int32 nPos = aArrowStartName.lastIndexOf(' '); + if (nPos > -1 && aArrowStartName.lastIndexOf(' ', nPos) > -1) + aArrowStartName = aArrowStartName.copy(0, nPos); + OUString aApiName = SvxUnogetApiNameForItem(nWhich, aArrowStartName); bool bIsMapped = true; if ( !aApiName.isEmpty() ) |