summaryrefslogtreecommitdiff
path: root/include/svx/svdedxv.hxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-07-27 17:07:47 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-07-27 16:27:16 +0000
commit5f65ca15a2297f298536d07cfa8564a1f7c67abb (patch)
treedf14d2a9b4a6f69774cc25a704094f6c5422d71e /include/svx/svdedxv.hxx
parenta02f7aa735c52f5d20df0e2a94cc06879cb3dfac (diff)
svx lok: fix handling of text edit drawing when view/page changes
This is a follow-up to commit 9d91d371e92548c7f75a7d0155eecaf3769fdee6 (svx lok: draw text edits in all views, 2016-07-26). Two corner-cases are now handled: 1) When the SfxViewShell is created after begin text edit and 2) When the other draw view is already created, but at the time begin text edit happens, the other draw view shows a different page. And the opposite of these: switching away from a page were we observe a text edit done in an other view or destroying a view that observes a text edit. When the complete view goes away, then SdrObjEditView::HideSdrPage() is not called, so also try to destroy the outliner view of the text edit from SdrObjEditView::DeleteWindowFromPaintView(). The GetSfxViewShell() call in SdrObjEditView::ShowSdrPage() is important, because we let the other draw view create the outliner view, but the outliner view should invoke our view shell, not the view shell of the other draw view. Also improve the SdTiledRenderingTest::testCursorViews() testcase, so that it asserts it managed to begin text edit and use a test document that still has a single slide and shape, but the shape is not auto-sized; otherwise invalidations happen even if outliner views are not created in all draw views, so the test would pass even without the fixes. Change-Id: I2c3bb27826c6887115366db818599fc8adabc5a5 Reviewed-on: https://gerrit.libreoffice.org/27583 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'include/svx/svdedxv.hxx')
-rw-r--r--include/svx/svdedxv.hxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/svx/svdedxv.hxx b/include/svx/svdedxv.hxx
index 70ffe3b9be0d..452708645c3d 100644
--- a/include/svx/svdedxv.hxx
+++ b/include/svx/svdedxv.hxx
@@ -110,7 +110,7 @@ protected:
// Create a new OutlinerView at the heap and initialize all required parameters.
// pTextEditObj, pTextEditPV and pTextEditOutliner have to be initialized
- OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, OutlinerView* pGivenView) const;
+ OutlinerView* ImpMakeOutlinerView(vcl::Window* pWin, bool bNoPaint, OutlinerView* pGivenView, SfxViewShell* pViewShell = 0) const;
void ImpPaintOutlinerView(OutlinerView& rOutlView, const Rectangle& rRect, OutputDevice& rTargetDevice) const;
void ImpInvalidateOutlinerView(OutlinerView& rOutlView) const;
@@ -156,6 +156,8 @@ public:
virtual void BckAction() override;
virtual void TakeActionRect(Rectangle& rRect) const override;
+ SdrPageView* ShowSdrPage(SdrPage* pPage) override;
+ void HideSdrPage() override;
/// Get access to the view shell owning this draw view, if any.
virtual SfxViewShell* GetSfxViewShell() const;