diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-13 15:22:50 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-03-14 15:35:50 -0400 |
commit | 09b4e76d028686aad1a36830c71398b758121c74 (patch) | |
tree | d56709d3347719e992fc038b8f819a659827e782 /sc | |
parent | fd5f562ebc014ccf366bdf2e447e49b033e5e4d6 (diff) |
Move the style sheet pool handling too.
Change-Id: Ia24e2effa8d6200eb0e9ad5e30fb5c9a4d8dd670
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen8.cxx | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index e6d1e38ddb64..541e709ca56e 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -449,10 +449,11 @@ class IdleCalcTextWidthScope { ScDocument& mrDoc; ScAddress& mrCalcPos; - sal_uInt16 mnOldSearchMask; - SfxStyleFamily meOldFamily; MapMode maOldMapMode; sal_uLong mnStartTime; + ScStyleSheetPool* mpStylePool; + sal_uInt16 mnOldSearchMask; + SfxStyleFamily meOldFamily; bool mbNeedMore; bool mbProgress; @@ -461,17 +462,18 @@ public: mrDoc(rDoc), mrCalcPos(rCalcPos), mnStartTime(Time::GetSystemTicks()), + mpStylePool(rDoc.GetStyleSheetPool()), + mnOldSearchMask(mpStylePool->GetSearchMask()), + meOldFamily(mpStylePool->GetSearchFamily()), mbNeedMore(false), mbProgress(false) { - mrDoc.EnableIdle(false); - // The old search mask / family flags must be restored so that e.g. // the styles dialog shows correct listing when it's opened in-between // the calls. - ScStyleSheetPool* pStylePool = mrDoc.GetStyleSheetPool(); - mnOldSearchMask = pStylePool->GetSearchMask(); - meOldFamily = pStylePool->GetSearchFamily(); + + mrDoc.EnableIdle(false); + mpStylePool->SetSearchMask(SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL); } ~IdleCalcTextWidthScope() @@ -483,8 +485,7 @@ public: if (mbProgress) ScProgress::DeleteInterpretProgress(); - ScStyleSheetPool* pStylePool = mrDoc.GetStyleSheetPool(); - pStylePool->SetSearchMask(meOldFamily, mnOldSearchMask); + mpStylePool->SetSearchMask(meOldFamily, mnOldSearchMask); mrDoc.EnableIdle(true); } @@ -514,6 +515,8 @@ public: } bool hasProgressBar() const { return mbProgress; } + + ScStyleSheetPool* getStylePool() { return mpStylePool; } }; } @@ -546,12 +549,8 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers if (!ValidTab(aScope.Tab()) || aScope.Tab() >= static_cast<SCTAB>(maTabs.size()) || !maTabs[aScope.Tab()]) aScope.setTab(0); - ScStyleSheetPool* pStylePool = xPoolHelper->GetStylePool(); - pTable = maTabs[aScope.Tab()]; - pStylePool->SetSearchMask( SFX_STYLE_FAMILY_PAGE, SFXSTYLEBIT_ALL ); - pStyle = (ScStyleSheet*)pStylePool->Find( pTable->aPageStyle, - SFX_STYLE_FAMILY_PAGE ); + pStyle = (ScStyleSheet*)aScope.getStylePool()->Find(pTable->aPageStyle, SFX_STYLE_FAMILY_PAGE); OSL_ENSURE( pStyle, "Missing StyleSheet :-/" ); @@ -636,8 +635,8 @@ bool ScDocument::IdleCalcTextWidth() // true = demnaechst wieder vers if ( bNewTab ) { pTable = maTabs[aScope.Tab()]; - pStyle = (ScStyleSheet*)pStylePool->Find( pTable->aPageStyle, - SFX_STYLE_FAMILY_PAGE ); + pStyle = (ScStyleSheet*)aScope.getStylePool()->Find( + pTable->aPageStyle, SFX_STYLE_FAMILY_PAGE); if ( pStyle ) { |