[Libreoffice-commits] core.git: 4 commits - dbaccess/source include/xmloff reportdesign/source sc/source xmloff/inc xmloff/qa xmloff/source
Eike Rathke
erack at redhat.com
Thu Dec 19 18:27:25 PST 2013
dbaccess/source/filter/xml/xmlExport.cxx | 8 ++--
dbaccess/source/filter/xml/xmlHelper.cxx | 26 +++++++--------
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 | 4 +-
xmloff/source/text/txtimp.cxx | 22 ++++++------
xmloff/source/text/txtparae.cxx | 20 +++++------
xmloff/source/text/txtprmap.cxx | 24 ++++++-------
xmloff/source/text/txtstyle.cxx | 4 +-
39 files changed, 199 insertions(+), 160 deletions(-)
New commits:
commit ebc1b2fe50c7ed1002ed8431410b8e2ac6e795b9
Author: Eike Rathke <erack at redhat.com>
Date: Fri Dec 20 03:17:14 2013 +0100
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.
Change-Id: Ia01ea949c88eda2f8a6c10f51c59e35e7abdcaf3
diff --git a/dbaccess/source/filter/xml/xmlExport.cxx b/dbaccess/source/filter/xml/xmlExport.cxx
index 8cddfde..f1b9350 100644
--- a/dbaccess/source/filter/xml/xmlExport.cxx
+++ b/dbaccess/source/filter/xml/xmlExport.cxx
@@ -225,7 +225,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,
@@ -1391,7 +1391,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetTableStylesPropertySetMapper
{
if ( !m_xTableStylesPropertySetMapper.is() )
{
- m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper();
+ m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper( true);
}
return m_xTableStylesPropertySetMapper;
}
@@ -1400,7 +1400,7 @@ UniReference < XMLPropertySetMapper > ODBExport::GetCellStylesPropertySetMapper(
{
if ( !m_xCellStylesPropertySetMapper.is() )
{
- m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper();
+ m_xCellStylesPropertySetMapper = OXMLHelper::GetCellStylesPropertySetMapper( true);
}
return m_xCellStylesPropertySetMapper;
}
@@ -1409,7 +1409,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 abb4174..94ca651 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -71,17 +71,17 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
}
#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010, false}
-UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper()
+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, false }
static const XMLPropertyMapEntry s_aColumnStylesProperties[] =
@@ -92,10 +92,10 @@ 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, 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 }
@@ -133,10 +133,10 @@ 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, false }
static const XMLPropertyMapEntry s_aStylesProperties[] =
@@ -145,7 +145,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper(
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 36114dd..ded4960 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
#endif // INCLUDED_DBACCESS_SOURCE_FILTER_XML_XMLHELPER_HXX
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index 31743f2..a85bfbd 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -836,7 +836,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetTableStylesPropertySetMapper
{
if ( !m_xTableStylesPropertySetMapper.is() )
{
- m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper();
+ m_xTableStylesPropertySetMapper = OXMLHelper::GetTableStylesPropertySetMapper( false);
}
return m_xTableStylesPropertySetMapper;
}
@@ -845,7 +845,7 @@ UniReference < XMLPropertySetMapper > ODBFilter::GetColumnStylesPropertySetMappe
{
if ( !m_xColumnStylesPropertySetMapper.is() )
{
- m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper();
+ m_xColumnStylesPropertySetMapper = OXMLHelper::GetColumnStylesPropertySetMapper( false);
}
return m_xColumnStylesPropertySetMapper;
}
@@ -854,7 +854,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/txtprmap.hxx b/include/xmloff/txtprmap.hxx
index 3801057..0eebd9b 100644
--- a/include/xmloff/txtprmap.hxx
+++ b/include/xmloff/txtprmap.hxx
@@ -211,7 +211,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 37f5633..fed1411 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -76,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 c61afd8..b11dcf3 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 fc3c016..d1cd6a9 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -109,7 +109,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
#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 )
{
@@ -132,7 +132,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
{
@@ -152,7 +152,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 e692533..4b504af 100644
--- a/reportdesign/source/filter/xml/xmlStyleImport.cxx
+++ b/reportdesign/source/filter/xml/xmlStyleImport.cxx
@@ -240,7 +240,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 863cc17..589c433 100644
--- a/reportdesign/source/filter/xml/xmlfilter.cxx
+++ b/reportdesign/source/filter/xml/xmlfilter.cxx
@@ -373,10 +373,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 f8851f1..8defd8a 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -501,10 +501,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);
@@ -4988,7 +4988,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 96be811..69f46b0 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2110,10 +2110,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/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
index 9043827..212557d 100644
--- a/xmloff/inc/XMLChartPropertySetMapper.hxx
+++ b/xmloff/inc/XMLChartPropertySetMapper.hxx
@@ -42,8 +42,8 @@ public:
class XMLChartPropertySetMapper : public XMLPropertySetMapper
{
public:
- XMLChartPropertySetMapper();
- ~XMLChartPropertySetMapper();
+ explicit XMLChartPropertySetMapper( bool bForExport );
+ ~XMLChartPropertySetMapper();
};
class XMLChartExportPropertyMapper : public SvXMLExportPropertyMapper
diff --git a/xmloff/qa/unit/uxmloff.cxx b/xmloff/qa/unit/uxmloff.cxx
index 8dfa502..9bd6e37 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/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 9d73fc3..f92bbbc 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -163,8 +163,8 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32
return pHdl;
}
-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 25c120a..26401f5 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -1052,7 +1052,7 @@ SchXMLExportHelper_Impl::SchXMLExportHelper_Impl(
msTableName = "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 b544dd1..7ee4ecc 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -1162,8 +1162,9 @@ const XMLPropertyHandler* XMLSdPropHdlFactory::GetPropertyHandler( sal_Int32 nTy
return pHdl;
}
-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 00b8f63..348c081 100644
--- a/xmloff/source/draw/sdpropls.hxx
+++ b/xmloff/source/draw/sdpropls.hxx
@@ -223,7 +223,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 21e3574..b4e8cd1 100644
--- a/xmloff/source/draw/sdxmlexp.cxx
+++ b/xmloff/source/draw/sdxmlexp.cxx
@@ -435,7 +435,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();
@@ -447,7 +447,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 );
// set lock to avoid deletion
diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx
index ade0d57..f2d4c78 100644
--- a/xmloff/source/draw/shapeexport.cxx
+++ b/xmloff/source/draw/shapeexport.cxx
@@ -1024,7 +1024,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 );
@@ -1265,7 +1265,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 b6e9e16..0e0ec13 100644
--- a/xmloff/source/draw/shapeimport.cxx
+++ b/xmloff/source/draw/shapeimport.cxx
@@ -148,7 +148,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();
@@ -164,7 +164,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)
{
@@ -1014,7 +1014,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
@@ -1119,7 +1119,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/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 3ff18db..7e213f7 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -82,7 +82,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 6058879..0a03136 100644
--- a/xmloff/source/style/PageMasterPropMapper.cxx
+++ b/xmloff/source/style/PageMasterPropMapper.cxx
@@ -26,15 +26,16 @@ using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
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 0ee9f77..f934315 100644
--- a/xmloff/source/style/PageMasterPropMapper.hxx
+++ b/xmloff/source/style/PageMasterPropMapper.hxx
@@ -25,10 +25,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/XMLPageExport.cxx b/xmloff/source/style/XMLPageExport.cxx
index 8592c20..62b76777 100644
--- a/xmloff/source/style/XMLPageExport.cxx
+++ b/xmloff/source/style/XMLPageExport.cxx
@@ -157,7 +157,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 8aff090..b9478b2 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -65,19 +65,36 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
// Ctor
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)
{
- XMLPropertySetMapperEntry_Impl aEntry( *pIter, rFactory );
- aMapEntries.push_back( aEntry );
- pIter++;
+ while( pIter->msApiName )
+ {
+ if (!pIter->mbImportOnly)
+ {
+ XMLPropertySetMapperEntry_Impl aEntry( *pIter, rFactory );
+ aMapEntries.push_back( aEntry );
+ }
+ pIter++;
+ }
+ }
+ else
+ {
+ while( pIter->msApiName )
+ {
+ XMLPropertySetMapperEntry_Impl aEntry( *pIter, rFactory );
+ aMapEntries.push_back( aEntry );
+ pIter++;
+ }
}
}
}
@@ -102,7 +119,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 40bbdbb..00a4303 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -667,7 +667,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;
@@ -676,7 +676,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 1f03d19..4054fc5 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -149,8 +149,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 5497331..16606cf 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -184,10 +184,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 1809197..259633d 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -996,23 +996,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 );
}
@@ -1024,25 +1024,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;
@@ -1053,7 +1053,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 );
}
@@ -1062,7 +1062,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 4b5dead..721e9b2 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -1267,7 +1267,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() );
@@ -1276,7 +1276,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 = GetXMLToken(XML_TEXT);
@@ -1284,7 +1284,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 = XML_STYLE_FAMILY_SD_GRAPHICS_NAME;
@@ -1292,7 +1292,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 = GetXMLToken( XML_SECTION );
@@ -1300,14 +1300,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 = GetXMLToken( XML_RUBY );
aPrefix = "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() );
@@ -1351,7 +1351,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 );
}
@@ -1359,7 +1359,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 );
}
@@ -1367,7 +1367,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 );
}
@@ -1375,7 +1375,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 430d706..ae30b11 100644
--- a/xmloff/source/text/txtprmap.cxx
+++ b/xmloff/source/text/txtprmap.cxx
@@ -944,9 +944,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 0f690b0..eba122b 100644
--- a/xmloff/source/text/txtstyle.cxx
+++ b/xmloff/source/text/txtstyle.cxx
@@ -127,7 +127,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(
@@ -135,7 +135,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() ) );
}
}
commit 9dd7ee88bd9835ae2bae36093100fcd651fd3aeb
Author: Eike Rathke <erack at redhat.com>
Date: Tue Dec 17 21:16:04 2013 +0100
prepared XMLPropertyMapEntry with mbImportOnly flag
Change-Id: Id5a54a591a42c836884af1fd09dc055f2fce6db5
diff --git a/dbaccess/source/filter/xml/xmlHelper.cxx b/dbaccess/source/filter/xml/xmlHelper.cxx
index 2f735ae..abb4174 100644
--- a/dbaccess/source/filter/xml/xmlHelper.cxx
+++ b/dbaccess/source/filter/xml/xmlHelper.cxx
@@ -70,7 +70,7 @@ const XMLPropertyHandler* OPropertyHandlerFactory::GetPropertyHandler(sal_Int32
return pHandler;
}
-#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010}
+#define MAP_END() { NULL, 0, 0, XML_TOKEN_INVALID, 0 , 0, SvtSaveOptions::ODFVER_010, false}
UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMapper()
{
static const XMLPropertyMapEntry s_aTableStylesProperties[] =
@@ -83,7 +83,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetTableStylesPropertySetMappe
UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapper()
{
-#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),
@@ -97,8 +97,8 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetColumnStylesPropertySetMapp
UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper()
{
-#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),
@@ -138,7 +138,7 @@ UniReference < XMLPropertySetMapper > OXMLHelper::GetCellStylesPropertySetMapper
UniReference < XMLPropertySetMapper > OXMLHelper::GetRowStylesPropertySetMapper()
{
-#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),
diff --git a/include/xmloff/maptype.hxx b/include/xmloff/maptype.hxx
index 36482e2..97e62d4 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/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index e0448a8..37f5633 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -59,6 +59,7 @@ struct XMLPropertySetMapperEntry_Impl
sal_uInt16 nXMLNameSpace;
sal_Int16 nContextId;
SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
+ bool bImportOnly;
const XMLPropertyHandler *pHdl;
XMLPropertySetMapperEntry_Impl(
diff --git a/reportdesign/source/filter/xml/xmlHelper.cxx b/reportdesign/source/filter/xml/xmlHelper.cxx
index 0f15280..fc3c016 100644
--- a/reportdesign/source/filter/xml/xmlHelper.cxx
+++ b/reportdesign/source/filter/xml/xmlHelper.cxx
@@ -103,11 +103,11 @@ 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)
{
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 7d6c5a2..e904315 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/source/chart/PropertyMap.hxx b/xmloff/source/chart/PropertyMap.hxx
index 70336dc..8ee500d 100644
--- a/xmloff/source/chart/PropertyMap.hxx
+++ b/xmloff/source/chart/PropertyMap.hxx
@@ -83,14 +83,14 @@
#define XML_SCH_CONTEXT_SPECIAL_ERRORBAR_RANGE ( XML_SCH_CTF_START + 25 )
#define XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE ( XML_SCH_CTF_START + 26 )
-#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
// textproperties are added later using the chaining
diff --git a/xmloff/source/draw/sdpropls.cxx b/xmloff/source/draw/sdpropls.cxx
index 2514928..b544dd1 100644
--- a/xmloff/source/draw/sdpropls.cxx
+++ b/xmloff/source/draw/sdpropls.cxx
@@ -71,14 +71,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
diff --git a/xmloff/source/forms/controlpropertymap.cxx b/xmloff/source/forms/controlpropertymap.cxx
index 16c671d..451ff41 100644
--- a/xmloff/source/forms/controlpropertymap.cxx
+++ b/xmloff/source/forms/controlpropertymap.cxx
@@ -33,10 +33,10 @@ using namespace ::xmloff::token;
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/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index f3c86b0..458bfdf 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -23,7 +23,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) \
@@ -183,7 +183,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/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index 45934c3..8aff090 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -43,6 +43,7 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
nXMLNameSpace( rMapEntry.mnNameSpace ),
nContextId( rMapEntry.mnContextId ),
nEarliestODFVersionForExport( rMapEntry.mnEarliestODFVersionForExport ),
+ bImportOnly( rMapEntry.mbImportOnly),
pHdl( rFactory->GetPropertyHandler( rMapEntry.mnType & MID_FLAG_MASK ) )
{
}
@@ -55,6 +56,7 @@ XMLPropertySetMapperEntry_Impl::XMLPropertySetMapperEntry_Impl(
nXMLNameSpace( rEntry.nXMLNameSpace),
nContextId( rEntry.nContextId),
nEarliestODFVersionForExport( rEntry.nEarliestODFVersionForExport ),
+ bImportOnly( rEntry.bImportOnly),
pHdl( rEntry.pHdl)
{
DBG_ASSERT( pHdl, "Unknown XML property type handler!" );
diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 3fe8f55..1f03d19 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -52,10 +52,10 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::text;
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 }
const XMLPropertyMapEntry* getColumnPropertiesMap()
{
diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx
index 5ce058f..430d706 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 ) \
@@ -70,7 +70,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[] =
@@ -90,7 +90,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 ),
@@ -140,9 +140,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 ),
@@ -463,9 +463,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 ),
@@ -481,7 +481,7 @@ XMLPropertyMapEntry aXMLTextPropMap[] =
// RES_CHRATR_BACKGROUND
MT_E( "CharBackColor", FO, BACKGROUND_COLOR, XML_TYPE_COLORTRANSPARENT|MID_FLAG_MULTI_PROPERTY, 0 ),
MT_E( "CharBackTransparent", FO, BACKGROUND_COLOR, XML_TYPE_ISTRANSPARENT|MID_FLAG_MERGE_ATTRIBUTE, 0 ),
- { "CharShadingValue", sizeof("CharShadingValue")-1, XML_NAMESPACE_LO_EXT, XML_CHAR_SHADING_VALUE, XML_TYPE_NUMBER|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT },
+ { "CharShadingValue", sizeof("CharShadingValue")-1, XML_NAMESPACE_LO_EXT, XML_CHAR_SHADING_VALUE, XML_TYPE_NUMBER|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT, false },
MT_E( "CharBackColor", FO, TEXT_BACKGROUND_COLOR, XML_TYPE_COLOR|MID_FLAG_SPECIAL_ITEM_EXPORT, CTF_OLDTEXTBACKGROUND ),
// RES_CHRATR_CJK_FONT
MT_ED( "CharFontNameAsian", STYLE, FONT_NAME_ASIAN, XML_TYPE_STRING|MID_FLAG_SPECIAL_ITEM_IMPORT, CTF_FONTNAME_CJK ),
commit 44b4973fbd0f190906f36321b31215d80b363d52
Author: Eike Rathke <erack at redhat.com>
Date: Tue Dec 17 17:48:37 2013 +0100
just beautify this a little
Change-Id: Ibd7da12d88ec8e965f652499f7e7e32f81bd8ccc
diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index f000ffe..e0448a8 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -53,13 +53,13 @@ class XMLPropertyHandler;
*/
struct XMLPropertySetMapperEntry_Impl
{
- OUString sXMLAttributeName;
- OUString sAPIPropertyName;
- sal_Int32 nType;
- sal_uInt16 nXMLNameSpace;
- 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;
+ const XMLPropertyHandler *pHdl;
XMLPropertySetMapperEntry_Impl(
const XMLPropertyMapEntry& rMapEntry,
commit dd902b8e256867b5d5fed06b52995f14d969f67d
Author: Eike Rathke <erack at redhat.com>
Date: Tue Dec 17 16:59:08 2013 +0100
reordered member variables for 4 byte alignment
Change-Id: Iaae7689d1ed3c74e261fcc90fa88b5521468e376
diff --git a/include/xmloff/xmlprmap.hxx b/include/xmloff/xmlprmap.hxx
index f9528d7..f000ffe 100644
--- a/include/xmloff/xmlprmap.hxx
+++ b/include/xmloff/xmlprmap.hxx
@@ -55,8 +55,8 @@ struct XMLPropertySetMapperEntry_Impl
{
OUString sXMLAttributeName;
OUString sAPIPropertyName;
- sal_uInt16 nXMLNameSpace;
sal_Int32 nType;
+ sal_uInt16 nXMLNameSpace;
sal_Int16 nContextId;
SvtSaveOptions::ODFDefaultVersion nEarliestODFVersionForExport;
const XMLPropertyHandler *pHdl;
diff --git a/xmloff/source/style/xmlprmap.cxx b/xmloff/source/style/xmlprmap.cxx
index b74e4f2..45934c3 100644
--- a/xmloff/source/style/xmlprmap.cxx
+++ b/xmloff/source/style/xmlprmap.cxx
@@ -39,8 +39,8 @@ 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 ),
pHdl( rFactory->GetPropertyHandler( rMapEntry.mnType & MID_FLAG_MASK ) )
@@ -51,8 +51,8 @@ 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 ),
pHdl( rEntry.pHdl)
More information about the Libreoffice-commits
mailing list