summaryrefslogtreecommitdiff
path: root/starmath/source/symbol.cxx
AgeCommit message (Collapse)AuthorFilesLines
2023-09-21starmath: No need for the OUString copy hereKhaled Hosny1-2/+1
Change-Id: I71e6fd6ff9f5420899ece59b97b81b5e837f919b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157142 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21starmath: Rename SmSym::GetName() -> GetUiName()Khaled Hosny1-9/+9
To make it obvious this is the UI (localized) name. Change-Id: Id0dbffeaa9c331ce90dee3e7fbc88f93fab1b654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157138 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-21tdf#62174: Fix saving of localized iGreek symbolsKhaled Hosny1-11/+24
When saving symbols we use the non-localized name, but iGreek symbols are a bit of a hack since they are added at runtime and don’t have localizations of there own but use the Greek symbols names with an “i” prefix. Instead of looking directly for localized names, we now go through the symbol manager that already knows about iGreek and use the export name of the symbol. We have to also make sure the iGreek symbols has non-localized export name. Change-Id: Ia3e38579abba56ae12ade126f564f8c6f9c3229a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157137 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-19starmath: Get the font from current format for special symbolsKhaled Hosny1-2/+6
We want to use the current format when using the symbol in a document, and fallback for stabdard format when rendering the symbol in symbols dialog. Fixup for the following two commits: commit f28b043b4eb40e90b330721fc43d19ae6c06951e Author: Khaled Hosny <khaled@libreoffice.org> Date: Mon Sep 18 19:00:02 2023 +0300 starmath: Fix editing symbols in the Symbols Catalogue commit 32d2e001bb056e7d98aa143b222f2721967337dc Author: Khaled Hosny <khaled@libreoffice.org> Date: Tue Sep 12 18:35:46 2023 +0300 tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols Change-Id: Id3730749a49015120ecf9719027f932fd90c605a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157043 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-09-18starmath: Fix editing symbols in the Symbols CatalogueKhaled Hosny1-0/+8
Fallout from: commit 32d2e001bb056e7d98aa143b222f2721967337dc Author: Khaled Hosny <khaled@libreoffice.org> Date: Tue Sep 12 18:35:46 2023 +0300 tdf#101174: Don’t hard-code OpenSymbol font for predefined special symbols Change-Id: I1f440dccc920b24010160dbeee58795ffd8f85ac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157025 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2023-08-14starmath: fix -Werror=unused-variableMiklos Vajna1-1/+2
Seen with gcc 7.5.0. Change-Id: I34940865f62ff397a3a6813fbabd0fb45a01d88f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155654 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-08-10tdf#32415: Always accept English symbol names in mathKhaled Hosny1-0/+11
If symbol name does not match localized names, try to find a match using English (export) names. Change-Id: Id668ee68b07c8431c2780b78e26e07d3aef043aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155553 Tested-by: Jenkins Reviewed-by: خالد حسني <khaled@libreoffice.org>
2022-05-11reserve vector space in SmSymbolManager::GetSymbolsNoel Grandin1-0/+1
Change-Id: I9101e07fa54e35f1cec9797deaf1647763c9ebfe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134158 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-05-03add o3tl::equalsAsciiNoel Grandin1-2/+2
Change-Id: I042b8dcadbf7581de325c161763fe35aecde5ca2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-08-18undo changes to TextAlignCaolán McNamara1-2/+2
revert commit 8689bd5490b473a7ffb149bbe5f7f0683f679c72 Author: Caolán McNamara <caolanm@redhat.com> Date: Thu Jul 29 20:49:29 2021 +0100 convert TextAlign to scoped enum lets leave this as it always was Change-Id: Id4d2a5644974cdd2b0ed6d361d5c52629674d057 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120626 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-07-30convert TextAlign to scoped enumCaolán McNamara1-2/+2
Change-Id: Id2c466eacb44f0ea6adba75a0ac0be8be8e7ed4c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119682 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-03-01Starmath cleanup unused includesdante1-2/+0
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-01-18Mathml gets it's own directorydante1-1/+1
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-11-24loplugin:stringviewparam extend to comparison operatorsNoel1-2/+2
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03loplugin:stringaddNoel Grandin1-4/+3
tweak the plugin to be more permissive, then validate by hand afterwards Change-Id: I40c5c911fe6ff7e45baaca372abf7dac211d9654 Reviewed-on: https://gerrit.libreoffice.org/81942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-01loplugin:stringadd n sfx2..svlNoel Grandin1-2/+1
Change-Id: Iaf1bbe37449d4e0cfa817909d56d4bffe1e5a184 Reviewed-on: https://gerrit.libreoffice.org/79893 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-24loplugin:returnconstval in sd..starmathNoel Grandin1-2/+2
Change-Id: Ib14f0ebef1c48a00ed09be70cb5885ccd07db762 Reviewed-on: https://gerrit.libreoffice.org/78060 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-10loplugin:indentation in soltools..svlNoel Grandin1-1/+1
Change-Id: I270a12cdb68920b8fa23b82dd933724e30334485 Reviewed-on: https://gerrit.libreoffice.org/67565 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-31loplugin:flatten in starmathNoel Grandin1-17/+17
Change-Id: Iaadd8af404e3eee5ebd49846a02a33735e9c18ba Reviewed-on: https://gerrit.libreoffice.org/67170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-03tdf#120703 PVS: V560 A part of conditional expression is always true/falseMike Kaganski1-1/+1
Change-Id: Ieff0dde4faee209200b8f4e809e8bb4eb1b8f4a6 Reviewed-on: https://gerrit.libreoffice.org/64433 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-11-29Simplify containers iterations in slideshow, sot, starmath, stocArkadiy Illarionov1-10/+7
Use range-based loop or replace with STL functions Change-Id: I94792c28b283a0998bf813317e5beb37d93e0c23 Reviewed-on: https://gerrit.libreoffice.org/64125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-19tdf#42949 Fix IWYU warnings in include/vcl/[ab]*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: If18c80fc64e55d797953e24e40e5d5e62bd9c625 Reviewed-on: https://gerrit.libreoffice.org/63453 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-10-29tdf#120703 PVS: V547 Expression is always true/falseMike Kaganski1-3/+1
Change-Id: I0516dc68cf7d451eafc044be8e50a66d2bddf15f Reviewed-on: https://gerrit.libreoffice.org/62484 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-07-31Add missing sal/log.hxx headersGabor Kelemen1-0/+1
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-01-11starmath: getLength() > 0 -> !isEmpty()Takeshi Abe1-5/+5
Change-Id: I72e56e8e8cad77084bf771df8d85cb7d85712437 Reviewed-on: https://gerrit.libreoffice.org/47640 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-10-23loplugin:includeform: starmathStephan Bergmann1-3/+3
Change-Id: Ic5d81bdeb98024f41f9dfca260eca0359b27b809
2017-08-03starmath: cleanup includes with iwyuJochen Nitschke1-4/+0
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 McNamara1-1/+1
* 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-07-03loplugin:unusedfields in slideshow..svtoolsNoel Grandin1-4/+1
Change-Id: I74d5a4b8cfc4b18267f99648a3112b163c91fd8c Reviewed-on: https://gerrit.libreoffice.org/39474 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-24remove unused SfxListener subclassingNoel Grandin1-6/+1
where the Notify method is doing nothing Change-Id: I834aa40a9bcb0dd8d7335a5688acc5da6f40b0a2
2016-06-22Drop unused #includeTakeshi Abe1-14/+0
Change-Id: Ic0cf4605cc7d02fdd537d05cbaa744c52126e6f1 Reviewed-on: https://gerrit.libreoffice.org/26545 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2016-05-11clang-tidy modernize-loop-convert in scripting to svtoolsNoel Grandin1-3/+3
Change-Id: I98229d14109cf243839d632feabde1391ea9bad5 Reviewed-on: https://gerrit.libreoffice.org/24847 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin1-1/+1
probably not much performance benefit, but it sure is good at identifying leftover intermediate variables from previous refactorings. Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657 Reviewed-on: https://gerrit.libreoffice.org/24026 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock1-2/+2
ImplFont and FontAttributes now have GetAlignment and SetAlignment, and I have renamed Font::GetAlign to Font::GetAlignment, and Font::SetAlign to Font::SetAlignment. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit test added to vcl/qa/cppunit/font.cxx to test text alignment. Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba Reviewed-on: https://gerrit.libreoffice.org/21876 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-27starmath: Stop using unnecessary namespaceTakeshi Abe1-1/+0
Change-Id: I3848e61eac69a2b3cacc3cf1f66534f4508151cd Reviewed-on: https://gerrit.libreoffice.org/21837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-1/+1
Change-Id: Ife1eef04d905f12308b64b971176c2f045a1b268
2015-11-06loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)Stephan Bergmann1-2/+2
Change-Id: Id5b78aa78fc585a67712fa44329479a86230d194
2015-06-24remove SFX_NOTIFY macroNoel Grandin1-2/+1
it has not served any purpose since we switched to using normal C++ RTTI for the SfxHint objects Change-Id: Ic81353bcb7863ce892eb75296248ca14d8fd6c86
2015-05-26loplugin:unnecessarysuperclass, merge SmMathConfig with SmConfigNoel Grandin1-1/+0
Change-Id: I2c431e9f72f5dee14cf1b603b11972a2e9d88725 Reviewed-on: https://gerrit.libreoffice.org/15902 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-05-05loplugin:staticmethodsNoel Grandin1-4/+2
Change-Id: I4d19f868a618cb135aa7a949222972dc35b47d2a
2014-10-29remove unnecessary 'using namespace rtl' declarationsNoel Grandin1-1/+0
It turns out that almost none of them were necessary. Change-Id: I1311ed28409c682b57ea8d149bcbaf2c49133e83 Reviewed-on: https://gerrit.libreoffice.org/12133 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-09-18fdo#82577: Handle FontNoel Grandin1-2/+2
Put the VCL Font class in the vcl namespace. Avoids clash with the X11 Font typedef. Change-Id: I1a84f7cad8b31697b9860a3418f7dff794ff6537
2013-09-09Math: OSL_FAIL -> SAL_WARNThomas Arnhold1-2/+2
And some cleanup. Change-Id: I2e5239a6f7d0dca5855b80752deae6be27c21af6
2012-10-28String -> OUStringIvan Timofeev1-2/+2
Change-Id: I2f0acb27f85a230109e827d415aabc029b90cd45
2012-10-12XubString->OUStringCaolán McNamara1-20/+20
Change-Id: Ib5f39e099d238b739e0d6b3d92d3f04ee50022fb
2012-07-09some UniString->rtl::OUStringCaolán McNamara1-3/+3
Change-Id: Ie69b30094da25df23a36baca2c7723d6a41f48c3
2012-07-06re-base on ALv2 code. Includes:Michael Meeks1-23/+14
mingwport35: i#117796: MinGW fix to VistaFilePickerImpl.cxx Patch contributed by Takashi Ono http://svn.apache.org/viewvc?view=revision&revision=1172092
2012-06-28ditch slightly suboptimal C2S defineCaolán McNamara1-2/+2
Change-Id: I51abdf8539801f6d93cdc1a21a7e0e1a3d5ef785
2012-06-09Remove superfluous empty lines on topThomas Arnhold1-2/+0
More than two lines are removed for readability. Change-Id: Ibff6cf68d7c512e240a54065b54a225bb23a782b
2012-03-12use string literal OUString overloadsLuboš Luňák1-2/+2