diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-02-06 12:09:48 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-02-06 12:44:37 +0100 |
commit | 1a3c90a292c7fc9060604151de9dc51eecf5b6a7 (patch) | |
tree | 226567cca6b2f74e749f36cc3ef3b76d67eb91a1 /svx | |
parent | fdfd5c111de740456bc03df727b9c74a617237fc (diff) |
sw: let drawinglayer manage gradient styles of our textframes
With this, the hacks from commits
81a46fc86a530f028a5bd2f5e52fe0372d50ee38 and
d7efffebd9651dd866349915360ade64b97d7301 are no longer necessary.
Diffstat (limited to 'svx')
-rw-r--r-- | svx/inc/svx/unofill.hxx | 1 | ||||
-rw-r--r-- | svx/source/unodraw/unogtabl.cxx | 24 |
2 files changed, 3 insertions, 22 deletions
diff --git a/svx/inc/svx/unofill.hxx b/svx/inc/svx/unofill.hxx index 75c5237fb14d..523905a1d97a 100644 --- a/svx/inc/svx/unofill.hxx +++ b/svx/inc/svx/unofill.hxx @@ -26,7 +26,6 @@ class SdrModel; SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( SdrModel* pModel ); -SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoTextGradientTable_createInstance( SdrModel* pModel, sal_uInt16 nWhich ); SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoHatchTable_createInstance( SdrModel* pModel ); SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoBitmapTable_createInstance( SdrModel* pModel ); SVX_DLLPUBLIC ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SvxUnoTransGradientTable_createInstance( SdrModel* pModel ); diff --git a/svx/source/unodraw/unogtabl.cxx b/svx/source/unodraw/unogtabl.cxx index 0cabe7a26943..deb2e1d2d656 100644 --- a/svx/source/unodraw/unogtabl.cxx +++ b/svx/source/unodraw/unogtabl.cxx @@ -35,10 +35,8 @@ using namespace ::cppu; class SvxUnoGradientTable : public SvxUnoNameItemTable { - bool m_bTextWhich; public: SvxUnoGradientTable( SdrModel* pModel ) throw(); - SvxUnoGradientTable( SdrModel* pModel, sal_uInt16 nWhich ) throw(); virtual ~SvxUnoGradientTable() throw(); virtual NameOrIndex* createItem() const throw(); @@ -52,12 +50,7 @@ public: }; SvxUnoGradientTable::SvxUnoGradientTable( SdrModel* pModel ) throw() - : SvxUnoNameItemTable( pModel, XATTR_FILLGRADIENT, MID_FILLGRADIENT ), m_bTextWhich(false) -{ -} - -SvxUnoGradientTable::SvxUnoGradientTable( SdrModel* pModel, sal_uInt16 nWhich ) throw() - : SvxUnoNameItemTable( pModel, nWhich, MID_FILLGRADIENT ), m_bTextWhich(true) + : SvxUnoNameItemTable( pModel, XATTR_FILLGRADIENT, MID_FILLGRADIENT ) { } @@ -67,20 +60,14 @@ SvxUnoGradientTable::~SvxUnoGradientTable() throw() OUString SAL_CALL SvxUnoGradientTable::getImplementationName() throw( uno::RuntimeException ) { - if (m_bTextWhich) - return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoTextGradientTable") ); - else - return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoGradientTable") ); + return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoGradientTable") ); } uno::Sequence< OUString > SAL_CALL SvxUnoGradientTable::getSupportedServiceNames( ) throw( uno::RuntimeException ) { uno::Sequence< OUString > aSNS( 1 ); - if (m_bTextWhich) - aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.GradientTable" )); - else - aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GradientTable" )); + aSNS.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM("com.sun.star.drawing.GradientTable" )); return aSNS; } @@ -106,11 +93,6 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoGradientTable_createInstance( S return *new SvxUnoGradientTable(pModel); } -uno::Reference< uno::XInterface > SAL_CALL SvxUnoTextGradientTable_createInstance( SdrModel* pModel, sal_uInt16 nWhich ) -{ - return *new SvxUnoGradientTable(pModel, nWhich); -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |