29mDeckId(
std::move(deckId))
35 return SidebarController::GetSidebarControllerForFrame(
xFrame);
50 VclPtr<Deck> pDeck = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId)->mpDeck;
54 pSidebarController->CreateDeck(
mDeckId);
55 pDeck = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId)->mpDeck;
58 DeckTitleBar* pTitleBar = pDeck->GetTitleBar();
59 return pTitleBar->GetTitle();
67 pSidebarController->CreateDeck(
mDeckId);
69 std::shared_ptr<DeckDescriptor> xDeckDescriptor = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId);
73 Deck* pDeck = xDeckDescriptor->mpDeck;
74 DeckTitleBar* pTitleBar = pDeck->GetTitleBar();
75 pTitleBar->SetTitle(newTitle);
77 xDeckDescriptor->msTitle = newTitle;
78 xDeckDescriptor->msHelpText = newTitle;
80 pSidebarController->notifyDeckTitle(
mDeckId);
89 return pSidebarController->IsDeckVisible(
mDeckId);
101 pSidebarController->OpenThenToggleDeck(
mDeckId);
104 pSidebarController->SwitchToDefaultDeck();
106 pSidebarController->NotifyResize();
124 sal_Int32
index = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId)->mnOrderIndex;
133 std::shared_ptr<DeckDescriptor> xDeckDescriptor = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId);
137 xDeckDescriptor->mnOrderIndex = newOrderIndex;
139 pSidebarController->NotifyResize();
148 ResourceManager::DeckContextDescriptorContainer aDecks = pSidebarController->GetMatchingDecks();
153 if (curOrderIndex != minIndex)
156 std::shared_ptr<DeckDescriptor> xDeckDescriptor = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId);
159 xDeckDescriptor->mnOrderIndex = minIndex;
161 pSidebarController->NotifyResize();
171 ResourceManager::DeckContextDescriptorContainer aDecks = pSidebarController->GetMatchingDecks();
176 if (curOrderIndex != maxIndex)
179 std::shared_ptr<DeckDescriptor> xDeckDescriptor = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId);
182 xDeckDescriptor->mnOrderIndex = maxIndex;
184 pSidebarController->NotifyResize();
195 ResourceManager::DeckContextDescriptorContainer aDecks = pSidebarController->GetMatchingDecks();
200 for (
auto const& deck : aDecks)
202 sal_Int32
index = pSidebarController->GetResourceManager()->GetDeckDescriptor(deck.msId)->mnOrderIndex;
203 if( index < curOrderIndex && index > previousIndex)
204 previousIndex =
index;
207 if (curOrderIndex != previousIndex)
210 std::shared_ptr<DeckDescriptor> xDeckDescriptor = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId);
213 xDeckDescriptor->mnOrderIndex = previousIndex;
215 pSidebarController->NotifyResize();
225 ResourceManager::DeckContextDescriptorContainer aDecks = pSidebarController->GetMatchingDecks();
231 for (
auto const& deck : aDecks)
233 sal_Int32
index = pSidebarController->GetResourceManager()->GetDeckDescriptor(deck.msId)->mnOrderIndex;
234 if(
index > curOrderIndex &&
index < nextIndex)
238 if (curOrderIndex != nextIndex)
241 std::shared_ptr<DeckDescriptor> xDeckDescriptor = pSidebarController->GetResourceManager()->GetDeckDescriptor(
mDeckId);
244 xDeckDescriptor->mnOrderIndex = nextIndex;
246 pSidebarController->NotifyResize();
255 ResourceManager::DeckContextDescriptorContainer::const_iterator iDeck = rDecks.begin();
256 sal_Int32 minIndex = pSidebarController->GetResourceManager()->GetDeckDescriptor(iDeck->msId)->mnOrderIndex;
258 for (
auto const& deck : rDecks)
260 sal_Int32
index = pSidebarController->GetResourceManager()->GetDeckDescriptor(deck.msId)->mnOrderIndex;
271 sal_Int32 maxIndex = pSidebarController->GetResourceManager()->GetDeckDescriptor(rDecks.begin()->msId)->mnOrderIndex;
273 for (
auto const& deck : rDecks)
275 sal_Int32
index = pSidebarController->GetResourceManager()->GetDeckDescriptor(deck.msId)->mnOrderIndex;
sal_Int32 GetMaxOrderIndex(const sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer &rDecks)
virtual void SAL_CALL moveLast() override
virtual void SAL_CALL moveDown() override
virtual void SAL_CALL activate(const sal_Bool bActivate) override
SfxUnoDeck(css::uno::Reference< css::frame::XFrame >, OUString)
virtual sal_Int32 SAL_CALL getOrderIndex() override
virtual css::uno::Reference< css::ui::XPanels > SAL_CALL getPanels() override
virtual OUString SAL_CALL getTitle() override
virtual void SAL_CALL setTitle(const OUString &newTitle) override
virtual sal_Bool SAL_CALL isActive() override
const css::uno::Reference< css::frame::XFrame > xFrame
sfx2::sidebar::SidebarController * getSidebarController()
virtual void SAL_CALL moveUp() override
sal_Int32 GetMinOrderIndex(const sfx2::sidebar::ResourceManager::DeckContextDescriptorContainer &rDecks)
virtual void SAL_CALL moveFirst() override
virtual OUString SAL_CALL getId() override
virtual void SAL_CALL setOrderIndex(const sal_Int32 newOrderIndex) override
Reference< XFrame > xFrame