[Libreoffice-commits] core.git: sw/qa writerfilter/source
Zolnai Tamás
tamas.zolnai at collabora.com
Thu Feb 13 20:20:36 CET 2014
dev/null |binary
sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 12 ------------
writerfilter/source/dmapper/DomainMapperTableHandler.cxx | 9 +++------
3 files changed, 3 insertions(+), 18 deletions(-)
New commits:
commit 5e5ec33eb4a4e10afd9c7ee7c269c2c18144d033
Author: Zolnai Tamás <tamas.zolnai at collabora.com>
Date: Thu Feb 13 20:19:04 2014 +0100
Revert "DOCX import: fix relative width of floating tables"
This reverts commit 7ff8414a411ae35e1fe56e9724646d0e94fa17f6,
which was the result of a misunderstending.
diff --git a/sw/qa/extras/ooxmlimport/data/floating-table-with-relative-width.docx b/sw/qa/extras/ooxmlimport/data/floating-table-with-relative-width.docx
deleted file mode 100644
index 9d88d93..0000000
Binary files a/sw/qa/extras/ooxmlimport/data/floating-table-with-relative-width.docx and /dev/null differ
diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index d60247e..3b3a227 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1848,18 +1848,6 @@ DECLARE_OOXMLIMPORT_TEST(testFdo69656, "Table_cell_auto_width_fdo69656.docx")
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables( ), uno::UNO_QUERY);
CPPUNIT_ASSERT_EQUAL(sal_Int32(8154), getProperty<sal_Int32>(xTables->getByIndex(0), "Width"));
}
-
-DECLARE_OOXMLIMPORT_TEST(testFloatingTableWithRelativeWidth, "floating-table-with-relative-width.docx")
-{
- // Floating tables are imported to text frames and the size is defined by the frame size.
- // Width of the text frame including table was relative to the paragraph area and not to the page.
- uno::Reference<text::XTextFramesSupplier> xTextFramesSupplier(mxComponent, uno::UNO_QUERY);
- uno::Reference<container::XIndexAccess> xIndexAccess(xTextFramesSupplier->getTextFrames(), uno::UNO_QUERY);
- uno::Reference<beans::XPropertySet> xFrame(xIndexAccess->getByIndex(0), uno::UNO_QUERY);
- CPPUNIT_ASSERT_EQUAL(sal_Int32(80), getProperty<sal_Int32>(xFrame, "RelativeWidth"));
- CPPUNIT_ASSERT_EQUAL(sal_Int16(text::RelOrientation::PAGE_FRAME), getProperty<sal_Int16>(xFrame, "RelativeWidthRelation"));
-
-}
#endif
CPPUNIT_PLUGIN_IMPLEMENT();
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 03be88d..3bc66fa 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -944,12 +944,9 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
}
else
{
- aFrameProperties.realloc(aFrameProperties.getLength() + 2);
- aFrameProperties[aFrameProperties.getLength() - 2].Name = "FrameWidthPercent";
- aFrameProperties[aFrameProperties.getLength() - 2].Value = xTableProperties->getPropertyValue("RelativeWidth");
-
- aFrameProperties[aFrameProperties.getLength() - 1].Name = "RelativeWidthRelation";
- aFrameProperties[aFrameProperties.getLength() - 1].Value = uno::makeAny(text::RelOrientation::PAGE_FRAME);
+ aFrameProperties.realloc(aFrameProperties.getLength() + 1);
+ aFrameProperties[aFrameProperties.getLength() - 1].Name = "FrameWidthPercent";
+ aFrameProperties[aFrameProperties.getLength() - 1].Value = xTableProperties->getPropertyValue("RelativeWidth");
// Applying the relative width to the frame, needs to have the table width to be 100% of the frame width
xTableProperties->setPropertyValue("RelativeWidth", uno::makeAny(sal_Int16(100)));
More information about the Libreoffice-commits
mailing list