diff options
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 13 |
2 files changed, 13 insertions, 6 deletions
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index da3ccc7db741..d838edb08553 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -3231,6 +3231,12 @@ DECLARE_OOXMLIMPORT_TEST(testTdf99140, "tdf99140.docx") uno::Reference<drawing::XDrawPage> xDrawPage = xDrawPageSupplier->getDrawPage(); // This was 1: a multi-page floating table was imported as a TextFrame. CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), xDrawPage->getCount()); + + uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY); + uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY); + uno::Reference<beans::XPropertySet> xTableProperties(xTables->getByIndex(1), uno::UNO_QUERY); + // This was text::HoriOrientation::NONE, the second table was too wide due to this. + CPPUNIT_ASSERT_EQUAL(text::HoriOrientation::LEFT_AND_WIDTH, getProperty<sal_Int16>(xTableProperties, "HoriOrient")); } CPPUNIT_PLUGIN_IMPLEMENT(); diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx index 91a797a98872..c16282e66e09 100644 --- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx +++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx @@ -281,20 +281,21 @@ bool lcl_extractTableBorderProperty(PropertyMapPtr pTableProperties, const Prope return false; } -} - -bool lcl_extractHoriOrient(std::vector<beans::PropertyValue>& rFrameProperties, sal_Int32& nHoriOrient) +void lcl_extractHoriOrient(std::vector<beans::PropertyValue>& rFrameProperties, sal_Int32& nHoriOrient) { // Shifts the frame left by the given value. for (size_t i = 0; i < rFrameProperties.size(); ++i) { if (rFrameProperties[i].Name == "HoriOrient") { - nHoriOrient = rFrameProperties[i].Value.get<sal_Int32>(); - return true; + sal_Int32 nValue = rFrameProperties[i].Value.get<sal_Int32>(); + if (nValue != text::HoriOrientation::NONE) + nHoriOrient = nValue; + return; } } - return false; +} + } void lcl_DecrementHoriOrientPosition(std::vector<beans::PropertyValue>& rFrameProperties, sal_Int32 nAmount) |