34#include <com/sun/star/beans/PropertyAttribute.hpp>
35#include <com/sun/star/gallery/GalleryItemType.hpp>
38#define UNOGALLERY_GALLERYITEMTYPE 1
39#define UNOGALLERY_URL 2
40#define UNOGALLERY_TITLE 3
41#define UNOGALLERY_THUMBNAIL 4
42#define UNOGALLERY_GRAPHIC 5
43#define UNOGALLERY_DRAWING 6
51 ::
comphelper::PropertySetHelper( createPropertySetInfo() ),
53 mpGalleryObject( &rObject )
78 aAny <<= uno::Reference< lang::XServiceInfo >(
this);
80 aAny <<= uno::Reference< lang::XTypeProvider >(
this);
82 aAny <<= uno::Reference< gallery::XGalleryItem >(
this);
84 aAny <<= uno::Reference< beans::XPropertySet >(
this);
86 aAny <<= uno::Reference< beans::XPropertyState >(
this);
88 aAny <<= uno::Reference< beans::XMultiPropertySet >(
this);
90 aAny = OWeakAggObject::queryAggregation( rType );
98 return OWeakAggObject::queryInterface( rType );
105 OWeakAggObject::acquire();
112 OWeakAggObject::release();
118 return "com.sun.star.comp.gallery.GalleryItem";
128 return {
"com.sun.star.gallery.GalleryItem" };
133 static const uno::Sequence
aTypes {
145 return css::uno::Sequence<sal_Int8>();
159 nRet = gallery::GalleryItemType::MEDIA;
163 nRet = gallery::GalleryItemType::DRAWING;
167 nRet = gallery::GalleryItemType::GRAPHIC;
181 beans::PropertyAttribute::READONLY, 0 },
184 beans::PropertyAttribute::READONLY, 0 },
190 beans::PropertyAttribute::READONLY, 0 },
193 beans::PropertyAttribute::READONLY, 0 },
196 beans::PropertyAttribute::READONLY, 0 },
212 if( !(*
pValues >>= aNewTitle) )
214 throw lang::IllegalArgumentException();
225 if( pObj->GetTitle() != aNewTitle )
227 pObj->SetTitle( aNewTitle );
246 switch( (*ppEntries)->mnHandle )
273 *pValue <<= pObj->GetTitle();
291 if( pObj->IsThumbBitmap() )
292 aThumbnail = pObj->GetThumbBmp();
294 aThumbnail = pObj->GetThumbMtf();
314 if( gallery::GalleryItemType::DRAWING ==
getType() )
325 pModel->
setUnoModel( uno::Reference< uno::XInterface >::query( xDrawing ) );
326 *pValue <<= xDrawing;
const PropertyValue * pValues
sal_uInt32 searchPosWithObject(const GalleryObject *pObj)
GalleryObjectCollection maGalleryObjectCollection
bool GetGraphic(sal_uInt32 nPos, Graphic &rGraphic)
bool InsertObject(const SgaObject &rObj, sal_uInt32 nPos=SAL_MAX_UINT32)
const std::unique_ptr< GalleryFileStorage > & getGalleryStorageEngine() const
std::unique_ptr< SgaObject > AcquireObject(sal_uInt32 nPos)
bool GetModel(sal_uInt32 nPos, SdrModel &rModel)
css::uno::Reference< css::graphic::XGraphic > GetXGraphic() const
const SfxItemPool & GetItemPool() const
void setUnoModel(const css::uno::Reference< css::uno::XInterface > &xModel)
SdrModel * GetDoc() const
css::uno::Type const & get()
GalleryDrawingModel(SdrModel *pDoc) noexcept
virtual ~GalleryDrawingModel() noexcept override
virtual ~GalleryItem() noexcept override
virtual ::sal_Int8 SAL_CALL getType() override
virtual css::uno::Any SAL_CALL queryAggregation(const css::uno::Type &rType) override
virtual void _setPropertyValues(const comphelper::PropertyMapEntry **ppEntries, const css::uno::Any *pValues) override
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL acquire() noexcept override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
const ::GalleryObject * implGetObject() const
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void _getPropertyValues(const comphelper::PropertyMapEntry **ppEntries, css::uno::Any *pValue) override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
virtual void SAL_CALL release() noexcept override
static rtl::Reference<::comphelper::PropertySetInfo > createPropertySetInfo()
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
const ::GalleryObject * mpGalleryObject
::unogallery::GalleryTheme * mpTheme
GalleryItem(::unogallery::GalleryTheme &rTheme, const GalleryObject &rObject)
void implRegisterGalleryItem(::unogallery::GalleryItem &rItem)
::GalleryTheme * implGetTheme() const
void implDeregisterGalleryItem(::unogallery::GalleryItem &rItem)
ScXMLEditAttributeMap::Entry const aEntries[]
class SvxPropertySetInfoPool
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr OUStringLiteral EMPTY
std::pair< OUString const, DataAccessDescriptorProperty > PropertyMapEntry
UNO3_GETIMPLEMENTATION_IMPL(GalleryDrawingModel)
std::optional< INetURLObject > m_oStorageUrl
#define UNOGALLERY_GALLERYITEMTYPE
#define UNOGALLERY_GRAPHIC
#define UNOGALLERY_DRAWING
#define UNOGALLERY_THUMBNAIL