diff options
author | Jakub Trzebiatowski <ubap.dev@gmail.com> | 2016-05-24 16:44:19 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-05-26 19:00:41 +0000 |
commit | d4188f643db050c962a937547d19a9a08bd2235d (patch) | |
tree | 98185a08e74a77f3f5912ea55d523afb87e57763 /sw/inc/unostyle.hxx | |
parent | f2d039f67743c7588df5cfd725915627b6efb0ba (diff) |
Sw UNO API TableStyles getByName
Implementing TableStyle family getByName, hasByName, getByIndex
Implementing SwXTextTableStyle
Implementing basic tests
Change-Id: I256189db8631a713c4aae6b449409bbfaa776f24
Reviewed-on: https://gerrit.libreoffice.org/25410
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sw/inc/unostyle.hxx')
-rw-r--r-- | sw/inc/unostyle.hxx | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx index 72b6b04cc24e..9a56b5c409e2 100644 --- a/sw/inc/unostyle.hxx +++ b/sw/inc/unostyle.hxx @@ -246,6 +246,35 @@ protected: virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew) override; }; + +class SwTableAutoFormat; + +/// A text table style is a uno api wrapper for a SwTableAutoFormat +class SwXTextTableStyle : public cppu::WeakImplHelper<css::style::XStyle, css::lang::XServiceInfo> +{ + OUString m_sTableAutoFormatName; + SwDocShell* m_pDocShell; + + SwTableAutoFormat* GetTableAutoFormat(); +public: + SwXTextTableStyle(SwDocShell* pDocShell, const OUString& rTableAutoFormatName); + //XStyle + virtual sal_Bool SAL_CALL isUserDefined() throw (css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL isInUse() throw (css::uno::RuntimeException, std::exception) override; + virtual OUString SAL_CALL getParentStyle() throw (css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setParentStyle(const OUString& aParentStyle ) throw (css::container::NoSuchElementException, css::uno::RuntimeException, std::exception) override; + + //XNamed + virtual OUString SAL_CALL getName() throw(css::uno::RuntimeException, std::exception) override; + virtual void SAL_CALL setName(const OUString& rName) throw(css::uno::RuntimeException, std::exception) override; + + //XServiceInfo + virtual OUString SAL_CALL getImplementationName() throw(css::uno::RuntimeException, std::exception) override; + virtual sal_Bool SAL_CALL supportsService(const OUString& rServiceName) throw(css::uno::RuntimeException, std::exception) override; + virtual css::uno::Sequence<OUString> SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException, std::exception) override; + + static css::uno::Reference<css::style::XStyle> CreateXTextTableStyle(SwDocShell* pDocShell, const OUString& rTableAutoFormatName); +}; #endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |