summaryrefslogtreecommitdiff
path: root/xmloff/source/draw
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2019-08-26 20:57:10 +0200
committerMiklos Vajna <vmiklos@collabora.com>2019-08-27 09:15:23 +0200
commit28d67b792724a23015dec32fb0278b729f676736 (patch)
tree3ab8582c2ab326db25097ecdec5e0afbe1dad4af /xmloff/source/draw
parent5c50f1a2d4487b9303974c7cf39d6208192a0c96 (diff)
tdf#107776 sw ODF shape import: make is-textbox check more strict
Regression from commit 9835a5823e0f559aabbc0e15ea126c82229c4bc7 (sw textboxes: reimplement ODF import/export, 2014-10-04), the problem was that we assumed graphic autostyles look like: <style:style style:name="gr2" style:family="graphic"> for simple (non-text-box) content, and look like: <style:style style:name="gr1" style:family="graphic" style:parent-style-name="Frame"> for complex (text-box) content. Turns out it's valid to have other parent styles as well, e.g. Graphics, which should not be imported as sw textboxes. With this, the arrow at the bottom of page 3 of the bugdoc is now again on top of the image, i.e. layout compatibility is restored. Change-Id: Icbba8a23c5f66e63090f90e6581ebc98948cb80b Reviewed-on: https://gerrit.libreoffice.org/78155 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'xmloff/source/draw')
-rw-r--r--xmloff/source/draw/ximpshap.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index ec3c06ad1db2..15219b4fd23c 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -3671,7 +3671,8 @@ SdXMLCustomShapeContext::SdXMLCustomShapeContext(
{
rtl::Reference<XMLTextImportHelper> xTxtImport = GetImport().GetTextImport();
XMLPropStyleContext* pStyle = xTxtImport->FindAutoFrameStyle(aStyleName);
- if (pStyle && !pStyle->GetParentName().isEmpty())
+ // Note that this an API name, so intentionally not localized.
+ if (pStyle && pStyle->GetParentName() == "Frame")
{
mbTextBox = true;
break;