diff options
author | Michael Stahl <mstahl@redhat.com> | 2013-05-06 17:19:41 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-05-07 01:41:23 +0200 |
commit | 9a7603187eb5cc580d33212ee147f9ac89de55f4 (patch) | |
tree | f003910cba61325bcd080e75972e6cb2eaa44259 /dbaccess/inc | |
parent | 7556ba312ff3a7409b7da55f220d3ff877505a3b (diff) |
dbaccess: remove Package_inc
Change-Id: I8e6748eef04f25603851a33d049cb9585fa04cc6
Diffstat (limited to 'dbaccess/inc')
-rw-r--r-- | dbaccess/inc/AsyncronousLink.hxx | 64 | ||||
-rw-r--r-- | dbaccess/inc/IController.hxx | 131 | ||||
-rw-r--r-- | dbaccess/inc/IReference.hxx | 40 | ||||
-rw-r--r-- | dbaccess/inc/ToolBoxHelper.hxx | 77 | ||||
-rw-r--r-- | dbaccess/inc/controllerframe.hxx | 76 | ||||
-rw-r--r-- | dbaccess/inc/dataview.hxx | 85 | ||||
-rw-r--r-- | dbaccess/inc/dbaccessdllapi.h | 34 | ||||
-rw-r--r-- | dbaccess/inc/dbaundomanager.hxx | 96 | ||||
-rw-r--r-- | dbaccess/inc/dbsubcomponentcontroller.hxx | 204 | ||||
-rw-r--r-- | dbaccess/inc/genericcontroller.hxx | 531 |
10 files changed, 0 insertions, 1338 deletions
diff --git a/dbaccess/inc/AsyncronousLink.hxx b/dbaccess/inc/AsyncronousLink.hxx deleted file mode 100644 index 6c62d66b470f..000000000000 --- a/dbaccess/inc/AsyncronousLink.hxx +++ /dev/null @@ -1,64 +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 DBAUI_ASYNCRONOUSLINK_HXX -#define DBAUI_ASYNCRONOUSLINK_HXX - -#include <tools/link.hxx> -#include <osl/mutex.hxx> - -namespace dbaui -{ - // ========================================================================= - // a helper for multi-threaded handling of async events - // ------------------------------------------------------------------------- - /** handles asynchronous links which may be called in multi-threaded environments - If you use an instance of this class as member of your own class, it will handle - several crucial points for you (for instance the case that somebody posts the - event while another thread tries to delete this event in the _destructor_ of the - class). - */ - class OAsyncronousLink - { - Link m_aHandler; - - protected: - ::osl::Mutex m_aEventSafety; - ::osl::Mutex m_aDestructionSafety; - sal_uLong m_nEventId; - - public: - /** constructs the object - @param _rHandler The link to be called asyncronously - */ - OAsyncronousLink( const Link& _rHandler ); - virtual ~OAsyncronousLink(); - - bool IsRunning() const { return m_nEventId != 0; } - - void Call( void* _pArgument = NULL ); - void CancelCall(); - - protected: - DECL_LINK(OnAsyncCall, void*); - }; -} -#endif // DBAUI_ASYNCRONOUSLINK_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/IController.hxx b/dbaccess/inc/IController.hxx deleted file mode 100644 index d699ef4c6c43..000000000000 --- a/dbaccess/inc/IController.hxx +++ /dev/null @@ -1,131 +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 DBAUI_ICONTROLLER_HXX -#define DBAUI_ICONTROLLER_HXX - -#include <com/sun/star/beans/PropertyValue.hpp> -#include <com/sun/star/uno/Sequence.hxx> -#include "IReference.hxx" -#include "dbaccessdllapi.h" - -namespace com { namespace sun { namespace star { - namespace util { - struct URL; - } - namespace frame { - class XController; - } -} } } - -class NotifyEvent; - -namespace dbaui -{ - // interface for controller depended calls like commands - class DBACCESS_DLLPUBLIC IController : public IReference - { - public: - /** executes the given command without checking if it is allowed - @param _rCommand the URL of the command - */ - virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0; - - /** executes the given command only when it is allowed - @param _rCommand - the URL of the command - */ - virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0; - - /** executes the given command without checking if it is allowed - @param _nCommandId - the id of the command URL - */ - virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0; - - /** executes the given command only when it is allowed - @param _nCommandId - the id of the command URL - */ - virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) = 0; - - - /** checks if the given Command is enabled - @param _nCommandId - the id of the command URL - - @return - <TRUE/> if the command is allowed, otherwise <FALSE/>. - */ - virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const = 0; - - /** checks if the given Command is enabled - @param _rCompleteCommandURL - the URL of the command - - @return - <TRUE/> if the command is allowed, otherwise <FALSE/>. - */ - virtual sal_Bool isCommandEnabled( const OUString& _rCompleteCommandURL ) const = 0; - - /** registers a command URL, giving it a unique name - - If you call this with a command URL which is supported by the controller, then - you will simply get the controller's internal numeric shortcut to this command. - - If you call this with a command URL which is not supported by the controller, then - you will get a new ID, which is unique during the lifetime of the controller. - - If the command URL is invalid, or the controller cannot register new commands anymore, - then 0 is returned. - */ - virtual sal_uInt16 - registerCommandURL( const OUString& _rCompleteCommandURL ) = 0; - - /** notifyHiContrastChanged will be called when the hicontrast mode changed. - @param _bHiContrast - <TRUE/> when in hicontrast mode. - */ - virtual void notifyHiContrastChanged() = 0; - - /** checks if the selected data source is read only - @return - <TRUE/> if read only, otherwise <FALSE/> - */ - virtual sal_Bool isDataSourceReadOnly() const = 0; - - /** provides access to the model of the controller - - This must be the same model as returned by XController::getModel, and might be <NULL/> when - the controller does not have an own model. - */ - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > - getXController(void) throw( ::com::sun::star::uno::RuntimeException ) = 0; - - /** allows interception of user input, aka mouse clicks and key events - */ - virtual bool interceptUserInput( const NotifyEvent& _rEvent ) = 0; - - protected: - ~IController() {} - }; -} -#endif // DBAUI_ICONTROLLER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/IReference.hxx b/dbaccess/inc/IReference.hxx deleted file mode 100644 index bdfb8e1d99b7..000000000000 --- a/dbaccess/inc/IReference.hxx +++ /dev/null @@ -1,40 +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 DBAUI_IREFERENCE_HXX -#define DBAUI_IREFERENCE_HXX - -#include "dbaccessdllapi.h" - -namespace dbaui -{ - // interface for controller depended calls like commands - class DBACCESS_DLLPUBLIC SAL_NO_VTABLE IReference - { - public: - virtual void SAL_CALL acquire( ) throw () = 0; - virtual void SAL_CALL release( ) throw () = 0; - - protected: - ~IReference() {} - }; -} -#endif // DBAUI_IREFERENCE_HXX - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/ToolBoxHelper.hxx b/dbaccess/inc/ToolBoxHelper.hxx deleted file mode 100644 index 298bbc83b11b..000000000000 --- a/dbaccess/inc/ToolBoxHelper.hxx +++ /dev/null @@ -1,77 +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 DBAUI_TOOLBOXHELPER_HXX -#define DBAUI_TOOLBOXHELPER_HXX - -#include <sal/types.h> -#include <tools/link.hxx> -#include <vcl/image.hxx> -#include "dbaccessdllapi.h" - -class SvtMiscOptions; -class ToolBox; -class VclWindowEvent; - -namespace dbaui -{ - class DBACCESS_DLLPUBLIC OToolBoxHelper - { - sal_Int16 m_nSymbolsSize; // shows the toolbox large or small bitmaps - ToolBox* m_pToolBox; // our toolbox (may be NULL) - public: - OToolBoxHelper(); - virtual ~OToolBoxHelper(); - - /** will be called when the controls need to be resized. - @param _rDiff - Contains the difference of the old and new toolbox size. - */ - virtual void resizeControls(const Size& _rDiff) = 0; - - /** will be called when the image list is needed. - @param _eSymbolsSize - <svtools/imgdef.hxx> - @param _bHiContast - <TRUE/> when in high contrast mode. - */ - virtual ImageList getImageList(sal_Int16 _eSymbolsSize) const = 0; - - /** only the member will be set, derived classes can overload this function and do what need to be done. - @param _pTB - The new ToolBox. - @attention - Must be called after a FreeResource() call. - */ - virtual void setToolBox(ToolBox* _pTB); - - inline ToolBox* getToolBox() const { return m_pToolBox; } - - /** checks if the toolbox needs a new imagelist. - */ - void checkImageList(); - - protected: - DECL_LINK(ConfigOptionsChanged, SvtMiscOptions*); - DECL_LINK(SettingsChanged, VclWindowEvent* ); - }; -} -#endif // DBAUI_TOOLBOXHELPER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/controllerframe.hxx b/dbaccess/inc/controllerframe.hxx deleted file mode 100644 index d6834e20e90f..000000000000 --- a/dbaccess/inc/controllerframe.hxx +++ /dev/null @@ -1,76 +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 DBACCESS_CONTROLLERFRAME_HXX -#define DBACCESS_CONTROLLERFRAME_HXX - -#include <com/sun/star/frame/XFrame.hpp> -#include <com/sun/star/frame/FrameAction.hpp> - -#include <memory> - -//........................................................................ -namespace dbaui -{ -//........................................................................ - - class IController; - - //==================================================================== - //= ControllerFrame - //==================================================================== - struct ControllerFrame_Data; - /** helper class to ancapsulate the frame which a controller is plugged into, - doing some common actions on it. - */ - class ControllerFrame - { - public: - ControllerFrame( IController& _rController ); - ~ControllerFrame(); - - /// attaches a new frame - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& - attachFrame( - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame - ); - - // retrieves the current frame - const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& - getFrame() const; - - /** determines whether the frame is currently active - */ - bool isActive() const; - - /** notifies the instance that a certain frame action happened with our frame - */ - void frameAction( ::com::sun::star::frame::FrameAction _eAction ); - - private: - ::std::auto_ptr< ControllerFrame_Data > m_pData; - }; - -//........................................................................ -} // namespace dbaui -//........................................................................ - -#endif // DBACCESS_CONTROLLERFRAME_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/dataview.hxx b/dbaccess/inc/dataview.hxx deleted file mode 100644 index 70fcf034af6f..000000000000 --- a/dbaccess/inc/dataview.hxx +++ /dev/null @@ -1,85 +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 DBAUI_DATAVIEW_HXX -#define DBAUI_DATAVIEW_HXX - -#include "dbaccessdllapi.h" - -#include <com/sun/star/uno/XComponentContext.hpp> -#include <svtools/acceleratorexecute.hxx> -#include <sal/macros.h> -#include <vcl/fixed.hxx> - -#include <memory> - -class FixedLine; -namespace dbaui -{ - class IController; - class DBACCESS_DLLPUBLIC ODataView : public Window - { - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; // the service factory to work with - - protected: - IController& m_rController; // the controller in where we resides in - FixedLine m_aSeparator; - ::std::auto_ptr< ::svt::AcceleratorExecute> m_pAccel; - - public: - ODataView( Window* pParent, - IController& _rController, - const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& , - WinBits nStyle = 0 ); - virtual ~ODataView(); - - /// late construction - virtual void Construct(); - // initialize will be called when after the controller finished his initialize method - virtual void initialize(){} - // window overridables - virtual long PreNotify( NotifyEvent& rNEvt ); - virtual void StateChanged( StateChangedType nStateChange ); - virtual void DataChanged( const DataChangedEvent& rDCEvt ); - - inline IController& getCommandController() const { return m_rController; } - - /** will be called when the controls need to be resized. - */ - virtual void resizeControls(const Size& /*_rDiff*/) { Resize(); } - - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() { return m_xContext;} - - // the default implementation simply calls resizeAll( GetSizePixel() ) - virtual void Resize(); - - void attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame); - protected: - // window overridables - virtual void Paint( const Rectangle& _rRect ); - - /// re-arrange all controls, including the toolbox, it's separator, and the "real view" - virtual void resizeAll( const Rectangle& _rPlayground ); - - // re-arrange the controls belonging to the document itself - virtual void resizeDocumentView( Rectangle& _rPlayground ); - }; -} -#endif // DBAUI_DATAVIEW_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/dbaccessdllapi.h b/dbaccess/inc/dbaccessdllapi.h deleted file mode 100644 index aff4e9613ca2..000000000000 --- a/dbaccess/inc/dbaccessdllapi.h +++ /dev/null @@ -1,34 +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_DBACCESSDLLAPI_H -#define INCLUDED_DBACCESSDLLAPI_H - -#include "sal/types.h" - -#if defined(DBACCESS_DLLIMPLEMENTATION) -#define DBACCESS_DLLPUBLIC SAL_DLLPUBLIC_EXPORT -#else -#define DBACCESS_DLLPUBLIC SAL_DLLPUBLIC_IMPORT -#endif -#define DBACCESS_DLLPRIVATE SAL_DLLPRIVATE - -#endif /* INCLUDED_DBACCESSDLLAPI_H */ - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/dbaundomanager.hxx b/dbaccess/inc/dbaundomanager.hxx deleted file mode 100644 index a04b57248053..000000000000 --- a/dbaccess/inc/dbaundomanager.hxx +++ /dev/null @@ -1,96 +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 DBACCESS_DBAUNDOMANAGER_HXX -#define DBACCESS_DBAUNDOMANAGER_HXX - -#include "dbaccessdllapi.h" - -#include <com/sun/star/document/XUndoManager.hpp> - -#include <cppuhelper/implbase1.hxx> - -#include <boost/scoped_ptr.hpp> - -class SfxUndoManager; - -//...................................................................................................................... -namespace dbaui -{ -//...................................................................................................................... - - //================================================================================================================== - //= UndoManager - //================================================================================================================== - struct UndoManager_Impl; - typedef ::cppu::ImplHelper1< ::com::sun::star::document::XUndoManager > UndoManager_Base; - class DBACCESS_DLLPUBLIC UndoManager : public UndoManager_Base - { - public: - UndoManager( ::cppu::OWeakObject& i_parent, ::osl::Mutex& i_mutex ); - virtual ~UndoManager(); - - SfxUndoManager& GetSfxUndoManager() const; - - // XInterface - virtual void SAL_CALL acquire( ) throw (); - virtual void SAL_CALL release( ) throw (); - - // XComponent equivalents - void disposing(); - - // XUndoManager - virtual void SAL_CALL enterUndoContext( const OUString& i_title ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL enterHiddenUndoContext( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL leaveUndoContext( ) throw (::com::sun::star::util::InvalidStateException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addUndoAction( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoAction >& i_action ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL undo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL redo( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::document::UndoFailedException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isUndoPossible( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isRedoPossible( ) throw (::com::sun::star::uno::RuntimeException); - virtual OUString SAL_CALL getCurrentUndoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); - virtual OUString SAL_CALL getCurrentRedoActionTitle( ) throw (::com::sun::star::document::EmptyUndoStackException, ::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAllUndoActionTitles( ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< OUString > SAL_CALL getAllRedoActionTitles( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL clear( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL clearRedo( ) throw (::com::sun::star::document::UndoContextNotClosedException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL reset( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeUndoManagerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XUndoManagerListener >& i_listener ) throw (::com::sun::star::uno::RuntimeException); - - // XLockable (base of XUndoManager) - virtual void SAL_CALL lock( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL unlock( ) throw (::com::sun::star::util::NotLockedException, ::com::sun::star::uno::RuntimeException); - virtual ::sal_Bool SAL_CALL isLocked( ) throw (::com::sun::star::uno::RuntimeException); - - // XChild (base of XUndoManager) - virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException); - - private: - ::boost::scoped_ptr< UndoManager_Impl > m_pImpl; - }; - -//...................................................................................................................... -} // namespace dbaui -//...................................................................................................................... - -#endif // DBACCESS_DBAUNDOMANAGER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/dbsubcomponentcontroller.hxx b/dbaccess/inc/dbsubcomponentcontroller.hxx deleted file mode 100644 index 17319cb84325..000000000000 --- a/dbaccess/inc/dbsubcomponentcontroller.hxx +++ /dev/null @@ -1,204 +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 DBAUI_SUBCOMPONENTCONTROLLER_HXX -#define DBAUI_SUBCOMPONENTCONTROLLER_HXX - -#include "genericcontroller.hxx" - -#include <com/sun/star/document/XScriptInvocationContext.hpp> -#include <com/sun/star/sdbc/XConnection.hpp> -#include <com/sun/star/sdbc/XDatabaseMetaData.hpp> -#include <com/sun/star/sdbc/XDataSource.hpp> -#include <com/sun/star/util/XNumberFormatter.hpp> -#include <com/sun/star/util/XModifiable.hpp> - -#include <comphelper/broadcasthelper.hxx> -#include <comphelper/proparrhlp.hxx> -#include <comphelper/propertycontainer.hxx> -#include <connectivity/dbmetadata.hxx> -#include <cppuhelper/implbase2.hxx> - -#include <memory> - -//........................................................................ -namespace dbaui -{ -//........................................................................ - - //==================================================================== - //= DBSubComponentController - //==================================================================== - class DBSubComponentController; - - typedef ::cppu::ImplInheritanceHelper2 < OGenericUnoController - , ::com::sun::star::document::XScriptInvocationContext - , ::com::sun::star::util::XModifiable - > DBSubComponentController_Base; - - struct DBSubComponentController_Impl; - class DBACCESS_DLLPUBLIC DBSubComponentController : public DBSubComponentController_Base - { - private: - ::std::auto_ptr<DBSubComponentController_Impl> m_pImpl; - - private: - /** forces usage of a connection which we do not own - <p>To be used from within XInitialization::initialize, resp. impl_initialize, only.</p> - */ - void initializeConnection( const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxForeignConn ); - - protected: - // OGenericUnoController - initialization - virtual void impl_initialize(); - - // OGenericUnoController - virtual void Execute(sal_uInt16 nId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const; - - sal_Bool impl_isModified() const; - virtual void impl_onModifyChanged(); - - public: - - sal_Bool isReadOnly() const; - sal_Bool isEditable() const; - void setEditable(sal_Bool _bEditable); - - // ---------------------------------------------------------------- - // asking for connection-related stuff - - sal_Bool isConnected() const; - - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData > - getMetaData( ) const; - - // ---------------------------------------------------------------- - // access to the data source / document - OUString getDataSourceName() const; - const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& - getDataSource() const; - sal_Bool haveDataSource() const; - - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > - getDatabaseDocument() const; - - /** provides access to the SDB-level database meta data of the current connection - */ - const ::dbtools::DatabaseMetaData& getSdbMetaData() const; - - /** appends an error in the current environment. - */ - void appendError( - const OUString& _rErrorMessage, - const ::dbtools::StandardSQLState _eSQLState = ::dbtools::SQL_GENERAL_ERROR, - const sal_Int32 _nErrorCode = 1000 - ); - - /** clears the error state. - */ - void clearError(); - - /** @return - <TRUE/> when an error was set otherwise <FALSE/> - */ - sal_Bool hasError() const; - - /** returns the current error - */ - const ::dbtools::SQLExceptionInfo& getError() const; - - /** displays the current error, or does nothing if there is no current error - */ - void displayError(); - - /** shows an info box with the string conntection lost. - */ - void connectionLostMessage() const; - - /** gives access to the currently used connection - @return - the currently used connection. - */ - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& - getConnection() const; - - /** returns the number formatter - */ - ::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatter > getNumberFormatter() const; - - // ::com::sun::star::frame::XController - virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException ); - - // XScriptInvocationContext - virtual ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedScripts > SAL_CALL getScriptContainer() throw (::com::sun::star::uno::RuntimeException); - - // XModifiable - virtual ::sal_Bool SAL_CALL isModified( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setModified( ::sal_Bool bModified ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException); - - // XModifyBroadcaster - virtual void SAL_CALL addModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeModifyListener( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener ) throw (::com::sun::star::uno::RuntimeException); - - // XTitle - virtual OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException); - - protected: - DBSubComponentController(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxORB); - virtual ~DBSubComponentController(); - - virtual void disconnect(); - virtual void reconnect( sal_Bool _bUI ); - sal_Bool ensureConnected( sal_Bool _bUI ) { if ( !isConnected() ) reconnect( _bUI ); return isConnected(); } - - /** called when our connection is beeing disposed - <p>The default implementation does a reconnect</p> - */ - virtual void losingConnection( ); - - protected: - // XEventListener - virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException ); - - // OComponentHelper - virtual void SAL_CALL disposing(); - - // XInterface - virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(const ::com::sun::star::uno::Type& _rType) throw (::com::sun::star::uno::RuntimeException); - - // XTypeProvider - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException); - - protected: - sal_Int32 getCurrentStartNumber() const; - - private: - DBSubComponentController(); // never implemented - }; - -//........................................................................ -} // namespace dbaui -//........................................................................ - -#endif // DBAUI_SUBCOMPONENTCONTROLLER_HXX - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/dbaccess/inc/genericcontroller.hxx b/dbaccess/inc/genericcontroller.hxx deleted file mode 100644 index 6a7fd7f4bc2c..000000000000 --- a/dbaccess/inc/genericcontroller.hxx +++ /dev/null @@ -1,531 +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 DBAUI_GENERICCONTROLLER_HXX -#define DBAUI_GENERICCONTROLLER_HXX - -#include "AsyncronousLink.hxx" -#include "controllerframe.hxx" -#include "dbaccessdllapi.h" -#include "IController.hxx" - -#include <com/sun/star/frame/CommandGroup.hpp> -#include <com/sun/star/frame/XController2.hpp> -#include <com/sun/star/frame/XDispatch.hpp> -#include <com/sun/star/frame/XDispatchInformationProvider.hpp> -#include <com/sun/star/frame/XDispatchProviderInterceptor.hpp> -#include <com/sun/star/frame/XFrameActionListener.hpp> -#include <com/sun/star/frame/XTitle.hpp> -#include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> -#include <com/sun/star/frame/XLayoutManager.hpp> -#include <com/sun/star/lang/XInitialization.hpp> -#include <com/sun/star/lang/XServiceInfo.hpp> -#include <com/sun/star/sdb/XDatabaseContext.hpp> -#include <com/sun/star/sdbc/XConnection.hpp> -#include <com/sun/star/sdbc/XDataSource.hpp> -#include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/util/XModifyListener.hpp> -#include <com/sun/star/util/XURLTransformer.hpp> -#include <com/sun/star/awt/XUserInputInterception.hpp> - -#include <comphelper/broadcasthelper.hxx> -#include <comphelper/sharedmutex.hxx> -#include <comphelper/namedvaluecollection.hxx> -#include <comphelper/stl_types.hxx> -#include <connectivity/dbexception.hxx> -#include <cppuhelper/compbase11.hxx> -#include <cppuhelper/interfacecontainer.h> - -#include <boost/optional.hpp> -#include <sfx2/userinputinterception.hxx> - -namespace dbtools -{ - class SQLExceptionInfo; -} - -class Window; -namespace dbaui -{ - class ODataView; - - // ==================================================================== - // = optional - // ==================================================================== - /** convenience wrapper around boost::optional, allowing typed assignments - */ - template < typename T > - class optional : public ::boost::optional< T > - { - typedef ::boost::optional< T > base_type; - - public: - optional ( ) : base_type( ) { } - explicit optional ( T const& val ) : base_type( val ) { } - optional ( optional const& rhs ) : base_type( (base_type const&)rhs ) { } - - public: - optional& operator= ( T const& rhs ) - { - base_type::reset( rhs ); - return *this; - } - optional& operator= ( optional< T > const& rhs ) - { - if ( rhs.is_initialized() ) - base_type::reset( rhs.get() ); - else - base_type::reset(); - return *this; - } - }; - - template< typename T > - inline bool SAL_CALL operator >>= ( const ::com::sun::star::uno::Any & _any, optional< T >& _value ) - { - _value.reset(); // de-init the optional value - - T directValue = T(); - if ( _any >>= directValue ) - _value.reset( directValue ); - - return !!_value; - } - - // ==================================================================== - // = FeatureState - // ==================================================================== - /** describes the state of a feature - - In opposite to the FeatureStateEvent in css.frame, this one allows for multiple states to be specified at once. - With this, you can for instance specify that a toolbox item is checked, and has a certain title, at the same - time. - */ - struct FeatureState - { - sal_Bool bEnabled; - - optional< bool > bChecked; - optional< bool > bInvisible; - ::com::sun::star::uno::Any aValue; - optional< OUString > sTitle; - - FeatureState() : bEnabled(sal_False) { } - }; - - // ==================================================================== - // = helper - // ==================================================================== - - // .................................................................... - struct ControllerFeature : public ::com::sun::star::frame::DispatchInformation - { - sal_uInt16 nFeatureId; - }; - - // .................................................................... - typedef ::std::map < OUString - , ControllerFeature - , ::std::less< OUString > - > SupportedFeatures; - - // .................................................................... - struct CompareFeatureById : ::std::binary_function< SupportedFeatures::value_type, sal_Int32, bool > - { - // ................................................................ - inline bool operator()( const SupportedFeatures::value_type& _aType, const sal_Int32& _nId ) const - { - return !!( _nId == _aType.second.nFeatureId ); - } - }; - - // .................................................................... - struct FeatureListener - { - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > - xListener; - sal_Int32 nId; - sal_Bool bForceBroadcast; - }; - - // .................................................................... - typedef ::std::deque< FeatureListener > FeatureListeners; - - // .................................................................... - struct FindFeatureListener : ::std::binary_function< FeatureListener, ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >, bool > - { - // ................................................................ - inline bool operator()( const FeatureListener& lhs, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& rhs ) const - { - return !!( lhs.xListener == rhs ); - } - }; - - // .................................................................... - typedef ::comphelper::SharedMutexBase OGenericUnoController_MBASE; - - typedef ::cppu::WeakComponentImplHelper11 < ::com::sun::star::frame::XDispatch - , ::com::sun::star::frame::XDispatchProviderInterceptor - , ::com::sun::star::util::XModifyListener - , ::com::sun::star::frame::XFrameActionListener - , ::com::sun::star::lang::XInitialization - , ::com::sun::star::lang::XServiceInfo - , ::com::sun::star::frame::XDispatchInformationProvider - , ::com::sun::star::frame::XController2 - , ::com::sun::star::frame::XTitle - , ::com::sun::star::frame::XTitleChangeBroadcaster - , ::com::sun::star::awt::XUserInputInterception - > OGenericUnoController_Base; - - struct OGenericUnoController_Data; - // ==================================================================== - class DBACCESS_DLLPUBLIC OGenericUnoController - :public OGenericUnoController_MBASE - ,public OGenericUnoController_Base - ,public IController - { - private: - SupportedFeatures m_aSupportedFeatures; - ::comphelper::NamedValueCollection - m_aInitParameters; - - ::std::auto_ptr< OGenericUnoController_Data > - m_pData; - ODataView* m_pView; // our (VCL) "main window" - -#ifdef DBG_UTIL - bool m_bDescribingSupportedFeatures; -#endif - - protected: - // ---------------------------------------------------------------- - // attributes - struct DispatchTarget - { - ::com::sun::star::util::URL aURL; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xListener; - - DispatchTarget() { } - DispatchTarget(const ::com::sun::star::util::URL& rURL, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > xRef) : aURL(rURL), xListener(xRef) { } - }; - - DECLARE_STL_MAP( sal_uInt16, FeatureState, ::std::less< sal_uInt16 >, StateCache ); - DECLARE_STL_VECTOR( DispatchTarget, Dispatch); - - FeatureListeners m_aFeaturesToInvalidate; - - ::osl::Mutex m_aFeatureMutex; // locked when features are append to or remove from deque - StateCache m_aStateCache; // save the current status of feature state - Dispatch m_arrStatusListener; // all our listeners where we dispatch status changes - OAsyncronousLink m_aAsyncInvalidateAll; - OAsyncronousLink m_aAsyncCloseTask; // called when a task shoud be closed - - ::com::sun::star::uno::Reference< ::com::sun::star::util::XURLTransformer > m_xUrlTransformer; // needed sometimes - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ControllerFrame m_aCurrentFrame; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xSlaveDispatcher; // for intercepting dispatches - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > m_xMasterDispatcher; // dito - ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XDatabaseContext > m_xDatabaseContext; - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > m_xTitleHelper; - - sal_Bool m_bPreview; - sal_Bool m_bReadOnly; - - sal_Bool m_bCurrentlyModified : 1; - sal_Bool m_bExternalTitle : 1; - - - - // ---------------------------------------------------------------- - // attribute access - ::osl::Mutex& getMutex() const { return OGenericUnoController_MBASE::getMutex(); } - ::cppu::OBroadcastHelper& getBroadcastHelper() { return OGenericUnoController_Base::rBHelper; } - - // ---------------------------------------------------------------- - // methods - OGenericUnoController( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rM ); - const ::comphelper::NamedValueCollection& - getInitParams() const { return m_aInitParameters; } - - - /** open the help agent for the given help id. - @param _nHelpId - The help id to dispatch. - */ - void openHelpAgent( const OString& _sHelpId ); - - /** open the help agent for the given help url. - @param _pHelpStringURL - The help url to dispatch. - */ - void openHelpAgent( const OUString& _suHelpStringURL ); - - /** opens the given Help URL in the help agent - - The URL does not need to be parsed already, it is passed through - XURLTransformer::parseStrict before it is used. - */ - void openHelpAgent( const ::com::sun::star::util::URL& _rURL ); - - // closes the task when possible - void closeTask(); - - // if getMenu returns a non empty string than this will be dispatched at the frame - virtual void loadMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame); - - /** called when our menu has been loaded into our frame, can be used to load sub toolbars - - @param _xLayoutManager - The layout manager. - */ - virtual void onLoadedMenu(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager >& _xLayoutManager); - - // all the features which should be handled by this class - virtual void describeSupportedFeatures(); - - // state of a feature. 'feature' may be the handle of a ::com::sun::star::util::URL somebody requested a dispatch interface for OR a toolbar slot. - virtual FeatureState GetState(sal_uInt16 nId) const; - // execute a feature - virtual void Execute(sal_uInt16 nId , const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - - /** describes a feature supported by the controller - - Must not be called outside <member>describeSupportedFeatures</member>. - - @param _pAsciiCommandURL - the URL of the feature command - @param _nFeatureId - the id of the feature. Later references to this feature usually happen by id, not by - URL - @param _nCommandGroup - the command group of the feature. This is important for configuring the controller UI - by the user, see also <type scope="com::sun::star::frame">CommandGroup</type>. - */ - void implDescribeSupportedFeature( - const sal_Char* _pAsciiCommandURL, - sal_uInt16 _nFeatureId, - sal_Int16 _nCommandGroup = ::com::sun::star::frame::CommandGroup::INTERNAL - ); - - /** returns <TRUE/> if the feature is supported, otherwise <FALSE/> - @param _nId - The ID of the feature. - */ - sal_Bool isFeatureSupported( sal_Int32 _nId ); - - // gets the URL which the given id is assigned to - ::com::sun::star::util::URL getURLForId(sal_Int32 _nId) const; - - /** determines whether the given feature ID denotes a user-defined feature - - @see IController::registerCommandURL - */ - bool isUserDefinedFeature( const sal_uInt16 nFeatureId ) const; - - /** determines whether the given feature URL denotes a user-defined feature - - @see IController::registerCommandURL - */ - bool isUserDefinedFeature( const OUString& _rFeatureURL ) const; - - // connect to a datasource - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect( - const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDataSource>& _xDataSource, - ::dbtools::SQLExceptionInfo* _pErrorInfo - ); - - // connect to a datasource - ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > connect( - const OUString& _rsDataSourceName, - const OUString& _rContextInformation, - ::dbtools::SQLExceptionInfo* _pErrorInfo - ); - - void startConnectionListening(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection); - void stopConnectionListening(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConnection); - - /** return the container window of the top most frame - @return - The top most container window, nmay be <NULL/>. - */ - ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow> getTopMostContainerWindow() const; - - // XInitialize will be called inside initialize - virtual void impl_initialize(); - - virtual OUString getPrivateTitle() const { return OUString(); } - - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitle > impl_getTitleHelper_throw(); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > getPrivateModel() const - { - return ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >(); - } - - virtual void startFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); - virtual void stopFrameListening( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _rxFrame ); - - void releaseNumberForComponent(); - - virtual ~OGenericUnoController(); - - private: - void fillSupportedFeatures(); - - void InvalidateAll_Impl(); - void InvalidateFeature_Impl(); - - void ImplInvalidateFeature( sal_Int32 _nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener >& _xListener, sal_Bool _bForceBroadcast ); - - sal_Bool ImplInvalidateTBItem(sal_uInt16 nId, const FeatureState& rState); - void ImplBroadcastFeatureState(const OUString& _rFeature, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener, sal_Bool _bIgnoreCache); - - // link methods - DECL_LINK(OnAsyncInvalidateAll, void*); - DECL_LINK(OnAsyncCloseTask, void*); - - public: - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > getORB() const { return m_xContext; } - ODataView* getView() const { return m_pView; } - void setView( ODataView& i_rView ) { m_pView = &i_rView; } - void clearView() { m_pView = NULL; } - // shows a error box if the SQLExceptionInfo is valid - void showError(const ::dbtools::SQLExceptionInfo& _rInfo); - - // if xListener is NULL the change will be forwarded to all listeners to the given ::com::sun::star::util::URL - // if _bForceBroadcast is sal_True, the current feature state is broadcasted no matter if it is the same as the cached state - virtual void InvalidateFeature(const OUString& rURLPath, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener = NULL, sal_Bool _bForceBroadcast = sal_False); - // if there is an ::com::sun::star::util::URL translation for the id ('handle') the preceding InvalidateFeature is used. - // if there is a toolbar slot with the given id it is updated (the new state is determined via GetState) - // if _bForceBroadcast is sal_True, the current feature state is broadcasted no matter if it is the same as the cached state - virtual void InvalidateFeature(sal_uInt16 nId, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & xListener = NULL, sal_Bool _bForceBroadcast = sal_False); - - /** InvalidateAll invalidates all features currently known - */ - virtual void InvalidateAll(); - // late construction - virtual sal_Bool Construct(Window* pParent); - - /** get the layout manager - @param _xFrame - The frame to ask for the layout manager. - @return - The layout manager of the frame, can be <NULL/> if the frame isn't initialized. - */ - ::com::sun::star::uno::Reference< ::com::sun::star::frame::XLayoutManager > getLayoutManager(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& _xFrame) const; - - // IController - virtual void executeUnChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - virtual void executeChecked(const ::com::sun::star::util::URL& _rCommand, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - virtual void executeUnChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - virtual void executeChecked(sal_uInt16 _nCommandId, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs); - virtual sal_Bool isCommandEnabled(sal_uInt16 _nCommandId) const; - virtual sal_Bool isCommandEnabled(const OUString& _rCompleteCommandURL) const; - virtual sal_uInt16 registerCommandURL( const OUString& _rCompleteCommandURL ); - virtual void notifyHiContrastChanged(); - virtual sal_Bool isDataSourceReadOnly() const; - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController > getXController() throw( ::com::sun::star::uno::RuntimeException ); - virtual bool interceptUserInput( const NotifyEvent& _rEvent ); - - // misc - virtual sal_Bool isCommandChecked(sal_uInt16 _nCommandId) const; - - // ::com::sun::star::lang::XEventListener - virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& Source) throw( ::com::sun::star::uno::RuntimeException ); - - // ::com::sun::star::util::XModifyListener - virtual void SAL_CALL modified(const ::com::sun::star::lang::EventObject& aEvent) throw( ::com::sun::star::uno::RuntimeException ); - - // XInterface - virtual void SAL_CALL acquire( ) throw (); - virtual void SAL_CALL release( ) throw (); - - // ::com::sun::star::frame::XController2 - virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > SAL_CALL getComponentWindow() throw (::com::sun::star::uno::RuntimeException); - virtual OUString SAL_CALL getViewControllerName() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getCreationArguments() throw (::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::frame::XController - virtual void SAL_CALL attachFrame(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > & xFrame) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL attachModel(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xModel) throw( ::com::sun::star::uno::RuntimeException ); - virtual sal_Bool SAL_CALL suspend(sal_Bool bSuspend) throw( ::com::sun::star::uno::RuntimeException ) = 0; - virtual ::com::sun::star::uno::Any SAL_CALL getViewData(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual void SAL_CALL restoreViewData(const ::com::sun::star::uno::Any& Data) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > SAL_CALL getModel(void) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame > SAL_CALL getFrame(void) throw( ::com::sun::star::uno::RuntimeException ); - - // ::com::sun::star::frame::XDispatch - virtual void SAL_CALL dispatch(const ::com::sun::star::util::URL& aURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& aArgs) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeStatusListener(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XStatusListener > & aListener, const ::com::sun::star::util::URL& aURL) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::frame::XDispatchProviderInterceptor - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getSlaveDispatchProvider(void) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setSlaveDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > SAL_CALL getMasterDispatchProvider(void) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setMasterDispatchProvider(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatchProvider > & _xNewProvider) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::frame::XDispatchProvider - virtual ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(const ::com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags) throw( ::com::sun::star::uno::RuntimeException ); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(const ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchDescriptor >& aDescripts) throw( ::com::sun::star::uno::RuntimeException ); - - // ::com::sun::star::lang::XComponent - virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException); //LLA: need solar mutex {OGenericUnoController_COMPBASE::dispose(); } - virtual void SAL_CALL disposing(); - virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException); - - // ::com::sun::star::frame::XFrameActionListener - virtual void SAL_CALL frameAction(const ::com::sun::star::frame::FrameActionEvent& aEvent) throw( ::com::sun::star::uno::RuntimeException ); - // lang::XInitialization - virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw(::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException); - - // XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException) = 0; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw(::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< OUString> SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException) = 0; - - // XDispatchInformationProvider - virtual ::com::sun::star::uno::Sequence< ::sal_Int16 > SAL_CALL getSupportedCommandGroups() throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL getConfigurableDispatchInformation( ::sal_Int16 ) throw (::com::sun::star::uno::RuntimeException); - - // XTitle - virtual OUString SAL_CALL getTitle( ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setTitle( const OUString& sTitle ) throw (::com::sun::star::uno::RuntimeException); - - // XTitleChangeBroadcaster - virtual void SAL_CALL addTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeTitleChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XTitleChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException); - - // XUserInputInterception - virtual void SAL_CALL addKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeKeyHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XKeyHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException); - - protected: -#ifdef _MSC_VER - OGenericUnoController(); // never implemented -#endif - }; -} - -#endif //DBAUI_GENERICCONTROLLER_HXX - - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |