summaryrefslogtreecommitdiff
path: root/xmloff/source/table/XMLTableExport.cxx
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-04-15 00:23:07 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-04-15 15:40:56 +0200
commitbcb371b1a830442610ad7fda476eda5271427a50 (patch)
treeb203e822dcde9f22fa56a57418c4dc4d1e96880f /xmloff/source/table/XMLTableExport.cxx
parent2436cf17304f25c7d34da52a321d6da0e9011d19 (diff)
ODF import / export of rotated text in Impress table
Change-Id: I57136e32ed2db5e405a45e8e4bad1b8d459b7ae8
Diffstat (limited to 'xmloff/source/table/XMLTableExport.cxx')
-rw-r--r--xmloff/source/table/XMLTableExport.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 668e2b477931..6be73aa181e3 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -44,6 +44,7 @@
#include <xmloff/xmlexppr.hxx>
#include <xmloff/xmlexp.hxx>
#include <xmloff/xmltypes.hxx>
+#include "xmlsdtypes.hxx"
#include <xmloff/maptype.hxx>
#include <xmloff/prhdlfac.hxx>
#include <xmloff/txtprmap.hxx>
@@ -62,6 +63,7 @@ using namespace ::com::sun::star::style;
#define MAP_(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
#define CMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TABLE_COLUMN,context)
#define RMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TABLE_ROW,context)
+#define CELLMAP(name,prefix,token,type,context) MAP_(name,prefix,token,type|XML_TYPE_PROP_TABLE_CELL,context)
#define MAP_END { nullptr, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
const XMLPropertyMapEntry* getColumnPropertiesMap()
@@ -89,6 +91,17 @@ const XMLPropertyMapEntry* getRowPropertiesMap()
return &aXMLRowProperties[0];
}
+const XMLPropertyMapEntry* getCellPropertiesMap()
+{
+ static const XMLPropertyMapEntry aXMLCellProperties[] =
+ {
+ CELLMAP( "RotateAngle", XML_NAMESPACE_STYLE, XML_ROTATION_ANGLE, XML_SD_TYPE_CELL_ROTATION_ANGLE, 0),
+ MAP_END
+ };
+
+ return &aXMLCellProperties[0];
+}
+
class StringStatisticHelper
{
private:
@@ -167,6 +180,7 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp
{
mxCellExportPropertySetMapper = xExportPropertyMapper;
mxCellExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(rExp));
+ mxCellExportPropertySetMapper->ChainExportMapper(new SvXMLExportPropertyMapper(new XMLPropertySetMapper(getCellPropertiesMap(), xFactoryRef.get(), true)));
}
mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), true ) );