summaryrefslogtreecommitdiff
path: root/starmath/source/document.cxx
AgeCommit message (Collapse)Author
2022-03-01Recheck modules s[f-t]* with IWYUGabor Kelemen
See tdf#42949 for motivation Change-Id: I1f520aad1b1c942ad5616d96851016fc366ac58f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130203 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-10-20combine these contiguous rangesCaolán McNamara
Change-Id: I5f2b4ae72599fb16d567b3500fd1a77811e708a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123881 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-20assert in math, file, printer settings, optionsCaolán McNamara
probably since... commit 1a0fd1c1342969e5b4d08d13764483cd8bada589 Date: Fri May 14 13:46:41 2021 +0200 tdf#130654 editable smeditwindow zoom UI Change-Id: Iead2fd9b5332a9cfead8d4e0d909746d6ed50db8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-10-08use more SfxItemSetFixedNoel Grandin
Change-Id: I18784bac5f7ad1d109f8a81e96084cd6e9548231 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123240 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-28vcl: rename OutDevState to StackChris Sherlock
I have moved the header file to include/vcl/rendercontext as this will eventually be part of the RenderContext split from OutputDevice. State and associated enums have also been moved to the vcl namespace. I have also moved ComplexTextLayoutFlags into the vcl::text namespace. Change-Id: I0abbf560e75b45a272854b267e948c240cd69091 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121524 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2021-09-20Add sal/config.h in preparation for patchChris Sherlock
The convention is that we need to add sal/config.h to the start of files. I have a patch queued to be able to create a FontMetric from a PhysicalFontFace. Submitting this patch so I can hopefully one day land this patch. Change-Id: I5817acd6e194da576f2c8a13539d38954a4f4e15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122172 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-09-18vcl: create FontMetric from PhysicalFontFaceChris Sherlock
A FontMetric can be created from a PhysicalFontFace, so setup a constructor that takes a PhysicalFontFace object to instantiate the FontMetric. The OutputDevice functions GetDevFont() and GetDevFontCount() don't necessarily make much sense, so have changed GetDevFont() to GetFontMetricFromCollection() and GetDevFontCount() to GetFontFaceCollectionCount(). Change-Id: I1577679b949a49a7cf1248838786d0f5e84a5245 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121796 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-08-20Add a SmMlElement tree to the sm documentdante
Change-Id: Ide764b512004198277baed60ac4e1a5ef0d1c2dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120765 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-07-19Move svl::Items to include/svl/whichranges.hxx, and unify its usageMike Kaganski
... in WhichRangesContainer and SfxItemSet ctors. Now it's not needed to explicitly use 'value' in WhichRangesContainer's ctor, or create an instance for use in SfxItemSet ctor (svl::Items is already defined as a template value of corresponding type). Instead of WhichRangesContainer Foo(svl::Items<1, 2>::value); SfxItemSet Bar(rItemPool, svl::Items<1, 2>{}); now use: WhichRangesContainer Foo(svl::Items<1, 2>); SfxItemSet Bar(rItemPool, svl::Items<1, 2>); Change-Id: I4681d952b6442732025e5a26768098878907a238 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119157 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-17split OutputDevice from WindowNoel Grandin
as part of a longer-term goal of doing our widget rendering only inside a top-level render- context. I moved all of the OutputDevice-related code that existed in vcl::Window into a new subclass of OutputDevice called WindowOutputDevice. Notes for further work (*) not sure why we are getting an 1x1 surface in SvpSalGraphics::releaseCairoContext, but to fix it I clamp the size there (*) might have to dump VCLXDevice, and move it's code down into VCLXWindow and VCLXVirtualDevice (*) can we remove use of VCLXDevice in other places, in favour of just talking to the VCL code? Change-Id: I105946377f5322677d6f7d0c1c23847178a720b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113204 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-15tdf#130654 editable smeditwindow zoomdante
Setting only accessible from advanced configuration. Access: org.openoffice.Office.Math.smeditwindowzoom Note that the change won't take immediate effect. LibreOffice has to be restarted to the change to take effect. Math configuration entries are not synced correctly. More detailed explanation can be fond in tdf#132145. Change-Id: I0017ddda73ab2916c6ad1fa238265d57a2a3020e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114616 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-05-08ref-count SfxItemPoolNoel Grandin
so we can remove SfxItemPoolUser, which is a right performance hog when we have large calc spreadsheets Change-Id: I344002f536f6eead5cf98c6647dd1667fd9c8874 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115247 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-06add SfxItemPoolDeleter utilityNoel Grandin
add use so we can hold the pool with std::unique_ptr Change-Id: I685fbc37c0ae145a5b48a66a88eab9fb29a0fc0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115174 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21weld SmGraphicWindowCaolán McNamara
Change-Id: Ie163640d6453f30d1cebdaf75ecd41374b2b9ec3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114351 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-04-20SID_GAPHIC_SM->SID_GRAPHIC_SMCaolán McNamara
Change-Id: Ie5446fc349778ad6dc50ac5f622ddb45ee18eefa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114335 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-07Simplify the use of custom hmtl/mathml entities on matmlexportdante
This patch also serves as a base for further improvements. Change-Id: I72967e3c9739576fb74d16e656f41c440af3a4ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112127 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-07Starmath now allows multiple parsers fourth partdante
Now smelementdockingwindow is version sensitible. Change-Id: I1ed172d03f0756f1603a9ff20aadcea59fe35e9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-02Starmath now allows multiple parsers third partdante
Allows SmDocShell to choose parser Change-Id: I36e7563943690ffe3bf031438061b302b7439258 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111684 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-01Starmath cleanup unused includesdante
Change-Id: I294c5bbeadb718e35c0c5e56332b4df71433555a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111687 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-19Starmath now allows multiple parsersdante
This is an intermediate step towards making a parser wich supports mathml standards. The parser now is a "mask" wich calls the correct parser behind the scenes. Parser 6 is the same as parser 5, but will be implemented soon. Parser 5 does what the old parser did. Using as defualt smsyntax5 in order to be able to code parser6 without provoking any backguards compatibility problem. Change-Id: Iccf73e5ba96870450b98907f78a2a0c28abf6093 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111066 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-19Use custom HTML Mathml entities only when needed.dante
Change-Id: Id2120aec8738286d31d79638b46beac2f0e53780 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-18Mathml gets it's own directorydante
It has grown recently and is going to grow more. cfgitem.hxx has been moved and clangformated because it is not anymore in excludelist Change-Id: I277837b2c0a90ae4e84028dc6e19962939c1aef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108645 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-03-Werror,-Wcompound-token-split-by-spaceStephan Bergmann
Between <https://github.com/llvm/llvm-project/commit/ 0e00a95b4fad5e72851de012d3a0b2c2d01f8685> "Add new warning for compound punctuation tokens that are split across macro expansions or split by whitespace" and <https://github.com/llvm/llvm-project/commit/ 0da84535b1e328188efbc1bb697dc7276f9e7d27> "Remove -Wcompound-token-split-by-space from -Wall", Clang 12 trunk emitted such "'::' and '*' tokens forming pointer to member type are separated by whitespace" warnings, so just clean those places up for good even if the warning would not hit out of the box with any official Clang release. Change-Id: Ic58c0da4b3dcce428f5aaa54e13d15299394cf9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101987 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-26tdf#133030: DOCX export: fix formula alignment - part 3Attila Bakos
Follow-up of commit 1237acf9851f8b12d1ccd929e2aa8b184c06d552 (tdf#132811 DOCX: fix formula alignment – part 2) Co-authored-by: Tibor Nagy (NISZ) Change-Id: I5466649a2aa6b7ffdb0def723f79dfbecdf1495f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93665 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-05-11remove archaic Content.xml fallbackCaolán McNamara
there's no evidence that Content.xml (or Meta.xml) was written by any released version to necessitate the fallback reportdesign Settings.xml and Style.xml fallbacks appear to be cargocult influenced by the Content.xml/Meta.xml examples Change-Id: I51d138344edaffc6d21e17c2d28047ea6316304e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93970 Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins
2020-03-13Revert "loplugin:constfields in starmath"Noel Grandin
This reverts commit e494cc2942899fd92a2273eaed2bf41eb74ea8a9. Change-Id: Ie73ecb4b7299e70dea729c374763f9e2df2aa6f8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90421 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in SfxObjectShell::FillClassNoel Grandin
and since I notice that the two call sites also don't care about pShortTypeName, remove that too Change-Id: I4649fc4c134c1113555b9dedb53499ce39d17132 Reviewed-on: https://gerrit.libreoffice.org/81213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-28loplugin:constmethod in sdext..starmathNoel Grandin
Change-Id: Ib1b60382c9ec62f35f0f232c3f2c2d5664ea669e Reviewed-on: https://gerrit.libreoffice.org/79779 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-24loplugin:returnconstval in sd..starmathNoel Grandin
Change-Id: Ib14f0ebef1c48a00ed09be70cb5885ccd07db762 Reviewed-on: https://gerrit.libreoffice.org/78060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-20loplugin:constvars in solenv..svtoolsNoel Grandin
Change-Id: Ieb0116321bbddd804db6d1789ea3521c5b220840 Reviewed-on: https://gerrit.libreoffice.org/77807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16Fix typosAndrea Gelmini
Split from https://gerrit.libreoffice.org/#/c/76764/ Change-Id: I19f11f80f08ce0d5b4ffda20449f1cddea980b7d Reviewed-on: https://gerrit.libreoffice.org/77596 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-07-21loplugin:referencecasting in slideshow..svtoolsNoel Grandin
Change-Id: Id0f0332d5d66c0bce309643bf42059b9bdc7d448 Reviewed-on: https://gerrit.libreoffice.org/75997 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-08loplugin:unusedmethodsNoel Grandin
Change-Id: I52efd8d843d0e4cc7a6adefb0eb95aa50469af38 Reviewed-on: https://gerrit.libreoffice.org/73693 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-15tdf#90297 set default SmEditWindow backgroundJan-Marek Glogowski
This implements ApplySetting for the proper background of the undocked SfxDockingWindow. In addition, like all other code, this sets the text color via the EditEngine font objects and therefore reverts the uneeded EditEngine interface from the original commit ea191cf9807d ("tdf#90297 use field colors for math's edit engine"). Change-Id: Ib7df4ce730da92a1e41f58b8348a5aec18208166 Reviewed-on: https://gerrit.libreoffice.org/72312 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-05-14tdf#90297 use field colors for math's edit engineJan-Marek Glogowski
This adds a maTextColor to the EditEngine, which will override the default AutoColor. There is also a NOCOLORS mode and I thought about using it instead, but it defaults to COL_BLACK and overriding this seems wrong. Since the EditEngine does the whole drawing and now has the explicit FieldColor() and FieldTextColor() for background and text, my guess is we don't need an ApplySettings implementation. Change-Id: I6c2ecc843a3e07de98f97c86fc00a3b83cb78d97 Reviewed-on: https://gerrit.libreoffice.org/72197 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-05-10handle empty tools::Rectangle in SmDocShell::SetVisAreaNoel Grandin
Change-Id: Iccea3b686b02e03552fa5c836ee5a29103930d04 Reviewed-on: https://gerrit.libreoffice.org/72056 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-08tdf#42949 Fix IWYU warnings in include/sfx2/[t-z]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib3252828385d1dc8faf48a428b1593199647a679 Reviewed-on: https://gerrit.libreoffice.org/70383 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-31loplugin:flatten in starmathNoel Grandin
Change-Id: Iaadd8af404e3eee5ebd49846a02a33735e9c18ba Reviewed-on: https://gerrit.libreoffice.org/67170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-28o3tl::make_unique -> std::make_unique in sax...svtools (except sc)Gabor Kelemen
Since it is now possible to use C++14, it's time to replace the temporary solution with the standard one Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e Reviewed-on: https://gerrit.libreoffice.org/66751 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-07Fix build: add necessary includesMike Kaganski
starmath/source/dialog.cxx needs vcl/combobox.hxx to use COMBOBOX_ENTRY_NOTFOUND define. vcl/virdev.hxx is needed to know VirtualDevice ancestors to allow assignments to pointers to OutputDevice. Change-Id: Iafd33081ef33f28697e9a03bd4892a781fb2eb27 Reviewed-on: https://gerrit.libreoffice.org/65925 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-01-04tdf#42949 Fix IWYU warnings in starmath/inc/*hxx & starmath/source/*hxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If1a597f4c2241dc1ad5687d81199bbc5745e711f Reviewed-on: https://gerrit.libreoffice.org/65624 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-04remove unused enum SfxObjectShellFlagsNoel Grandin
Change-Id: I594e7beb3fb320b70ffe4dd98fee46c833f443dc Reviewed-on: https://gerrit.libreoffice.org/64453 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17clang-tidy readability-redundant-smartptr-getNoel Grandin
redundant get() call on smart pointer Change-Id: Icb5a03bbc15e79a30d3d135a507d22914d15c2bd Reviewed-on: https://gerrit.libreoffice.org/61837 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09use unique_ptr in SfxUndoManager::AddUndoActionNoel Grandin
Change-Id: I11483e3cece12a7373f4276972b4c899edf1ce15 Reviewed-on: https://gerrit.libreoffice.org/61566 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08loplugin:constfields in starmathNoel Grandin
Change-Id: I5092401b4138ca15e93b36adf1b059e75d4e8f5a Reviewed-on: https://gerrit.libreoffice.org/61514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-10loplugin:simplifyconstruct in sfx2..starmathNoel Grandin
Change-Id: I9fbdd23ad61773e57aaf7d70fd19d05a50b8d399 Reviewed-on: https://gerrit.libreoffice.org/60238 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-31Add missing sal/log.hxx headersGabor Kelemen
rtl/string.hxx and rtl/ustring.hxx both unnecessarily #include <sal/log.hxx> (and don't make use of it themselves), but many other files happen to depend on it. This is a continuation of commit 6ff2d84ade299cb3d14d4110e4cf1a4b8070c030 to be able to remove those unneeded includes. This commit adds missing headers to every file found by: grep -FwL sal/log.hxx $(git grep -Elw 'SAL_INFO|SAL_INFO_IF|SAL_WARN|SAL_WARN_IF|SAL_DETAIL_LOG_STREAM|SAL_WHERE|SAL_STREAM|SAL_DEBUG') to directories from sfx2 to starmath Change-Id: I40ee7bfae6efdadd862319b7b693ad22c648e1c4 Reviewed-on: https://gerrit.libreoffice.org/58222 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-13merge IUndoManager into SfxUndoManagerNoel Grandin
SfxUndoManager is the only implementation of the IUnderManager "interface", and it lives in the same header. Plus this way we can get rid of some covariant parameters, which will make using std::unique_ptr easier. Change-Id: I6661b9876b18da830bead78794d237886cd3c5c9 Reviewed-on: https://gerrit.libreoffice.org/57317 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-05-09ofz#7816 oom due to too many little allocations in short period of timeCaolán McNamara
Change-Id: I5d575ee37926c24f9708710aa344bbf1f6ea8373 Reviewed-on: https://gerrit.libreoffice.org/53982 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>