31#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
69 return "com.sun.star.comp.gallery.GalleryTheme";
79 return {
"com.sun.star.gallery.GalleryTheme" };
84 static const uno::Sequence
aTypes {
96 return css::uno::Sequence<sal_Int8>();
110 return( (
mpTheme !=
nullptr ) && (
mpTheme->GetObjectCount() > 0 ) );
131 throw lang::IndexOutOfBoundsException();
136 aRet <<= uno::Reference< gallery::XGalleryItem >(
new GalleryItem( *
this, *pObj ) );
162 mpTheme->Actualize( aDummyLink );
168 const OUString& rURL, ::sal_Int32 nIndex )
186 nRet =
mpTheme->maGalleryObjectCollection.searchPosWithObject( pObj );
199 const uno::Reference< graphic::XGraphic >& rxGraphic, sal_Int32 nIndex )
208 const Graphic aGraphic( rxGraphic );
225 const uno::Reference< lang::XComponent >& Drawing, sal_Int32 nIndex )
248 uno::Reference< drawing::XDrawPagesSupplier > xDrawPagesSupplier(
Drawing, uno::UNO_QUERY_THROW );
249 uno::Reference< drawing::XDrawPages > xDrawPages( xDrawPagesSupplier->getDrawPages(), uno::UNO_SET_THROW );
250 uno::Reference< drawing::XDrawPage > xPage( xDrawPages->getByIndex( 0 ), uno::UNO_QUERY_THROW );
251 SvxDrawPage* pUnoPage = xPage.is() ? comphelper::getFromUnoTunnel<SvxDrawPage>( xPage ) :
nullptr;
255 if (pOrigPage && pOrigModel)
263 pTmpModel->
setUnoModel( uno::Reference< uno::XInterface >::query( xDrawing ) );
286 throw lang::IndexOutOfBoundsException();
297 switch( rGalleryHint.
GetType() )
334 if( !pObj || ( (*aIter)->implGetObject() == pObj ) )
336 (*aIter)->implSetInvalid();
GalleryHintType GetType() const
static Gallery * GetGalleryInstance()
void ReleaseTheme(GalleryTheme *pTheme, SfxListener &rListener)
GalleryTheme * AcquireTheme(std::u16string_view rThemeName, SfxListener &rListener)
const SfxItemPool & GetItemPool() const
void setUnoModel(const css::uno::Reference< css::uno::XInterface > &xModel)
A SdrPage contains exactly one SdrObjList and a description of the physical page dimensions (size / m...
virtual rtl::Reference< SdrPage > CloneSdrPage(SdrModel &rTargetModel) const
SdrModel & getSdrModelFromSdrPage() const
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
void EndListening(SfxBroadcaster &rBroadcaster, bool bRemoveAllDuplicates=false)
SdrPage * GetSdrPage() const
SdrModel * GetDoc() const
css::uno::Type const & get()
virtual ::sal_Int32 SAL_CALL insertURLByIndex(const OUString &URL, ::sal_Int32 Index) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual void SAL_CALL update() override
virtual ~GalleryTheme() override
virtual ::sal_Int32 SAL_CALL insertDrawingByIndex(const css::uno::Reference< css::lang::XComponent > &Drawing, ::sal_Int32 Index) override
virtual OUString SAL_CALL getName() override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
GalleryItemVector maItemVector
GalleryTheme(std::u16string_view rThemeName)
virtual sal_Bool SAL_CALL hasElements() override
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint) override
virtual ::sal_Int32 SAL_CALL insertGraphicByIndex(const css::uno::Reference< css::graphic::XGraphic > &Graphic, ::sal_Int32 Index) override
void implRegisterGalleryItem(::unogallery::GalleryItem &rItem)
virtual css::uno::Any SAL_CALL getByIndex(::sal_Int32 Index) override
virtual css::uno::Sequence< css::uno::Type > SAL_CALL getTypes() override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId() override
void implDeregisterGalleryItem(::unogallery::GalleryItem &rItem)
virtual OUString SAL_CALL getImplementationName() override
virtual void SAL_CALL removeByIndex(::sal_Int32 Index) override
virtual ::sal_Int32 SAL_CALL getCount() override
void implReleaseItems(GalleryObject const *pObj)
#define DBG_ASSERT(sCon, aError)
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)