diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2020-04-21 18:57:52 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2020-12-21 18:42:11 +0100 |
commit | 88ac99d6afb1903c4f4a6a33b92fef461979703c (patch) | |
tree | e235b25e8e02206f106b58e70c27f00dcd4c5acf /sfx2 | |
parent | fa87499193bddd2bc8728532f62b1e2a91052a44 (diff) |
replace ODFDefaultVersion usage with ODFSaneDefaultVersion
Compare with ODFSVER_012 mostly works the same, except for places where
namespaces are defined where the ODFSVER_EXTENDED bit should be checked.
Conflicts:
sc/source/filter/xml/XMLExportDataPilot.cxx
xmloff/source/chart/SchXMLExport.cxx
Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108107
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objserv.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 12 |
3 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 9063c33a09d1..59a983b27466 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -2681,7 +2681,7 @@ ErrCode RequestPassword(const std::shared_ptr<const SfxFilter>& pCurrentFilter, OString const utf8Pwd(OUStringToOString(pPasswordRequest->getPassword(), RTL_TEXTENCODING_UTF8)); OString const utf8Ptm(OUStringToOString(pPasswordRequest->getPasswordToModify(), RTL_TEXTENCODING_UTF8)); if (!(52 <= utf8Pwd.getLength() && utf8Pwd.getLength() <= 55 - && SvtSaveOptions().GetODFDefaultVersion() < SvtSaveOptions::ODFVER_012) + && SvtSaveOptions().GetODFSaneDefaultVersion() < SvtSaveOptions::ODFSVER_012) && !(52 <= utf8Ptm.getLength() && utf8Ptm.getLength() <= 55)) { break; diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx index b7e8abdc823e..206efc5cf53d 100644 --- a/sfx2/source/doc/objserv.cxx +++ b/sfx2/source/doc/objserv.cxx @@ -1746,7 +1746,7 @@ bool SfxObjectShell::PrepareForSigning(weld::Window* pDialogParent) // the target ODF version on saving (only valid when signing ODF of course) SvtSaveOptions aSaveOpt; - SvtSaveOptions::ODFDefaultVersion nVersion = aSaveOpt.GetODFDefaultVersion(); + SvtSaveOptions::ODFSaneDefaultVersion nVersion = aSaveOpt.GetODFSaneDefaultVersion(); // the document is not new and is not modified OUString aODFVersion(comphelper::OStorageHelper::GetODFVersionFromStorage(GetStorage())); @@ -1756,7 +1756,7 @@ bool SfxObjectShell::PrepareForSigning(weld::Window* pDialogParent) { // the document might need saving ( new, modified or in ODF1.1 format without signature ) - if ( nVersion >= SvtSaveOptions::ODFVER_012 ) + if (nVersion >= SvtSaveOptions::ODFSVER_012) { OUString sQuestion(bHasSign ? SfxResId(STR_XMLSEC_QUERY_SAVESIGNEDBEFORESIGN) : SfxResId(RID_SVXSTR_XMLSEC_QUERY_SAVEBEFORESIGN)); std::unique_ptr<weld::MessageDialog> xQuestion(Application::CreateMessageDialog(pDialogParent, @@ -1928,7 +1928,7 @@ bool SfxObjectShell::SignDocumentContentUsingCertificate(const Reference<XCertif // the target ODF version on saving (only valid when signing ODF of course) SvtSaveOptions aSaveOpt; - SvtSaveOptions::ODFDefaultVersion nVersion = aSaveOpt.GetODFDefaultVersion(); + SvtSaveOptions::ODFSaneDefaultVersion nVersion = aSaveOpt.GetODFSaneDefaultVersion(); // the document is not new and is not modified OUString aODFVersion(comphelper::OStorageHelper::GetODFVersionFromStorage(GetStorage())); @@ -1936,7 +1936,7 @@ bool SfxObjectShell::SignDocumentContentUsingCertificate(const Reference<XCertif if (IsModified() || !GetMedium() || GetMedium()->GetName().isEmpty() || (GetMedium()->GetFilter()->IsOwnFormat() && aODFVersion != ODFVER_012_TEXT && !bHasSign)) { - if ( nVersion >= SvtSaveOptions::ODFVER_012 ) + if (nVersion >= SvtSaveOptions::ODFSVER_012) { sal_uInt16 nId = SID_SAVEDOC; if ( !GetMedium() || GetMedium()->GetName().isEmpty() ) diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index 9b5309eb6527..b8ed4797ff3a 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -337,11 +337,11 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto const_cast<SfxObjectShell*>( this )->SetError(ERRCODE_IO_GENERAL); } - SvtSaveOptions::ODFDefaultVersion nDefVersion = SvtSaveOptions::ODFVER_012; + SvtSaveOptions::ODFSaneDefaultVersion nDefVersion = SvtSaveOptions::ODFSVER_012; if (!utl::ConfigManager::IsFuzzing()) { SvtSaveOptions aSaveOpt; - nDefVersion = aSaveOpt.GetODFDefaultVersion(); + nDefVersion = aSaveOpt.GetODFSaneDefaultVersion(); } // the default values, that should be used for ODF1.1 and older formats @@ -352,7 +352,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< embed::XStorage >& xSto { "ChecksumAlgorithm", css::uno::makeAny(xml::crypto::DigestID::SHA1_1K) } }; - if ( nDefVersion >= SvtSaveOptions::ODFVER_012 ) + if (nDefVersion >= SvtSaveOptions::ODFSVER_012) { try { @@ -1164,7 +1164,7 @@ bool SfxObjectShell::SaveTo_Impl { // check that the storage format stays the same SvtSaveOptions aSaveOpt; - SvtSaveOptions::ODFDefaultVersion nVersion = aSaveOpt.GetODFDefaultVersion(); + SvtSaveOptions::ODFSaneDefaultVersion nVersion = aSaveOpt.GetODFSaneDefaultVersion(); OUString aODFVersion; try @@ -1185,8 +1185,8 @@ bool SfxObjectShell::SaveTo_Impl // document, but technically this is not correct, so this prevents old // signatures to be copied over to a version 1.2 document bNoPreserveForOasis = ( - (aODFVersion == ODFVER_012_TEXT && nVersion < SvtSaveOptions::ODFVER_012) || - (aODFVersion.isEmpty() && nVersion >= SvtSaveOptions::ODFVER_012) + (aODFVersion == ODFVER_012_TEXT && nVersion < SvtSaveOptions::ODFSVER_012) || + (aODFVersion.isEmpty() && nVersion >= SvtSaveOptions::ODFSVER_012) ); } } |