svx/source/unodraw/unoshtxt.cxx |   12 ++++--------
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit d5574dad104e9e39c647c41dd4ddcc1f665d31f4
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Tue Mar 7 11:18:48 2023 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Tue Mar 7 17:03:19 2023 +0000

    improve variable name
    
    until
       commit eec42f0dbcc79a4c9f456ce97fa1066b8031ea28
        Author: Noel Grandin <noelgran...@gmail.com>
        Date:   Sun Aug 15 17:35:58 2021 +0200
        pass OutlinerParaObject around by value
    it served two purposes, now it serves only one, so rename it
    to reflect that.
    
    Change-Id: Ifc4f9361fd562cc6c572cdc3ad90151d87f41501
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148382
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 168212aaa159..525ee88abd77 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -539,26 +539,22 @@ SvxTextForwarder* 
SvxTextEditSourceImpl::GetBackgroundTextForwarder()
         SdrTextObj* pTextObj = DynCastSdrTextObj( mpObject  );
         if( pTextObj && pTextObj->getActiveText() == mpText )
             pOutlinerParaObject = pTextObj->CreateEditOutlinerParaObject(); // 
Get the OutlinerParaObject if text edit is active
-        bool bOwnParaObj(false);
+        bool bTextEditActive(false);
 
         if( pOutlinerParaObject )
-            bOwnParaObj = true; // text edit active
+            bTextEditActive = true; // text edit active
         else if (mpText->GetOutlinerParaObject())
             pOutlinerParaObject = *mpText->GetOutlinerParaObject();
 
-        if( pOutlinerParaObject && ( bOwnParaObj || 
!mpObject->IsEmptyPresObj() || 
mpObject->getSdrPageFromSdrObject()->IsMasterPage() ) )
+        if( pOutlinerParaObject && ( bTextEditActive || 
!mpObject->IsEmptyPresObj() || 
mpObject->getSdrPageFromSdrObject()->IsMasterPage() ) )
         {
             mpOutliner->SetText( *pOutlinerParaObject );
 
             // put text to object and set EmptyPresObj to FALSE
-            if (mpText && bOwnParaObj && mpObject->IsEmptyPresObj() && 
pTextObj && pTextObj->IsReallyEdited())
+            if (mpText && bTextEditActive && mpObject->IsEmptyPresObj() && 
pTextObj && pTextObj->IsReallyEdited())
             {
                 mpObject->SetEmptyPresObj( false );
                 static_cast< SdrTextObj* >( 
mpObject)->NbcSetOutlinerParaObjectForText( pOutlinerParaObject, mpText );
-
-                // #i103982# Here, due to 
mpObject->NbcSetOutlinerParaObjectForText, we LOSE ownership of the
-                // OPO, so do NOT delete it when leaving this method (!)
-                bOwnParaObj = false;
             }
         }
         else

Reply via email to