31#include <com/sun/star/drawing/framework/XPane.hpp>
32#include <com/sun/star/beans/XPropertySet.hpp>
42using ::com::sun::star::awt::XWindow;
47 const std::shared_ptr<ViewShell>& pViewShell,
48 const Reference<XResourceId>& rxViewId,
49 const Reference<awt::XWindow>& rxWindow)
50 : mpViewShell(pViewShell),
51 mpSlideSorterViewShell(
52 std::dynamic_pointer_cast< ::
sd::slidesorter::SlideSorterViewShell >( pViewShell )),
64 SAL_INFO(
"sd.ui",
"disposing ViewShellWrapper " <<
this);
65 Reference<awt::XWindow> xWindow (
mxWindow);
70 "removing ViewShellWrapper " <<
this <<
" from window listener at "
72 xWindow->removeWindowListener(
this);
84 uno::Reference<view::XSelectionSupplier> xSupplier(
this );
85 return Any(xSupplier);
114 Sequence<Reference<drawing::XDrawPage> > xPages;
115 aSelection >>= xPages;
116 for (
const auto& rPage : std::as_const(xPages))
118 Reference<beans::XPropertySet> xSet (rPage, UNO_QUERY);
123 Any aNumber = xSet->getPropertyValue(
"Number");
124 sal_Int32 nPageNumber = 0;
125 aNumber >>= nPageNumber;
148 int nSelectedPageCount (
151 Sequence<Reference<XInterface> > aPages(nSelectedPageCount);
152 auto aPagesRange = asNonConstRange(aPages);
157 aPagesRange[
nIndex++] = pDescriptor->GetPage()->getUnoPage();
175 const Reference<XResource>& xResource)
177 bool bResult (
false);
179 Reference<XPane> xPane (xResource, UNO_QUERY);
183 Reference<awt::XWindow> xWindow (
mxWindow);
185 xWindow->removeWindowListener(
this);
191 if (pWindow &&
mpViewShell->RelocateToParentWindow(pWindow))
196 xWindow = xPane->getWindow();
199 xWindow->addWindowListener(
this);
214 if (pViewShell !=
nullptr)
223 if (pViewShell !=
nullptr)
static vcl::Window * GetWindow(const css::uno::Reference< css::awt::XWindow > &rxWindow)
virtual css::uno::Any SAL_CALL queryInterface(css::uno::Type const &rType) override
Base class of the stacked shell hierarchy.
virtual void Resize()
Notify the view shell that its parent window has been resized.
virtual void SAL_CALL windowHidden(const css::lang::EventObject &rEvent) override
virtual void SAL_CALL removeSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
virtual ~ViewShellWrapper() override
::std::shared_ptr< ::sd::slidesorter::SlideSorterViewShell > mpSlideSorterViewShell
virtual void SAL_CALL windowShown(const css::lang::EventObject &rEvent) override
virtual css::uno::Any SAL_CALL queryInterface(const css::uno::Type &rType) override
virtual void SAL_CALL addSelectionChangeListener(const css::uno::Reference< css::view::XSelectionChangeListener > &xListener) override
virtual sal_Bool SAL_CALL isAnchorOnly() override
ViewShellWrapper(const ::std::shared_ptr< ViewShell > &pViewShell, const css::uno::Reference< css::drawing::framework::XResourceId > &rxViewId, const css::uno::Reference< css::awt::XWindow > &rxWindow)
Create a new ViewShellWrapper object that wraps the given ViewShell object.
virtual css::uno::Any SAL_CALL getSelection() override
virtual void disposing(std::unique_lock< std::mutex > &) override
css::uno::Reference< css::awt::XWindow > mxWindow
::std::shared_ptr< ViewShell > mpViewShell
const css::uno::Reference< css::drawing::framework::XResourceId > mxViewId
virtual sal_Bool SAL_CALL relocateToAnchor(const css::uno::Reference< css::drawing::framework::XResource > &xResource) override
virtual void SAL_CALL windowResized(const css::awt::WindowEvent &rEvent) override
virtual void SAL_CALL windowMoved(const css::awt::WindowEvent &rEvent) override
virtual sal_Bool SAL_CALL select(const css::uno::Any &aSelection) override
virtual css::uno::Reference< css::drawing::framework::XResourceId > SAL_CALL getResourceId() override
A sub-controller that handles page selection of the slide browser.
SD_DLLPUBLIC void DeselectAllPages()
void SelectPage(int nPageIndex)
Select the specified descriptor.
SD_DLLPUBLIC PageSelector & GetPageSelector()
static PageEnumeration CreateSelectedPagesEnumeration(const SlideSorterModel &rModel)
The returned enumeration of slides iterates over the currently selected slides of the given model.
Public class of page enumerations that delegates its calls to an implementation object that can filte...
virtual SharedPageDescriptor GetNextElement() override
Return the next element of the enumeration.
virtual bool HasMoreElements() const override
Return <TRUE> when the enumeration has more elements, i.e.
#define SAL_INFO(area, stream)
std::shared_ptr< PageDescriptor > SharedPageDescriptor