summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-02-13 15:19:49 +0100
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-02-13 15:25:58 +0100
commit7ff8414a411ae35e1fe56e9724646d0e94fa17f6 (patch)
treecc85f3c2c5e9cf5e032a0265c6123b2f7585807c /writerfilter/source/dmapper/DomainMapperTableHandler.cxx
parentf16368777b8b03164e3485143f014486e7cc69e2 (diff)
DOCX import: fix relative width of floating tables
Relative width of tables means relative to the page and not to the paragraph area so we have to set the RelativeWidthRelation property of the containing text frame. Change-Id: I054d22e1883eb0ed9b07b9141bb2bea956e8367e
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx9
1 files changed, 6 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 3bc66fac72d7..03be88dc4333 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -944,9 +944,12 @@ void DomainMapperTableHandler::endTable(unsigned int nestedTableLevel)
}
else
{
- aFrameProperties.realloc(aFrameProperties.getLength() + 1);
- aFrameProperties[aFrameProperties.getLength() - 1].Name = "FrameWidthPercent";
- aFrameProperties[aFrameProperties.getLength() - 1].Value = xTableProperties->getPropertyValue("RelativeWidth");
+ 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);
// 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)));