diff options
author | Palenik Mihály <palenik.mihaly@gmail.com> | 2014-06-16 18:31:47 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-18 13:48:48 +0000 |
commit | 2f5e479ae18a1584d8defbf35454b8357e3557ad (patch) | |
tree | a1c00e49f10ccac4f08c71c2410cfec63a392048 /uui/source | |
parent | 359ba1dfdf8de1f2cff185f16ec21b6dc88feac9 (diff) |
Convert RID_XMLSECDLG_MACROWARN to .ui
Change-Id: Icc364804bfe2e6ee05f73c7c0152acbcf7f6fefd
Reviewed-on: https://gerrit.libreoffice.org/9798
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/ids.hrc | 1 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.cxx | 212 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.hrc | 71 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.hxx | 24 | ||||
-rw-r--r-- | uui/source/secmacrowarnings.src | 113 |
5 files changed, 47 insertions, 374 deletions
diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc index 1742dd54db39..a6dda9fad904 100644 --- a/uui/source/ids.hrc +++ b/uui/source/ids.hrc @@ -37,7 +37,6 @@ #define STR_ERROR_SIMPLE_PASSWORD_WRONG (RID_UUI_START + 23) #define STR_ERROR_PASSWORD_TO_OPEN_WRONG (RID_UUI_START + 24) #define STR_ERROR_PASSWORD_TO_MODIFY_WRONG (RID_UUI_START + 25) -#define RID_XMLSECDLG_MACROWARN (RID_UUI_START + 30) #define STR_UNKNOWNUSER (RID_UUI_START + 31) #define STR_OPENLOCKED_TITLE (RID_UUI_START + 32) #define STR_OPENLOCKED_MSG (RID_UUI_START + 33) diff --git a/uui/source/secmacrowarnings.cxx b/uui/source/secmacrowarnings.cxx index 272112b6d0ea..ce7d3775c4b4 100644 --- a/uui/source/secmacrowarnings.cxx +++ b/uui/source/secmacrowarnings.cxx @@ -32,7 +32,6 @@ using namespace ::com::sun::star::security; #include "ids.hrc" #include "secmacrowarnings.hxx" -#include "secmacrowarnings.hrc" using namespace ::com::sun::star; @@ -64,47 +63,37 @@ namespace } -MacroWarning::MacroWarning( Window* _pParent, bool _bWithSignatures, ResMgr& rResMgr ) - :ModalDialog ( _pParent, ResId( RID_XMLSECDLG_MACROWARN, rResMgr ) ) +MacroWarning::MacroWarning( Window* _pParent, bool _bWithSignatures, ResMgr& ) + :ModalDialog ( _pParent, "MacroWarnMedium", "uui/ui/macrowarnmedium.ui" ) ,mpInfos ( NULL ) - ,maSymbolImg ( this, ResId( IMG_SYMBOL, rResMgr ) ) - ,maDocNameFI ( this, ResId( FI_DOCNAME, rResMgr ) ) - ,maDescr1aFI ( this, ResId( FI_DESCR1A, rResMgr ) ) - ,maDescr1bFI ( this, ResId( FI_DESCR1B, rResMgr ) ) - ,maSignsFI ( this, ResId( FI_SIGNS, rResMgr ) ) - ,maViewSignsBtn ( this, ResId( PB_VIEWSIGNS, rResMgr ) ) - ,maDescr2FI ( this, ResId( FI_DESCR2, rResMgr ) ) - ,maAlwaysTrustCB ( this, ResId( CB_ALWAYSTRUST, rResMgr ) ) - ,maBottomSepFL ( this, ResId( FL_BOTTOM_SEP, rResMgr ) ) - ,maEnableBtn ( this, ResId( PB_ENABLE, rResMgr ) ) - ,maDisableBtn ( this, ResId( PB_DISABLE, rResMgr ) ) - ,maHelpBtn ( this, ResId( BTN_HELP, rResMgr ) ) ,mbSignedMode ( true ) ,mbShowSignatures ( _bWithSignatures ) ,mnActSecLevel ( 0 ) { - FreeResource(); + get(mpSymbolImg, "symbolImage"); + get(mpDocNameFI, "docNameLabel"); + get(mpDescr1FI, "descr1Label"); + get(mpSignsFI, "signsLabel"); + get(mpViewSignsBtn, "viewSignsButton"); + get(mpDescr2FI, "descr2Label"); + get(mpAlwaysTrustCB, "alwaysTrustCheckbutton"); + get(mpEnableBtn, "ok"); + get(mpDisableBtn, "cancel"); InitControls(); - maDisableBtn.SetClickHdl( LINK( this, MacroWarning, DisableBtnHdl ) ); - maEnableBtn.SetClickHdl( LINK( this, MacroWarning, EnableBtnHdl ) ); - maDisableBtn.GrabFocus(); // Default button, but focus is on view button + mpDisableBtn->SetClickHdl( LINK( this, MacroWarning, DisableBtnHdl ) ); + mpEnableBtn->SetClickHdl( LINK( this, MacroWarning, EnableBtnHdl ) ); + mpDisableBtn->GrabFocus(); // Default button, but focus is on view button } MacroWarning::~MacroWarning() { } -short MacroWarning::Execute() -{ - FitControls(); - return ModalDialog::Execute(); -} - void MacroWarning::SetDocumentURL( const OUString& rDocURL ) { - maDocNameFI.SetText( rDocURL ); + mpDocNameFI->SetText( rDocURL ); } IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl) @@ -126,7 +115,7 @@ IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl) IMPL_LINK_NOARG(MacroWarning, EnableBtnHdl) { - if( mbSignedMode && maAlwaysTrustCB.IsChecked() ) + if( mbSignedMode && mpAlwaysTrustCB->IsChecked() ) { // insert path into trusted path list uno::Reference< security::XDocumentDigitalSignatures > xD( security::DocumentDigitalSignatures::createWithVersion(comphelper::getProcessComponentContext(), maODFVersion)); @@ -154,9 +143,9 @@ IMPL_LINK_NOARG(MacroWarning, DisableBtnHdl) IMPL_LINK_NOARG(MacroWarning, AlwaysTrustCheckHdl) { - bool bEnable = ( mnActSecLevel < 2 || maAlwaysTrustCB.IsChecked() ); - maEnableBtn.Enable( bEnable ); - maDisableBtn.Enable( !maAlwaysTrustCB.IsChecked() ); + bool bEnable = ( mnActSecLevel < 2 || mpAlwaysTrustCB->IsChecked() ); + mpEnableBtn->Enable( bEnable ); + mpDisableBtn->Enable( !mpAlwaysTrustCB->IsChecked() ); return 0; } @@ -165,163 +154,38 @@ void MacroWarning::InitControls() { // set warning image Image aImg( WarningBox::GetStandardImage() ); - maSymbolImg.SetImage( aImg ); - maSymbolImg.SetSizePixel( aImg.GetSizePixel() ); + mpSymbolImg->SetImage( aImg ); + mpSymbolImg->SetSizePixel( aImg.GetSizePixel() ); // set bold font and path ellipsis for docname fixedtext - Font aTmpFont = maDocNameFI.GetControlFont(); + Font aTmpFont = mpDocNameFI->GetControlFont(); aTmpFont.SetWeight( WEIGHT_BOLD ); - maDocNameFI.SetControlFont( aTmpFont ); - WinBits nStyle = maDocNameFI.GetStyle(); + mpDocNameFI->SetControlFont( aTmpFont ); + WinBits nStyle = mpDocNameFI->GetStyle(); nStyle |= WB_PATHELLIPSIS; - maDocNameFI.SetStyle( nStyle ); + mpDocNameFI->SetStyle( nStyle ); // show signature controls? if( mbShowSignatures ) { - maDescr1bFI.Hide(); - maViewSignsBtn.SetClickHdl( LINK( this, MacroWarning, ViewSignsBtnHdl ) ); - maViewSignsBtn.Disable(); // default - maAlwaysTrustCB.SetClickHdl( LINK( this, MacroWarning, AlwaysTrustCheckHdl ) ); + mpViewSignsBtn->SetClickHdl( LINK( this, MacroWarning, ViewSignsBtnHdl ) ); + mpViewSignsBtn->Disable(); // default + mpAlwaysTrustCB->SetClickHdl( LINK( this, MacroWarning, AlwaysTrustCheckHdl ) ); mnActSecLevel = SvtSecurityOptions().GetMacroSecurityLevel(); if ( mnActSecLevel >= 2 ) - maEnableBtn.Disable(); + mpEnableBtn->Disable(); } else { - maDescr1aFI.Hide(); - maSignsFI.Hide(); - maViewSignsBtn.Hide(); - maAlwaysTrustCB.Hide(); + mpDescr1FI->SetText("The document contains document macros."); + mpSignsFI->Hide(); + mpViewSignsBtn->Hide(); + mpAlwaysTrustCB->Hide(); // move hint up to position of signer list - maDescr2FI.SetPosPixel( maSignsFI.GetPosPixel() ); - } - // without signature controls could be smaller - if ( !mbShowSignatures ) - { - Point aPos = maDescr2FI.GetPosPixel(); - aPos.Y() += maDescr2FI.GetSizePixel().Height(); - aPos.Y() += LogicToPixel( Size( 3, 3 ) ).Height(); - long nDelta = maBottomSepFL.GetPosPixel().Y() - aPos.Y(); - Window* pWins[] = - { - &maBottomSepFL, &maEnableBtn, &maDisableBtn, &maHelpBtn - }; - Window** pCurrent = pWins; - for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) - { - Point aNewPos = (*pCurrent)->GetPosPixel(); - aNewPos.Y() -= nDelta; - (*pCurrent)->SetPosPixel( aNewPos ); - } - - Size aDlgSz = GetSizePixel(); - aDlgSz.Height() -= nDelta; - SetSizePixel( aDlgSz ); - } - - // check if some buttontexts are to wide - OUString sText = maViewSignsBtn.GetText(); - long nTxtW = maViewSignsBtn.GetTextWidth( sText ); - const long nOffset = 12; - if ( sText.indexOf( '~' ) == -1 ) - nTxtW += nOffset; - long nBtnW = maViewSignsBtn.GetSizePixel().Width(); - if ( nTxtW >= nBtnW ) - { - // broaden the button - long nDelta = std::max( nTxtW - nBtnW, nOffset/3 ); - Size aNewSize = maViewSignsBtn.GetSizePixel(); - aNewSize.Width() += nDelta; - maViewSignsBtn.SetSizePixel( aNewSize ); - // and give it a new position - Point aNewPos = maViewSignsBtn.GetPosPixel(); - aNewPos.X() -= nDelta; - maViewSignsBtn.SetPosPixel( aNewPos ); - // the left fixedtext must be smaller - aNewSize = maSignsFI.GetSizePixel(); - aNewSize.Width() -= nDelta; - maSignsFI.SetSizePixel( aNewSize ); - } - // if the button text (we compare with the longest of both) is too wide, then broaden the buttons - OUString sText1 = maEnableBtn.GetText(); - long nTxtW1 = maEnableBtn.GetTextWidth( sText1 ); - if ( sText1.indexOf( '~' ) == -1 ) - nTxtW1 += nOffset; - OUString sText2 = maDisableBtn.GetText(); - long nTxtW2 = maDisableBtn.GetTextWidth( sText2 ); - if ( sText2.indexOf( '~' ) == -1 ) - nTxtW2 += nOffset; - nTxtW = std::max( nTxtW1, nTxtW2 ); - nBtnW = maEnableBtn.GetSizePixel().Width(); - if ( nTxtW > nBtnW ) - { - // broaden both buttons - long nDelta = nTxtW - nBtnW; - Size aNewSize = maEnableBtn.GetSizePixel(); - aNewSize.Width() += nDelta; - maEnableBtn.SetSizePixel( aNewSize ); - maDisableBtn.SetSizePixel( aNewSize ); - // and give them a new position - Point aNewPos = maEnableBtn.GetPosPixel(); - aNewPos.X() -= (2*nDelta); - maEnableBtn.SetPosPixel( aNewPos ); - aNewPos = maDisableBtn.GetPosPixel(); - aNewPos.X() -= nDelta; - maDisableBtn.SetPosPixel( aNewPos ); + mpDescr2FI->SetPosPixel( mpSignsFI->GetPosPixel() ); } } -void MacroWarning::FitControls() -{ - Size a3Size = LogicToPixel( Size( 3, 3 ), MAP_APPFONT ); - Size aNewSize, aMinSize; - long nTxtH = 0; - long nCtrlH = 0; - long nDelta = 0; - - if ( mbShowSignatures ) - { - aMinSize = maSignsFI.CalcMinimumSize( maSignsFI.GetSizePixel().Width() ); - nTxtH = std::max( aMinSize.Height(), maViewSignsBtn.GetSizePixel().Height() ); - nTxtH += a3Size.Height() / 2; - nCtrlH = maSignsFI.GetSizePixel().Height(); - nDelta = std::max( nCtrlH - nTxtH, static_cast< long >( -100 ) ); // not too large - aNewSize = maSignsFI.GetSizePixel(); - aNewSize.Height() -= nDelta; - maSignsFI.SetSizePixel( aNewSize ); - } - - aMinSize = maDescr2FI.CalcMinimumSize( maDescr2FI.GetSizePixel().Width() ); - nTxtH = aMinSize.Height(); - nCtrlH = maDescr2FI.GetSizePixel().Height(); - long nDelta2 = ( nCtrlH - nTxtH ); - aNewSize = maDescr2FI.GetSizePixel(); - aNewSize.Height() -= nDelta2; - maDescr2FI.SetSizePixel( aNewSize ); - - // new position for the succeeding windows - Window* pWins[] = - { - &maDescr2FI, &maAlwaysTrustCB, &maBottomSepFL, &maEnableBtn, &maDisableBtn, &maHelpBtn - }; - Window** pCurrent = pWins; - for ( sal_uInt32 i = 0; i < sizeof( pWins ) / sizeof( pWins[ 0 ] ); ++i, ++pCurrent ) - { - Point aNewPos = (*pCurrent)->GetPosPixel(); - aNewPos.Y() -= nDelta; - (*pCurrent)->SetPosPixel( aNewPos ); - - if ( *pCurrent == &maDescr2FI ) - nDelta += nDelta2; - } - - // new size of the dialog - aNewSize = GetSizePixel(); - aNewSize.Height() -= nDelta; - SetSizePixel( aNewSize ); -} - void MacroWarning::SetStorage( const css::uno::Reference < css::embed::XStorage >& rxStore, const OUString& aODFVersion, const css::uno::Sequence< security::DocumentSignatureInformation >& rInfos ) @@ -342,8 +206,8 @@ void MacroWarning::SetStorage( const css::uno::Reference < css::embed::XStorage s += GetContentPart( rInfos[ i ].Signer->getSubjectName(), aCN_Id ); } - maSignsFI.SetText( s ); - maViewSignsBtn.Enable(); + mpSignsFI->SetText( s ); + mpViewSignsBtn->Enable(); } } @@ -355,8 +219,8 @@ void MacroWarning::SetCertificate( const css::uno::Reference< css::security::XCe OUString aCN_Id("CN"); OUString s; s = GetContentPart( mxCert->getSubjectName(), aCN_Id ); - maSignsFI.SetText( s ); - maViewSignsBtn.Enable(); + mpSignsFI->SetText( s ); + mpViewSignsBtn->Enable(); } } diff --git a/uui/source/secmacrowarnings.hrc b/uui/source/secmacrowarnings.hrc deleted file mode 100644 index 5bf8e388976f..000000000000 --- a/uui/source/secmacrowarnings.hrc +++ /dev/null @@ -1,71 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 _SECMACROWARNINGS_HRC -#define _SECMACROWARNINGS_HRC - -#include <svtools/controldims.hrc> - -// --------- general metrics --------- - -#define DLGS_BOTTOM_HELP_X(dlgw) (dlgw-RSC_SP_DLG_INNERBORDER_RIGHT-RSC_CD_PUSHBUTTON_WIDTH) -#define DLGS_BOTTOM_CANCEL_X(dlgw) (DLGS_BOTTOM_HELP_X(dlgw)-RSC_SP_CTRL_X-RSC_CD_PUSHBUTTON_WIDTH) -#define DLGS_BOTTOM_OK_X(dlgw) (DLGS_BOTTOM_CANCEL_X(dlgw)-RSC_SP_CTRL_GROUP_X-RSC_CD_PUSHBUTTON_WIDTH) - -// --------- signed macro warning --------- - -#define FI_DOCNAME 1 -#define FI_DESCR1A 2 -#define FI_SIGNS 3 -#define PB_VIEWSIGNS 4 -#define FI_DESCR2 5 -#define CB_ALWAYSTRUST 6 -#define PB_ENABLE 7 -#define PB_DISABLE 8 -#define FI_DESCR1B 9 -#define FL_BOTTOM_SEP 10 -#define BTN_HELP 11 -#define IMG_SYMBOL 12 - -#define MW_WIDTH 220 -#define MW_HEIGHT 190 - -#define MW_SYMBOL_WIDTH (20) -#define MW_SYMBOL_HEIGHT (20) - -#define MW_COL_0 (RSC_SP_DLG_INNERBORDER_LEFT) -#define MW_COL_1 (MW_COL_0+MW_SYMBOL_WIDTH+RSC_SP_CTRL_DESC_X) - -#define MW_COL_4 (MW_WIDTH-RSC_SP_DLG_INNERBORDER_RIGHT) -#define MW_COL_3 (MW_COL_4-RSC_CD_PUSHBUTTON_WIDTH) -#define MW_COL_2 (MW_COL_3-RSC_SP_CTRL_DESC_X) - -#define MW_ROW_0 (RSC_SP_DLG_INNERBORDER_TOP) -#define MW_ROW_1 (MW_ROW_0+3*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y) -#define MW_ROW_2 (MW_ROW_1+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_DESC_Y) - -#define MW_ROW_7 (MW_HEIGHT-RSC_SP_DLG_INNERBORDER_BOTTOM) -#define MW_ROW_6 (MW_ROW_7-RSC_CD_PUSHBUTTON_HEIGHT) -#define MW_ROW_5 (MW_ROW_6-RSC_SP_CTRL_DESC_Y-RSC_CD_FIXEDTEXT_HEIGHT) -#define MW_ROW_4 (MW_ROW_5-RSC_SP_CTRL_DESC_Y-RSC_CD_CHECKBOX_HEIGHT) -#define MW_ROW_3 (MW_ROW_4-RSC_SP_CTRL_DESC_Y-4*RSC_CD_FIXEDTEXT_HEIGHT) - -#endif - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/uui/source/secmacrowarnings.hxx b/uui/source/secmacrowarnings.hxx index 958aa7e56745..cac7ed3152b7 100644 --- a/uui/source/secmacrowarnings.hxx +++ b/uui/source/secmacrowarnings.hxx @@ -46,18 +46,15 @@ private: OUString maODFVersion; const cssu::Sequence< css::security::DocumentSignatureInformation >* mpInfos; - FixedImage maSymbolImg; - FixedInfo maDocNameFI; - FixedInfo maDescr1aFI; - FixedInfo maDescr1bFI; - FixedInfo maSignsFI; - PushButton maViewSignsBtn; - FixedInfo maDescr2FI; - CheckBox maAlwaysTrustCB; - FixedLine maBottomSepFL; - OKButton maEnableBtn; - CancelButton maDisableBtn; - HelpButton maHelpBtn; + FixedImage* mpSymbolImg; + FixedText* mpDocNameFI; + FixedText* mpDescr1FI; + FixedText* mpSignsFI; + PushButton* mpViewSignsBtn; + FixedText* mpDescr2FI; + CheckBox* mpAlwaysTrustCB; + PushButton* mpEnableBtn; + PushButton* mpDisableBtn; const bool mbSignedMode; // modus of dialog (signed / unsigned macros) const bool mbShowSignatures; @@ -69,14 +66,11 @@ private: DECL_LINK( AlwaysTrustCheckHdl, void* ); void InitControls(); - void FitControls(); public: MacroWarning( Window* pParent, bool _bShowSignatures, ResMgr& rResMgr ); virtual ~MacroWarning(); - virtual short Execute() SAL_OVERRIDE; - void SetDocumentURL( const OUString& rDocURL ); void SetStorage( const cssu::Reference < css::embed::XStorage >& rxStore, diff --git a/uui/source/secmacrowarnings.src b/uui/source/secmacrowarnings.src deleted file mode 100644 index dfaee69551b7..000000000000 --- a/uui/source/secmacrowarnings.src +++ /dev/null @@ -1,113 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * 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 . - */ - -#define __RSC - -#include "secmacrowarnings.hrc" -#include "ids.hrc" - -ModalDialog RID_XMLSECDLG_MACROWARN -{ - HelpId = HID_XMLSECDLG_MACROWARN; - Size = MAP_APPFONT( MW_WIDTH, MW_HEIGHT ); - OutputSize = TRUE; - Closeable = FALSE; - Moveable = TRUE; - SVLook = TRUE; - - Text [ en-US ] = "%PRODUCTNAME - Security Warning"; - - FixedImage IMG_SYMBOL - { - Pos = MAP_APPFONT( MW_COL_0, MW_ROW_0 ); - Size = MAP_APPFONT( MW_SYMBOL_WIDTH, MW_SYMBOL_HEIGHT ); - }; - FixedText FI_DOCNAME - { - Pos = MAP_APPFONT( MW_COL_1, MW_ROW_0+RSC_CD_FIXEDTEXT_HEIGHT ); - Size = MAP_APPFONT( MW_COL_4-MW_COL_1, 2*RSC_CD_FIXEDTEXT_HEIGHT ); - Wordbreak = TRUE; - }; - FixedText FI_DESCR1A - { - Pos = MAP_APPFONT( MW_COL_1, MW_ROW_1 ); - Size = MAP_APPFONT( MW_COL_4-MW_COL_1, RSC_CD_FIXEDTEXT_HEIGHT ); - Wordbreak = TRUE; - Text [ en-US ] = "The document contains document macros signed by:"; - }; - FixedText FI_DESCR1B - { - Pos = MAP_APPFONT( MW_COL_1, MW_ROW_1 ); - Size = MAP_APPFONT( MW_COL_4-MW_COL_1, RSC_CD_FIXEDTEXT_HEIGHT ); - Wordbreak = TRUE; - Text [ en-US ] = "The document contains document macros."; - }; - FixedText FI_SIGNS - { - Pos = MAP_APPFONT( MW_COL_1, MW_ROW_2 ); - Size = MAP_APPFONT( MW_COL_2-MW_COL_1, MW_ROW_3-MW_ROW_2-RSC_SP_CTRL_DESC_Y ); - Wordbreak = TRUE; - }; - PushButton PB_VIEWSIGNS - { - HelpID = "uui:PushButton:RID_XMLSECDLG_MACROWARN:PB_VIEWSIGNS"; - Pos = MAP_APPFONT( MW_COL_3, MW_ROW_2 ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - Text [ en-US ] = "View Signatures..."; - }; - FixedText FI_DESCR2 - { - Pos = MAP_APPFONT( MW_COL_1, MW_ROW_3 ); - Size = MAP_APPFONT( MW_COL_4-MW_COL_1, 4*RSC_CD_FIXEDTEXT_HEIGHT ); - Wordbreak = TRUE; - Text [ en-US ] = "Macros may contain viruses. Disabling macros for a document is always safe. If you disable macros you may lose functionality provided by the document macros."; - }; - CheckBox CB_ALWAYSTRUST - { - HelpID = "uui:CheckBox:RID_XMLSECDLG_MACROWARN:CB_ALWAYSTRUST"; - Pos = MAP_APPFONT( MW_COL_1, MW_ROW_4 ); - Size = MAP_APPFONT( MW_COL_4-MW_COL_1, RSC_CD_CHECKBOX_HEIGHT ); - Text [ en-US ] = "Always trust macros from this source"; - }; - FixedLine FL_BOTTOM_SEP - { - Pos = MAP_APPFONT( 0, MW_ROW_5 ); - Size = MAP_APPFONT( MW_WIDTH, RSC_CD_FIXEDLINE_HEIGHT ); - }; - OKButton PB_ENABLE - { - Pos = MAP_APPFONT( DLGS_BOTTOM_OK_X( MW_WIDTH ), MW_ROW_6 ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - Text [ en-US ] = "~Enable Macros"; - }; - CancelButton PB_DISABLE - { - Pos = MAP_APPFONT( DLGS_BOTTOM_CANCEL_X( MW_WIDTH ), MW_ROW_6 ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - DefButton = TRUE; - Text [ en-US ] = "~Disable Macros"; - }; - HelpButton BTN_HELP - { - Pos = MAP_APPFONT( DLGS_BOTTOM_HELP_X( MW_WIDTH ), MW_ROW_6 ); - Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT ); - }; -}; - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |