diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:06:44 +0000 |
commit | ed5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch) | |
tree | 7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /starmath/inc/smediteng.hxx | |
parent | Initial commit. (diff) | |
download | libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.tar.xz libreoffice-ed5640d8b587fbcfed7dd7967f3de04b37a76f26.zip |
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'starmath/inc/smediteng.hxx')
-rw-r--r-- | starmath/inc/smediteng.hxx | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/starmath/inc/smediteng.hxx b/starmath/inc/smediteng.hxx new file mode 100644 index 000000000..6c95b5804 --- /dev/null +++ b/starmath/inc/smediteng.hxx @@ -0,0 +1,59 @@ +/* This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include <editeng/editeng.hxx> +#include <unotools/lingucfg.hxx> + +class SmEditEngine final : public EditEngine +{ +public: + SmEditEngine(SfxItemPool* pItemPool); + SmEditEngine(const SmEditEngine&) = delete; + +public: + /** + * Runs checkZoom and if true runs updateZoom + */ + void executeZoom(EditView* pEditView = nullptr); + + /** + * Sets up default font parameters for the item pool. + */ + static void setSmItemPool(SfxItemPool* mpItemPool, const SvtLinguOptions& maLangOptions); + + // Deal with text scaling +private: + sal_Int32 m_nOldZoom; + sal_Int32 m_nNewZoom; + sal_Int32 m_nDefaultFontSize; + + /** + * Checks if the zoom of smeditwindow has changed. + * m_nNewZoom is updated. + * @return zoom has changed + */ + bool checkZoom(); + + /** + * Updates the zoom of smeditwindow. + * m_nOldZoom is set to m_nNewZoom. + */ + + void updateZoom(); + + // Gather information for more complex tasks +private: + ESelection m_aAllSelection; + + /** + * Finds the ESelection which contains all the text. + */ + void updateAllESelection(); +}; +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ |