summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2011-04-01 10:18:41 +0200
committerIvo Hinkelmann <ihi@openoffice.org>2011-04-01 10:18:41 +0200
commit626d0e2e051f71a0bf93b2dd4c519d077fa74f67 (patch)
tree3a673a51b7a4b3ecfab415df983149e55675283d /unotools
parent10c8e439bce0a9c131673eb6a21a14fa42d04289 (diff)
parent8b361b59c7f668d66c6721389f7af7eefb56ce80 (diff)
CWS-TOOLING: integrate CWS mav60
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/saveopt.hxx10
-rw-r--r--unotools/source/config/saveopt.cxx100
2 files changed, 103 insertions, 7 deletions
diff --git a/unotools/inc/unotools/saveopt.hxx b/unotools/inc/unotools/saveopt.hxx
index 22cf75c5be3d..9dab6150a8ad 100644
--- a/unotools/inc/unotools/saveopt.hxx
+++ b/unotools/inc/unotools/saveopt.hxx
@@ -53,7 +53,9 @@ public:
E_DOPRETTYPRINTING,
E_WARNALIENFORMAT,
E_LOADDOCPRINTER,
- E_ODFDEFAULTVERSION
+ E_ODFDEFAULTVERSION,
+ E_USESHA1INODF12,
+ E_USEBLOWFISHINODF12
};
// keep enum values sorted that a less or greater compare maps to older and newer versions!
@@ -119,6 +121,12 @@ public:
void SetODFDefaultVersion( ODFDefaultVersion eVersion );
ODFDefaultVersion GetODFDefaultVersion() const;
+ void SetUseSHA1InODF12( sal_Bool bUse );
+ sal_Bool IsUseSHA1InODF12() const;
+
+ void SetUseBlowfishInODF12( sal_Bool bUse );
+ sal_Bool IsUseBlowfishInODF12() const;
+
sal_Bool IsReadOnly( EOption eOption ) const;
};
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index 379ba65dc9e6..6a30149c555f 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -79,7 +79,11 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
bSaveUnpacked,
bDoPrettyPrinting,
bWarnAlienFormat,
- bLoadDocPrinter;
+ bLoadDocPrinter,
+ bUseSHA1InODF12,
+ bUseBlowfishInODF12;
+
+ SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion;
sal_Bool bROAutoSaveTime,
bROUseUserData,
@@ -95,9 +99,9 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
bROWarnAlienFormat,
bRODoPrettyPrinting,
bROLoadDocPrinter,
- bROODFDefaultVersion;
-
- SvtSaveOptions::ODFDefaultVersion eODFDefaultVersion;
+ bROODFDefaultVersion,
+ bROUseSHA1InODF12,
+ bROUseBlowfishInODF12;
public:
SvtSaveOptions_Impl();
@@ -120,6 +124,9 @@ public:
sal_Bool IsPrettyPrintingEnabled( ) const { return bDoPrettyPrinting; }
sal_Bool IsWarnAlienFormat() const { return bWarnAlienFormat; }
sal_Bool IsLoadDocPrinter() const { return bLoadDocPrinter; }
+ sal_Bool IsUseSHA1InODF12() const { return bUseSHA1InODF12; }
+ sal_Bool IsUseBlowfishInODF12() const { return bUseBlowfishInODF12; }
+
SvtSaveOptions::ODFDefaultVersion
GetODFDefaultVersion() const { return eODFDefaultVersion; }
@@ -137,6 +144,8 @@ public:
void EnablePrettyPrinting( sal_Bool _bDoPP );
void SetWarnAlienFormat( sal_Bool _bDoPP );
void SetLoadDocPrinter( sal_Bool bNew );
+ void SetUseSHA1InODF12( sal_Bool bUse );
+ void SetUseBlowfishInODF12( sal_Bool bUse );
void SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersion eNew );
sal_Bool IsReadOnly( SvtSaveOptions::EOption eOption ) const;
@@ -279,6 +288,24 @@ void SvtSaveOptions_Impl::SetODFDefaultVersion( SvtSaveOptions::ODFDefaultVersio
}
}
+void SvtSaveOptions_Impl::SetUseSHA1InODF12( sal_Bool bUse )
+{
+ if ( !bROUseSHA1InODF12 && bUseSHA1InODF12 != bUse )
+ {
+ bUseSHA1InODF12 = bUse;
+ SetModified();
+ }
+}
+
+void SvtSaveOptions_Impl::SetUseBlowfishInODF12( sal_Bool bUse )
+{
+ if ( !bROUseBlowfishInODF12 && bUseBlowfishInODF12 != bUse )
+ {
+ bUseBlowfishInODF12 = bUse;
+ SetModified();
+ }
+}
+
sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) const
{
sal_Bool bReadOnly = CFG_READONLY_DEFAULT;
@@ -329,6 +356,12 @@ sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) cons
case SvtSaveOptions::E_ODFDEFAULTVERSION :
bReadOnly = bROLoadDocPrinter;
break;
+ case SvtSaveOptions::E_USESHA1INODF12:
+ bReadOnly = bROUseSHA1InODF12;
+ break;
+ case SvtSaveOptions::E_USEBLOWFISHINODF12:
+ bReadOnly = bROUseBlowfishInODF12;
+ break;
}
return bReadOnly;
}
@@ -349,6 +382,8 @@ sal_Bool SvtSaveOptions_Impl::IsReadOnly( SvtSaveOptions::EOption eOption ) cons
#define INTERNET 13
#define SAVEWORKINGSET 14
#define ODFDEFAULTVERSION 15
+#define USESHA1INODF12 16
+#define USEBLOWFISHINODF12 17
Sequence< OUString > GetPropertyNames()
{
@@ -369,7 +404,9 @@ Sequence< OUString > GetPropertyNames()
"URL/FileSystem",
"URL/Internet",
"WorkingSet",
- "ODF/DefaultVersion"
+ "ODF/DefaultVersion",
+ "ODF/UseSHA1InODF12",
+ "ODF/UseBlowfishInODF12"
};
const int nCount = sizeof( aPropNames ) / sizeof( const char* );
@@ -399,6 +436,9 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
, bDoPrettyPrinting( sal_False )
, bWarnAlienFormat( sal_True )
, bLoadDocPrinter( sal_True )
+ , bUseSHA1InODF12( sal_False )
+ , bUseBlowfishInODF12( sal_False )
+ , eODFDefaultVersion( SvtSaveOptions::ODFVER_LATEST )
, bROAutoSaveTime( CFG_READONLY_DEFAULT )
, bROUseUserData( CFG_READONLY_DEFAULT )
, bROBackup( CFG_READONLY_DEFAULT )
@@ -414,7 +454,8 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
, bRODoPrettyPrinting( CFG_READONLY_DEFAULT )
, bROLoadDocPrinter( CFG_READONLY_DEFAULT )
, bROODFDefaultVersion( CFG_READONLY_DEFAULT )
- , eODFDefaultVersion( SvtSaveOptions::ODFVER_LATEST )
+ , bROUseSHA1InODF12( CFG_READONLY_DEFAULT )
+ , bROUseBlowfishInODF12( CFG_READONLY_DEFAULT )
{
Sequence< OUString > aNames = GetPropertyNames();
Sequence< Any > aValues = GetProperties( aNames );
@@ -527,6 +568,16 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
bROLoadDocPrinter = pROStates[nProp];
break;
+ case USESHA1INODF12:
+ bUseSHA1InODF12 = bTemp;
+ bROUseSHA1InODF12 = pROStates[nProp];
+ break;
+
+ case USEBLOWFISHINODF12:
+ bUseBlowfishInODF12 = bTemp;
+ bROUseBlowfishInODF12 = pROStates[nProp];
+ break;
+
default :
DBG_ERRORFILE( "invalid index to load a path" );
}
@@ -704,6 +755,23 @@ void SvtSaveOptions_Impl::Commit()
++nRealCount;
}
break;
+ case USESHA1INODF12:
+ if (!bROUseSHA1InODF12)
+ {
+ pValues[nRealCount] <<= bUseSHA1InODF12;
+ pNames[nRealCount] = pOrgNames[i];
+ ++nRealCount;
+ }
+ break;
+ case USEBLOWFISHINODF12:
+ if (!bROUseBlowfishInODF12)
+ {
+ pValues[nRealCount] <<= bUseBlowfishInODF12;
+ pNames[nRealCount] = pOrgNames[i];
+ ++nRealCount;
+ }
+ break;
+
default:
DBG_ERRORFILE( "invalid index to save a path" );
}
@@ -995,6 +1063,26 @@ SvtSaveOptions::ODFDefaultVersion SvtSaveOptions::GetODFDefaultVersion() const
return pImp->pSaveOpt->GetODFDefaultVersion();
}
+void SvtSaveOptions::SetUseSHA1InODF12( sal_Bool bUse )
+{
+ pImp->pSaveOpt->SetUseSHA1InODF12( bUse );
+}
+
+sal_Bool SvtSaveOptions::IsUseSHA1InODF12() const
+{
+ return pImp->pSaveOpt->IsUseSHA1InODF12();
+}
+
+void SvtSaveOptions::SetUseBlowfishInODF12( sal_Bool bUse )
+{
+ pImp->pSaveOpt->SetUseBlowfishInODF12( bUse );
+}
+
+sal_Bool SvtSaveOptions::IsUseBlowfishInODF12() const
+{
+ return pImp->pSaveOpt->IsUseBlowfishInODF12();
+}
+
sal_Bool SvtSaveOptions::IsReadOnly( SvtSaveOptions::EOption eOption ) const
{
return pImp->pSaveOpt->IsReadOnly(eOption);