Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
f5d07409
Kaydet (Commit)
f5d07409
authored
Haz 12, 2014
tarafından
Jürgen Schmidt
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#125083# add new checkbox in options dialog load/save-general to enable ODF 1.2 encryption AES-256
üst
038e3ce8
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
51 additions
and
9 deletions
+51
-9
optsave.cxx
cui/source/options/optsave.cxx
+11
-0
optsave.hrc
cui/source/options/optsave.hrc
+1
-0
optsave.hxx
cui/source/options/optsave.hxx
+1
-0
optsave.src
cui/source/options/optsave.src
+16
-9
treeopt.cxx
cui/source/options/treeopt.cxx
+1
-0
sfxsids.hrc
sfx2/inc/sfx2/sfxsids.hrc
+1
-0
appcfg.cxx
sfx2/source/appl/appcfg.cxx
+20
-0
No files found.
cui/source/options/optsave.cxx
Dosyayı görüntüle @
f5d07409
...
@@ -178,6 +178,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
...
@@ -178,6 +178,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const SfxItemSet& rCoreSet ) :
aDefaultFormatFL
(
this
,
CUI_RES
(
FL_FILTER
)
),
aDefaultFormatFL
(
this
,
CUI_RES
(
FL_FILTER
)
),
aODFVersionFT
(
this
,
CUI_RES
(
FT_ODF_VERSION
)
),
aODFVersionFT
(
this
,
CUI_RES
(
FT_ODF_VERSION
)
),
aODFVersionLB
(
this
,
CUI_RES
(
LB_ODF_VERSION
)
),
aODFVersionLB
(
this
,
CUI_RES
(
LB_ODF_VERSION
)
),
aODFEncryptionCB
(
this
,
CUI_RES
(
BTN_ODFENCRYPTION
)
),
aSizeOptimizationCB
(
this
,
CUI_RES
(
BTN_NOPRETTYPRINTING
)
),
aSizeOptimizationCB
(
this
,
CUI_RES
(
BTN_NOPRETTYPRINTING
)
),
aWarnAlienFormatCB
(
this
,
CUI_RES
(
BTN_WARNALIENFORMAT
)
),
aWarnAlienFormatCB
(
this
,
CUI_RES
(
BTN_WARNALIENFORMAT
)
),
aDocTypeFT
(
this
,
CUI_RES
(
FT_APP
)
),
aDocTypeFT
(
this
,
CUI_RES
(
FT_APP
)
),
...
@@ -384,6 +385,12 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet )
...
@@ -384,6 +385,12 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet )
bModified
|=
sal_True
;
bModified
|=
sal_True
;
}
}
if
(
aODFEncryptionCB
.
IsChecked
()
!=
aODFEncryptionCB
.
GetSavedValue
()
)
{
rSet
.
Put
(
SfxBoolItem
(
GetWhich
(
SID_ATTR_ODFENCRYPTION
),
aODFEncryptionCB
.
IsChecked
()
)
);
bModified
|=
sal_True
;
}
if
(
aSizeOptimizationCB
.
IsChecked
()
!=
aSizeOptimizationCB
.
GetSavedValue
()
)
if
(
aSizeOptimizationCB
.
IsChecked
()
!=
aSizeOptimizationCB
.
GetSavedValue
()
)
{
{
rSet
.
Put
(
SfxBoolItem
(
GetWhich
(
SID_ATTR_PRETTYPRINTING
),
!
aSizeOptimizationCB
.
IsChecked
()
)
);
rSet
.
Put
(
SfxBoolItem
(
GetWhich
(
SID_ATTR_PRETTYPRINTING
),
!
aSizeOptimizationCB
.
IsChecked
()
)
);
...
@@ -596,6 +603,9 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
...
@@ -596,6 +603,9 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
aWarnAlienFormatCB
.
Enable
(
!
aSaveOpt
.
IsReadOnly
(
SvtSaveOptions
::
E_WARNALIENFORMAT
));
aWarnAlienFormatCB
.
Enable
(
!
aSaveOpt
.
IsReadOnly
(
SvtSaveOptions
::
E_WARNALIENFORMAT
));
// aAutoSaveCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVE));
// aAutoSaveCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVE));
// ODF encryption
aODFEncryptionCB
.
Check
(
!
aSaveOpt
.
IsUseSHA1InODF12
());
// the pretty printing
// the pretty printing
aSizeOptimizationCB
.
Check
(
!
aSaveOpt
.
IsPrettyPrinting
());
aSizeOptimizationCB
.
Check
(
!
aSaveOpt
.
IsPrettyPrinting
());
// aSizeOptimizationCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING ));
// aSizeOptimizationCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING ));
...
@@ -620,6 +630,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
...
@@ -620,6 +630,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
aDocInfoCB
.
SaveValue
();
aDocInfoCB
.
SaveValue
();
aBackupCB
.
SaveValue
();
aBackupCB
.
SaveValue
();
aWarnAlienFormatCB
.
SaveValue
();
aWarnAlienFormatCB
.
SaveValue
();
aODFEncryptionCB
.
SaveValue
();
aSizeOptimizationCB
.
SaveValue
();
aSizeOptimizationCB
.
SaveValue
();
aAutoSaveCB
.
SaveValue
();
aAutoSaveCB
.
SaveValue
();
aAutoSaveEdit
.
SaveValue
();
aAutoSaveEdit
.
SaveValue
();
...
...
cui/source/options/optsave.hrc
Dosyayı görüntüle @
f5d07409
...
@@ -40,6 +40,7 @@
...
@@ -40,6 +40,7 @@
#define BTN_WARNALIENFORMAT 22
#define BTN_WARNALIENFORMAT 22
#define FT_ODF_VERSION 23
#define FT_ODF_VERSION 23
#define LB_ODF_VERSION 24
#define LB_ODF_VERSION 24
#define BTN_ODFENCRYPTION 25
#define GB_RELATIVE 40
#define GB_RELATIVE 40
#define BTN_RELATIVE_FSYS 41
#define BTN_RELATIVE_FSYS 41
...
...
cui/source/options/optsave.hxx
Dosyayı görüntüle @
f5d07409
...
@@ -66,6 +66,7 @@ private:
...
@@ -66,6 +66,7 @@ private:
FixedLine
aDefaultFormatFL
;
FixedLine
aDefaultFormatFL
;
FixedText
aODFVersionFT
;
FixedText
aODFVersionFT
;
ListBox
aODFVersionLB
;
ListBox
aODFVersionLB
;
CheckBox
aODFEncryptionCB
;
CheckBox
aSizeOptimizationCB
;
CheckBox
aSizeOptimizationCB
;
CheckBox
aWarnAlienFormatCB
;
CheckBox
aWarnAlienFormatCB
;
FixedText
aDocTypeFT
;
FixedText
aDocTypeFT
;
...
...
cui/source/options/optsave.src
Dosyayı görüntüle @
f5d07409
...
@@ -156,36 +156,43 @@ TabPage RID_SFXPAGE_SAVE
...
@@ -156,36 +156,43 @@ TabPage RID_SFXPAGE_SAVE
< "1.2 Extended (recommended)"; 0x7fffffff ; > ;
< "1.2 Extended (recommended)"; 0x7fffffff ; > ;
};
};
};
};
CheckBox BTN_ODFENCRYPTION
{
HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_ODFENCRYPTION";
Pos = MAP_APPFONT ( 12 , 120 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
Text [ en-US ] = "Enable AES-256 encryption (ODF 1.2)" ;
};
CheckBox BTN_NOPRETTYPRINTING
CheckBox BTN_NOPRETTYPRINTING
{
{
HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING";
HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING";
Pos = MAP_APPFONT ( 12 , 1
20
) ;
Pos = MAP_APPFONT ( 12 , 1
31
) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
Text [ en-US ] = "Size optimization for ODF format" ;
Text [ en-US ] = "Size optimization for ODF format" ;
};
};
CheckBox BTN_WARNALIENFORMAT
CheckBox BTN_WARNALIENFORMAT
{
{
HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_WARNALIENFORMAT";
HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_WARNALIENFORMAT";
Pos = MAP_APPFONT ( 12 , 1
31
) ;
Pos = MAP_APPFONT ( 12 , 1
42
) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
Size = MAP_APPFONT ( 248 , 10 ) ;
Text [ en-US ] = "Warn when not saving in ODF or default format" ;
Text [ en-US ] = "Warn when not saving in ODF or default format" ;
};
};
FixedText FT_APP
FixedText FT_APP
{
{
Pos = MAP_APPFONT ( 12 , 1
42
) ;
Pos = MAP_APPFONT ( 12 , 1
53
) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "D~ocument type";
Text [ en-US ] = "D~ocument type";
};
};
FixedText FT_FILTER
FixedText FT_FILTER
{
{
Pos = MAP_APPFONT ( 136 , 1
42
) ;
Pos = MAP_APPFONT ( 136 , 1
53
) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Size = MAP_APPFONT ( 120 , 8 ) ;
Text [ en-US ] = "Always sa~ve as";
Text [ en-US ] = "Always sa~ve as";
};
};
ListBox LB_APP
ListBox LB_APP
{
{
HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_APP";
HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_APP";
Pos = MAP_APPFONT ( 12 , 1
53
) ;
Pos = MAP_APPFONT ( 12 , 1
64
) ;
Size = MAP_APPFONT ( 108 , 58 ) ;
Size = MAP_APPFONT ( 108 , 58 ) ;
Border = TRUE;
Border = TRUE;
DropDown = TRUE;
DropDown = TRUE;
...
@@ -202,14 +209,14 @@ TabPage RID_SFXPAGE_SAVE
...
@@ -202,14 +209,14 @@ TabPage RID_SFXPAGE_SAVE
};
};
FixedImage FI_FILTER
FixedImage FI_FILTER
{
{
Pos = MAP_APPFONT ( 129, 15
4
) ;
Pos = MAP_APPFONT ( 129, 15
3
) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 6 , 6 ) ;
Hide = TRUE;
Hide = TRUE;
};
};
ListBox LB_FILTER
ListBox LB_FILTER
{
{
HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_FILTER";
HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_FILTER";
Pos = MAP_APPFONT ( 136 , 1
53
) ;
Pos = MAP_APPFONT ( 136 , 1
64
) ;
Size = MAP_APPFONT ( 108 , 58 ) ;
Size = MAP_APPFONT ( 108 , 58 ) ;
Border = TRUE;
Border = TRUE;
Sort = TRUE;
Sort = TRUE;
...
@@ -217,13 +224,13 @@ TabPage RID_SFXPAGE_SAVE
...
@@ -217,13 +224,13 @@ TabPage RID_SFXPAGE_SAVE
};
};
FixedImage FI_ODF_WARNING
FixedImage FI_ODF_WARNING
{
{
Pos = MAP_APPFONT ( 12, 1
69
) ;
Pos = MAP_APPFONT ( 12, 1
80
) ;
Size = MAP_APPFONT ( 8 , 8 ) ;
Size = MAP_APPFONT ( 8 , 8 ) ;
Hide = TRUE;
Hide = TRUE;
};
};
FixedText FT_WARN
FixedText FT_WARN
{
{
Pos = MAP_APPFONT ( 23 , 1
69
) ;
Pos = MAP_APPFONT ( 23 , 1
80
) ;
Size = MAP_APPFONT ( 239 , 8 ) ;
Size = MAP_APPFONT ( 239 , 8 ) ;
Hide = TRUE;
Hide = TRUE;
Text [ en-US ] = "Not using ODF 1.2 Extended may cause information to be lost.";
Text [ en-US ] = "Not using ODF 1.2 Extended may cause information to be lost.";
...
...
cui/source/options/treeopt.cxx
Dosyayı görüntüle @
f5d07409
...
@@ -1627,6 +1627,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
...
@@ -1627,6 +1627,7 @@ SfxItemSet* OfaTreeOptionsDialog::CreateItemSet( sal_uInt16 nId )
SID_SAVEREL_INET
,
SID_SAVEREL_FSYS
,
SID_SAVEREL_INET
,
SID_SAVEREL_FSYS
,
SID_ATTR_PRETTYPRINTING
,
SID_ATTR_PRETTYPRINTING
,
SID_ATTR_PRETTYPRINTING
,
SID_ATTR_PRETTYPRINTING
,
SID_ATTR_WARNALIENFORMAT
,
SID_ATTR_WARNALIENFORMAT
,
SID_ATTR_WARNALIENFORMAT
,
SID_ATTR_WARNALIENFORMAT
,
SID_ATTR_ODFENCRYPTION
,
SID_ATTR_ODFENCRYPTION
,
0
);
0
);
SFX_APP
()
->
GetOptions
(
*
pRet
);
SFX_APP
()
->
GetOptions
(
*
pRet
);
break
;
break
;
...
...
sfx2/inc/sfx2/sfxsids.hrc
Dosyayı görüntüle @
f5d07409
...
@@ -837,6 +837,7 @@
...
@@ -837,6 +837,7 @@
#define SID_OPT_MIDDLE_MOUSE (SID_OPTIONS_START + 97)
#define SID_OPT_MIDDLE_MOUSE (SID_OPTIONS_START + 97)
#define SID_ATTR_PRETTYPRINTING (SID_OPTIONS_START + 98)
#define SID_ATTR_PRETTYPRINTING (SID_OPTIONS_START + 98)
#define SID_HELP_STYLESHEET (SID_OPTIONS_START + 99)
#define SID_HELP_STYLESHEET (SID_OPTIONS_START + 99)
#define SID_ATTR_ODFENCRYPTION (SID_OPTIONS_START + 100)
// slot IDs from SVX (svxids.hrc) ---------------------------------------------
// slot IDs from SVX (svxids.hrc) ---------------------------------------------
...
...
sfx2/source/appl/appcfg.cxx
Dosyayı görüntüle @
f5d07409
...
@@ -205,6 +205,16 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
...
@@ -205,6 +205,16 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
bRet
=
sal_False
;
bRet
=
sal_False
;
}
}
break
;
break
;
case
SID_ATTR_ODFENCRYPTION
:
{
bRet
=
sal_True
;
if
(
!
aSaveOptions
.
IsReadOnly
(
SvtSaveOptions
::
E_USESHA1INODF12
)
&&
!
aSaveOptions
.
IsReadOnly
(
SvtSaveOptions
::
E_USEBLOWFISHINODF12
))
if
(
!
rSet
.
Put
(
SfxBoolItem
(
rPool
.
GetWhich
(
SID_ATTR_ODFENCRYPTION
),
!
(
aSaveOptions
.
IsUseSHA1InODF12
()
&&
aSaveOptions
.
IsUseBlowfishInODF12
()))))
bRet
=
sal_False
;
}
break
;
case
SID_ATTR_PRETTYPRINTING
:
case
SID_ATTR_PRETTYPRINTING
:
{
{
bRet
=
sal_True
;
bRet
=
sal_True
;
...
@@ -563,6 +573,16 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
...
@@ -563,6 +573,16 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& rSet )
aSaveOptions
.
SetBackup
(
(
(
const
SfxBoolItem
*
)
pItem
)
->
GetValue
()
);
aSaveOptions
.
SetBackup
(
(
(
const
SfxBoolItem
*
)
pItem
)
->
GetValue
()
);
}
}
// ODF Encryption
if
(
SFX_ITEM_SET
==
rSet
.
GetItemState
(
rPool
.
GetWhich
(
SID_ATTR_ODFENCRYPTION
),
sal_True
,
&
pItem
)
)
{
DBG_ASSERT
(
pItem
->
ISA
(
SfxBoolItem
),
"BoolItem expected"
);
sal_Bool
bItemValue
=
static_cast
<
const
SfxBoolItem
*>
(
pItem
)
->
GetValue
();
aSaveOptions
.
SetUseSHA1InODF12
(
!
bItemValue
);
aSaveOptions
.
SetUseBlowfishInODF12
(
!
bItemValue
);
}
// PrettyPrinting
// PrettyPrinting
if
(
SFX_ITEM_SET
==
rSet
.
GetItemState
(
rPool
.
GetWhich
(
SID_ATTR_PRETTYPRINTING
),
sal_True
,
&
pItem
)
)
if
(
SFX_ITEM_SET
==
rSet
.
GetItemState
(
rPool
.
GetWhich
(
SID_ATTR_PRETTYPRINTING
),
sal_True
,
&
pItem
)
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment