summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2023-03-19 19:52:09 +0200
committerMaxim Monastirsky <momonasmon@gmail.com>2023-03-21 23:10:20 +0000
commitf460bd163afb06dc2dccc877269106af38767484 (patch)
tree2b0673925b6ad7cc32090b01c21ee2e2f8fc3c6b /sc
parent6db5e15e5b91f34232e90225a723e0673ecfc2f0 (diff)
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 <momonasmon@gmail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/drwlayer.cxx5
1 files changed, 5 insertions, 0 deletions
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();