diff options
author | Oliver Bolte <obo@openoffice.org> | 2004-11-18 08:20:10 +0000 |
---|---|---|
committer | Oliver Bolte <obo@openoffice.org> | 2004-11-18 08:20:10 +0000 |
commit | 2a58261930ec191f9f76d60bac044815d91dee26 (patch) | |
tree | a7a63b4b8f55511be247c4621d2c55cb021d8158 /svx/source/unodraw/unobtabl.cxx | |
parent | 04619a2f993b2fee62da549ad9753e104a4342ec (diff) |
INTEGRATION: CWS impress18 (1.11.1068); FILE MERGED
2004/11/09 12:47:41 cl 1.11.1068.1: #i36727# filter empty bitmap items
Diffstat (limited to 'svx/source/unodraw/unobtabl.cxx')
-rw-r--r-- | svx/source/unodraw/unobtabl.cxx | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/svx/source/unodraw/unobtabl.cxx b/svx/source/unodraw/unobtabl.cxx index 8fe4c1df4f98..6d5084af0198 100644 --- a/svx/source/unodraw/unobtabl.cxx +++ b/svx/source/unodraw/unobtabl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: unobtabl.cxx,v $ * - * $Revision: 1.12 $ + * $Revision: 1.13 $ * - * last change: $Author: obo $ $Date: 2004-11-15 17:30:33 $ + * last change: $Author: obo $ $Date: 2004-11-18 09:20:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -102,6 +102,7 @@ public: virtual ~SvxUnoBitmapTable() throw(); virtual NameOrIndex* createItem() const throw(); + virtual bool isValid( const NameOrIndex* pItem ) const; // XServiceInfo virtual OUString SAL_CALL getImplementationName( ) throw( uno::RuntimeException ); @@ -120,6 +121,21 @@ SvxUnoBitmapTable::~SvxUnoBitmapTable() throw() { } +bool SvxUnoBitmapTable::isValid( const NameOrIndex* pItem ) const +{ + if( SvxUnoNameItemTable::isValid( pItem ) ) + { + const XFillBitmapItem* pBitmapItem = dynamic_cast< const XFillBitmapItem* >( pItem ); + if( pBitmapItem ) + { + const GraphicObject& rGraphic = pBitmapItem->GetValue().GetGraphicObject(); + return rGraphic.GetSizeBytes() > 0; + } + } + + return false; +} + OUString SAL_CALL SvxUnoBitmapTable::getImplementationName() throw( uno::RuntimeException ) { return OUString( RTL_CONSTASCII_USTRINGPARAM("SvxUnoBitmapTable") ); |