diff options
author | Thorsten Behrens <tbehrens@suse.com> | 2012-06-05 03:59:46 +0200 |
---|---|---|
committer | Thorsten Behrens <tbehrens@suse.com> | 2012-06-05 05:11:21 +0200 |
commit | d0af38eaa029c2f2c2617544c8b6798c463381b9 (patch) | |
tree | d58dcd95c3c66cecbbcfb7a39d8775e409884690 | |
parent | 24c260a271ec5f086b7883a6ed258e02af799d61 (diff) |
Add ODF1.2 extended-but-more-compatible mode
With several legacy pre-ODF1.2 and ODF1.2-only consumers out there,
folks wanted a more backward-compatible ODF1.2 extended mode, that
uses stuff deprecated in 1.2, and/or is 'bug-compatible' to older
OOo-versions.
Therefore, adding ODFVER_012_EXT_COMPAT, and sticking it to several
attributes that were ODFVER_LATEST before.
-rw-r--r-- | cui/source/options/optsave.src | 1 | ||||
-rw-r--r-- | sc/source/filter/xml/xmlstyle.cxx | 2 | ||||
-rw-r--r-- | unotools/inc/unotools/saveopt.hxx | 1 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/meta/MetaExportComponent.cxx | 1 | ||||
-rw-r--r-- | xmloff/source/style/PageMasterStyleMap.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/text/txtprmap.cxx | 10 |
7 files changed, 11 insertions, 7 deletions
diff --git a/cui/source/options/optsave.src b/cui/source/options/optsave.src index 8bce711411c0..8e275f44bf5a 100644 --- a/cui/source/options/optsave.src +++ b/cui/source/options/optsave.src @@ -157,6 +157,7 @@ TabPage RID_SFXPAGE_SAVE { < "1.0/1.1" ; 2 ; > ; < "1.2" ; 4 ; > ; + < "1.2 Extended (compat mode)"; 8 ; > ; < "1.2 Extended (recommended)"; 0x7fffffff ; > ; }; }; diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index ad965b1c9257..25beb3edd372 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -67,7 +67,7 @@ using namespace ::formula; using ::rtl::OUString; #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_LATEST } +#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 } const XMLPropertyMapEntry aXMLScCellStylesProperties[] = diff --git a/unotools/inc/unotools/saveopt.hxx b/unotools/inc/unotools/saveopt.hxx index 0f20d621fbc0..f16d859e4dab 100644 --- a/unotools/inc/unotools/saveopt.hxx +++ b/unotools/inc/unotools/saveopt.hxx @@ -67,6 +67,7 @@ public: ODFVER_011 = 2, // ODF 1.1 DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration ODFVER_012 = 4, // ODF 1.2 + ODFVER_012_EXT_COMPAT = 8, // ODF 1.2 extended, but with compatibility fallbacks ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements }; diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index e0748fad5320..9dc41e6d88dd 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -1359,6 +1359,7 @@ sal_uInt32 SvXMLExport::exportDoc( enum ::xmloff::token::XMLTokenEnum eClass ) switch( getDefaultVersion() ) { case SvtSaveOptions::ODFVER_LATEST: pVersion = sXML_1_2; break; + case SvtSaveOptions::ODFVER_012_EXT_COMPAT: pVersion = sXML_1_2; break; case SvtSaveOptions::ODFVER_012: pVersion = sXML_1_2; break; case SvtSaveOptions::ODFVER_011: pVersion = sXML_1_1; break; case SvtSaveOptions::ODFVER_010: break; diff --git a/xmloff/source/meta/MetaExportComponent.cxx b/xmloff/source/meta/MetaExportComponent.cxx index 26aa8f9b148e..9fb1976178b8 100644 --- a/xmloff/source/meta/MetaExportComponent.cxx +++ b/xmloff/source/meta/MetaExportComponent.cxx @@ -150,6 +150,7 @@ sal_uInt32 XMLMetaExportComponent::exportDoc( enum XMLTokenEnum ) switch( getDefaultVersion() ) { case SvtSaveOptions::ODFVER_LATEST: pVersion = "1.2"; break; + case SvtSaveOptions::ODFVER_012_EXT_COMPAT: pVersion = "1.2"; break; case SvtSaveOptions::ODFVER_012: pVersion = "1.2"; break; case SvtSaveOptions::ODFVER_011: pVersion = "1.1"; break; case SvtSaveOptions::ODFVER_010: break; diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx index 231ec3706536..f6057e8e90ca 100644 --- a/xmloff/source/style/PageMasterStyleMap.cxx +++ b/xmloff/source/style/PageMasterStyleMap.cxx @@ -39,7 +39,7 @@ using namespace ::xmloff::token; #define PLMAP_12(name,prefix,token,type,context) \ MAP(name,prefix,token,type|XML_TYPE_PROP_PAGE_LAYOUT,context, SvtSaveOptions::ODFVER_012) #define PLMAP_EX(name,prefix,token,type,context) \ - MAP(name,prefix,token,type|XML_TYPE_PROP_PAGE_LAYOUT,context, SvtSaveOptions::ODFVER_LATEST) + MAP(name,prefix,token,type|XML_TYPE_PROP_PAGE_LAYOUT,context, SvtSaveOptions::ODFVER_012_EXT_COMPAT) #define HFMAP(name,prefix,token,type,context) \ MAP(name,prefix,token,type|XML_TYPE_PROP_HEADER_FOOTER,context, SvtSaveOptions::ODFVER_010) diff --git a/xmloff/source/text/txtprmap.cxx b/xmloff/source/text/txtprmap.cxx index c1ec7e0f08c4..edf8c2d1f79d 100644 --- a/xmloff/source/text/txtprmap.cxx +++ b/xmloff/source/text/txtprmap.cxx @@ -101,7 +101,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_LATEST }, + { "ParaContextMargin", sizeof("ParaContextMargin")-1, XML_NAMESPACE_STYLE, XML_CONTEXTUAL_SPACING, XML_TYPE_BOOL|XML_TYPE_PROP_PARAGRAPH, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT }, // 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 ), @@ -149,9 +149,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_LATEST }, + { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT }, // RES_PARATR_RSID - { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_LATEST }, + { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT }, // 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 ), @@ -448,9 +448,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_LATEST }, + { "Rsid", sizeof("Rsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_RSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT }, // RES_PARATR_RSID - { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_LATEST }, + { "ParRsid", sizeof("ParRsid")-1, XML_NAMESPACE_OFFICE_EXT, XML_PARRSID, XML_TYPE_HEX|XML_TYPE_PROP_TEXT, 0, SvtSaveOptions::ODFVER_012_EXT_COMPAT }, // 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 ), |