22#include <com/sun/star/lang/DisposedException.hpp>
23#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
30#include <unomodel.hxx>
45: mpSdCustomShow(
nullptr), mpModel(
nullptr),
51: mpSdCustomShow(pShow), mpModel(
nullptr),
63 return "SdXCustomPresentation" ;
73 return {
"com.sun.star.presentation.CustomPresentation" };
82 throw lang::DisposedException();
85 throw lang::IndexOutOfBoundsException();
87 uno::Reference< drawing::XDrawPage > xPage;
91 throw lang::IllegalArgumentException();
93 SdDrawPage* pPage = comphelper::getFromUnoTunnel<SdDrawPage>( xPage );
116 throw lang::DisposedException();
120 uno::Reference< drawing::XDrawPage > xPage;
125 SvxDrawPage* pPage = comphelper::getFromUnoTunnel<SvxDrawPage>( xPage );
128 SdCustomShow::PageVec::iterator it = std::find(
160 throw lang::DisposedException();
170 throw lang::DisposedException();
180 throw lang::DisposedException();
183 throw lang::IndexOutOfBoundsException();
190 uno::Reference< drawing::XDrawPage > xRef( pPage->
getUnoPage(), uno::UNO_QUERY );
203 throw lang::DisposedException();
216 throw lang::DisposedException();
232 uno::Reference< uno::XInterface > xSource(
static_cast<cppu::OWeakObject*
>(
this) );
235 lang::EventObject aEvt;
236 aEvt.Source = xSource;
245 throw lang::DisposedException();
277 return "SdXCustomPresentationAccess";
287 return {
"com.sun.star.presentation.CustomPresentationAccess" };
313 if(
nullptr == pList)
314 throw uno::RuntimeException();
319 uno::Reference< container::XIndexContainer > xContainer;
320 if( (aElement >>= xContainer) && xContainer.is() )
323 if(
nullptr == pXShow )
324 throw lang::IllegalArgumentException();
328 if(
nullptr == pShow )
336 throw lang::IllegalArgumentException();
345 pCompare = pList->
Next() )
347 if( pCompare == pShow || pCompare->
GetName() == pShow->
GetName() )
348 throw container::ElementExistException();
351 pList->
push_back(std::unique_ptr<SdCustomShow>(pShow));
364 throw container::NoSuchElementException();
366 pList->
erase( pShow );
386 throw container::NoSuchElementException();
389 uno::Reference< container::XIndexContainer > xRef( pShow->
getUnoCustomShow(), uno::UNO_QUERY );
398 const sal_uInt32
nCount = pList ? pList->
size() : 0;
400 uno::Sequence< OUString > aSequence(
nCount );
401 OUString* pStringList = aSequence.getArray();
407 pStringList[nIdx] = pShow->
GetName();
431 return pList && !pList->
empty();
439 const sal_uInt32
nCount = pList ? pList->
size() : 0;
444 if( pShow->
GetName() == rName )
void push_back(std::unique_ptr< SdCustomShow > p)
void erase(std::vector< std::unique_ptr< SdCustomShow > >::iterator it)
css::uno::Reference< css::uno::XInterface > getUnoCustomShow()
const OUString & GetName() const
void SetName(const OUString &rName)
PageVec & PagesVector()
Provides a direct access to the collection of the SdPage objects.
SdCustomShowList * GetCustomShowList(bool bCreate=false)
SdXImpressDocument * GetModel() const
SdCustomShow * getSdCustomShow(std::u16string_view Name) const noexcept
SdXImpressDocument & mrModel
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual void SAL_CALL removeByName(const OUString &Name) override
virtual ~SdXCustomPresentationAccess() noexcept override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual OUString SAL_CALL getImplementationName() override
SdXCustomPresentationAccess(SdXImpressDocument &rMyModel) noexcept
virtual void SAL_CALL insertByName(const OUString &aName, const css::uno::Any &aElement) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
virtual sal_Bool SAL_CALL hasElements() override
virtual void SAL_CALL replaceByName(const OUString &aName, const css::uno::Any &aElement) override
SdCustomShowList * GetCustomShowList() const noexcept
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstanceWithArguments(const css::uno::Sequence< css::uno::Any > &aArguments) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
virtual css::uno::Reference< css::uno::XInterface > SAL_CALL createInstance() override
virtual void SAL_CALL dispose() override
::comphelper::OInterfaceContainerHelper4< css::lang::XEventListener > aDisposeListeners
virtual ~SdXCustomPresentation() noexcept override
virtual OUString SAL_CALL getImplementationName() override
virtual css::uno::Type SAL_CALL getElementType() override
SdXImpressDocument * GetModel() const noexcept
SdXImpressDocument * mpModel
SdCustomShow * mpSdCustomShow
virtual void SAL_CALL setName(const OUString &aName) override
virtual sal_Bool SAL_CALL hasElements() override
virtual OUString SAL_CALL getName() override
virtual void SAL_CALL removeByIndex(sal_Int32 Index) override
SdCustomShow * GetSdCustomShow() const noexcept
void SetSdCustomShow(SdCustomShow *pShow) noexcept
std::mutex aDisposeContainerMutex
SdXCustomPresentation() noexcept
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
virtual void SAL_CALL addEventListener(const css::uno::Reference< css::lang::XEventListener > &xListener) override
virtual void SAL_CALL replaceByIndex(sal_Int32 Index, const css::uno::Any &Element) override
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() override
virtual void SAL_CALL insertByIndex(sal_Int32 Index, const css::uno::Any &Element) override
virtual void SAL_CALL removeEventListener(const css::uno::Reference< css::lang::XEventListener > &aListener) override
virtual sal_Bool SAL_CALL supportsService(const OUString &ServiceName) override
SdDrawDocument * GetDoc() const
void SetModified() noexcept
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
SdrPage * GetSdrPage() const
sal_Int32 addInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
void disposeAndClear(::std::unique_lock<::std::mutex > &rGuard, const css::lang::EventObject &rEvt)
sal_Int32 removeInterface(std::unique_lock< std::mutex > &rGuard, const css::uno::Reference< ListenerT > &rxIFace)
css::uno::Type const & get()
bool CPPUHELPER_DLLPUBLIC supportsService(css::lang::XServiceInfo *implementation, rtl::OUString const &name)
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
uno::Reference< uno::XInterface > createUnoCustomShow(SdCustomShow *pShow)