summaryrefslogtreecommitdiff
path: root/editeng/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2015-02-19 14:38:53 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-02-23 10:10:28 +0100
commit40e3569a08d89fc6cf91cfc3a88d1049f25533c9 (patch)
treef3944bb088e7ff6b695964216c80f4f5a1b20ac0 /editeng/source
parent8632db588d405f10506925ffd2db369691e5bc71 (diff)
ImpEditEngine::UpdateViews: need to go via Invalidate() for tiled rendering
This makes typed characters appear as you type it (and not only after the editing of the shape text is finished) in Impress. Change-Id: Id47efe8223ddfdbad36f436366c9c8c8e0cb45f4
Diffstat (limited to 'editeng/source')
-rw-r--r--editeng/source/editeng/editview.cxx10
-rw-r--r--editeng/source/editeng/impedit.cxx11
-rw-r--r--editeng/source/editeng/impedit.hxx4
-rw-r--r--editeng/source/editeng/impedit3.cxx3
-rw-r--r--editeng/source/outliner/outlvw.cxx4
5 files changed, 31 insertions, 1 deletions
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index cc3db195b57e..cfd4fc5de5f4 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -572,6 +572,16 @@ Color EditView::GetBackgroundColor() const
return pImpEditView->GetBackgroundColor();
}
+void EditView::setTiledRendering(bool bTiledRendering)
+{
+ pImpEditView->setTiledRendering(bTiledRendering);
+}
+
+bool EditView::isTiledRendering()
+{
+ return pImpEditView->isTiledRendering();
+}
+
void EditView::SetControlWord( sal_uInt32 nWord )
{
pImpEditView->nControl = nWord;
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 4ec83bb5501d..ed543cbbcf2e 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -75,6 +75,7 @@ ImpEditView::ImpEditView( EditView* pView, EditEngine* pEng, vcl::Window* pWindo
pOutWin = pWindow;
pPointer = NULL;
pBackgroundColor = NULL;
+ mbTiledRendering = false;
nScrollDiffX = 0;
nExtraCursorFlags = 0;
nCursorBidiLevel = CURSOR_BIDILEVEL_DONTKNOW;
@@ -112,6 +113,16 @@ void ImpEditView::SetBackgroundColor( const Color& rColor )
pBackgroundColor = new Color( rColor );
}
+void ImpEditView::setTiledRendering(bool bTiledRendering)
+{
+ mbTiledRendering = bTiledRendering;
+}
+
+bool ImpEditView::isTiledRendering() const
+{
+ return mbTiledRendering;
+}
+
void ImpEditView::SetEditSelection( const EditSelection& rEditSelection )
{
// set state before notification
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx
index 78128aba2b40..0bcaa384de05 100644
--- a/editeng/source/editeng/impedit.hxx
+++ b/editeng/source/editeng/impedit.hxx
@@ -215,6 +215,7 @@ private:
EditView* pEditView;
vcl::Cursor* pCursor;
Color* pBackgroundColor;
+ bool mbTiledRendering;
EditEngine* pEditEngine;
vcl::Window* pOutWin;
Pointer* pPointer;
@@ -363,6 +364,9 @@ public:
const Color& GetBackgroundColor() const {
return ( pBackgroundColor ? *pBackgroundColor : pOutWin->GetBackground().GetColor() ); }
+ void setTiledRendering(bool bTiledRendering);
+ bool isTiledRendering() const;
+
bool IsWrongSpelledWord( const EditPaM& rPaM, bool bMarkIfWrong );
OUString SpellIgnoreOrAddWord( bool bAdd );
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index d98efb594aea..6c3dd128a56f 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -290,7 +290,8 @@ void ImpEditEngine::UpdateViews( EditView* pCurView )
// convert to window coordinates ....
aClipRect = pView->pImpEditView->GetWindowPos( aClipRect );
- if ( pView == pCurView )
+ // For tiled rendering, we have to always go via Invalidate().
+ if ( pView == pCurView && !pView->isTiledRendering())
Paint( pView->pImpEditView, aClipRect, 0, true );
else
pView->GetWindow()->Invalidate( aClipRect );
diff --git a/editeng/source/outliner/outlvw.cxx b/editeng/source/outliner/outlvw.cxx
index 652fcaa48220..e545e9fe2293 100644
--- a/editeng/source/outliner/outlvw.cxx
+++ b/editeng/source/outliner/outlvw.cxx
@@ -1420,6 +1420,10 @@ void OutlinerView::SetBackgroundColor( const Color& rColor )
pEditView->SetBackgroundColor( rColor );
}
+void OutlinerView::setTiledRendering(bool bTiledRendering)
+{
+ pEditView->setTiledRendering(bTiledRendering);
+}
Color OutlinerView::GetBackgroundColor()
{