[Libreoffice-commits] core.git: Branch 'feature/SOSAW080' - 4 commits - basctl/source chart2/source cui/source filter/source include/svx reportdesign/inc reportdesign/source sc/inc sc/source sd/inc sd/source svx/inc svx/source sw/inc sw/source

Armin Le Grand (CIB) Armin.Le.Grand at cib.de
Sat Mar 17 22:06:55 UTC 2018


 basctl/source/dlged/dlgedpage.cxx                       |   13 
 basctl/source/inc/dlgedpage.hxx                         |    5 
 chart2/source/controller/main/ChartController_Tools.cxx |    2 
 cui/source/tabpages/measure.cxx                         |    4 
 filter/source/msfilter/escherex.cxx                     |    7 
 filter/source/svg/svgexport.cxx                         |    5 
 include/svx/fmpage.hxx                                  |    8 
 include/svx/obj3d.hxx                                   |    1 
 include/svx/sdr/properties/defaultproperties.hxx        |    3 
 include/svx/sdr/properties/properties.hxx               |   33 +
 include/svx/svdobj.hxx                                  |    4 
 include/svx/svdpage.hxx                                 |    9 
 include/svx/svdtext.hxx                                 |    7 
 include/svx/svdxcgv.hxx                                 |   12 
 include/svx/unopage.hxx                                 |    5 
 include/svx/unoshape.hxx                                |    3 
 include/svx/unoshtxt.hxx                                |    2 
 reportdesign/inc/RptPage.hxx                            |    5 
 reportdesign/source/core/sdr/RptPage.cxx                |   17 
 reportdesign/source/ui/report/ReportSection.cxx         |    3 
 sc/inc/drawpage.hxx                                     |    4 
 sc/source/core/data/documen9.cxx                        |    4 
 sc/source/core/data/drawpage.cxx                        |   12 
 sc/source/core/data/drwlayer.cxx                        |    9 
 sc/source/filter/excel/xiescher.cxx                     |    7 
 sc/source/filter/html/htmlexp2.cxx                      |    3 
 sc/source/ui/drawfunc/fuins1.cxx                        |    3 
 sc/source/ui/view/viewfun7.cxx                          |    5 
 sd/inc/sdpage.hxx                                       |    9 
 sd/source/core/drawdoc.cxx                              |   16 
 sd/source/core/drawdoc3.cxx                             |    6 
 sd/source/core/sdpage.cxx                               |    2 
 sd/source/core/sdpage2.cxx                              |  100 +---
 sd/source/ui/dlg/animobjs.cxx                           |   19 
 sd/source/ui/view/drviews2.cxx                          |    2 
 svx/inc/sdr/properties/attributeproperties.hxx          |   16 
 svx/inc/sdr/properties/e3dsceneproperties.hxx           |    3 
 svx/inc/sdr/properties/groupproperties.hxx              |    3 
 svx/source/customshapes/EnhancedCustomShapeEngine.cxx   |    3 
 svx/source/engine3d/obj3d.cxx                           |    6 
 svx/source/form/fmobj.cxx                               |   11 
 svx/source/form/fmpage.cxx                              |   49 --
 svx/source/inc/cell.hxx                                 |    3 
 svx/source/sdr/properties/attributeproperties.cxx       |  375 +++++-----------
 svx/source/sdr/properties/e3dsceneproperties.cxx        |   26 -
 svx/source/sdr/properties/groupproperties.cxx           |   26 -
 svx/source/sdr/properties/properties.cxx                |   13 
 svx/source/svdraw/svdcrtv.cxx                           |    4 
 svx/source/svdraw/svdedtv2.cxx                          |    3 
 svx/source/svdraw/svdmodel.cxx                          |   20 
 svx/source/svdraw/svdoashp.cxx                          |    2 
 svx/source/svdraw/svdoattr.cxx                          |   20 
 svx/source/svdraw/svdobj.cxx                            |   67 --
 svx/source/svdraw/svdocapt.cxx                          |    7 
 svx/source/svdraw/svdograf.cxx                          |   23 
 svx/source/svdraw/svdogrp.cxx                           |   34 -
 svx/source/svdraw/svdoole2.cxx                          |   77 ---
 svx/source/svdraw/svdotext.cxx                          |   34 -
 svx/source/svdraw/svdovirt.cxx                          |   11 
 svx/source/svdraw/svdpage.cxx                           |   71 ---
 svx/source/svdraw/svdtext.cxx                           |   52 --
 svx/source/svdraw/svdxcgv.cxx                           |  106 ++--
 svx/source/table/cell.cxx                               |   37 -
 svx/source/table/svdotable.cxx                          |   26 -
 svx/source/table/tablecontroller.cxx                    |    4 
 svx/source/tbxctrls/fontworkgallery.cxx                 |    2 
 svx/source/unodraw/unopage.cxx                          |   25 -
 svx/source/unodraw/unoshap2.cxx                         |    4 
 svx/source/unodraw/unoshape.cxx                         |   34 -
 svx/source/unodraw/unoshtxt.cxx                         |   56 --
 svx/source/unogallery/unogaltheme.cxx                   |    3 
 sw/inc/dpage.hxx                                        |    3 
 sw/source/core/draw/dpage.cxx                           |   19 
 sw/source/filter/ww8/wrtw8esh.cxx                       |    4 
 sw/source/filter/ww8/ww8graf.cxx                        |    3 
 75 files changed, 342 insertions(+), 1292 deletions(-)

New commits:
commit 8c8b6d9bcb86d13c53fd1aefca5a02f1db49f61f
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Fri Mar 16 17:08:42 2018 +0100

    SOSAW080: Removed ChangeModel from classes
    
    Classes SvxTextEditSource and SvxDrawPage (including
    TextEditSource stuff) do not need change of SdrModel
    anymore.
    
    Change-Id: I8c4626274a5cc531dad27f27c0c45d4c528fb2fb

diff --git a/include/svx/unopage.hxx b/include/svx/unopage.hxx
index 6f84e72b8e66..eefc11c61b2b 100644
--- a/include/svx/unopage.hxx
+++ b/include/svx/unopage.hxx
@@ -68,8 +68,8 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
  protected:
     cppu::OBroadcastHelper mrBHelper;
 
-    SdrPage*        mpPage;
-    SdrModel*       mpModel;
+    SdrPage*        mpPage;     // TTTT should be reference
+    SdrModel*       mpModel;    // TTTT probably not needed -> use from SdrPage
     SdrView*        mpView;
 
     void    SelectObjectsInView( const css::uno::Reference< css::drawing::XShapes >& aShapes, SdrPageView*   pPageView ) throw ();
@@ -83,7 +83,6 @@ class SVX_DLLPUBLIC SvxDrawPage : public ::cppu::WeakAggImplHelper6< css::drawin
 
     // Internals
     SdrPage* GetSdrPage() const { return mpPage; }
-    void ChangeModel( SdrModel* pNewModel );
 
     // Creation of a SdrObject and insertion into the SdrPage
     SdrObject *CreateSdrObject( const css::uno::Reference< css::drawing::XShape >& xShape, bool bBeginning = false ) throw();
diff --git a/include/svx/unoshtxt.hxx b/include/svx/unoshtxt.hxx
index f38cf8a62d0f..f16358d2432d 100644
--- a/include/svx/unoshtxt.hxx
+++ b/include/svx/unoshtxt.hxx
@@ -77,8 +77,6 @@ public:
     virtual Point       LogicToPixel( const Point&, const MapMode& ) const override;
     virtual Point       PixelToLogic( const Point&, const MapMode& ) const override;
 
-    void ChangeModel( SdrModel* pNewModel );
-
     void UpdateOutliner();
 
 private:
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index a6b235db7710..b63e3416ad10 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -845,21 +845,6 @@ SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, SdrInventor nInvento
     return SvxDrawPage::CreateShapeByTypeAndInventor( nType, nInventor, nullptr, nullptr, referer );
 }
 
-void SvxDrawPage::ChangeModel( SdrModel* pNewModel )
-{
-    if( pNewModel != mpModel )
-    {
-        mpModel = pNewModel;
-
-        if( mpView )
-        {
-            delete mpView;
-            mpView = new SdrView(*mpModel);
-            mpView->SetDesignMode();
-        }
-    }
-}
-
 /** returns a StarOffice API wrapper for the given SdrPage */
 uno::Reference< drawing::XDrawPage > GetXDrawPageForSdrPage( SdrPage* pPage ) throw ()
 {
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 1540aef4e1cc..852d945607a7 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -80,11 +80,11 @@ class SvxTextEditSourceImpl : public SfxListener, public SfxBroadcaster, public
 private:
     oslInterlockedCount maRefCount;
 
-    SdrObject*                      mpObject;
+    SdrObject*                      mpObject;           // TTTT could be reference (?)
     SdrText*                        mpText;
     SdrView*                        mpView;
     VclPtr<const vcl::Window>       mpWindow;
-    SdrModel*                       mpModel;
+    SdrModel*                       mpModel;            // TTTT probably not needed -> use SdrModel from SdrObject (?)
     SdrOutliner*                    mpOutliner;
     SvxOutlinerForwarder*           mpTextForwarder;
     SvxDrawOutlinerViewForwarder*   mpViewForwarder;    // if non-NULL, use GetViewModeTextForwarder text forwarder
@@ -147,8 +147,6 @@ public:
 
     virtual void ObjectInDestruction(const SdrObject& rObject) override;
 
-    void ChangeModel( SdrModel* pNewModel );
-
     void                    UpdateOutliner();
 };
 
@@ -264,51 +262,6 @@ void SvxTextEditSourceImpl::release()
         delete this;
 }
 
-void SvxTextEditSourceImpl::ChangeModel( SdrModel* pNewModel )
-{
-    if( mpModel != pNewModel )
-    {
-        if( mpModel )
-            EndListening( *mpModel );
-
-        if( mpOutliner )
-        {
-            if( mpModel )
-                mpModel->disposeOutliner( mpOutliner );
-            else
-                delete mpOutliner;
-            mpOutliner = nullptr;
-        }
-
-        if( mpView )
-        {
-            EndListening( *mpView );
-            mpView = nullptr;
-        }
-
-        mpWindow = nullptr;
-        m_xLinguServiceManager.clear();
-
-        mpModel = pNewModel;
-
-        if( mpTextForwarder )
-        {
-            delete mpTextForwarder;
-            mpTextForwarder = nullptr;
-        }
-
-        if( mpViewForwarder )
-        {
-            delete mpViewForwarder;
-            mpViewForwarder = nullptr;
-        }
-
-        if( mpModel )
-            StartListening( *mpModel );
-    }
-}
-
-
 void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
 {
     // #i105988 keep reference to this object
@@ -1102,11 +1055,6 @@ const SvxUnoTextRangeBaseList& SvxTextEditSource::getRanges() const
     return mpImpl->getRanges();
 }
 
-void SvxTextEditSource::ChangeModel( SdrModel* pNewModel )
-{
-    mpImpl->ChangeModel( pNewModel );
-}
-
 void SvxTextEditSource::UpdateOutliner()
 {
     mpImpl->UpdateOutliner();
commit f9f4a74cfc80af029062b32b41ac8af4d2d47cd9
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Fri Mar 16 16:11:45 2018 +0100

    SOSAW080: Adapted GetObjGraphic to just take a const SdrObject&
    
    Change-Id: I0a636caf3cb36c2f9c6cd11aa22cb9bc435dc8f2

diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx
index 0e4d95681542..f7e114721d01 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -3770,11 +3770,8 @@ bool EscherPropertyContainer::CreateBlipPropertiesforOLEControl(const uno::Refer
     SdrObject* pShape = GetSdrObjectFromXShape( rXShape );
     if ( pShape )
     {
-        Graphic aGraphic(
-            SdrExchangeView::GetObjGraphic( // TTTT GetObjGraphic may use a SdrObject&
-                &pShape->getSdrModelFromSdrObject(),
-                pShape));
-        GraphicObject aGraphicObject(aGraphic);
+        const Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pShape));
+        const GraphicObject aGraphicObject(aGraphic);
 
         if (!aGraphicObject.GetUniqueID().isEmpty())
         {
diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index ba500b7af919..89d13811661f 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1937,10 +1937,7 @@ bool SVGFilter::implCreateObjectsFromShape( const Reference< css::drawing::XDraw
 
         if( pObj )
         {
-            Graphic aGraphic(
-                SdrExchangeView::GetObjGraphic(
-                    &pObj->getSdrModelFromSdrObject(),
-                    pObj));
+            const Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pObj));
 
             if( aGraphic.GetType() != GraphicType::NONE )
             {
diff --git a/include/svx/svdxcgv.hxx b/include/svx/svdxcgv.hxx
index 4625d83d0817..52dc63b1a282 100644
--- a/include/svx/svdxcgv.hxx
+++ b/include/svx/svdxcgv.hxx
@@ -74,20 +74,16 @@ public:
 
     Graphic         GetAllMarkedGraphic() const;
 
-    /** Generate a Graphic for the given draw object in the given model
+    /** Generate a Graphic for the given draw object
 
-        @param pModel
-        Must not be NULL. Denotes the draw model the object is a part
-        of.
-
-        @param pObj
+        @param rSdrObject
         The object (can also be a group object) to retrieve a Graphic
-        for. Must not be NULL.
+        for.
 
         @return a graphical representation of the given object, as it
         appears on screen (e.g. with rotation, if any, applied).
      */
-    static Graphic  GetObjGraphic( const SdrModel* pModel, const SdrObject* pObj );
+    static Graphic GetObjGraphic(const SdrObject& rSdrObject);
 
     // The new Draw objects are marked for all paste methods.
     // If bAddMark is true, the new Draw objects are added to an existing
diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx
index dc827ce2fdd3..45743fb88518 100644
--- a/sc/source/filter/html/htmlexp2.cxx
+++ b/sc/source/filter/html/htmlexp2.cxx
@@ -165,8 +165,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE )
         break;
         default:
         {
-            Graphic aGraph( SdrExchangeView::GetObjGraphic(
-                pDoc->GetDrawLayer(), pObject ) );
+            Graphic aGraph(SdrExchangeView::GetObjGraphic(*pObject));
             OUString aLinkName;
             WriteImage( aLinkName, aGraph, aOpt );
             pE->bWritten = true;
diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx
index deddf8b68a53..5ca6bab37ebd 100644
--- a/sd/source/ui/dlg/animobjs.cxx
+++ b/sd/source/ui/dlg/animobjs.cxx
@@ -777,13 +777,8 @@ void AnimationWindow::AddObj (::sd::View& rView )
 
                 for( size_t nObject = 0; nObject < pObjList->GetObjCount(); ++nObject )
                 {
-                    SdrObject* pSnapShot = pObjList->GetObj( nObject );
-
-                    BitmapEx *const pBitmapEx = new BitmapEx(
-                        SdrExchangeView::GetObjGraphic(
-                            &pSnapShot->getSdrModelFromSdrObject(),
-                            pSnapShot).GetBitmapEx() );
-
+                    SdrObject* pSnapShot(pObjList->GetObj(nObject));
+                    BitmapEx *const pBitmapEx = new BitmapEx(SdrExchangeView::GetObjGraphic(*pSnapShot).GetBitmapEx());
                     ::tools::Time* pTime = new ::tools::Time( m_pTimeField->GetTime() );
                     size_t nIndex = m_nCurrentFrame + 1;
                     m_FrameList.insert(
@@ -831,15 +826,9 @@ void AnimationWindow::AddObj (::sd::View& rView )
                 for( size_t nObject= 0; nObject < nMarkCount; ++nObject )
                 {
                     // Clone
-                    SdrObject* pObject = rMarkList.GetMark( nObject )->GetMarkedSdrObj();
-
-                    BitmapEx *const pBitmapEx = new BitmapEx(
-                        SdrExchangeView::GetObjGraphic(
-                            &pObject->getSdrModelFromSdrObject(),
-                            pObject).GetBitmapEx() );
-
+                    SdrObject* pObject(rMarkList.GetMark(nObject)->GetMarkedSdrObj());
+                    BitmapEx *const pBitmapEx = new BitmapEx(SdrExchangeView::GetObjGraphic(*pObject).GetBitmapEx());
                     ::tools::Time* pTime = new ::tools::Time( m_pTimeField->GetTime() );
-
                     size_t nIndex = m_nCurrentFrame + 1;
                     m_FrameList.insert(
                         m_FrameList.begin() + nIndex,
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 596c6139e1c9..4306ecd577fa 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -277,9 +277,7 @@ SdrObject* SdrVirtObj::getFullDragClone() const
     SdrObject& rReferencedObject = const_cast<SdrVirtObj*>(this)->ReferencedObj();
     return new SdrGrafObj(
         getSdrModelFromSdrObject(),
-        SdrDragView::GetObjGraphic(
-            &getSdrModelFromSdrObject(),
-            &rReferencedObject),
+        SdrDragView::GetObjGraphic(rReferencedObject),
         GetLogicRect());
 }
 
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index 8603cc472ca2..58fc73351181 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -585,7 +585,7 @@ Graphic SdrExchangeView::GetAllMarkedGraphic() const
     if( AreObjectsMarked() )
     {
         if( ( 1 == GetMarkedObjectCount() ) && GetSdrMarkByIndex( 0 ) )
-            aRet = SdrExchangeView::GetObjGraphic( mpModel, GetMarkedObjectByIndex( 0 ) );
+            aRet = SdrExchangeView::GetObjGraphic(*GetMarkedObjectByIndex(0));
         else
             aRet = GetMarkedObjMetaFile();
     }
@@ -594,68 +594,68 @@ Graphic SdrExchangeView::GetAllMarkedGraphic() const
 }
 
 
-Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* pObj )
+Graphic SdrExchangeView::GetObjGraphic(const SdrObject& rSdrObject)
 {
     Graphic aRet;
 
-    if( pModel && pObj )
-    {
-        // try to get a graphic from the object first
-        const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(pObj);
-        const SdrOle2Obj* pSdrOle2Obj = dynamic_cast< const SdrOle2Obj* >(pObj);
+    // try to get a graphic from the object first
+    const SdrGrafObj* pSdrGrafObj(dynamic_cast< const SdrGrafObj* >(&rSdrObject));
+    const SdrOle2Obj* pSdrOle2Obj(dynamic_cast< const SdrOle2Obj* >(&rSdrObject));
 
-        if(pSdrGrafObj)
+    if(pSdrGrafObj)
+    {
+        if(pSdrGrafObj->isEmbeddedVectorGraphicData())
         {
-            if(pSdrGrafObj->isEmbeddedVectorGraphicData())
-            {
-                // get Metafile for Svg content
-                aRet = pSdrGrafObj->getMetafileFromEmbeddedVectorGraphicData();
-            }
-            else
-            {
-                // Make behaviour coherent with metafile
-                // recording below (which of course also takes
-                // view-transformed objects)
-                aRet = pSdrGrafObj->GetTransformedGraphic();
-            }
+            // get Metafile for Svg content
+            aRet = pSdrGrafObj->getMetafileFromEmbeddedVectorGraphicData();
         }
-        else if(pSdrOle2Obj)
+        else
         {
-            if ( pSdrOle2Obj->GetGraphic() )
-                aRet = *pSdrOle2Obj->GetGraphic();
+            // Make behaviour coherent with metafile
+            // recording below (which of course also takes
+            // view-transformed objects)
+            aRet = pSdrGrafObj->GetTransformedGraphic();
         }
-
-        // if graphic could not be retrieved => go the hard way and create a MetaFile
-        if( ( GraphicType::NONE == aRet.GetType() ) || ( GraphicType::Default == aRet.GetType() ) )
+    }
+    else if(pSdrOle2Obj)
+    {
+        if(pSdrOle2Obj->GetGraphic())
         {
-            ScopedVclPtrInstance< VirtualDevice > pOut;
-            GDIMetaFile     aMtf;
-            const tools::Rectangle aBoundRect( pObj->GetCurrentBoundRect() );
-            const MapMode   aMap( pModel->GetScaleUnit(),
-                                  Point(),
-                                  pModel->GetScaleFraction(),
-                                  pModel->GetScaleFraction() );
-
-            pOut->EnableOutput( false );
-            pOut->SetMapMode( aMap );
-            aMtf.Record( pOut );
-            pObj->SingleObjectPainter( *pOut.get() );
-            aMtf.Stop();
-            aMtf.WindStart();
-
-            // #i99268# replace the original offset from using XOutDev's SetOffset
-            // NOT (as tried with #i92760#) with another MapMode which gets recorded
-            // by the Metafile itself (what always leads to problems), but by
-            // moving the result directly
-            aMtf.Move(-aBoundRect.Left(), -aBoundRect.Top());
-
-            aMtf.SetPrefMapMode( aMap );
-            aMtf.SetPrefSize( aBoundRect.GetSize() );
+            aRet = *pSdrOle2Obj->GetGraphic();
+        }
+    }
 
-            if( aMtf.GetActionSize() )
-                aRet = aMtf;
+    // if graphic could not be retrieved => go the hard way and create a MetaFile
+    if((GraphicType::NONE == aRet.GetType()) || (GraphicType::Default == aRet.GetType()))
+    {
+        ScopedVclPtrInstance< VirtualDevice > pOut;
+        GDIMetaFile aMtf;
+        const tools::Rectangle aBoundRect(rSdrObject.GetCurrentBoundRect());
+        const MapMode aMap(rSdrObject.getSdrModelFromSdrObject().GetScaleUnit(),
+            Point(),
+            rSdrObject.getSdrModelFromSdrObject().GetScaleFraction(),
+            rSdrObject.getSdrModelFromSdrObject().GetScaleFraction());
+
+        pOut->EnableOutput(false);
+        pOut->SetMapMode(aMap);
+        aMtf.Record(pOut);
+        rSdrObject.SingleObjectPainter(*pOut.get());
+        aMtf.Stop();
+        aMtf.WindStart();
+
+        // #i99268# replace the original offset from using XOutDev's SetOffset
+        // NOT (as tried with #i92760#) with another MapMode which gets recorded
+        // by the Metafile itself (what always leads to problems), but by
+        // moving the result directly
+        aMtf.Move(-aBoundRect.Left(), -aBoundRect.Top());
+        aMtf.SetPrefMapMode(aMap);
+        aMtf.SetPrefSize(aBoundRect.GetSize());
+
+        if(aMtf.GetActionSize())
+        {
+            aRet = aMtf;
         }
-     }
+    }
 
      return aRet;
 }
@@ -736,7 +736,7 @@ SdrModel* SdrExchangeView::GetMarkedObjModel() const
                 // virtual connection to referenced page gets lost in new model
                 pNewObj = new SdrGrafObj(
                     *pNeuMod,
-                    GetObjGraphic(mpModel, pObj),
+                    GetObjGraphic(*pObj),
                     pObj->GetLogicRect());
                 pNewObj->SetPage( pNeuPag );
             }
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index f5cd2d370234..77d6d5545206 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -2968,9 +2968,7 @@ void SwEscherEx::WriteOCXControl( const SwFrameFormat& rFormat, sal_uInt32 nShap
     // #i71538# use complete SdrViews
     // SdrExchangeView aExchange(pModel, pDevice);
     SdrView aExchange(*pModel, pDevice);
-
-    Graphic aGraphic(SdrExchangeView::GetObjGraphic(pModel, pSdrObj));
-
+    const Graphic aGraphic(SdrExchangeView::GetObjGraphic(*pSdrObj));
     EscherPropertyContainer aPropOpt;
     WriteOLEPicture(aPropOpt,
         ShapeFlag::HaveAnchor | ShapeFlag::HaveShapeProperty | ShapeFlag::OLEShape, aGraphic,
commit 8d853b744e1524bd9a1904bc835062963306a8a9
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Fri Mar 16 15:31:02 2018 +0100

    SOSAW080: Stabilized for UnitTests, cleanups
    
    Change-Id: I6878b33f8b05738a44c0910e40a60a0f0d1d58ed

diff --git a/basctl/source/dlged/dlgedpage.cxx b/basctl/source/dlged/dlgedpage.cxx
index 2804fd3d57ee..da9ba12ef1b0 100644
--- a/basctl/source/dlged/dlgedpage.cxx
+++ b/basctl/source/dlged/dlgedpage.cxx
@@ -32,24 +32,11 @@ DlgEdPage::DlgEdPage(DlgEdModel& rModel, bool bMasterPage)
 {
 }
 
-// TTTT
-// DlgEdPage::DlgEdPage(const DlgEdPage& rSrcPage)
-// :   SdrPage(rSrcPage)
-//     ,pDlgEdForm(nullptr)
-// {
-// }
-
 DlgEdPage::~DlgEdPage()
 {
     Clear();
 }
 
-// TTTT
-// SdrPage* DlgEdPage::Clone() const
-// {
-//     return Clone(nullptr);
-// }
-
 SdrPage* DlgEdPage::Clone(SdrModel* const pNewModel) const
 {
     DlgEdModel& rDlgEdModel(static_cast< DlgEdModel& >(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
diff --git a/basctl/source/inc/dlgedpage.hxx b/basctl/source/inc/dlgedpage.hxx
index ab28c2d5d850..164f725f85ee 100644
--- a/basctl/source/inc/dlgedpage.hxx
+++ b/basctl/source/inc/dlgedpage.hxx
@@ -44,17 +44,12 @@ public:
     explicit DlgEdPage( DlgEdModel& rModel, bool bMasterPage = false );
     virtual ~DlgEdPage() override;
 
-    // TTTT
-    // virtual SdrPage* Clone() const override;
     virtual SdrPage* Clone(SdrModel* pNewModel = nullptr) const override;
 
     void            SetDlgEdForm( DlgEdForm* pForm ) { pDlgEdForm = pForm; }
     DlgEdForm*      GetDlgEdForm() const { return pDlgEdForm; }
 
     virtual SdrObject* SetObjectOrdNum(size_t nOldObjNum, size_t nNewObjNum) override;
-
-private:
-    // TTTT DlgEdPage(const DlgEdPage& rSrcPage);
 };
 
 } // namespace basctl
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 3ca0000cc06a..00abbf63ad5e 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -396,7 +396,7 @@ void ChartController::impl_PasteShapes( SdrModel* pModel )
                 while ( aIter.IsMore() )
                 {
                     SdrObject* pObj(aIter.Next());
-                    // TTTT clone to new SdrModel
+                    // Clone to new SdrModel
                     SdrObject* pNewObj(pObj ? pObj->Clone(&pDrawModelWrapper->getSdrModel()) : nullptr);
 
                     if ( pNewObj )
diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx
index 4ed4cce5eec3..58ae066ae39b 100644
--- a/cui/source/tabpages/measure.cxx
+++ b/cui/source/tabpages/measure.cxx
@@ -602,8 +602,8 @@ void SvxMeasurePage::Construct()
     // pMeasureObj is member of SvxXMeasurePreview and can only be accessed due to
     // SvxMeasurePage being a friend. It has it's own SdrModel (also in SvxXMeasurePreview)
     // and 'setting' the SdrModel is a hack. The comment above about 'notify unit and
-    // floatingpoint-values' is not clear, but has to be done another way.
-    // Checked on aw080, is just commented out there, too.
+    // floatingpoint-values' is not clear, but has to be done another way - if needed.
+    // Checked on original aw080, is just commented out there, too.
 
     // m_pCtlPreview->pMeasureObj->SetModel( pView->GetModel() );
     m_pCtlPreview->Invalidate();
diff --git a/include/svx/fmpage.hxx b/include/svx/fmpage.hxx
index 791db1a9a517..2605a6067517 100644
--- a/include/svx/fmpage.hxx
+++ b/include/svx/fmpage.hxx
@@ -53,11 +53,6 @@ public:
     explicit FmFormPage(FmFormModel& rModel, bool bMasterPage=false);
     virtual ~FmFormPage() override;
 
-    // TTTT
-    // virtual void    SetModel(SdrModel* pNewModel) override;
-
-    // TTTT
-    // virtual SdrPage* Clone() const override;
     virtual SdrPage* Clone(SdrModel* pNewModel = nullptr) const override;
 
     virtual void    InsertObject(SdrObject* pObj, size_t nPos = SAL_MAX_SIZE) override;
@@ -78,8 +73,7 @@ public:
                             const HelpEvent& rEvt );
 
 protected:
-    // TTTT FmFormPage(const FmFormPage& rPage);
-
+    // lateInit -> copyValuesToClonedInstance (?)
     void lateInit(const FmFormPage& rPage);
 };
 
diff --git a/include/svx/obj3d.hxx b/include/svx/obj3d.hxx
index 192df6d151cf..7ad18848d4cd 100644
--- a/include/svx/obj3d.hxx
+++ b/include/svx/obj3d.hxx
@@ -91,7 +91,6 @@ public:
 private:
     E3dObjList &operator=(const E3dObjList& rSrcList) = delete;
     E3dObjList(const E3dObjList& rSrcList) = delete;
-// TTTT    SVX_DLLPUBLIC E3dObjList(const E3dObjList& rSrcList);
 };
 
 /*************************************************************************
diff --git a/include/svx/sdr/properties/defaultproperties.hxx b/include/svx/sdr/properties/defaultproperties.hxx
index e264191c6f0a..de9a9183daf5 100644
--- a/include/svx/sdr/properties/defaultproperties.hxx
+++ b/include/svx/sdr/properties/defaultproperties.hxx
@@ -54,6 +54,9 @@ namespace sdr
             // react on ItemSet changes
             virtual void ItemSetChanged(const SfxItemSet& rSet) override;
 
+            // check if SfxItemSet exists
+            bool HasSfxItemSet() const { return bool(mpItemSet); }
+
         public:
             // basic constructor
             explicit DefaultProperties(SdrObject& rObj);
diff --git a/include/svx/sdr/properties/properties.hxx b/include/svx/sdr/properties/properties.hxx
index b5d87c5bf810..e2a325a688bf 100644
--- a/include/svx/sdr/properties/properties.hxx
+++ b/include/svx/sdr/properties/properties.hxx
@@ -171,13 +171,6 @@ namespace sdr
             // Override this to do it for hierarchical objects like e.g. groups.
             virtual void Scale(const Fraction& rScale);
 
-            // Move local items to a new ItemPool.
-            // Override this to do it for hierarchical objects like e.g. groups.
-            // TTTT virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel);
-
-            // Initialize for new SdrModel
-            // TTTT virtual void SetModel(SdrModel& rNewModel);
-
             // force all attributes which come from styles to hard attributes
             // to be able to live without the style.
             virtual void ForceStyleToHardAttributes();
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index f089eaaa91c6..7b820aeaeaf7 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -791,10 +791,6 @@ public:
     // removes the record from the list and performs delete (FreeMem+Dtor).
     void DeleteUserData(sal_uInt16 nNum);
 
-    // switch ItemPool for this object
-    // TTTT will no longer ber needed
-    // void MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel);
-
     // access to the UNO representation of the shape
     virtual css::uno::Reference< css::uno::XInterface > getUnoShape();
 
diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index de9ece6ee18f..ea2658721694 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -105,9 +105,6 @@ public:
     SdrPage*       GetPage() const;
     void           SetPage(SdrPage* pNewPage);
 
-    // TTTT
-    // virtual void   SetModel(SdrModel* pNewModel);
-
     /// recalculate order numbers / ZIndex
     void           RecalcObjOrdNums();
     bool           IsObjOrdNumsDirty() const        { return bObjOrdNumsDirty; }
@@ -453,9 +450,6 @@ public:
     explicit SdrPage(SdrModel& rModel, bool bMasterPage=false);
     virtual ~SdrPage() override;
 
-    // TTTT
-    // virtual SdrPage* Clone() const override;
-
     virtual SdrPage* Clone(SdrModel* pNewModel = nullptr) const;
     bool             IsMasterPage() const       { return mbMaster; }
     void             SetInserted(bool bNew = true);
@@ -487,9 +481,6 @@ public:
     sal_Int32 GetRightBorder() const;
     sal_Int32 GetLowerBorder() const;
 
-    // TTTT
-    // virtual void SetModel(SdrModel* pNewModel) override;
-
     // New MasterPage interface
     bool TRG_HasMasterPage() const { return (nullptr != mpMasterPageDescriptor); }
     void TRG_SetMasterPage(SdrPage& rNew);
diff --git a/include/svx/svdtext.hxx b/include/svx/svdtext.hxx
index 78080ed18f4a..bc59fb699814 100644
--- a/include/svx/svdtext.hxx
+++ b/include/svx/svdtext.hxx
@@ -47,9 +47,6 @@ public:
     SdrText( SdrTextObj& rObject, OutlinerParaObject* pOutlinerParaObject = nullptr );
     virtual ~SdrText() override;
 
-    // TTTT
-    // virtual void SetModel(SdrModel* pNewModel);
-
     void ForceOutlinerParaObject( OutlinerMode nOutlMode );
 
     virtual void SetOutlinerParaObject( OutlinerParaObject* pTextObject );
@@ -62,8 +59,8 @@ public:
     // return a text-specific ItemSet
     virtual const SfxItemSet& GetItemSet() const;
 
-    // TTTT does not need an own SdrModel reference - always has the SdrTextObj working with
-    // SdrModel& GetSdrModelFromSdrTextObj() const { return mrObject.getSdrModelFromSdrObject(); }
+    // This class does not need an own SdrModel reference - always
+    // has the SdrTextObj working with so can use SdrModel::getSdrModelFromSdrObject()
     SdrTextObj& GetObject() const { return mrObject; }
 
     /** returns the current OutlinerParaObject and removes it from this instance */
diff --git a/include/svx/unoshape.hxx b/include/svx/unoshape.hxx
index d3b38c6456e9..626031962daf 100644
--- a/include/svx/unoshape.hxx
+++ b/include/svx/unoshape.hxx
@@ -206,9 +206,6 @@ public:
     void TakeSdrObjectOwnership();
     bool HasSdrObjectOwnership() const;
 
-    // TTTT needed?
-    // void ChangeModel( SdrModel* pNewModel );
-
     void InvalidateSdrObject() { mpObj.reset( nullptr ); };
     SdrObject* GetSdrObject() const {return mpObj.get();}
     void SetShapeType( const OUString& ShapeType ) { maShapeType = ShapeType; }
diff --git a/reportdesign/inc/RptPage.hxx b/reportdesign/inc/RptPage.hxx
index 492e8c2c784c..2c45c93a8331 100644
--- a/reportdesign/inc/RptPage.hxx
+++ b/reportdesign/inc/RptPage.hxx
@@ -42,9 +42,6 @@ class REPORTDESIGN_DLLPUBLIC OReportPage : public SdrPage
     bool                    m_bSpecialInsertMode;
     std::vector<SdrObject*> m_aTemporaryObjectList;
 
-    // TTTT
-    // OReportPage(const OReportPage&);
-
     // method to remove temporary objects, created by 'special mode'
     // (BegDragObj)
     void removeTempObject(SdrObject const *_pToRemoveObj);
@@ -60,8 +57,6 @@ public:
     OReportPage( OReportModel& rModel
                 ,const css::uno::Reference< css::report::XSection >& _xSection );
 
-    // TTTT
-    // virtual SdrPage* Clone() const override;
     virtual SdrPage* Clone(SdrModel* pNewModel = nullptr) const override;
 
     virtual void NbcInsertObject(SdrObject* pObj, size_t nPos=SAL_MAX_SIZE) override;
diff --git a/reportdesign/source/core/sdr/RptPage.cxx b/reportdesign/source/core/sdr/RptPage.cxx
index 3b1e4309a479..b4e09805f04c 100644
--- a/reportdesign/source/core/sdr/RptPage.cxx
+++ b/reportdesign/source/core/sdr/RptPage.cxx
@@ -38,27 +38,10 @@ OReportPage::OReportPage(
 {
 }
 
-// TTTT
-// OReportPage::OReportPage(const OReportPage& rPage)
-// :   SdrPage(rPage)
-//     ,rModel(rPage.getOReportModelFromOReportPage())
-//     ,m_xSection(rPage.m_xSection)
-//     ,m_bSpecialInsertMode(rPage.m_bSpecialInsertMode)
-//     ,m_aTemporaryObjectList(rPage.m_aTemporaryObjectList)
-// {
-// }
-
-
 OReportPage::~OReportPage()
 {
 }
 
-// TTTT
-// SdrPage* OReportPage::Clone() const
-// {
-//     return Clone(nullptr);
-// }
-
 SdrPage* OReportPage::Clone(SdrModel* pNewModel) const
 {
     OReportModel& rOReportModel(static_cast< OReportModel& >(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx
index cb23ef347f01..27e467105424 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -265,11 +265,10 @@ void OReportSection::Paste(const uno::Sequence< beans::NamedValue >& _aAllreadyC
                         SdrObject* pObject = pShape ? pShape->GetSdrObject() : nullptr;
                         if ( pObject )
                         {
-                            // TTTT clone to target SdrModel
+                            // Clone to target SdrModel
                             SdrObject* pNewObj(pObject->Clone(m_pModel.get()));
 
                             pNewObj->SetPage( m_pPage );
-                            //pNewObj->SetModel( m_pModel.get() );
                             m_pPage->InsertObject(pNewObj, SAL_MAX_SIZE);
 
                             tools::Rectangle aRet(VCLPoint((*pCopiesIter)->getPosition()),VCLSize((*pCopiesIter)->getSize()));
diff --git a/sc/inc/drawpage.hxx b/sc/inc/drawpage.hxx
index fb9b464eaff6..cbbaff987a6c 100644
--- a/sc/inc/drawpage.hxx
+++ b/sc/inc/drawpage.hxx
@@ -33,13 +33,9 @@ public:
     explicit ScDrawPage(ScDrawLayer& rNewModel, bool bMasterPage);
     virtual ~ScDrawPage() override;
 
-    // TTTT virtual ScDrawPage* Clone() const override;
     virtual ScDrawPage* Clone(SdrModel* pNewModel = nullptr) const override;
 
     virtual css::uno::Reference< css::uno::XInterface > createUnoPage() override;
-
-private:
-    // TTTT ScDrawPage(const ScDrawPage& rSrcPage);
 };
 
 #endif
diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index 4c3b288a21b3..df51aee91b9e 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -84,10 +84,8 @@ void ScDocument::TransferDrawPage(ScDocument* pSrcDoc, SCTAB nSrcPos, SCTAB nDes
             SdrObject* pOldObject = aIter.Next();
             while (pOldObject)
             {
-                // TTTT clone to target SdrModel
+                // Clone to target SdrModel
                 SdrObject* pNewObject = pOldObject->Clone(mpDrawLayer);
-                // SdrObject* pNewObject = pOldObject->Clone( pNewPage, mpDrawLayer );
-                // pNewObject->SetModel(mpDrawLayer);
                 pNewObject->SetPage(pNewPage);
                 pNewObject->NbcMove(Size(0,0));
                 pNewPage->InsertObject( pNewObject );
diff --git a/sc/source/core/data/drawpage.cxx b/sc/source/core/data/drawpage.cxx
index c761b88ad3d9..302f0e93ff45 100644
--- a/sc/source/core/data/drawpage.cxx
+++ b/sc/source/core/data/drawpage.cxx
@@ -30,22 +30,10 @@ ScDrawPage::ScDrawPage(ScDrawLayer& rNewModel, bool bMasterPage)
     SetSize( Size( LONG_MAX, LONG_MAX ) );
 }
 
-// TTTT
-// ScDrawPage::ScDrawPage(const ScDrawPage& rSrcPage)
-// :   FmFormPage(rSrcPage)
-// {
-// }
-
 ScDrawPage::~ScDrawPage()
 {
 }
 
-// TTTT
-// ScDrawPage* ScDrawPage::Clone() const
-// {
-//     return Clone(nullptr);
-// }
-
 ScDrawPage* ScDrawPage::Clone(SdrModel* const pNewModel) const
 {
     ScDrawLayer& rScDrawLayer(static_cast< ScDrawLayer& >(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index aef32c2ff0b5..bf92401c7f75 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -449,9 +449,8 @@ void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
                 pOldData->maEnd.SetTab(nOldTab);
             }
 
-            // TTTT clone to thatet SdrModel
+            // Clone to target SdrModel
             SdrObject* pNewObject = pOldObject->Clone(this);
-            // pNewObject->SetModel(this);
             pNewObject->SetPage(pNewPage);
             pNewObject->NbcMove(Size(0,0));
             pNewPage->InsertObject( pNewObject );
@@ -1398,9 +1397,8 @@ void ScDrawLayer::CopyToClip( ScDocument* pClipDoc, SCTAB nTab, const tools::Rec
                 OSL_ENSURE( pDestPage, "no page" );
                 if (pDestPage)
                 {
-                    // TTTT clone to target SdrModel
+                    // Clone to target SdrModel
                     SdrObject* pNewObject = pOldObject->Clone(pDestModel);
-                    // pNewObject->SetModel(pDestModel);
                     pNewObject->SetPage(pDestPage);
 
                     uno::Reference< chart2::XChartDocument > xOldChart( ScChartHelper::GetChartFromSdrObject( pOldObject ) );
@@ -1565,9 +1563,8 @@ void ScDrawLayer::CopyFromClip( ScDrawLayer* pClipModel, SCTAB nSourceTab, const
         // do not copy internal objects (detective) and note captions
         if ( rSourceRange.IsInside( aObjRect ) && (pOldObject->GetLayer() != SC_LAYER_INTERN) && !IsNoteCaption( pOldObject ) )
         {
-            // TTTT clone to target SdrModel
+            // Clone to target SdrModel
             SdrObject* pNewObject = pOldObject->Clone(this);
-            // pNewObject->SetModel(this);
             pNewObject->SetPage(pDestPage);
 
             if ( bMirrorObj )
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index b8d34a27785e..989c9b693d0f 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -426,13 +426,6 @@ SdrObjectPtr XclImpDrawObjBase::CreateSdrObject( XclImpDffConverter& rDffConv, c
     {
         xSdrObj = DoCreateSdrObj( rDffConv, rAnchorRect );
 
-        // TTTT DoCreateSdrObj uses *GetDoc().GetDrawLayer() in most cases,
-        // also XclImpDffConverter::CreateSdrObject which uses
-        // XclImpTbxObjBase::CreateSdrObjectFromShape, so all creating aleady
-        // in the target SdrModel
-        // if( xSdrObj )
-        //     xSdrObj->SetModel( rDffConv.GetModel() );
-
         //added for exporting OCX control
         /*  mnObjType value set should be as below table:
                     0x0000      Group               0x0001      Line
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 291332564213..8a41c5db4c4d 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -167,7 +167,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
         aRect);
 
     // calling SetGraphicLink here doesn't work
-    // TTTT: Yes, due to the SdrObject had no SdrModel
+    // Yes, due to the SdrObject had no SdrModel
     //  Path is no longer used as name for the graphics object
 
     ScDrawLayer* pLayer = static_cast<ScDrawLayer*>(pView->GetModel());
@@ -235,7 +235,6 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
         *rData.GetDocument()->GetDrawLayer(),
         tools::Rectangle(aInsertPos, aSize));
 
-    // TTTT pObj->SetModel(rData.GetDocument()->GetDrawLayer()); // set before setURL
     pObj->setURL( realURL, ""/*TODO?*/ );
     pView->InsertObjectAtView( pObj, *pPV, bApi ? SdrInsertFlags::DONTMARK : SdrInsertFlags::NONE );
 }
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 20bb7bca7060..cfbd4bed996f 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -153,7 +153,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
                 const SdrMark* pM=aMark.GetMark(nm);
                 const SdrObject* pObj=pM->GetMarkedSdrObj();
 
-                // TTTT directly clone to taget  SdrModel
+                // Directly Clone to taget  SdrModel
                 SdrObject* pNewObj(pObj->Clone(pDrawModel));
 
                 if (pNewObj!=nullptr)
@@ -194,7 +194,8 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
     else
     {
         bPasteIsMove = false;       // no internal move happened
-        // TTTT hide all non-direct SdrView constr to disable construct in-between classes
+        // TTTT hide all non-direct SdrView constr to disable construct
+        // in-between classes in one of the next steps (!)
         SdrView aView(*pModel);     // #i71529# never create a base class of SdrView directly!
         SdrPageView* pPv = aView.ShowSdrPage(aView.GetModel()->GetPage(0));
         aView.MarkAllObj(pPv);
diff --git a/sd/inc/sdpage.hxx b/sd/inc/sdpage.hxx
index 702c0cacfb2f..5dedec0d3bb4 100644
--- a/sd/inc/sdpage.hxx
+++ b/sd/inc/sdpage.hxx
@@ -148,7 +148,6 @@ friend class sd::UndoAttrObject;
     sal_Int32 mnTransitionFadeColor;
     double mfTransitionDuration;
 
-    // TTTT SdPage(const SdPage& rSrcPage);
     void lateInit(const SdPage& rSrcPage);
 
 public:
@@ -156,8 +155,6 @@ public:
     SdPage(SdDrawDocument& rNewDoc, bool bMasterPage);
     virtual ~SdPage() override;
 
-    // TTTT
-    // virtual SdrPage* Clone() const override;
     virtual SdrPage* Clone(SdrModel* pNewModel = nullptr) const override;
 
     virtual void    SetSize(const Size& aSize) override;
@@ -166,10 +163,6 @@ public:
     virtual void    SetRightBorder(sal_Int32 nBorder) override;
     virtual void    SetUpperBorder(sal_Int32 nBorder) override;
     virtual void    SetLowerBorder(sal_Int32 nBorder) override;
-
-    // TTTT
-    // virtual void    SetModel(SdrModel* pNewModel) override;
-
     virtual bool    IsReadOnly() const override;
 
     sd::ShapeList&  GetPresentationShapeList() { return maPresentationShapeList; }
@@ -394,7 +387,7 @@ private:
     sal_uInt16 mnPageId;
 
     /** clone the animations from this and set them to rTargetPage
-     *  TTTT what is strange, should be the other way around by
+     *  TTTT: Order is strange, should be the other way around by
      *  convention/convenience and makes usage a little dangerous...
     */
     void cloneAnimations( SdPage& rTargetPage ) const;
diff --git a/sd/source/core/drawdoc.cxx b/sd/source/core/drawdoc.cxx
index cdf4b1673812..960c6a81200f 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -659,23 +659,7 @@ void SdDrawDocument::NewOrLoadCompleted(DocCreationMode eMode)
     }
 
     mbNewOrLoadCompleted = true;
-
-    // Update all linked pages
-    // TTTT SdrPage s should already be constructed with *this as SdrModel
-    // sal_uInt16 nMaxSdPages = GetSdPageCount(PageKind::Standard);
-
-    // for (sal_uInt16 nSdPage=0; nSdPage < nMaxSdPages; nSdPage++)
-    // {
-    //     SdPage* pPage = GetSdPage(nSdPage, PageKind::Standard);
-
-    //     if (pPage && !pPage->GetFileName().isEmpty() && pPage->GetBookmarkName().getLength())
-    //     {
-    //         pPage->SetModel(this);
-    //     }
-    // }
-
     UpdateAllLinks();
-
     SetChanged( false );
 }
 
diff --git a/sd/source/core/drawdoc3.cxx b/sd/source/core/drawdoc3.cxx
index 30c62123f9a3..845258aa837b 100644
--- a/sd/source/core/drawdoc3.cxx
+++ b/sd/source/core/drawdoc3.cxx
@@ -614,9 +614,6 @@ bool SdDrawDocument::InsertBookmarkAsPage(
                 // Assemble all link names
                 pPage->SetFileName(aBookmarkName);
                 pPage->SetBookmarkName(aName);
-
-                // TTTT ::Merge above already has Clone'd to *this
-                // pPage->SetModel(this);
             }
 
             nActualInsertPos += 2;
@@ -713,9 +710,6 @@ bool SdDrawDocument::InsertBookmarkAsPage(
                     SdPage* pPage = static_cast<SdPage*>( GetPage(nActualInsertPos) );
                     pPage->SetFileName(aBookmarkName);
                     pPage->SetBookmarkName(aPgName);
-
-                    // TTTT ::Merge above already has Clone'd to *this
-                    // pPage->SetModel(this);
                 }
 
                 if (bReplace)
diff --git a/sd/source/core/sdpage.cxx b/sd/source/core/sdpage.cxx
index 8f74b5f5b72e..eed4fa28256c 100644
--- a/sd/source/core/sdpage.cxx
+++ b/sd/source/core/sdpage.cxx
@@ -130,7 +130,7 @@ SdPage::SdPage(SdDrawDocument& rNewDoc, bool bMasterPage)
     // contains the designator for the outline (STR_LAYOUT_OUTLINE).
     maLayoutName = SdResId(STR_LAYOUT_DEFAULT_NAME)+ SD_LT_SEPARATOR STR_LAYOUT_OUTLINE;
 
-    // TTTT stuff from old SetModel:
+    // Stuff that former SetModel did also:
     ConnectLink();
 }
 
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index a484af49a60b..57589b1e1705 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -282,23 +282,6 @@ void SdPage::EndListenOutlineText()
 
 /*************************************************************************
 |*
-|* Set new model
-|*
-\************************************************************************/
-
-// TTTT
-// void SdPage::SetModel(SdrModel* pNewModel)
-// {
-//     DisconnectLink();
-
-//     // assign model
-//     FmFormPage::SetModel(pNewModel);
-
-//     ConnectLink();
-// }
-
-/*************************************************************************
-|*
 |* Is this page read-only?
 |*
 \************************************************************************/
@@ -361,54 +344,38 @@ void SdPage::DisconnectLink()
     }
 }
 
-/*************************************************************************
-|*
-|* Copy-Ctor
-|*
-\************************************************************************/
-
-// TTTT
-// SdPage::SdPage(const SdPage& rSrcPage)
-// :   FmFormPage(rSrcPage)
-// ,   SdrObjUserCall()
-// ,   mpItems(nullptr)
-// ,   mnPageId(mnLastPageId++)
-// {
-//     mePageKind           = rSrcPage.mePageKind;
-//     meAutoLayout         = rSrcPage.meAutoLayout;
-
-//     mbSelected           = false;
-//     mnTransitionType    = rSrcPage.mnTransitionType;
-//     mnTransitionSubtype = rSrcPage.mnTransitionSubtype;
-//     mbTransitionDirection = rSrcPage.mbTransitionDirection;
-//     mnTransitionFadeColor = rSrcPage.mnTransitionFadeColor;
-//     mfTransitionDuration = rSrcPage.mfTransitionDuration;
-//     mePresChange            = rSrcPage.mePresChange;
-//     mfTime               = rSrcPage.mfTime;
-//     mbSoundOn            = rSrcPage.mbSoundOn;
-//     mbExcluded           = rSrcPage.mbExcluded;
-
-//     maLayoutName         = rSrcPage.maLayoutName;
-//     maSoundFile          = rSrcPage.maSoundFile;
-//     mbLoopSound          = rSrcPage.mbLoopSound;
-//     mbStopSound          = rSrcPage.mbStopSound;
-//     maCreatedPageName.clear();
-//     maFileName           = rSrcPage.maFileName;
-//     maBookmarkName       = rSrcPage.maBookmarkName;
-//     mbScaleObjects       = rSrcPage.mbScaleObjects;
-//     mbBackgroundFullSize = rSrcPage.mbBackgroundFullSize;
-//     meCharSet            = rSrcPage.meCharSet;
-//     mnPaperBin           = rSrcPage.mnPaperBin;
-
-//     mpPageLink           = nullptr;    // is set when inserting via ConnectLink()
-
-//     mbIsPrecious         = false;
-// }
-
 void SdPage::lateInit(const SdPage& rSrcPage)
 {
+    // call parent
     FmFormPage::lateInit(rSrcPage);
 
+    // copy local variables (former stuff from copy constructor)
+    mePageKind = rSrcPage.mePageKind;
+    meAutoLayout = rSrcPage.meAutoLayout;
+    mbSelected = false;
+    mnTransitionType = rSrcPage.mnTransitionType;
+    mnTransitionSubtype = rSrcPage.mnTransitionSubtype;
+    mbTransitionDirection = rSrcPage.mbTransitionDirection;
+    mnTransitionFadeColor = rSrcPage.mnTransitionFadeColor;
+    mfTransitionDuration = rSrcPage.mfTransitionDuration;
+    mePresChange = rSrcPage.mePresChange;
+    mfTime = rSrcPage.mfTime;
+    mbSoundOn = rSrcPage.mbSoundOn;
+    mbExcluded = rSrcPage.mbExcluded;
+    maLayoutName = rSrcPage.maLayoutName;
+    maSoundFile = rSrcPage.maSoundFile;
+    mbLoopSound = rSrcPage.mbLoopSound;
+    mbStopSound = rSrcPage.mbStopSound;
+    maCreatedPageName.clear();
+    maFileName = rSrcPage.maFileName;
+    maBookmarkName = rSrcPage.maBookmarkName;
+    mbScaleObjects = rSrcPage.mbScaleObjects;
+    mbBackgroundFullSize = rSrcPage.mbBackgroundFullSize;
+    meCharSet = rSrcPage.meCharSet;
+    mnPaperBin = rSrcPage.mnPaperBin;
+    mpPageLink = nullptr;    // is set when inserting via ConnectLink()
+    mbIsPrecious = false;
+
     // use shape list directly to preserve constness of rSrcPage
     const std::list< SdrObject* >& rShapeList = rSrcPage.maPresentationShapeList.getList();
     for( std::list< SdrObject* >::const_iterator aIter = rShapeList.begin(); aIter != rShapeList.end(); ++aIter )
@@ -443,12 +410,6 @@ void SdPage::lateInit(const SdPage& rSrcPage)
 |*
 \************************************************************************/
 
-// TTTT
-// SdrPage* SdPage::Clone() const
-// {
-//     return Clone(nullptr);
-// }
-
 SdrPage* SdPage::Clone(SdrModel* pNewModel) const
 {
     SdDrawDocument& rSdDrawDocument(static_cast< SdDrawDocument& >(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
@@ -608,7 +569,10 @@ void SdPage::addAnnotation( const Reference< XAnnotation >& xAnnotation, int nIn
     SetChanged();
     getSdrModelFromSdrPage().SetChanged();
     // TTTT NotifyDocumentEvent shbe ref?
-    NotifyDocumentEvent( static_cast< SdDrawDocument* >(&getSdrModelFromSdrPage()), "OnAnnotationInserted", Reference<XInterface>( xAnnotation, UNO_QUERY ) );
+    NotifyDocumentEvent(
+        static_cast< SdDrawDocument* >(&getSdrModelFromSdrPage()),
+        "OnAnnotationInserted",
+        Reference<XInterface>(xAnnotation, UNO_QUERY));
 }
 
 void SdPage::removeAnnotation( const Reference< XAnnotation >& xAnnotation )
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index b4c408e15fb4..f9085c51e005 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -521,7 +521,7 @@ public:
                 continue;
 
             SdrRectObj* pObject = new SdrRectObj(
-                *m_rDrawViewShell.GetDoc(), // TTTT
+                *m_rDrawViewShell.GetDoc(), // TTTT shbe ref
                 OBJ_TEXT);
             pObject->SetMergedItem(makeSdrTextAutoGrowWidthItem(true));
             pObject->SetOutlinerParaObject(pOutliner->CreateParaObject());
diff --git a/svx/inc/sdr/properties/attributeproperties.hxx b/svx/inc/sdr/properties/attributeproperties.hxx
index 436a6a2ed8c6..d12374f31ee1 100644
--- a/svx/inc/sdr/properties/attributeproperties.hxx
+++ b/svx/inc/sdr/properties/attributeproperties.hxx
@@ -31,6 +31,9 @@ namespace sdr
     {
         class AttributeProperties : public DefaultProperties, public SfxListener, public svl::StyleSheetUser
         {
+            // get the correct (#119287#) default SfyStyleSheet from SdrObject's SdrModel
+            SfxStyleSheet* ImpGetDefaultStyleSheet() const;
+
             // core to set parent at SfxItemSet and to execute the hard attribute computations
             void ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr);
 
@@ -76,12 +79,6 @@ namespace sdr
             // get the installed StyleSheet
             virtual SfxStyleSheet* GetStyleSheet() const override;
 
-            // Move properties to a new ItemPool.
-            // TTTT virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) override;
-
-            // Initialize for new SdrModel
-            // virtual void SetModel(SdrModel& rNewModel) override;
-
             // force all attributes which come from styles to hard attributes
             // to be able to live without the style.
             virtual void ForceStyleToHardAttributes() override;
diff --git a/svx/inc/sdr/properties/e3dsceneproperties.hxx b/svx/inc/sdr/properties/e3dsceneproperties.hxx
index 71e56dbea915..00d377766e01 100644
--- a/svx/inc/sdr/properties/e3dsceneproperties.hxx
+++ b/svx/inc/sdr/properties/e3dsceneproperties.hxx
@@ -68,9 +68,6 @@ namespace sdr
             // get the installed StyleSheet
             virtual SfxStyleSheet* GetStyleSheet() const override;
 
-            // Move properties to a new ItemPool. Default implementation does nothing.
-            // TTTT virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) override;
-
             // Special for scene:
             void SetSceneItemsFromCamera();
         };
diff --git a/svx/inc/sdr/properties/groupproperties.hxx b/svx/inc/sdr/properties/groupproperties.hxx
index fa66e3c038e8..9b6b28a73dc3 100644
--- a/svx/inc/sdr/properties/groupproperties.hxx
+++ b/svx/inc/sdr/properties/groupproperties.hxx
@@ -103,9 +103,6 @@ namespace sdr
             // DefaultProperties::GetObjectItemSet() if a new ItemSet is created
             virtual void ForceDefaultAttributes() override;
 
-            // Move properties to a new ItemPool.
-            // TTTT virtual void MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel) override;
-
             // force all attributes which come from styles to hard attributes
             // to be able to live without the style.
             virtual void ForceStyleToHardAttributes() override;
diff --git a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
index 45f7e095ea37..bc21625c720c 100644
--- a/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
+++ b/svx/source/customshapes/EnhancedCustomShapeEngine.cxx
@@ -237,9 +237,6 @@ SdrObject* EnhancedCustomShapeEngine::ImplForceGroupWithText( const SdrObjCustom
                 static_cast<SdrObjGroup*>(pRenderedShape)->GetSubList()->NbcInsertObject( pTmp );
             }
             pRenderedShape->SetPage( pCustoObj->GetPage() );
-
-            // TTTT
-            // pRenderedShape->SetModel( pCustoObj->GetModel() );
         }
     }
     return pRenderedShape;
diff --git a/svx/source/engine3d/obj3d.cxx b/svx/source/engine3d/obj3d.cxx
index 917f54062e25..959ecf1f0c49 100644
--- a/svx/source/engine3d/obj3d.cxx
+++ b/svx/source/engine3d/obj3d.cxx
@@ -86,12 +86,6 @@ E3dObjList::E3dObjList()
 {
 }
 
-// TTTT
-// E3dObjList::E3dObjList(const E3dObjList& rSrcList)
-// :   SdrObjList(rSrcList.getSdrModelFromSdrPage())
-// {
-// }
-
 E3dObjList* E3dObjList::CloneSdrObjList(SdrModel* pNewModel) const
 {
     E3dObjList* pObjList = new E3dObjList();
diff --git a/svx/source/form/fmobj.cxx b/svx/source/form/fmobj.cxx
index ccad6d8935d6..912899f24b36 100644
--- a/svx/source/form/fmobj.cxx
+++ b/svx/source/form/fmobj.cxx
@@ -72,7 +72,7 @@ FmFormObj::FmFormObj(SdrModel& rSdrModel)
     ,m_nPos(-1)
     ,m_pLastKnownRefDevice(nullptr)
 {
-    // TTTT stuff from old SetModel:
+    // Stuff that old SetModel also did:
     impl_checkRefDevice_nothrow();
 }
 
@@ -585,15 +585,6 @@ Reference< XInterface >  FmFormObj::ensureModelEnv(const Reference< XInterface >
     return Reference<XInterface>( xDestContainer, UNO_QUERY );
 }
 
-
-// TTTT needed?
-// void FmFormObj::SetModel( SdrModel* _pNewModel )
-// {
-//     SdrUnoObj::SetModel( _pNewModel );
-//     impl_checkRefDevice_nothrow();
-// }
-
-
 FmFormObj* FmFormObj::GetFormObject( SdrObject* _pSdrObject )
 {
     FmFormObj* pFormObject = dynamic_cast< FmFormObj* >( _pSdrObject );
diff --git a/svx/source/form/fmpage.cxx b/svx/source/form/fmpage.cxx
index d1b8e515d473..ca79aba3845f 100644
--- a/svx/source/form/fmpage.cxx
+++ b/svx/source/form/fmpage.cxx
@@ -54,17 +54,12 @@ FmFormPage::FmFormPage(FmFormModel& rModel, bool bMasterPage)
 {
 }
 
-// TTTT
-// FmFormPage::FmFormPage(const FmFormPage& rPage)
-// :   SdrPage(rPage)
-//     ,m_pImpl(new FmFormPageImpl( *this ) )
-// {
-// }
-
 void FmFormPage::lateInit(const FmFormPage& rPage)
 {
+    // call parent
     SdrPage::lateInit( rPage );
 
+    // copy local variables (former stuff from copy constructor)
     m_pImpl->initFrom( rPage.GetImpl() );
     m_sPageName = rPage.m_sPageName;
 }
@@ -74,46 +69,6 @@ FmFormPage::~FmFormPage()
 {
 }
 
-// TTTT
-// void FmFormPage::SetModel(SdrModel* pNewModel)
-// {
-//     /* #35055# */
-//     // we want to call the super's "SetModel" method even if the model is the
-//     // same, in case code somewhere in the system depends on it.  But our code
-//     // doesn't, so get the old model to do a check.
-//     SdrModel *pOldModel = GetModel();
-
-//     SdrPage::SetModel( pNewModel );
-
-//     /* #35055# */
-//     if ( ( pOldModel != pNewModel ) && m_pImpl )
-//     {
-//         try
-//         {
-//             Reference< css::form::XForms > xForms( m_pImpl->getForms( false ) );
-//             if ( xForms.is() )
-//             {
-//                 // we want to keep the current collection, just reset the model
-//                 // with which it's associated.
-//                 FmFormModel* pDrawModel = static_cast<FmFormModel*>( GetModel() );
-//                 SfxObjectShell* pObjShell = pDrawModel->GetObjectShell();
-//                 if ( pObjShell )
-//                     xForms->setParent( pObjShell->GetModel() );
-//             }
-//         }
-//         catch( css::uno::Exception const& )
-//         {
-//             OSL_FAIL( "UNO Exception caught resetting model for m_pImpl (FmFormPageImpl) in FmFormPage::SetModel" );
-//         }
-//     }
-// }
-
-// TTTT
-// SdrPage* FmFormPage::Clone() const
-// {
-//     return Clone(nullptr);
-// }
-
 SdrPage* FmFormPage::Clone(SdrModel* pNewModel) const
 {
     FmFormModel& rFmFormModel(static_cast< FmFormModel& >(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
diff --git a/svx/source/inc/cell.hxx b/svx/source/inc/cell.hxx
index a8da63251743..86c7579e1726 100644
--- a/svx/source/inc/cell.hxx
+++ b/svx/source/inc/cell.hxx
@@ -91,9 +91,6 @@ public:
     SVX_DLLPRIVATE SdrTextVertAdjust GetTextVerticalAdjust() const;
     SdrTextHorzAdjust GetTextHorizontalAdjust() const;
 
-    // TTTT
-    // SVX_DLLPRIVATE virtual void SetModel(SdrModel* pNewModel) override;
-
     SVX_DLLPRIVATE void merge( sal_Int32 nColumnSpan, sal_Int32 nRowSpan );
     SVX_DLLPRIVATE void mergeContent( const CellRef& xSourceCell );
     SVX_DLLPRIVATE void replaceContentAndFormating( const CellRef& xSourceCell );
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index 4dadbd624cab..1b22053325b5 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -50,9 +50,28 @@ namespace sdr
 {
     namespace properties
     {
+        SfxStyleSheet* AttributeProperties::ImpGetDefaultStyleSheet() const
+        {
+            // use correct default stylesheet #119287#
+            const SdrGrafObj* pIsSdrGrafObj(dynamic_cast< const SdrGrafObj* >(&GetSdrObject()));
+            const SdrOle2Obj* pIsSdrOle2Obj(dynamic_cast< const SdrOle2Obj* >(&GetSdrObject()));
+            SfxStyleSheet* pRetval(nullptr);
+
+            if(pIsSdrGrafObj || pIsSdrOle2Obj)
+            {
+                pRetval = GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj();
+            }
+            else
+            {
+                pRetval = GetSdrObject().getSdrModelFromSdrObject().GetDefaultStyleSheet();
+            }
+
+            return pRetval;
+        }
+
         void AttributeProperties::ImpSetParentAtSfxItemSet(bool bDontRemoveHardAttr)
         {
-            if(mpItemSet && mpStyleSheet)
+            if(HasSfxItemSet() && mpStyleSheet)
             {
                 // Delete hard attributes where items are set in the style sheet
                 if(!bDontRemoveHardAttr)
@@ -89,21 +108,20 @@ namespace sdr
 
             if(pNewStyleSheet)
             {
+                // local remember
                 mpStyleSheet = pNewStyleSheet;
 
-                // local ItemSet is needed here, force it
-                // TTTT better not - do NOT call ::CreateObjectSpecificItemSet
-                // implementations in constructor -> wrong calls (!)
-                // GetObjectItemSet();
-
-                // register as listener
-                StartListening(pNewStyleSheet->GetPool());
-                StartListening(*pNewStyleSheet);
-
-                // only apply the following when we have an SfxItemSet already, else
-                if(nullptr != mpItemSet && GetStyleSheet())
+                if(HasSfxItemSet())
                 {
-                    ImpSetParentAtSfxItemSet(bDontRemoveHardAttr);
+                    // register as listener
+                    StartListening(pNewStyleSheet->GetPool());
+                    StartListening(*pNewStyleSheet);
+
+                    // only apply the following when we have an SfxItemSet already, else
+                    if(GetStyleSheet())
+                    {
+                        ImpSetParentAtSfxItemSet(bDontRemoveHardAttr);
+                    }
                 }
             }
         }
@@ -117,7 +135,7 @@ namespace sdr
                 EndListening(mpStyleSheet->GetPool());
 
                 // reset parent of ItemSet
-                if(mpItemSet)
+                if(HasSfxItemSet())
                 {
                     mpItemSet->SetParent(nullptr);
                 }
@@ -145,24 +163,11 @@ namespace sdr
         :   DefaultProperties(rObj),
             mpStyleSheet(nullptr)
         {
-            // use correct default stylesheet #119287#
-            SfxStyleSheet* pTargetStyleSheet(nullptr);
-            const SdrGrafObj* pIsSdrGrafObj(dynamic_cast< const SdrGrafObj* >(&rObj));
-            const SdrOle2Obj* pIsSdrOle2Obj(dynamic_cast< const SdrOle2Obj* >(&rObj));
-
-            if(pIsSdrGrafObj || pIsSdrOle2Obj)
-            {
-                pTargetStyleSheet = rObj.getSdrModelFromSdrObject().GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj();
-            }
-            else
-            {
-                pTargetStyleSheet = rObj.getSdrModelFromSdrObject().GetDefaultStyleSheet();
-            }
-
-            if(pTargetStyleSheet)
-            {
-                ImpAddStyleSheet(pTargetStyleSheet, true);
-            }
+            // Do nothing else, esp. do *not* try to get and set
+            // a default SfxStyle sheet. Nothing is allowed to be done
+            // that may lead to calls to virtual functions like
+            // CreateObjectSpecificItemSet - these would go *wrong*.
+            // Thus the rest is lazy-init from here.
         }
 
         AttributeProperties::AttributeProperties(const AttributeProperties& rProps, SdrObject& rObj)
@@ -171,26 +176,23 @@ namespace sdr
         {
             SfxStyleSheet* pTargetStyleSheet(rProps.GetStyleSheet());
 
-            if(!pTargetStyleSheet)
+            if(pTargetStyleSheet)
             {
-                // use correct default stylesheet #119287#
-                const SdrGrafObj* pIsSdrGrafObj(dynamic_cast< const SdrGrafObj* >(&rObj));
-                const SdrOle2Obj* pIsSdrOle2Obj(dynamic_cast< const SdrOle2Obj* >(&rObj));
-
-                if(pIsSdrGrafObj || pIsSdrOle2Obj)
+                if(HasSfxItemSet())
                 {
-                    pTargetStyleSheet = rObj.getSdrModelFromSdrObject().GetDefaultStyleSheetForSdrGrafObjAndSdrOle2Obj();
+                    // The SfxItemSet has been cloned and exists,
+                    // we can directly set the SfxStyleSheet at it
+                    ImpAddStyleSheet(pTargetStyleSheet, true);
                 }
                 else
                 {
-                    pTargetStyleSheet = rObj.getSdrModelFromSdrObject().GetDefaultStyleSheet();
+                    // No SfxItemSet exists yet (there is none in
+                    // the source, so none was cloned). Remember the
+                    // SfxStyleSheet to set it when the SfxItemSet
+                    // got constructed on-demand
+                    mpStyleSheet = pTargetStyleSheet;
                 }
             }
-
-            if(pTargetStyleSheet)
-            {
-                ImpAddStyleSheet(pTargetStyleSheet, true);
-            }
         }
 
         AttributeProperties::~AttributeProperties()
@@ -205,13 +207,35 @@ namespace sdr
 
         const SfxItemSet& AttributeProperties::GetObjectItemSet() const
         {
-            // call parent
+            // remember if we had a SfxItemSet already
+            const bool bHadSfxItemSet(HasSfxItemSet());
+
+            // call parent - this will then guarantee
+            // SfxItemSet existance
             DefaultProperties::GetObjectItemSet();
 
-            // Late-Init of setting parent to SfxStyleSheet after it's creation, same as in constructor
-            if(GetStyleSheet() && !mpItemSet->GetParent())
+            if(!bHadSfxItemSet)
             {
-                const_cast< AttributeProperties* >(this)->ImpSetParentAtSfxItemSet(true);
+                if(GetStyleSheet())
+                {
+                    // Late-Init of setting parent to SfxStyleSheet after
+                    // it's creation. See copy-constructor and how it remembers
+                    // the SfxStyleSheet there.
+                    // It is necessary to reset mpStyleSheet to nullptr to
+                    // not trigger alarm insde ImpAddStyleSheet (!)
+                    SfxStyleSheet* pNew(mpStyleSheet);
+                    const_cast< AttributeProperties* >(this)->mpStyleSheet = nullptr;
+                    const_cast< AttributeProperties* >(this)->ImpAddStyleSheet(
+                        pNew,
+                        true);
+                }
+                else
+                {
+                    // Set missing defaults and do not RemoveHardAttributes
+                    const_cast< AttributeProperties* >(this)->ImpAddStyleSheet(
+                        ImpGetDefaultStyleSheet(),
+                        true);
+                }
             }
 
             return *mpItemSet;
@@ -276,21 +300,28 @@ namespace sdr
                 }
 
                 // set item
-                GetObjectItemSet();
+                if(!HasSfxItemSet())
+                {
+                    GetObjectItemSet();
+                }
+
                 if(pResultItem)
                 {
                     // force ItemSet
                     mpItemSet->Put(*pResultItem);
+
                     // delete item if it was a generated one
                     delete pResultItem;
                 }
                 else
+                {
                     mpItemSet->Put(*pNewItem);
+                }
             }
             else
             {
                 // clear item if ItemSet exists
-                if(mpItemSet)
+                if(HasSfxItemSet())
                 {
                     mpItemSet->ClearItem(nWhich);
                 }
@@ -299,6 +330,12 @@ namespace sdr
 
         void AttributeProperties::SetStyleSheet(SfxStyleSheet* pNewStyleSheet, bool bDontRemoveHardAttr)
         {
+            // guarantee SfxItemSet existance here
+            if(!HasSfxItemSet())
+            {
+                GetObjectItemSet();
+            }
+
             ImpRemoveStyleSheet();
             ImpAddStyleSheet(pNewStyleSheet, bDontRemoveHardAttr);
 
@@ -312,85 +349,18 @@ namespace sdr
             return mpStyleSheet;
         }
 
-        // TTTT
-        // void AttributeProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
-        // {
-        //     OSL_ASSERT(pNewModel!=nullptr);
-
-        //     if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-        //     {
-        //         if(mpItemSet)
-        //         {
-        //             // migrate ItemSet to new pool. Scaling is NOT necessary
-        //             // because this functionality is used by UNDO only. Thus
-        //             // objects and ItemSets would be moved back to their original
-        //             // pool before usage.
-        //             SfxStyleSheet* pStySheet = GetStyleSheet();
-
-        //             if(pStySheet)
-        //             {
-        //                 ImpRemoveStyleSheet();
-        //             }
-
-        //             auto pOldSet = std::move(mpItemSet);
-        //             mpItemSet.reset(pOldSet->Clone(false, pDestPool));
-        //             SdrModel::MigrateItemSet(pOldSet.get(), mpItemSet.get(), pNewModel);
-
-        //             // set stylesheet (if used)
-        //             if(pStySheet)
-        //             {
-        //                 // #i109515#
-        //                 SfxItemPool* pStyleSheetPool = &pStySheet->GetPool().GetPool();
-
-        //                 if(pStyleSheetPool == pDestPool)
-        //                 {
-        //                     // just re-set stylesheet
-        //                     ImpAddStyleSheet(pStySheet, true);
-        //                 }
-        //                 else
-        //                 {
-        //                     // StyleSheet is NOT from the correct pool.
-        //                     // Look one up in the right pool with the same
-        //                     // name or use the default.
-
-        //                     // Look up the style in the new document.
-        //                     OSL_ASSERT(pNewModel->GetStyleSheetPool() != nullptr);
-        //                     SfxStyleSheet* pNewStyleSheet = dynamic_cast<SfxStyleSheet*>(
-        //                         pNewModel->GetStyleSheetPool()->Find(
-        //                             pStySheet->GetName(),
-        //                             SfxStyleFamily::All));
-        //                     if (pNewStyleSheet == nullptr
-        //                         || &pNewStyleSheet->GetPool().GetPool() != pDestPool)
-        //                     {
-        //                         // There is no copy of the style in the new
-        //                         // document.  Use the default as a fallback.
-        //                         pNewStyleSheet = pNewModel->GetDefaultStyleSheet();
-        //                     }
-        //                     ImpAddStyleSheet(pNewStyleSheet, true);
-        //                 }
-        //             }
-        //         }
-        //     }
-        // }
-
-        // TTTT
-        // void AttributeProperties::SetModel(SdrModel& rNewModel)
-        // {
-        //     // each object gets the default Style if there is none set yet.
-        //     if(!GetStyleSheet())
-        //     {
-        //         GetObjectItemSet(); // #118414 force ItemSet to allow style to be set
-        //         SetStyleSheet(rNewModel.GetDefaultStyleSheet(), true);
-        //     }
-        // }
-
         void AttributeProperties::ForceStyleToHardAttributes()
         {
             if(!GetStyleSheet() || dynamic_cast<const SfxStyleSheet *>(mpStyleSheet) == nullptr)
                 return;
 
+            // force SfxItemSet existence
+            if(!HasSfxItemSet())
+            {
+                GetObjectItemSet();
+            }
+
             // prepare copied, new itemset, but WITHOUT parent
-            GetObjectItemSet();
             SfxItemSet* pDestItemSet = new SfxItemSet(*mpItemSet);
             pDestItemSet->SetParent(nullptr);
 
diff --git a/svx/source/sdr/properties/e3dsceneproperties.cxx b/svx/source/sdr/properties/e3dsceneproperties.cxx
index a4c30be78ea3..a5f59940d51e 100644
--- a/svx/source/sdr/properties/e3dsceneproperties.cxx
+++ b/svx/source/sdr/properties/e3dsceneproperties.cxx
@@ -267,32 +267,6 @@ namespace sdr
             return pRetval;
         }
 
-        // TTTT
-        // void E3dSceneProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
-        // {
-        //     if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-        //     {
-        //         // call parent
-        //         E3dProperties::MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-
-        //         // own reaction, but only with outmost scene
-        //         E3dScene& rObj = static_cast<E3dScene&>(GetSdrObject());
-        //         const SdrObjList* pSubList = rObj.GetSubList();
-
-        //         if(pSubList && rObj.GetScene() == &rObj)
-        //         {
-        //             SdrObjListIter a3DIterator(*pSubList, SdrIterMode::DeepWithGroups);
-
-        //             while(a3DIterator.IsMore())
-        //             {
-        //                 E3dObject* pObj = static_cast<E3dObject*>(a3DIterator.Next());
-        //                 DBG_ASSERT(dynamic_cast<const E3dObject* >(pObj) !=  nullptr, "In scenes there are only 3D objects allowed (!)");
-        //                 pObj->GetProperties().MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-        //             }
-        //         }
-        //     }
-        // }
-
         void E3dSceneProperties::SetSceneItemsFromCamera()
         {
             // force ItemSet
diff --git a/svx/source/sdr/properties/groupproperties.cxx b/svx/source/sdr/properties/groupproperties.cxx
index 8b226b91c9c4..a79f7cc9059a 100644
--- a/svx/source/sdr/properties/groupproperties.cxx
+++ b/svx/source/sdr/properties/groupproperties.cxx
@@ -246,32 +246,6 @@ namespace sdr
             // nothing to do here, groups have no items and thus no default items, too.
         }
 
-        // TTTT
-        // void GroupProperties::MoveToItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
-        // {
-        //     if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-        //     {
-        //         const SdrObjList* pSub = static_cast<const SdrObjGroup&>(GetSdrObject()).GetSubList();
-        //         const size_t nCount(pSub->GetObjCount());
-
-        //         for(size_t a = 0; a < nCount; ++a)
-        //         {
-        //             pSub->GetObj(a)->GetProperties().MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-        //         }
-
-        //         // also clear local ItemSet, it's only temporary for group objects anyways.
-        //         if(mpItemSet)
-        //         {
-        //             // copy/paste is still using clone operators and MoveToItemPool functionality.
-        //             // Since SfxItemSet contains a pool pointer, ClearItem is not enough here.
-        //             // The ItemSet for merge is constructed on demand, so it's enough here to
-        //             // just delete it and set to 0L.
-        //             // mpItemSet->ClearItem();
-        //             mpItemSet.reset();
-        //         }
-        //     }
-        // }
-
         void GroupProperties::ForceStyleToHardAttributes()
         {
             const SdrObjList* pSub = static_cast<const SdrObjGroup&>(GetSdrObject()).GetSubList();
diff --git a/svx/source/sdr/properties/properties.cxx b/svx/source/sdr/properties/properties.cxx
index 09a119330755..3d2b172dd13b 100644
--- a/svx/source/sdr/properties/properties.cxx
+++ b/svx/source/sdr/properties/properties.cxx
@@ -86,20 +86,6 @@ namespace sdr
             // an ItemSet is implemented.
         }
 
-        // TTTT
-        // void BaseProperties::MoveToItemPool(SfxItemPool* /*pSrcPool*/, SfxItemPool* /*pDestPool*/, SdrModel* /*pNewModel*/)
-        // {
-        //     // Move properties to a new ItemPool. Default implementation does nothing.
-        //     // Override where an ItemSet is implemented.
-        // }
-
-        // TTTT
-        // void BaseProperties::SetModel(SdrModel& /*rNewModel*/)
-        // {
-        //     // Set new model. Default implementation does nothing.
-        //     // Override where an ItemSet is implemented.
-        // }
-
         void BaseProperties::ForceStyleToHardAttributes()
         {
             // force all attributes which come from styles to hard attributes
diff --git a/svx/source/svdraw/svdcrtv.cxx b/svx/source/svdraw/svdcrtv.cxx
index f55026a719b9..53c37eb834e5 100644
--- a/svx/source/svdraw/svdcrtv.cxx
+++ b/svx/source/svdraw/svdcrtv.cxx
@@ -412,10 +412,6 @@ bool SdrCreateView::ImpBegCreateObj(SdrInventor nInvent, sal_uInt16 nIdent, cons
                 {
                     pCurrentCreate->SetPage(pCreatePV->GetPage());
                 }
-                else if (mpModel)
-                {
-                    // TTTT pCurrentCreate->SetModel(mpModel);
-                }
             }
             else
             {
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index 6bdc453be569..3922a3ca43ce 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -1134,7 +1134,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
 
         // #i124760# To have a correct selection with only the new object it is necessary to
         // unmark all objects first. If not doing so, there may remain invalid pointers to objects
-        //TTTT:Not needed for aw080 (!)
+        // TTTT:Not needed for aw080 (!)
         UnmarkAllObj(pInsPV);
 
         MarkObj(pPath, pInsPV, false, true);
@@ -1590,7 +1590,6 @@ void SdrEditView::ImpDismantleOneObject(const SdrObject* pObj, SdrObjList& rOL,
             {
                 SdrObject* pCandidate = pReplacement->Clone();
                 DBG_ASSERT(pCandidate, "SdrEditView::ImpDismantleOneObject: Could not clone SdrObject (!)");
-                // TTTT pCandidate->SetModel(pCustomShape->GetModel());
 
                 if(pCustomShape->GetMergedItem(SDRATTR_SHADOW).GetValue())
                 {
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 2ac177150c6e..61c8ebfe8927 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1325,9 +1325,6 @@ void SdrModel::InsertPage(SdrPage* pPage, sal_uInt16 nPos)
     pPage->SetInserted();
     pPage->SetPageNum(nPos);
 
-    // TTTT
-    // pPage->SetModel(this);
-
     if (nPos<nCount) bPagNumsDirty=true;
     SetChanged();
     SdrHint aHint(SdrHintKind::PageOrderChange, pPage);
@@ -1377,12 +1374,10 @@ void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)
     pPage->SetInserted();
     pPage->SetPageNum(nPos);
 
-    // TTTT
-    // pPage->SetModel(this);
-
     if (nPos<nCount) {
         bMPgNumsDirty=true;
     }
+
     SetChanged();
     SdrHint aHint(SdrHintKind::PageOrderChange, pPage);
     Broadcast(aHint);
@@ -1483,7 +1478,10 @@ void SdrModel::CopyPages(sal_uInt16 nFirstPageNum, sal_uInt16 nLastPageNum,
         if (!bMoveNoCopy)
         {
             const SdrPage* pPg1=GetPage(nPageNum2);
-            pPg=pPg1->Clone(nullptr); // TTTT copy to local model
+
+            // Clone to local model
+            pPg=pPg1->Clone();
+
             InsertPage(pPg,nDestNum);
             if (bUndo)
                 AddUndo(GetSdrUndoFactory().CreateUndoCopyPage(*pPg));
@@ -1586,7 +1584,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
             i--;
             if (pMasterNeed[i])
             {
-                // TTTT always clone to new model
+                // Always Clone to new model
                 const SdrPage* pPg1(rSourceModel.GetMasterPage(i));
                 SdrPage* pPg(pPg1->Clone(this));
 
@@ -1603,10 +1601,6 @@ void SdrModel::Merge(SdrModel& rSourceModel,
                     maMaPag.insert(maMaPag.begin()+nDstMasterPageCnt, pPg);
                     MasterPageListChanged();
                     pPg->SetInserted();
-
-                    // TTTT
-                    // pPg->SetModel(this);
-
                     bMPgNumsDirty=true;
                     if (bUndo) AddUndo(GetSdrUndoFactory().CreateUndoNewPage(*pPg));
                 } else {
@@ -1623,7 +1617,7 @@ void SdrModel::Merge(SdrModel& rSourceModel,
         if (nDestPos>GetPageCount()) nDestPos=GetPageCount();
         while (nMergeCount>0)
         {
-            // TTTT always clone to new model
+            // Always Clone to new model
             const SdrPage* pPg1(rSourceModel.GetPage(nSourcePos));
             SdrPage* pPg(pPg1->Clone(this));
 
diff --git a/svx/source/svdraw/svdoashp.cxx b/svx/source/svdraw/svdoashp.cxx
index bb0cba9e7f1e..783c5e9b5b58 100644
--- a/svx/source/svdraw/svdoashp.cxx
+++ b/svx/source/svdraw/svdoashp.cxx
@@ -2806,9 +2806,9 @@ SdrObject* SdrObjCustomShape::DoConvertToPolyObj(bool bBezier, bool bAddText) co
 
     if ( pRenderedCustomShape )
     {
+        // Clone to same SdrModel
         SdrObject* pCandidate = pRenderedCustomShape->Clone();
         DBG_ASSERT(pCandidate, "SdrObjCustomShape::DoConvertToPolyObj: Could not clone SdrObject (!)");
-        // TTTT clone? pCandidate->SetModel(GetModel());
         pRetval = pCandidate->DoConvertToPolyObj(bBezier, bAddText);
         SdrObject::Free( pCandidate );
 
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 4c95f58fdb6d..f33a47e63ee5 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -83,10 +83,6 @@ sdr::properties::BaseProperties* SdrAttrObj::CreateObjectSpecificProperties()
 SdrAttrObj::SdrAttrObj(SdrModel& rSdrModel)
 :   SdrObject(rSdrModel)
 {
-    // TTTT stuff from SetModel:
-    // Needed - creates the properties and sets a StyleSheet (!)
-    // TTTT NOT in constructor - will lead to wrong class casts (!)
-    // GetProperties().SetModel(rSdrModel);
 }
 
 SdrAttrObj::~SdrAttrObj()
@@ -104,27 +100,7 @@ const tools::Rectangle& SdrAttrObj::GetSnapRect() const
     return maSnapRect;
 }
 
-// TTTT clone?
-// void SdrAttrObj::SetModel(SdrModel* pNewModel)
-// {
-//     SdrModel* pOldModel = pModel;
-
-//     // test for correct pool in ItemSet; move to new pool if necessary
-//     if(pNewModel && &GetObjectItemPool() != &pNewModel->GetItemPool())
-//     {
-//         MigrateItemPool(&GetObjectItemPool(), &pNewModel->GetItemPool(), pNewModel);
-//     }
-
-//     // call parent
-//     SdrObject::SetModel(pNewModel);
-
-//     // modify properties
-//     GetProperties().SetModel(pOldModel, pNewModel);
-// }
-
-
 // syntactical sugar for ItemSet accesses
-
 void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
 {
     bool bDataChg(SfxHintId::DataChanged == rHint.GetId());
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 37478e688827..2eeca383a6c0 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -226,7 +226,7 @@ sdr::properties::BaseProperties& SdrObject::GetProperties() const
 {
     if(!mpProperties)
     {
-        // TTTT CAUTION(!) Do *not* vall this during SdrObject construction,
+        // CAUTION(!) Do *not* call this during SdrObject construction,
         // that will lead to wrong type-casts (dependent on costructor-level)
         // and thus eventually create the wrong sdr::properties (!). Is there
         // a way to check if on the stack is a SdrObject-constructor (?)
@@ -396,29 +396,6 @@ void SdrObject::SetRectsDirty(bool bNotMyself)
     }
 }
 
-// TTTT clone?
-// void SdrObject::SetModel(SdrModel* pNewModel)
-// {
-//     if(pNewModel && pPage)
-//     {
-//         if(pPage->GetModel() != pNewModel)
-//         {
-//             pPage = nullptr;
-//         }
-//     }
-
-//     // update listeners at possible API wrapper object
-//     if( pModel != pNewModel )
-//     {
-//         SvxShape* pShape = getSvxShape();
-//         if( pShape )
-//             pShape->ChangeModel( pNewModel );
-//     }
-
-//     pModel = pNewModel;
-// }
-
-
 void SdrObject::SetObjList(SdrObjList* pNewObjList)
 {
     pObjList=pNewObjList;
@@ -432,15 +409,18 @@ void SdrObject::SetPage(SdrPage* pNewPage)
 
     pPage = pNewPage;
 
-    if(nullptr != pPage)
-    {
-        SdrModel* pMod(&pPage->getSdrModelFromSdrPage());
-
-        if(pMod != &getSdrModelFromSdrObject())
-        {
-            // TTTT model change? Clone needed? SetModel(pMod);
-        }
-    }
+    // TTTT Possibility here to add a warning for the future -> SdrModel
+    // of SdrObject (this) and SdrPage it it added to *have* to have the
+    // same SdrModel
+    // if(nullptr != pPage)
+    // {
+    //     SdrModel* pMod(&pPage->getSdrModelFromSdrPage());
+    //
+    //     if(pMod != &getSdrModelFromSdrObject())
+    //     {
+    //         SetModel(pMod);
+    //     }
+    // }
 
     // 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
@@ -523,9 +503,6 @@ sal_Int16 SdrObject::GetRelativeHeightRelation() const
 SfxItemPool& SdrObject::GetObjectItemPool() const
 {
     return getSdrModelFromSdrObject().GetItemPool();
-
-    // use a static global default pool
-    // TTTT needed? return SdrObject::GetGlobalDrawObjectItemPool();
 }
 
 SdrInventor SdrObject::GetObjInventor()   const
@@ -906,7 +883,11 @@ void SdrObject::SetChanged()
     // notification now.
     ActionChanged();
 
-    if(IsInserted()) // TTTT IsInserted->no model stuff, but SdrPage (?)
+    // TTTT Need to check meaning/usage of IsInserted in one
+    // of the next changes. It should not mean to have a SdrModel
+    // set (this is guaranteed now), but should be connected to
+    // being added to a SdrPage (?)
+    if(IsInserted())
     {
         getSdrModelFromSdrObject().SetChanged();
     }
@@ -2740,16 +2721,6 @@ void SdrObject::SendUserCall(SdrUserCallType eUserCall, const tools::Rectangle&
     }
 }
 
-// change ItemPool for this object
-// TTTT
-// void SdrObject::MigrateItemPool(SfxItemPool* pSrcPool, SfxItemPool* pDestPool, SdrModel* pNewModel)
-// {
-//     if(pSrcPool && pDestPool && (pSrcPool != pDestPool))
-//     {
-//         GetProperties().MoveToItemPool(pSrcPool, pDestPool, pNewModel);
-//     }
-// }
-
 void SdrObject::impl_setUnoShape( const uno::Reference< uno::XInterface >& _rxUnoShape )
 {
     const uno::Reference< uno::XInterface>& xOldUnoShape( maWeakUnoShape );
diff --git a/svx/source/svdraw/svdocapt.cxx b/svx/source/svdraw/svdocapt.cxx
index 60e56b6f02b1..cd688f348842 100644
--- a/svx/source/svdraw/svdocapt.cxx
+++ b/svx/source/svdraw/svdocapt.cxx
@@ -680,13 +680,6 @@ Point SdrCaptionObj::GetSnapPoint(sal_uInt32 /*i*/) const
     return Point(0,0);
 }
 
-// TTTT needed?
-// void SdrCaptionObj::SetModel(SdrModel* pNewModel)
-// {
-//     SdrRectObj::SetModel(pNewModel);
-//     ImpRecalcTail();
-// }
-
 void SdrCaptionObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
 {
     SdrRectObj::Notify(rBC,rHint);
diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx
index 4488c73a7e7c..232e183364af 100644
--- a/svx/source/svdraw/svdograf.cxx
+++ b/svx/source/svdraw/svdograf.cxx
@@ -1048,29 +1048,6 @@ void SdrGrafObj::SetPage( SdrPage* pNewPage )
         ImpRegisterLink();
 }
 
-// TTTT needed?
-// void SdrGrafObj::SetModel( SdrModel* pNewModel )
-// {
-//     bool bChg = pNewModel != pModel;
-
-//     if( bChg )
-//     {
-//         if( mpGraphicObject->HasUserData() )
-//         {
-//             ForceSwapIn();
-//         }
-
-//         if( pGraphicLink != nullptr )
-//             ImpDeregisterLink();
-//     }
-
-//     // realize model
-//     SdrRectObj::SetModel(pNewModel);
-
-//     if (bChg && !aFileName.isEmpty())
-//         ImpRegisterLink();
-// }
-
 void SdrGrafObj::StartAnimation()
 {
     SetGrafAnimationAllowed(true);
diff --git a/svx/source/svdraw/svdogrp.cxx b/svx/source/svdraw/svdogrp.cxx
index e5c4e2acb1b7..6311106c4e2f 100644
--- a/svx/source/svdraw/svdogrp.cxx
+++ b/svx/source/svdraw/svdogrp.cxx
@@ -70,11 +70,6 @@ SdrObjGroup::SdrObjGroup(SdrModel& rSdrModel)
     maSdrObjList.SetOwnerObj(this);
     maSdrObjList.SetListKind(SdrObjListKind::GroupObj);
     bClosedObj=false;
-
-    // TTTT stuff from SetModel:
-    // Needed - creates the properties and sets a StyleSheet (!)
-    // TTTT NOT in constructor - will lead to wrong class casts (!)
-    // GetProperties().SetModel(rSdrModel);
 }
 
 SdrObjGroup::~SdrObjGroup()
@@ -178,36 +173,6 @@ void SdrObjGroup::SetPage(SdrPage* pNewPage)
     maSdrObjList.SetPage(pNewPage);
 }
 
-// TTTT needed?
-// void SdrObjGroup::SetModel(SdrModel* pNewModel)
-// {
-//     if(pNewModel!=pModel)
-//     {
-//         // #i30648#
-//         // This method also needs to migrate the used ItemSet
-//         // when the destination model uses a different pool
-//         // than the current one. Else it is possible to create
-//         // SdrObjGroups which reference the old pool which might
-//         // be destroyed (as the bug shows).
-//         SdrModel* pOldModel = pModel;
-
-//         // test for correct pool in ItemSet; move to new pool if necessary
-//         if(pNewModel && &GetObjectItemPool() != &pNewModel->GetItemPool())
-//         {
-//             MigrateItemPool(&GetObjectItemPool(), &pNewModel->GetItemPool(), pNewModel);
-//         }
-
-//         // call parent
-//         SdrObject::SetModel(pNewModel);
-
-//         // set new model at content
-//         pSub->SetModel(pNewModel);
-
-//         // modify properties
-//         GetProperties().SetModel(pOldModel, pNewModel);
-//     }
-// }
-
 SdrObjList* SdrObjGroup::GetSubList() const
 {
     return const_cast< SdrObjList* >(&maSdrObjList);
@@ -254,10 +219,6 @@ SdrObjGroup& SdrObjGroup::operator=(const SdrObjGroup& rObj)
     // copy SubList, init model and page first
     SdrObjList& rSourceSubList = *rObj.GetSubList();
     maSdrObjList.SetPage(rSourceSubList.GetPage());
-
-    // TTTT maybe check SdrModels/need to clone?
-    // pSub->SetModel(rSourceSubList.GetModel());
-
     maSdrObjList.CopyObjects(*rObj.GetSubList());
 
     // copy local parameters
diff --git a/svx/source/svdraw/svdoole2.cxx b/svx/source/svdraw/svdoole2.cxx
index 2eb31f5a2c4b..7d97207f19ac 100644
--- a/svx/source/svdraw/svdoole2.cxx
+++ b/svx/source/svdraw/svdoole2.cxx
@@ -667,10 +667,10 @@ sdr::contact::ViewContact* SdrOle2Obj::CreateObjectSpecificViewContact()
 
 void SdrOle2Obj::Init()
 {
-    // TTTT stuff from old SetModel:
+    // Stuff that was done from old SetModel:
     // #i43086# #i85304 redo the change for charts for the above bugfix, as #i43086# does not occur anymore
-    //so maybe the ImpSetVisAreaSize call can be removed here completely
-    //Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
+    // so maybe the ImpSetVisAreaSize call can be removed here completely
+    // Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
     if(!getSdrModelFromSdrObject().isLocked() && !IsChart())
     {
         ImpSetVisAreaSize();
@@ -1228,77 +1228,6 @@ SdrObject* SdrOle2Obj::DoConvertToPolyObj(bool bBezier, bool bAddText) const
     return nullptr;
 }
 
-// TTTT needed?
-// void SdrOle2Obj::SetModel(SdrModel* pNewModel)
-// {
-//     ::comphelper::IEmbeddedHelper* pDestPers = pNewModel ? pNewModel->GetPersist() : nullptr;
-//     ::comphelper::IEmbeddedHelper* pSrcPers  = pModel ? pModel->GetPersist() : nullptr;
-
-//     if ( pNewModel == pModel )
-//     {
-//         // don't know if this is necessary or if it will ever happen, but who knows?!
-//         SdrRectObj::SetModel( pNewModel );
-//         return;
-//     }
-
-//     // assignment to model has changed
-//     DBG_ASSERT( pSrcPers || !mpImpl->mbConnected, "Connected object without a model?!" );
-
-//     DBG_ASSERT( pDestPers, "The destination model must have a persistence! Please submit an issue!" );
-//     DBG_ASSERT( pDestPers != pSrcPers, "The source and the destination models should have different persistences! Problems are possible!" );
-
-//     // this is a bug if the target model has no persistence
-//     // no error handling is possible so just do nothing in this method
-//     if ( !pDestPers )
-//         return;
-
-//     RemoveListeners_Impl();
-
-//     if( pDestPers && pSrcPers && !IsEmptyPresObj() )
-//     {
-//         try
-//         {
-//             // move the object's storage; ObjectRef remains the same, but PersistName may change
-//             OUString aTmp;
-//             comphelper::EmbeddedObjectContainer& rContainer = pSrcPers->getEmbeddedObjectContainer();
-//             uno::Reference < embed::XEmbeddedObject > xObj = rContainer.GetEmbeddedObject( mpImpl->aPersistName );
-//             DBG_ASSERT( !mpImpl->mxObjRef.is() || mpImpl->mxObjRef.GetObject() == xObj, "Wrong object identity!" );
-//             if ( xObj.is() )
-//             {
-//                 pDestPers->getEmbeddedObjectContainer().MoveEmbeddedObject( rContainer, xObj, aTmp );
-//                 mpImpl->aPersistName = aTmp;
-//                 mpImpl->mxObjRef.AssignToContainer( &pDestPers->getEmbeddedObjectContainer(), aTmp );
-//             }
-//             DBG_ASSERT( !aTmp.isEmpty(), "Copying embedded object failed!" );
-//         }
-//         catch( css::uno::Exception& )
-//         {
-//             SAL_WARN( "svx",  "SdrOle2Obj::SetModel(), exception caught: "
-//                     << comphelper::anyToString( cppu::getCaughtException() ) );
-//         }
-//     }
-
-//     SdrRectObj::SetModel( pNewModel );
-
-//     // #i43086#
-//     // #i85304 redo the change for charts for the above bugfix, as #i43086# does not occur anymore
-//     //so maybe the ImpSetVisAreaSize call can be removed here completely
-//     //Nevertheless I leave it in for other objects as I am not sure about the side effects when removing now
-//     if( pModel && !pModel->isLocked() && !IsChart() )
-//         ImpSetVisAreaSize();
-
-//     if( pDestPers && !IsEmptyPresObj() )
-//     {
-//         if ( !pSrcPers || IsEmptyPresObj() )
-//             // object wasn't connected, now it should be
-//             Connect_Impl();
-//         else
-//             Reconnect_Impl();
-//     }
-
-//     AddListeners_Impl();
-// }
-
 void SdrOle2Obj::SetPage(SdrPage* pNewPage)
 {
     bool bRemove=pNewPage==nullptr && pPage!=nullptr;
diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx
index b7eff267d073..63ca33f850fc 100644
--- a/svx/source/svdraw/svdotext.cxx
+++ b/svx/source/svdraw/svdotext.cxx
@@ -474,40 +474,6 @@ void SdrTextObj::SetPage(SdrPage* pNewPage)
     }
 }
 
-// TTTT needed?
-// void SdrTextObj::SetModel(SdrModel* pNewModel)
-// {
-//     SdrModel* pOldModel=pModel;
-//     bool bLinked=IsLinkedText();
-//     bool bChg=pNewModel!=pModel;
-
-//     if (bLinked && bChg)
-//     {
-//         ImpDeregisterLink();
-//     }
-
-//     SdrAttrObj::SetModel(pNewModel);
-
-//     if( bChg )
-//     {
-//         if( pNewModel != nullptr && pOldModel != nullptr )
-//             SetTextSizeDirty();
-
-//         sal_Int32 nCount = getTextCount();
-//         for( sal_Int32 nText = 0; nText < nCount; nText++ )
-//         {
-//             SdrText* pText = getText( nText );
-//             if( pText )
-//                 pText->SetModel( pNewModel );
-//         }
-//     }
-
-//     if (bLinked && bChg)
-//     {
-//         ImpRegisterLink();
-//     }
-// }
-
 void SdrTextObj::NbcSetEckenradius(long nRad)
 {
     SetObjectItem(makeSdrEckenradiusItem(nRad));
diff --git a/svx/source/svdraw/svdovirt.cxx b/svx/source/svdraw/svdovirt.cxx
index 2c862950dd26..596c6139e1c9 100644
--- a/svx/source/svdraw/svdovirt.cxx
+++ b/svx/source/svdraw/svdovirt.cxx
@@ -82,13 +82,6 @@ void SdrVirtObj::NbcSetAnchorPos(const Point& rAnchorPos)
     aAnchor=rAnchorPos;
 }
 
-// TTTT not needed
-// void SdrVirtObj::SetModel(SdrModel* pNewModel)
-// {
-//     SdrObject::SetModel(pNewModel);
-//     rRefObj.SetModel(pNewModel);
-// }
-
 void SdrVirtObj::TakeObjInfo(SdrObjTransformInfoRec& rInfo) const
 {
     rRefObj.TakeObjInfo(rInfo);
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index d260762ed8cb..bea868185039 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -244,24 +244,6 @@ void SdrObjList::SetPage(SdrPage* pNewPage)
     }
 }
 
-// SdrModel* SdrObjList::GetModel() const
-// {
-//     return pModel;
-// }
-
-// TTTT needed?
-// void SdrObjList::SetModel(SdrModel* pNewModel)
-// {
-//     if (pModel!=pNewModel) {
-//         pModel=pNewModel;
-//         const size_t nCount = GetObjCount();
-//         for (size_t i=0; i<nCount; ++i) {
-//             SdrObject* pObj=GetObj(i);
-//             pObj->SetModel(pModel);
-//         }
-//     }
-// }
-
 void SdrObjList::RecalcObjOrdNums()
 {
     const size_t nCount = GetObjCount();
@@ -1212,7 +1194,7 @@ SdrPage::~SdrPage()
 void SdrPage::lateInit(const SdrPage& rSrcPage)
 {
     assert(!mpViewContact);
-    // TTTT SdrPageProperties get set by SdrPage::SdrPage already
+    // SdrPageProperties get set by SdrPage::SdrPage already, so do not assert anymore
     // assert(!mpSdrPageProperties);
     assert(!mxUnoPage.is());
 
@@ -1261,12 +1243,6 @@ void SdrPage::lateInit(const SdrPage& rSrcPage)
     eListKind = (mbMaster) ? SdrObjListKind::MasterPage : SdrObjListKind::DrawPage;
 }
 
-// TTTT
-// SdrPage* SdrPage::Clone() const
-// {
-//     return Clone(nullptr);
-// }
-
 SdrPage* SdrPage::Clone(SdrModel* pNewModel) const
 {
     SdrPage* pClonedPage(new SdrPage(nullptr == pNewModel ? getSdrModelFromSdrPage() : *pNewModel));
@@ -1421,50 +1397,6 @@ sal_Int32 SdrPage::GetLowerBorder() const
     return mnBorderLower;
 }
 
-// TTTT needed?
-// void SdrPage::SetModel(SdrModel* pNewModel)
-// {
-//     SdrModel* pOldModel=pModel;
-//     SdrObjList::SetModel(pNewModel);
-
-//     if (pNewModel!=pOldModel)
-//     {
-//         impl_setModelForLayerAdmin( pNewModel );
-
-//         // create new SdrPageProperties with new model (due to SfxItemSet there)
-//         // and copy ItemSet and StyleSheet
-//         std::unique_ptr<SdrPageProperties> pNew(new SdrPageProperties(*this));
-
-//         if(!IsMasterPage())
-//         {
-//             const SfxItemSet& rOldSet = getSdrPageProperties().GetItemSet();
-//             SfxItemSet* pNewSet = rOldSet.Clone(false, &pNewModel->GetItemPool());
-//             //ensure checkForUniqueItem is called so new pages which have e.g.
-//             //XFillBitmapItem set, do not conflict with an existing XFillBitmapItem
-//             //with the same name but different properties
-//             SdrModel::MigrateItemSet(&rOldSet, pNewSet, pNewModel);
-//             pNew->PutItemSet(*pNewSet);
-//             delete pNewSet;
-//         }
-
-//         pNew->SetStyleSheet(getSdrPageProperties().GetStyleSheet());
-
-//         mpSdrPageProperties = std::move(pNew);
-//     }
-
-//     // update listeners at possible API wrapper object
-//     if( pOldModel != pNewModel )
-//     {
-//         if( mxUnoPage.is() )
-//         {
-//             SvxDrawPage* pPage2 = SvxDrawPage::getImplementation( mxUnoPage );
-//             if( pPage2 )
-//                 pPage2->ChangeModel( pNewModel );
-//         }
-//     }
-// }
-
-
 // #i68775# React on PageNum changes (from Model in most cases)
 void SdrPage::SetPageNum(sal_uInt16 nNew)
 {
diff --git a/svx/source/svdraw/svdtext.cxx b/svx/source/svdraw/svdtext.cxx
index c7c3aca20aa0..9d6c3a76dffa 100644
--- a/svx/source/svdraw/svdtext.cxx
+++ b/svx/source/svdraw/svdtext.cxx
@@ -111,58 +111,6 @@ OutlinerParaObject* SdrText::RemoveOutlinerParaObject()
     return pOPO;
 }
 
-// TTTT needed?
-// void SdrText::SetModel( SdrModel* pNewModel )
-// {
-//     if( pNewModel == mpModel )
-//         return;
-
-//     SdrModel* pOldModel = mpModel;
-//     mpModel = pNewModel;
-
-//     if( !mpOutlinerParaObject || pOldModel==nullptr || pNewModel==nullptr)
-//         return;
-
-//     bool bHgtSet = GetObjectItemSet().GetItemState(EE_CHAR_FONTHEIGHT) == SfxItemState::SET;
-
-//     MapUnit aOldUnit(pOldModel->GetScaleUnit());
-//     MapUnit aNewUnit(pNewModel->GetScaleUnit());
-//     bool bScaleUnitChanged=aNewUnit!=aOldUnit;
-//     // Now move the OutlinerParaObject into a new Pool.
-//     // TODO: We should compare the DefTab and RefDevice of both Models to
-//     // see whether we need to use AutoGrow!
-//     sal_Int32 nOldFontHgt=pOldModel->GetDefaultFontHeight();
-//     sal_Int32 nNewFontHgt=pNewModel->GetDefaultFontHeight();
-//     bool bDefHgtChanged=nNewFontHgt!=nOldFontHgt;
-//     bool bSetHgtItem=bDefHgtChanged && !bHgtSet;
-//     if (bSetHgtItem)
-//     {
-//         // fix the value of HeightItem, so
-//         // 1. it remains and
-//         // 2. DoStretchChars gets the right value
-//         SetObjectItem(SvxFontHeightItem(nOldFontHgt, 100, EE_CHAR_FONTHEIGHT));
-//     }
-//     // now use the Outliner, etc. so the above SetAttr can work at all
-//     SdrOutliner& rOutliner = mrObject.ImpGetDrawOutliner();
-//     rOutliner.SetText(*mpOutlinerParaObject);
-//     mpOutlinerParaObject.reset();
-//     if (bScaleUnitChanged)
-//     {
-//         Fraction aMetricFactor=GetMapFactor(aOldUnit,aNewUnit).X();
-
-//         if (bSetHgtItem)
-//         {
-//             // Now correct the frame attribute
-//             nOldFontHgt=BigMulDiv(nOldFontHgt,aMetricFactor.GetNumerator(),aMetricFactor.GetDenominator());
-//             SetObjectItem(SvxFontHeightItem(nOldFontHgt, 100, EE_CHAR_FONTHEIGHT));
-//         }
-//     }
-//     SetOutlinerParaObject(rOutliner.CreateParaObject());
-//     mpOutlinerParaObject->ClearPortionInfo();
-//     mbPortionInfoChecked=false;
-//     rOutliner.Clear();
-// }
-
 void SdrText::ForceOutlinerParaObject( OutlinerMode nOutlMode )
 {
     if(!mpOutlinerParaObject)
diff --git a/svx/source/table/cell.cxx b/svx/source/table/cell.cxx
index 08bdf8bf47fc..0c85eb8b9900 100644
--- a/svx/source/table/cell.cxx
+++ b/svx/source/table/cell.cxx
@@ -406,11 +406,11 @@ Cell::Cell(
     ,mnColSpan( 1 )
     ,mxTable( rTableObj.getTable() )
 {
-    // TTTT Caution: SetModel() indirectly did a very necessary thing here,
+    // Caution: Old SetModel() indirectly did a very necessary thing here,
     // it created a valid SvxTextEditSource which is needed to bind contained
     // Text to the UNO API and thus to save/load and more. Added version without
     // model change.
-    // Also done was (for reference):
+    // Also done was (not needed, for reference):
     //         SetStyleSheet( nullptr, true );
     //         ForceOutlinerParaObject( OutlinerMode::TextObject );
     if(nullptr == GetEditSource())
@@ -450,37 +450,6 @@ void Cell::dispose()
     SetOutlinerParaObject( nullptr );
 }
 
-// TTTT should not be needed - not intended to change. Maybe parts needed at construction time
-// void Cell::SetModel(SdrModel* pNewModel)
-// {
-//     SvxTextEditSource* pTextEditSource = dynamic_cast< SvxTextEditSource* >( GetEditSource() );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list