summaryrefslogtreecommitdiff
path: root/starmath/source/edit.cxx
AgeCommit message (Collapse)Author
2021-02-24Resolves: rhbz#1931423 start update timer in IM events as well as keyeventsCaolán McNamara
Change-Id: I5a72adebd34c3983e7a414110c3192d05b725e45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111488 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-02-16loplugin:referencecasting in slideshow..starmathNoel
Change-Id: Id9dc0ac27897c8a3650424db65d3a05e2fe418f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110986 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-15Resolves tdf#140221 auto-adjust Formula Editor widthRafael Lima
Currently the formula editor uses a fixed width that corresponds to about half the size of the display. This patch makes the formula editor auto adjust. Change-Id: I0cd6a6385b698fced96132a636df2d24c6c62cf1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110852 Tested-by: Jenkins Reviewed-by: Dante DM <dante19031999@gmail.com> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
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-12-01tdf#42949 Fix new IWYU warnings in directories s*Gabor Kelemen
Except recently checked sc, sd, svx, sw Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ice1b86628e4f22a39f307b9c5fa567b6ab9d5acb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106917 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-01use officecfg for Experimental flagNoel Grandin
move IsShowOutlineContentVisibilityButton out of header to avoid having to add extra include paths to all the unit test makefiles. Change-Id: I2763390e07cd85b8f09b6f2ad7702039daecb22f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105100 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28tdf#137620 add explicit SurroundingText support to starmath Edit WindowCaolán McNamara
Change-Id: Ie716dd66754dd774ee81fa97ebee8dc314002f12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104898 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-22long->tools::Long in slideshow..starmathNoel
Change-Id: I18f5b7c5da513d386f8ac848835b0410ebc7d95b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104629 Reviewed-by: Dante DM <dante19031999@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-11rename vcl::Window::Update to PaintImmediatelyNoel Grandin
To make the code easier to read. Change-Id: Iebc648150391939fba5d1cd815c72dbcf02ceec6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90378 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-16use fwd declsCaolán McNamara
Change-Id: I06a4049d84d3ef755b713c045f686361782bdfc1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88807 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2019-06-03SM add a border to the editor and the element listJan-Marek Glogowski
Change-Id: I708476919ce7750df6a691d75fe594c3f44d9126 Reviewed-on: https://gerrit.libreoffice.org/73173 Tested-by: Jenkins Reviewed-by: Heiko Tietze <tietze.heiko@gmail.com> Tested-by: Heiko Tietze <tietze.heiko@gmail.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
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-04-15tdf#42949 Fix IWYU warnings in include/editeng/[a-e]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I81917d697adf79b1bd0de4cc262d3cd6bc8eb36f Reviewed-on: https://gerrit.libreoffice.org/70710 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
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-08tdf#42949 Fix IWYU warnings in starmath/*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I18dc216a59a5770456b20162c881c8726e2f44b2 Reviewed-on: https://gerrit.libreoffice.org/68788 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-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-08-10unnecessary null check before dynamic_cast, in variousNoel Grandin
Change-Id: I76ad0b3152030c29ee28f6a6cc80d0832188d02b Reviewed-on: https://gerrit.libreoffice.org/58774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-26loplugin:oncevar extend to tools/gen.hxx typesNoel Grandin
Change-Id: I5c75875da44334569c02e2ff039b33c38397a0a2 Reviewed-on: https://gerrit.libreoffice.org/50283 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-02-20loplugin:changetoolsgen in starmathNoel Grandin
Change-Id: Iafa99639e1fe2bc45ece2b3ef0744816446f3faf Reviewed-on: https://gerrit.libreoffice.org/49959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-01-11convert (a>b?a:b) to std::max(a,b)Noel Grandin
with something like: git grep -nP '(.*)\s*>\s*(.*)\s*\?\s*\g1\s*:\s*\g2' Change-Id: I60b9a3a2a09162bc0de4c13fdde2c209696e5413 Reviewed-on: https://gerrit.libreoffice.org/47602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-26vcl: make MapMode constructor explicitMichael Stahl
Insert constructor everywhere, except a couple places that apparently want to compare GetMapUnit(). Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-23loplugin:includeform: starmathStephan Bergmann
Change-Id: Ic5d81bdeb98024f41f9dfca260eca0359b27b809
2017-10-07Fix leak in smEditWindow (starmath)Julien Nabet
Change-Id: I7eb2af795d4b7d3619fe78ae16ea5796e5943f2c Reviewed-on: https://gerrit.libreoffice.org/43221 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-29convert IsEqual/etc methods on ESelection to operatorsNoel Grandin
Change-Id: Ia8424e701b6f22d0536ee7f3bdb0ecaaed94a3b9 Reviewed-on: https://gerrit.libreoffice.org/42904 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04loplugin:unnecessaryparen include c++ castsNoel Grandin
Change-Id: I132d3c66f0562e2c37a02eaf4c168d06c2b473eb Reviewed-on: https://gerrit.libreoffice.org/41874 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-03starmath: cleanup includes with iwyuJochen Nitschke
Change-Id: I6de145f8b59d3ebcbc0cb32df3f955c9ee738eeb Reviewed-on: https://gerrit.libreoffice.org/40666 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-21migrate to boost::gettextCaolán McNamara
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl * all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string") * ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching MODULE .mo files * UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui goes from l10n target to normal one, so the res/lang.zips of UI files go away * translation via Translation::get(hrc-define-key, imbued-std::locale) * python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there to keep finding the .hrc file uniform) so magic numbers can go away there * java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation mechanism * en-US res files go away, their strings are now the .hrc keys in the source code * remaining .res files are replaced by .mo files * in .res/.ui-lang-zip files, the old scheme missing translations of strings results in inserting the english original so something can be found, now the standard fallback of using the english original from the source key is used, so partial translations shrink dramatically in size * extract .hrc strings with hrcex which backs onto xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap * extract .ui strings with uiex which backs onto xgettext --add-comments --no-wrap * qtz for gettext translations is generated at runtime as ascii-ified crc32 of content + "|" + msgid * [API CHANGE] remove deprecated binary .res resouce loader related uno apis com::sun::star::resource::OfficeResourceLoader com::sun::star::resource::XResourceBundleLoader com::sun::star::resource::XResourceBundle when translating strings via uno apis com.sun.star.resource.StringResourceWithLocation can continue to be used Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-05-18Revert "Fix typos"Stephan Bergmann
This reverts commit 26a67002fcb9381b54de6cae1aaa37120d49066a. "Iff" is not a typo, see 2a65bf32ec270484dcea4d22d3c93552dc0c24dd "Revert 'Typo: iff->if'".
2017-05-18Fix typosAndrea Gelmini
Only replaced "iff" with "if" Change-Id: Ib9dfa5c12b05500043147fe3b65f923b1b12a581 Reviewed-on: https://gerrit.libreoffice.org/37782 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Eike Rathke <erack@redhat.com>
2017-05-08tdf#106479 Make edit context menu dispatcher basedMaxim Monastirsky
This allows us to add there any .uno command and also get the icon and keyboard shortcut for it. Use this to add clipboard commands. Change-Id: Ic42c28add7771f322491e8e7d6df052e3c2c8d75 Reviewed-on: https://gerrit.libreoffice.org/37353 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2017-05-04loplugin:checkunusedparams in starmathNoel Grandin
Change-Id: I1a2299f66e077879863ac0e694e42196c9432458 Reviewed-on: https://gerrit.libreoffice.org/37192 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-02untranslated strings are just stringsCaolán McNamara
removes starmaths InsertCommand in favour of InsertCommandText Change-Id: I5659adcaa28e5b5861d1a1cc5d2afa84009490f6 Reviewed-on: https://gerrit.libreoffice.org/37113 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-18convert starmath context menu to .uiCaolán McNamara
Change-Id: I0ab984aac0103a0d2bbb3c7a7c0bbd797eba7454
2017-03-31tdf#82580 tools: rename Rectangle to tools::RectangleMiklos Vajna
Mostly generated using make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle" Except some modules have their own foo::tools namespace, so there have to use ::tools::Rectangle. This commit just moves the class from the global namespace, it does not update pre/postwin.h yet. Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2 Reviewed-on: https://gerrit.libreoffice.org/35923 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2017-03-19fix grammar/typo: defunctional --> nonfunctionaldennisroczek
Change-Id: I672ac5d22c79e63cafc6f9f9f31f69e82dedf342 Reviewed-on: https://gerrit.libreoffice.org/35405 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-01move SvtLinguOptions into SmDocShellCaolán McNamara
Change-Id: I46b84ab4cb9cc5d25b6cb60241fcc8a65e449886
2017-03-01unroll SmEditWindow::GetEditEngineItemPoolCaolán McNamara
Change-Id: Iaf7a7c65109864f429ab5cc6848a12a37421afa1
2017-02-21tdf#106116 "Previous Marker" changes selection only when neededTakeshi Abe
This fixes a hang caused by repeated Shift+F4. Although it seems a regression from 2af1f5691e8d64afd5246d245d7876b5a2cd5cd8, the original code of SmEditWindow::SelPrevMark() had been doomed due to conditional loop depending on obscure signed/unsigned conversion. Change-Id: I61f630eec44b285dc1f1c27097acde4b48ed2991 Reviewed-on: https://gerrit.libreoffice.org/34503 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-01-23Change all Idle* LINKs to be Timer*Jan-Marek Glogowski
Seem UBSAN doesn't like my forced reinterpret_cast to set the Idles Link in the Timer class. Now there are two possible solution: 1. convert all (DECL|IMPL).*_LINK call sites to use a Timer* or 2. split the inheritance of Idle from Timer again to maintain different Link<>s and move all common code into a TimerBase. While the 1st is more correct, the 2nd has a better indicator for Idles. This implements the first solution. And while at it, this also converts all call sites of SetTimeoutHdl and SetIdleHdl to SetInvokeHandler and gets rid of some local Link objects, which are just passed to the SetInvokeHandler call. It also introduces ClearInvokeHandler() and replaces the respective call sites of SetInvokeHandler( Link<Timer *, void>() ). Change-Id: I40c4167b1493997b7f136add4dad2f4ff5504b69
2017-01-17Refactor Scheduler to add Task classJan-Marek Glogowski
Moves all the "task-specific" stuff into a Task class and just keeps the "real" static Scheduler functions in the original Scheduler class. Change-Id: I9eb02d46e2bcf1abb06af5bab1fa0ee734d1984c
2016-10-24tdf#103452: add missing xPopupMenu.disposeAndClear();Julien Nabet
See https://bugs.documentfoundation.org/attachment.cgi?id=128226 Change-Id: If6641531b96f33b2864f69bd4195c92548fce148 Reviewed-on: https://gerrit.libreoffice.org/30234 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-10-05convert MapUnit to scoped enumNoel Grandin
I left a prefix on the names "Map" so that I would not have to re-arrange each name too much, since I can't start identifiers with digits like "100thMM" And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore. Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224 Reviewed-on: https://gerrit.libreoffice.org/29096 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05Remove _TYPED suffix from tools/link.hxx macrosStephan Bergmann
...which was introduced with 3ead3ad52f9bb2f9d1d6cf8dfc73a0a25e6778ed "Gradually typed Link" to distinguish the new, typed versions from the old, untyped ones, but is no longer necessary since 382eb1a23c390154619c385414bdbe6f6e461173 "remove untyped Link<>" removed the old versions. Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-08-02Resolves: tdf#99324 let sidebar toggle auto-mnemonics on/off with altCaolán McNamara
this returns things to passing the alt to the thing with the focus and depends on ::Command handlers passing the alt-press/release back up through the Command hierarchy to get to the default top-level handler eventually Change-Id: I869120f43810adfa2fac4670c2db143b790a1f9b
2016-08-01loplugin:countusersofdefaultparams in shell..starmathNoel Grandin
Change-Id: I553d1b031b8d261a1caa8b77a8d687af21a6f8d6 Reviewed-on: https://gerrit.libreoffice.org/27672 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-25new loplugin overrideparamNoel Grandin
verify that parameters on override methods have the same set of default values for their params as their parent/super-methods do. Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2 Reviewed-on: https://gerrit.libreoffice.org/27437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>