Version 7.6.3.2-android, tag libreoffice-7.6.3.2-android
[LibreOffice.git] / starmath / inc / smediteng.hxx
blob6c95b58044901d97385cae4ace98026e49bbb7af
1 /* This file is part of the LibreOffice project.
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 */
8 #pragma once
10 #include <editeng/editeng.hxx>
11 #include <unotools/lingucfg.hxx>
13 class SmEditEngine final : public EditEngine
15 public:
16 SmEditEngine(SfxItemPool* pItemPool);
17 SmEditEngine(const SmEditEngine&) = delete;
19 public:
20 /**
21 * Runs checkZoom and if true runs updateZoom
23 void executeZoom(EditView* pEditView = nullptr);
25 /**
26 * Sets up default font parameters for the item pool.
28 static void setSmItemPool(SfxItemPool* mpItemPool, const SvtLinguOptions& maLangOptions);
30 // Deal with text scaling
31 private:
32 sal_Int32 m_nOldZoom;
33 sal_Int32 m_nNewZoom;
34 sal_Int32 m_nDefaultFontSize;
36 /**
37 * Checks if the zoom of smeditwindow has changed.
38 * m_nNewZoom is updated.
39 * @return zoom has changed
41 bool checkZoom();
43 /**
44 * Updates the zoom of smeditwindow.
45 * m_nOldZoom is set to m_nNewZoom.
48 void updateZoom();
50 // Gather information for more complex tasks
51 private:
52 ESelection m_aAllSelection;
54 /**
55 * Finds the ESelection which contains all the text.
57 void updateAllESelection();
59 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */