From 7b44c5e95b07cde11b8b03f940f97e71ea9c7df4 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Fri, 20 Dec 2013 12:57:15 +0100
Subject: [PATCH 080/109] XMLPropertyMapEntry::mbImportOnly and
XMLPropertySetMapper bForExport
Although a rather large change this does not change the property
mappings or import/export behavior yet, but prepares for further
changes that add mappings for generating correct ODF and consuming
both old and new namespace/element/attribute names.
This is a combination of 4 commits:
added bool bForExport parameter to XMLPropertySetMapper ctor
Set to true for export, false for import. If export true, an
XMLPropertyMapEntry with mbImportOnly==true is not added to the
mappings. This to be able to have more than one mappings for import
(for example a current extension namespace and the future namespace
proposed to the ODF-TC, or corrected typos in element or attribute
names), but map only to one entry on export, of course.
(cherry picked from commit ebc1b2fe50c7ed1002ed8431410b8e2ac6e795b9)
Conflicts:
dbaccess/source/filter/xml/xmlHelper.cxx
xmloff/source/chart/PropertyMaps.cxx
xmloff/source/draw/sdpropls.cxx
xmloff/source/style/PageMasterPropMapper.cxx
xmloff/source/table/XMLTableImport.cxx
prepared XMLPropertyMapEntry with mbImportOnly flag
(cherry picked from commit 9dd7ee88bd9835ae2bae36093100fcd651fd3aeb)
Conflicts:
dbaccess/source/filter/xml/xmlHelper.cxx
xmloff/source/table/XMLTableExport.cxx
xmloff/source/text/txtprmap.cxx
just beautify this a little
(cherry picked from commit 44b4973fbd0f190906f36321b31215d80b363d52)
reordered member variables for 4 byte alignment
(cherry picked from commit dd902b8e256867b5d5fed06b52995f14d969f67d)
Change-Id: I15b03870fd14f110833037b6c0ff934624d72de1
Reviewed-on: https://gerrit.libreoffice.org/7144
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
---
dbaccess/source/filter/xml/xmlExport.cxx | 8 ++---
dbaccess/source/filter/xml/xmlHelper.cxx | 27 ++++++++--------
dbaccess/source/filter/xml/xmlHelper.hxx | 8 ++---
dbaccess/source/filter/xml/xmlfilter.cxx | 6 ++--
include/xmloff/maptype.hxx | 8 +++++
include/xmloff/txtprmap.hxx | 2 +-
include/xmloff/xmlprmap.hxx | 26 ++++++++++------
reportdesign/source/filter/xml/xmlExport.cxx | 12 +++----
reportdesign/source/filter/xml/xmlHelper.cxx | 16 +++++-----
reportdesign/source/filter/xml/xmlHelper.hxx | 2 +-
reportdesign/source/filter/xml/xmlStyleImport.cxx | 2 +-
reportdesign/source/filter/xml/xmlfilter.cxx | 8 ++---
sc/source/filter/xml/xmlexprt.cxx | 10 +++---
sc/source/filter/xml/xmlimprt.cxx | 8 ++---
sc/source/filter/xml/xmlstyle.cxx | 6 ++--
xmloff/inc/XMLChartPropertySetMapper.hxx | 4 +--
xmloff/qa/unit/uxmloff.cxx | 2 +-
xmloff/source/chart/PropertyMap.hxx | 16 +++++-----
xmloff/source/chart/PropertyMaps.cxx | 4 +--
xmloff/source/chart/SchXMLExport.cxx | 2 +-
xmloff/source/draw/sdpropls.cxx | 11 ++++---
xmloff/source/draw/sdpropls.hxx | 2 +-
xmloff/source/draw/sdxmlexp.cxx | 4 +--
xmloff/source/draw/shapeexport.cxx | 4 +--
xmloff/source/draw/shapeimport.cxx | 8 ++---
xmloff/source/forms/controlpropertymap.cxx | 8 ++---
xmloff/source/forms/layerexport.cxx | 2 +-
xmloff/source/style/PageMasterPropMapper.cxx | 9 +++---
xmloff/source/style/PageMasterPropMapper.hxx | 5 +--
xmloff/source/style/PageMasterStyleMap.cxx | 4 +--
xmloff/source/style/XMLPageExport.cxx | 2 +-
xmloff/source/style/xmlprmap.cxx | 38 +++++++++++++++++------
xmloff/source/style/xmlstyle.cxx | 4 +--
xmloff/source/table/XMLTableExport.cxx | 8 ++---
xmloff/source/table/XMLTableImport.cxx | 5 ++-
xmloff/source/text/txtimp.cxx | 22 ++++++-------
xmloff/source/text/txtparae.cxx | 20 ++++++------
xmloff/source/text/txtprmap.cxx | 22 ++++++-------
xmloff/source/text/txtstyle.cxx | 4 +--
39 files changed, 198 insertions(+), 161 deletions(-)
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 135ef75..538cfd3 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -232,7 +232,7 @@ ODBExport::ODBExport(const Reference< XComponentContext >& _rxContext,sal_uInt16
m_xColumnExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetColumnStylesPropertySetMapper());
m_xCellExportHelper = new OSpecialHanldeXMLExportPropertyMapper(GetCellStylesPropertySetMapper());
- m_xRowExportHelper = new OSpecialHanldeXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper());
+ m_xRowExportHelper = new OSpecialHanldeXMLExportPropertyMapper(OXMLHelper::GetRowStylesPropertySetMapper( true));
GetAutoStylePool()->AddFamily(
XML_STYLE_FAMILY_TABLE_TABLE,
@@ -1401,7 +1401,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper
{
if ( !m_xTableStylesPropertySetMapper.is() )
{
- m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper();
+ m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper( true);
}
return m_xTableStylesPropertySetMapper;
}
@@ -1410,7 +1410,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper(
{
if ( !m_xCellStylesPropertySetMapper.is() )
{
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper( true);
}
return m_xCellStylesPropertySetMapper;
}
@@ -1419,7 +1419,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetColumnStylesPropertySetMappe
{
if ( !m_xColumnStylesPropertySetMapper.is() )
{
- m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper();
+ m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper( true);
}
return m_xColumnStylesPropertySetMapper;
}
diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx
index a410f08..921581d 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -71,21 +71,20 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
return pHandler;
}
// -----------------------------------------------------------------------------
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010}
-// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper()
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010, false}
+UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper( bool bForExport )
{
static const XMLPropertyMapEntry s_aTableStylesProperties[] =
{
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aTableStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper()
+UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper( bool bForExport )
{
-#define MAP_CONST_COLUMN( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_COLUMN, context, SvtSaveOptions::ODFVER_010 }
+#define MAP_CONST_COLUMN( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_COLUMN, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aColumnStylesProperties[] =
{
MAP_CONST_COLUMN( PROPERTY_WIDTH, XML_NAMESPACE_STYLE, XML_COLUMN_WIDTH, XML_TYPE_MEASURE, 0),
@@ -94,13 +93,13 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapp
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aColumnStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper()
+UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper( bool bForExport )
{
-#define MAP_CONST_CELL( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_TEXT( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 }
+#define MAP_CONST_CELL( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_TEXT( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aCellStylesProperties[] =
{
MAP_CONST_CELL( PROPERTY_ALIGN, XML_NAMESPACE_FO, XML_TEXT_ALIGN, XML_TYPE_TEXT_ALIGN, CTF_DB_COLUMN_TEXT_ALIGN),
@@ -135,19 +134,19 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new /*OPropertyHandlerFactory*/::xmloff::OControlPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aCellStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper()
+UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper( bool bForExport )
{
-#define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010 }
+#define MAP_CONST_ROW( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TABLE_ROW, context, SvtSaveOptions::ODFVER_010, false }
static const XMLPropertyMapEntry s_aStylesProperties[] =
{
MAP_CONST_ROW( PROPERTY_ROW_HEIGHT, XML_NAMESPACE_STYLE, XML_ROW_HEIGHT, XML_TYPE_MEASURE, 0),
MAP_END()
};
UniReference < XMLPropertyHandlerFactory> xFac = new OPropertyHandlerFactory();
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac);
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aStylesProperties, xFac, bForExport);
}
// -----------------------------------------------------------------------------
}
diff --git a/dbaccess/source/filter/xml/xmlHelper.hxx b/dbaccess/source/filter/xml/xmlHelper.hxx
index aa7a76e..a9ec5fd 100644
--- a/dbaccess/source/filter/xml/xmlHelper.hxx
+++ b/dbaccess/source/filter/xml/xmlHelper.hxx
@@ -50,10 +50,10 @@ namespace dbaxml
class OXMLHelper
{
public:
- static UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper();
- static UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper();
- static UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper();
- static UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper();
+ static UniReference < XMLPropertySetMapper > GetTableStylesPropertySetMapper( bool bForExport );
+ static UniReference < XMLPropertySetMapper > GetColumnStylesPropertySetMapper( bool bForExport );
+ static UniReference < XMLPropertySetMapper > GetCellStylesPropertySetMapper( bool bForExport );
+ static UniReference < XMLPropertySetMapper > GetRowStylesPropertySetMapper( bool bForExport );
};
// -----------------------------------------------------------------------------
} // dbaxml
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 96ea9ed..d8186fb 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -858,7 +858,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper
{
if ( !m_xTableStylesPropertySetMapper.is() )
{
- m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper();
+ m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper( false);
}
return m_xTableStylesPropertySetMapper;
}
@@ -867,7 +867,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMappe
{
if ( !m_xColumnStylesPropertySetMapper.is() )
{
- m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper();
+ m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper( false);
}
return m_xColumnStylesPropertySetMapper;
}
@@ -876,7 +876,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetCellStylesPropertySetMapper(
{
if ( !m_xCellStylesPropertySetMapper.is() )
{
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper( false);
}
return m_xCellStylesPropertySetMapper;
}
diff --git a/include/xmloff/maptype.hxx b/include/xmloff/maptype.hxx
index bfd0463..756238f 100644
--- a/include/xmloff/maptype.hxx
+++ b/include/xmloff/maptype.hxx
@@ -43,6 +43,14 @@ struct XMLPropertyMapEntry
to im/export the porperty */
sal_Int16 mnContextId; /// User defined id for context filtering
SvtSaveOptions::ODFDefaultVersion mnEarliestODFVersionForExport;// no export when the used ODF version is lower than this
+
+ /** Flag to specify whether entry is only used during import.
+
+ Allows to handle more than one Namespace/XML-Name to Property-Name
+ mapping, i.e. for extensions. If several entries for the same
+ Property-Name exist, all except one must have this flag set.
+ */
+ bool mbImportOnly;
};
///////////////////////////////////////////////////////////////////////////
diff --git a/include/xmloff/txtprmap.hxx b/include/xmloff/txtprmap.hxx
index 92285911..fe5f80d 100644
--- a/include/xmloff/txtprmap.hxx
+++ b/include/xmloff/txtprmap.hxx
@@ -193,7 +193,7 @@
class XMLOFF_DLLPUBLIC XMLTextPropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLTextPropertySetMapper( sal_uInt16 nType );
+ XMLTextPropertySetMapper( sal_uInt16 nType, bool bForExport );
virtual ~XMLTextPropertySetMapper();
static const XMLPropertyMapEntry* getPropertyMapForType( sal_uInt16 _nType );
diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index 2105d6f..ad04bce 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -53,13 +53,14 @@ class XMLPropertyHandler;
*/
struct XMLPropertySetMapperEntry_Impl
{
- OUString sXMLAttributeName;
- OUString sAPIPropertyName;
- sal_uInt16 nXMLNameSpace;
- sal_Int32 nType;
- sal_Int16 nContextId;
- SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
- const XMLPropertyHandler *pHdl;
+ OUString sXMLAttributeName;
+ OUString sAPIPropertyName;
+ sal_Int32 nType;
+ sal_uInt16 nXMLNameSpace;
+ sal_Int16 nContextId;
+ SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
+ bool bImportOnly;
+ const XMLPropertyHandler *pHdl;
XMLPropertySetMapperEntry_Impl(
const XMLPropertyMapEntry& rMapEntry,
@@ -75,12 +76,19 @@ class XMLOFF_DLLPUBLIC XMLPropertySetMapper : public UniRefBase
{
::std::vector< XMLPropertySetMapperEntry_Impl > aMapEntries;
::std::vector< UniReference < XMLPropertyHandlerFactory > > aHdlFactories;
+ bool mbOnlyExportMappings;
public:
- /** The last element of the XMLPropertyMapEntry-array must contain NULL-values */
+ /** The last element of the XMLPropertyMapEntry-array must contain NULL-values.
+
+ @param bForExport
+ If TRUE, only entries that have the mbImportOnly flag not set
+ will be in the mappings.
+ */
XMLPropertySetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory );
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport );
virtual ~XMLPropertySetMapper();
void AddMapperEntry( const UniReference < XMLPropertySetMapper >& rMapper );
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 1b17eec..96efbf3 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -270,23 +270,23 @@ ORptExport::ORptExport(const Reference< XComponentContext >& _rxContext,sal_uInt
m_xPropHdlFactory = new OXMLRptPropHdlFactory();
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
- UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper1 = new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(),xFac);
- UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper2 = new XMLTextPropertySetMapper(TEXT_PROP_MAP_TABLE_DEFAULTS );
+ UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper1 = new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(),xFac, true);
+ UniReference < XMLPropertySetMapper > xTableStylesPropertySetMapper2 = new XMLTextPropertySetMapper(TEXT_PROP_MAP_TABLE_DEFAULTS, true );
xTableStylesPropertySetMapper1->AddMapperEntry(xTableStylesPropertySetMapper2);
m_xTableStylesExportPropertySetMapper = new SvXMLExportPropertyMapper(xTableStylesPropertySetMapper1);
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap( false, true);
m_xCellStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(m_xCellStylesPropertySetMapper);
m_xCellStylesExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
- UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory);
+ UniReference < XMLPropertySetMapper > xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, true);
m_xColumnStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(xColumnStylesPropertySetMapper);
- UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory);
+ UniReference < XMLPropertySetMapper > xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, true);
m_xRowStylesExportPropertySetMapper = new OSpecialHanldeXMLExportPropertyMapper(xRowStylesPropertySetMapper);
- UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
+ UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true ));
m_xParaPropMapper = new OSpecialHanldeXMLExportPropertyMapper( xPropMapper);
OUString sFamily( GetXMLToken(XML_PARAGRAPH) );
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 8537f94..1b1ada3 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -104,13 +104,13 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
return pHandler;
}
// -----------------------------------------------------------------------------
-#define MAP_CONST_T_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_P_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_S( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_SECTION, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_C_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE_CELL, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 ,0, SvtSaveOptions::ODFVER_010}
+#define MAP_CONST_T_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_P_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_S( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_SECTION, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_C_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, XML_NAMESPACE_##prefix, XML_##token, type|XML_TYPE_PROP_TABLE_CELL, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 ,0, SvtSaveOptions::ODFVER_010, false}
// -----------------------------------------------------------------------------
-UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat)
+UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _bOldFormat, bool bForExport)
{
if ( _bOldFormat )
{
@@ -133,7 +133,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory());
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
else
{
@@ -153,7 +153,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylePropertyMap(bool _
MAP_CONST_C_ASCII( "BorderBottom", FO, BORDER_BOTTOM, XML_TYPE_BORDER, 0 ),
MAP_END()
};
- return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory());
+ return new XMLPropertySetMapper((XMLPropertyMapEntry*)s_aXMLCellStylesProperties,new OPropertyHandlerFactory(), bForExport);
}
}
// -----------------------------------------------------------------------------
diff --git a/reportdesign/source/filter/xml/xmlHelper.hxx b/reportdesign/source/filter/xml/xmlHelper.hxx
index 6cc32dc..d3fbac9 100644
--- a/reportdesign/source/filter/xml/xmlHelper.hxx
+++ b/reportdesign/source/filter/xml/xmlHelper.hxx
@@ -56,7 +56,7 @@ namespace rptxml
class OXMLHelper
{
public:
- static UniReference < XMLPropertySetMapper > GetCellStylePropertyMap(bool _bOldFormat = false);
+ static UniReference < XMLPropertySetMapper > GetCellStylePropertyMap(bool _bOldFormat, bool bForExport);
static const SvXMLEnumMapEntry* GetReportPrintOptions();
static const SvXMLEnumMapEntry* GetForceNewPageOptions();
diff --git a/reportdesign/source/filter/xml/xmlStyleImport.cxx b/reportdesign/source/filter/xml/xmlStyleImport.cxx
index a79a9c2..eb19a01 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -241,7 +241,7 @@ UniReference < SvXMLImportPropertyMapper >
if( !m_xTableImpPropMapper.is() )
{
UniReference < XMLPropertyHandlerFactory> xFac = new ::xmloff::OControlPropertyHandlerFactory();
- m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac), m_rImport );
+ m_xTableImpPropMapper = new SvXMLImportPropertyMapper( new XMLPropertySetMapper(OXMLHelper::GetTableStyleProps(), xFac, false), m_rImport );
}
xMapper = m_xTableImpPropMapper;
}
diff --git a/reportdesign/source/filter/xml/xmlfilter.cxx b/reportdesign/source/filter/xml/xmlfilter.cxx
index fa83c16..23115e8 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -387,10 +387,10 @@ ORptFilter::ORptFilter( const uno::Reference< XComponentContext >& _rxContext,sa
XML_NAMESPACE_REPORT );
m_xPropHdlFactory = new OXMLRptPropHdlFactory;
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap(true);
- m_xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory);
- m_xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory);
- m_xTableStylesPropertySetMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_DEFAULTS );
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylePropertyMap(true, false);
+ m_xColumnStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetColumnStyleProps(), m_xPropHdlFactory, false);
+ m_xRowStylesPropertySetMapper = new XMLPropertySetMapper(OXMLHelper::GetRowStyleProps(), m_xPropHdlFactory, false);
+ m_xTableStylesPropertySetMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_DEFAULTS, false );
}
// -----------------------------------------------------------------------------
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 73b3aec..0fbc692 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -476,10 +476,10 @@ ScXMLExport::ScXMLExport(
// document is not set here - create ScChangeTrackingExportHelper later
xScPropHdlFactory = new XMLScPropHdlFactory;
- xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory);
- xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory);
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesProperties, xScPropHdlFactory);
- xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesProperties, xScPropHdlFactory);
+ xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory, true);
+ xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory, true);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesProperties, xScPropHdlFactory, true);
+ xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesProperties, xScPropHdlFactory, true);
xCellStylesExportPropertySetMapper = new ScXMLCellExportPropertyMapper(xCellStylesPropertySetMapper);
xCellStylesExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
xColumnStylesExportPropertySetMapper = new ScXMLColumnExportPropertyMapper(xColumnStylesPropertySetMapper);
@@ -4638,7 +4638,7 @@ sal_uInt32 ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
SfxObjectShell* pFoundShell = reinterpret_cast<SfxObjectShell*>( xObjShellTunnel.is() ? xObjShellTunnel->getSomething(SfxObjectShell::getUnoTunnelId()) : 0 );
if ( pFoundShell && ooo::vba::isAlienExcelDoc( *pFoundShell ) )
{
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScFromXLSRowStylesProperties, xScPropHdlFactory);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScFromXLSRowStylesProperties, xScPropHdlFactory, true);
xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper);
GetAutoStylePool()->SetFamilyPropSetMapper( XML_STYLE_FAMILY_TABLE_ROW,
xRowStylesExportPropertySetMapper );
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index fd40dc7..28c3ace 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2078,10 +2078,10 @@ ScXMLImport::ScXMLImport(
pStylesImportHelper = new ScMyStylesImportHelper(*this);
xScPropHdlFactory = new XMLScPropHdlFactory;
- xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory);
- xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory);
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesImportProperties, xScPropHdlFactory);
- xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesImportProperties, xScPropHdlFactory);
+ xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory, false);
+ xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory, false);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesImportProperties, xScPropHdlFactory, false);
+ xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesImportProperties, xScPropHdlFactory, false);
// #i66550# needed for 'presentation:event-listener' element for URLs in shapes
GetNamespaceMap().Add(
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 3a5fe2b..88fdef7 100644
--- a/sc/source/filter/xml/xmlstyle.cxx
+++ b/sc/source/filter/xml/xmlstyle.cxx
@@ -54,9 +54,9 @@ using namespace com::sun::star;
using namespace ::xmloff::token;
using namespace ::formula;
-#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 }
+#define MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_EXT(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
const XMLPropertyMapEntry aXMLScCellStylesProperties[] =
{
diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
index e2463e2..051910e 100644
--- a/xmloff/inc/XMLChartPropertySetMapper.hxx
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -47,8 +47,8 @@ public:
class XMLChartPropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLChartPropertySetMapper();
- ~XMLChartPropertySetMapper();
+ explicit XMLChartPropertySetMapper( bool bForExport );
+ ~XMLChartPropertySetMapper();
};
// ----------------------------------------
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index a0bd430..4380a9e 100644
--- a/xmloff/qa/unit/uxmloff.cxx
+++ b/xmloff/qa/unit/uxmloff.cxx
@@ -62,7 +62,7 @@ void Test::testAutoStylePool()
UniReference< SvXMLAutoStylePoolP > xPool(
new SvXMLAutoStylePoolP( *pExport ) );
UniReference< XMLPropertySetMapper > xSetMapper(
- new XMLChartPropertySetMapper );
+ new XMLChartPropertySetMapper( true) );
UniReference< XMLChartExportPropertyMapper > xExportPropMapper(
new XMLChartExportPropertyMapper( xSetMapper, *pExport ) );
diff --git a/xmloff/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index f19b365..809c043 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -84,14 +84,14 @@
#define XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ( XML_SCH_CTF_START + 25 )
-#define MAP_FULL( ApiName, NameSpace, XMLTokenName, XMLType, ContextId, EarliestODFVersionForExport ) { ApiName, sizeof(ApiName)-1, XML_NAMESPACE_##NameSpace, xmloff::token::XMLTokenName, XMLType|XML_TYPE_PROP_CHART, ContextId, EarliestODFVersionForExport }
-#define MAP_ENTRY( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_010 }
-#define MAP_ENTRY_ODF12( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012 }
-#define MAP_ENTRY_ODF_EXT( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT }
-#define MAP_CONTEXT( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFVER_010 }
-#define MAP_SPECIAL( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_010 }
-#define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_012 }
-#define MAP_ENTRY_END { 0,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010 }
+#define MAP_FULL( ApiName, NameSpace, XMLTokenName, XMLType, ContextId, EarliestODFVersionForExport ) { ApiName, sizeof(ApiName)-1, XML_NAMESPACE_##NameSpace, xmloff::token::XMLTokenName, XMLType|XML_TYPE_PROP_CHART, ContextId, EarliestODFVersionForExport, false }
+#define MAP_ENTRY( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_010, false }
+#define MAP_ENTRY_ODF12( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012, false }
+#define MAP_ENTRY_ODF_EXT( a, ns, nm, t ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false }
+#define MAP_CONTEXT( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART, c, SvtSaveOptions::ODFVER_010, false }
+#define MAP_SPECIAL( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_010, false }
+#define MAP_SPECIAL_ODF12( a, ns, nm, t, c ) { a, sizeof(a)-1, XML_NAMESPACE_##ns, xmloff::token::nm, t|XML_TYPE_PROP_CHART | MID_FLAG_SPECIAL_ITEM, c, SvtSaveOptions::ODFVER_012, false }
+#define MAP_ENTRY_END { 0,0,0,xmloff::token::XML_TOKEN_INVALID,0,0,SvtSaveOptions::ODFVER_010, false }
// ---------------------------------------------------------
// PropertyMap for Chart properties drawing- and
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index da81152..dd7b59a 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -171,8 +171,8 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32
// ----------------------------------------
-XMLChartPropertySetMapper::XMLChartPropertySetMapper() :
- XMLPropertySetMapper( aXMLChartPropMap, new XMLChartPropHdlFactory )
+XMLChartPropertySetMapper::XMLChartPropertySetMapper( bool bForExport ) :
+ XMLPropertySetMapper( aXMLChartPropMap, new XMLChartPropHdlFactory, bForExport )
{
}
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 89a8dae..8cd6416 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1064,7 +1064,7 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
msTableName = OUString( "local-table" );
// create property set mapper
- mxPropertySetMapper = new XMLChartPropertySetMapper;
+ mxPropertySetMapper = new XMLChartPropertySetMapper( true);
mxExpPropMapper = new XMLChartExportPropertyMapper( mxPropertySetMapper, rExport );
// register chart auto-style family
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 8e243fa..5486a18 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -72,14 +72,14 @@ using ::com::sun::star::uno::Reference;
using namespace ::com::sun::star;
using namespace ::xmloff::token;
-#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 }
-#define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version }
+#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010, false }
+#define _MAPV(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version, false }
#define GMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context)
#define GMAPV(name,prefix,token,type,context,version) _MAPV(name,prefix,token,type|XML_TYPE_PROP_GRAPHIC,context,version)
#define DPMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_DRAWING_PAGE,context)
#define TMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_TEXT,context)
#define PMAP(name,prefix,token,type,context) _MAP(name,prefix,token,type|XML_TYPE_PROP_PARAGRAPH,context)
-#define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010}
+#define MAP_END() { 0L, 0, 0, XML_EMPTY, 0 ,0, SvtSaveOptions::ODFVER_010, false }
//////////////////////////////////////////////////////////////////////////////
// entry list for graphic properties
@@ -1180,8 +1180,9 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
//////////////////////////////////////////////////////////////////////////////
-XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef)
-: XMLPropertySetMapper( aXMLSDProperties, rFactoryRef )
+XMLShapePropertySetMapper::XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef,
+ bool bForExport)
+: XMLPropertySetMapper( aXMLSDProperties, rFactoryRef, bForExport )
{
}
diff --git a/xmloff/source/draw/sdpropls.hxx b/xmloff/source/draw/sdpropls.hxx
index 70ac1b7..e10199c 100644
--- a/xmloff/source/draw/sdpropls.hxx
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -244,7 +244,7 @@ public:
class XMLShapePropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef);
+ XMLShapePropertySetMapper(const UniReference< XMLPropertyHandlerFactory >& rFactoryRef, bool bForExport);
~XMLShapePropertySetMapper();
};
diff --git a/xmloff/source/draw/sdxmlexp.cxx b/xmloff/source/draw/sdxmlexp.cxx
index c9149b9..5bbdce5 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -444,7 +444,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
const UniReference< XMLPropertyHandlerFactory > aFactoryRef = mpSdPropHdlFactory;
// construct PropertySetMapper
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( aFactoryRef);
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( aFactoryRef, true);
// get or create text paragraph export
GetTextParagraphExport();
@@ -456,7 +456,7 @@ void SAL_CALL SdXMLExport::setSourceDocument( const Reference< lang::XComponent
mpPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
// construct PresPagePropsMapper
- xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, aFactoryRef);
+ xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, aFactoryRef, true);
mpPresPagePropsMapper = new XMLPageExportPropertyMapper( xMapper, *this );
if(mpPresPagePropsMapper)
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index 14ec5c8..30c0230 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1014,7 +1014,7 @@ SvXMLExportPropertyMapper* XMLShapeExport::CreateShapePropMapper(
SvXMLExport& rExport )
{
UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rExport.GetModel(), rExport );
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory );
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, true );
rExport.GetTextParagraphExport(); // get or create text paragraph export
SvXMLExportPropertyMapper* pResult =
new XMLShapeExportPropertyMapper( xMapper, rExport );
@@ -1259,7 +1259,7 @@ const rtl::Reference< XMLTableExport >& XMLShapeExport::GetShapeTableExport()
if( !mxShapeTableExport.is() )
{
rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrExport.GetModel(), mrExport ) );
- UniReference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get() ) );
+ UniReference < XMLPropertySetMapper > xMapper( new XMLShapePropertySetMapper( xFactory.get(), true ) );
mrExport.GetTextParagraphExport(); // get or create text paragraph export
rtl::Reference< SvXMLExportPropertyMapper > xPropertySetMapper( new XMLShapeExportPropertyMapper( xMapper, mrExport ) );
mxShapeTableExport = new XMLTableExport( mrExport, xPropertySetMapper, xFactory );
diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx
index fb41110..7a4619ae 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -154,7 +154,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
mpSdPropHdlFactory->acquire();
// construct PropertySetMapper
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory);
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper(mpSdPropHdlFactory, false);
mpPropertySetMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
// set lock to avoid deletion
mpPropertySetMapper->acquire();
@@ -170,7 +170,7 @@ XMLShapeImportHelper::XMLShapeImportHelper(
mpPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaDefaultExtPropMapper(rImporter));
// construct PresPagePropsMapper
- xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, mpSdPropHdlFactory);
+ xMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLSDPresPageProps, mpSdPropHdlFactory, false);
mpPresPagePropsMapper = new SvXMLImportPropertyMapper( xMapper, rImporter );
if(mpPresPagePropsMapper)
{
@@ -1055,7 +1055,7 @@ void XMLShapeImportHelper::restoreConnections()
SvXMLImportPropertyMapper* XMLShapeImportHelper::CreateShapePropMapper( const uno::Reference< frame::XModel>& rModel, SvXMLImport& rImport )
{
UniReference< XMLPropertyHandlerFactory > xFactory = new XMLSdPropHdlFactory( rModel, rImport );
- UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory );
+ UniReference < XMLPropertySetMapper > xMapper = new XMLShapePropertySetMapper( xFactory, false );
SvXMLImportPropertyMapper* pResult = new SvXMLImportPropertyMapper( xMapper, rImport );
// chain text attributes
@@ -1160,7 +1160,7 @@ const rtl::Reference< XMLTableImport >& XMLShapeImportHelper::GetShapeTableImpor
if( !mxShapeTableImport.is() )
{
rtl::Reference< XMLPropertyHandlerFactory > xFactory( new XMLSdPropHdlFactory( mrImporter.GetModel(), mrImporter ) );
- rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory.get() ) );
+ rtl::Reference< XMLPropertySetMapper > xPropertySetMapper( new XMLShapePropertySetMapper( xFactory.get(), false ) );
mxShapeTableImport = new XMLTableImport( mrImporter, xPropertySetMapper, xFactory );
}
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx
index 2f0dc04..59e5986 100644
--- a/xmloff/source/forms/controlpropertymap.cxx
+++ b/xmloff/source/forms/controlpropertymap.cxx
@@ -35,10 +35,10 @@ namespace xmloff
{
//.........................................................................
-#define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010 }
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 }
+#define MAP_ASCII( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST( name, prefix, token, type, context ) { name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_TEXT, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_CONST_P( name, prefix, token, type, context ){ name, sizeof(name)-1, prefix, token, type|XML_TYPE_PROP_PARAGRAPH, context, SvtSaveOptions::ODFVER_010, false }
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
XMLPropertyMapEntry* getControlStylePropertyMap_Access( )
{
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index c880662..663609a 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -89,7 +89,7 @@ namespace xmloff
// add our style family to the export context's style pool
m_xPropertyHandlerFactory = new OControlPropertyHandlerFactory();
- ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get() );
+ ::rtl::Reference< XMLPropertySetMapper > xStylePropertiesMapper = new XMLPropertySetMapper( getControlStylePropertyMap(), m_xPropertyHandlerFactory.get(), true );
m_xStyleExportMapper = new OFormComponentStyleExportMapper( xStylePropertiesMapper.get() );
// our style family
diff --git a/xmloff/source/style/PageMasterPropMapper.cxx b/xmloff/source/style/PageMasterPropMapper.cxx
index 273e1c3..639fbb0 100644
--- a/xmloff/source/style/PageMasterPropMapper.cxx
+++ b/xmloff/source/style/PageMasterPropMapper.cxx
@@ -31,15 +31,16 @@ using namespace ::com::sun::star::beans;
//______________________________________________________________________________
-XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper():
- XMLPropertySetMapper( aXMLPageMasterStyleMap, new XMLPageMasterPropHdlFactory())
+XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper( bool bForExport ):
+ XMLPropertySetMapper( aXMLPageMasterStyleMap, new XMLPageMasterPropHdlFactory(), bForExport)
{
}
XMLPageMasterPropSetMapper::XMLPageMasterPropSetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory ) :
- XMLPropertySetMapper( pEntries, rFactory )
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport ) :
+ XMLPropertySetMapper( pEntries, rFactory, bForExport )
{
}
diff --git a/xmloff/source/style/PageMasterPropMapper.hxx b/xmloff/source/style/PageMasterPropMapper.hxx
index 231a359..392fe17 100644
--- a/xmloff/source/style/PageMasterPropMapper.hxx
+++ b/xmloff/source/style/PageMasterPropMapper.hxx
@@ -28,10 +28,11 @@
class XMLPageMasterPropSetMapper : public XMLPropertySetMapper
{
public:
- XMLPageMasterPropSetMapper();
+ XMLPageMasterPropSetMapper( bool bForExport );
XMLPageMasterPropSetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory );
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport );
virtual ~XMLPageMasterPropSetMapper();
};
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 8726729..18d6ea2 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -24,7 +24,7 @@
using namespace ::xmloff::token;
-#define MAP(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version }
+#define MAP(name,prefix,token,type,context,version) { name, sizeof(name)-1, prefix, token, type, context, version, false }
#define PLMAP(name,prefix,token,type,context) \
MAP(name,prefix,token,type|XML_TYPE_PROP_PAGE_LAYOUT,context, SvtSaveOptions::ODFVER_010)
#define PLMAP_12(name,prefix,token,type,context) \
@@ -186,7 +186,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
HFMAP( "FooterBackGraphicURL", XML_NAMESPACE_STYLE, XML_BACKGROUND_IMAGE, XML_TYPE_STRING | MID_FLAG_ELEMENT_ITEM, CTF_PM_FOOTERGRAPHICURL ),
HFMAP( "FooterDynamicSpacing", XML_NAMESPACE_STYLE, XML_DYNAMIC_SPACING, XML_TYPE_BOOL, CTF_PM_FOOTERFLAG ),
- { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010 }
+ { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 48e4295..7278eb9 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -161,7 +161,7 @@ XMLPageExport::XMLPageExport( SvXMLExport& rExp ) :
xPageMasterPropHdlFactory = new XMLPageMasterPropHdlFactory;
xPageMasterPropSetMapper = new XMLPageMasterPropSetMapper(
(XMLPropertyMapEntry*) aXMLPageMasterStyleMap,
- xPageMasterPropHdlFactory );
+ xPageMasterPropHdlFactory, true );
xPageMasterExportPropMapper = new XMLPageMasterExportPropMapper(
xPageMasterPropSetMapper, rExp);
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 351c912..1ea9a6f 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -40,10 +40,11 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
sXMLAttributeName( GetXMLToken(rMapEntry.meXMLName) ),
sAPIPropertyName( OUString(rMapEntry.msApiName, rMapEntry.nApiNameLength,
RTL_TEXTENCODING_ASCII_US ) ),
- nXMLNameSpace( rMapEntry.mnNameSpace ),
nType( rMapEntry.mnType ),
+ nXMLNameSpace( rMapEntry.mnNameSpace ),
nContextId( rMapEntry.mnContextId ),
nEarliestODFVersionForExport( rMapEntry.mnEarliestODFVersionForExport ),
+ bImportOnly( rMapEntry.mbImportOnly),
pHdl( rFactory->GetPropertyHandler( rMapEntry.mnType & MID_FLAG_MASK ) )
{
}
@@ -52,10 +53,11 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
const XMLPropertySetMapperEntry_Impl& rEntry ) :
sXMLAttributeName( rEntry.sXMLAttributeName),
sAPIPropertyName( rEntry.sAPIPropertyName),
- nXMLNameSpace( rEntry.nXMLNameSpace),
nType( rEntry.nType),
+ nXMLNameSpace( rEntry.nXMLNameSpace),
nContextId( rEntry.nContextId),
nEarliestODFVersionForExport( rEntry.nEarliestODFVersionForExport ),
+ bImportOnly( rEntry.bImportOnly),
pHdl( rEntry.pHdl)
{
DBG_ASSERT( pHdl, "Unknown XML property type handler!" );
@@ -67,19 +69,36 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
//
XMLPropertySetMapper::XMLPropertySetMapper(
const XMLPropertyMapEntry* pEntries,
- const UniReference< XMLPropertyHandlerFactory >& rFactory )
+ const UniReference< XMLPropertyHandlerFactory >& rFactory,
+ bool bForExport )
+ :
+ mbOnlyExportMappings( bForExport)
{
aHdlFactories.push_back( rFactory );
if( pEntries )
{
const XMLPropertyMapEntry* pIter = pEntries;
- // count entries
- while( pIter->msApiName )
+ if (mbOnlyExportMappings)
+ {
+ while( pIter->msApiName )
+ {
+ if (!pIter->mbImportOnly)
+ {
+ XMLPropertySetMapperEntry_Impl aEntry( *pIter, rFactory );
+ aMapEntries.push_back( aEntry );
+ }
+ pIter++;
+ }
+ }
+ else
{
- XMLPropertySetMapperEntry_Impl aEntry( *pIter, rFactory );
- aMapEntries.push_back( aEntry );
- pIter++;
+ while( pIter->msApiName )
+ {
+ XMLPropertySetMapperEntry_Impl aEntry( *pIter, rFactory );
+ aMapEntries.push_back( aEntry );
+ pIter++;
+ }
}
}
}
@@ -104,7 +123,8 @@ void XMLPropertySetMapper::AddMapperEntry(
aEIter != rMapper->aMapEntries.end();
++aEIter )
{
- aMapEntries.push_back( *aEIter );
+ if (!mbOnlyExportMappings || !(*aEIter).bImportOnly)
+ aMapEntries.push_back( *aEIter );
}
}
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index c54d7ff..7ca0b20 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -677,7 +677,7 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty
case XML_STYLE_FAMILY_SCH_CHART_ID:
if( ! mxChartImpPropMapper.is() )
{
- XMLPropertySetMapper *pPropMapper = new XMLChartPropertySetMapper();
+ XMLPropertySetMapper *pPropMapper = new XMLChartPropertySetMapper( false );
mxChartImpPropMapper = new XMLChartImportPropertyMapper( pPropMapper, GetImport() );
}
xMapper = mxChartImpPropMapper;
@@ -686,7 +686,7 @@ UniReference < SvXMLImportPropertyMapper > SvXMLStylesContext::GetImportProperty
if( ! mxPageImpPropMapper.is() )
{
XMLPropertySetMapper *pPropMapper =
- new XMLPageMasterPropSetMapper();
+ new XMLPageMasterPropSetMapper( false );
mxPageImpPropMapper =
new PageMasterImportPropertyMapper( pPropMapper,
((SvXMLStylesContext*)this)->GetImport() );
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index b710ade..611273d 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -54,10 +54,10 @@ using namespace ::com::sun::star::style;
// --------------------------------------------------------------------
-#define _MAP(name,prefix,token,type,context) { name, sizeof(name)-1, prefix, token, type, context, SvtSaveOptions::ODFVER_010 }
+#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 MAP_END { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010 }
+#define MAP_END { 0L, 0, 0, XML_EMPTY, 0, 0, SvtSaveOptions::ODFVER_010, false }
// --------------------------------------------------------------------
@@ -163,8 +163,8 @@ XMLTableExport::XMLTableExport(SvXMLExport& rExp, const rtl::Reference< SvXMLExp
mxCellExportPropertySetMapper = xExportPropertyMapper;
mxCellExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(rExp));
- mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get() ) );
- mxColumnExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get() ) );
+ mxRowExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), true ) );
+ mxColumnExportPropertySetMapper = new SvXMLExportPropertyMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get(), true ) );
mrExport.GetAutoStylePool()->AddFamily(XML_STYLE_FAMILY_TABLE_COLUMN,
OUString(XML_STYLE_FAMILY_TABLE_COLUMN_STYLES_NAME),
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 5925490..1f84765 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -205,11 +205,10 @@ XMLTableImport::XMLTableImport( SvXMLImport& rImport, const rtl::Reference< XMLP
mxCellImportPropertySetMapper = new SvXMLImportPropertyMapper( xCellPropertySetMapper.get(), rImport );
mxCellImportPropertySetMapper->ChainImportMapper(XMLTextImportHelper::CreateParaExtPropMapper(rImport));
-
- UniReference < XMLPropertySetMapper > xRowMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get() ) );
+ UniReference < XMLPropertySetMapper > xRowMapper( new XMLPropertySetMapper( getRowPropertiesMap(), xFactoryRef.get(), false ) );
mxRowImportPropertySetMapper = new SvXMLImportPropertyMapper( xRowMapper, rImport );
- UniReference < XMLPropertySetMapper > xColMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get() ) );
+ UniReference < XMLPropertySetMapper > xColMapper( new XMLPropertySetMapper( getColumnPropertiesMap(), xFactoryRef.get(), false ) );
mxColumnImportPropertySetMapper = new SvXMLImportPropertyMapper( xColMapper, rImport );
}
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 24221a6..42e0576 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1001,23 +1001,23 @@ XMLTextImportHelper::XMLTextImportHelper(
}
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, false );
m_pImpl->m_xParaImpPrMap =
new XMLTextImportPropertyMapper( pPropMapper, rImport );
- pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT );
+ pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT, false );
m_pImpl->m_xTextImpPrMap =
new XMLTextImportPropertyMapper( pPropMapper, rImport );
- pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME );
+ pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME, false );
m_pImpl->m_xFrameImpPrMap =
new XMLTextImportPropertyMapper( pPropMapper, rImport );
- pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION );
+ pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION, false );
m_pImpl->m_xSectionImpPrMap =
new XMLTextImportPropertyMapper( pPropMapper, rImport );
- pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY );
+ pPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY, false );
m_pImpl->m_xRubyImpPrMap =
new SvXMLImportPropertyMapper( pPropMapper, rImport );
}
@@ -1029,25 +1029,25 @@ XMLTextImportHelper::~XMLTextImportHelper()
SvXMLImportPropertyMapper *XMLTextImportHelper::CreateShapeExtPropMapper(SvXMLImport& rImport)
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME, false );
return new XMLTextImportPropertyMapper( pPropMapper, rImport );
}
SvXMLImportPropertyMapper *XMLTextImportHelper::CreateParaExtPropMapper(SvXMLImport& rImport)
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE_PARA );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE_PARA, false );
return new XMLTextImportPropertyMapper( pPropMapper, rImport );
}
SvXMLImportPropertyMapper *XMLTextImportHelper::CreateParaDefaultExtPropMapper(SvXMLImport& rImport)
{
XMLPropertySetMapper* pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE_PARA );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE_PARA, false );
SvXMLImportPropertyMapper* pImportMapper = new XMLTextImportPropertyMapper( pPropMapper, rImport );
pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT_ADDITIONAL_DEFAULTS );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT_ADDITIONAL_DEFAULTS, false );
pImportMapper->ChainImportMapper( new XMLTextImportPropertyMapper( pPropMapper, rImport ) );
return pImportMapper;
@@ -1058,7 +1058,7 @@ SvXMLImportPropertyMapper*
SvXMLImport& rImport )
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_DEFAULTS );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_DEFAULTS, false );
return new SvXMLImportPropertyMapper( pPropMapper, rImport );
}
@@ -1067,7 +1067,7 @@ SvXMLImportPropertyMapper*
SvXMLImport& rImport )
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_ROW_DEFAULTS );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_TABLE_ROW_DEFAULTS, false );
return new SvXMLImportPropertyMapper( pPropMapper, rImport );
}
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index 3b5933b..e09b6a2 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1273,7 +1273,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
sTextFieldStartEnd( "TextFieldStartEnd" ),
aCharStyleNamesPropInfoCache( sCharStyleNames )
{
- UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
+ UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA, true ));
xParaPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
@@ -1282,7 +1282,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_PARAGRAPH, sFamily,
xParaPropMapper, aPrefix );
- xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT );
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT, true );
xTextPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
sFamily = OUString( GetXMLToken(XML_TEXT) );
@@ -1290,7 +1290,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_TEXT, sFamily,
xTextPropMapper, aPrefix );
- xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_AUTO_FRAME );
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_AUTO_FRAME, true );
xAutoFramePropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
sFamily = OUString( XML_STYLE_FAMILY_SD_GRAPHICS_NAME );
@@ -1298,7 +1298,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_FRAME, sFamily,
xAutoFramePropMapper, aPrefix );
- xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION );
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_SECTION, true );
xSectionPropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
sFamily = OUString( GetXMLToken( XML_SECTION ) );
@@ -1306,14 +1306,14 @@ XMLTextParagraphExport::XMLTextParagraphExport(
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_SECTION, sFamily,
xSectionPropMapper, aPrefix );
- xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY );
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_RUBY, true );
xRubyPropMapper = new SvXMLExportPropertyMapper( xPropMapper );
sFamily = OUString( GetXMLToken( XML_RUBY ) );
aPrefix = OUString( "Ru" );
rAutoStylePool.AddFamily( XML_STYLE_FAMILY_TEXT_RUBY, sFamily,
xRubyPropMapper, aPrefix );
- xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME );
+ xPropMapper = new XMLTextPropertySetMapper( TEXT_PROP_MAP_FRAME, true );
xFramePropMapper = new XMLTextExportPropertySetMapper( xPropMapper,
GetExport() );
@@ -1357,7 +1357,7 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateShapeExtPropMapper(
SvXMLExport& rExport )
{
UniReference < XMLPropertySetMapper > xPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE, true );
return new XMLTextExportPropertySetMapper( xPropMapper, rExport );
}
@@ -1365,7 +1365,7 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateCharExtPropMapper(
SvXMLExport& rExport)
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT, true );
return new XMLTextExportPropertySetMapper( pPropMapper, rExport );
}
@@ -1373,7 +1373,7 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateParaExtPropMapper(
SvXMLExport& rExport)
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE_PARA );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_SHAPE_PARA, true );
return new XMLTextExportPropertySetMapper( pPropMapper, rExport );
}
@@ -1381,7 +1381,7 @@ SvXMLExportPropertyMapper *XMLTextParagraphExport::CreateParaDefaultExtPropMappe
SvXMLExport& rExport)
{
XMLPropertySetMapper *pPropMapper =
- new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT_ADDITIONAL_DEFAULTS );
+ new XMLTextPropertySetMapper( TEXT_PROP_MAP_TEXT_ADDITIONAL_DEFAULTS, true );
return new XMLTextExportPropertySetMapper( pPropMapper, rExport );
}
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index def8335..26d04d8 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -31,13 +31,13 @@ using namespace ::com::sun::star::uno;
using namespace ::xmloff::token;
#define _M_E( a, p, l, t, c ) \
- { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, t, c, SvtSaveOptions::ODFVER_010 }
+ { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, t, c, SvtSaveOptions::ODFVER_010, false }
#define _M_EV( a, p, l, t, c, v ) \
- { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, t, c, v }
+ { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, t, c, v, false }
#define _M_ED( a, p, l, t, c ) \
- { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c, SvtSaveOptions::ODFVER_010 }
+ { a, sizeof(a)-1, XML_NAMESPACE_##p, XML_##l, (t) | MID_FLAG_DEFAULT_ITEM_EXPORT, c, SvtSaveOptions::ODFVER_010, false }
// text properties
#define MT_E( a, p, l, t, c ) \
@@ -68,7 +68,7 @@ using namespace ::xmloff::token;
_M_E( a, p, l, (t|XML_TYPE_PROP_RUBY), c )
#define M_END() \
- { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010 }
+ { NULL, 0, 0, XML_TOKEN_INVALID, 0, 0, SvtSaveOptions::ODFVER_010, false }
XMLPropertyMapEntry aXMLParaPropMap[] =
@@ -88,7 +88,7 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
MP_E( "ParaTopMarginRelative", FO, MARGIN_TOP, XML_TYPE_PERCENT16, CTF_PARATOPMARGIN_REL ),
MP_E( "ParaBottomMargin", FO, MARGIN_BOTTOM, XML_TYPE_MEASURE|MID_FLAG_MULTI_PROPERTY, CTF_PARABOTTOMMARGIN ),
MP_E( "ParaBottomMarginRelative",FO, MARGIN_BOTTOM, XML_TYPE_PERCENT16, CTF_PARABOTTOMMARGIN_REL ),
- { "ParaContextMargin", sizeof("ParaContextMargin")-1, XML_NAMESPACE_STYLE, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT },
+ { "ParaContextMargin", sizeof("ParaContextMargin")-1, XML_NAMESPACE_STYLE, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
// RES_CHRATR_CASEMAP
MT_E( "CharCaseMap", FO, FONT_VARIANT, XML_TYPE_TEXT_CASEMAP_VAR, 0 ),
MT_E( "CharCaseMap", FO, TEXT_TRANSFORM, XML_TYPE_TEXT_CASEMAP, 0 ),
@@ -136,9 +136,9 @@ XMLPropertyMapEntry aXMLParaPropMap[] =
// RES_CHRATR_WEIGHT
MT_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_RSID
- { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT },
+ { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
// RES_PARATR_RSID
- { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT },
+ { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
// RES_CHRATR_WORDLINEMODE
MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
@@ -434,9 +434,9 @@ XMLPropertyMapEntry aXMLTextPropMap[] =
// RES_CHRATR_WEIGHT
MT_E( "CharWeight", FO, FONT_WEIGHT, XML_TYPE_TEXT_WEIGHT, 0 ),
// RES_CHRATR_RSID
- { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT },
+ { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
// RES_PARATR_RSID
- { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT },
+ { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
// RES_CHRATR_WORDLINEMODE
MT_E( "CharWordMode", STYLE, TEXT_UNDERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
MT_E( "CharWordMode", STYLE, TEXT_OVERLINE_MODE, XML_TYPE_TEXT_LINE_MODE|MID_FLAG_MERGE_PROPERTY, 0 ),
@@ -890,9 +890,9 @@ const XMLPropertyMapEntry* XMLTextPropertySetMapper::getPropertyMapForType( sal_
return lcl_txtprmap_getMap( _nType );
}
-XMLTextPropertySetMapper::XMLTextPropertySetMapper( sal_uInt16 nType ) :
+XMLTextPropertySetMapper::XMLTextPropertySetMapper( sal_uInt16 nType, bool bForExport ) :
XMLPropertySetMapper( lcl_txtprmap_getMap( nType ),
- new XMLTextPropertyHandlerFactory )
+ new XMLTextPropertyHandlerFactory, bForExport )
{
}
diff --git a/xmloff/source/text/txtstyle.cxx b/xmloff/source/text/txtstyle.cxx
index b507b09..c3dd060 100644
--- a/xmloff/source/text/txtstyle.cxx
+++ b/xmloff/source/text/txtstyle.cxx
@@ -128,7 +128,7 @@ void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed, sal_Bool bProg )
GetXMLToken(XML_TABLE),
new XMLTextExportPropertySetMapper(
new XMLTextPropertySetMapper(
- TEXT_PROP_MAP_TABLE_DEFAULTS ),
+ TEXT_PROP_MAP_TABLE_DEFAULTS, true ),
GetExport() ) );
exportDefaultStyle(
@@ -136,7 +136,7 @@ void XMLTextParagraphExport::exportTextStyles( sal_Bool bUsed, sal_Bool bProg )
GetXMLToken(XML_TABLE_ROW),
new XMLTextExportPropertySetMapper(
new XMLTextPropertySetMapper(
- TEXT_PROP_MAP_TABLE_ROW_DEFAULTS ),
+ TEXT_PROP_MAP_TABLE_ROW_DEFAULTS, true ),
GetExport() ) );
}
}
--
1.8.4.2