summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-04-21 18:57:52 +0200
committerMichael Stahl <michael.stahl@cib.de>2020-05-07 19:01:01 +0200
commit45f2e81c98a5b7fe6f021923fd93d20b3c5f3815 (patch)
tree21bd3ac8aeeb7fef7c88c59c02fdb1ad7d2366b3 /sfx2
parent6ba74150866d71469827de9f4f19268dfa7db137 (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. Change-Id: I86469b763bc2f903632976bc9d6ec04d543d705e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92727 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx2
-rw-r--r--sfx2/source/doc/objserv.cxx8
-rw-r--r--sfx2/source/doc/objstor.cxx12
3 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 4561ff07a8f9..7c4f73867d31 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2674,7 +2674,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 7e29c9b7ded9..8212bc25241a 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -1615,7 +1615,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()));
@@ -1625,7 +1625,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,
@@ -1797,7 +1797,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()));
@@ -1805,7 +1805,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 ff64c1491382..d86ace8bba4b 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -315,11 +315,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
@@ -330,7 +330,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
{
@@ -1142,7 +1142,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
@@ -1163,8 +1163,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)
);
}
}