summaryrefslogtreecommitdiff
path: root/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
diff options
context:
space:
mode:
authorSJacobi <Sven-Jacobi@gmx.de>2013-03-28 14:12:09 +0100
committerMiklos Vajna <vmiklos@suse.cz>2013-03-28 15:56:53 +0000
commit6718482c072defe5d885030826fef5ef833732e9 (patch)
treec5eaa08f132443028b1bca84e7940728cffb34ef /writerfilter/source/dmapper/DomainMapperTableHandler.cxx
parent0d89580eeb61ae01f1c1f2836f77ffef6a146770 (diff)
fixed table width, supporting rel table width, fixed grid handling
Change-Id: I28e66ed19e22f0e520f6b16a86a9e032e03d5bd8 Reviewed-on: https://gerrit.libreoffice.org/3110 Reviewed-by: Miklos Vajna <vmiklos@suse.cz> Tested-by: Miklos Vajna <vmiklos@suse.cz>
Diffstat (limited to 'writerfilter/source/dmapper/DomainMapperTableHandler.cxx')
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx15
1 files changed, 13 insertions, 2 deletions
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 8474a2fc5ffe..176f3c9fe69c 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/table/BorderLine2.hpp>
#include <com/sun/star/text/HoriOrientation.hpp>
#include <com/sun/star/text/RelOrientation.hpp>
+#include <com/sun/star/text/SizeType.hpp>
#include <dmapperLoggers.hxx>
#ifdef DEBUG_DMAPPER_TABLE_HANDLER
@@ -318,6 +319,7 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
sal_Int32 nGapHalf = 0;
sal_Int32 nLeftMargin = 0;
sal_Int32 nTableWidth = 0;
+ sal_Int32 nTableWidthType = text::SizeType::FIX;
PropertyMap::iterator aTableStyleIter =
m_aTableProperties->find( PropertyDefinition( META_PROP_TABLE_STYLE_NAME, false ) );
@@ -457,8 +459,17 @@ TableStyleSheetEntry * DomainMapperTableHandler::endTableGetTableStyle(TableInfo
}
m_aTableProperties->getValue( TablePropertyMap::TABLE_WIDTH, nTableWidth );
- if( nTableWidth > 0 )
- m_aTableProperties->Insert( PROP_WIDTH, false, uno::makeAny( nTableWidth ));
+ m_aTableProperties->getValue( TablePropertyMap::TABLE_WIDTH_TYPE, nTableWidthType );
+ if( nTableWidthType == text::SizeType::FIX )
+ {
+ if( nTableWidth > 0 )
+ m_aTableProperties->Insert( PROP_WIDTH, false, uno::makeAny( nTableWidth ));
+ }
+ else
+ {
+ m_aTableProperties->Insert( PROP_RELATIVE_WIDTH, false, uno::makeAny( sal_Int16( nTableWidth ) ) );
+ m_aTableProperties->Insert( PROP_IS_WIDTH_RELATIVE, false, uno::makeAny( sal_Bool( sal_True ) ) );
+ }
sal_Int32 nHoriOrient = text::HoriOrientation::LEFT_AND_WIDTH;
m_aTableProperties->getValue( TablePropertyMap::HORI_ORIENT, nHoriOrient ) ;