summaryrefslogtreecommitdiff
path: root/xmlscript
AgeCommit message (Collapse)AuthorFilesLines
2018-05-25Improve re-throwing of UNO exceptionsNoel Grandin1-2/+4
(*) if we are already throwing a Wrapped*Exception, get the exception using cppu::getCaughtexception. (*) when catching and then immediately throwing UNO exceptions, use cppu::getCaughtException to prevent exception slicing (*) if we are going to catch an exception and then immediately throw a RuntimeException, rather throw a WrappedTargetRuntimeException and preserve the original exception information. Change-Id: Ia7a501a50ae0e6f4d05186333c8517fdcb17d558 Reviewed-on: https://gerrit.libreoffice.org/54692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-26[API CHANGE] deprecate XGraphicObjectResolverTomaž Vajngerl4-11/+4
XGraphicObjectResolver was used to get the GraphicObject URL from an storage (package) URL. This isn't possible anymore in LO 6.1 since creating GraphicObject from uniqueID was removed for its lifecycle issues. XGraphicObjectResolver is now deprecated and when the "resolveGraphicObjectURL" is called, it throws a RuntimeExeption. In places where XGraphicObjectResolver was used, we now use the XGraphicStorageHandler as the alternative. Both share a common implementation so previously we could cast one to the other at any time. Now only XGraphicStorageHandler is used. GraphicObjectResolver was removed and replaced by the alternative GraphicStorageHandler for instance creation - where needed. Change-Id: I5d3f759c6f95b7dbe2d93688d99c8aa4899ffa84 Reviewed-on: https://gerrit.libreoffice.org/53279 Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2018-04-11new loplugin:unusedvariablemoreNoel Grandin1-2/+0
collection of heuristics to look for local variables that are never read from i.e. do not contribute to the surrounding logic This is an expensive plugin, since it walks up the parent tree, so it is off by default. Change-Id: Ib8ba292241bd16adf299e8bba4502cb473513a06 Reviewed-on: https://gerrit.libreoffice.org/52450 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-06fflush() followed by fclose() is redundantTakeshi Abe1-1/+0
Change-Id: Iacb9332635cb6afa90ec1a72e96388b3b5b7b56c Reviewed-on: https://gerrit.libreoffice.org/52420 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-05Fix invalid syntaxMike Kaganski1-1/+1
Change-Id: I1b74214f3251ecba7c6e4f7336736b9a6732a12b Reviewed-on: https://gerrit.libreoffice.org/52446 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2018-04-03pass area param to DBG_UNHANDLED_EXCEPTIONNoel Grandin2-2/+2
and update sallogareas plugin to enforce this Change-Id: Id0782c8a1f619372e10d931aec3c6a4743a4c86a Reviewed-on: https://gerrit.libreoffice.org/52249 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-04-01remove unused processfactory.hxx includesJochen Nitschke3-3/+0
and fix fallout Change-Id: Id06bf31f2075111e426ba40c84c885ae70697bee Reviewed-on: https://gerrit.libreoffice.org/52206 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2018-03-15xmlscript: change import/export to not use GraphicObject URLTomaž Vajngerl7-40/+52
Change-Id: Ic81bf1a5ce45394e098366d0f4af53845ba0da87 Reviewed-on: https://gerrit.libreoffice.org/51307 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2018-01-15More loplugin:cstylecast: xmlscriptStephan Bergmann2-2/+2
Change-Id: I0dcb16ad325665ac435c2434648ea087ecb5c79f
2018-01-12More loplugin:cstylecast: xmlscriptStephan Bergmann6-11/+11
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: If9a6160a75ae56f563a098a5569af64eb8fab7d7
2017-12-23loplugin:passstuffbyref improved returnsNoel Grandin1-1/+1
improve the detection of stuff we can return by const &, instead of by copying Change-Id: I479ae89d0413125a8295cc3cddbc0017ed61ed69 Reviewed-on: https://gerrit.libreoffice.org/46915 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-11loplugin:salcall fix functionsNoel Grandin14-24/+24
since cdecl is the default calling convention on Windows for such functions, the annotation is redundant. Change-Id: I1a85fa27e5ac65ce0e04a19bde74c90800ffaa2d Reviewed-on: https://gerrit.libreoffice.org/46164 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Fix typosAndrea Gelmini1-1/+1
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-10-30loplugin:constmethod in idl,helpcompilerNoel Grandin2-5/+5
Change-Id: I9b328fc0a3ebdd15a646ee6dab800ffbadb1aaef Reviewed-on: https://gerrit.libreoffice.org/44050 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23loplugin:includeform: xmlscriptStephan Bergmann8-9/+9
Change-Id: I21a0229d575d6486031994a088fde842756b8feb
2017-10-23overload std::hash for OUString and OStringNoel Grandin1-2/+2
no need to explicitly specify it anymore Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec Reviewed-on: https://gerrit.libreoffice.org/43567 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17loplugin:useuniqueptr in StyleBagNoel Grandin2-10/+7
Change-Id: I965b086338935aa91691b96a63c9bc95f8b7f7ca Reviewed-on: https://gerrit.libreoffice.org/43452 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin3-15/+15
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-10-03loplugin:finalclasses in xmloffNoel Grandin1-2/+0
Change-Id: I10ffefd29b858548472a459314c7d5632324bca2 Reviewed-on: https://gerrit.libreoffice.org/43069 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27loplugin:flatten in vcl..xmlsecurityNoel Grandin3-117/+85
Change-Id: I730fc0b3b6b7ac1803d75b5d9e007b15395888c6 Reviewed-on: https://gerrit.libreoffice.org/42826 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-22Fresh run of bin/update_pch.shMike Kaganski1-3/+6
Change-Id: I69d4157aaf6570cecd51ea59df20556914942e06 Reviewed-on: https://gerrit.libreoffice.org/42565 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22Put definition of _CRT_RAND_S into bin/update_pchMike Kaganski1-14/+13
so it doesn't get removed again from sal/inc/pch/precompiled_sal.hxx (see commit 4af9612f2be9e023e762831207cbdb1d5f25906f). Also make necessary changes to some of the files that start to fail building after running bin/update_pch.sh, so that the patch is self-contained and leaves the tree in fully functional state. tools namespace had to be prepended with :: to disambiguate from drawinglayer::tools vcl/inc/window.h includes were amended, because ExtTextInputAttr is from vcl/commandevent.hxx, and enum class ShowTrackFlags is from vcl/window.hxx Change-Id: I47179622350754cba2f95d26a1bafd3dfbbc935b Reviewed-on: https://gerrit.libreoffice.org/42559 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-17ofz: fix leak on exceptionCaolán McNamara1-10/+9
#0 0x600ca0 in operator new(unsigned long) /src/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc:82 #1 0x4802b4b in xmlscript::DocumentHandlerImpl::pushPrefix(rtl::OUString const&, rtl::OUString const&) /src/libreoffice/xmlscript/source/xml_helper/xml_impctx.cxx:259:32 #2 0x47ff026 in xmlscript::DocumentHandlerImpl::startElement(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> const&) /src/libreoffice/xmlscript/source/xml_helper/xml_impctx.cxx:480:17 #3 0x7665a34 in xmlscript::XMLBasicImporterBase::startElement(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> const&) /src/libreoffice/xmlscript/source/xmlflat_imexp/xmlbas_import.cxx:537:25 #4 0x4c2831f in XMLBasicImportContext::StartElement(com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> const&) /src/libreoffice/xmloff/source/script/xmlbasici.cxx:84:21 #5 0x489c29b in SvXMLImport::startElement(rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList> const&) /src/libreoffice/xmloff/source/core/xmlimp.cxx:728:15 #6 0x4892ab7 in SvXMLImportContext::startUnknownElement(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /src/libreoffice/xmloff/source/core/xmlictxt.cxx:124:14 #7 0x489ec2d in SvXMLImport::startUnknownElement(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /src/libreoffice/xmloff/source/core/xmlimp.cxx:889:15 #8 0x86871f3 in (anonymous namespace)::Entity::startElement((anonymous namespace)::Event*) /src/libreoffice/sax/source/fastparser/fastparser.cxx:445:27 #9 0x86823f1 in sax_fastparser::FastSaxParserImpl::consume((anonymous namespace)::EventList&) /src/libreoffice/sax/source/fastparser/fastparser.cxx:960:25 #10 0x86812f8 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /src/libreoffice/sax/source/fastparser/fastparser.cxx:784:26 #11 0x489842e in SvXMLImport::parseStream(com::sun::star::xml::sax::InputSource const&) /src/libreoffice/xmloff/source/core/xmlimp.cxx:464:15 #12 0x837fb5d in filter::odfflatxml::OdfFlatXml::importer(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XDocumentHandler> const&, com::sun::star::uno::Sequence<rtl::OUString> const&) /src/libreoffice/filter/source/odfflatxml/OdfFlatXml.cxx:149:26 Change-Id: Ic4ba40dca088a333a1271e005a05bd3c6e7d70ac Reviewed-on: https://gerrit.libreoffice.org/42375 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-15ofz: leak of prefixes in skipped elementsCaolán McNamara1-0/+5
Change-Id: I8e83eb605bdf5991988e147cf8478e44c858a2b0 Reviewed-on: https://gerrit.libreoffice.org/42320 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-14clang-tidy modernize-use-emplace in variousNoel Grandin1-1/+1
Change-Id: Id1bbd3f380c17beeaab11f7140d4df1304c3d0d8 Reviewed-on: https://gerrit.libreoffice.org/41750 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-10tdf#109177: Fix expected type of Orientation attrStephan Bergmann1-1/+1
Regression introduced with 7e781aa15ab8c6bb727ccf290db7768bc9ba6245 "Clean up uses of Any::getValue() in xmlscript" Change-Id: I66df1c5aacab1d697438c57418c9100f9dba627a
2017-07-28loplugin:constparams handle constructorsNoel Grandin1-2/+2
had to change the structure of the plugin considerably, was too messy to structure it to do the calculations on a per-function basis Change-Id: I4edee7735f726101105c607368124a08dba21086 Reviewed-on: https://gerrit.libreoffice.org/40516 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17extend loplugin useuniqueptr to OUString pointersNoel Grandin1-11/+3
Change-Id: Ieb5bab3895e1edaff497c4a1a88303ccac097edc Reviewed-on: https://gerrit.libreoffice.org/39948 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-14use more OUString::operator== in test..xmlsecurityNoel Grandin1-1/+1
Change-Id: If5bdd1532be44a47ff7cc3b769be3ea585aea562 Reviewed-on: https://gerrit.libreoffice.org/39685 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-03Fix typosAndrea Gelmini1-1/+1
Change-Id: Icf25b22857abd97e8b6a72d3d546fd1eed882049 Reviewed-on: https://gerrit.libreoffice.org/39385 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-07-02loplugin:casttovoid: xmlscriptStephan Bergmann2-3/+0
Change-Id: Iff674c2faed83e30316212336500865fabf59c30
2017-06-29loplugin:oncevar variousNoel Grandin1-2/+1
Change-Id: I8b82d46d4688b1a59d6fe1b05da7d5c8dfc13ca6 Reviewed-on: https://gerrit.libreoffice.org/38766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-27loplugin:useuniqueptr in variousNoel Grandin1-2/+1
extending it to find places we can use std::unique_ptr on arrays Change-Id: I9feb1d12d738d6931e752ecb6dd51cbc1540c81b Reviewed-on: https://gerrit.libreoffice.org/39255 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-23simplify some string handling in tracing callsNoel Grandin1-7/+5
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3 Reviewed-on: https://gerrit.libreoffice.org/39159 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-18remove unused osl/mutex.hxx includesJochen Nitschke1-1/+0
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb Reviewed-on: https://gerrit.libreoffice.org/38905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-16loplugin:unusedfields xmlhelp..xmlsecurityNoel Grandin2-7/+0
Change-Id: I7e680e1913c787ce0adad5be1f84668d57ad00b3 Reviewed-on: https://gerrit.libreoffice.org/38821 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-12clang-tidy readability-delete-null-pointerNoel Grandin1-16/+4
which in turn triggered some loplugin:useuniqueptr Change-Id: I0c38561fc9b68dac44e8cf58c8aa1f582196cc64 Reviewed-on: https://gerrit.libreoffice.org/38281 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-29remove some unnecessary OString constructor callsNoel Grandin1-1/+1
Change-Id: I11358f17770cacb2a33011797f4be82dc02340b7 Reviewed-on: https://gerrit.libreoffice.org/38130 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20cleanup unused css/script/ includesJochen Nitschke4-5/+0
but keep exception includes in headers for now Change-Id: I826828675a2d14b906e57068cbced2e790e12bce Reviewed-on: https://gerrit.libreoffice.org/37846 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-12remove unused uno::Reference varsNoel Grandin3-4/+2
found by temporarily marking Reference as SAL_WARN_UNUSED. Change-Id: I18809b62654467f890016adcc92576980ced393b Reviewed-on: https://gerrit.libreoffice.org/37511 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-09cleanup osl/diagnose.h includesJochen Nitschke1-1/+0
with command > git grep -l osl/diagnose.h *.cxx | xargs grep -L -w 'OSL_\w*' | xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d' headers need more work Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab Reviewed-on: https://gerrit.libreoffice.org/37350 Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-07revert OSL_ASSERT changesChris Sherlock5-11/+17
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert xmlscript from OSL_ASSERT to assertChris Sherlock5-17/+11
Change-Id: I8470851db8f70cbde96ca033ebd5aa515da84510
2017-04-21gbuild: Remove MSVC 2013 legacy codeDavid Ostrovsky1-1/+0
Uwinapi is discontinued. Change-Id: I063b4d0d8fab2d60de168e960a63b8181158ac01 Reviewed-on: https://gerrit.libreoffice.org/23198 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Tested-by: David Ostrovsky <david@ostrovsky.org>
2017-04-21remove unnecessary explicit linefeeds from end of SAL and OSL log callsNoel Grandin1-1/+1
Change-Id: I3fa363c8e76e6cfb297f4ec346e3f031c09d6fbf Reviewed-on: https://gerrit.libreoffice.org/36727 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-10tdf#107029 xmlscript: fix enum conversionMiklos Vajna1-1/+1
Regression from commit 0fe6f1a196b70f0ba4c948389b2ef9b1e77187b8 (use actual UNO enums in vcl..xmlsecurity, 2017-04-03), it's important when changing a sal_Int16 to an enum, then arguments of makeAny() calls of that variable are explicitly casted the previous type to keep compatibility. Change-Id: Ib55eeded34033ce536078919c6fad4d571951cd3 Reviewed-on: https://gerrit.libreoffice.org/36358 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-06Improved loplugin:redundantcast, static_cast on arithmetic types: xmlscriptStephan Bergmann1-1/+1
Change-Id: I511174aa27bd486e6c046761e481c494c58a67bc
2017-04-06loplugin:redundantcast check for c-style float castsNoel Grandin1-3/+3
Change-Id: I86b6f58887cb398a80698f8d8564b5bc3f55eabb Reviewed-on: https://gerrit.libreoffice.org/36198 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-04xmlscript: fix -Werror=maybe-uninitializedMiklos Vajna1-1/+1
Change-Id: Ifcde2202fcb2cfa1dd226697910c1fbd219a3f83
2017-04-03use actual UNO enums in vcl..xmlsecurityNoel Grandin2-2/+2
Change-Id: Id862544f27ebcbe8363f93dc83192d0f0cddb5cc Reviewed-on: https://gerrit.libreoffice.org/36041 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>