57 std::shared_ptr<MasterPageContainer> pContainer,
58 css::uno::Reference<css::ui::XSidebar> xSidebar,
59 const OUString& rUIFileName,
60 const OUString& rValueSetName)
61 :
PanelLayout( pParent,
"MasterPagePanel", rUIFileName ),
62 mpContainer(
std::move(pContainer)),
64 mxPreviewValueSetWin(new
weld::CustomWeld(*m_xBuilder, rValueSetName, *mxPreviewValueSet)),
65 mrDocument(rDocument),
67 mxSidebar(
std::move(xSidebar))
75 if (
mxPreviewValueSet->GetDrawingArea()->get_ref_device().GetDPIScaleFactor() > 1)
105 const ::osl::MutexGuard aGuard (
maMutex);
121 for (
const auto& rItem : rItemList)
124 aNewLockList.push_back(rItem);
136 ::std::unique_ptr<ItemList> pItemList (
new ItemList);
146 return "modules/simpress/ui/mastermenu.ui";
163 mxPreviewValueSet->GrabFocus();
164 mxPreviewValueSet->ReleaseMouse();
166 sal_uInt16
nIndex = mxPreviewValueSet->GetItemId(*pPos);
168 mxPreviewValueSet->SelectItem(
nIndex);
172 ShowContextMenu(pPos);
191 aPosition = aBBox.
Center();
199 std::unique_ptr<weld::Menu> xMenu(xBuilder->weld_menu(
"menu"));
217 if (rIdent ==
"applyall")
223 else if (rIdent ==
"applyselect")
229 else if (rIdent ==
"large")
237 else if (rIdent ==
"small")
245 else if (rIdent ==
"edit")
248 uno::Reference<drawing::XDrawPage> xSelectedMaster;
252 xSelectedMaster.set(pMasterPage->
getUnoPage(), uno::UNO_QUERY);
254 if (xSelectedMaster.is())
257 if (pDispatcher !=
nullptr)
260 pDispatcher->
Execute(SID_MASTERPAGE, SfxCallMode::SYNCHRON);
270 NotifyContainerChangeEvent(rEvent);
275 const ::osl::MutexGuard aGuard (
maMutex);
277 SdPage* pMasterPage =
nullptr;
280 if (
pData !=
nullptr)
292 if (pMasterPage ==
nullptr)
304 std::make_shared<::sd::slidesorter::SlideSorterViewShell::PageSelection>();
305 for (sal_uInt16 nPageIndex=0; nPageIndex<nPageCount; nPageIndex++)
308 if (pPage !=
nullptr && pPage->
GetLayoutName() != sFullLayoutName)
310 pPageList->push_back (pPage);
326 if (pMasterPage ==
nullptr)
330 SlideSorterViewShell* pSlideSorter = SlideSorterViewShell::GetSlideSorter(
mrBase);
331 if (pSlideSorter ==
nullptr)
336 if (pPageSelection->empty())
342 pSlideSorter->SetPageSelection(pPageSelection);
347 const std::shared_ptr<std::vector<SdPage*>>& rPageList)
354 const ::osl::MutexGuard aGuard (
maMutex);
369 static_cast<sal_uInt16
>(
nIndex),
397 const ::osl::MutexGuard aGuard (
maMutex);
407 const ::osl::MutexGuard aGuard (
maMutex);
417 const ::osl::MutexGuard aGuard (
maMutex);
463 const ::osl::MutexGuard aGuard (
maMutex);
472 const ::osl::MutexGuard aGuard (
maMutex);
475 if (
pData !=
nullptr)
480 if (aNewToken != aOldToken
490 const ::osl::MutexGuard aGuard (
maMutex);
495 if (
pData !=
nullptr)
498 if (pPage ==
mpContainer->GetPageObjectForToken(aToken,
false))
510 const ::osl::MutexGuard aGuard (
maMutex);
515 if (
pData !=
nullptr)
530 const ::osl::MutexGuard aGuard (
maMutex);
542 const ::osl::MutexGuard aGuard (
maMutex);
549 const ::osl::MutexGuard aGuard (
maMutex);
553 return iIndex->second;
560 const ::osl::MutexGuard aGuard (
maMutex);
567 const ::osl::MutexGuard aGuard (
maMutex);
576 const ::osl::MutexGuard aGuard (
maMutex);
578 ItemList::const_iterator iNewItem (pNewItemList->begin());
580 ItemList::const_iterator iNewEnd (pNewItemList->end());
585 for ( ; iNewItem!=iNewEnd && iCurrentItem!=iCurrentEnd; ++iNewItem, ++iCurrentItem,++
nIndex)
587 if (*iNewItem != *iCurrentItem)
594 for ( ; iNewItem!=iNewEnd; ++iNewItem,++
nIndex)
600 for ( ; iCurrentItem!=iCurrentEnd; ++iCurrentItem,++
nIndex)
615 return css::ui::LayoutSize(nHeight,nHeight,nHeight);
static std::unique_ptr< weld::Builder > CreateBuilder(weld::Widget *pParent, const OUString &rUIFile, bool bMobile=false, sal_uInt64 nLOKWindowId=0)
Size GetSizePixel() const
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
virtual OUString GetLayoutName() const override
css::uno::Reference< css::uno::XInterface > const & getUnoPage()
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
SfxDispatcher * GetDispatcher()
SfxViewFrame & GetViewFrame() const
constexpr tools::Long Width() const
virtual void SAL_CALL setCurrentPage(const css::uno::Reference< css::drawing::XDrawPage > &xPage) override
SfxViewShell descendant that the stacked Draw/Impress shells are based on.
DrawController * GetDrawController() const
void SetBusyState(bool bBusy)
When <TRUE> is given, then the mouse shape is set to hour glass (or whatever the busy shape looks lik...
#define LINK(Instance, Class, Member)
std::unique_ptr< sal_Int32[]> pData
constexpr std::enable_if_t< std::is_signed_v< T >, std::make_unsigned_t< T > > make_unsigned(T value)
std::shared_ptr< SlideSorterViewShell::PageSelection > SharedPageSelection
#define VALUESET_ITEM_NOTFOUND
#define WB_NO_DIRECTSELECT