Kaydet (Commit) 27b04131 authored tarafından Caolán McNamara's avatar Caolán McNamara

fully convert security options to .ui format

Change-Id: I119b38f96ebdd6af19b9dce926a684398b4f72f8
üst 0a410065
...@@ -97,7 +97,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\ ...@@ -97,7 +97,6 @@ $(eval $(call gb_SrsTarget_add_files,cui/res,\
cui/source/options/optsave.src \ cui/source/options/optsave.src \
cui/source/options/optupdt.src \ cui/source/options/optupdt.src \
cui/source/options/readonlyimage.src \ cui/source/options/readonlyimage.src \
cui/source/options/securityoptions.src \
cui/source/options/treeopt.src \ cui/source/options/treeopt.src \
cui/source/options/webconninfo.src \ cui/source/options/webconninfo.src \
cui/source/tabpages/align.src \ cui/source/tabpages/align.src \
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
#include <dialmgr.hxx> #include <dialmgr.hxx>
#include <cuires.hrc> #include <cuires.hrc>
#include "securityoptions.hxx" #include "securityoptions.hxx"
#include "securityoptions.hrc"
namespace namespace
{ {
...@@ -45,32 +44,29 @@ namespace svx ...@@ -45,32 +44,29 @@ namespace svx
SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions* pOptions) SecurityOptionsDialog::SecurityOptionsDialog(Window* pParent, SvtSecurityOptions* pOptions)
: ModalDialog(pParent, "SecurityOptionsDialog", "cui/ui/securityoptionsdialog.ui") : 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" ); DBG_ASSERT( pOptions, "SecurityOptionsDialog::SecurityOptionsDialog(): invalid SvtSecurityOptions" );
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, m_aSaveOrSendDocsCB, m_aSaveOrSendDocsFI ); get(m_pSaveOrSendDocsCB, "savesenddocs");
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, m_aSignDocsCB, m_aSignDocsFI ); enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SAVEORSEND, *m_pSaveOrSendDocsCB,
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_PRINT, m_aPrintDocsCB, m_aPrintDocsFI ); *get<FixedImage>("locksavesenddocs"));
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_CREATEPDF, m_aCreatePdfCB, m_aCreatePdfFI ); get(m_pSignDocsCB, "whensigning");
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_REMOVEPERSONALINFO, m_aRemovePersInfoCB, m_aRemovePersInfoFI ); enableAndSet(*pOptions, SvtSecurityOptions::E_DOCWARN_SIGNING, *m_pSignDocsCB,
enableAndSet( *pOptions, SvtSecurityOptions::E_DOCWARN_RECOMMENDPASSWORD, m_aRecommPasswdCB, m_aRecommPasswdFI ); *get<FixedImage>("lockwhensigning"));
enableAndSet( *pOptions, SvtSecurityOptions::E_CTRLCLICK_HYPERLINK, m_aCtrlHyperlinkCB, m_aCtrlHyperlinkFI ); 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() SecurityOptionsDialog::~SecurityOptionsDialog()
......
/*
* 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
...@@ -38,34 +38,27 @@ namespace svx ...@@ -38,34 +38,27 @@ namespace svx
class SecurityOptionsDialog : public ModalDialog class SecurityOptionsDialog : public ModalDialog
{ {
private: private:
ReadOnlyImage m_aSaveOrSendDocsFI; CheckBox* m_pSaveOrSendDocsCB;
CheckBox m_aSaveOrSendDocsCB; CheckBox* m_pSignDocsCB;
ReadOnlyImage m_aSignDocsFI; CheckBox* m_pPrintDocsCB;
CheckBox m_aSignDocsCB; CheckBox* m_pCreatePdfCB;
ReadOnlyImage m_aPrintDocsFI;
CheckBox m_aPrintDocsCB;
ReadOnlyImage m_aCreatePdfFI;
CheckBox m_aCreatePdfCB;
ReadOnlyImage m_aRemovePersInfoFI; CheckBox* m_pRemovePersInfoCB;
CheckBox m_aRemovePersInfoCB; CheckBox* m_pRecommPasswdCB;
ReadOnlyImage m_aRecommPasswdFI; CheckBox* m_pCtrlHyperlinkCB;
CheckBox m_aRecommPasswdCB;
ReadOnlyImage m_aCtrlHyperlinkFI;
CheckBox m_aCtrlHyperlinkCB;
public: public:
SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ); SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions );
~SecurityOptionsDialog(); ~SecurityOptionsDialog();
inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != sal_False; } bool IsSaveOrSendDocsChecked() const { return m_pSaveOrSendDocsCB->IsChecked() != sal_False; }
inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != sal_False; } bool IsSignDocsChecked() const { return m_pSignDocsCB->IsChecked() != sal_False; }
inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != sal_False; } bool IsPrintDocsChecked() const { return m_pPrintDocsCB->IsChecked() != sal_False; }
inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != sal_False; } bool IsCreatePdfChecked() const { return m_pCreatePdfCB->IsChecked() != sal_False; }
inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != sal_False; } bool IsRemovePersInfoChecked() const { return m_pRemovePersInfoCB->IsChecked() != sal_False; }
inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != sal_False; } bool IsRecommPasswdChecked() const { return m_pRecommPasswdCB->IsChecked() != sal_False; }
inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != sal_False; } bool IsCtrlHyperlinkChecked() const { return m_pCtrlHyperlinkCB->IsChecked() != sal_False; }
}; };
//........................................................................ //........................................................................
......
/*
* 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 ;
};
};
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment