summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-25 15:38:40 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-03-02 08:50:55 +0100
commitf6007719a3bf02c73aa864bf66a2685275416229 (patch)
tree22dc5bd7ff4e459f9480901678eb6589dbda8d77
parent28d01c1bde659ebea4bb4db5301ca5945a2abfdf (diff)
ScInputHandler::ImplCreateEditEngine: don't invalidate unconditionally
In the desktop case we still have to Paint() directly. This fixes the small rendering delay in the desktop case introduced by the previous commit. Change-Id: If07e2d47f62cbe17816439d18c45f129be6ce210
-rw-r--r--sc/inc/docuno.hxx3
-rw-r--r--sc/source/ui/app/inputhdl.cxx9
-rw-r--r--sc/source/ui/unoobj/docuno.cxx6
3 files changed, 15 insertions, 3 deletions
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index a5ae0d27bef5..f277efc68168 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -391,6 +391,9 @@ public:
// @see vcl::ITiledRenderable::registerCallback().
virtual void registerCallback(LibreOfficeKitCallback pCallback, void* pData) SAL_OVERRIDE;
+
+ /// @see vcl::ITiledRenderable::initializeForTiledRendering().
+ virtual void initializeForTiledRendering() SAL_OVERRIDE;
};
class ScDrawPagesObj : public cppu::WeakImplHelper2<
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5ed5c32da76b..1a70373ce0f2 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -631,9 +631,12 @@ void ScInputHandler::ImplCreateEditEngine()
// set the EditEngine so that it invalidates the view instead of direct
// paint
- EditView *pEditView = pEngine->GetActiveView();
- if (pEditView && !pEditView->isTiledRendering())
- pEditView->setTiledRendering(true);
+ if (pActiveViewSh)
+ {
+ ScDocument& rDoc = pActiveViewSh->GetViewData().GetDocShell()->GetDocument();
+ if (EditView* pEditView = pEngine->GetActiveView())
+ pEditView->setTiledRendering(rDoc.GetDrawLayer()->isTiledRendering());
+ }
}
void ScInputHandler::UpdateAutoCorrFlag()
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index ff56c2576494..8d068c964511 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -518,6 +518,12 @@ void ScModelObj::registerCallback(LibreOfficeKitCallback pCallback, void* pData)
pDocShell->GetBestViewShell()->registerLibreOfficeKitCallback(pCallback, pData);
}
+void ScModelObj::initializeForTiledRendering()
+{
+ SolarMutexGuard aGuard;
+ pDocShell->GetDocument().GetDrawLayer()->setTiledRendering(true);
+}
+
uno::Any SAL_CALL ScModelObj::queryInterface( const uno::Type& rType )
throw(uno::RuntimeException, std::exception)
{