diff options
author | Oliver Bolte <obo@openoffice.org> | 2007-07-17 12:37:55 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2007-07-17 12:37:55 +0000 |
commit | 574110e67c0006b7d69e9b810a6a8c40f972ac47 (patch) | |
tree | 4bb08bc3f1c8cd4c30ba5faf1d1d5d97aeb658dc /sfx2 | |
parent | 17734a1f53b560cb40717b7d9a3cb3166c23c8a4 (diff) |
INTEGRATION: CWS basemodelrefactoring (1.2.2); FILE MERGED
2007/05/09 15:40:29 mba 1.2.2.2: define used at wrong place
2007/04/16 21:50:04 mba 1.2.2.1: add changes from CWS to headers moved on master
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/objuno.hxx | 191 |
1 files changed, 31 insertions, 160 deletions
diff --git a/sfx2/inc/sfx2/objuno.hxx b/sfx2/inc/sfx2/objuno.hxx index 706440f31a2e..f48d33a46375 100644 --- a/sfx2/inc/sfx2/objuno.hxx +++ b/sfx2/inc/sfx2/objuno.hxx @@ -4,9 +4,9 @@ * * $RCSfile: objuno.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: vg $ $Date: 2007-04-11 21:26:23 $ + * last change: $Author: obo $ $Date: 2007-07-17 13:37:55 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -35,202 +35,76 @@ #ifndef _SFX_OBJUNO_HXX #define _SFX_OBJUNO_HXX -#ifndef _CPPUHELPER_WEAKREF_HXX_ -#include <cppuhelper/weakref.hxx> -#endif #ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFO_HPP_ #include <com/sun/star/document/XDocumentInfo.hpp> #endif -#ifndef _COM_SUN_STAR_DOCUMENT_XDOCUMENTINFOSUPPLIER_HPP_ -#include <com/sun/star/document/XDocumentInfoSupplier.hpp> -#endif #ifndef _COM_SUN_STAR_DOCUMENT_XSTANDALONEDOCUMENTINFO_HPP_ #include <com/sun/star/document/XStandaloneDocumentInfo.hpp> #endif -#ifndef _COM_SUN_STAR_FRAME_XCONTROLLER_HPP_ -#include <com/sun/star/frame/XController.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XSTORABLE_HPP_ -#include <com/sun/star/frame/XStorable.hpp> -#endif -#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ -#include <com/sun/star/frame/XModel.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_PAPERFORMAT_HPP_ -#include <com/sun/star/view/PaperFormat.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XPRINTSETTINGSSUPPLIER_HPP_ -#include <com/sun/star/view/XPrintSettingsSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XPRINTPREVIEW_HPP_ -#include <com/sun/star/view/XPrintPreview.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XPRINTABLE_HPP_ -#include <com/sun/star/view/XPrintable.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_PAPERORIENTATION_HPP_ -#include <com/sun/star/view/PaperOrientation.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XCONTROLACCESS_HPP_ -#include <com/sun/star/view/XControlAccess.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XSELECTIONCHANGELISTENER_HPP_ -#include <com/sun/star/view/XSelectionChangeListener.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_DOCUMENTZOOMTYPE_HPP_ -#include <com/sun/star/view/DocumentZoomType.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XSCREENCURSOR_HPP_ -#include <com/sun/star/view/XScreenCursor.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XVIEWSETTINGSSUPPLIER_HPP_ -#include <com/sun/star/view/XViewSettingsSupplier.hpp> -#endif -#ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ -#include <com/sun/star/view/XSelectionSupplier.hpp> -#endif #ifndef _COM_SUN_STAR_UTIL_XMODIFYLISTENER_HPP_ #include <com/sun/star/util/XModifyListener.hpp> #endif -#ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_ -#include <com/sun/star/util/XModifiable.hpp> -#endif #ifndef _COM_SUN_STAR_UTIL_XMODIFYBROADCASTER_HPP_ #include <com/sun/star/util/XModifyBroadcaster.hpp> #endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUES_HPP_ -#include <com/sun/star/beans/PropertyValues.hpp> -#endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> #endif #ifndef _COM_SUN_STAR_BEANS_PROPERTYVALUE_HPP_ #include <com/sun/star/beans/PropertyValue.hpp> #endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_ -#include <com/sun/star/beans/PropertyState.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSETINFO_HPP_ -#include <com/sun/star/beans/XPropertySetInfo.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XMULTIPROPERTYSET_HPP_ -#include <com/sun/star/beans/XMultiPropertySet.hpp> -#endif #ifndef _COM_SUN_STAR_BEANS_XFASTPROPERTYSET_HPP_ #include <com/sun/star/beans/XFastPropertySet.hpp> #endif #ifndef _COM_SUN_STAR_BEANS_XVETOABLECHANGELISTENER_HPP_ #include <com/sun/star/beans/XVetoableChangeListener.hpp> #endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATE_HPP_ -#include <com/sun/star/beans/XPropertyState.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSTATECHANGELISTENER_HPP_ -#include <com/sun/star/beans/XPropertyStateChangeListener.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ -#include <com/sun/star/beans/PropertyAttribute.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTIESCHANGELISTENER_HPP_ -#include <com/sun/star/beans/XPropertiesChangeListener.hpp> -#endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCHANGELISTENER_HPP_ #include <com/sun/star/beans/XPropertyChangeListener.hpp> #endif -#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_ -#include <com/sun/star/beans/XPropertyAccess.hpp> -#endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYCONTAINER_HPP_ #include <com/sun/star/beans/XPropertyContainer.hpp> #endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATECHANGEEVENT_HPP_ -#include <com/sun/star/beans/PropertyStateChangeEvent.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_PROPERTYCHANGEEVENT_HPP_ -#include <com/sun/star/beans/PropertyChangeEvent.hpp> -#endif -#ifndef _COM_SUN_STAR_BEANS_NAMEDVALUE_HPP_ -#include <com/sun/star/beans/NamedValue.hpp> +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYACCESS_HPP_ +#include <com/sun/star/beans/XPropertyAccess.hpp> #endif #ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ #include <com/sun/star/lang/XEventListener.hpp> #endif -#ifndef _COM_SUN_STAR_LANG_EVENTOBJECT_HPP_ -#include <com/sun/star/lang/EventObject.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XALLLISTENERADAPTERSERVICE_HPP_ -#include <com/sun/star/script/XAllListenerAdapterService.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_XALLLISTENER_HPP_ -#include <com/sun/star/script/XAllListener.hpp> -#endif -#ifndef _COM_SUN_STAR_SCRIPT_ALLEVENTOBJECT_HPP_ -#include <com/sun/star/script/AllEventObject.hpp> -#endif -#ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_ -#include <com/sun/star/container/XChild.hpp> -#endif #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _COM_SUN_STAR_UTIL_DATETIME_HPP_ -#include <com/sun/star/util/DateTime.hpp> -#endif #ifndef _COM_SUN_STAR_EMBED_XSTORAGE_HPP_ #include <com/sun/star/embed/XStorage.hpp> #endif +#ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_ +#include <com/sun/star/lang/XComponent.hpp> +#endif #include <com/sun/star/io/IOException.hpp> -#include <com/sun/star/lang/Locale.hpp> #include <svtools/itemprop.hxx> -#include <svtools/lstner.hxx> -#ifndef _SFX_SFXBASEMODEL_HXX_ -#include <sfx2/sfxbasemodel.hxx> -#endif -#ifndef _DATETIME_HXX -#include <tools/datetime.hxx> -#endif -#include <sfx2/sfxuno.hxx> -#include <sfx2/objsh.hxx> - -class SfxDocumentInfo ; -class SfxMedium ; -class SfxFilter ; - -class SfxDocumentInfoObject: public ::com::sun::star::lang::XTypeProvider , - public ::com::sun::star::document::XDocumentInfo , - public ::com::sun::star::lang::XComponent , - public ::com::sun::star::beans::XPropertySet , - public ::com::sun::star::beans::XFastPropertySet , - public ::com::sun::star::beans::XPropertyAccess , - public ::com::sun::star::beans::XPropertyContainer , - public ::cppu::OWeakObject +#include <cppuhelper/implbase7.hxx> + +#include "sfxuno.hxx" + +class SfxDocumentInfoObject: + public ::cppu::WeakImplHelper7< ::com::sun::star::document::XDocumentInfo, + ::com::sun::star::lang::XComponent, + ::com::sun::star::beans::XPropertySet, + ::com::sun::star::beans::XFastPropertySet, + ::com::sun::star::beans::XPropertyAccess, + ::com::sun::star::beans::XPropertyContainer, + ::com::sun::star::util::XModifyBroadcaster > { - SfxItemPropertySet _aPropSet ; - sal_Bool _bStandalone; - protected: - struct SfxDocumentInfoObject_Impl* _pImp ; - SfxDocumentInfo* _pInfo ; - const SfxFilter* _pFilter ; - ::com::sun::star::uno::WeakReference < ::com::sun::star::frame::XModel > _wModel; - - ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > _aStatistic; - ::com::sun::star::lang::Locale _aCharLocale; - - SfxDocumentInfoObject( sal_Bool bStandalone ); + struct SfxDocumentInfoObject_Impl* _pImp; + void NotifyModified(); public: - SfxDocumentInfoObject( SfxObjectShell *pObjSh ); + SfxDocumentInfoObject(); ~SfxDocumentInfoObject(); - // XInterface, XTypeProvider - SFX_DECL_XINTERFACE_XTYPEPROVIDER - -//ASDBG virtual void* getImplementation(Reflection *p) -//ASDBG { return OWeakObject::getImplementation(p); } - // XComponent virtual void SAL_CALL dispose() throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener) throw( ::com::sun::star::uno::RuntimeException ); @@ -264,19 +138,20 @@ public: virtual void SAL_CALL setUserFieldName(sal_Int16 nIndex, const ::rtl::OUString& aName ) throw( ::com::sun::star::uno::RuntimeException ); virtual void SAL_CALL setUserFieldValue(sal_Int16 nIndex, const ::rtl::OUString& aValue ) throw( ::com::sun::star::uno::RuntimeException ); - static ::com::sun::star::util::DateTime impl_DateTime_Object2Struct( const DateTime& aDateTimeObject ); - static DateTime impl_DateTime_Struct2Object ( const ::com::sun::star::util::DateTime& aDateTimeStruct ); + // ::com::sun::star::util::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); + + // ::com::sun::star::util::XModifyBroadcaster + virtual void SAL_CALL addModifyListener( const com::sun::star::uno::Reference< com::sun::star::util::XModifyListener >& xListener ) throw( ::com::sun::star::uno::RuntimeException ) ; + virtual void SAL_CALL removeModifyListener( const com::sun::star::uno::Reference< com::sun::star::util::XModifyListener > & xListener) throw( ::com::sun::star::uno::RuntimeException ) ; }; -class SfxStandaloneDocumentInfoObject: public SfxDocumentInfoObject , - public ::com::sun::star::lang::XServiceInfo , +class SfxStandaloneDocumentInfoObject: public SfxDocumentInfoObject, + public ::com::sun::star::lang::XServiceInfo, public ::com::sun::star::document::XStandaloneDocumentInfo { - SfxMedium* _pMedium; ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory > _xFactory; -private: - ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > - GetStorage_Impl( const ::rtl::OUString& rName, sal_Bool bWrite ); public: SfxStandaloneDocumentInfoObject( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xFactory ); @@ -287,10 +162,6 @@ public: // XInterface, XTypeProvider, XServiceInfo SFX_DECL_XINTERFACE_XTYPEPROVIDER_XSERVICEINFO -// IMPLNAME L"com.sun.star.comp.sfx2.StandaloneDocumentInfo" -//ASDBG virtual void* getImplementation(Reflection *p) -//ASDBG { return Sf::com::sun::star::document::XDocumentInfoObject::getImplementation(p); } - // ::com::sun::star::document::XDocumentInfo virtual sal_Int16 SAL_CALL getUserFieldCount() throw( ::com::sun::star::uno::RuntimeException ); virtual ::rtl::OUString SAL_CALL getUserFieldName(sal_Int16 nIndex) throw( ::com::sun::star::uno::RuntimeException ); |