Blame SOURCES/0117-vcl-ITiledRenderable-add-getCurrentViewShell-and-imp.patch

f325b2
From 7f7c2c952d264e515923a533d2e36dd4a42bcd92 Mon Sep 17 00:00:00 2001
f325b2
From: Miklos Vajna <vmiklos@collabora.co.uk>
f325b2
Date: Mon, 14 Sep 2015 12:50:48 +0200
f325b2
Subject: [PATCH 117/398] vcl::ITiledRenderable: add getCurrentViewShell() and
f325b2
 implement it for Writer
f325b2
f325b2
Change-Id: Ic936746f3d473e15f5a1589cba35173778b442c6
f325b2
(cherry picked from commit 7b0de91faaaf9a051e082ec7ea5024474f4a1299)
f325b2
---
f325b2
 include/vcl/ITiledRenderable.hxx  | 10 ++++++++++
f325b2
 sw/inc/unotxdoc.hxx               |  2 ++
f325b2
 sw/source/uibase/uno/unotxdoc.cxx |  5 +++++
f325b2
 3 files changed, 17 insertions(+)
f325b2
f325b2
diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx
f325b2
index 8824361f9f70..a31d808437af 100644
f325b2
--- a/include/vcl/ITiledRenderable.hxx
f325b2
+++ b/include/vcl/ITiledRenderable.hxx
f325b2
@@ -16,6 +16,8 @@
f325b2
 #include <tools/gen.hxx>
f325b2
 #include <vcl/virdev.hxx>
f325b2
 
f325b2
+class SfxViewShell;
f325b2
+
f325b2
 namespace vcl
f325b2
 {
f325b2
 
f325b2
@@ -139,8 +141,16 @@ public:
f325b2
      * @see lok::Document::resetSelection().
f325b2
      */
f325b2
     virtual void resetSelection() = 0;
f325b2
+
f325b2
+    /// Get the currently active view shell of the document.
f325b2
+    virtual SfxViewShell* getCurrentViewShell()
f325b2
+    {
f325b2
+        return 0;
f325b2
+    }
f325b2
 };
f325b2
 
f325b2
 } // namespace vcl
f325b2
 
f325b2
 #endif // INCLUDED_VCL_ITILEDRENDERABLE_HXX
f325b2
+
f325b2
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
f325b2
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
f325b2
index 9f0b03b3af38..71dbb4f2fd5a 100644
f325b2
--- a/sw/inc/unotxdoc.hxx
f325b2
+++ b/sw/inc/unotxdoc.hxx
f325b2
@@ -431,6 +431,8 @@ public:
f325b2
     virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE;
f325b2
     /// @see vcl::ITiledRenderable::resetSelection().
f325b2
     virtual void resetSelection() SAL_OVERRIDE;
f325b2
+    /// @see vcl::ITiledRenderable::getCurrentViewShell().
f325b2
+    virtual SfxViewShell* getCurrentViewShell() SAL_OVERRIDE;
f325b2
 
f325b2
     // ::com::sun::star::tiledrendering::XTiledRenderable
f325b2
     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;
f325b2
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
index d6315d2964ae..8dce9b5589d6 100644
f325b2
--- a/sw/source/uibase/uno/unotxdoc.cxx
f325b2
+++ b/sw/source/uibase/uno/unotxdoc.cxx
f325b2
@@ -3410,6 +3410,11 @@ void SwXTextDocument::resetSelection()
f325b2
     pWrtShell->ResetSelect(0, false);
f325b2
 }
f325b2
 
f325b2
+SfxViewShell* SwXTextDocument::getCurrentViewShell()
f325b2
+{
f325b2
+    return pDocShell->GetView();
f325b2
+}
f325b2
+
f325b2
 void SAL_CALL SwXTextDocument::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)
f325b2
 {
f325b2
     SystemGraphicsData aData;
f325b2
-- 
f325b2
2.12.0
f325b2