sc/source/core/data/drwlayer.cxx | 5 +++++ 1 file changed, 5 insertions(+)
New commits: commit f460bd163afb06dc2dccc877269106af38767484 Author: Maxim Monastirsky <momonas...@gmail.com> AuthorDate: Sun Mar 19 19:52:09 2023 +0200 Commit: Maxim Monastirsky <momonas...@gmail.com> CommitDate: Tue Mar 21 23:10:20 2023 +0000 sc drawstyles: Connect the styles pool to the draw layer Change-Id: Ie87bb028264b74fd3e15e23a3ad60ab3c48bb14d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149202 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonas...@gmail.com> diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx index e6203697a4e7..653571cabd38 100644 --- a/sc/source/core/data/drwlayer.cxx +++ b/sc/source/core/data/drwlayer.cxx @@ -72,6 +72,7 @@ #include <attrib.hxx> #include <charthelper.hxx> #include <table.hxx> +#include <stlpool.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> #include <memory> @@ -280,6 +281,8 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) : rPool.FreezeIdRanges(); // the pool is also used directly + SetStyleSheetPool(pDocument ? pDocument->GetStyleSheetPool() : new ScStyleSheetPool(rPool, pDocument)); + SdrLayerAdmin& rAdmin = GetLayerAdmin(); rAdmin.NewLayer("vorne", SC_LAYER_FRONT.get()); rAdmin.NewLayer("hinten", SC_LAYER_BACK.get()); @@ -292,9 +295,11 @@ ScDrawLayer::ScDrawLayer( ScDocument* pDocument, OUString _aName ) : ScModule* pScMod = SC_MOD(); Outliner& rOutliner = GetDrawOutliner(); rOutliner.SetCalcFieldValueHdl( LINK( pScMod, ScModule, CalcFieldValueHdl ) ); + rOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); Outliner& rHitOutliner = GetHitTestOutliner(); rHitOutliner.SetCalcFieldValueHdl( LINK( pScMod, ScModule, CalcFieldValueHdl ) ); + rHitOutliner.SetStyleSheetPool(static_cast<SfxStyleSheetPool*>(GetStyleSheetPool())); // set FontHeight pool defaults without changing static SdrEngineDefaults SfxItemPool* pOutlinerPool = rOutliner.GetEditTextObjectPool();