diff options
Diffstat (limited to 'sc/inc')
-rw-r--r-- | sc/inc/document.hxx | 1 | ||||
-rw-r--r-- | sc/inc/nameuno.hxx | 56 | ||||
-rw-r--r-- | sc/inc/unonames.hxx | 5 |
3 files changed, 57 insertions, 5 deletions
diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx index 9fa7d0b8015d..672c8939548a 100644 --- a/sc/inc/document.hxx +++ b/sc/inc/document.hxx @@ -1553,6 +1553,7 @@ public: BOOL GetNoSetDirty() const { return bNoSetDirty; } void SetInsertingFromOtherDoc( BOOL bVal ) { bInsertingFromOtherDoc = bVal; } BOOL IsInsertingFromOtherDoc() const { return bInsertingFromOtherDoc; } + bool IsLoadingMedium() const; void SetLoadingMedium( bool bVal ); void SetImportingXML( bool bVal ); bool IsImportingXML() const { return bImportingXML; } diff --git a/sc/inc/nameuno.hxx b/sc/inc/nameuno.hxx index 27d149b3d816..2583546e463e 100644 --- a/sc/inc/nameuno.hxx +++ b/sc/inc/nameuno.hxx @@ -52,7 +52,7 @@ class ScDocShell; class ScRangeData; class ScTokenArray; - +class ScNamedRangesObj; class ScNamedRangeObj : public ::cppu::WeakImplHelper6< ::com::sun::star::sheet::XNamedRange, @@ -64,6 +64,7 @@ class ScNamedRangeObj : public ::cppu::WeakImplHelper6< public SfxListener { private: + ScNamedRangesObj* mpParent; ScDocShell* pDocShell; String aName; @@ -75,7 +76,7 @@ private: const formula::FormulaGrammar::Grammar eGrammar ); public: - ScNamedRangeObj(ScDocShell* pDocSh, const String& rNm); + ScNamedRangeObj(ScNamedRangesObj* pParent, ScDocShell* pDocSh, const String& rNm); virtual ~ScNamedRangeObj(); virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); @@ -173,10 +174,11 @@ public: }; -class ScNamedRangesObj : public ::cppu::WeakImplHelper5< +class ScNamedRangesObj : public ::cppu::WeakImplHelper6< ::com::sun::star::sheet::XNamedRanges, ::com::sun::star::container::XEnumerationAccess, ::com::sun::star::container::XIndexAccess, + ::com::sun::star::beans::XPropertySet, ::com::sun::star::document::XActionLockable, ::com::sun::star::lang::XServiceInfo >, public SfxListener @@ -184,6 +186,11 @@ class ScNamedRangesObj : public ::cppu::WeakImplHelper5< private: ScDocShell* pDocShell; + // if true, adding new name or modifying existing one will set the + // document 'modified' and broadcast the change. We turn this off during + // import. + sal_Bool mbModifyAndBroadcast; + ScNamedRangeObj* GetObjectByIndex_Impl(sal_uInt16 nIndex); ScNamedRangeObj* GetObjectByName_Impl(const ::rtl::OUString& aName); @@ -200,6 +207,8 @@ public: virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ); + bool IsModifyAndBroadcast() const; + // XNamedRanges virtual void SAL_CALL addNewByName( const ::rtl::OUString& aName, const ::rtl::OUString& aContent, const ::com::sun::star::table::CellAddress& aPosition, sal_Int32 nType ) @@ -238,6 +247,47 @@ public: throw(::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL hasElements() throw(::com::sun::star::uno::RuntimeException); + // XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > + SAL_CALL getPropertySetInfo() + throw(::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, + const ::com::sun::star::uno::Any& aValue ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::beans::PropertyVetoException, + ::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( + const ::rtl::OUString& PropertyName ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& xListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertyChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XVetoableChangeListener >& aListener ) + throw(::com::sun::star::beans::UnknownPropertyException, + ::com::sun::star::lang::WrappedTargetException, + ::com::sun::star::uno::RuntimeException); + // XActionLockable virtual sal_Bool SAL_CALL isActionLocked() throw(::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addActionLock() throw(::com::sun::star::uno::RuntimeException); diff --git a/sc/inc/unonames.hxx b/sc/inc/unonames.hxx index 6a508cf40ce1..d417f026b38f 100644 --- a/sc/inc/unonames.hxx +++ b/sc/inc/unonames.hxx @@ -642,14 +642,15 @@ // Solver #define SC_UNONAME_TIMEOUT "Timeout" - #define SC_UNO_SHAREDOC "IsDocumentShared" // EventDescriptor - #define SC_UNO_EVENTTYPE "EventType" #define SC_UNO_SCRIPT "Script" +// Named ranges +#define SC_UNO_MODIFY_BROADCAST "ModifyAndBroadcast" + #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |