summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl/SdUnoSlideView.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/unoidl/SdUnoSlideView.cxx')
-rwxr-xr-xsd/source/ui/unoidl/SdUnoSlideView.cxx24
1 files changed, 17 insertions, 7 deletions
diff --git a/sd/source/ui/unoidl/SdUnoSlideView.cxx b/sd/source/ui/unoidl/SdUnoSlideView.cxx
index a6502711ee72..4e788db90928 100755
--- a/sd/source/ui/unoidl/SdUnoSlideView.cxx
+++ b/sd/source/ui/unoidl/SdUnoSlideView.cxx
@@ -35,7 +35,7 @@
#include "SlideSorter.hxx"
#include "controller/SlideSorterController.hxx"
#include "controller/SlsPageSelector.hxx"
-#include "controller/SlsSelectionManager.hxx"
+#include "controller/SlsCurrentSlideManager.hxx"
#include "model/SlsPageEnumerationProvider.hxx"
#include "model/SlideSorterModel.hxx"
#include "model/SlsPageDescriptor.hxx"
@@ -104,7 +104,6 @@ sal_Bool SAL_CALL SdUnoSlideView::select (const Any& aSelection)
}
}
}
- rSlideSorterController.GetSelectionManager()->MakeSelectionVisible();
return bOk;
}
@@ -161,19 +160,30 @@ void SAL_CALL SdUnoSlideView::removeSelectionChangeListener (
//----- XDrawView -------------------------------------------------------------
void SAL_CALL SdUnoSlideView::setCurrentPage (
- const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage >& )
- throw(::com::sun::star::uno::RuntimeException)
+ const css::uno::Reference<css::drawing::XDrawPage>& rxDrawPage)
+ throw(css::uno::RuntimeException)
{
+ Reference<beans::XPropertySet> xProperties (rxDrawPage, UNO_QUERY);
+ if (xProperties.is())
+ {
+ sal_uInt16 nPageNumber(0);
+ if (xProperties->getPropertyValue(::rtl::OUString::createFromAscii("Number")) >>= nPageNumber)
+ {
+ mrSlideSorter.GetController().GetCurrentSlideManager()->SwitchCurrentSlide(
+ nPageNumber-1,
+ true);
+ }
+ }
}
-::com::sun::star::uno::Reference< ::com::sun::star::drawing::XDrawPage > SAL_CALL
+css::uno::Reference<css::drawing::XDrawPage > SAL_CALL
SdUnoSlideView::getCurrentPage (void)
- throw(::com::sun::star::uno::RuntimeException)
+ throw(css::uno::RuntimeException)
{
- return Reference<drawing::XDrawPage>();
+ return mrSlideSorter.GetController().GetCurrentSlideManager()->GetCurrentSlide()->GetXDrawPage();
}