This is an automated email from the ASF dual-hosted git repository.

mseidel pushed a commit to branch AOO41X
in repository https://gitbox.apache.org/repos/asf/openoffice.git


The following commit(s) were added to refs/heads/AOO41X by this push:
     new 0be829e89d Backporting UI changes for enabling AES-256 encryption to 
AOO41X (#366)
0be829e89d is described below

commit 0be829e89df8207c463d2783f522cb6ccd638828
Author: Matthias Seidel <[email protected]>
AuthorDate: Sat May 24 19:40:43 2025 +0200

    Backporting UI changes for enabling AES-256 encryption to AOO41X (#366)
    
    * Update 01010200.xhp
    
    Working towards backporting UI changes for enabling AES-256 encryption to 
AOO41X.
    
    * #125083# add new checkbox in options dialog load/save-general to enable 
ODF 1.2 encryption AES-256
    
    git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1602143 
13f79535-47bb-0310-9956-ffa450edef68
    (cherry picked from commit 972a6c9694b285646b61c6b1a5902c240ee1a6b0)
    
    * Move ODF warning a bit
    
    * Add translated strings
    
    * Add translated PT strings
    
    ---------
    
    Co-authored-by: Juergen Schmidt <[email protected]>
---
 extras/l10n/source/de/localize.sdf                 |  3 +
 extras/l10n/source/pt/localize.sdf                 |  3 +
 main/cui/source/options/optsave.cxx                | 11 +++
 main/cui/source/options/optsave.hrc                |  1 +
 main/cui/source/options/optsave.hxx                |  1 +
 main/cui/source/options/optsave.src                | 81 ++++++----------------
 main/cui/source/options/treeopt.cxx                |  1 +
 main/helpcontent2/helpers/help_hid.lst             |  1 +
 .../source/text/shared/optionen/01010200.xhp       | 17 ++---
 main/sfx2/inc/sfx2/sfxsids.hrc                     |  3 +-
 main/sfx2/source/appl/appcfg.cxx                   | 20 ++++++
 11 files changed, 72 insertions(+), 70 deletions(-)

diff --git a/extras/l10n/source/de/localize.sdf 
b/extras/l10n/source/de/localize.sdf
index 7beaab3cd0..9e4f78804f 100644
--- a/extras/l10n/source/de/localize.sdf
+++ b/extras/l10n/source/de/localize.sdf
@@ -10945,6 +10945,7 @@ cui     source\options\optsave.src      0       
fixedtext       RID_SFXPAGE_SAVE        FT_ODF_VERSION                  121
 cui    source\options\optsave.src      0       stringlist      
RID_SFXPAGE_SAVE.LB_ODF_VERSION 1                       0       de      1.0/1.1 
                        20130618 17:22:18
 cui    source\options\optsave.src      0       stringlist      
RID_SFXPAGE_SAVE.LB_ODF_VERSION 2                       0       de      1.2     
                        20130618 17:22:18
 cui    source\options\optsave.src      0       stringlist      
RID_SFXPAGE_SAVE.LB_ODF_VERSION 3                       0       de      1.2 
Erweitert (empfohlen)                               20130618 17:22:18
+cui    source\options\optsave.src      0       checkbox        
RID_SFXPAGE_SAVE        BTN_ODFENCRYPTION                       248     de      
AES-256 Verschlüsselung aktivieren (ODF 1.2)                            
20200411 15:09:53
 cui    source\options\optsave.src      0       checkbox        
RID_SFXPAGE_SAVE        BTN_NOPRETTYPRINTING                    248     de      
ODF-Format auf Größe optimieren                         20130618 17:22:18
 cui    source\options\optsave.src      0       checkbox        
RID_SFXPAGE_SAVE        BTN_WARNALIENFORMAT                     248     de      
Immer warnen, wenn nicht im ODF- oder Standardformat gespeichert wird           
                20130618 17:22:18
 cui    source\options\optsave.src      0       fixedtext       
RID_SFXPAGE_SAVE        FT_APP                  120     de      ~Dokumenttyp    
                        20130618 17:22:18
@@ -58554,6 +58555,8 @@ helpcontent2    
source\text\shared\optionen\01010200.xhp        0       help    par_id886257    
                        0       d
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id8892483                           0       de      Wenn Sie ein Dokument 
speichern, können Sie wählen, ob Sie das Dokument in im neuen Format ODF 1.2, 
ODF 1.2 (Erweitert) oder im vorherigen Format ODF 1.0/1.1 speichern.            
                    20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id0915200911205367                          0       de      Derzeit 
ermöglicht das ODF 1.2 (Extended) Format, dass Draw und Impress Dateien 
Kommentare enthalten. Kommentare können Sie einfügen, in dem Sie \<item 
type=\"menuitem\"\>Einfügen - Kommentar\</item\> in der neuesten 
Softwareversion auswählen. Die Kommentare gehen verloren, wenn Sie Dateien, die 
mit der neuesten Programmversion abgespeichert waren, mit älteren 
Softwareversionen öffnen.                            20130618 [...]
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id7198400                           0       de      \<ahelp 
hid=\".\"\>Einige Firmen oder Organisationen können ODF Dokumente im ODF 
1.0/1.1-Format verlangen. Sie können dieses Format als Speicherformat 
festlegen. Dieses ältere Format unterstützt nicht alle neuen Features, so dass 
das neue ODF 1.2 (Extended) Format, empfohlen wird.\</ahelp\>                   
          20130618 17:22:18
+helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
hd_id3164920    77                      0       de      
Dateiverschlüsselungsalgorithmus für das ODF 1.2 Format                         
20200411 15:09:53
+helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id3160488   78                      0       de      \<ahelp 
hid=\"SVX_CHECKBOX_RID_SFXPAGE_SAVE_BTN_ODFENCRYPTION\"\>Ändert, wenn ODF 1.2 
genutzt wird, die vorgegebene Dateiverschlüsselung von Blowfish in 
AES-256.\</ahelp\> Die vorgegebene Dateiverschlüsselung ist Blowfish. Wenn ODF 
1.2 genutzt wird, kann der Benutzer die Vorgabe auf AES-256 ändern. Ältere 
verschlüsselte Dokumente können weiterhin geöffnet werden, aber neue 
verschlüsselte Dokumente können [...]
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
hd_id3154920    77                      0       de      ODF-Format auf Größe 
optimieren                         20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id3150488   78                      0       de      \<ahelp 
hid=\"SVX_CHECKBOX_RID_SFXPAGE_SAVE_BTN_NOPRETTYPRINTING\"\>Wenn das Dokument 
gespeichert wird, speichert \<item type=\"productname\"\>%PRODUCTNAME\</item\> 
die XML-Daten ohne Einzüge und zusätzliche Zeilenumbrüche.\</ahelp\> Dadurch 
wird das Speichern und Öffnen der Dokumente beschleunigt und die Dateigröße 
verringert.                               20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_idN1091E                            0       de      Immer warnen, wenn 
nicht im ODF- oder Standardformat gespeichert werden soll                       
     20130618 17:22:18
diff --git a/extras/l10n/source/pt/localize.sdf 
b/extras/l10n/source/pt/localize.sdf
index ff0bba2892..a2f0dff537 100644
--- a/extras/l10n/source/pt/localize.sdf
+++ b/extras/l10n/source/pt/localize.sdf
@@ -10945,6 +10945,7 @@ cui     source\options\optsave.src      0       
fixedtext       RID_SFXPAGE_SAVE        FT_ODF_VERSION                  121
 cui    source\options\optsave.src      0       stringlist      
RID_SFXPAGE_SAVE.LB_ODF_VERSION 1                       0       pt      1.0/1.1 
                        20130618 17:22:18
 cui    source\options\optsave.src      0       stringlist      
RID_SFXPAGE_SAVE.LB_ODF_VERSION 2                       0       pt      1.2     
                        20130618 17:22:18
 cui    source\options\optsave.src      0       stringlist      
RID_SFXPAGE_SAVE.LB_ODF_VERSION 3                       0       pt      1.2 
Expandido (recomendado)                             20130618 17:22:18
+cui    source\options\optsave.src      0       checkbox        
RID_SFXPAGE_SAVE        BTN_ODFENCRYPTION                       248     pt      
Activar encriptação AES-256 (ODF 1.2)                           20200411 
15:09:53
 cui    source\options\optsave.src      0       checkbox        
RID_SFXPAGE_SAVE        BTN_NOPRETTYPRINTING                    248     pt      
Otimização do tamanho para formato ODF                          20130618 
17:22:18
 cui    source\options\optsave.src      0       checkbox        
RID_SFXPAGE_SAVE        BTN_WARNALIENFORMAT                     248     pt      
Avisar se não gravar no formato ODF ou predefinido                              
20130618 17:22:18
 cui    source\options\optsave.src      0       fixedtext       
RID_SFXPAGE_SAVE        FT_APP                  120     pt      Tipo de 
~documento                              20130618 17:22:18
@@ -58554,6 +58555,8 @@ helpcontent2    
source\text\shared\optionen\01010200.xhp        0       help    par_id886257    
                        0       p
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id8892483                           0       pt      Ao gravar um documento, 
pode selecionar se quer gravar o documento no formato ODF 1.2, no formato ODF 
1.2 (Expandido) ou no formato ODF 1.0/1.1 anterior.                             
  20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id0915200911205367                          0       pt      Atualmente, o 
formato ODF 1.2 (Expandido) permite que os ficheiros do Draw e do Impress 
contenham comentários. Estes comentários podem ser inseridos através de \<item 
type=\"menuitem\"\>Inserir - Comentário\</item\> na versão mais recente do 
programa. Os comentários perderam-se ao carregar ficheiros em versões 
anteriores do programa que foram gravadas pela versão mais recente.             
                20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id7198400                           0       pt      \<ahelp 
hid=\".\"\>Algumas empresas ou organizações poderão necessitar de documentos 
ODF no formato ODF 1.0/1.1. Pode selecionar esse formato para gravar na caixa 
de lista. Este formato mais antigo não consegue armazenar todas as novas 
funcionalidades e, como tal, é recomendável a utilização do novo formato ODF 
1.2 (Expandido) sempre que possível.\</ahelp\>                         20130618 
17:22:18
+helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
hd_id3164920    77                      0       pt      Algoritmo de 
encriptação de ficheiros para o formato ODF 1.2                            
20200411 15:09:53
+helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id3160488   78                      0       pt      \<ahelp 
hid=\"SVX_CHECKBOX_RID_SFXPAGE_SAVE_BTN_ODFENCRYPTION\"\>Altere a encriptação 
de ficheiros predefinida de blowfish para AES-256 quando o ODF 1.2 for 
usado.\</ahelp\> O algoritmo predefinido para encriptação de ficheiros é o 
blowfish, mas quando o ODF 1.2 for usado, o utilizador pode alterá-lo para 
AES-256. Os documentos encriptados mais antigos ainda podem ser carregados, mas 
os novos documentos  [...]
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
hd_id3154920    77                      0       pt      Otimização de tamanho 
para o formato ODF                                20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_id3150488   78                      0       pt      \<ahelp 
hid=\"SVX_CHECKBOX_RID_SFXPAGE_SAVE_BTN_NOPRETTYPRINTING\"\>Ao gravar o 
documento, o \<item type=\"productname\"\>%PRODUCTNAME\</item\> grava os dados 
XML sem avanços ou quebras de linha adicionais.\</ahelp\> Isto permite que os 
documentos sejam gravados e abertos mais rapidamente e que o tamanho do 
ficheiro seja mais pequeno.                                20130618 17:22:18
 helpcontent2   source\text\shared\optionen\01010200.xhp        0       help    
par_idN1091E                            0       pt      Avisar quando não 
gravar no formato ODF ou predefinido                          20130618 17:22:18
diff --git a/main/cui/source/options/optsave.cxx 
b/main/cui/source/options/optsave.cxx
index d1212e6b70..4da9721fe2 100644
--- a/main/cui/source/options/optsave.cxx
+++ b/main/cui/source/options/optsave.cxx
@@ -178,6 +178,7 @@ SfxSaveTabPage::SfxSaveTabPage( Window* pParent, const 
SfxItemSet& rCoreSet ) :
     aDefaultFormatFL    ( this, CUI_RES( FL_FILTER ) ),
     aODFVersionFT       ( this, CUI_RES( FT_ODF_VERSION ) ),
     aODFVersionLB       ( this, CUI_RES( LB_ODF_VERSION ) ),
+    aODFEncryptionCB    ( this, CUI_RES( BTN_ODFENCRYPTION ) ),
     aSizeOptimizationCB ( this, CUI_RES( BTN_NOPRETTYPRINTING ) ),
     aWarnAlienFormatCB  ( this, CUI_RES( BTN_WARNALIENFORMAT ) ),
     aDocTypeFT          ( this, CUI_RES( FT_APP ) ),
@@ -384,6 +385,12 @@ sal_Bool SfxSaveTabPage::FillItemSet( SfxItemSet& rSet )
                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() )
        {
         rSet.Put( SfxBoolItem( GetWhich( SID_ATTR_PRETTYPRINTING ), 
!aSizeOptimizationCB.IsChecked() ) );
@@ -596,6 +603,9 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
     
aWarnAlienFormatCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_WARNALIENFORMAT));
 //    aAutoSaveCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_AUTOSAVE));
 
+    // ODF encryption
+    aODFEncryptionCB.Check( !aSaveOpt.IsUseSHA1InODF12());
+
        // the pretty printing
     aSizeOptimizationCB.Check( !aSaveOpt.IsPrettyPrinting());
 //    
aSizeOptimizationCB.Enable(!aSaveOpt.IsReadOnly(SvtSaveOptions::E_DOPRETTYPRINTING
 ));
@@ -620,6 +630,7 @@ void SfxSaveTabPage::Reset( const SfxItemSet& )
     aDocInfoCB.SaveValue();
     aBackupCB.SaveValue();
     aWarnAlienFormatCB.SaveValue();
+    aODFEncryptionCB.SaveValue();
     aSizeOptimizationCB.SaveValue();
     aAutoSaveCB.SaveValue();
        aAutoSaveEdit.SaveValue();
diff --git a/main/cui/source/options/optsave.hrc 
b/main/cui/source/options/optsave.hrc
index 19a95d4d0a..9f69de6045 100644
--- a/main/cui/source/options/optsave.hrc
+++ b/main/cui/source/options/optsave.hrc
@@ -40,6 +40,7 @@
 #define BTN_WARNALIENFORMAT     22
 #define FT_ODF_VERSION          23
 #define LB_ODF_VERSION          24
+#define BTN_ODFENCRYPTION       25
 
 #define GB_RELATIVE             40
 #define BTN_RELATIVE_FSYS       41
diff --git a/main/cui/source/options/optsave.hxx 
b/main/cui/source/options/optsave.hxx
index f4d821fe8d..6ee3081fcd 100644
--- a/main/cui/source/options/optsave.hxx
+++ b/main/cui/source/options/optsave.hxx
@@ -66,6 +66,7 @@ private:
     FixedLine               aDefaultFormatFL;
     FixedText               aODFVersionFT;
     ListBox                 aODFVersionLB;
+    CheckBox                aODFEncryptionCB;
     CheckBox                aSizeOptimizationCB;
     CheckBox                aWarnAlienFormatCB;
     FixedText               aDocTypeFT;
diff --git a/main/cui/source/options/optsave.src 
b/main/cui/source/options/optsave.src
index 7c3779b335..dfa48507af 100644
--- a/main/cui/source/options/optsave.src
+++ b/main/cui/source/options/optsave.src
@@ -1,5 +1,5 @@
 /**************************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -7,20 +7,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  *************************************************************/
 
-
-
  // include ---------------------------------------------------------------
 #include <sfx2/sfx.hrc>
 #include <cuires.hrc>
@@ -156,36 +154,43 @@ TabPage RID_SFXPAGE_SAVE
                        < "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
     {
         HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING";
-        Pos = MAP_APPFONT ( 12 , 120 ) ;
+        Pos = MAP_APPFONT ( 12 , 131 ) ;
         Size = MAP_APPFONT ( 248 , 10 ) ;
         Text [ en-US ] = "Size optimization for ODF format" ;
     };
     CheckBox BTN_WARNALIENFORMAT
     {
         HelpID = "cui:CheckBox:RID_SFXPAGE_SAVE:BTN_WARNALIENFORMAT";
-        Pos = MAP_APPFONT ( 12 , 131 ) ;
+        Pos = MAP_APPFONT ( 12 , 142 ) ;
         Size = MAP_APPFONT ( 248 , 10 ) ;
         Text [ en-US ] = "Warn when not saving in ODF or default format" ;
     };
     FixedText FT_APP
     {
-        Pos = MAP_APPFONT ( 12 , 142 ) ;
+        Pos = MAP_APPFONT ( 12 , 153 ) ;
         Size = MAP_APPFONT ( 120 , 8 ) ;
        Text [ en-US ] = "D~ocument type";
        };
     FixedText FT_FILTER
     {
-        Pos = MAP_APPFONT ( 136 , 142 ) ;
+        Pos = MAP_APPFONT ( 136 , 153 ) ;
         Size = MAP_APPFONT ( 120 , 8 ) ;
        Text [ en-US ] = "Always sa~ve as";
        };
     ListBox LB_APP
     {
         HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_APP";
-        Pos = MAP_APPFONT ( 12 , 153 ) ;
+        Pos = MAP_APPFONT ( 12 , 164 ) ;
         Size = MAP_APPFONT ( 108 , 58 ) ;
         Border = TRUE;
         DropDown = TRUE;
@@ -202,14 +207,14 @@ TabPage RID_SFXPAGE_SAVE
        };
     FixedImage FI_FILTER
     {
-        Pos = MAP_APPFONT ( 129, 154 ) ;
+        Pos = MAP_APPFONT ( 129, 153 ) ;
         Size = MAP_APPFONT ( 6 , 6 ) ;
         Hide = TRUE;
     };
     ListBox LB_FILTER
     {
         HelpID = "cui:ListBox:RID_SFXPAGE_SAVE:LB_FILTER";
-        Pos = MAP_APPFONT ( 136 , 153 ) ;
+        Pos = MAP_APPFONT ( 136 , 164 ) ;
         Size = MAP_APPFONT ( 108 , 58 ) ;
         Border = TRUE;
         Sort = TRUE;
@@ -217,13 +222,13 @@ TabPage RID_SFXPAGE_SAVE
     };
     FixedImage FI_ODF_WARNING
     {
-        Pos = MAP_APPFONT ( 12, 169 ) ;
+        Pos = MAP_APPFONT ( 12, 177 ) ;
         Size = MAP_APPFONT ( 8 , 8 ) ;
         Hide = TRUE;
     };
     FixedText FT_WARN
     {
-        Pos = MAP_APPFONT ( 23 , 169 ) ;
+        Pos = MAP_APPFONT ( 23 , 177 ) ;
         Size = MAP_APPFONT ( 239 , 8 ) ;
         Hide = TRUE;
         Text [ en-US ] = "Not using ODF 1.2 Extended may cause infomation to 
be lost.";
@@ -282,49 +287,3 @@ ModalDialog RID_SVXDLG_FILTER_WARNING
        };
 };
 
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/main/cui/source/options/treeopt.cxx 
b/main/cui/source/options/treeopt.cxx
index 57c540f0a0..e34638196d 100644
--- a/main/cui/source/options/treeopt.cxx
+++ b/main/cui/source/options/treeopt.cxx
@@ -1627,6 +1627,7 @@ SfxItemSet*       OfaTreeOptionsDialog::CreateItemSet( 
sal_uInt16 nId )
             SID_SAVEREL_INET, SID_SAVEREL_FSYS,
                        SID_ATTR_PRETTYPRINTING, SID_ATTR_PRETTYPRINTING,
             SID_ATTR_WARNALIENFORMAT, SID_ATTR_WARNALIENFORMAT,
+            SID_ATTR_ODFENCRYPTION, SID_ATTR_ODFENCRYPTION,
             0 );
             SFX_APP()->GetOptions(*pRet);
             break;
diff --git a/main/helpcontent2/helpers/help_hid.lst 
b/main/helpcontent2/helpers/help_hid.lst
index 4d09904247..e96ab2abbe 100644
--- a/main/helpcontent2/helpers/help_hid.lst
+++ b/main/helpcontent2/helpers/help_hid.lst
@@ -8141,6 +8141,7 @@ svx_CheckBox_RID_SFXPAGE_GENERAL_CB_USEDATA,733496360,
 svx_CheckBox_RID_SFXPAGE_SAVE_BTN_AUTOSAVE,733479952,
 svx_CheckBox_RID_SFXPAGE_SAVE_BTN_BACKUP,733479951,
 svx_CheckBox_RID_SFXPAGE_SAVE_BTN_DOCINFO,733479950,
+svx_CheckBox_RID_SFXPAGE_SAVE_BTN_ODFENCRYPTION,733479953,
 svx_CheckBox_RID_SFXPAGE_SAVE_BTN_NOPRETTYPRINTING,733479956,
 svx_CheckBox_RID_SFXPAGE_SAVE_BTN_RELATIVE_FSYS,733479977,
 svx_CheckBox_RID_SFXPAGE_SAVE_BTN_RELATIVE_INET,733479978,
diff --git a/main/helpcontent2/source/text/shared/optionen/01010200.xhp 
b/main/helpcontent2/source/text/shared/optionen/01010200.xhp
index ef288ec97d..2d4af7a744 100644
--- a/main/helpcontent2/source/text/shared/optionen/01010200.xhp
+++ b/main/helpcontent2/source/text/shared/optionen/01010200.xhp
@@ -2,7 +2,7 @@
 <helpdocument version="1.0">
 
 <!--***********************************************************
- * 
+ *
  * Licensed to the Apache Software Foundation (ASF) under one
  * or more contributor license agreements.  See the NOTICE file
  * distributed with this work for additional information
@@ -10,21 +10,18 @@
  * to you under the Apache License, Version 2.0 (the
  * "License"); you may not use this file except in compliance
  * with the License.  You may obtain a copy of the License at
- * 
+ *
  *   http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing,
  * software distributed under the License is distributed on an
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
- * 
+ *
  ***********************************************************-->
 
-
-
-
 <meta>
       <topic id="textsharedoptionen01010200xml" indexer="include" 
status="PUBLISH">
          <title xml-lang="en-US" id="tit">General</title>
@@ -151,6 +148,10 @@
       <paragraph xml-lang="en-US" id="par_id8892483" role="paragraph" 
l10n="NEW">When you save a document, you can select whether to save the 
document in the format ODF 1.2, ODF 1.2 (Extended), or in the prior format ODF 
1.0/1.1.</paragraph>
       <paragraph xml-lang="en-US" id="par_id0915200911205367" role="note" 
l10n="NEW">Currently, the ODF 1.2 (Extended) format enables files of Draw and 
Impress to contain comments. Those comments can be inserted by <item 
type="menuitem">Insert - Comment</item> in the latest software version. The 
comments get lost when loading files into prior software versions that were 
saved by the latest software version.</paragraph>
       <paragraph xml-lang="en-US" id="par_id7198400" role="paragraph" 
l10n="CHG"><ahelp hid=".">Some companies or organizations may require ODF 
documents in the ODF 1.0/1.1 format. You can select that format to save in the 
listbox. This older format cannot store all new features, so the new format ODF 
1.2 (Extended) is recommended where possible.</ahelp></paragraph>
+<bookmark xml-lang="en-US" 
branch="hid/cui:CheckBox:RID_SFXPAGE_SAVE:BTN_ODFENCRYPTION" id="bm_id3165414" 
localize="false"/>
+<paragraph xml-lang="en-US" id="hd_id3164920" role="heading" level="3" 
l10n="NEW"
+                 oldref="77">File encryption algorithm for ODF 1.2 
format</paragraph>
+      <paragraph xml-lang="en-US" id="par_id3160488" role="paragraph" l10n="U" 
oldref="78"><ahelp hid="SVX_CHECKBOX_RID_SFXPAGE_SAVE_BTN_ODFENCRYPTION">Change 
the default file encryption from blowfish to AES-256 when ODF 1.2 is 
used.</ahelp> The default file encryption algorithm is blowfish but when ODF 
1.2 is used the user can change the default to AES-256. Older encrypted 
documents can still be loaded but new encrypted documents can't be opened with 
older office versions. The AES-256 a [...]
 <bookmark xml-lang="en-US" 
branch="hid/cui:CheckBox:RID_SFXPAGE_SAVE:BTN_NOPRETTYPRINTING" 
id="bm_id3155414" localize="false"/>
 <paragraph xml-lang="en-US" id="hd_id3154920" role="heading" level="3" 
l10n="CHG"
                  oldref="77">Size optimization for ODF format</paragraph>
@@ -169,4 +170,4 @@
                  oldref="51">Always save as</paragraph>
       <paragraph xml-lang="en-US" id="par_id3149035" role="paragraph" l10n="U" 
oldref="64"><ahelp hid="SVX_LISTBOX_RID_SFXPAGE_SAVE_LB_FILTER">Specifies how 
documents of the type selected on the left will always be saved as this file 
type. You may select another file type for the current document in the 
<emph>Save as</emph> dialog.</ahelp></paragraph>
    </body>
-</helpdocument>
\ No newline at end of file
+</helpdocument>
diff --git a/main/sfx2/inc/sfx2/sfxsids.hrc b/main/sfx2/inc/sfx2/sfxsids.hrc
index 442cfd63ed..447c95303e 100644
--- a/main/sfx2/inc/sfx2/sfxsids.hrc
+++ b/main/sfx2/inc/sfx2/sfxsids.hrc
@@ -835,8 +835,9 @@
 #define SID_OPT_FONT_ANTIALIASING_MINPIXELS    (SID_OPTIONS_START + 96)
 //middle mouse button
 #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_ATTR_ODFENCRYPTION              (SID_OPTIONS_START + 100)
 
 // slot IDs from SVX (svxids.hrc) ---------------------------------------------
 
diff --git a/main/sfx2/source/appl/appcfg.cxx b/main/sfx2/source/appl/appcfg.cxx
index 8ad0c77ab9..c704bca6be 100644
--- a/main/sfx2/source/appl/appcfg.cxx
+++ b/main/sfx2/source/appl/appcfg.cxx
@@ -205,6 +205,16 @@ sal_Bool SfxApplication::GetOptions( SfxItemSet& rSet )
                                 bRet = sal_False;
                     }
                                        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:
                     {
                         bRet = sal_True;
@@ -563,6 +573,16 @@ void SfxApplication::SetOptions_Impl( const SfxItemSet& 
rSet )
         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
     if ( SFX_ITEM_SET == rSet.GetItemState( rPool.GetWhich( 
SID_ATTR_PRETTYPRINTING ), sal_True, &pItem ) )
     {

Reply via email to