diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-24 19:09:44 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2018-05-31 15:53:51 +0200 |
commit | 4be44a7a6f2f480e55255d7cdd119f3d6577d085 (patch) | |
tree | e07008be8355538160d52ea94eb35a10dc83a4a1 /include | |
parent | 7d275e3ab35b3f9bfd7ff16290393ca027c50355 (diff) |
SOSAW080: Cleanup of SdrModel
First step: Find all constructors/derivations, mark
all of them.
Removed two-value-constructors, adapted code as needed
Reduced constructors for SdrModel/FmFormModel
to a single one.
Removed PathName for List creation, this is not
needed and anyways all calls used the default
SvtPathOptions().GetPalettePath(). This is also
true for usage of IsFuzzing() that is also part
of the default creation process (without path).
All usages that need an extra-List were setting
it after construction explicitely.
Removed UseExtColorTable. This prevents a single
List to be not created by default, the ColorTable
which is replaced later by all callers that used
this. This is not needed since the default
ColorTable gets constructed just by default, no
expensive stuff is triggered (e.g. loading the
ColorTable). Thus now a default ColorTable is
created and kept for a short moment, destructed
again when a ColorTable is explicitely set.
Doing so is also more safe - it avoids not
creating a default-ColorTable and then not setting
one (what would be urgently required).
f23c24a8548d5246b77b1cc359ba89564538e81a
f124468c3898c5842d37123bdeb87d79a2b19c62
Change-Id: I865de4bb23f673c6684d83c2c6390439506dc5b6
Reviewed-on: https://gerrit.libreoffice.org/55028
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/fmmodel.hxx | 9 | ||||
-rw-r--r-- | include/svx/svdmodel.hxx | 20 |
2 files changed, 18 insertions, 11 deletions
diff --git a/include/svx/fmmodel.hxx b/include/svx/fmmodel.hxx index 5f064bae4151..19e3fe9fba6e 100644 --- a/include/svx/fmmodel.hxx +++ b/include/svx/fmmodel.hxx @@ -47,12 +47,9 @@ private: void operator=(const FmFormModel& rSrcModel) = delete; public: - - FmFormModel(SfxItemPool* pPool=nullptr, SfxObjectShell* pPers=nullptr ); - FmFormModel(const OUString& rPath, SfxItemPool* pPool=nullptr, - SfxObjectShell* pPers=nullptr ); - FmFormModel(const OUString& rPath, SfxItemPool* pPool, SfxObjectShell* pPers, - bool bUseExtColorTable); + FmFormModel( + SfxItemPool* pPool = nullptr, + SfxObjectShell* pPers = nullptr); virtual ~FmFormModel() override; diff --git a/include/svx/svdmodel.hxx b/include/svx/svdmodel.hxx index cc5ad89b74dc..c0907cb233c4 100644 --- a/include/svx/svdmodel.hxx +++ b/include/svx/svdmodel.hxx @@ -138,6 +138,15 @@ public: SdrHintKind GetKind() const { return meHint;} }; +//////////////////////////////////////////////////////////////////////////////////////////////////// +// +// SdrModel +// DlgEdModel +// FmFormModel +// ScDrawLayer +// SdDrawDocument +// SwDrawModel +// OReportModel struct SdrModelImpl; @@ -147,7 +156,6 @@ protected: std::vector<SdrPage*> maMaPag; // master pages std::vector<SdrPage*> maPages; Link<SdrUndoAction*,void> aUndoLink; // link to a NotifyUndo-Handler - OUString aTablePath; Size aMaxObjSize; // e.g. for auto-growing text Fraction aObjUnit; // description of the coordinate units for ClipBoard, Drag&Drop, ... MapUnit eObjUnit; // see above @@ -236,8 +244,10 @@ private: SVX_DLLPRIVATE void ImpReformatAllTextObjects(); SVX_DLLPRIVATE void ImpReformatAllEdgeObjects(); SVX_DLLPRIVATE void ImpCreateTables(); - SVX_DLLPRIVATE void ImpCtor(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable); + SVX_DLLPRIVATE void ImpCtor( + SfxItemPool* pPool, + ::comphelper::IEmbeddedHelper* pPers); // this is a weak reference to a possible living api wrapper for this model css::uno::Reference< css::uno::XInterface > mxUnoModel; @@ -256,9 +266,9 @@ public: // if you want to use symbol objects inherited from SdrAttrObj. // If, however, you use objects inheriting from SdrObject you are free // to chose a pool of your liking. - explicit SdrModel(); - explicit SdrModel(SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers); - explicit SdrModel(const OUString& rPath, SfxItemPool* pPool, ::comphelper::IEmbeddedHelper* pPers, bool bUseExtColorTable); + explicit SdrModel( + SfxItemPool* pPool = nullptr, + ::comphelper::IEmbeddedHelper* pPers = nullptr); virtual ~SdrModel() override; void ClearModel(bool bCalledFromDestructor); |