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

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