summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-12-20 03:17:14 +0100
committerEike Rathke <erack@redhat.com>2013-12-20 03:50:45 +0100
commitfe1d36c330e033744faec1c672ff677f1f28558b (patch)
treea05a4da3c18938c91aa1156824e51c0883dd5994 /xmloff
parentcd2de2713e27395d2ad7a50d73b21213b3b05202 (diff)
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 (cherry picked from commit ebc1b2fe50c7ed1002ed8431410b8e2ac6e795b9)
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/inc/XMLChartPropertySetMapper.hxx4
-rw-r--r--xmloff/qa/unit/uxmloff.cxx2
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx4
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx2
-rw-r--r--xmloff/source/draw/sdpropls.cxx5
-rw-r--r--xmloff/source/draw/sdpropls.hxx2
-rw-r--r--xmloff/source/draw/sdxmlexp.cxx4
-rw-r--r--xmloff/source/draw/shapeexport.cxx4
-rw-r--r--xmloff/source/draw/shapeimport.cxx8
-rw-r--r--xmloff/source/forms/layerexport.cxx2
-rw-r--r--xmloff/source/style/PageMasterPropMapper.cxx9
-rw-r--r--xmloff/source/style/PageMasterPropMapper.hxx5
-rw-r--r--xmloff/source/style/XMLPageExport.cxx2
-rw-r--r--xmloff/source/style/xmlprmap.cxx32
-rw-r--r--xmloff/source/style/xmlstyle.cxx4
-rw-r--r--xmloff/source/table/XMLTableExport.cxx4
-rw-r--r--xmloff/source/table/XMLTableImport.cxx4
-rw-r--r--xmloff/source/text/txtimp.cxx22
-rw-r--r--xmloff/source/text/txtparae.cxx20
-rw-r--r--xmloff/source/text/txtprmap.cxx4
-rw-r--r--xmloff/source/text/txtstyle.cxx4
21 files changed, 84 insertions, 63 deletions
diff --git a/xmloff/inc/XMLChartPropertySetMapper.hxx b/xmloff/inc/XMLChartPropertySetMapper.hxx
index 90438273f57b..212557dfcba8 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 8dfa5021ed99..9bd6e3783901 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 9d73fc358431..f92bbbc9f9ba 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 add66b13300b..2de23c694a71 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 b544dd115e64..7ee4ecc19103 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 00b8f63770c0..348c08104600 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 21e35740a30c..b4e8cd1201fc 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 32ed660aae4b..da5057c289d3 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 b6e9e160d1d9..0e0ec13d4616 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 3738aa5beb23..484601addd58 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 60588799e397..0a031364bb14 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 0ee9f7793a32..f93431517a5d 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 8592c207bd24..62b767779f86 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 8aff0909ae02..b9478b2a9764 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 40bbdbb599cf..00a43032a5ab 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 1f03d1977661..4054fc559cc4 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 5497331ee556..16606cf18d35 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 192013e337d4..ede1c31d9fbc 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -1000,23 +1000,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 );
}
@@ -1028,25 +1028,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;
@@ -1057,7 +1057,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 );
}
@@ -1066,7 +1066,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 5ebaec11e289..cfccc6f8df37 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 430d70611fd3..ae30b1154b80 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 0f690b0c20d7..eba122b9d2ee 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() ) );
}
}