13#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
35 return SidebarController::GetSidebarControllerForFrame(
xFrame);
45 throw container::NoSuchElementException();
58 ResourceManager::DeckContextDescriptorContainer aDecks;
59 css::uno::Sequence< OUString > deckList(aDecks.size());
61 if (pSidebarController)
63 pSidebarController->GetResourceManager()->GetMatchingDecks (
65 pSidebarController->GetCurrentContext(),
66 pSidebarController->IsDocumentReadOnly(),
69 deckList.realloc(aDecks.size());
70 std::transform(aDecks.begin(), aDecks.end(), deckList.getArray(),
71 [](
const auto& rDeck) { return rDeck.msId; });
86 if (pSidebarController)
88 ResourceManager::DeckContextDescriptorContainer aDecks;
90 pSidebarController->GetResourceManager()->GetMatchingDecks (
92 pSidebarController->GetCurrentContext(),
93 pSidebarController->IsDocumentReadOnly(),
96 bFound = std::any_of(aDecks.begin(), aDecks.end(),
97 [&
aName](
const ResourceManager::DeckContextDescriptor& rDeck) { return rDeck.msId == aName; });
111 return decks.getLength();
122 throw lang::IndexOutOfBoundsException();
141 return decks.hasElements();
virtual css::uno::Any SAL_CALL getByIndex(sal_Int32 Index) override
virtual css::uno::Type SAL_CALL getElementType() override
virtual css::uno::Any SAL_CALL getByName(const OUString &aName) override
virtual sal_Bool SAL_CALL hasByName(const OUString &aName) override
sfx2::sidebar::SidebarController * getSidebarController()
const css::uno::Reference< css::frame::XFrame > xFrame
virtual sal_Bool SAL_CALL hasElements() override
virtual sal_Int32 SAL_CALL getCount() override
virtual css::uno::Sequence< OUString > SAL_CALL getElementNames() override
SfxUnoDecks(css::uno::Reference< css::frame::XFrame >)
Reference< XFrame > xFrame