[Libreoffice-commits] core.git: Branch 'feature/SOSAW080' - 386 commits - accessibility/inc accessibility/source android/Bootstrap android/source basctl/inc basctl/source basctl/uiconfig basegfx/Library_basegfx.mk basegfx/source basic/source bridges/Library_cpp_uno.mk bridges/source canvas/source chart2/CppunitTest_chart2_dump.mk chart2/CppunitTest_chart2_export.mk chart2/CppunitTest_chart2_import.mk chart2/CppunitTest_chart2_pivot_chart_test.mk chart2/CppunitTest_chart2_trendcalculators.mk chart2/CppunitTest_chart2_xshape.mk chart2/inc chart2/source compilerplugins/clang configure.ac connectivity/source cppcanvas/CppunitTest_cppcanvas_emfplus.mk cppcanvas/Library_cppcanvas.mk cppcanvas/source cui/inc cui/source cui/uiconfig dbaccess/source desktop/CppunitTest_desktop_lib.mk desktop/inc desktop/qa desktop/source dictionaries distro-configs/LibreOfficeFlatpak.conf drawinglayer/source dtrans/source editeng/source embeddedobj/source embedserv/source emfio/source extensions/source extras/source filte r/source filter/uiconfig forms/source formula/source fpicker/source framework/inc framework/source g helpcompiler/source helpcontent2 hwpfilter/source i18nlangtag/qa i18nlangtag/source i18npool/source i18nutil/source icon-themes/colibre icon-themes/colibre_svg icon-themes/galaxy icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_svg icon-themes/tango icon-themes/tango_svg idlc/source idl/source include/basegfx include/basic include/canvas include/comphelper include/drawinglayer include/editeng include/filter include/LibreOfficeKit include/oox include/sfx2 include/svl include/svtools include/svx include/test include/toolkit include/tools include/ucbhelper include/vcl include/xmloff ios/LibreOfficeLight io/source libreofficekit/qa libreofficekit/source linguistic/source lotuswordpro/source Makefile.in mysqlc/source odk/examples offapi/com offapi/UnoApi_offapi.mk officecfg/registry oox/source package/qa package/source postprocess/Rdb_services.mk pyuno/source readlicense_oo/license reportdesign/inc reportdesign/source sax/source sc/common_unoapi_tests.mk sc/CppunitTest_sc_addin_functions_test.mk sc/CppunitTest_sc_anchor_test.mk sc/CppunitTest_sc_annotationobj.mk sc/CppunitTest_sc_annotationshapeobj.mk sc/CppunitTest_sc_annotationsobj.mk sc/CppunitTest_sc_arealinkobj.mk sc/CppunitTest_sc_arealinksobj.mk sc/CppunitTest_sc_array_functions_test.mk sc/CppunitTest_sc_autoformatobj.mk sc/CppunitTest_sc_bugfix_test.mk sc/CppunitTest_sc_cache_test.mk sc/CppunitTest_sc_cellcursorobj.mk sc/CppunitTest_sc_cellobj.mk sc/CppunitTest_sc_cellrangeobj.mk sc/CppunitTest_sc_cellrangesobj.mk sc/CppunitTest_sc_chart2dataprovider.mk sc/CppunitTest_sc_chart_regression_test.mk sc/CppunitTest_sc_check_data_pilot_field.mk sc/CppunitTest_sc_check_data_pilot_table.mk sc/CppunitTest_sc_check_xcell_ranges_query.mk sc/CppunitTest_sc_cond_format_merge.mk sc/CppunitTest_sc_consolidationdescriptorobj.mk sc/CppunitTest_sc_copypaste.mk sc/CppunitTest_sc_database_functions_test.mk sc/CppunitTest _sc_databaserangeobj.mk sc/CppunitTest_sc_databaserangesobj.mk sc/CppunitTest_sc_datapilotfieldobj.mk sc/CppunitTest_sc_datapilotitemobj.mk sc/CppunitTest_sc_datapilottableobj.mk sc/CppunitTest_sc_datapilottablesobj.mk sc/CppunitTest_sc_dataprovider.mk sc/CppunitTest_sc_datatransformation.mk sc/CppunitTest_sc_datetime_functions_test.mk sc/CppunitTest_sc_documentconfigurationobj.mk sc/CppunitTest_sc_editfieldobj_cell.mk sc/CppunitTest_sc_editfieldobj_header.mk sc/CppunitTest_sc_filterdescriptorbaseobj.mk sc/CppunitTest_sc_filters_test.mk sc/CppunitTest_sc_financial_functions_test.mk sc/CppunitTest_sc_functionlistobj.mk sc/CppunitTest_sc_functions_test_old.mk sc/CppunitTest_sc_headerfootercontentobj.mk sc/CppunitTest_sc_html_export_test.mk sc/CppunitTest_sc_importdescriptorbaseobj.mk sc/CppunitTest_sc_information_functions_test.mk sc/CppunitTest_sc_labelrangeobj.mk sc/CppunitTest_sc_labelrangesobj.mk sc/CppunitTest_sc_logical_functions_test.mk sc/CppunitTest_sc_macros_test.mk sc/Cppun itTest_sc_mark_test.mk sc/CppunitTest_sc_mathematical_functions_test.mk sc/CppunitTest_sc_modelobj.mk sc/CppunitTest_sc_namedrangeobj.mk sc/CppunitTest_sc_namedrangesobj.mk sc/CppunitTest_sc_new_cond_format_api.mk sc/CppunitTest_sc_opencl_test.mk sc/CppunitTest_sc_outlineobj.mk sc/CppunitTest_sc_parallelism.mk sc/CppunitTest_sc_pivottable_filters_test.mk sc/CppunitTest_sc_rangelst_test.mk sc/CppunitTest_sc_range_test.mk sc/CppunitTest_sc_recentfunctionsobj.mk sc/CppunitTest_sc_recordchanges.mk sc/CppunitTest_sc_scenariosobj.mk sc/CppunitTest_sc_shapeobj.mk sc/CppunitTest_sc_sheetlinkobj.mk sc/CppunitTest_sc_spreadsheet_functions_test.mk sc/CppunitTest_sc_spreadsheetsettingsobj.mk sc/CppunitTest_sc_statistical_functions_test.mk sc/CppunitTest_sc_styleloaderobj.mk sc/CppunitTest_sc_subsequent_export_test.mk sc/CppunitTest_sc_subsequent_filters_test.mk sc/CppunitTest_sc_subtotaldescriptorbaseobj.mk sc/CppunitTest_sc_subtotalfieldobj.mk sc/CppunitTest_sc_tableconditionalentryobj.mk sc/C ppunitTest_sc_tableconditionalformatobj.mk sc/CppunitTest_sc_tablesheetobj.mk sc/CppunitTest_sc_tablesheetsobj.mk sc/CppunitTest_sc_tablevalidationobj.mk sc/CppunitTest_sc_tabviewobj.mk sc/CppunitTest_sc_text_functions_test.mk sc/CppunitTest_sc_ucalc.mk sc/CppunitTest_sc_viewpaneobj.mk sc/inc sc/Module_sc.mk sc/qa sc/sdi sc/source sc/uiconfig sd/CppunitTest_sd_activex_controls_tests.mk sd/CppunitTest_sd_filters_test.mk sd/CppunitTest_sd_html_export_tests.mk sd/CppunitTest_sd_import_tests.mk sd/CppunitTest_sd_import_tests_smartart.mk sd/CppunitTest_sd_misc_tests.mk sdext/CppunitTest_sdext_pdfimport.mk sdext/Executable_pdf2xml.mk sdext/Executable_pdfunzip.mk sdext/Library_pdfimport.mk sdext/source sd/inc sd/qa sd/source sd/uiconfig sfx2/Library_sfx.mk sfx2/qa sfx2/source sfx2/uiconfig slideshow/source solenv/bin solenv/clang-format solenv/flatpak-manifest.in solenv/gbuild solenv/gdb starmath/inc starmath/source stoc/source svgio/source svtools/inc svtools/Library_svt.mk svtools/qa svt ools/source svtools/util svx/inc svx/sdi svx/source svx/uiconfig sw/CppunitTest_sw_filters_test.mk sw/CppunitTest_sw_htmlexport.mk sw/CppunitTest_sw_macros_test.mk sw/CppunitTest_sw_mailmerge.mk sw/CppunitTest_sw_odfimport.mk sw/CppunitTest_sw_ooxmlexport8.mk sw/CppunitTest_sw_ooxmlimport.mk sw/CppunitTest_sw_rtfimport.mk sw/CppunitTest_sw_ww8export2.mk sw/CppunitTest_sw_ww8export.mk sw/CppunitTest_sw_ww8import.mk sw/inc sw/ooxmlexport_setup.mk sw/qa sw/sdi sw/source sw/uiconfig test/Library_test.mk test/source toolkit/source tools/source ucbhelper/source ucb/source UnoControls/inc UnoControls/source unodevtools/source unoidl/source unotools/source unoxml/Library_unoxml.mk unoxml/source uui/inc uui/source uui/uiconfig vbahelper/source vcl/backendtest vcl/CppunitTest_vcl_jpeg_read_write_test.mk vcl/headless vcl/inc vcl/Library_vcl.mk vcl/opengl vcl/osx vcl/qa vcl/quartz vcl/source vcl/unx vcl/vcl.common.component vcl/win vcl/workben winaccessibility/source wizards/source writerfilter /CppunitTest_writerfilter_rtftok.mk writerfilter/source xmlhelp/source xmloff/inc xmloff/qa xmloff/source xmlscript/source xmlsecurity/source

Armin Le Grand (CIB) Armin.Le.Grand at cib.de
Sun Mar 18 18:47:33 UTC 2018


Rebased ref, commits from common ancestor:
commit 46e01884bf81768a2362843c2f12e44cea05d04b
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Sun Mar 18 19:45:52 2018 +0100

    SOSAW080: Corrected SdrPage constructor
    
    Change-Id: I488b9601735ec1822433f82f633990063951fe08

diff --git a/include/svx/svdpage.hxx b/include/svx/svdpage.hxx
index ea2658721694..1ea8f1f57358 100644
--- a/include/svx/svdpage.hxx
+++ b/include/svx/svdpage.hxx
@@ -443,7 +443,6 @@ protected:
     // to call lateInit() after copy-construction of a new object. Any initialization in derived
     // classes that needs access to the page objects must be deferred to lateInit. And it must
     // call lateInit() of its parent class.
-//    SdrPage(const SdrPage& rSrcPage);
     void lateInit(const SdrPage& rSrcPage);
 
 public:
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index bea868185039..8467ea1d613a 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -1102,8 +1102,8 @@ void SdrPageProperties::SetStyleSheet(SfxStyleSheet* pStyleSheet)
 
 
 SdrPage::SdrPage(SdrModel& rModel, bool bMasterPage)
-:   SdrObjList(this),
-    tools::WeakBase(),
+:   tools::WeakBase(),
+    SdrObjList(this),
     maPageUsers(),
     mpViewContact(nullptr),
     mrSdrModelFromSdrPage(rModel),
@@ -1130,30 +1130,6 @@ SdrPage::SdrPage(SdrModel& rModel, bool bMasterPage)
     mpSdrPageProperties.reset(new SdrPageProperties(*this));
 }
 
-// SdrPage::SdrPage(const SdrPage& rSrcPage)
-// :   SdrObjList(this),
-//     tools::WeakBase(),
-//     maPageUsers(),
-//     mpViewContact(nullptr),
-//     mrSdrModelFromSdrPage(rSrcPage.getSdrModelFromSdrPage()),
-//     mnWidth(rSrcPage.mnWidth),
-//     mnHeight(rSrcPage.mnHeight),
-//     mnBorderLeft(rSrcPage.mnBorderLeft),
-//     mnBorderUpper(rSrcPage.mnBorderUpper),
-//     mnBorderRight(rSrcPage.mnBorderRight),
-//     mnBorderLower(rSrcPage.mnBorderLower),
-//     mpLayerAdmin(new SdrLayerAdmin(rSrcPage.getSdrModelFromSdrPage().GetLayerAdmin())),
-//     mpSdrPageProperties(nullptr),
-//     mpMasterPageDescriptor(nullptr),
-//     nPageNum(rSrcPage.nPageNum),
-//     mbMaster(rSrcPage.mbMaster),
-//     mbInserted(false),
-//     mbObjectsNotPersistent(rSrcPage.mbObjectsNotPersistent),
-//     mbPageBorderOnlyLeftRight(rSrcPage.mbPageBorderOnlyLeftRight)
-// {
-//     aPrefVisiLayers.SetAll();
-// }
-
 SdrPage::~SdrPage()
 {
     if( mxUnoPage.is() ) try
commit 14d1ba696e487ebb9d37e21fe274e85363cb2f5c
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Sun Mar 18 15:12:39 2018 +0100

    SOSAW080: Added missing includes
    
    Change-Id: I4caf6b6fbbe6e8130741d793dffb560fd01d4ed5

diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index 1b22053325b5..b10fcf4bc155 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -44,7 +44,8 @@
 #include <svx/svdmodel.hxx>
 #include <svx/svdtrans.hxx>
 #include <svx/svdpage.hxx>
-
+#include <svx/svdograf.hxx>
+#include <svx/svdoole2.hxx>
 
 namespace sdr
 {
commit d99c5ce8e3bf75c26c8997a9dba45fd9464c43d2
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Sun Mar 18 11:20:36 2018 +0100

    SOSAW080: getSdrModelFromUnoModel added override marks
    
    Change-Id: I22de9a1c8af7c25be5c108671ddc548ba323ed47

diff --git a/include/svx/unomodel.hxx b/include/svx/unomodel.hxx
index 7f8a27a20f2b..e637e4486d2a 100644
--- a/include/svx/unomodel.hxx
+++ b/include/svx/unomodel.hxx
@@ -56,7 +56,7 @@ private:
 
 protected:
     // SvxUnoDrawMSFactory
-    virtual SdrModel* getSdrModelFromUnoModel() const;
+    virtual SdrModel* getSdrModelFromUnoModel() const override;
 
 public:
     SvxUnoDrawingModel( SdrModel* pDoc ) throw();
diff --git a/reportdesign/inc/ReportDefinition.hxx b/reportdesign/inc/ReportDefinition.hxx
index 6d877a08ae24..79c58c998600 100644
--- a/reportdesign/inc/ReportDefinition.hxx
+++ b/reportdesign/inc/ReportDefinition.hxx
@@ -186,11 +186,14 @@ namespace reportdesign
 
         css::uno::Reference< css::uno::XComponentContext > getContext();
 
+    protected:
         /** abstract SdrModel provider */
-        virtual SdrModel* getSdrModelFromUnoModel() const;
+        virtual SdrModel* getSdrModelFromUnoModel() const override;
 
+    public:
         //TTTT Needed? Or same as above?
         static std::shared_ptr<rptui::OReportModel> getSdrModel(const css::uno::Reference< css::report::XReportDefinition >& _xReportDefinition);
+
     private:
         DECLARE_XINTERFACE( )
         DECLARE_XTYPEPROVIDER( )
diff --git a/sc/inc/docuno.hxx b/sc/inc/docuno.hxx
index 59f8aa0e944c..370fafde938f 100644
--- a/sc/inc/docuno.hxx
+++ b/sc/inc/docuno.hxx
@@ -125,7 +125,7 @@ protected:
     const SfxItemPropertySet&   GetPropertySet() const { return aPropSet; }
 
     /** abstract SdrModel provider */
-    virtual SdrModel* getSdrModelFromUnoModel() const;
+    virtual SdrModel* getSdrModelFromUnoModel() const override;
 
 public:
                             ScModelObj(ScDocShell* pDocSh);
diff --git a/sd/source/ui/inc/unomodel.hxx b/sd/source/ui/inc/unomodel.hxx
index 3df8e955fb25..381b22be955f 100644
--- a/sd/source/ui/inc/unomodel.hxx
+++ b/sd/source/ui/inc/unomodel.hxx
@@ -130,7 +130,7 @@ private:
 
 protected:
     /** abstract SdrModel provider */
-    virtual SdrModel* getSdrModelFromUnoModel() const;
+    virtual SdrModel* getSdrModelFromUnoModel() const override;
 
 public:
     SdXImpressDocument(::sd::DrawDocShell* pShell, bool bClipBoard);
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 5ddd11e581fe..e306129526dd 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -207,7 +207,7 @@ private:
 
 protected:
     /** abstract SdrModel provider */
-    virtual SdrModel* getSdrModelFromUnoModel() const;
+    virtual SdrModel* getSdrModelFromUnoModel() const override;
 
     virtual ~SwXTextDocument() override;
 public:
commit ba19dade0eb2aa61b39817e4c337391d365b084f
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Sun Mar 18 00:24:37 2018 +0100

    SOSAW080: Corrected constructor
    
    Change-Id: Ic1b5ed3c99bc7219a0061e4ece24ea42afd2889a

diff --git a/basegfx/source/matrix/b3dhommatrixtools.cxx b/basegfx/source/matrix/b3dhommatrixtools.cxx
index e1349df7d97a..677c978545ee 100755
--- a/basegfx/source/matrix/b3dhommatrixtools.cxx
+++ b/basegfx/source/matrix/b3dhommatrixtools.cxx
@@ -24,7 +24,7 @@ namespace basegfx
     namespace utils
     {
         B3DHomMatrix UnoHomogenMatrixToB3DHomMatrix(
-            const com::sun::star::drawing::HomogenMatrix rMatrixIn)
+            const com::sun::star::drawing::HomogenMatrix& rMatrixIn)
         {
             B3DHomMatrix aRetval;
 
diff --git a/include/basegfx/matrix/b3dhommatrixtools.hxx b/include/basegfx/matrix/b3dhommatrixtools.hxx
index 1d4247579690..3c5e8e83ffc2 100755
--- a/include/basegfx/matrix/b3dhommatrixtools.hxx
+++ b/include/basegfx/matrix/b3dhommatrixtools.hxx
@@ -32,7 +32,7 @@ namespace basegfx
            B3DHomMatrix. drawing::HomogenMatrix4 is not used by OOo
          */
         BASEGFX_DLLPUBLIC B3DHomMatrix UnoHomogenMatrixToB3DHomMatrix(
-            const com::sun::star::drawing::HomogenMatrix rMatrixIn);
+            const com::sun::star::drawing::HomogenMatrix& rMatrixIn);
 
         BASEGFX_DLLPUBLIC void B3DHomMatrixToUnoHomogenMatrix(
             const B3DHomMatrix& rMatrixIn,
commit 8984fee9a9f90c09c3d123628cfc69d6f40f28ff
Author: Armin Le Grand <Armin.Le.Grand at cib.de (CIB)>
Date:   Sat Mar 17 23:11:46 2018 +0100

    SOSAW080: Adapted some comments to make more readable
    
    Change-Id: I446685a49a6d67aedd01cfbbd5e87b07f97a4d7b

diff --git a/filter/source/svg/svgexport.cxx b/filter/source/svg/svgexport.cxx
index 36ac823719d4..f16e9df02357 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -561,7 +561,7 @@ bool SVGFilter::implExport( const Sequence< PropertyValue >& rDescriptor )
                             mpDefaultSdrPage = pSvxDrawPage->GetSdrPage();
                             mpSdrModel = &mpDefaultSdrPage->getSdrModelFromSdrPage();
 
-                            if( mpSdrModel ) // TTTT shbe ref
+                            if( mpSdrModel ) // TTTT should be reference
                             {
                                 SdrOutliner& rOutl = mpSdrModel->GetDrawOutliner();
 
diff --git a/sc/source/ui/app/drwtrans.cxx b/sc/source/ui/app/drwtrans.cxx
index 0a7789540aa5..12cfa00f3bca 100644
--- a/sc/source/ui/app/drwtrans.cxx
+++ b/sc/source/ui/app/drwtrans.cxx
@@ -632,7 +632,7 @@ static void lcl_InitMarks( SdrMarkView& rDest, const SdrMarkView& rSource, SCTAB
 void ScDrawTransferObj::SetDragSource( const ScDrawView* pView )
 {
     DELETEZ( pDragSourceView );
-    pDragSourceView = new SdrView(pView->getSdrModelFromSdrView()); // TTTT pView shbe ref
+    pDragSourceView = new SdrView(pView->getSdrModelFromSdrView()); // TTTT pView should be reference
     lcl_InitMarks( *pDragSourceView, *pView, pView->GetTab() );
 
     //! add as listener with document, delete pDragSourceView if document gone
@@ -641,7 +641,7 @@ void ScDrawTransferObj::SetDragSource( const ScDrawView* pView )
 void ScDrawTransferObj::SetDragSourceObj( SdrObject* pObj, SCTAB nTab )
 {
     DELETEZ( pDragSourceView );
-    pDragSourceView = new SdrView(pObj->getSdrModelFromSdrObject()); // TTTT pObj shbe ref
+    pDragSourceView = new SdrView(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference
     pDragSourceView->ShowSdrPage(pDragSourceView->GetModel()->GetPage(nTab));
     SdrPageView* pPV = pDragSourceView->GetSdrPageView();
     pDragSourceView->MarkObj(pObj, pPV);
diff --git a/sc/source/ui/drawfunc/fuconrec.cxx b/sc/source/ui/drawfunc/fuconrec.cxx
index 79ccb4868160..6aba5faad5fc 100644
--- a/sc/source/ui/drawfunc/fuconrec.cxx
+++ b/sc/source/ui/drawfunc/fuconrec.cxx
@@ -216,7 +216,7 @@ void FuConstRectangle::Activate()
 
 void FuConstRectangle::SetLineEnds(SfxItemSet& rAttr, const SdrObject* pObj, sal_uInt16 nSlotId)
 {
-    SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj shbe ref
+    SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference
 
     if ( nSlotId == SID_LINE_ARROW_START      ||
          nSlotId == SID_LINE_ARROW_END        ||
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 8a41c5db4c4d..21c2c1fab2d5 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -162,7 +162,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
     tools::Rectangle aRect ( aInsertPos, aLogicSize );
 
     SdrGrafObj* pObj = new SdrGrafObj(
-        pView->getSdrModelFromSdrView(), // TTTT pView shbe ref
+        pView->getSdrModelFromSdrView(), // TTTT pView should be reference
         rGraphic,
         aRect);
 
diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx
index 1f605c3ec98b..d72f90b5030f 100644
--- a/sc/source/ui/drawfunc/fuins2.cxx
+++ b/sc/source/ui/drawfunc/fuins2.cxx
@@ -352,7 +352,7 @@ FuInsertOLE::FuInsertOLE(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView*
                 aPnt.AdjustX( -(aSize.Width()) );      // move position to left edge
             tools::Rectangle aRect (aPnt, aSize);
             SdrOle2Obj* pObj = new SdrOle2Obj(
-                *pDoc, // TTTT shbe ref
+                *pDoc, // TTTT should be reference
                 aObjRef,
                 aName,
                 aRect);
@@ -594,7 +594,7 @@ FuInsertChart::FuInsertChart(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawV
 
     tools::Rectangle aRect (aStart, aSize);
     SdrOle2Obj* pObj = new SdrOle2Obj(
-        *pDoc, // TTTT shbe ref
+        *pDoc, // TTTT should be reference
         svt::EmbeddedObjectRef(xObj, nAspect),
         aName,
         aRect);
@@ -757,7 +757,7 @@ FuInsertChartFromFile::FuInsertChartFromFile( ScTabViewShell* pViewSh, vcl::Wind
     Point aStart = pViewSh->GetChartInsertPos( aSize, aPositionRange );
     tools::Rectangle aRect (aStart, aSize);
     SdrOle2Obj* pObj = new SdrOle2Obj(
-        *pDoc, // TTTT shbe ref
+        *pDoc, // TTTT should be reference
         svt::EmbeddedObjectRef(xObj, nAspect),
         aName,
         aRect);
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 57589b1e1705..d2941010b23b 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -568,7 +568,7 @@ void SdPage::addAnnotation( const Reference< XAnnotation >& xAnnotation, int nIn
 
     SetChanged();
     getSdrModelFromSdrPage().SetChanged();
-    // TTTT NotifyDocumentEvent shbe ref?
+    // TTTT NotifyDocumentEvent should be reference
     NotifyDocumentEvent(
         static_cast< SdDrawDocument* >(&getSdrModelFromSdrPage()),
         "OnAnnotationInserted",
diff --git a/sd/source/ui/func/fuconrec.cxx b/sd/source/ui/func/fuconrec.cxx
index 471a1eeb2608..d78fd866755d 100644
--- a/sd/source/ui/func/fuconrec.cxx
+++ b/sd/source/ui/func/fuconrec.cxx
@@ -541,7 +541,7 @@ void FuConstructRectangle::SetLineEnds(SfxItemSet& rAttr, SdrObject const * pObj
           nSlotId == SID_LINE_SQUARE_ARROW )
     {
         // set attributes of line start and ends
-        SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj shbe ref
+        SdrModel& rModel(pObj->getSdrModelFromSdrObject()); // TTTT pObj should be reference
 
         // arrowhead
         ::basegfx::B2DPolyPolygon aArrow( getPolygon( RID_SVXSTR_ARROW, rModel ) );
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index da8f291debe7..dafb18736738 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -187,7 +187,7 @@ void DrawViewShell::FuTable(SfxRequest& rReq)
         }
 
         sdr::table::SdrTableObj* pObj = new sdr::table::SdrTableObj(
-            *GetDoc(), // TTTT reference?
+            *GetDoc(), // TTTT should be reference
             aRect,
             nColumns,
             nRows);
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index c376c17954a7..3e26db67bc7d 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 shbe ref
+                *m_rDrawViewShell.GetDoc(), // TTTT should be reference
                 OBJ_TEXT);
             pObject->SetMergedItem(makeSdrTextAutoGrowWidthItem(true));
             pObject->SetOutlinerParaObject(pOutliner->CreateParaObject());
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 0e6eeb07b398..ffaf3d3ab582 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -51,7 +51,7 @@ using namespace ::std;
 namespace sd {
 
 FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK */)
-:   SdrView(*pDrawDoc, nullptr), // TTTT SdDrawDocument* -> reference?
+:   SdrView(*pDrawDoc, nullptr), // TTTT SdDrawDocument* -> should be reference
     mnRefCount(0),
     mnPresViewShellId(SID_VIEWSHELL0),
     mbIsNavigatorShowingAllShapes(false)
diff --git a/svx/source/inc/tablemodel.hxx b/svx/source/inc/tablemodel.hxx
index af8f6b445f1e..791a4310f190 100644
--- a/svx/source/inc/tablemodel.hxx
+++ b/svx/source/inc/tablemodel.hxx
@@ -176,7 +176,7 @@ private:
     rtl::Reference< TableColumns > mxTableColumns;
     rtl::Reference< TableRows >    mxTableRows;
 
-    SdrTableObj* mpTableObj; // TTTT should be ref?
+    SdrTableObj* mpTableObj; // TTTT should be reference
 
     bool mbModified;
     bool mbNotifyPending;
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index b63e3416ad10..f35a104f6da5 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star::drawing;
 
 UNO3_GETIMPLEMENTATION_IMPL( SvxDrawPage );
 
-SvxDrawPage::SvxDrawPage(SdrPage* pInPage) // TTTT shbe ref
+SvxDrawPage::SvxDrawPage(SdrPage* pInPage) // TTTT should be reference
 :   mrBHelper(getMutex())
     ,mpPage(pInPage)
     ,mpModel(&pInPage->getSdrModelFromSdrPage())  // register at broadcaster
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 852d945607a7..f09305dd9939 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -157,7 +157,7 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject* pObject, SdrText* pText
     mpText          ( pText ),
     mpView          ( nullptr ),
     mpWindow        ( nullptr ),
-    mpModel         ( pObject ? &pObject->getSdrModelFromSdrObject() : nullptr ), // TTTT shbe ref
+    mpModel         ( pObject ? &pObject->getSdrModelFromSdrObject() : nullptr ), // TTTT should be reference
     mpOutliner      ( nullptr ),
     mpTextForwarder ( nullptr ),
     mpViewForwarder ( nullptr ),
@@ -193,7 +193,7 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject& rObject, SdrText* pText
     mpText          ( pText ),
     mpView          ( &rView ),
     mpWindow        ( &rWindow ),
-    mpModel         ( &rObject.getSdrModelFromSdrObject() ), // TTTT shbe ref
+    mpModel         ( &rObject.getSdrModelFromSdrObject() ), // TTTT should be reference
     mpOutliner      ( nullptr ),
     mpTextForwarder ( nullptr ),
     mpViewForwarder ( nullptr ),
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index ece29f920435..385f8dacc8d5 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -1288,7 +1288,7 @@ static void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SdrModel* _pModel )
 
                 // create new graphic shape with the ole graphic and shape size
                 SdrGrafObj* pGraphicObj = new SdrGrafObj(
-                    *_pModel, // TTTT why ptr?
+                    *_pModel, // TTTT should be reference
                     aGraphic,
                     pOle2Obj->GetCurrentBoundRect());
                 // apply layer of ole2 shape at graphic shape
commit 2f8d490b1ed4cf0be09a593296cb35fd4dc41721
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 4efb3e084de38d0df9c9a95ba68b7033babd70c1
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 b60cc8e15729..771a6b80ae81 100644
--- a/filter/source/msfilter/escherex.cxx
+++ b/filter/source/msfilter/escherex.cxx
@@ -3774,11 +3774,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 8d6e67e90a3d..36ac823719d4 100644
--- a/filter/source/svg/svgexport.cxx
+++ b/filter/source/svg/svgexport.cxx
@@ -1930,10 +1930,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 cd14808b0881..1687392986a9 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 bc75df8064838238fe38acff09b7093f84249ffa
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 e9846e6aca5b..e9b0a4532131 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -812,10 +812,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 c232cc929f93..11b91f028fb8 100644
--- a/include/svx/svdtext.hxx
+++ b/include/svx/svdtext.hxx
@@ -47,9 +47,6 @@ public:
     explicit SdrText( SdrTextObj& rObject );
     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 27fd3e472aac..c290093f0c4c 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 );
@@ -1461,9 +1460,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 ) );
@@ -1628,9 +1626,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 a2f76ab0a6ec..500a88caa103 100644
--- a/sd/source/core/drawdoc.cxx
+++ b/sd/source/core/drawdoc.cxx
@@ -657,23 +657,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 28614827e2f7..4ea4f56f8f16 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 58c2631578fc..c376c17954a7 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/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 10f4673f1a9f..ef63499a1eb8 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 db1f1bdf3e3e..4f480f4046aa 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 (?)
@@ -397,29 +397,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;
@@ -433,15 +410,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
@@ -524,9 +504,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
@@ -907,7 +884,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

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list