From 48e3532611ca0d7de71f9796bf3e8bf3263929dd Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.co.uk>
Date: Thu, 22 Oct 2015 10:15:34 +0200
Subject: [PATCH 224/398] vcl: add ITiledRenderable::getWindow() and implement
in sw
(cherry picked from commit 981a974824642a81f86c526dea682cd27cd437db)
Change-Id: I9d0fad3904e74b44b0b126974ace4025f7a4fc5b
---
include/vcl/ITiledRenderable.hxx | 6 ++++++
sw/inc/unotxdoc.hxx | 4 +++-
sw/source/uibase/uno/unotxdoc.cxx | 7 +++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
index c294d20dc9cf..bb891ab97f7b 100644
--- a/include/vcl/ITiledRenderable.hxx
+++ b/include/vcl/ITiledRenderable.hxx
@@ -147,6 +147,12 @@ public:
{
return OUString();
}
+
+ /// Returns the current vcl::Window of the component.
+ virtual vcl::Window* getWindow()
+ {
+ return 0;
+ }
};
} // namespace vcl
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 346cab63ca02..d0eada25b6ef 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -433,7 +433,9 @@ public:
/// @see vcl::ITiledRenderable::resetSelection().
virtual void resetSelection() SAL_OVERRIDE;
/// @see vcl::ITiledRenderable::getPartPageRectangles().
- virtual OUString getPartPageRectangles() SAL_OVERRIDE;
+ virtual OUString getPartPageRectangles() override;
+ /// @see vcl::ITiledRenderable::getWindow().
+ virtual vcl::Window* getWindow() override;
// ::com::sun::star::tiledrendering::XTiledRenderable
virtual void SAL_CALL paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) throw (::css::uno::RuntimeException, ::std::exception) SAL_OVERRIDE;
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index fc1c6f411b74..658057d7a977 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3188,6 +3188,13 @@ OUString SwXTextDocument::getPartPageRectangles()
return pWrtShell->getPageRectangles();
}
+vcl::Window* SwXTextDocument::getWindow()
+{
+ SolarMutexGuard aGuard;
+
+ return &pDocShell->GetView()->GetEditWin();
+}
+
int SwXTextDocument::getPart()
{
SolarMutexGuard aGuard;
--
2.12.0