summaryrefslogtreecommitdiff
path: root/cui/source/tabpages/tpline.cxx
diff options
context:
space:
mode:
authorArmin Le Grand <Armin.Le.Grand@cib.de>2018-05-24 19:09:44 +0200
committerArmin Le Grand <Armin.Le.Grand@cib.de>2018-05-31 15:53:51 +0200
commit4be44a7a6f2f480e55255d7cdd119f3d6577d085 (patch)
treee07008be8355538160d52ea94eb35a10dc83a4a1 /cui/source/tabpages/tpline.cxx
parent7d275e3ab35b3f9bfd7ff16290393ca027c50355 (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 'cui/source/tabpages/tpline.cxx')
-rw-r--r--cui/source/tabpages/tpline.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 9c2249310ffc..2dd8adbd01a0 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -341,7 +341,8 @@ void SvxLineTabPage::InitSymbols(MenuButton const * pButton)
{
ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
- std::unique_ptr<SdrModel> pModel(new SdrModel);
+ std::unique_ptr<SdrModel> pModel(
+ new SdrModel());
pModel->GetItemPool().FreezeIdRanges();
// Page
SdrPage* pPage = new SdrPage( *pModel, false );
@@ -1119,7 +1120,8 @@ void SvxLineTabPage::Reset( const SfxItemSet* rAttrs )
ScopedVclPtrInstance< VirtualDevice > pVDev;
pVDev->SetMapMode(MapMode(MapUnit::Map100thMM));
- std::unique_ptr<SdrModel> pModel(new SdrModel);
+ std::unique_ptr<SdrModel> pModel(
+ new SdrModel());
pModel->GetItemPool().FreezeIdRanges();
SdrPage* pPage = new SdrPage( *pModel, false );
pPage->SetSize(Size(1000,1000));