diff options
-rw-r--r-- | desktop/source/lib/init.cxx | 12 | ||||
-rw-r--r-- | include/sfx2/lokhelper.hxx | 4 | ||||
-rw-r--r-- | include/vcl/ITiledRenderable.hxx | 8 | ||||
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 4 | ||||
-rw-r--r-- | sw/inc/unotxdoc.hxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/uno/unotxdoc.cxx | 5 |
6 files changed, 6 insertions, 29 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index fd332975f2e7..0548ea3329ef 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -1046,19 +1046,11 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* pThis, const char* pCo } } -static int doc_createView(LibreOfficeKitDocument* pThis) +static int doc_createView(LibreOfficeKitDocument* /*pThis*/) { SolarMutexGuard aGuard; - ITiledRenderable* pDoc = getTiledRenderable(pThis); - if (!pDoc) - { - gImpl->maLastExceptionMsg = "Document doesn't support tiled rendering"; - return -1; - } - - SfxViewShell* pViewShell = pDoc->getCurrentViewShell(); - return SfxLokHelper::createView(pViewShell); + return SfxLokHelper::createView(); } static void doc_destroyView(LibreOfficeKitDocument* /*pThis*/, int nId) diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx index a05cd5d4b210..50516227e992 100644 --- a/include/sfx2/lokhelper.hxx +++ b/include/sfx2/lokhelper.hxx @@ -17,8 +17,8 @@ class SfxViewShell; class SFX2_DLLPUBLIC SfxLokHelper { public: - /// Create a new view shell for pViewShell's object shell. - static int createView(SfxViewShell* pViewShell); + /// Create a new view shell from the current view frame. + static int createView(); /// Destroy a view shell from the global shell list. static void destroyView(size_t nId); /// Set a view shell as current one. diff --git a/include/vcl/ITiledRenderable.hxx b/include/vcl/ITiledRenderable.hxx index a31d808437af..6639745e4a2f 100644 --- a/include/vcl/ITiledRenderable.hxx +++ b/include/vcl/ITiledRenderable.hxx @@ -16,8 +16,6 @@ #include <tools/gen.hxx> #include <vcl/virdev.hxx> -class SfxViewShell; - namespace vcl { @@ -141,12 +139,6 @@ public: * @see lok::Document::resetSelection(). */ virtual void resetSelection() = 0; - - /// Get the currently active view shell of the document. - virtual SfxViewShell* getCurrentViewShell() - { - return 0; - } }; } // namespace vcl diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 0aea6db9c24e..f53d2b35b1bd 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -15,9 +15,9 @@ #include <shellimpl.hxx> -int SfxLokHelper::createView(SfxViewShell* pViewShell) +int SfxLokHelper::createView() { - SfxViewFrame* pViewFrame = pViewShell->GetViewFrame(); + SfxViewFrame* pViewFrame = SfxViewFrame::Current(); SfxRequest aRequest(pViewFrame, SID_NEWWINDOW); pViewFrame->ExecView_Impl(aRequest); diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx index 0ca6e5b57f0f..8306b83f5616 100644 --- a/sw/inc/unotxdoc.hxx +++ b/sw/inc/unotxdoc.hxx @@ -428,8 +428,6 @@ public: virtual void setGraphicSelection(int nType, int nX, int nY) SAL_OVERRIDE; /// @see vcl::ITiledRenderable::resetSelection(). virtual void resetSelection() SAL_OVERRIDE; - /// @see vcl::ITiledRenderable::getCurrentViewShell(). - virtual SfxViewShell* getCurrentViewShell() SAL_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 6192b5de4022..ab5b8281e29e 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -3400,11 +3400,6 @@ void SwXTextDocument::resetSelection() pWrtShell->ResetSelect(0, false); } -SfxViewShell* SwXTextDocument::getCurrentViewShell() -{ - return pDocShell->GetView(); -} - 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) { SystemGraphicsData aData; |