svx/source/svdraw/svdobj.cxx |   24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

New commits:
commit 17e27b4a19f22b912460f090b754d11f9a32fb7f
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Sep 6 14:28:22 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Sep 6 18:05:24 2022 +0200

    tdf#150756 - Assertion when opening report for editing
    
    regression from
       commit 8611f6e259b807b4f19c8dc0eab86ca648891ce3
        Author: Noel Grandin <noel.gran...@collabora.co.uk>
        Date:   Thu May 27 10:27:46 2021 +0200
        ref-count SdrObject
    this logic is not meant to kick in for reportdesigner.
    
    If this commit causes further regressions, and we need to reinstate some
    form of this logic, it should be conditional on a flag which is
    deliberately set by the modules (probably only sd) which actually need
    it.
    And the flag should be an explicit "I want to kill attached UNO shapes
    when the page changes" rather than being conditional on some other
    condition which is, at best, only tangentially related.
    
    Change-Id: Ibc09149ab4ff88fde8d1bd1e0545e255ccdba50a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/139520
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 172d2a81632d..2840854237f1 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -515,28 +515,8 @@ void SdrObject::SetBoundAndSnapRectsDirty(bool bNotMyself, 
bool bRecursive)
     }
 }
 
-void SdrObject::handlePageChange(SdrPage* pOldPage, SdrPage* pNewPage)
-{
-    // The creation of the UNO shape in SdrObject::getUnoShape is influenced
-    // by pPage, so when the page changes we need to discard the cached UNO
-    // shape so that a new one will be created.
-    // If the page is changing to another page with the same model, we
-    // assume they create compatible UNO shape objects so we shouldn't have
-    // to invalidate.
-    // TTTT: This causes quite some problems in SvxDrawPage::add when used
-    // e.g. from Writer - the SdrObject may be cloned to target model, and
-    // the xShape was added to it by purpose (see there). Thus it will be
-    // good to think about if this is really needed - it *seems* to be intended
-    // for a xShape being a on-demand-creatable resource - with the argument 
that
-    // the SdrPage/UnoPage used influences the SvxShape creation. This uses
-    // resources and would be nice to get rid of anyways.
-    if(nullptr == pOldPage || nullptr == pNewPage)
-    {
-        SvxShape* const pShape(getSvxShape());
-
-        if (pShape)
-            setUnoShape(nullptr);
-    }
+void SdrObject::handlePageChange(SdrPage*, SdrPage* )
+{
 }
 
 

Reply via email to