summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2009-02-19 13:21:10 +0000
committerOliver Bolte <obo@openoffice.org>2009-02-19 13:21:10 +0000
commit4f4fe6aa7203aac35a774108f4880553df5b93a4 (patch)
tree40d5f3435e22e37a67597f8ce771079a4be503b8 /sdext
parent0f4f40725486b674bc9424dbf3a4be1e9cb7d675 (diff)
CWS-TOOLING: integrate CWS transogl03redux
2009-02-09 13:59:40 +0100 thb r267511 : #i96946# Added seemingly missing change for the color space selection for the slide textures 2009-02-04 10:47:12 +0100 cmc r267353 : #i96946# integrate ogltrans work
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.cxx48
-rw-r--r--sdext/source/presenter/PresenterSlideShowView.hxx7
2 files changed, 37 insertions, 18 deletions
diff --git a/sdext/source/presenter/PresenterSlideShowView.cxx b/sdext/source/presenter/PresenterSlideShowView.cxx
index ded3fe69c554..518595082683 100644
--- a/sdext/source/presenter/PresenterSlideShowView.cxx
+++ b/sdext/source/presenter/PresenterSlideShowView.cxx
@@ -82,6 +82,8 @@ PresenterSlideShowView::PresenterSlideShowView (
mxPointer(),
mxWindow(),
mxViewWindow(),
+ mxTopPane(),
+ mxPresenterHelper(),
mxBackgroundPolygon1(),
mxBackgroundPolygon2(),
mbIsViewAdded(false),
@@ -114,6 +116,13 @@ void PresenterSlideShowView::LateInit (void)
if (xSlideShowComponent.is())
xSlideShowComponent->addEventListener(static_cast<awt::XWindowListener*>(this));
+ Reference<lang::XMultiComponentFactory> xFactory (
+ mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
+ mxPresenterHelper.set (xFactory->createInstanceWithContext(
+ OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"),
+ mxComponentContext),
+ UNO_QUERY_THROW);
+
// Use view id and controller to retrieve window and canvas from
// configuration controller.
Reference<XControllerManager> xCM (mxController, UNO_QUERY_THROW);
@@ -121,6 +130,8 @@ void PresenterSlideShowView::LateInit (void)
if (xCC.is())
{
+ mxTopPane.set(xCC->getResource(mxViewId->getAnchor()->getAnchor()), UNO_QUERY);
+
Reference<XPane> xPane (xCC->getResource(mxViewId->getAnchor()), UNO_QUERY_THROW);
mxWindow = xPane->getWindow();
@@ -142,8 +153,8 @@ void PresenterSlideShowView::LateInit (void)
// Create a window for the actual slide show view. It is places
// centered and with maximal size inside the pane.
mxViewWindow = CreateViewWindow(mxWindow);
- mxViewCanvas = CreateViewCanvas(mxViewWindow,
- Reference<XPane>(xCC->getResource(mxViewId->getAnchor()->getAnchor()), UNO_QUERY));
+
+ mxViewCanvas = CreateViewCanvas(mxViewWindow);
if (mxViewWindow.is())
{
@@ -543,6 +554,19 @@ void SAL_CALL PresenterSlideShowView::setMouseCursor(::sal_Int16 nPointerShape)
+awt::Rectangle SAL_CALL PresenterSlideShowView::getCanvasArea( ) throw (RuntimeException)
+{
+ if( mxViewWindow.is() && mxTopPane.is() )
+ return mxPresenterHelper->getWindowExtentsRelative( mxViewWindow, mxTopPane->getWindow() );
+
+ awt::Rectangle aRectangle;
+
+ aRectangle.X = aRectangle.Y = aRectangle.Width = aRectangle.Height = 0;
+
+ return aRectangle;
+}
+
+
//----- lang::XEventListener --------------------------------------------------
@@ -976,22 +1000,14 @@ Reference<awt::XWindow> PresenterSlideShowView::CreateViewWindow (
Reference<rendering::XCanvas> PresenterSlideShowView::CreateViewCanvas (
- const Reference<awt::XWindow>& rxViewWindow,
- const Reference<XPane>& rxParentPane) const
+ const Reference<awt::XWindow>& rxViewWindow) const
{
// Create a canvas for the view window.
- Reference<lang::XMultiComponentFactory> xFactory (
- mxComponentContext->getServiceManager(), UNO_QUERY_THROW);
- Reference<drawing::XPresenterHelper> xPresenterHelper(
- xFactory->createInstanceWithContext(
- OUString::createFromAscii("com.sun.star.comp.Draw.PresenterHelper"),
- mxComponentContext),
- UNO_QUERY_THROW);
- return xPresenterHelper->createSharedCanvas(
- Reference<rendering::XSpriteCanvas>(rxParentPane->getCanvas(), UNO_QUERY),
- rxParentPane->getWindow(),
- rxParentPane->getCanvas(),
- rxParentPane->getWindow(),
+ return mxPresenterHelper->createSharedCanvas(
+ Reference<rendering::XSpriteCanvas>(mxTopPane->getCanvas(), UNO_QUERY),
+ mxTopPane->getWindow(),
+ mxTopPane->getCanvas(),
+ mxTopPane->getWindow(),
rxViewWindow);
}
diff --git a/sdext/source/presenter/PresenterSlideShowView.hxx b/sdext/source/presenter/PresenterSlideShowView.hxx
index 4525a38b04db..4bb12a1aadb0 100644
--- a/sdext/source/presenter/PresenterSlideShowView.hxx
+++ b/sdext/source/presenter/PresenterSlideShowView.hxx
@@ -149,6 +149,8 @@ public:
virtual void SAL_CALL setMouseCursor(::sal_Int16 nPointerShape)
throw (css::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getCanvasArea( )
+ throw (::com::sun::star::uno::RuntimeException);
// lang::XEventListener
virtual void SAL_CALL disposing (const css::lang::EventObject& rEvent)
@@ -236,6 +238,8 @@ private:
css::uno::Reference<css::awt::XPointer> mxPointer;
css::uno::Reference<css::awt::XWindow> mxWindow;
css::uno::Reference<css::awt::XWindow> mxViewWindow;
+ css::uno::Reference<css::drawing::framework::XPane> mxTopPane;
+ css::uno::Reference<css::drawing::XPresenterHelper> mxPresenterHelper;
css::uno::Reference<css::rendering::XPolyPolygon2D> mxBackgroundPolygon1;
css::uno::Reference<css::rendering::XPolyPolygon2D> mxBackgroundPolygon2;
bool mbIsViewAdded;
@@ -267,8 +271,7 @@ private:
css::uno::Reference<css::awt::XWindow> CreateViewWindow (
const css::uno::Reference<css::awt::XWindow>& rxParentWindow) const;
css::uno::Reference<css::rendering::XCanvas> CreateViewCanvas (
- const css::uno::Reference<css::awt::XWindow>& rxWindow,
- const css::uno::Reference<css::drawing::framework::XPane>& rxParentPane) const;
+ const css::uno::Reference<css::awt::XWindow>& rxWindow) const;
void Resize (void);