summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-08-07 16:21:23 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-08-08 11:26:11 +0200
commit674416a2f16dfa050a23f2b1f0b749214ea1f2a6 (patch)
tree068b1d4f3f247ab214151696e1deeed9eada448c /svx
parent3ef76067bfa1f9f60ec3989bd6b40a5760137903 (diff)
tdf#118731 delay on showing dialogs that create SdrModels
for their preview widgets. since... commit 4be44a7a6f2f480e55255d7cdd119f3d6577d085 Date: Thu May 24 19:09:44 2018 +0200 SOSAW080: Cleanup of SdrModel Change-Id: I102b64bdacc56a41091bbe60e932c2915f20323f Reviewed-on: https://gerrit.libreoffice.org/58693 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/dlgctrl.cxx4
-rw-r--r--svx/source/dialog/graphctl.cxx2
-rw-r--r--svx/source/dialog/measctrl.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx14
4 files changed, 12 insertions, 10 deletions
diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx
index e482f1f0a494..6f757f1ec62b 100644
--- a/svx/source/dialog/dlgctrl.cxx
+++ b/svx/source/dialog/dlgctrl.cxx
@@ -1786,7 +1786,7 @@ void SvxPreviewBase::InitSettings(bool bForeground, bool bBackground)
SvxPreviewBase::SvxPreviewBase(vcl::Window* pParent)
: Control(pParent, WB_BORDER)
- , mpModel(new SdrModel())
+ , mpModel(new SdrModel(nullptr, nullptr, true))
, mpBufferDevice(VclPtr<VirtualDevice>::Create(*this))
{
// Draw the control's border as a flat thin black line.
@@ -2189,7 +2189,7 @@ void PreviewBase::InitSettings()
}
PreviewBase::PreviewBase()
- : mpModel(new SdrModel())
+ : mpModel(new SdrModel(nullptr, nullptr, true))
{
// init model
mpModel->GetItemPool().FreezeIdRanges();
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 0f9325232f01..17d416d3ad94 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -120,7 +120,7 @@ void GraphCtrl::InitSdrModel()
pModel.reset();
// Creating a Model
- pModel.reset(new SdrModel());
+ pModel.reset(new SdrModel(nullptr, nullptr, true));
pModel->GetItemPool().FreezeIdRanges();
pModel->SetScaleUnit( aMap100.GetMapUnit() );
pModel->SetScaleFraction( Fraction( 1, 1 ) );
diff --git a/svx/source/dialog/measctrl.cxx b/svx/source/dialog/measctrl.cxx
index 2aa183ecaa1a..578a49ceb6e3 100644
--- a/svx/source/dialog/measctrl.cxx
+++ b/svx/source/dialog/measctrl.cxx
@@ -41,7 +41,7 @@ SvxXMeasurePreview::SvxXMeasurePreview(vcl::Window* pParent, WinBits nStyle)
Point aPt1 = Point(aSize.Width() / 5, static_cast<long>(aSize.Height() / 2));
Point aPt2 = Point(aSize.Width() * 4 / 5, static_cast<long>(aSize.Height() / 2));
- pModel.reset(new SdrModel());
+ pModel.reset(new SdrModel(nullptr, nullptr, true));
pMeasureObj = new SdrMeasureObj(
*pModel,
aPt1,
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index a63401dc88e7..4889328cbf57 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -100,7 +100,8 @@ struct SdrModelImpl
void SdrModel::ImpCtor(
SfxItemPool* pPool,
- ::comphelper::IEmbeddedHelper* _pEmbeddedHelper)
+ ::comphelper::IEmbeddedHelper* _pEmbeddedHelper,
+ bool bDisablePropertyFiles)
{
mpImpl.reset(new SdrModelImpl);
mpImpl->mpUndoManager=nullptr;
@@ -198,12 +199,13 @@ void SdrModel::ImpCtor(
pTextChain.reset(new TextChain);
/* End Text Chaining related code */
- ImpCreateTables();
+ ImpCreateTables(bDisablePropertyFiles || utl::ConfigManager::IsFuzzing());
}
SdrModel::SdrModel(
SfxItemPool* pPool,
- ::comphelper::IEmbeddedHelper* pPers)
+ ::comphelper::IEmbeddedHelper* pPers,
+ bool bDisablePropertyFiles)
:
#ifdef DBG_UTIL
// SdrObjectLifetimeWatchDog:
@@ -212,7 +214,7 @@ SdrModel::SdrModel(
maMaPag(),
maPages()
{
- ImpCtor(pPool,pPers);
+ ImpCtor(pPool,pPers,bDisablePropertyFiles);
}
SdrModel::~SdrModel()
@@ -606,10 +608,10 @@ bool SdrModel::IsUndoEnabled() const
}
}
-void SdrModel::ImpCreateTables()
+void SdrModel::ImpCreateTables(bool bDisablePropertyFiles)
{
// use standard path for initial construction
- const OUString aTablePath(!utl::ConfigManager::IsFuzzing() ? SvtPathOptions().GetPalettePath() : "");
+ const OUString aTablePath(!bDisablePropertyFiles ? SvtPathOptions().GetPalettePath() : "");
for( auto i : o3tl::enumrange<XPropertyListType>() )
{