diff options
author | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-11-28 03:25:00 +0100 |
---|---|---|
committer | Bjoern Michaelsen <bjoern.michaelsen@canonical.com> | 2015-11-29 10:36:52 +0100 |
commit | 5bcb5f0481a2a22b2166f9afa6bbf897ab239a21 (patch) | |
tree | d03f80bfc347e093e372ddee02f7753c53645941 | |
parent | b388191cebadb725ad8ff0f052040617c2895627 (diff) |
SwXStyleFamily has no need to be in a header
Change-Id: I2bc38e870377bd4355b373e1fee0a3fd95866793
-rw-r--r-- | sw/inc/unostyle.hxx | 54 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 53 |
2 files changed, 54 insertions, 53 deletions
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index 659c2bdf83b5..b2b2359f18cf 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -49,6 +49,7 @@ class SwStyleProperties_Impl; class SwAutoStylesEnumImpl; class IStyleAccess; class SfxItemSet; +class SwXStyleFamily; typedef std::shared_ptr<SfxItemSet> SfxItemSet_Pointer_t; class SwXStyleFamilies : public cppu::WeakImplHelper @@ -94,59 +95,6 @@ public: virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; }; -class SwXStyleFamily : public cppu::WeakImplHelper -< - css::container::XNameContainer, - css::lang::XServiceInfo, - css::container::XIndexAccess, - css::beans::XPropertySet ->, - public SfxListener -{ - SfxStyleFamily m_eFamily; - SfxStyleSheetBasePool* m_pBasePool; - SwDocShell* m_pDocShell; - - SwXStyle* _FindStyle(const OUString& rStyleName) const; -public: - SwXStyleFamily(SwDocShell* pDocShell, const SfxStyleFamily eFamily); - virtual ~SwXStyleFamily(); - - //XIndexAccess - virtual sal_Int32 SAL_CALL getCount() throw( css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; - - //XElementAccess - virtual css::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(css::uno::RuntimeException, std::exception) override; - virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(css::uno::RuntimeException, std::exception) override; - - //XNameAccess - virtual css::uno::Any SAL_CALL getByName(const OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() throw( css::uno::RuntimeException, std::exception ) override; - virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( css::uno::RuntimeException, std::exception ) override; - - //XNameContainer - virtual void SAL_CALL insertByName(const OUString& Name, const css::uno::Any& Element) throw( css::lang::IllegalArgumentException, css::container::ElementExistException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL replaceByName(const OUString& Name, const css::uno::Any& Element) throw( css::lang::IllegalArgumentException, css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; - virtual void SAL_CALL removeByName(const OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; - - //XPropertySet - virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; - - //SfxListener - virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; - - //XServiceInfo - virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override; - virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override; - virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; -}; class SwXStyle : public cppu::WeakImplHelper < diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index eda26eb8dbc5..de07866cd360 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -113,6 +113,59 @@ namespace { SFX_STYLE_FAMILY_PSEUDO, nsSwGetPoolIdFromName::GET_POOLID_NUMRULE, "NumberingStyles", STR_STYLE_FAMILY_NUMBERING} }; } +class SwXStyleFamily : public cppu::WeakImplHelper +< + css::container::XNameContainer, + css::lang::XServiceInfo, + css::container::XIndexAccess, + css::beans::XPropertySet +>, + public SfxListener +{ + SfxStyleFamily m_eFamily; + SfxStyleSheetBasePool* m_pBasePool; + SwDocShell* m_pDocShell; + + SwXStyle* _FindStyle(const OUString& rStyleName) const; +public: + SwXStyleFamily(SwDocShell* pDocShell, const SfxStyleFamily eFamily); + virtual ~SwXStyleFamily(); + + //XIndexAccess + virtual sal_Int32 SAL_CALL getCount() throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 nIndex) throw( css::lang::IndexOutOfBoundsException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + + //XElementAccess + virtual css::uno::Type SAL_CALL SAL_CALL getElementType( ) throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL SAL_CALL hasElements( ) throw(css::uno::RuntimeException, std::exception) override; + + //XNameAccess + virtual css::uno::Any SAL_CALL getByName(const OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL hasByName(const OUString& Name) throw( css::uno::RuntimeException, std::exception ) override; + + //XNameContainer + virtual void SAL_CALL insertByName(const OUString& Name, const css::uno::Any& Element) throw( css::lang::IllegalArgumentException, css::container::ElementExistException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL replaceByName(const OUString& Name, const css::uno::Any& Element) throw( css::lang::IllegalArgumentException, css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + virtual void SAL_CALL removeByName(const OUString& Name) throw( css::container::NoSuchElementException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception ) override; + + //XPropertySet + virtual css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual css::uno::Any SAL_CALL getPropertyValue( const OUString& PropertyName ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL addPropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& xListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL removePropertyChangeListener( const OUString& aPropertyName, const css::uno::Reference< css::beans::XPropertyChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL addVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL removeVetoableChangeListener( const OUString& PropertyName, const css::uno::Reference< css::beans::XVetoableChangeListener >& aListener ) throw (css::beans::UnknownPropertyException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override; + + //SfxListener + virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override; + + //XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw( css::uno::RuntimeException, std::exception ) override; + virtual sal_Bool SAL_CALL supportsService(const OUString& ServiceName) throw( css::uno::RuntimeException, std::exception ) override; + virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw( css::uno::RuntimeException, std::exception ) override; +}; using namespace ::com::sun::star; |