summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-28 18:04:14 +0200
committerJan Holesovsky <kendy@collabora.com>2021-01-07 16:32:54 +0100
commit2f16880998e8b396231b8dc6e41206b93aedc65b (patch)
treef802cceb3290cd96b44f7ac87f7a1c476e5d3e34
parentd59afaf9762f808333b3819649cd57b3326d45a7 (diff)
officecfg,unotools,cui: add ODF 1.2 Extended / ODF 1.3 versions
... to configuration and UI. The new default is ODF 1.3 Extended, which is now ODFVER_LATEST and stored as value "3" in configuration. Adapt a few places related to DocumentDigitalSignatures etc. to new default. Change-Id: I420da4f7787cc864c6bd88470d61b146b9399aa1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93177 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r--cui/source/options/optsave.cxx10
-rw-r--r--cui/uiconfig/ui/optsavepage.ui6
-rw-r--r--include/unotools/saveopt.hxx6
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs10
-rw-r--r--sfx2/source/doc/objstor.cxx2
-rw-r--r--sw/qa/extras/fodfexport/fodfexport.cxx8
-rw-r--r--sw/qa/extras/odfexport/odfexport.cxx2
-rw-r--r--unotools/source/config/saveopt.cxx4
-rw-r--r--uui/source/iahndl.cxx2
-rw-r--r--xmlsecurity/qa/unit/signing/signing.cxx10
-rw-r--r--xmlsecurity/source/component/documentdigitalsignatures.cxx2
11 files changed, 41 insertions, 21 deletions
diff --git a/cui/source/options/optsave.cxx b/cui/source/options/optsave.cxx
index 72f736ce406b..09473bad2cd1 100644
--- a/cui/source/options/optsave.cxx
+++ b/cui/source/options/optsave.cxx
@@ -87,10 +87,12 @@ SvxSaveTabPage::SvxSaveTabPage(weld::Container* pPage, weld::DialogController* p
, m_xODFWarningFI(m_xBuilder->weld_widget("odfwarning_image"))
, m_xODFWarningFT(m_xBuilder->weld_label("odfwarning_label"))
{
- m_xODFVersionLB->set_id(0, OUString::number(2 )); // 1.0/1.1
- m_xODFVersionLB->set_id(1, OUString::number(4 )); // 1.2
- m_xODFVersionLB->set_id(2, OUString::number(8 )); // 1.2 Extended (compatibility mode)
- m_xODFVersionLB->set_id(3, OUString::number(0x7fffffff)); // 1.2 Extended (recommended)
+ m_xODFVersionLB->set_id(0, OUString::number(SvtSaveOptions::ODFVER_011)); // 1.0/1.1
+ m_xODFVersionLB->set_id(1, OUString::number(SvtSaveOptions::ODFVER_012)); // 1.2
+ m_xODFVersionLB->set_id(2, OUString::number(SvtSaveOptions::ODFVER_012_EXT_COMPAT)); // 1.2 Extended (compatibility mode)
+ m_xODFVersionLB->set_id(3, OUString::number(SvtSaveOptions::ODFVER_012_EXTENDED)); // 1.2 Extended
+ m_xODFVersionLB->set_id(4, OUString::number(SvtSaveOptions::ODFVER_013)); // 1.3
+ m_xODFVersionLB->set_id(5, OUString::number(SvtSaveOptions::ODFVER_LATEST)); // 1.3 Extended (recommended)
m_xDocTypeLB->set_id(0, OUString::number(APP_WRITER) );
m_xDocTypeLB->set_id(1, OUString::number(APP_WRITER_WEB) );
diff --git a/cui/uiconfig/ui/optsavepage.ui b/cui/uiconfig/ui/optsavepage.ui
index e9a090d45091..dccf9d948eba 100644
--- a/cui/uiconfig/ui/optsavepage.ui
+++ b/cui/uiconfig/ui/optsavepage.ui
@@ -288,7 +288,7 @@
<object class="GtkLabel" id="odfwarning_label">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="optsavepage|odfwarning_label" comments="EN-US, the term 'extended' must not be translated.">Not using ODF 1.2 Extended may cause information to be lost.</property>
+ <property name="label" translatable="yes" context="optsavepage|odfwarning_label" comments="EN-US, the term 'extended' must not be translated.">Not using ODF 1.3 Extended may cause information to be lost.</property>
</object>
<packing>
<property name="left_attach">1</property>
@@ -321,7 +321,9 @@
<item translatable="yes" context="optsavepage|odfversion">1.0/1.1</item>
<item translatable="yes" context="optsavepage|odfversion">1.2</item>
<item translatable="yes" context="optsavepage|odfversion">1.2 Extended (compatibility mode)</item>
- <item translatable="yes" context="optsavepage|odfversion">1.2 Extended (recommended)</item>
+ <item translatable="yes" context="optsavepage|odfversion">1.2 Extended</item>
+ <item translatable="yes" context="optsavepage|odfversion">1.3</item>
+ <item translatable="yes" context="optsavepage|odfversion">1.3 Extended (recommended)</item>
</items>
</object>
<packing>
diff --git a/include/unotools/saveopt.hxx b/include/unotools/saveopt.hxx
index 2f0460e21fbc..d1e8f32af12b 100644
--- a/include/unotools/saveopt.hxx
+++ b/include/unotools/saveopt.hxx
@@ -64,6 +64,8 @@ public:
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_012_EXTENDED = 9, // ODF 1.2 extended
+ ODFVER_013 = 10, // ODF 1.3
ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements
};
@@ -82,8 +84,8 @@ public:
ODFSVER_FUTURE_EXTENDED = 1000 | ODFSVER_EXTENDED, ///< current extension, unknown future ODF version
// The latest defined standard. Adapt when a new one is published.
- ODFSVER_LATEST = ODFSVER_012, ///< @internal DO NOT USE in comparisons
- ODFSVER_LATEST_EXTENDED = ODFSVER_012_EXTENDED ///< @internal DO NOT USE in comparisons
+ ODFSVER_LATEST = ODFSVER_013, ///< @internal DO NOT USE in comparisons
+ ODFSVER_LATEST_EXTENDED = ODFSVER_013_EXTENDED ///< @internal DO NOT USE in comparisons
};
SvtSaveOptions();
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 712feb2b5eea..a99c04ae80d6 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -2468,6 +2468,16 @@
<desc>ODFVER_012_EXT_COMPAT</desc>
</info>
</enumeration>
+ <enumeration oor:value="9">
+ <info>
+ <desc>ODFVER_012_EXTENDED</desc>
+ </info>
+ </enumeration>
+ <enumeration oor:value="10">
+ <info>
+ <desc>ODFVER_013</desc>
+ </info>
+ </enumeration>
<enumeration oor:value="3">
<info>
<desc>ODFVER_LATEST</desc>
diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 92101e989ccc..441ae44c1373 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -337,7 +337,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto
const_cast<SfxObjectShell*>( this )->SetError(ERRCODE_IO_GENERAL);
}
- SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_012;
+ SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_013;
if (!utl::ConfigManager::IsFuzzing())
{
SvtSaveOptions aSaveOpt;
diff --git a/sw/qa/extras/fodfexport/fodfexport.cxx b/sw/qa/extras/fodfexport/fodfexport.cxx
index c79d0f35b420..4443bfbb9e2a 100644
--- a/sw/qa/extras/fodfexport/fodfexport.cxx
+++ b/sw/qa/extras/fodfexport/fodfexport.cxx
@@ -34,9 +34,9 @@ DECLARE_FODFEXPORT_TEST(testTdf113696, "tdf113696.odt")
if (xmlDocPtr pXmlDoc = parseExportedFile())
{
assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/"
- "draw:image[@loext:mime-type='image/x-vclgraphic']");
+ "draw:image[@draw:mime-type='image/x-vclgraphic']");
assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/"
- "draw:image[@loext:mime-type='image/png']");
+ "draw:image[@draw:mime-type='image/png']");
}
}
@@ -47,9 +47,9 @@ DECLARE_FODFEXPORT_TEST(testTdf113696WriterImage, "tdf113696-writerimage.odt")
if (xmlDocPtr pXmlDoc = parseExportedFile())
{
assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/"
- "draw:image[@loext:mime-type='image/x-vclgraphic']");
+ "draw:image[@draw:mime-type='image/x-vclgraphic']");
assertXPath(pXmlDoc, "/office:document/office:body/office:text/text:p/draw:frame/"
- "draw:image[@loext:mime-type='image/png']");
+ "draw:image[@draw:mime-type='image/png']");
}
}
diff --git a/sw/qa/extras/odfexport/odfexport.cxx b/sw/qa/extras/odfexport/odfexport.cxx
index 5ef2d7cd0b38..fb34e241c145 100644
--- a/sw/qa/extras/odfexport/odfexport.cxx
+++ b/sw/qa/extras/odfexport/odfexport.cxx
@@ -2030,7 +2030,7 @@ DECLARE_ODFEXPORT_TEST(testImageMimetype, "image-mimetype.odt")
if (xmlDocPtr pXmlDoc = parseExport("content.xml"))
{
// Original image (svg)
- assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p/draw:frame/draw:image[@loext:mime-type='image/svg+xml']");
+ assertXPath(pXmlDoc, "/office:document-content/office:body/office:text/text:p/draw:frame/draw:image[@draw:mime-type='image/svg+xml']");
}
}
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 169001b04f68..bebf6f9d01d0 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -943,6 +943,10 @@ SvtSaveOptions::ODFSaneDefaultVersion SvtSaveOptions::GetODFSaneDefaultVersion()
return ODFSVER_012;
case ODFVER_012_EXT_COMPAT:
return ODFSVER_012_EXT_COMPAT;
+ case ODFVER_012_EXTENDED:
+ return ODFSVER_012_EXTENDED;
+ case ODFVER_013:
+ return ODFSVER_013;
}
return ODFSVER_LATEST_EXTENDED;
}
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx
index 87b4825043cb..55fc31b1982c 100644
--- a/uui/source/iahndl.cxx
+++ b/uui/source/iahndl.cxx
@@ -824,7 +824,7 @@ UUIInteractionHelper::handleRequest_impl(
handleMacroConfirmRequest(
aMacroConfirmRequest.DocumentURL,
aMacroConfirmRequest.DocumentStorage,
- !aMacroConfirmRequest.DocumentVersion.isEmpty() ? aMacroConfirmRequest.DocumentVersion : ODFVER_012_TEXT,
+ !aMacroConfirmRequest.DocumentVersion.isEmpty() ? aMacroConfirmRequest.DocumentVersion : ODFVER_013_TEXT,
aMacroConfirmRequest.DocumentSignatureInformation,
rRequest->getContinuations());
return true;
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx b/xmlsecurity/qa/unit/signing/signing.cxx
index 5952baf60974..d25b87fdd7f3 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -1125,14 +1125,14 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPreserveMacroTemplateSignature12_ODF)
// the loaded document is a OTT with a valid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
- SignatureState::OK, ODFVER_012_TEXT);
+ SignatureState::OK, ODFVER_013_TEXT);
// load saved ODT document
createDoc(aTempFileSaveAsODT.GetURL());
// the loaded document is a ODT with a macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8", SignatureState::NOSIGNATURES,
- SignatureState::OK, ODFVER_012_TEXT);
+ SignatureState::OK, ODFVER_013_TEXT);
// save as new OTT template
utl::TempFile aTempFileSaveAsODT_OTT;
@@ -1159,7 +1159,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testPreserveMacroTemplateSignature12_ODF)
// the loaded document is a OTT with a valid macro signature
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
- SignatureState::OK, ODFVER_012_TEXT);
+ SignatureState::OK, ODFVER_013_TEXT);
}
/// Test if a macro signature from an OTT 1.0 is dropped for ODT 1.2
@@ -1215,7 +1215,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDropMacroTemplateSignature)
// the loaded document is a 1.2 ODT without any signatures
assertDocument(CPPUNIT_SOURCELINE(), "writer8", SignatureState::NOSIGNATURES,
- SignatureState::NOSIGNATURES, ODFVER_012_TEXT);
+ SignatureState::NOSIGNATURES, ODFVER_013_TEXT);
// load the template as-is to validate signatures
mxComponent->dispose();
@@ -1253,7 +1253,7 @@ CPPUNIT_TEST_FIXTURE(SigningTest, testDropMacroTemplateSignature)
// the loaded document is a 1.2 OTT without any signatures
assertDocument(CPPUNIT_SOURCELINE(), "writer8_template", SignatureState::NOSIGNATURES,
- SignatureState::NOSIGNATURES, ODFVER_012_TEXT);
+ SignatureState::NOSIGNATURES, ODFVER_013_TEXT);
}
class Resetter
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index 801b44c1bade..2cd338cdc3e2 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -218,7 +218,7 @@ public:
DocumentDigitalSignatures::DocumentDigitalSignatures( const Reference< XComponentContext >& rxCtx ):
mxCtx(rxCtx),
- m_sODFVersion(ODFVER_012_TEXT),
+ m_sODFVersion(ODFVER_013_TEXT),
m_nArgumentsCount(0),
m_bHasDocumentSignature(false)
{