Kaydet (Commit) 13336b34 authored tarafından Ivo Hinkelmann's avatar Ivo Hinkelmann

INTEGRATION: CWS tkr06 (1.1.2); FILE ADDED

2007/11/07 11:28:16 pb 1.1.2.2: fix: #i82892# new option: CtrlClickHyperlinks
2007/11/05 10:12:26 pb 1.1.2.1: fix: #i82892# new class svx::SecurityOptionsDialog
üst 97b19a5a
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: securityoptions.cxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: ihi $ $Date: 2007-11-26 16:39:16 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_svx.hxx"
#ifdef SVX_DLLIMPLEMENTATION
#undef SVX_DLLIMPLEMENTATION
#endif
// include ---------------------------------------------------------------
#ifndef INCLUDED_SVTOOLS_SECURITIYOPTIONS_HXX
#include <svtools/securityoptions.hxx>
#endif
#ifndef _STDCTRL_HXX
#include <svtools/stdctrl.hxx>
#endif
#ifndef _SVX_DIALMGR_HXX
#include <svx/dialmgr.hxx>
#endif
#ifndef _SVX_DIALOGS_HRC
#include <svx/dialogs.hrc>
#endif
#include "securityoptions.hxx"
#include "securityoptions.hrc"
namespace
{
bool enableAndSet( const SvtSecurityOptions& rOptions,
SvtSecurityOptions::EOption eOption,
CheckBox& rCheckBox, FixedImage& rFixedImage )
{
bool bEnable = rOptions.IsOptionEnabled( eOption );
rCheckBox.Enable( bEnable );
rFixedImage.Show( !bEnable );
rCheckBox.Check( rOptions.IsOptionSet( eOption ) );
return bEnable;
}
}
//........................................................................
namespace svx
{
//........................................................................
SecurityOptionsDialog::SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions ) :
ModalDialog( pParent, SVX_RES( RID_SVXDLG_SECURITY_OPTIONS ) )
,m_aWarningsFL ( this, SVX_RES( FL_WARNINGS ) )
,m_aWarningsFI ( this, SVX_RES( FI_WARNINGS ) )
,m_aSaveOrSendDocsFI( this, SVX_RES( FI_SAVESENDDOCS ) )
,m_aSaveOrSendDocsCB( this, SVX_RES( CB_SAVESENDDOCS ) )
,m_aSignDocsFI ( this, SVX_RES( FI_SIGNDOCS ) )
,m_aSignDocsCB ( this, SVX_RES( CB_SIGNDOCS ) )
,m_aPrintDocsFI ( this, SVX_RES( FI_PRINTDOCS ) )
,m_aPrintDocsCB ( this, SVX_RES( CB_PRINTDOCS ) )
,m_aCreatePdfFI ( this, SVX_RES( FI_CREATEPDF ) )
,m_aCreatePdfCB ( this, SVX_RES( CB_CREATEPDF ) )
,m_aOptionsFL ( this, SVX_RES( FL_OPTIONS ) )
,m_aRemovePersInfoFI( this, SVX_RES( FI_REMOVEINFO ) )
,m_aRemovePersInfoCB( this, SVX_RES( CB_REMOVEINFO ) )
,m_aRecommPasswdFI ( this, SVX_RES( FI_RECOMMENDPWD ) )
,m_aRecommPasswdCB ( this, SVX_RES( CB_RECOMMENDPWD ) )
,m_aCtrlHyperlinkFI ( this, SVX_RES( FI_CTRLHYPERLINK ) )
,m_aCtrlHyperlinkCB ( this, SVX_RES( CB_CTRLHYPERLINK ) )
,m_aButtonsFL ( this, SVX_RES( FL_BUTTONS ) )
,m_aOKBtn ( this, SVX_RES( PB_OK ) )
,m_aCancelBtn ( this, SVX_RES( PB_CANCEL ) )
,m_aHelpBtn ( this, SVX_RES( PB_HELP ) )
{
FreeResource();
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 );
}
SecurityOptionsDialog::~SecurityOptionsDialog()
{
}
//........................................................................
} // namespace svx
//........................................................................
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: securityoptions.hrc,v $
*
* $Revision: 1.2 $
*
* last change: $Author: ihi $ $Date: 2007-11-26 16:39:34 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#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
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: securityoptions.hxx,v $
*
* $Revision: 1.2 $
*
* last change: $Author: ihi $ $Date: 2007-11-26 16:40:00 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
#ifndef _SVX_SECURITYOPTIONS_HXX
#define _SVX_SECURITYOPTIONS_HXX
#include <vcl/button.hxx>
#include <vcl/dialog.hxx>
#include <vcl/fixed.hxx>
#include "readonlyimage.hxx"
class SvtSecurityOptions;
//........................................................................
namespace svx
{
//........................................................................
//====================================================================
//= class SecurityOptionsDialog
//====================================================================
class SecurityOptionsDialog : public ModalDialog
{
private:
FixedLine m_aWarningsFL;
FixedInfo m_aWarningsFI;
ReadOnlyImage m_aSaveOrSendDocsFI;
CheckBox m_aSaveOrSendDocsCB;
ReadOnlyImage m_aSignDocsFI;
CheckBox m_aSignDocsCB;
ReadOnlyImage m_aPrintDocsFI;
CheckBox m_aPrintDocsCB;
ReadOnlyImage m_aCreatePdfFI;
CheckBox m_aCreatePdfCB;
FixedLine m_aOptionsFL;
ReadOnlyImage m_aRemovePersInfoFI;
CheckBox m_aRemovePersInfoCB;
ReadOnlyImage m_aRecommPasswdFI;
CheckBox m_aRecommPasswdCB;
ReadOnlyImage m_aCtrlHyperlinkFI;
CheckBox m_aCtrlHyperlinkCB;
FixedLine m_aButtonsFL;
OKButton m_aOKBtn;
CancelButton m_aCancelBtn;
HelpButton m_aHelpBtn;
public:
SecurityOptionsDialog( Window* pParent, SvtSecurityOptions* pOptions );
~SecurityOptionsDialog();
inline bool IsSaveOrSendDocsChecked() const { return m_aSaveOrSendDocsCB.IsChecked() != FALSE; }
inline bool IsSignDocsChecked() const { return m_aSignDocsCB.IsChecked() != FALSE; }
inline bool IsPrintDocsChecked() const { return m_aPrintDocsCB.IsChecked() != FALSE; }
inline bool IsCreatePdfChecked() const { return m_aCreatePdfCB.IsChecked() != FALSE; }
inline bool IsRemovePersInfoChecked() const { return m_aRemovePersInfoCB.IsChecked() != FALSE; }
inline bool IsRecommPasswdChecked() const { return m_aRecommPasswdCB.IsChecked() != FALSE; }
inline bool IsCtrlHyperlinkChecked() const { return m_aCtrlHyperlinkCB.IsChecked() != FALSE; }
};
//........................................................................
} // namespace svx
//........................................................................
#endif // #ifndef _SVX_SECURITYOPTIONS_HXX
/*************************************************************************
*
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: securityoptions.src,v $
*
* $Revision: 1.2 $
*
* last change: $Author: ihi $ $Date: 2007-11-26 16:40:17 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
*
*
* GNU Lesser General Public License Version 2.1
* =============================================
* Copyright 2005 by Sun Microsystems, Inc.
* 901 San Antonio Road, Palo Alto, CA 94303, USA
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2.1, as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*
************************************************************************/
// include --------------------------------------------------------------
#include <svtools/controldims.hrc>
#include "securityoptions.hrc"
#include <svx/dialogs.hrc>
#include "helpid.hrc"
ModalDialog RID_SVXDLG_SECURITY_OPTIONS
{
HelpID = HID_DLG_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
{
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
{
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
{
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
{
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
{
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
{
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
{
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