[Libreoffice-commits] core.git: starmath/inc starmath/source
Caolán McNamara
caolanm at redhat.com
Wed Mar 1 13:03:41 UTC 2017
starmath/inc/edit.hxx | 2 --
starmath/source/edit.cxx | 15 ++++-----------
2 files changed, 4 insertions(+), 13 deletions(-)
New commits:
commit 9a39b4c946f59981975d3cd4556185168192874b
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Mar 1 13:02:41 2017 +0000
unroll SmEditWindow::GetEditEngineItemPool
Change-Id: Iaf7a7c65109864f429ab5cc6848a12a37421afa1
diff --git a/starmath/inc/edit.hxx b/starmath/inc/edit.hxx
index 286078a..5fb4ec1 100644
--- a/starmath/inc/edit.hxx
+++ b/starmath/inc/edit.hxx
@@ -82,8 +82,6 @@ class SmEditWindow : public vcl::Window, public DropTargetHelper
void InvalidateSlots();
void UpdateStatus(bool bSetDocModified);
- SfxItemPool* GetEditEngineItemPool();
-
public:
explicit SmEditWindow(SmCmdBoxWindow& rMyCmdBoxWin);
virtual ~SmEditWindow() override;
diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 47ecd52..89275bb 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -199,13 +199,6 @@ EditEngine * SmEditWindow::GetEditEngine()
return pEditEng;
}
-
-SfxItemPool * SmEditWindow::GetEditEngineItemPool()
-{
- SmDocShell *pDoc = GetDoc();
- return pDoc ? &pDoc->GetEditEngineItemPool() : nullptr;
-}
-
void SmEditWindow::ApplyColorConfigValues( const svtools::ColorConfig &rColorCfg )
{
// Note: SetBackground still done in SmEditWindow::DataChanged
@@ -226,10 +219,10 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
// the application font thus we use this one too
SetPointFont(*this, aSettings.GetFieldFont() /*aSettings.GetAppFont()*/);
- EditEngine *pEditEngine = GetEditEngine();
- SfxItemPool *pEditEngineItemPool = GetEditEngineItemPool();
+ EditEngine *pEditEngine = GetEditEngine();
+ SmDocShell *pDoc = GetDoc();
- if (pEditEngine && pEditEngineItemPool)
+ if (pEditEngine && pDoc)
{
//!
//! see also SmDocShell::GetEditEngine() !
@@ -237,7 +230,7 @@ void SmEditWindow::DataChanged( const DataChangedEvent& )
pEditEngine->SetDefTab(sal_uInt16(GetTextWidth("XXXX")));
- SetEditEngineDefaultFonts(*pEditEngineItemPool);
+ SetEditEngineDefaultFonts(pDoc->GetEditEngineItemPool());
// forces new settings to be used
// unfortunately this resets the whole edit engine
More information about the Libreoffice-commits
mailing list