diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-12-01 09:24:15 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-12-01 09:25:01 +0100 |
commit | be6a428c08467ec379b58c8908580a282f9a9d01 (patch) | |
tree | f176c83b5eb2afb8c4398671a291a21e6a6f89b4 /writerfilter/source/dmapper | |
parent | f34b4844473d08c0c264ba4453a875e32f5c326b (diff) |
Related: tdf#94043 DOCX import: fix column separator handling
See wwSectionManager::SetCols() for the DOC import equivalent of this
code, if line width is 0, then there will be still no visible line.
Change-Id: Ifb0dc596e252a60cdac575fff2894aced1580c69
Diffstat (limited to 'writerfilter/source/dmapper')
-rw-r--r-- | writerfilter/source/dmapper/PropertyMap.cxx | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index ac02e6284b08..90c4da3e912e 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/text/XText.hpp> #include <com/sun/star/text/TextGridMode.hpp> #include <com/sun/star/text/XTextCopy.hpp> +#include <com/sun/star/style/VerticalAlignment.hpp> #include <comphelper/sequence.hxx> #include <comphelper/propertyvalue.hxx> #include "PropertyMapHelper.hxx" @@ -743,9 +744,14 @@ uno::Reference< text::XTextColumns > SectionPropertyMap::ApplyColumnProperties( } if(m_bSeparatorLineIsOn) - xColumnPropSet->setPropertyValue( - getPropertyName( PROP_SEPARATOR_LINE_IS_ON ), - uno::makeAny( m_bSeparatorLineIsOn )); + { + xColumnPropSet->setPropertyValue("SeparatorLineIsOn", uno::makeAny(true)); + xColumnPropSet->setPropertyValue("SeparatorLineVerticalAlignment", uno::makeAny(style::VerticalAlignment_TOP)); + xColumnPropSet->setPropertyValue("SeparatorLineRelativeHeight", uno::makeAny(static_cast<sal_Int8>(100))); + xColumnPropSet->setPropertyValue("SeparatorLineColor", uno::makeAny(static_cast<sal_Int32>(COL_BLACK))); + // 1 twip -> 2 mm100. + xColumnPropSet->setPropertyValue("SeparatorLineWidth", uno::makeAny(static_cast<sal_Int32>(2))); + } xColumnContainer->setPropertyValue( sTextColumns, uno::makeAny( xColumns ) ); // Set the columns to be unbalanced if that compatibility option is set or this is the last section. if (rDM_Impl.GetSettingsTable()->GetNoColumnBalance() || rDM_Impl.GetIsLastSectionGroup()) |