diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-19 16:09:49 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-10-19 21:20:41 +0200 |
commit | 71fcb90fb7b795c57b0634e114927103597c9cb1 (patch) | |
tree | 62672c09accba5d5ebd9f90e3d76b4e47fa6e941 /oox | |
parent | 2c4b0396ba0de0ced0d46293a0abef1e943d5f45 (diff) |
oox WpsContext: bTextFrame is always false
Since commit d379d18666aa42031359ca8eb34b0021960347ae (oox: import WPS
shape with text as shape with textbox, 2014-06-18).
Change-Id: I5cc1f9938a2c091c868e6e1572e7ae35e87109a7
Reviewed-on: https://gerrit.libreoffice.org/62016
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/shape/WpsContext.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx index 040d8df1e655..e196449ec7ed 100644 --- a/oox/source/shape/WpsContext.cxx +++ b/oox/source/shape/WpsContext.cxx @@ -116,7 +116,6 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken if (xServiceInfo.is()) { - bool bTextFrame = xServiceInfo->supportsService("com.sun.star.text.TextFrame"); // Handle inset attributes for Writer textframes. sal_Int32 aInsets[] = { XML_lIns, XML_tIns, XML_rIns, XML_bIns }; boost::optional<sal_Int32> oInsets[4]; @@ -129,11 +128,10 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken // Defaults from the spec: left/right: 91440 EMU, top/bottom: 45720 EMU oInsets[i] = (aInsets[i] == XML_lIns || aInsets[i] == XML_rIns) ? 254 : 127; } - OUString aProps[] = { OUString("LeftBorderDistance"), OUString("TopBorderDistance"), OUString("RightBorderDistance"), OUString("BottomBorderDistance") }; - OUString aShapeProps[] = { OUString("TextLeftDistance"), OUString("TextUpperDistance"), OUString("TextRightDistance"), OUString("TextLowerDistance") }; - for (std::size_t i = 0; i < SAL_N_ELEMENTS(bTextFrame ? aProps : aShapeProps); ++i) + const OUString aShapeProps[] = { OUString("TextLeftDistance"), OUString("TextUpperDistance"), OUString("TextRightDistance"), OUString("TextLowerDistance") }; + for (std::size_t i = 0; i < SAL_N_ELEMENTS(aShapeProps); ++i) if (oInsets[i]) - xPropertySet->setPropertyValue((bTextFrame ? aProps : aShapeProps)[i], uno::makeAny(*oInsets[i])); + xPropertySet->setPropertyValue(aShapeProps[i], uno::makeAny(*oInsets[i])); } // Handle text vertical adjustment inside a text frame |