summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2013-02-15 09:41:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-02-15 10:38:58 +0000
commit27b041318f7b1c3fcd890d2935c35237e993bbe1 (patch)
tree38046e1e481c3793e09d1fe7da64dc7c389c4f08 /cui/source
parent0a410065389b21d77f4360d3249021ee61777e10 (diff)
fully convert security options to .ui format
Change-Id: I119b38f96ebdd6af19b9dce926a684398b4f72f8
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/options/securityoptions.cxx46
-rw-r--r--cui/source/options/securityoptions.hrc71
-rw-r--r--cui/source/options/securityoptions.hxx35
-rw-r--r--cui/source/options/securityoptions.src160
4 files changed, 35 insertions, 277 deletions
diff --git a/cui/source/options/securityoptions.cxx b/cui/source/options/securityoptions.cxx
index d0196d3219aa..e95bb196b940 100644
--- a/cui/source/options/securityoptions.cxx
+++ b/cui/source/options/securityoptions.cxx
@@ -22,7 +22,6 @@
#include <dialmgr.hxx>
#include <cuires.hrc>
#include "securityoptions.hxx"
-#include "securityoptions.hrc"
namespace
{
@@ -45,32 +44,29 @@ namespace svx
SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions* pOptions)
: ModalDialog(pParent, "SecurityOptionsDialog", "cui/ui/securityoptionsdialog.ui")
-
- ,m_aSaveOrSendDocsFI( this, CUI_RES( FI_SAVESENDDOCS ) )
- ,m_aSaveOrSendDocsCB( this, CUI_RES( CB_SAVESENDDOCS ) )
- ,m_aSignDocsFI ( this, CUI_RES( FI_SIGNDOCS ) )
- ,m_aSignDocsCB ( this, CUI_RES( CB_SIGNDOCS ) )
- ,m_aPrintDocsFI ( this, CUI_RES( FI_PRINTDOCS ) )
- ,m_aPrintDocsCB ( this, CUI_RES( CB_PRINTDOCS ) )
- ,m_aCreatePdfFI ( this, CUI_RES( FI_CREATEPDF ) )
- ,m_aCreatePdfCB ( this, CUI_RES( CB_CREATEPDF ) )
- ,m_aRemovePersInfoFI( this, CUI_RES( FI_REMOVEINFO ) )
- ,m_aRemovePersInfoCB( this, CUI_RES( CB_REMOVEINFO ) )
- ,m_aRecommPasswdFI ( this, CUI_RES( FI_RECOMMENDPWD ) )
- ,m_aRecommPasswdCB ( this, CUI_RES( CB_RECOMMENDPWD ) )
- ,m_aCtrlHyperlinkFI ( this, CUI_RES( FI_CTRLHYPERLINK ) )
- ,m_aCtrlHyperlinkCB ( this, CUI_RES( CB_CTRLHYPERLINK ) )
-
{
-
DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
- enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, m_aSaveOrSendDocsCB, m_aSaveOrSendDocsFI );
- enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, m_aSignDocsCB, m_aSignDocsFI );
- enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_PRINT, m_aPrintDocsCB, m_aPrintDocsFI );
- enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, m_aCreatePdfCB, m_aCreatePdfFI );
- enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, m_aRemovePersInfoCB, m_aRemovePersInfoFI );
- enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, m_aRecommPasswdCB, m_aRecommPasswdFI );
- enableAndSet( *pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, m_aCtrlHyperlinkCB, m_aCtrlHyperlinkFI );
+ get(m_pSaveOrSendDocsCB, "savesenddocs");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, *m_pSaveOrSendDocsCB,
+ *get<FixedImage>("locksavesenddocs"));
+ get(m_pSignDocsCB, "whensigning");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, *m_pSignDocsCB,
+ *get<FixedImage>("lockwhensigning"));
+ get(m_pPrintDocsCB, "whenprinting");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_PRINT, *m_pPrintDocsCB,
+ *get<FixedImage>("lockwhenprinting"));
+ get(m_pCreatePdfCB, "whenpdf");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, *m_pCreatePdfCB,
+ *get<FixedImage>("lockwhenpdf"));
+ get(m_pRemovePersInfoCB, "removepersonal");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, *m_pRemovePersInfoCB,
+ *get<FixedImage>("lockremovepersonal"));
+ get(m_pRecommPasswdCB, "password");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, *m_pRecommPasswdCB,
+ *get<FixedImage>("lockpassword"));
+ get(m_pCtrlHyperlinkCB, "ctrlclick");
+ enableAndSet(*pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, *m_pCtrlHyperlinkCB,
+ *get<FixedImage>("lockctrlclick"));
}
SecurityOptionsDialog::~SecurityOptionsDialog()
diff --git a/cui/source/options/securityoptions.hrc b/cui/source/options/securityoptions.hrc
deleted file mode 100644
index 1c8611414036..000000000000
--- a/cui/source/options/securityoptions.hrc
+++ /dev/null
@@ -1,71 +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 _SVX_SECURITYOPTIONS_HRC
-#define _SVX_SECURITYOPTIONS_HRC
-
-#define FL_WARNINGS 10
-#define FI_WARNINGS 11
-#define FI_SAVESENDDOCS 12
-#define CB_SAVESENDDOCS 13
-#define FI_SIGNDOCS 14
-#define CB_SIGNDOCS 15
-#define FI_PRINTDOCS 16
-#define CB_PRINTDOCS 17
-#define FI_CREATEPDF 18
-#define CB_CREATEPDF 19
-#define FL_OPTIONS 20
-#define FI_REMOVEINFO 21
-#define CB_REMOVEINFO 22
-#define FI_RECOMMENDPWD 23
-#define CB_RECOMMENDPWD 24
-#define FI_CTRLHYPERLINK 25
-#define CB_CTRLHYPERLINK 26
-#define FL_BUTTONS 27
-#define PB_OK 28
-#define PB_CANCEL 29
-#define PB_HELP 30
-
-#define DLG_WIDTH 260
-
-#define COL_0 (RSC_SP_DLG_INNERBORDER_LEFT)
-#define COL_1 (COL_0+RSC_SP_FLGR_SPACE_X)
-#define COL_2 (COL_1+RSC_SP_CHK_TEXTINDENT)
-#define COL_4 (DLG_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT)
-#define COL_3 (COL_4-RSC_SP_FLGR_SPACE_X)
-
-#define COL_C (COL_4-RSC_CD_PUSHBUTTON_WIDTH)
-#define COL_B (COL_C-RSC_SP_CTRL_X-RSC_CD_PUSHBUTTON_WIDTH)
-#define COL_A (COL_B-RSC_SP_CTRL_GROUP_X-RSC_CD_PUSHBUTTON_WIDTH)
-
-#define CHECKBOX_WIDTH ((COL_3-COL_2-RSC_SP_CTRL_X)/2)
-
-#define ROW_0 (RSC_SP_DLG_INNERBORDER_TOP)
-#define ROW_1 (ROW_0+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_2 (ROW_1+2*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_3 (ROW_2+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_4 (ROW_3+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_5 (ROW_4+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_6 (ROW_5+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_7 (ROW_6+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_8 (ROW_7+RSC_CD_CHECKBOX_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_9 (ROW_8+RSC_CD_FIXEDLINE_HEIGHT+RSC_SP_FLGR_SPACE_Y)
-#define ROW_10 (ROW_9+RSC_CD_PUSHBUTTON_HEIGHT+RSC_SP_DLG_INNERBORDER_BOTTOM)
-
-#endif // #ifndef _SVX_SECURITYOPTIONS_HRC
-
diff --git a/cui/source/options/securityoptions.hxx b/cui/source/options/securityoptions.hxx
index dc9cd0611df8..2b49d20d38b8 100644
--- a/cui/source/options/securityoptions.hxx
+++ b/cui/source/options/securityoptions.hxx
@@ -38,34 +38,27 @@ namespace svx
class SecurityOptionsDialog : public ModalDialog
{
private:
- ReadOnlyImage m_aSaveOrSendDocsFI;
- CheckBox m_aSaveOrSendDocsCB;
- ReadOnlyImage m_aSignDocsFI;
- CheckBox m_aSignDocsCB;
- ReadOnlyImage m_aPrintDocsFI;
- CheckBox m_aPrintDocsCB;
- ReadOnlyImage m_aCreatePdfFI;
- CheckBox m_aCreatePdfCB;
+ CheckBox* m_pSaveOrSendDocsCB;
+ CheckBox* m_pSignDocsCB;
+ CheckBox* m_pPrintDocsCB;
+ CheckBox* m_pCreatePdfCB;
- ReadOnlyImage m_aRemovePersInfoFI;
- CheckBox m_aRemovePersInfoCB;
- ReadOnlyImage m_aRecommPasswdFI;
- CheckBox m_aRecommPasswdCB;
- ReadOnlyImage m_aCtrlHyperlinkFI;
- CheckBox m_aCtrlHyperlinkCB;
+ CheckBox* m_pRemovePersInfoCB;
+ CheckBox* m_pRecommPasswdCB;
+ CheckBox* m_pCtrlHyperlinkCB;
public:
SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions );
~SecurityOptionsDialog();
- inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != sal_False; }
- inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != sal_False; }
- inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != sal_False; }
- inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != sal_False; }
- inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != sal_False; }
- inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != sal_False; }
- inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != sal_False; }
+ bool IsSaveOrSendDocsChecked() const { return m_pSaveOrSendDocsCB->IsChecked() != sal_False; }
+ bool IsSignDocsChecked() const { return m_pSignDocsCB->IsChecked() != sal_False; }
+ bool IsPrintDocsChecked() const { return m_pPrintDocsCB->IsChecked() != sal_False; }
+ bool IsCreatePdfChecked() const { return m_pCreatePdfCB->IsChecked() != sal_False; }
+ bool IsRemovePersInfoChecked() const { return m_pRemovePersInfoCB->IsChecked() != sal_False; }
+ bool IsRecommPasswdChecked() const { return m_pRecommPasswdCB->IsChecked() != sal_False; }
+ bool IsCtrlHyperlinkChecked() const { return m_pCtrlHyperlinkCB->IsChecked() != sal_False; }
};
//........................................................................
diff --git a/cui/source/options/securityoptions.src b/cui/source/options/securityoptions.src
deleted file mode 100644
index 956f0934e2c0..000000000000
--- a/cui/source/options/securityoptions.src
+++ /dev/null
@@ -1,160 +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 <svtools/controldims.hrc>
-#include "securityoptions.hrc"
-#include <cuires.hrc>
-#include "helpid.hrc"
-
-ModalDialog RID_SVXDLG_SECURITY_OPTIONS
-{
- OutputSize = TRUE ;
- SVLook = TRUE ;
- Size = MAP_APPFONT ( DLG_WIDTH , ROW_10 ) ;
- Moveable = TRUE ;
- Closeable = TRUE ;
- Text [ en-US ] = "Security options and warnings" ;
- FixedLine FL_WARNINGS
- {
- Pos = MAP_APPFONT( COL_0, ROW_0 );
- Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Security warnings";
- };
- FixedText FI_WARNINGS
- {
- Pos = MAP_APPFONT( COL_1, ROW_1 );
- Size = MAP_APPFONT( COL_3-COL_1, 2*RSC_CD_FIXEDLINE_HEIGHT );
- Wordbreak = TRUE;
- Text [ en-US ] = "Warn if document contains recorded changes, versions, hidden information or notes:";
- };
- FixedImage FI_SAVESENDDOCS
- {
- Pos = MAP_APPFONT( COL_2 - 7, ROW_2 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_SAVESENDDOCS
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_SAVESENDDOCS";
- Pos = MAP_APPFONT( COL_2, ROW_2 );
- Size = MAP_APPFONT( CHECKBOX_WIDTH, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "When saving or sending";
- };
- FixedImage FI_SIGNDOCS
- {
- Pos = MAP_APPFONT( COL_2 + CHECKBOX_WIDTH + RSC_SP_CTRL_X - 7, ROW_2 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_SIGNDOCS
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_SIGNDOCS";
- Pos = MAP_APPFONT( COL_2 + CHECKBOX_WIDTH + RSC_SP_CTRL_X, ROW_2 );
- Size = MAP_APPFONT( CHECKBOX_WIDTH, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "When signing";
- };
- FixedImage FI_PRINTDOCS
- {
- Pos = MAP_APPFONT( COL_2 - 7, ROW_3 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_PRINTDOCS
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_PRINTDOCS";
- Pos = MAP_APPFONT( COL_2, ROW_3 );
- Size = MAP_APPFONT( CHECKBOX_WIDTH, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "When printing";
- };
- FixedImage FI_CREATEPDF
- {
- Pos = MAP_APPFONT( COL_2 + CHECKBOX_WIDTH + RSC_SP_CTRL_X - 7, ROW_3 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_CREATEPDF
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_CREATEPDF";
- Pos = MAP_APPFONT( COL_2 + CHECKBOX_WIDTH + RSC_SP_CTRL_X, ROW_3 );
- Size = MAP_APPFONT( CHECKBOX_WIDTH, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "When creating PDF files";
- };
- FixedLine FL_OPTIONS
- {
- Pos = MAP_APPFONT( COL_0, ROW_4 );
- Size = MAP_APPFONT( COL_4-COL_0, RSC_CD_FIXEDLINE_HEIGHT );
- Text [ en-US ] = "Security options";
- };
- FixedImage FI_REMOVEINFO
- {
- Pos = MAP_APPFONT( COL_1 - 7, ROW_5 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_REMOVEINFO
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_REMOVEINFO";
- Pos = MAP_APPFONT( COL_1, ROW_5 );
- Size = MAP_APPFONT( COL_3-COL_1, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "Remove personal information on saving";
- };
- FixedImage FI_RECOMMENDPWD
- {
- Pos = MAP_APPFONT( COL_1 - 7, ROW_6 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_RECOMMENDPWD
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_RECOMMENDPWD";
- Pos = MAP_APPFONT( COL_1, ROW_6 );
- Size = MAP_APPFONT( COL_3-COL_1, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "Recommend password protection on saving";
- };
- FixedImage FI_CTRLHYPERLINK
- {
- Pos = MAP_APPFONT( COL_1 - 7, ROW_6 + 2 );
- Size = MAP_APPFONT( 6, 6 );
- };
- CheckBox CB_CTRLHYPERLINK
- {
- HelpID = "cui:CheckBox:RID_SVXDLG_SECURITY_OPTIONS:CB_CTRLHYPERLINK";
- Pos = MAP_APPFONT( COL_1, ROW_7 );
- Size = MAP_APPFONT( COL_3-COL_1, RSC_CD_CHECKBOX_HEIGHT );
- Text [ en-US ] = "Ctrl-click required to follow hyperlinks";
- };
- FixedLine FL_BUTTONS
- {
- Pos = MAP_APPFONT( 0, ROW_8 );
- Size = MAP_APPFONT( DLG_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- };
- OKButton PB_OK
- {
- Pos = MAP_APPFONT ( COL_A , ROW_9 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- DefButton = TRUE ;
- };
- CancelButton PB_CANCEL
- {
- Pos = MAP_APPFONT ( COL_B , ROW_9 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- };
- HelpButton PB_HELP
- {
- Pos = MAP_APPFONT ( COL_C , ROW_9 ) ;
- Size = MAP_APPFONT ( RSC_CD_PUSHBUTTON_WIDTH , RSC_CD_PUSHBUTTON_HEIGHT ) ;
- TabStop = TRUE ;
- };
-};
-