33#include <com/sun/star/beans/PropertyAttribute.hpp>
34#include <com/sun/star/gallery/GalleryItemType.hpp>
37#define UNOGALLERY_GALLERYITEMTYPE 1
38#define UNOGALLERY_URL 2
39#define UNOGALLERY_TITLE 3
40#define UNOGALLERY_THUMBNAIL 4
41#define UNOGALLERY_GRAPHIC 5
42#define UNOGALLERY_DRAWING 6
50 ::
comphelper::PropertySetHelper( createPropertySetInfo() ),
52 mpGalleryObject( &rObject )
77 aAny <<= uno::Reference< lang::XServiceInfo >(
this);
79 aAny <<= uno::Reference< lang::XTypeProvider >(
this);
81 aAny <<= uno::Reference< gallery::XGalleryItem >(
this);
83 aAny <<= uno::Reference< beans::XPropertySet >(
this);
85 aAny <<= uno::Reference< beans::XPropertyState >(
this);
87 aAny <<= uno::Reference< beans::XMultiPropertySet >(
this);
89 aAny = OWeakAggObject::queryAggregation( rType );
97 return OWeakAggObject::queryInterface( rType );
104 OWeakAggObject::acquire();
111 OWeakAggObject::release();
117 return "com.sun.star.comp.gallery.GalleryItem";
127 return {
"com.sun.star.gallery.GalleryItem" };
132 static const uno::Sequence
aTypes {
144 return css::uno::Sequence<sal_Int8>();
158 nRet = gallery::GalleryItemType::MEDIA;
162 nRet = gallery::GalleryItemType::DRAWING;
166 nRet = gallery::GalleryItemType::GRAPHIC;
180 beans::PropertyAttribute::READONLY, 0 },
183 beans::PropertyAttribute::READONLY, 0 },
189 beans::PropertyAttribute::READONLY, 0 },
192 beans::PropertyAttribute::READONLY, 0 },
195 beans::PropertyAttribute::READONLY, 0 },
211 if( !(*
pValues >>= aNewTitle) )
213 throw lang::IllegalArgumentException();
224 if( pObj->GetTitle() != aNewTitle )
226 pObj->SetTitle( aNewTitle );
245 switch( (*ppEntries)->mnHandle )
272 *pValue <<= pObj->GetTitle();
290 if( pObj->IsThumbBitmap() )
291 aThumbnail = pObj->GetThumbBmp();
293 aThumbnail = pObj->GetThumbMtf();
313 if( gallery::GalleryItemType::DRAWING ==
getType() )
324 pModel->
setUnoModel( uno::Reference< uno::XInterface >::query( xDrawing ) );
325 *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< GalleryBinaryEngine > & 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
OUString GetMainURL(DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8) 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[]
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)
const INetURLObject & getURL() const
#define UNOGALLERY_GALLERYITEMTYPE
#define UNOGALLERY_GRAPHIC
#define UNOGALLERY_DRAWING
#define UNOGALLERY_THUMBNAIL