summaryrefslogtreecommitdiff
path: root/xmlsecurity
diff options
context:
space:
mode:
authorPalenik Mihály <palenik.mihaly@gmail.com>2014-08-03 23:43:49 +0200
committerDavid Tardon <dtardon@redhat.com>2014-08-04 12:08:08 +0000
commita246cad28a2354bc4394291b32cc5aa3a068ce44 (patch)
treed49feabda1a6ba798333b82d333169693f40527e /xmlsecurity
parent6cf40d263e33dd6934005af8319ae6fc8a386592 (diff)
Delete RID_XMLSECTP_MACROWARN dialog
I deleted unused RID_XMLSECTP_MACROWARN and MacroWarning class. Change-Id: Iaf0a99eae53b08a8a8869696ba19ae2023ede52a Reviewed-on: https://gerrit.libreoffice.org/10718 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'xmlsecurity')
-rw-r--r--xmlsecurity/inc/xmlsecurity/global.hrc1
-rw-r--r--xmlsecurity/inc/xmlsecurity/warnings.hxx78
-rw-r--r--xmlsecurity/source/dialogs/dialogs.hrc31
-rw-r--r--xmlsecurity/source/dialogs/warnings.cxx124
-rw-r--r--xmlsecurity/source/dialogs/warnings.src108
5 files changed, 0 insertions, 342 deletions
diff --git a/xmlsecurity/inc/xmlsecurity/global.hrc b/xmlsecurity/inc/xmlsecurity/global.hrc
index 5c4a2dfdbee3..12fd776a9cd3 100644
--- a/xmlsecurity/inc/xmlsecurity/global.hrc
+++ b/xmlsecurity/inc/xmlsecurity/global.hrc
@@ -24,7 +24,6 @@
#define RID_XMLSECTP_GENERAL 1003
#define RID_XMLSECTP_DETAILS 1004
-#define RID_XMLSECTP_MACROWARN 1009
#define RID_XMLSECWB_NO_MOZILLA_PROFILE 1013
diff --git a/xmlsecurity/inc/xmlsecurity/warnings.hxx b/xmlsecurity/inc/xmlsecurity/warnings.hxx
deleted file mode 100644
index 3a0899149298..000000000000
--- a/xmlsecurity/inc/xmlsecurity/warnings.hxx
+++ /dev/null
@@ -1,78 +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 INCLUDED_XMLSECURITY_INC_XMLSECURITY_WARNINGS_HXX
-#define INCLUDED_XMLSECURITY_INC_XMLSECURITY_WARNINGS_HXX
-
-#include <vcl/dialog.hxx>
-#include <svtools/stdctrl.hxx>
-#include <vcl/button.hxx>
-#include <svx/simptabl.hxx>
-
-namespace com {
-namespace sun {
-namespace star {
-namespace security {
- class XCertificate; }
-namespace xml { namespace crypto {
- class XSecurityEnvironment; }}
-}}}
-
-#include <com/sun/star/uno/Sequence.hxx>
-#include <xmlsecurity/sigstruct.hxx>
-
-class HeaderBar;
-
-class MacroWarning : public ModalDialog
-{
-private:
- // XSecurityEnvironment is needed for building the certification path
- css::uno::Reference< css::xml::crypto::XSecurityEnvironment > mxSecurityEnvironment;
-
-// css::uno::Sequence< css::uno::Reference< css::security::XCertificate > > maCerts;
- css::uno::Reference< css::security::XCertificate > mxCert;
-
-// FixedImage maQuestionMarkFI;
- FixedInfo maDocNameFI;
- FixedInfo maDescr1aFI;
- FixedInfo maDescr1bFI;
- FixedInfo maSignsFI;
- PushButton maViewSignsBtn;
- FixedInfo maDescr2FI;
- CheckBox maAlwaysTrustCB;
- FixedLine maBottomSepFL;
- PushButton maEnableBtn;
- CancelButton maDisableBtn;
- HelpButton maHelpBtn;
-
- const bool mbSignedMode; // modus of dialog (signed / unsigned macros)
-
- DECL_LINK( ViewSignsBtnHdl, void* );
- DECL_LINK( EnableBtnHdl, void* );
-// DECL_LINK( DisableBtnHdl, void* );
-
-public:
- MacroWarning( Window* pParent, css::uno::Reference< css::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, css::uno::Reference< css::security::XCertificate >& _rxCert );
- MacroWarning( Window* pParent );
- ~MacroWarning();
-};
-
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/dialogs.hrc b/xmlsecurity/source/dialogs/dialogs.hrc
index f07d52de8d44..4d84c64296a9 100644
--- a/xmlsecurity/source/dialogs/dialogs.hrc
+++ b/xmlsecurity/source/dialogs/dialogs.hrc
@@ -121,37 +121,6 @@
#define STR_PATH_CERT_OK 8
#define STR_PATH_CERT_NOT_VALIDATED 9
-// --------- 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 MW_WIDTH DLGS_WIDTH
-#define MW_HEIGHT DLGS_HEIGHT
-
-#define MW_SYMBOL_WIDTH (20)
-
-#define MW_COL_0 (RSC_SP_DLG_INNERBORDER_LEFT)
-#define MW_COL_1 (MW_COL_0+MW_SYMBOL_WIDTH)
-#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_Y)
-#define MW_ROW_2 (MW_ROW_1+RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_Y)
-
-#define MW_ROW_5 (DLGS_BOTTOM_FL_Y(MW_HEIGHT))
-#define MW_ROW_4 (MW_ROW_5-RSC_CD_CHECKBOX_HEIGHT-RSC_SP_CTRL_Y)
-#define MW_ROW_3 (MW_ROW_4-4*RSC_CD_FIXEDTEXT_HEIGHT+RSC_SP_CTRL_Y)
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/warnings.cxx b/xmlsecurity/source/dialogs/warnings.cxx
deleted file mode 100644
index e0a3f8634432..000000000000
--- a/xmlsecurity/source/dialogs/warnings.cxx
+++ /dev/null
@@ -1,124 +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 .
- */
-
-
-#include <xmlsecurity/warnings.hxx>
-#include <xmlsecurity/certificateviewer.hxx>
-#include <com/sun/star/xml/crypto/XSecurityEnvironment.hpp>
-#include <comphelper/sequence.hxx>
-
-// added for password exception
-#include <vcl/msgbox.hxx>
-#include <com/sun/star/security/NoPasswordException.hpp>
-using namespace ::com::sun::star::security;
-
-
-#include "dialogs.hrc"
-#include "resourcemanager.hxx"
-
-using namespace ::com::sun::star;
-
-
-MacroWarning::MacroWarning( Window* _pParent, uno::Reference< css::xml::crypto::XSecurityEnvironment >& _rxSecurityEnvironment, css::uno::Reference< css::security::XCertificate >& _rxCert )
- :ModalDialog ( _pParent, XMLSEC_RES( RID_XMLSECTP_MACROWARN ) )
- ,maDocNameFI ( this, ResId( FI_DOCNAME ) )
- ,maDescr1aFI ( this, ResId( FI_DESCR1A ) )
- ,maDescr1bFI ( this, ResId( FI_DESCR1B ) )
- ,maSignsFI ( this, ResId( FI_SIGNS ) )
- ,maViewSignsBtn ( this, ResId( PB_VIEWSIGNS ) )
- ,maDescr2FI ( this, ResId( FI_DESCR2 ) )
- ,maAlwaysTrustCB ( this, ResId( CB_ALWAYSTRUST ) )
- ,maBottomSepFL ( this, ResId( FL_BOTTOM_SEP ) )
- ,maEnableBtn ( this, ResId( PB_DISABLE ) )
- ,maDisableBtn ( this, ResId( PB_DISABLE ) )
- ,maHelpBtn ( this, ResId( BTN_HELP ) )
- ,mbSignedMode ( true )
-{
- FreeResource();
-
- mxSecurityEnvironment = _rxSecurityEnvironment;
- mxCert = _rxCert;
-
- // hide unused parts
- maDescr1bFI.Hide();
-
- maViewSignsBtn.SetClickHdl( LINK( this, MacroWarning, ViewSignsBtnHdl ) );
- maEnableBtn.SetClickHdl( LINK( this, MacroWarning, EnableBtnHdl ) );
-
- if( mxCert.is() )
- maSignsFI.SetText( XmlSec::GetContentPart( mxCert->getSubjectName() ) );
- else
- // nothing to view!
- maViewSignsBtn.Disable();
-}
-
-MacroWarning::MacroWarning( Window* _pParent )
- :ModalDialog ( _pParent, XMLSEC_RES( RID_XMLSECTP_MACROWARN ) )
- ,maDocNameFI ( this, ResId( FI_DOCNAME ) )
- ,maDescr1aFI ( this, ResId( FI_DESCR1A ) )
- ,maDescr1bFI ( this, ResId( FI_DESCR1B ) )
- ,maSignsFI ( this, ResId( FI_SIGNS ) )
- ,maViewSignsBtn ( this, ResId( PB_VIEWSIGNS ) )
- ,maDescr2FI ( this, ResId( FI_DESCR2 ) )
- ,maAlwaysTrustCB ( this, ResId( CB_ALWAYSTRUST ) )
- ,maBottomSepFL ( this, ResId( FL_BOTTOM_SEP ) )
- ,maEnableBtn ( this, ResId( PB_DISABLE ) )
- ,maDisableBtn ( this, ResId( PB_DISABLE ) )
- ,maHelpBtn ( this, ResId( BTN_HELP ) )
- ,mbSignedMode ( false )
-{
- FreeResource();
-
- // hide unused parts
- maDescr1aFI.Hide();
- maSignsFI.Hide();
- maViewSignsBtn.Hide();
- maAlwaysTrustCB.Hide();
- maDescr2FI.Hide();
-
- // move hint up to position of signer list
- maDescr1bFI.SetPosPixel( maSignsFI.GetPosPixel() );
-}
-
-MacroWarning::~MacroWarning()
-{
-}
-
-IMPL_LINK_NOARG(MacroWarning, ViewSignsBtnHdl)
-{
- DBG_ASSERT( mxCert.is(), "*MacroWarning::ViewSignsBtnHdl(): no certificate set!" );
-
- CertificateViewer aViewer( this, mxSecurityEnvironment, mxCert );
- aViewer.Execute();
-
- return 0;
-}
-
-IMPL_LINK_NOARG(MacroWarning, EnableBtnHdl)
-{
- if( mbSignedMode && maAlwaysTrustCB.IsChecked() )
- { // insert path into trusted path list
-
- }
-
- EndDialog( RET_OK );
- return 0;
-}
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmlsecurity/source/dialogs/warnings.src b/xmlsecurity/source/dialogs/warnings.src
deleted file mode 100644
index 8ae7d042108d..000000000000
--- a/xmlsecurity/source/dialogs/warnings.src
+++ /dev/null
@@ -1,108 +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 .
- */
-
-#include "dialogs.hrc"
-#include "helpids.hrc"
-
-ModalDialog RID_XMLSECTP_MACROWARN
-{
- HelpId = HID_XMLSEC_TP_MACROWARN;
- Size = MAP_APPFONT( MW_WIDTH, MW_HEIGHT );
- OutputSize = TRUE;
- Closeable = TRUE;
- Moveable = TRUE;
- SVLook = TRUE;
-
- Text [ en-US ] = "Security Warning";
-
- FixedText FI_DOCNAME
- {
- Pos = MAP_APPFONT( MW_COL_1, MW_ROW_0 );
- Size = MAP_APPFONT( MW_COL_4-MW_COL_1, 3*RSC_CD_FIXEDTEXT_HEIGHT );
- Wordbreak = TRUE;
- Text [ en-US ] = "";
- };
- 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_4-MW_COL_2, MW_ROW_3-MW_ROW_2 );
- Wordbreak = TRUE;
- Text [ en-US ] = "";
- };
- PushButton PB_VIEWSIGNS
- {
- HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_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, 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 = "xmlsecurity:CheckBox:RID_XMLSECTP_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, DLGS_BOTTOM_FL_Y( MW_HEIGHT ) );
- Size = MAP_APPFONT( MW_WIDTH, RSC_CD_FIXEDLINE_HEIGHT );
- };
- PushButton PB_ENABLE
- {
- HelpID = "xmlsecurity:PushButton:RID_XMLSECTP_MACROWARN:PB_ENABLE";
- Pos = MAP_APPFONT( DLGS_BOTTOM_OK_X( MW_WIDTH ), DLGS_BOTTOM_BTN_Y( MW_HEIGHT ) );
- 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 ), DLGS_BOTTOM_BTN_Y( MW_HEIGHT ) );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- Text [ en-US ] = "Disable Macros";
- };
- HelpButton BTN_HELP
- {
- Pos = MAP_APPFONT( DLGS_BOTTOM_HELP_X( MW_WIDTH ), DLGS_BOTTOM_BTN_Y( MW_HEIGHT ) );
- Size = MAP_APPFONT( RSC_CD_PUSHBUTTON_WIDTH, RSC_CD_PUSHBUTTON_HEIGHT );
- };
-};
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */