summaryrefslogtreecommitdiff
path: root/starmath/source/smdetect.cxx
AgeCommit message (Collapse)Author
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann
...so that its TOOLS_WARN_EXCEPTION can be used in comphelper/source/misc/logging.cxx in a follow-up commit. (And while at it, rename from diangose_ex.h to the more appropriate diagnose_ex.hxx. The comphelper module is sufficiently low-level for this immediate use case, so use that at least for now; o3tl might be even more suitable but doesn't have a Library until now. Also, for the immediate use case it would have sufficed to only break DbgGetCaughtException, exceptionToString, TOOLS_WARN_EXCEPTION, TOOLS_WARN_EXCEPTION_IF, and TOOLS_INFO_EXCEPTION out of include/tools/diagnose_ex.h into an additional new include/comphelper/diagnose_ex.hxx, but its probably easier overall to just move the complete include file as is.) Change-Id: I9f3222d4ccf1a9ac29d7eb9ba1530d53e2affaee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138451 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-11-08use more OUStringLiteral in MediaDescriptorNoel Grandin
Change-Id: I0567d103db8db401c737fed98483912a39352929 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124835 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>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): starmathStephan Bergmann
Change-Id: I12c7978be638fb875be1b183c70a8eb08bedf778 Reviewed-on: https://gerrit.libreoffice.org/76645 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-06-21simplify some getSupportedServiceNamesNoel Grandin
Change-Id: I81195505d6006b6587f7b98c1545919083f0e588 Reviewed-on: https://gerrit.libreoffice.org/74497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18loplugin:logexceptionnicely in starmath..svgioNoel Grandin
Change-Id: I356e574e28338f6fddc6932b4e41a461d851406d Reviewed-on: https://gerrit.libreoffice.org/74141 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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-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-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-20starmath: create SmFilterDetect instances with an uno constructorMiklos Vajna
Change-Id: I11ffe5153bc9ea263cde63093544584f01a344d2 Reviewed-on: https://gerrit.libreoffice.org/65464 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-09-13tdf#42949 Fix IWYU warnings in include/ucbhelper/*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6 Reviewed-on: https://gerrit.libreoffice.org/60232 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@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>
2017-12-14No need to keep these whitelisted functions decorated with SAL_CALLStephan Bergmann
The only effect SAL_CALL effectively has on LO-internal code is to change non- static member functions from __thiscall to __cdecl in MSVC (where all other functions are __cdecl by default, anyway). (For 3rd-party code, it could be argued that SAL_CALL is useful on function declarations in the URE stable interface other than non-static member functions, too, in case 3rd-party code uses a compiler switch to change the default calling convention to something other than __cdecl. But loplugin:salcall exempts the URE stable interface, anyway.) One could argue that SAL_CALL, even if today it effectively only affects non- static member functions in MSVC, could be extended in the future to affect more functions on more platforms. However, the current code would already not support that. For example, 3af500580b1c82eabd60335c9ebc458a3f68850c "loplugin:salcall fix functions" changed FrameControl_createInstance in UnoControls/source/base/registercontrols.cxx to no longer be SAL_CALL, even though its address (in ctl_component_getFacrory, in the same file) is passed to cppuhelper::createSingleFactory as an argument of type cppu::ComponentInstantiation, which is a pointer to SAL_CALL function. Change-Id: I3acbf7314a3d7868ed70e35bb5c47bc11a0b7ff6 Reviewed-on: https://gerrit.libreoffice.org/46436 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-09-17valgrind: Conditional jump or move depends on uninitialised valueCaolán McNamara
Conditional jump or move depends on uninitialised value(s) at 0x4C3535E: strstr (vg_replace_strmem.c:1623) by 0x4FCD9E59: SmFilterDetect::detect(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue>&) (smdetect.cxx:102) by 0x41A1A774: filter::config::TypeDetection::impl_askDetectService(rtl::OUString const&, utl::MediaDescriptor&) (typedetection.cxx:1038) Change-Id: I2f98fd3f7799f34cb5bd9242379ce6440645034d Reviewed-on: https://gerrit.libreoffice.org/42381 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
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-06-13starmath: SvStream::ReadBytes() returns std::size_t, not sal_uLongTakeshi Abe
Change-Id: I734e653343dcc563f1eb2312e5136fa5efe0f5fa Reviewed-on: https://gerrit.libreoffice.org/38701 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Takeshi Abe <tabe@fixedpoint.jp>
2017-01-26Remove dynamic exception specificationsStephan Bergmann
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html> "Dynamic Exception Specifications" for details. Most changes have been done automatically by the rewriting loplugin:dynexcspec (after enabling the rewriting mode, to be committed shortly). The way it only removes exception specs from declarations if it also sees a definition, it identified some dead declarations-w/o-definitions (that have been removed manually) and some cases where a definition appeared in multiple include files (which have also been cleaned up manually). There's also been cases of macro paramters (that were used to abstract over exception specs) that have become unused now (and been removed). Furthermore, some code needed to be cleaned up manually (avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no configurations available that would actually build that code. Missing @throws documentation has not been applied in such manual clean-up. Change-Id: I3408691256c9b0c12bc5332de976743626e13960 Reviewed-on: https://gerrit.libreoffice.org/33574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-10tdf#89307: Removed SvRef::operator T*()Jacek Fraczek
Conditional statements are using SvRef::Is() method. Changed static_cast<T*>(svRef<T>) occurances to svRef.get(). Added operator == and != to SvRef. SbxObject::Execute is using SbxVariableRef internally. SbxObject::FindQualified is using SbxVariableRef internally. Change-Id: I45b553e35d8fca9bf71163e6eefc60802a066395 Reviewed-on: https://gerrit.libreoffice.org/29621 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-06tools: rename SvStream::Read/Write to ReadBytes/WriteBytesMichael Stahl
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a Reviewed-on: https://gerrit.libreoffice.org/25972 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-05-07Unwind SotStorageRef typedefStephan Bergmann
Change-Id: I8d5363bb2ad813ef29b4078848914f4b0989b9f1
2015-03-22Mark as staticTakeshi Abe
Change-Id: I0047c723518caee631bb629da8127645bf4a1c5f
2015-03-13Simplify code constructing uno::Sequence<OUString> by initializer_listTakeshi Abe
Change-Id: I17ef35da6feda65534bbb7d3cc9346d679613618 Reviewed-on: https://gerrit.libreoffice.org/14837 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2014-06-19coverity#707196 Uncaught exceptionCaolán McNamara
Change-Id: I4f42040c7e12507365f12d09f80d3641b4d5ca02
2014-05-01Simplify type detectorsMaxim Monastirsky
Change-Id: Ic731c1c4c76d8d6779868d7e3e4c02cb3cadc844 Reviewed-on: https://gerrit.libreoffice.org/9222 Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com> Tested-by: Maxim Monastirsky <momonasmon@gmail.com>
2014-04-30starmath: sal_Bool->boolNoel Grandin
Change-Id: I09e833765294937a75feb5cdd92cce4aa8373c24
2014-03-29typo: opend -> openedThomas Arnhold
2014-03-14sfx2: sal_Bool->boolNoel Grandin
Change-Id: I56a50ee4a169c8f82c830ebf498f7ead1335f0b5
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2014-02-25WaE: declaration shadows a local variableTor Lillqvist
Change-Id: If7ecddb059fb0fae5de01666a8f088caf36bc32f
2014-02-25Don't write compound header to zero length filesMaxim Monastirsky
Change-Id: Ie964ca8b870714d1c3e92469a771fab9a71f0633 Reviewed-on: https://gerrit.libreoffice.org/8220 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2014-02-24implicitboolconversion: warn about implicit conversion of call args to boolStephan Bergmann
...to be able to find problems like 6e0bdf04add338b7d5b29fc7b3fc9f08cfd5e96f "sal_Bool arg of SetUseImagesInMenus was abused to squeeze '2' through it" earlier when converting occurrences of sal_Bool to bool. Restricting this check to function call arguments avoids too much noise while hopefully still catching all the relevant problems. (This check partially overlaps the pointertobool check, so implicit conversions from pointers to bool call arguments will now generate two loplugin warnings, but that's harmless.) Change-Id: I0b03b1d1615aaf8bc18e7a84c56fff3ef9903508
2014-01-28bool improvementsStephan Bergmann
Change-Id: I3f0749caeae8a772e6fb668eefc9d8784e7f22b5
2013-10-25fdo#54938: More uses of cppu::supportsServiceMarcos Paulo de Souza
Change-Id: I90a7a07a43559b8d7e1d4b886b2624255200d46b Reviewed-on: https://gerrit.libreoffice.org/6406 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2013-09-04String to OUStringThomas Arnhold
Change-Id: I8c51db8fce8c5eea1ac7bd5751aa7f3212ef1166 Reviewed-on: https://gerrit.libreoffice.org/5790 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2013-07-05Solve one more issue of fdo#59642Marcos Paulo de Souza
The old MathML XML style could begin just with <math. So this commit fixes that. This commits also fixes some documents that have the BOM marker at begin of file. Thanks a lot to Bjoern, Caolan and Eike! Change-Id: Ia2c3b51556e615c1e68e5e8aab4f883124c6adca Reviewed-on: https://gerrit.libreoffice.org/4742 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2013-07-03Bail early the same way as in 709f6ba6aFridrich Štrba
Change-Id: I8447d776ba315db5ef961818bc577d13e4f35a20
2013-06-17Fixes fdo#59642Marcos Paulo de Souza
By adding one more test about mathml xml. Change-Id: I1b49e9faea6742594eaa900a87a03c4dd86c0b5c Reviewed-on: https://gerrit.libreoffice.org/4314 Reviewed-by: Michael Meeks <michael.meeks@suse.com> Tested-by: Michael Meeks <michael.meeks@suse.com>
2013-04-01starmath: cleanup macrosThomas Arnhold
Change-Id: I08a7d6d39302b370a5c40645fbc3494e6a9af118
2013-02-04String to OUString.Kohei Yoshida
Change-Id: I3a0eff8ca0c8b654a38ee2df1022ca162bcb67aa
2012-08-14Be more careful in recognizing MathML (bnc#774921)Tor Lillqvist
Change-Id: I82c36a3ff49f74dc674df46dcf35f8c1a991c9e2
2012-07-06re-base on ALv2 code. Includes:Michael Meeks
mingwport35: i#117796: MinGW fix to VistaFilePickerImpl.cxx Patch contributed by Takashi Ono http://svn.apache.org/viewvc?view=revision&revision=1172092
2012-07-03ditch String::CreateFromAsciiCaolán McNamara
Change-Id: I2b482bd323ac510629c5ee31868010b7cd6ce691
2012-06-28ditch slightly suboptimal C2S defineCaolán McNamara
Change-Id: I51abdf8539801f6d93cdc1a21a7e0e1a3d5ef785
2012-05-24Removed unused SfxMedium::bDirectStephan Bergmann
See the TODO comment in sfx2/inc/sfx2/docfile.hxx about a temporary SfxMedium ctor overload to find not yet adapted uses of another overload, to be removed again in due time. Change-Id: Ie22c33c32f8870ce6ebf6d500abc7a4e33d97183
2012-03-20split macros to elide unneeded methodsCaolán McNamara
2012-03-12use string literal OUString overloadsLuboš Luňák
2012-02-26Avoid temporary rtl::OUStringJulien Nabet
2012-01-30remove '#define UNOOUSTRING ::rtl::OUString'Ivan Timofeev
2012-01-11Fix for fdo43460 Part XXXIV getLength() to isEmpty()Olivier Hallot
Part XXXIV Modules shell, slideshow, sot, starmath