sd/source/ui/inc/NotesPanelView.hxx | 6 +++++- sd/source/ui/view/NotesPanelView.cxx | 24 +++++++++++++----------- 2 files changed, 18 insertions(+), 12 deletions(-)
New commits: commit fd7afc0a660992cb99650e3ea26cafd226899093 Author: Sarper Akdemir <sarper.akdemir.ext...@allotropia.de> AuthorDate: Fri Apr 5 09:39:24 2024 +0300 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Thu Apr 11 11:02:24 2024 +0200 related tdf#33603: sd: fix notespanel crash on drag and drop Change-Id: I067fd3f3eccd8e0fa0d13795f660fe43410b0aa3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165809 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> diff --git a/sd/source/ui/inc/NotesPanelView.hxx b/sd/source/ui/inc/NotesPanelView.hxx index 82b3631f3f50..810cddd6af71 100644 --- a/sd/source/ui/inc/NotesPanelView.hxx +++ b/sd/source/ui/inc/NotesPanelView.hxx @@ -85,6 +85,11 @@ public: virtual const OutlinerView* GetTextEditOutlinerView() const override { return &maOutlinerView; } virtual OutlinerView* GetTextEditOutlinerView() override { return &maOutlinerView; } + virtual sal_Int8 AcceptDrop(const AcceptDropEvent& rEvt, DropTargetHelper& rTargetHelper, + SdrLayerID nLayer) override; + virtual sal_Int8 ExecuteDrop(const ExecuteDropEvent& rEvt, ::sd::Window* pTargetWindow, + sal_uInt16 nPage, SdrLayerID nLayer) override; + DECL_LINK(StatusEventHdl, EditStatus&, void); DECL_LINK(EditModifiedHdl, LinkParamNone*, void); DECL_LINK(ModifyTimerHdl, Timer*, void); diff --git a/sd/source/ui/view/NotesPanelView.cxx b/sd/source/ui/view/NotesPanelView.cxx index 7aa10d0c1f31..2822a8df4c02 100644 --- a/sd/source/ui/view/NotesPanelView.cxx +++ b/sd/source/ui/view/NotesPanelView.cxx @@ -305,6 +305,16 @@ SvtScriptType NotesPanelView::GetScriptType() const return nScriptType; } +sal_Int8 NotesPanelView::AcceptDrop(const AcceptDropEvent&, DropTargetHelper&, SdrLayerID) +{ + return DND_ACTION_NONE; +} + +sal_Int8 NotesPanelView::ExecuteDrop(const ExecuteDropEvent&, ::sd::Window*, sal_uInt16, SdrLayerID) +{ + return DND_ACTION_NONE; +} + } // end of namespace sd /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ commit 7a495eb899585c8443b2141534f166b77916b68e Author: Sarper Akdemir <sarper.akdemir.ext...@allotropia.de> AuthorDate: Fri Apr 5 09:23:55 2024 +0300 Commit: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> CommitDate: Thu Apr 11 11:02:18 2024 +0200 related tdf#33603: sd: force invalidate notespanel This is likely not the correct thing to do here, but is a working solution that fixes the view lagging behind the resize for now. Change-Id: I662e59cfd0f1259eeb10a49b6e9c5fd616afa7a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165808 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@allotropia.de> diff --git a/sd/source/ui/inc/NotesPanelView.hxx b/sd/source/ui/inc/NotesPanelView.hxx index 4bb94590acbb..82b3631f3f50 100644 --- a/sd/source/ui/inc/NotesPanelView.hxx +++ b/sd/source/ui/inc/NotesPanelView.hxx @@ -38,7 +38,6 @@ class NotesPanelView final : public ::sd::SimpleOutlinerView Idle aModifyIdle; SdrTextObj* mpTextObj = nullptr; - bool mbFirstPaint = true; bool mbIgnoreNotifications = false; /** stores the last used document color. diff --git a/sd/source/ui/view/NotesPanelView.cxx b/sd/source/ui/view/NotesPanelView.cxx index 49fa38a05d88..7aa10d0c1f31 100644 --- a/sd/source/ui/view/NotesPanelView.cxx +++ b/sd/source/ui/view/NotesPanelView.cxx @@ -149,16 +149,7 @@ void NotesPanelView::setNotesToDoc() void NotesPanelView::Paint(const ::tools::Rectangle& rRect, ::sd::Window const* /*pWin*/) { - OutlinerView* pOlView = GetOutlinerView(); - - if (pOlView) - { - pOlView->HideCursor(); - pOlView->Paint(rRect); - - pOlView->ShowCursor(mbFirstPaint); - mbFirstPaint = false; - } + maOutlinerView.Paint(rRect); } void NotesPanelView::Notify(SfxBroadcaster&, const SfxHint& rHint) @@ -227,7 +218,8 @@ void NotesPanelView::onResize() if (!aVisArea.IsEmpty()) // not when opening { - mrNotesPanelViewShell.InitWindows(Point(0, 0), aVisArea.GetSize(), aVisArea.TopLeft()); + mrNotesPanelViewShell.InitWindows(Point(0, 0), aVisArea.GetSize(), aVisArea.TopLeft(), + true); mrNotesPanelViewShell.UpdateScrollBars(); } }