summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2013-12-20 12:57:15 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-21 19:30:27 +0000
commit7b44c5e95b07cde11b8b03f940f97e71ea9c7df4 (patch)
treea6721c7c008a3ac23f37aa3f12ed5d3a5b46e147 /sc
parente94ab5aad124b888d524033abeaf212696779067 (diff)
XMLPropertyMapEntry::mbImportOnly and XMLPropertySetMapper bForExport
Although a rather large change this does not change the property mappings or import/export behavior yet, but prepares for further changes that add mappings for generating correct ODF and consuming both old and new namespace/element/attribute names. This is a combination of 4 commits: added bool bForExport parameter to XMLPropertySetMapper ctor Set to true for export, false for import. If export true, an XMLPropertyMapEntry with mbImportOnly==true is not added to the mappings. This to be able to have more than one mappings for import (for example a current extension namespace and the future namespace proposed to the ODF-TC, or corrected typos in element or attribute names), but map only to one entry on export, of course. (cherry picked from commit ebc1b2fe50c7ed1002ed8431410b8e2ac6e795b9) Conflicts: dbaccess/source/filter/xml/xmlHelper.cxx xmloff/source/chart/PropertyMaps.cxx xmloff/source/draw/sdpropls.cxx xmloff/source/style/PageMasterPropMapper.cxx xmloff/source/table/XMLTableImport.cxx prepared XMLPropertyMapEntry with mbImportOnly flag (cherry picked from commit 9dd7ee88bd9835ae2bae36093100fcd651fd3aeb) Conflicts: dbaccess/source/filter/xml/xmlHelper.cxx xmloff/source/table/XMLTableExport.cxx xmloff/source/text/txtprmap.cxx just beautify this a little (cherry picked from commit 44b4973fbd0f190906f36321b31215d80b363d52) reordered member variables for 4 byte alignment (cherry picked from commit dd902b8e256867b5d5fed06b52995f14d969f67d) Change-Id: I15b03870fd14f110833037b6c0ff934624d72de1 Reviewed-on: https://gerrit.libreoffice.org/7144 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/filter/xml/xmlexprt.cxx10
-rw-r--r--sc/source/filter/xml/xmlimprt.cxx8
-rw-r--r--sc/source/filter/xml/xmlstyle.cxx6
3 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx
index 73b3aec34b33..0fbc69227fdb 100644
--- a/sc/source/filter/xml/xmlexprt.cxx
+++ b/sc/source/filter/xml/xmlexprt.cxx
@@ -476,10 +476,10 @@ ScXMLExport::ScXMLExport(
// document is not set here - create ScChangeTrackingExportHelper later
xScPropHdlFactory = new XMLScPropHdlFactory;
- xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory);
- xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory);
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesProperties, xScPropHdlFactory);
- xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesProperties, xScPropHdlFactory);
+ xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory, true);
+ xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory, true);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesProperties, xScPropHdlFactory, true);
+ xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesProperties, xScPropHdlFactory, true);
xCellStylesExportPropertySetMapper = new ScXMLCellExportPropertyMapper(xCellStylesPropertySetMapper);
xCellStylesExportPropertySetMapper->ChainExportMapper(XMLTextParagraphExport::CreateParaExtPropMapper(*this));
xColumnStylesExportPropertySetMapper = new ScXMLColumnExportPropertyMapper(xColumnStylesPropertySetMapper);
@@ -4638,7 +4638,7 @@ sal_uInt32 ScXMLExport::exportDoc( enum XMLTokenEnum eClass )
SfxObjectShell* pFoundShell = reinterpret_cast<SfxObjectShell*>( xObjShellTunnel.is() ? xObjShellTunnel->getSomething(SfxObjectShell::getUnoTunnelId()) : 0 );
if ( pFoundShell && ooo::vba::isAlienExcelDoc( *pFoundShell ) )
{
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScFromXLSRowStylesProperties, xScPropHdlFactory);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScFromXLSRowStylesProperties, xScPropHdlFactory, true);
xRowStylesExportPropertySetMapper = new ScXMLRowExportPropertyMapper(xRowStylesPropertySetMapper);
GetAutoStylePool()->SetFamilyPropSetMapper( XML_STYLE_FAMILY_TABLE_ROW,
xRowStylesExportPropertySetMapper );
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index fd40dc7b9852..28c3ace17e3f 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -2078,10 +2078,10 @@ ScXMLImport::ScXMLImport(
pStylesImportHelper = new ScMyStylesImportHelper(*this);
xScPropHdlFactory = new XMLScPropHdlFactory;
- xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory);
- xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory);
- xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesImportProperties, xScPropHdlFactory);
- xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesImportProperties, xScPropHdlFactory);
+ xCellStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScCellStylesProperties, xScPropHdlFactory, false);
+ xColumnStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScColumnStylesProperties, xScPropHdlFactory, false);
+ xRowStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScRowStylesImportProperties, xScPropHdlFactory, false);
+ xTableStylesPropertySetMapper = new XMLPropertySetMapper((XMLPropertyMapEntry*)aXMLScTableStylesImportProperties, xScPropHdlFactory, false);
// #i66550# needed for 'presentation:event-listener' element for URLs in shapes
GetNamespaceMap().Add(
diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx
index 3a5fe2bb5629..88fdef732ed7 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[] =
{