oox/source/shape/WpsContext.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-)
New commits: commit 71fcb90fb7b795c57b0634e114927103597c9cb1 Author: Miklos Vajna <[email protected]> AuthorDate: Fri Oct 19 16:09:49 2018 +0200 Commit: Miklos Vajna <[email protected]> CommitDate: Fri Oct 19 21:20:41 2018 +0200 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 <[email protected]> Tested-by: Jenkins 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 _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
