[Libreoffice-commits] .: sfx2/AllLangResTarget_sfx2.mk sfx2/source sfx2/uiconfig sfx2/UI_sfx.mk sfx2/util

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 18 05:35:34 PST 2012


 sfx2/AllLangResTarget_sfx2.mk          |    1 
 sfx2/UI_sfx.mk                         |    1 
 sfx2/source/appl/app.hrc               |    3 
 sfx2/source/appl/app.src               |    8 +
 sfx2/source/dialog/securitypage.cxx    |  166 +++++++++++----------------------
 sfx2/source/dialog/securitypage.hrc    |   43 --------
 sfx2/source/dialog/securitypage.src    |  158 -------------------------------
 sfx2/source/inc/helpid.hrc             |    1 
 sfx2/uiconfig/ui/documentproperties.ui |   97 -------------------
 sfx2/uiconfig/ui/securityinfopage.ui   |  133 ++++++++++++++++++++++++++
 sfx2/util/hidother.src                 |    1 
 11 files changed, 206 insertions(+), 406 deletions(-)

New commits:
commit a2279bb2f52ee5bbe8d38433aac55aa1a16661fb
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Dec 18 13:32:39 2012 +0000

    split out security info page and convert to .ui
    
    Change-Id: Ifb962186a80941beb57b75815fbb9d425ef44ee0

diff --git a/sfx2/AllLangResTarget_sfx2.mk b/sfx2/AllLangResTarget_sfx2.mk
index af2f5bc..d2f43ec 100644
--- a/sfx2/AllLangResTarget_sfx2.mk
+++ b/sfx2/AllLangResTarget_sfx2.mk
@@ -59,7 +59,6 @@ $(eval $(call gb_SrsTarget_add_files,sfx/res,\
     sfx2/source/dialog/newstyle.src \
     sfx2/source/dialog/printopt.src \
     sfx2/source/dialog/recfloat.src \
-    sfx2/source/dialog/securitypage.src \
     sfx2/source/dialog/srchdlg.src \
     sfx2/source/dialog/taskpane.src \
     sfx2/source/dialog/templateinfodlg.src \
diff --git a/sfx2/UI_sfx.mk b/sfx2/UI_sfx.mk
index 9505cdf..d3d15c6 100644
--- a/sfx2/UI_sfx.mk
+++ b/sfx2/UI_sfx.mk
@@ -15,6 +15,7 @@ $(eval $(call gb_UI_add_uifiles,sfx,\
 	sfx2/uiconfig/ui/documentinfopage \
 	sfx2/uiconfig/ui/password \
 	sfx2/uiconfig/ui/printeroptionsdialog \
+	sfx2/uiconfig/ui/securityinfopage \
 	sfx2/uiconfig/ui/templatemanagementdialog \
 ))
 
diff --git a/sfx2/source/appl/app.hrc b/sfx2/source/appl/app.hrc
index fb322cb..cfe9ae1 100644
--- a/sfx2/source/appl/app.hrc
+++ b/sfx2/source/appl/app.hrc
@@ -142,6 +142,9 @@
 #define PB_LICENSING_SHOW                       (RID_SFX_APP_START + 210)
 #define PB_LICENSING_CLOSE                      (RID_SFX_APP_START + 211)
 
+#define RID_SVXSTR_END_REDLINING_WARNING        (RID_SFX_APP_START + 212)
+#define RID_SVXSTR_INCORRECT_PASSWORD           (RID_SFX_APP_START + 213)
+
 #define MD_DDE_LINKEDIT                         (RID_SFX_APP_START + 1)
 
 #endif // #ifndef _SFX_APP_HRC
diff --git a/sfx2/source/appl/app.src b/sfx2/source/appl/app.src
index d1dcccd..aa12e39 100644
--- a/sfx2/source/appl/app.src
+++ b/sfx2/source/appl/app.src
@@ -504,6 +504,14 @@ String RID_SVXSTR_GRFILTER_TOOBIG
 {
     Text [ en-US ] = "Not enough memory to insert graphic" ;
 };
+String RID_SVXSTR_END_REDLINING_WARNING
+{
+    Text [ en-US ] = "This action will exit the change recording mode.\nAny information about changes will be lost.\n\nExit change recording mode?\n\n" ;
+};
+String RID_SVXSTR_INCORRECT_PASSWORD
+{
+    Text [ en-US ] = "Incorrect password" ;
+};
 
 ModalDialog DLG_HELP_LICENSING
 {
diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx
index b4de6af..46f33f5 100644
--- a/sfx2/source/dialog/securitypage.cxx
+++ b/sfx2/source/dialog/securitypage.cxx
@@ -20,7 +20,6 @@
 
 #include "sfx2/securitypage.hxx"
 
-#include "securitypage.hrc"
 #include "sfxresid.hxx"
 
 #include <sfx2/sfx.hrc>
@@ -40,6 +39,8 @@
 #include <svl/PasswordHelper.hxx>
 #include <svtools/xwindowitem.hxx>
 
+#include "../appl/app.hrc"
+
 
 using namespace ::com::sun::star;
 
@@ -125,7 +126,7 @@ static bool lcl_IsPasswordCorrect( const String &rPassword )
     if (SvPasswordHelper::CompareHashPassword( aPasswordHash, rPassword ))
         bRes = true;    // password was correct
     else
-        InfoBox( NULL, SfxResId( RID_SFX_INCORRECT_PASSWORD ).toString() ).Execute();
+        InfoBox( NULL, SFX2_RESSTR(RID_SVXSTR_INCORRECT_PASSWORD) ).Execute();
 
     return bRes;
 }
@@ -135,25 +136,10 @@ struct SfxSecurityPage_Impl
 {
     SfxSecurityPage &   m_rMyTabPage;
 
-    FixedLine           m_aNewPasswordToOpenFL;
-    FixedText           m_aNewPasswordToOpenFT;
-    Edit                m_aNewPasswordToOpenED;
-    FixedText           m_aConfirmPasswordToOpenFT;
-    Edit                m_aConfirmPasswordToOpenED;
-    FixedText           m_aNewPasswordInfoFT;
-
-    FixedLine           m_aNewPasswordToModifyFL;
-    FixedText           m_aNewPasswordToModifyFT;
-    Edit                m_aNewPasswordToModifyED;
-    FixedText           m_aConfirmPasswordToModifyFT;
-    Edit                m_aConfirmPasswordToModifyED;
-
-    FixedLine           m_aOptionsFL;
-    CheckBox            m_aOpenReadonlyCB;
-    CheckBox            m_aRecordChangesCB;         // for record changes
-    PushButton          m_aChangeProtectionPB;      // for record changes
-    String              m_aProtectSTR;              // for record changes
-    String              m_aUnProtectSTR;            // for record changes
+    CheckBox*           m_pOpenReadonlyCB;
+    CheckBox*           m_pRecordChangesCB;         // for record changes
+    PushButton*         m_pProtectPB;               // for record changes
+    PushButton*         m_pUnProtectPB;             // for record changes
     RedliningMode       m_eRedlingMode;             // for record changes
 
     bool                m_bOrigPasswordIsConfirmed;
@@ -176,65 +162,24 @@ struct SfxSecurityPage_Impl
 
 SfxSecurityPage_Impl::SfxSecurityPage_Impl( SfxSecurityPage &rTabPage, const SfxItemSet & ) :
     m_rMyTabPage                    (rTabPage),
-    m_aNewPasswordToOpenFL          (&rTabPage, SfxResId( PASSWORD_TO_OPEN_FL ) ),
-    m_aNewPasswordToOpenFT          (&rTabPage, SfxResId( PASSWORD_TO_OPEN_FT ) ),
-    m_aNewPasswordToOpenED          (&rTabPage, SfxResId( PASSWORD_TO_OPEN_ED ) ),
-    m_aConfirmPasswordToOpenFT      (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_OPEN_FT ) ),
-    m_aConfirmPasswordToOpenED      (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_OPEN_ED ) ),
-    m_aNewPasswordInfoFT            (&rTabPage, SfxResId( PASSWORD_INFO_FT ) ),
-    m_aNewPasswordToModifyFL        (&rTabPage, SfxResId( PASSWORD_TO_MODIFY_FL ) ),
-    m_aNewPasswordToModifyFT        (&rTabPage, SfxResId( PASSWORD_TO_MODIFY_FT ) ),
-    m_aNewPasswordToModifyED        (&rTabPage, SfxResId( PASSWORD_TO_MODIFY_ED ) ),
-    m_aConfirmPasswordToModifyFT    (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_MODIFY_FT ) ),
-    m_aConfirmPasswordToModifyED    (&rTabPage, SfxResId( CONFIRM_PASSWORD_TO_MODIFY_ED ) ),
-    m_aOptionsFL                    (&rTabPage, SfxResId( OPTIONS_FL ) ),
-    m_aOpenReadonlyCB               (&rTabPage, SfxResId( OPEN_READONLY_CB ) ),
-    m_aRecordChangesCB              (&rTabPage, SfxResId( RECORD_CHANGES_CB ) ),
-    m_aChangeProtectionPB           (&rTabPage, SfxResId( CHANGE_PROTECTION_PB ) ),
-    m_aProtectSTR                   ( SfxResId( STR_PROTECT ).toString() ),
-    m_aUnProtectSTR                 ( SfxResId( STR_UNPROTECT ).toString() ),
     m_eRedlingMode                  ( RL_NONE ),
     m_bOrigPasswordIsConfirmed      ( false ),
     m_bNewPasswordIsValid           ( false ),
-    m_aEndRedliningWarning          ( SfxResId( STR_END_REDLINING_WARNING ).toString() ),
+    m_aEndRedliningWarning          ( SFX2_RESSTR(RID_SVXSTR_END_REDLINING_WARNING) ),
     m_bEndRedliningWarningDone      ( false )
 {
-    m_aChangeProtectionPB.SetText( m_aProtectSTR );
+    rTabPage.get(m_pOpenReadonlyCB, "readonly");
+    rTabPage.get(m_pRecordChangesCB, "recordchanges");
+    rTabPage.get(m_pProtectPB, "protect");
+    rTabPage.get(m_pUnProtectPB, "unprotect");
+    m_pProtectPB->Show();
+    m_pUnProtectPB->Hide();
 
     // force toggle hdl called before visual change of checkbox
-    m_aRecordChangesCB.SetStyle( m_aRecordChangesCB.GetStyle() | WB_EARLYTOGGLE );
-    m_aRecordChangesCB.SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
-    m_aChangeProtectionPB.SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
-
-
-    // #i112277: for the time being (OOO 3.3) the following options should not
-    // be available. In the long run however it is planned to implement the yet
-    // missing functionality. Thus now we hide them and move the remaining ones up.
-    m_aNewPasswordToOpenFL.Hide();
-    m_aNewPasswordToOpenFT.Hide();
-    m_aNewPasswordToOpenED.Hide();
-    m_aConfirmPasswordToOpenFT.Hide();
-    m_aConfirmPasswordToOpenED.Hide();
-    m_aNewPasswordInfoFT.Hide();
-    m_aNewPasswordToModifyFL.Hide();
-    m_aNewPasswordToModifyFT.Hide();
-    m_aNewPasswordToModifyED.Hide();
-    m_aConfirmPasswordToModifyFT.Hide();
-    m_aConfirmPasswordToModifyED.Hide();
-    const long nDelta = m_aOptionsFL.GetPosPixel().Y() - m_aNewPasswordToOpenFL.GetPosPixel().Y();
-    Point aPos;
-    aPos = m_aOptionsFL.GetPosPixel();
-    aPos.Y() -= nDelta;
-    m_aOptionsFL.SetPosPixel( aPos );
-    aPos = m_aOpenReadonlyCB.GetPosPixel();
-    aPos.Y() -= nDelta;
-    m_aOpenReadonlyCB.SetPosPixel( aPos );
-    aPos = m_aRecordChangesCB.GetPosPixel();
-    aPos.Y() -= nDelta;
-    m_aRecordChangesCB.SetPosPixel( aPos );
-    aPos = m_aChangeProtectionPB.GetPosPixel();
-    aPos.Y() -= nDelta;
-    m_aChangeProtectionPB.SetPosPixel( aPos );
+    m_pRecordChangesCB->SetStyle( m_pRecordChangesCB->GetStyle() | WB_EARLYTOGGLE );
+    m_pRecordChangesCB->SetToggleHdl( LINK( this, SfxSecurityPage_Impl, RecordChangesCBToggleHdl ) );
+    m_pProtectPB->SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
+    m_pUnProtectPB->SetClickHdl( LINK( this, SfxSecurityPage_Impl, ChangeProtectionPBHdl ) );
 }
 
 
@@ -252,8 +197,8 @@ sal_Bool SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
     {
         if (m_eRedlingMode != RL_NONE )
         {
-            const bool bDoRecordChanges     = m_aRecordChangesCB.IsChecked();
-            const bool bDoChangeProtection  = m_aChangeProtectionPB.GetText() != m_aProtectSTR;
+            const bool bDoRecordChanges     = m_pRecordChangesCB->IsChecked();
+            const bool bDoChangeProtection  = m_pUnProtectPB->IsVisible();
 
             // sanity checks
             DBG_ASSERT( bDoRecordChanges || !bDoChangeProtection, "no change recording should imply no change protection" );
@@ -280,7 +225,7 @@ sal_Bool SfxSecurityPage_Impl::FillItemSet_Impl( SfxItemSet & )
         }
 
         // open read-only?
-        const sal_Bool bDoOpenReadonly = m_aOpenReadonlyCB.IsChecked();
+        const sal_Bool bDoOpenReadonly = m_pOpenReadonlyCB->IsChecked();
         if (pCurDocShell->HasSecurityOptOpenReadOnly() &&
             bDoOpenReadonly != pCurDocShell->IsSecurityOptOpenReadOnly())
         {
@@ -297,17 +242,20 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
 {
     SfxObjectShell* pCurDocShell = SfxObjectShell::Current();
 
-    String sNewText = m_aProtectSTR;
     if (!pCurDocShell)
     {
         // no doc -> hide document settings
-        m_aOpenReadonlyCB.Disable();
-        m_aRecordChangesCB.Disable();
-        m_aChangeProtectionPB.Disable();
+        m_pOpenReadonlyCB->Disable();
+        m_pRecordChangesCB->Disable();
+        m_pProtectPB->Show();
+        m_pProtectPB->Disable();
+        m_pUnProtectPB->Hide();
+        m_pUnProtectPB->Disable();
     }
     else
     {
         bool bIsHTMLDoc = false;
+        bool bProtect = true, bUnProtect = false;
         SfxViewShell* pViewSh = SfxViewShell::Current();
         if (pViewSh)
         {
@@ -323,11 +271,11 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
         sal_Bool bIsReadonly = pCurDocShell->IsReadOnly();
         if (pCurDocShell->HasSecurityOptOpenReadOnly() && !bIsHTMLDoc)
         {
-            m_aOpenReadonlyCB.Check( pCurDocShell->IsSecurityOptOpenReadOnly() );
-            m_aOpenReadonlyCB.Enable( !bIsReadonly );
+            m_pOpenReadonlyCB->Check( pCurDocShell->IsSecurityOptOpenReadOnly() );
+            m_pOpenReadonlyCB->Enable( !bIsReadonly );
         }
         else
-            m_aOpenReadonlyCB.Disable();
+            m_pOpenReadonlyCB->Disable();
 
         bool bRecordChanges;
         if (QueryRecordChangesState( RL_WRITER, bRecordChanges ) && !bIsHTMLDoc)
@@ -342,13 +290,17 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
             bool bProtection;
             QueryRecordChangesProtectionState( m_eRedlingMode, bProtection );
 
-            m_aChangeProtectionPB.Enable( !bIsReadonly );
+            m_pProtectPB->Enable( !bIsReadonly );
+            m_pUnProtectPB->Enable( !bIsReadonly );
             // set the right text
             if (bProtection)
-                sNewText = m_aUnProtectSTR;
+            {
+                bProtect = false;
+                bUnProtect = true;
+            }
 
-            m_aRecordChangesCB.Check( bRecordChanges );
-            m_aRecordChangesCB.Enable( /*!bProtection && */!bIsReadonly );
+            m_pRecordChangesCB->Check( bRecordChanges );
+            m_pRecordChangesCB->Enable( /*!bProtection && */!bIsReadonly );
 
             m_bOrigPasswordIsConfirmed = true;   // default case if no password is set
             uno::Sequence< sal_Int8 > aPasswordHash;
@@ -362,21 +314,24 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & )
             // A Calc document that is shared will have 'm_eRedlingMode == RL_NONE'
             // In shared documents change recording and protection must be disabled,
             // similar to documents that do not support change recording at all.
-            m_aRecordChangesCB.Check( sal_False );
-            m_aRecordChangesCB.Disable();
-            m_aChangeProtectionPB.Check( sal_False );
-            m_aChangeProtectionPB.Disable();
+            m_pRecordChangesCB->Check( sal_False );
+            m_pRecordChangesCB->Disable();
+            m_pProtectPB->Check( sal_False );
+            m_pUnProtectPB->Check( sal_False );
+            m_pProtectPB->Disable();
+            m_pUnProtectPB->Disable();
         }
-    }
 
-    m_aChangeProtectionPB.SetText( sNewText );
+        m_pProtectPB->Show(bProtect);
+        m_pUnProtectPB->Show(bUnProtect);
+    }
 }
 
 
 IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
 {
     // when change recording gets disabled protection must be disabled as well
-    if (!m_aRecordChangesCB.IsChecked())    // the new check state is already present, thus the '!'
+    if (!m_pRecordChangesCB->IsChecked())    // the new check state is already present, thus the '!'
     {
         bool bAlreadyDone = false;
         if (!m_bEndRedliningWarningDone)
@@ -390,7 +345,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
         }
 
         const bool bNeedPasssword = !m_bOrigPasswordIsConfirmed
-                && m_aChangeProtectionPB.GetText() != m_aProtectSTR;
+                && m_pProtectPB->IsVisible();
         if (!bAlreadyDone && bNeedPasssword)
         {
             String aPasswordText;
@@ -407,15 +362,15 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, RecordChangesCBToggleHdl)
         }
 
         if (bAlreadyDone)
-            m_aRecordChangesCB.Check( true );     // restore original state
+            m_pRecordChangesCB->Check( true );     // restore original state
         else
         {
             // remember required values to change protection and change recording in
             // FillItemSet_Impl later on if password was correct.
             m_bNewPasswordIsValid = true;
             m_aNewPassword = String();
-
-            m_aChangeProtectionPB.SetText( m_aProtectSTR );
+            m_pProtectPB->Show();
+            m_pUnProtectPB->Hide();
         }
     }
 
@@ -429,7 +384,7 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl)
         return 0;
 
     // the push button text is always the opposite of the current state. Thus:
-    const bool bCurrentProtection = m_aChangeProtectionPB.GetText() != m_aProtectSTR;
+    const bool bCurrentProtection = m_pUnProtectPB->IsVisible();
 
     // ask user for password (if still necessary)
     String aPasswordText;
@@ -457,9 +412,10 @@ IMPL_LINK_NOARG(SfxSecurityPage_Impl, ChangeProtectionPBHdl)
     m_bNewPasswordIsValid = true;
     m_aNewPassword = bNewProtection? aPasswordText : String();
 
-    m_aRecordChangesCB.Check( bNewProtection );
-    // toggle text of button "Protect" <-> "Unprotect"
-    m_aChangeProtectionPB.SetText( bNewProtection ? m_aUnProtectSTR : m_aProtectSTR );
+    m_pRecordChangesCB->Check( bNewProtection );
+
+    m_pUnProtectPB->Show(bNewProtection);
+    m_pProtectPB->Show(!bNewProtection);
 
     return 0;
 }
@@ -471,12 +427,10 @@ SfxTabPage* SfxSecurityPage::Create( Window * pParent, const SfxItemSet & rItemS
 }
 
 
-SfxSecurityPage::SfxSecurityPage( Window* pParent, const SfxItemSet& rItemSet ) :
-    SfxTabPage( pParent, SfxResId( TP_DOCINFOSECURITY ), rItemSet )
+SfxSecurityPage::SfxSecurityPage( Window* pParent, const SfxItemSet& rItemSet )
+    : SfxTabPage(pParent, "SecurityInfoPage", "sfx/ui/securityinfopage.ui", rItemSet)
 {
     m_pImpl = std::auto_ptr< SfxSecurityPage_Impl >(new SfxSecurityPage_Impl( *this, rItemSet ));
-
-    FreeResource();
 }
 
 
diff --git a/sfx2/source/dialog/securitypage.hrc b/sfx2/source/dialog/securitypage.hrc
deleted file mode 100644
index 6b41f8e..0000000
--- a/sfx2/source/dialog/securitypage.hrc
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 regarding copyright
- *   ownership. The ASF licenses this file 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 .
- */
-#ifndef _SECURITYPAGE_HRC_
-#define _SECURITYPAGE_HRC_
-
-
-#define PASSWORD_TO_OPEN_FL                 1
-#define PASSWORD_TO_OPEN_FT                 2
-#define PASSWORD_TO_OPEN_ED                 3
-#define CONFIRM_PASSWORD_TO_OPEN_FT         4
-#define CONFIRM_PASSWORD_TO_OPEN_ED         5
-#define PASSWORD_INFO_FT                    6
-#define PASSWORD_TO_MODIFY_FL               7
-#define PASSWORD_TO_MODIFY_FT               8
-#define PASSWORD_TO_MODIFY_ED               9
-#define CONFIRM_PASSWORD_TO_MODIFY_FT       10
-#define CONFIRM_PASSWORD_TO_MODIFY_ED       11
-#define OPTIONS_FL                          12
-#define OPEN_READONLY_CB                    13
-#define RECORD_CHANGES_CB                   14
-#define CHANGE_PROTECTION_PB                15
-
-#define STR_PROTECT                         101
-#define STR_UNPROTECT                       102
-#define STR_END_REDLINING_WARNING           103
-
-#endif
-
diff --git a/sfx2/source/dialog/securitypage.src b/sfx2/source/dialog/securitypage.src
deleted file mode 100644
index 75463f1..0000000
--- a/sfx2/source/dialog/securitypage.src
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * This file is part of the LibreOffice project.
- *
- * This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- *
- * This file incorporates work covered by the following license notice:
- *
- *   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 regarding copyright
- *   ownership. The ASF licenses this file 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 .
- */
-
-#include "sfx2/sfx.hrc"
-#include "sfx2/tabpage.hrc"
-#include "securitypage.hrc"
-#include "helpid.hrc"
-#include "dialog.hrc"
-#include "sfxlocal.hrc"
-
-#include <svtools/controldims.hrc>
-
-
-TabPage TP_DOCINFOSECURITY
-{
-    HelpId = HID_DOCINFOSECURITY ;
-    Hide = TRUE ;
-    Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
-
-    FixedLine PASSWORD_TO_OPEN_FL
-    {
-        Pos = MAP_APPFONT( 6, 6 );
-        Size = MAP_APPFONT( 248, RSC_CD_FIXEDLINE_HEIGHT );
-        Text [ en-US ] = "File encryption password";
-    };
-    FixedText PASSWORD_TO_OPEN_FT
-    {
-        Pos = MAP_APPFONT( 12, 20 );
-        Size = MAP_APPFONT( 82, RSC_CD_FIXEDTEXT_HEIGHT );
-        Text [ en-US ] = "~Enter password to open";
-    };
-    Edit PASSWORD_TO_OPEN_ED
-    {
-        HelpId = HID_SECURITYTAB_PASSWORD_TO_OPEN;
-        Pos = MAP_APPFONT( 100, 18 );
-        Size = MAP_APPFONT( 88, RSC_CD_TEXTBOX_HEIGHT );
-        Border = TRUE;
-        PassWord = TRUE;
-    };
-    FixedText CONFIRM_PASSWORD_TO_OPEN_FT
-    {
-        Pos = MAP_APPFONT( 12, 34 );
-        Size = MAP_APPFONT( 82, RSC_CD_FIXEDTEXT_HEIGHT );
-        Text [ en-US ] = "~Reenter password to open";
-    };
-    Edit CONFIRM_PASSWORD_TO_OPEN_ED
-    {
-        HelpId = HID_SECURITYTAB_CONFIRM_PASSWORD_TO_OPEN;
-        Pos = MAP_APPFONT( 100, 32 );
-        Size = MAP_APPFONT( 88, RSC_CD_TEXTBOX_HEIGHT );
-        Border = TRUE;
-        PassWord = TRUE;
-    };
-    FixedText PASSWORD_INFO_FT
-    {
-        Pos = MAP_APPFONT( 12, 48 );
-        Size = MAP_APPFONT( 236, 3 * RSC_CD_FIXEDTEXT_HEIGHT );
-        Text [ en-US ] =
-                "Note: After a password has been set, the document will only open "\
-                "with the password. Should you lose the password, there will be "\
-                "no way to recover the document. Please also note that this password "\
-                "is case-sensitive.";
-        WordBreak = TRUE;
-    };
-    FixedLine PASSWORD_TO_MODIFY_FL
-    {
-        Pos = MAP_APPFONT( 6, 78 );
-        Size = MAP_APPFONT( 248, RSC_CD_FIXEDLINE_HEIGHT );
-        Text [ en-US ] = "File sharing password";
-    };
-    FixedText PASSWORD_TO_MODIFY_FT
-    {
-        Pos = MAP_APPFONT( 12, 92 );
-        Size = MAP_APPFONT( 82, RSC_CD_FIXEDTEXT_HEIGHT );
-        Text [ en-US ] = "Enter password to modify";
-    };
-    Edit PASSWORD_TO_MODIFY_ED
-    {
-        HelpId = HID_SECURITYTAB_PASSWORD_TO_MODIFY;
-        Pos = MAP_APPFONT( 100, 90 );
-        Size = MAP_APPFONT( 88, RSC_CD_TEXTBOX_HEIGHT );
-        Border = TRUE;
-        PassWord = TRUE;
-    };
-    FixedText CONFIRM_PASSWORD_TO_MODIFY_FT
-    {
-        Pos = MAP_APPFONT( 12, 106 );
-        Size = MAP_APPFONT( 82, RSC_CD_FIXEDTEXT_HEIGHT );
-        Text [ en-US ] = "Reenter password to modify";
-    };
-    Edit CONFIRM_PASSWORD_TO_MODIFY_ED
-    {
-        HelpId = HID_SECURITYTAB_CONFIRM_PASSWORD_TO_MODIFY;
-        Pos = MAP_APPFONT( 100, 104 );
-        Size = MAP_APPFONT( 88, RSC_CD_TEXTBOX_HEIGHT );
-        Border = TRUE;
-        PassWord = TRUE;
-    };
-    FixedLine OPTIONS_FL
-    {
-        Pos = MAP_APPFONT( 6, 120 );
-        Size = MAP_APPFONT( 248, RSC_CD_FIXEDLINE_HEIGHT );
-        Text [ en-US ] = "File sharing options";
-    };
-    CheckBox OPEN_READONLY_CB
-    {
-        HelpId = HID_SECURITYTAB_OPEN_FILE_READONLY;
-        Pos = MAP_APPFONT( 12, 133 );
-        Size = MAP_APPFONT( 176, RSC_CD_CHECKBOX_HEIGHT );
-        Text [ en-US ] = "~Open file read-only";
-    };
-    CheckBox RECORD_CHANGES_CB
-    {
-        HelpId = HID_SECURITYTAB_RECORD_CHANGES;
-        Pos = MAP_APPFONT( 12, 147 );
-        Size = MAP_APPFONT( 176, RSC_CD_CHECKBOX_HEIGHT );
-        Text [ en-US ] = "Record ~changes";
-    };
-    PushButton CHANGE_PROTECTION_PB
-    {
-        HelpId = HID_SECURITYTAB_PROTECTION;
-        Pos = MAP_APPFONT( 194, 145 );
-        Size = MAP_APPFONT( 60, RSC_CD_PUSHBUTTON_HEIGHT );
-    };
-    String STR_PROTECT
-    {
-        Text [ en-US ] = "~Protect...";
-    };
-    String STR_UNPROTECT
-    {
-        Text [ en-US ] = "~Unprotect...";
-    };
-    String STR_END_REDLINING_WARNING
-    {
-        Text [ en-US ] = "This action will exit the change recording mode.\nAny information about changes will be lost.\n\nExit change recording mode?\n\n" ;
-    };
-};
-
-String RID_SFX_INCORRECT_PASSWORD
-{
-    Text [ en-US ] = "Incorrect password" ;
-};
-
diff --git a/sfx2/source/inc/helpid.hrc b/sfx2/source/inc/helpid.hrc
index 22b3a27..dc9893a 100644
--- a/sfx2/source/inc/helpid.hrc
+++ b/sfx2/source/inc/helpid.hrc
@@ -155,7 +155,6 @@
 
 #define HID_TASKPANE_WINDOW                                     "SFX2_HID_TASKPANE_WINDOW"
 #define HID_TASKPANE_VIEW_MENU                                  "SFX2_HID_TASKPANE_VIEW_MENU"
-#define HID_DOCINFOSECURITY                                     "SFX2_HID_DOCINFOSECURITY"
 
 #endif // #ifndef _SFX_HELPID_HRC
 
diff --git a/sfx2/uiconfig/ui/documentproperties.ui b/sfx2/uiconfig/ui/documentproperties.ui
index 2805a0c..9c7bec4 100644
--- a/sfx2/uiconfig/ui/documentproperties.ui
+++ b/sfx2/uiconfig/ui/documentproperties.ui
@@ -470,102 +470,7 @@
               </packing>
             </child>
             <child>
-              <object class="GtkFrame" id="frame1">
-                <property name="visible">True</property>
-                <property name="can_focus">False</property>
-                <property name="label_xalign">0</property>
-                <property name="shadow_type">none</property>
-                <child>
-                  <object class="GtkAlignment" id="alignment1">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="valign">start</property>
-                    <property name="left_padding">12</property>
-                    <child>
-                      <object class="GtkGrid" id="grid9">
-                        <property name="visible">True</property>
-                        <property name="can_focus">False</property>
-                        <property name="valign">end</property>
-                        <property name="row_spacing">13</property>
-                        <property name="column_spacing">6</property>
-                        <child>
-                          <object class="GtkCheckButton" id="checkbutton2">
-                            <property name="label" translatable="yes">Open file readonly-</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="halign">start</property>
-                            <property name="valign">end</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="xalign">0</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">0</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkCheckButton" id="checkbutton3">
-                            <property name="label" translatable="yes">Record changes </property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">False</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="xalign">0</property>
-                            <property name="draw_indicator">True</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">0</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <object class="GtkButton" id="button9">
-                            <property name="label" translatable="yes">Protect</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="width_request">0</property>
-                            <property name="visible">True</property>
-                            <property name="can_focus">True</property>
-                            <property name="receives_default">True</property>
-                            <property name="halign">end</property>
-                            <property name="use_action_appearance">False</property>
-                            <property name="relief">half</property>
-                          </object>
-                          <packing>
-                            <property name="left_attach">1</property>
-                            <property name="top_attach">1</property>
-                            <property name="width">1</property>
-                            <property name="height">1</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <placeholder/>
-                        </child>
-                      </object>
-                    </child>
-                  </object>
-                </child>
-                <child type="label">
-                  <object class="GtkLabel" id="label47">
-                    <property name="visible">True</property>
-                    <property name="can_focus">False</property>
-                    <property name="label" translatable="yes">File sharing options</property>
-                    <attributes>
-                      <attribute name="weight" value="bold"/>
-                    </attributes>
-                  </object>
-                </child>
-              </object>
-              <packing>
-                <property name="position">4</property>
-              </packing>
+              <placeholder/>
             </child>
             <child type="tab">
               <object class="GtkLabel" id="label46">
diff --git a/sfx2/uiconfig/ui/securityinfopage.ui b/sfx2/uiconfig/ui/securityinfopage.ui
new file mode 100644
index 0000000..bb292b2
--- /dev/null
+++ b/sfx2/uiconfig/ui/securityinfopage.ui
@@ -0,0 +1,133 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+  <!-- interface-requires gtk+ 3.0 -->
+  <object class="GtkFrame" id="SecurityInfoPage">
+    <property name="visible">True</property>
+    <property name="can_focus">False</property>
+    <property name="hexpand">True</property>
+    <property name="vexpand">True</property>
+    <property name="label_xalign">0</property>
+    <property name="shadow_type">none</property>
+    <child>
+      <object class="GtkAlignment" id="alignment1">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="valign">start</property>
+        <property name="hexpand">True</property>
+        <property name="vexpand">True</property>
+        <property name="top_padding">6</property>
+        <property name="left_padding">12</property>
+        <child>
+          <object class="GtkGrid" id="grid9">
+            <property name="visible">True</property>
+            <property name="can_focus">False</property>
+            <property name="valign">end</property>
+            <property name="hexpand">True</property>
+            <property name="row_spacing">12</property>
+            <property name="column_spacing">6</property>
+            <child>
+              <object class="GtkCheckButton" id="readonly">
+                <property name="label" translatable="yes">_Open file read-only</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="halign">start</property>
+                <property name="valign">end</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">0</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkCheckButton" id="recordchanges">
+                <property name="label" translatable="yes">Record _changes</property>
+                <property name="use_action_appearance">False</property>
+                <property name="visible">True</property>
+                <property name="can_focus">True</property>
+                <property name="receives_default">False</property>
+                <property name="use_action_appearance">False</property>
+                <property name="use_underline">True</property>
+                <property name="xalign">0</property>
+                <property name="draw_indicator">True</property>
+              </object>
+              <packing>
+                <property name="left_attach">0</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <object class="GtkBox" id="box2">
+                <property name="visible">True</property>
+                <property name="can_focus">False</property>
+                <property name="hexpand">True</property>
+                <property name="orientation">vertical</property>
+                <child>
+                  <object class="GtkButton" id="protect">
+                    <property name="label" translatable="yes">Protect...</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="halign">end</property>
+                    <property name="use_action_appearance">False</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">0</property>
+                  </packing>
+                </child>
+                <child>
+                  <object class="GtkButton" id="unprotect">
+                    <property name="label" translatable="yes">_Unprotect...</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="visible">True</property>
+                    <property name="can_focus">True</property>
+                    <property name="receives_default">True</property>
+                    <property name="halign">end</property>
+                    <property name="use_action_appearance">False</property>
+                    <property name="use_underline">True</property>
+                  </object>
+                  <packing>
+                    <property name="expand">False</property>
+                    <property name="fill">True</property>
+                    <property name="position">1</property>
+                  </packing>
+                </child>
+              </object>
+              <packing>
+                <property name="left_attach">1</property>
+                <property name="top_attach">1</property>
+                <property name="width">1</property>
+                <property name="height">1</property>
+              </packing>
+            </child>
+            <child>
+              <placeholder/>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+    <child type="label">
+      <object class="GtkLabel" id="label47">
+        <property name="visible">True</property>
+        <property name="can_focus">False</property>
+        <property name="label" translatable="yes">File sharing options</property>
+        <attributes>
+          <attribute name="weight" value="bold"/>
+        </attributes>
+      </object>
+    </child>
+  </object>
+</interface>
diff --git a/sfx2/util/hidother.src b/sfx2/util/hidother.src
index e8cc0fb..d3151d9 100644
--- a/sfx2/util/hidother.src
+++ b/sfx2/util/hidother.src
@@ -94,6 +94,5 @@ hidspecial HID_DID_SAVE_PACKED_XML              { HelpID = HID_DID_SAVE_PACKED_X
 hidspecial HID_HELP_ONHELP                      { HelpID = HID_HELP_ONHELP; };
 hidspecial HID_HELP_TEXT_SELECTION_MODE         { HelpID = HID_HELP_TEXT_SELECTION_MODE; };
 hidspecial HID_DLG_CHECKFORONLINEUPDATE         { HelpID = HID_DLG_CHECKFORONLINEUPDATE; };
-hidspecial HID_DOCINFOSECURITY                  { HelpID = HID_DOCINFOSECURITY; };
 hidspecial HID_TASKPANE_VIEW_MENU               { HelpID = HID_TASKPANE_VIEW_MENU; };
 


More information about the Libreoffice-commits mailing list