summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-06-16 18:31:47 +0200
committerCaolán McNamara <caolanm@redhat.com>2014-06-18 13:48:48 +0000
commit2f5e479ae18a1584d8defbf35454b8357e3557ad (patch)
treea1c00e49f10ccac4f08c71c2410cfec63a392048
parent359ba1dfdf8de1f2cff185f16ec21b6dc88feac9 (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>
-rw-r--r--uui/AllLangResTarget_uui.mk1
-rw-r--r--uui/UIConfig_uui.mk1
-rw-r--r--uui/source/ids.hrc1
-rw-r--r--uui/source/secmacrowarnings.cxx212
-rw-r--r--uui/source/secmacrowarnings.hrc71
-rw-r--r--uui/source/secmacrowarnings.hxx24
-rw-r--r--uui/source/secmacrowarnings.src113
-rw-r--r--uui/uiconfig/ui/macrowarnmedium.ui225
8 files changed, 273 insertions, 375 deletions
diff --git a/uui/AllLangResTarget_uui.mk b/uui/AllLangResTarget_uui.mk
index a0238f199bf6..36a9a0b79cf5 100644
--- a/uui/AllLangResTarget_uui.mk
+++ b/uui/AllLangResTarget_uui.mk
@@ -31,7 +31,6 @@ $(eval $(call gb_SrsTarget_add_files,uui/res,\
uui/source/openlocked.src \
uui/source/passworddlg.src \
uui/source/passworderrs.src \
- uui/source/secmacrowarnings.src \
uui/source/trylater.src \
))
diff --git a/uui/UIConfig_uui.mk b/uui/UIConfig_uui.mk
index 6c0ca42c18ba..076969b6d089 100644
--- a/uui/UIConfig_uui.mk
+++ b/uui/UIConfig_uui.mk
@@ -11,6 +11,7 @@ $(eval $(call gb_UIConfig_UIConfig,uui))
$(eval $(call gb_UIConfig_add_uifiles,uui,\
uui/uiconfig/ui/logindialog \
+ uui/uiconfig/ui/macrowarnmedium \
uui/uiconfig/ui/masterpassworddlg \
uui/uiconfig/ui/password \
uui/uiconfig/ui/setmasterpassworddlg \
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: */
diff --git a/uui/uiconfig/ui/macrowarnmedium.ui b/uui/uiconfig/ui/macrowarnmedium.ui
new file mode 100644
index 000000000000..193b8c1e7900
--- /dev/null
+++ b/uui/uiconfig/ui/macrowarnmedium.ui
@@ -0,0 +1,225 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Generated with glade 3.16.1 -->
+<!-- interface-requires gtk+ 3.0 -->
+<interface>
+ <requires lib="gtk+" version="3.0"/>
+ <object class="GtkDialog" id="MacroWarnMedium">
+ <property name="can_focus">False</property>
+ <property name="border_width">6</property>
+ <property name="title" translatable="yes">%PRODUCTNAME - Security Warning</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <object class="GtkBox" id="dialog-vbox1">
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="vexpand">True</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">12</property>
+ <child internal-child="action_area">
+ <object class="GtkButtonBox" id="dialog-action_area1">
+ <property name="can_focus">False</property>
+ <property name="layout_style">end</property>
+ <child>
+ <object class="GtkButton" id="ok">
+ <property name="label" translatable="yes">_Enable Macros</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_underline">True</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="cancel">
+ <property name="label" translatable="yes">_Disable Macros</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</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>
+ <child>
+ <object class="GtkButton" id="help">
+ <property name="label">gtk-help</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="symbolImage">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="valign">start</property>
+ <property name="stock">gtk-missing-image</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</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="border_width">6</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkLabel" id="docNameLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <attributes>
+ <attribute name="weight" value="semibold"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="descr1Label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="hexpand">True</property>
+ <property name="label" translatable="yes">The document contains document macros signed by:</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkBox" id="box3">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel" id="signsLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="hexpand">True</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="viewSignsButton">
+ <property name="label" translatable="yes">_View Signatures...</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="valign">start</property>
+ <property name="hexpand">True</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="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel" id="descr2Label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="yalign">0</property>
+ <property name="label" translatable="yes">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.</property>
+ <property name="wrap">True</property>
+ <property name="max_width_chars">62</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkCheckButton" id="alwaysTrustCheckbutton">
+ <property name="label" translatable="yes">_Always trust macros from this source</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <property name="use_underline">True</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">4</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <action-widgets>
+ <action-widget response="0">ok</action-widget>
+ <action-widget response="0">cancel</action-widget>
+ <action-widget response="0">help</action-widget>
+ </action-widgets>
+ </object>
+</interface>