diff options
author | Mathias Bauer <mba@openoffice.org> | 2009-09-25 21:47:16 +0200 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2009-09-25 21:47:16 +0200 |
commit | 4de41d18fd2b96079b9a0aa9f1ef123e431fe938 (patch) | |
tree | cd19df126f82819bb8f82c7e1cdbcd07b449a29d /svtools/inc | |
parent | 6152b5efa3490cc8f09f269dc7542ffe3833358c (diff) | |
parent | 728c8eb458b5613eb5b8bbe8201dfc33a8a9cd78 (diff) |
merge commit
Diffstat (limited to 'svtools/inc')
-rw-r--r-- | svtools/inc/dialogcontrolling.hxx | 38 | ||||
-rw-r--r-- | svtools/inc/docmspasswdrequest.hxx | 72 | ||||
-rw-r--r-- | svtools/inc/docpasswdrequest.hxx | 71 | ||||
-rw-r--r-- | svtools/inc/eventcfg.hxx | 33 | ||||
-rw-r--r-- | svtools/inc/sfxecode.hxx | 1 | ||||
-rw-r--r-- | svtools/inc/svtools/embedhlp.hxx | 1 | ||||
-rw-r--r-- | svtools/inc/svtools/loginerr.hxx | 156 | ||||
-rw-r--r-- | svtools/inc/svtools/saveopt.hxx | 10 |
8 files changed, 62 insertions, 320 deletions
diff --git a/svtools/inc/dialogcontrolling.hxx b/svtools/inc/dialogcontrolling.hxx index 9efb098ee013..edb425f78b00 100644 --- a/svtools/inc/dialogcontrolling.hxx +++ b/svtools/inc/dialogcontrolling.hxx @@ -52,7 +52,15 @@ namespace svt class SVT_DLLPUBLIC SAL_NO_VTABLE IWindowOperator { public: - virtual void operateOn( Window& _rOperateOn ) const = 0; + /** called when an event happened which should be reacted to + + @param _rTrigger + the event which triggered the call. If the Id of the event is 0, then this is the initial + call which is made when ->_rOperateOn is added to the responsibility of the DialogController. + @param _rOperateOn + the window on which to operate + */ + virtual void operateOn( const VclWindowEvent& _rTrigger, Window& _rOperateOn ) const = 0; virtual ~IWindowOperator(); }; @@ -61,13 +69,13 @@ namespace svt //===================================================================== //= IWindowEventFilter //===================================================================== - /** an abstract interface for deciding whether a ->VclSimpleEvent + /** an abstract interface for deciding whether a ->VclWindowEvent is worth paying attention to */ class SVT_DLLPUBLIC SAL_NO_VTABLE IWindowEventFilter { public: - virtual bool payAttentionTo( const VclSimpleEvent& _rEvent ) const = 0; + virtual bool payAttentionTo( const VclWindowEvent& _rEvent ) const = 0; virtual ~IWindowEventFilter(); }; @@ -96,7 +104,7 @@ namespace svt ::std::auto_ptr< DialogController_Data > m_pImpl; public: - DialogController( Window& _rInstigator, const PWindowEventFilter _pEventFilter, const PWindowOperator _pOperator ); + DialogController( Window& _rInstigator, const PWindowEventFilter& _pEventFilter, const PWindowOperator& _pOperator ); virtual ~DialogController(); /** adds a window to the list of dependent windows @@ -117,10 +125,10 @@ namespace svt private: void impl_Init(); - void impl_updateAll(); - void impl_update( Window& _rWindow ); + void impl_updateAll( const VclWindowEvent& _rTriggerEvent ); + void impl_update( const VclWindowEvent& _rTriggerEvent, Window& _rWindow ); - DECL_LINK( OnWindowEvent, const VclSimpleEvent* ); + DECL_LINK( OnWindowEvent, const VclWindowEvent* ); private: DialogController( const DialogController& ); // never implemented @@ -184,10 +192,9 @@ namespace svt /** adds a non-standard controller whose functionality is not covered by the other methods @param _pController - the controller to add to the manager. Must not be <NULL/>. The manager takes ownership - of the controller. + the controller to add to the manager. Must not be <NULL/>. */ - void addController( DialogController* _pController ); + void addController( const PDialogController& _pController ); private: ControlDependencyManager( const ControlDependencyManager& ); // never implemented @@ -224,7 +231,7 @@ namespace svt { } - virtual void operateOn( Window& _rOperateOn ) const + virtual void operateOn( const VclWindowEvent& /*_rTrigger*/, Window& _rOperateOn ) const { _rOperateOn.Enable( m_rCheckable.IsChecked() ); } @@ -248,12 +255,11 @@ namespace svt { } - bool payAttentionTo( const VclSimpleEvent& _rEvent ) const + bool payAttentionTo( const VclWindowEvent& _rEvent ) const { - const VclWindowEvent& rWindowEvent = dynamic_cast< const VclWindowEvent& >( _rEvent ); - if ( ( rWindowEvent.GetWindow() == &m_rWindow ) - && ( ( rWindowEvent.GetId() == VCLEVENT_RADIOBUTTON_TOGGLE ) - || ( rWindowEvent.GetId() == VCLEVENT_CHECKBOX_TOGGLE ) + if ( ( _rEvent.GetWindow() == &m_rWindow ) + && ( ( _rEvent.GetId() == VCLEVENT_RADIOBUTTON_TOGGLE ) + || ( _rEvent.GetId() == VCLEVENT_CHECKBOX_TOGGLE ) ) ) return true; diff --git a/svtools/inc/docmspasswdrequest.hxx b/svtools/inc/docmspasswdrequest.hxx deleted file mode 100644 index 684bffe71760..000000000000 --- a/svtools/inc/docmspasswdrequest.hxx +++ /dev/null @@ -1,72 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright IBM Corporation 2009. - * Copyright 2009 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: docmspasswdrequest.hxx,v $ - * $Revision: 1.0 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_SVTOOLS_DOCMSPASSWDREQUEST_HXX -#define INCLUDED_SVTOOLS_DOCMSPASSWDREQUEST_HXX - -#include "svtools/svldllapi.h" -#include <com/sun/star/task/DocumentMSPasswordRequest.hpp> -#include <com/sun/star/task/XInteractionRequest.hpp> -#include <rtl/ustring.hxx> -#include <cppuhelper/implbase1.hxx> - -class MSAbortContinuation; -class MSPasswordContinuation; - -class SVL_DLLPUBLIC RequestMSDocumentPassword : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > -{ - ::com::sun::star::uno::Any m_aRequest; - - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > m_lContinuations; - - MSAbortContinuation* m_pAbort; - MSPasswordContinuation* m_pPassword; - -public: - RequestMSDocumentPassword( ::com::sun::star::task::PasswordRequestMode nMode, ::rtl::OUString aName ); - - sal_Bool isAbort(); - sal_Bool isPassword(); - - ::rtl::OUString getPassword(); - - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ); -}; - -#endif /* INCLUDED_SVTOOLS_DOCMSPASSWDREQUEST_HXX */ diff --git a/svtools/inc/docpasswdrequest.hxx b/svtools/inc/docpasswdrequest.hxx deleted file mode 100644 index 69095fbe5a5c..000000000000 --- a/svtools/inc/docpasswdrequest.hxx +++ /dev/null @@ -1,71 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: docpasswdrequest.hxx,v $ - * $Revision: 1.4 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef INCLUDED_SVTOOLS_DOCPASSWDREQUEST_HXX -#define INCLUDED_SVTOOLS_DOCPASSWDREQUEST_HXX - -#include "svtools/svldllapi.h" -#include <com/sun/star/task/DocumentPasswordRequest.hpp> -#include <com/sun/star/task/XInteractionRequest.hpp> -#include <rtl/ustring.hxx> -#include <cppuhelper/implbase1.hxx> - -class AbortContinuation; -class PasswordContinuation; - -class SVL_DLLPUBLIC RequestDocumentPassword : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest > -{ - ::com::sun::star::uno::Any m_aRequest; - - ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > m_lContinuations; - - AbortContinuation* m_pAbort; - PasswordContinuation* m_pPassword; - -public: - RequestDocumentPassword( ::com::sun::star::task::PasswordRequestMode nMode, ::rtl::OUString aName ); - - sal_Bool isAbort(); - sal_Bool isPassword(); - - ::rtl::OUString getPassword(); - - virtual ::com::sun::star::uno::Any SAL_CALL getRequest() - throw( ::com::sun::star::uno::RuntimeException ); - - virtual ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation > - > SAL_CALL getContinuations() - throw( ::com::sun::star::uno::RuntimeException ); -}; - -#endif /* INCLUDED_SVTOOLS_DOCPASSWDREQUEST_HXX */ diff --git a/svtools/inc/eventcfg.hxx b/svtools/inc/eventcfg.hxx index 4478d3f48028..4ee175f5b7e0 100644 --- a/svtools/inc/eventcfg.hxx +++ b/svtools/inc/eventcfg.hxx @@ -40,6 +40,35 @@ #include <hash_map> #include <vector> +#define STR_EVENT_STARTAPP 0 +#define STR_EVENT_CLOSEAPP 1 +#define STR_EVENT_DOCCREATED 2 +#define STR_EVENT_CREATEDOC 3 +#define STR_EVENT_LOADFINISHED 4 +#define STR_EVENT_OPENDOC 5 +#define STR_EVENT_PREPARECLOSEDOC 6 +#define STR_EVENT_CLOSEDOC 7 +#define STR_EVENT_SAVEDOC 8 +#define STR_EVENT_SAVEDOCDONE 9 +#define STR_EVENT_SAVEDOCFAILED 10 +#define STR_EVENT_SAVEASDOC 11 +#define STR_EVENT_SAVEASDOCDONE 12 +#define STR_EVENT_SAVEASDOCFAILED 13 +#define STR_EVENT_SAVETODOC 14 +#define STR_EVENT_SAVETODOCDONE 15 +#define STR_EVENT_SAVETODOCFAILED 16 +#define STR_EVENT_ACTIVATEDOC 17 +#define STR_EVENT_DEACTIVATEDOC 18 +#define STR_EVENT_PRINTDOC 19 +#define STR_EVENT_VIEWCREATED 20 +#define STR_EVENT_PREPARECLOSEVIEW 21 +#define STR_EVENT_CLOSEVIEW 22 +#define STR_EVENT_MODIFYCHANGED 23 +#define STR_EVENT_TITLECHANGED 24 +#define STR_EVENT_VISAREACHANGED 25 +#define STR_EVENT_MODECHANGED 26 +#define STR_EVENT_STORAGECHANGED 27 + typedef ::std::hash_map< ::rtl::OUString, ::rtl::OUString, ::rtl::OUStringHash, ::std::equal_to< ::rtl::OUString > > EventBindingHash; typedef ::std::vector< ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XFrame > > FrameVector; typedef ::std::vector< ::rtl::OUString > SupportedEventsVector; @@ -67,7 +96,7 @@ public: ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); - + ::rtl::OUString GetEventName( sal_Int32 nID ); }; class SVL_DLLPUBLIC GlobalEventConfig: @@ -86,7 +115,7 @@ class SVL_DLLPUBLIC GlobalEventConfig: ::sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw (::com::sun::star::uno::RuntimeException); ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException); ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException); - + static ::rtl::OUString GetEventName( sal_Int32 nID ); private: static GlobalEventConfig_Impl* m_pImpl; diff --git a/svtools/inc/sfxecode.hxx b/svtools/inc/sfxecode.hxx index 01292f1c87fa..d87fff819748 100644 --- a/svtools/inc/sfxecode.hxx +++ b/svtools/inc/sfxecode.hxx @@ -85,6 +85,7 @@ #define ERRCODE_SFX_DOCUMENT_MACRO_DISABLED (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 52) #define ERRCODE_SFX_BROKENSIGNATURE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 53) #define ERRCODE_SFX_SHARED_NOPASSWORDCHANGE (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 54) +#define ERRCODE_SFX_INCOMPLETE_ENCRYPTION (ERRCODE_WARNING_MASK | ERRCODE_AREA_SFX | ERRCODE_CLASS_NONE | 55) diff --git a/svtools/inc/svtools/embedhlp.hxx b/svtools/inc/svtools/embedhlp.hxx index 08fe3c7d162a..f4cccd3115b8 100644 --- a/svtools/inc/svtools/embedhlp.hxx +++ b/svtools/inc/svtools/embedhlp.hxx @@ -131,6 +131,7 @@ namespace svt BOOL is() const { return mxObj.is(); } BOOL IsChart() const; + void SetDefaultSizeForChart( const Size& rSizeIn_100TH_MM );//#i103460# charts do not necessaryly have an own size within ODF files, in this case they need to use the size settings from the surrounding frame, which is made available with this method }; } diff --git a/svtools/inc/svtools/loginerr.hxx b/svtools/inc/svtools/loginerr.hxx deleted file mode 100644 index f04e569b41e0..000000000000 --- a/svtools/inc/svtools/loginerr.hxx +++ /dev/null @@ -1,156 +0,0 @@ -/************************************************************************* - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * Copyright 2008 by Sun Microsystems, Inc. - * - * OpenOffice.org - a multi-platform office productivity suite - * - * $RCSfile: loginerr.hxx,v $ - * $Revision: 1.3 $ - * - * This file is part of OpenOffice.org. - * - * OpenOffice.org is free software: you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License version 3 - * only, as published by the Free Software Foundation. - * - * OpenOffice.org 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 version 3 for more details - * (a copy is included in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU Lesser General Public License - * version 3 along with OpenOffice.org. If not, see - * <http://www.openoffice.org/license.html> - * for a copy of the LGPLv3 License. - * - ************************************************************************/ - -#ifndef _LOGINERR_HXX -#define _LOGINERR_HXX - -#include <tools/string.hxx> -#include <tools/errcode.hxx> -#include <svtools/hint.hxx> - -//========================================================================= - -#define LOGINERROR_FLAG_SET_SAVE_PASSWORD 1 -#define LOGINERROR_FLAG_MODIFY_ACCOUNT 2 -#define LOGINERROR_FLAG_MODIFY_USER_NAME 4 -#define LOGINERROR_FLAG_PERSISTENT_PASSWORD 8 - -class LoginErrorInfo -{ -private: - String _aTitle; - String _aServer; - String _aAccount; - String _aUserName; - String _aPassword; - String _aPath; - String _aErrorText; - BYTE _nFlags; - USHORT _nRet; - -public: - LoginErrorInfo() - : _nFlags( LOGINERROR_FLAG_MODIFY_USER_NAME ), - _nRet( ERRCODE_BUTTON_CANCEL ) - { - } - - const String& GetTitle() const { return _aTitle; } - const String& GetServer() const { return _aServer; } - const String& GetAccount() const { return _aAccount; } - const String& GetUserName() const { return _aUserName; } - const String& GetPassword() const { return _aPassword; } - const String& GetPath() const { return _aPath; } - const String& GetErrorText() const { return _aErrorText; } - BOOL GetIsPersistentPassword() const - { return ( _nFlags & LOGINERROR_FLAG_PERSISTENT_PASSWORD ); } - BOOL GetIsSavePassword() const - { return ( _nFlags & LOGINERROR_FLAG_SET_SAVE_PASSWORD ); } - BYTE GetFlags() const { return _nFlags; } - USHORT GetResult() const { return _nRet; } - - void SetTitle( const String& aTitle ) - { _aTitle = aTitle; } - void SetServer( const String& aServer ) - { _aServer = aServer; } - void SetAccount( const String& aAccount ) - { _aAccount = aAccount; } - void SetUserName( const String& aUserName ) - { _aUserName = aUserName; } - void SetPassword( const String& aPassword ) - { _aPassword = aPassword; } - void SetPath( const String& aPath ) - { _aPath = aPath; } - void SetErrorText( const String& aErrorText ) - { _aErrorText = aErrorText; } - void SetFlags( BYTE nFlags ) - { _nFlags = nFlags; } - inline void SetSavePassword( BOOL bSet ); - inline void SetPersistentPassword( BOOL bSet ); - inline void SetModifyAccount( BOOL bSet ); - inline void SetModifyUserName( BOOL bSet ); - void SetResult( USHORT nRet ) - { _nRet = nRet; } -}; - -inline void LoginErrorInfo::SetSavePassword( BOOL bSet ) -{ - if ( bSet ) - _nFlags |= LOGINERROR_FLAG_SET_SAVE_PASSWORD; - else - _nFlags &= ~LOGINERROR_FLAG_SET_SAVE_PASSWORD; -} - -inline void LoginErrorInfo::SetPersistentPassword( BOOL bSet ) -{ - if ( bSet ) - _nFlags |= LOGINERROR_FLAG_PERSISTENT_PASSWORD; - else - _nFlags &= ~LOGINERROR_FLAG_PERSISTENT_PASSWORD; -} - -inline void LoginErrorInfo::SetModifyAccount( BOOL bSet ) -{ - if ( bSet ) - _nFlags |= LOGINERROR_FLAG_MODIFY_ACCOUNT; - else - _nFlags &= ~LOGINERROR_FLAG_MODIFY_ACCOUNT; -} - -inline void LoginErrorInfo::SetModifyUserName( BOOL bSet ) -{ - if ( bSet ) - _nFlags |= LOGINERROR_FLAG_MODIFY_USER_NAME; - else - _nFlags &= ~LOGINERROR_FLAG_MODIFY_USER_NAME; -} - -//========================================================================= - -class CntLoginErrorHint : public SfxHint -{ -private: - LoginErrorInfo* _pInfo; - - CntLoginErrorHint( const CntLoginErrorHint& ); // n.i. - CntLoginErrorHint& operator=( const CntLoginErrorHint& ); // n.i. - -public: - TYPEINFO(); - - CntLoginErrorHint( LoginErrorInfo* pInfo ) - : _pInfo( pInfo ) - { - } - - LoginErrorInfo& GetErrorInfo() const { return *_pInfo; } -}; - -#endif diff --git a/svtools/inc/svtools/saveopt.hxx b/svtools/inc/svtools/saveopt.hxx index 6dfd083a3ca2..2966e2f24aba 100644 --- a/svtools/inc/svtools/saveopt.hxx +++ b/svtools/inc/svtools/saveopt.hxx @@ -60,12 +60,16 @@ public: E_ODFDEFAULTVERSION }; + // keep enum values sorted that a less or greater compare maps to older and newer versions! enum ODFDefaultVersion { ODFVER_UNKNOWN = 0, // unknown - ODFVER_010, // ODF 1.0 - ODFVER_011, // ODF 1.1 - ODFVER_012 // ODF 1.2 + ODFVER_010 = 1, // ODF 1.0 + ODFVER_011 = 2, // ODF 1.1 + DO_NOT_USE = 3, // Do not use this, only here for compatibility with pre OOo 3.2 configuration + ODFVER_012 = 4, // ODF 1.2 + + ODFVER_LATEST = SAL_MAX_ENUM, // ODF latest version with enhancements }; SvtSaveOptions(); |