summaryrefslogtreecommitdiff
path: root/starmath/source
AgeCommit message (Collapse)Author
2016-02-26starmath: Remove forgotten SmFormat's versionTakeshi Abe
Its last usage was gone with 26bdb10a52f441b4026d651ec50189b88391319e. Change-Id: I3a58a5596eaa930e9d7034b87fe05cbe8a902c41 Reviewed-on: https://gerrit.libreoffice.org/22690 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-02-19starmath: Avoid C-style castTakeshi Abe
Change-Id: I96efea344dc4ec5c1f20060bb51ea5e853113c9c Reviewed-on: https://gerrit.libreoffice.org/22497 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-18move from boost::signal to typed LinkCaolán McNamara
it doesn't really gain us much to have a handful of boost::signal use in a sea of Links This also fixes a regression in commit 051b29e1025253f35f87a04e297760aa8b40611f Author: Luboš Luňák <l.lunak@collabora.com> Date: Sun Sep 14 15:45:02 2014 +0200 convert Edit autocomplete Hdl to boost signals2 where the conversion was... - if ( maAutocompleteHdl.IsSet() ) + if ( autocompleteSignal.empty() ) instead of the correct + if ( !autocompleteSignal.empty() ) Change-Id: I27270d94c782485c0a7e929bc4980af4527fe82b
2016-02-18starmath: Avoid C-style castTakeshi Abe
Change-Id: Id54997718a61b1b5a488922f05374c559f1e4454 Reviewed-on: https://gerrit.libreoffice.org/22460 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-17starmath: Drop unused RID_COLORXTakeshi Abe
Change-Id: I99e66067deb314c48347e18ebb5942501de19d17 Reviewed-on: https://gerrit.libreoffice.org/22415 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-16starmath: Convert RectCopyMBL to scoped enumTakeshi Abe
Change-Id: I44e4f3086f642adccdff8dcf82298e5f4e9cb282 Reviewed-on: https://gerrit.libreoffice.org/22305 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-02-15starmath: Replace OSL_ENSURE with assertTakeshi Abe
These pointers must be non-null, or deferencing null can happen. Change-Id: I3ced1204abb70cf7c525ea9d50c6a3a295728ab5 Reviewed-on: https://gerrit.libreoffice.org/22365 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-10tdf#53472 Integral Symbols too small for some integrandsmelikeyurtoglu
Change-Id: I1ab550821f0b254a7414246fd72f3882b7140c90 Signed-off-by: melikeyurtoglu <aysemelikeyurtoglu@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/21482 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08starmath: Convert RectVerAlign to scoped enumTakeshi Abe
Change-Id: I6c9a7e1527cf2083f567397eb41db7ae3437c25e Reviewed-on: https://gerrit.libreoffice.org/22141 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-08starmath: Replace SAL_WARN_IF with assertTakeshi Abe
These assertions must hold, otherwise the following code would dereference null pointer. Change-Id: I2b3887aad7116a7ea5176630a015975b8fc087f9 Reviewed-on: https://gerrit.libreoffice.org/22140 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-02-04starmath: Convert RectHorAlign to scoped enumTakeshi Abe
Change-Id: Ia5b43083e9675ef2664e5147e80237a7d947e138 Reviewed-on: https://gerrit.libreoffice.org/21859 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-04vcl: take into account the font width is the average font widthChris Sherlock
I'm changing the Font class function names: - SetSize -> SetFontSize - GetSize -> GetFontSize - SetHeight -> SetFontHeight - GetHeight -> GetFontHeight - SetWidth -> SetAverageFontWidth - GetWidth -> GetAverageFontWidth That's because it really makes no sense to say that there is a single constant font width because obviously proportional fonts don't have one - the best we can do is an average font width, which is what folks like Microsoft sort of do already. On a fixed font, the average is still accurate, for obvious reasons :-) I'm also not a fan of GetSize/SetSize as I find it a might too generic. Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70 Reviewed-on: https://gerrit.libreoffice.org/22069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-03starmath: Avoid C-style castTakeshi Abe
Change-Id: I1599c7d62f9b5ff43eecf9f11bbb173c4faeeb15 Reviewed-on: https://gerrit.libreoffice.org/22067 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-02-03starmath: tdf#97190: don't assert on missing base URLMichael Stahl
There are valid scenarios where we don't have a URL at all, such as when importing MathML from the clipboard. Also there probably isn't much of a problem caused by missing base URLs in Math anyway since RDF import is currently not implemented and i'm not sure if hyperlinks in Math documents are possible at all. Change-Id: I13b70ac62542364f329875e292c574883255af5e
2016-02-02starmath: Avoid C-style castTakeshi Abe
Change-Id: Ie8ae44e1b90796033847a892474f4de64e7f9328 Reviewed-on: https://gerrit.libreoffice.org/21984 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-02-02Resolves: tdf#97495 fix SmElementsControl tooltipsCaolán McNamara
instead of setting a single tooltip for the whole panel area, wait for a tooltip request and specify the area to which it applies. Which is what other widgets that have different tooltip areas do, and maps much better to the gtk3 tooltip system which functions like that too. Change-Id: I56f452562c3c4d9dcec4109a8ee6168f34619472
2016-01-31sequence->vector in PrinterOptionsHelperNoel Grandin
Change-Id: I643519397a4e714e3407ec0c3a10d329654b9f7d Reviewed-on: https://gerrit.libreoffice.org/21887 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-29WaE: calling static member function through member call syntaxTor Lillqvist
Change-Id: I71c1ae0c5f34e17ab11cd6726d6845255224044d
2016-01-29vcl: add text alignment functions to ImplFont and FontAttributesChris Sherlock
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-28tdf#93837 starmath: Convert RID_VIEWMENU to xmlMaxim Monastirsky
Also fixes .uno:Adjust->.uno:ZoomOptimal forgotten by ffc2e5be1f712b09710e2096ad2f7eb81b80118d Change-Id: Ifa3d1144b2d85290d7d27de50f5ad430ae0cfc8d
2016-01-27starmath: Convert RectPos to scoped enumTakeshi Abe
Change-Id: I726ae06b1a9bef4feec77cbd9171b8b9353a0267 Reviewed-on: https://gerrit.libreoffice.org/21766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-27starmath.mathtype: change int -> bool for returned valuesDouglas Mencken
it looks like it always supposed to be bool Change-Id: Ie18dfdf9c91bb66828889d0370ceeb946cc9289d Reviewed-on: https://gerrit.libreoffice.org/21764 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-01-27starmath: Stop using unnecessary namespaceTakeshi Abe
Change-Id: I3848e61eac69a2b3cacc3cf1f66534f4508151cd Reviewed-on: https://gerrit.libreoffice.org/21837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2016-01-22starmath: Catch exception by const refTakeshi Abe
Change-Id: I8a4ef4041e02b5ce76f695be170f2b8e5d29a28f Reviewed-on: https://gerrit.libreoffice.org/21700 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-01-21starmath: fix OOXML export of non-BMP UnicodeMichael Stahl
Change-Id: Iafaeb9ea2e96ee6d8cc96174731ba3845c230b5e
2016-01-21vcl: rename Font::GetFamily to Font::GetFamilyTypeChris Sherlock
Change-Id: Ie427a43bd126dcdd89c6f66582736e67130f2254 Reviewed-on: https://gerrit.libreoffice.org/21633 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-18loplugin: unused return valuesNoel Grandin
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-18vcl: change Font::SetName() to Font::SetFamilyName()Chris Sherlock
Change-Id: I9b7bd1ec25955981ebcb9085579cbb9fbaa802d5 Reviewed-on: https://gerrit.libreoffice.org/21560 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-17vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock
Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f Reviewed-on: https://gerrit.libreoffice.org/21529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16revert vcl patch series that brok Mac and WindowsNorbert Thiebaud
revert: 9bc2f3de8672e812f3a67541c6d7069b434a7e42 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight() 26371f105bc44e04469ec03fc5bb12505e651c6b vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic() 2dd0b4317372b8022efe3911b38b4fa02956d8b9 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual 5ab13bf3ead3539e4ad847656da81e7eb6029652 vcl: tabify font.hxx f99550dae55e40e49bf9c9875053fe2abb4c71ca vcl: change Font::SetName() to Font::SetFamilyName() 2b297116cb6bb1061c43e5714e2609c8ee9f57d2 vcl: rename Font::GetName to Font::GetFamilyName Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16vcl: change Font::SetName() to Font::SetFamilyName()Chris Sherlock
Change-Id: I54a4036544c680c4a49607677af776aa7a433fbc Reviewed-on: https://gerrit.libreoffice.org/21510 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16vcl: rename Font::GetName to Font::GetFamilyNameChris Sherlock
Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5 Reviewed-on: https://gerrit.libreoffice.org/21509 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-15starmath: only use WordProcessingML elements in DOCX filesMichael Stahl
Change-Id: I1b0f6d67bd0db0796756fd920ab92303a7ee7d79
2016-01-14loplugin:unusedmethods unused return value in starmathNoel Grandin
Change-Id: Ic70c3d727ecadd082f7e5d293fc2b279b1287b8f
2016-01-13vcl: Create accessor and mutator for int and ext leading in FontMetricChris Sherlock
Accessor and mutator created for external and internal leading space in FontMetric. See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor and mutator for font scaling in FontMetric") for reasoning behind patch. Unit tests - check to ensure that can set external and leading space - check equality operator on FontMetric after setting both external and internal leading space - enhanced tests to also check the inequality operator Change-Id: I973970dd0b0631c5eca3e89039dce57ac3a3eb63 Reviewed-on: https://gerrit.libreoffice.org/21454 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-10Fix typosAndrea Gelmini
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10Cleanup FontCharMapPtr variable prefixesChris Sherlock
Change-Id: Ib106b91ab71ee45d5ad469d0beaf4ebaef8b57e1 Reviewed-on: https://gerrit.libreoffice.org/21306 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-07starmath: Remove unused resource itemsTakeshi Abe
Change-Id: Ia64d33a6a755f6a0c1418c7230f4734a06febed4 Reviewed-on: https://gerrit.libreoffice.org/21187 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2016-01-06starmath: Remove toolbox.hrcTakeshi Abe
Usage of NUM_TBX_CATEGORIES was gone at 3dfe2fc394ca1e168e800ffcc3ac0f69b4eeb173. Change-Id: Ic0fea85ad143de02102e3745f310966a8b94192e Reviewed-on: https://gerrit.libreoffice.org/21153 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-01-06starmath: Fix bogus warningTakeshi Abe
RID_PRINTUIOPTIONS has 9 items. Change-Id: Ie7aee00e0219151b1573217ca670a93925de67cc Reviewed-on: https://gerrit.libreoffice.org/21154 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-01-05Make SotFactory private to sot/ and clean a bitMatúš Kukan
Change-Id: Ia683280a3e95eee995e036db6bde5d28852f92ff
2016-01-05tdf#94205: Use o3tl::make_unique insted of new+std::move.Sheikha AL-Hinai
Change-Id: I9ff14760479d2ac882546e2e5b74ab750ba2fa4b Reviewed-on: https://gerrit.libreoffice.org/20984 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-04vcl: split classes out of metric.hxxChris Sherlock
Change-Id: Id3b155abec7b7a2ff43d0a35e98709f5ee51c6b9 Reviewed-on: https://gerrit.libreoffice.org/21069 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-04Cleanup after removing vcl::FontInfo classChris Sherlock
Change-Id: I544eac439cb7277e47a23a90c6fbc45496161c3b
2016-01-03vcl: Excise vcl::FontInfo classChris Sherlock
This may sound crazy, but literally vcl::FontInfo serves no purpose that I can see. The inheritance chain is like this: ┌────────────────────────┐ │ │ │ vcl::Font │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ vcl::FontInfo │ │ │ └────────────────────────┘ ^ ╱ ╲ │ │ ┌────────────────────────┐ │ │ │ FontMetric │ │ │ └────────────────────────┘ vcl::FontInfo (which, incidentally, needs to be put into the vcl namespace due to collisions with poppler!) literally does nothing and is acting as a bridge between FontMetric and vcl::Font. Unlike a bridge though, this bridge doesn't actually *do* anything. So I'm removing it, which means one less class to deal with in the vcl fonts world. Change-Id: I32725669c9bca7fbb0846b6a062135464046e4f6 Reviewed-on: https://gerrit.libreoffice.org/21058 Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-31starmath: Manage SmDocShell's pCursor via std::unique_ptrTakeshi Abe
Change-Id: Id9c67638e5c2e535cc06e9566c9a169471f55da8 Reviewed-on: https://gerrit.libreoffice.org/20856 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-24Fix tdf#32062: Math overwrites selected area when click on elementMarcos Paulo de Souza
Change-Id: I42ce83d1647d054419dbf664dfbfb2bc1cd01338 Reviewed-on: https://gerrit.libreoffice.org/20729 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2015-12-23starmath: Avoid warning C4819Takeshi Abe
Change-Id: I051b2058e7c7f0424faf49f027330b1bbc93c2d9 Reviewed-on: https://gerrit.libreoffice.org/20869 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2015-12-23starmath: Manage SmEditAccessible's pTextHelper via std::unique_ptrTakeshi Abe
Change-Id: Iefd4314823efec28a8497b5a993fdd01ed12811e Reviewed-on: https://gerrit.libreoffice.org/20849 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Kohei Yoshida <libreoffice@kohei.us>