summaryrefslogtreecommitdiff
path: root/filter/source/odfflatxml/OdfFlatXml.cxx
AgeCommit message (Collapse)AuthorFilesLines
2024-05-08loplugin:ostr in filterNoel Grandin1-3/+3
Change-Id: I9468cb2bf7b3614e5ee2e1ca6969282041699371 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167302 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
2024-04-08tdf#146619 Drop unused 'using namespace' in: filter/Gabor Kelemen1-2/+0
Change-Id: Id7801c4690b9f095f7f246e8b3a2072c24e6e58c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165544 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2023-06-01Revert "Convert XFastParser into a normal C++ interface"Noel Grandin1-13/+12
This reverts commit 5e68d6cfade45f40b1ad46025a81afe4cb8dd337. Reason for revert: Seems like outside users have been using this API Change-Id: I8814cf1eb4f000eeb4cbbb5db9c282d001465993 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152441 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-06-01Convert XFastParser into a normal C++ interfaceNoel Grandin1-12/+13
There is no need for it to be an UNO interface anymore (ever since we started supporting dynamic_cast on UNO objects). Which means that XImportFilter2 also needs become a C++ interface. Change-Id: Ice2db0f098271bba32b199bd083b08cb8410ce93 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152388 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-08-18Move tools/diagnose_ex.h to comphelper/diagnose_ex.hxxStephan Bergmann1-1/+1
...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-06-28loplugin:indentation improve checks for brace alignmentNoel Grandin1-23/+23
Change-Id: I333100fda7e181f68f36b03279b3fbb8cb768310 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117615 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-03-10Drop 'static_cast<cppu::OWeakObject*>' syntactic noiseMike Kaganski1-1/+1
... where the object is created in-place, and its type is known Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-11-12tdf#42949 Fix new IWYU warnings in directories [e-f]*Gabor Kelemen1-1/+0
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I963aa5fb892a0be36212fd0587b69f217f017947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105469 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-10-22XmlFilterAdaptor: use the fastparser API when possibleNoel1-6/+64
part of the process of making SvXMLImport fastparser-only Which uncovered several bugs because I end up stacking fast and slow parsers, not once, but twice. Specifically, we have a problem here with default namespaces e.g. <math xmlns="http://www.w3.org/1998/Math/MathML" display="block"> <semantics><mrow><mstyle mathsize="12pt"> where going from slow- to fast- parser loses this information, because there is no way to represent this in the fastparser world, so we end up with nastiness when we transition back to slow-parser, and then back-again to fast-parser. So I fixed a couple of places XMLEmbeddedObjectImportContext and in SvXMLLegacyToFastDocHandler, and then worked around some of it by introducing an new XImporter2 interface so I could strip out out one of the slowparser -> fastparser transitions. Change-Id: I491487b99271898da50dc999d3b9b9c39cbd97fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104514 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-02Use the new single-instance="true" attribute in filterStephan Bergmann1-4/+2
Change-Id: Id9a77324a30dec155e77616378690c47cb86536b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103853 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-25don't need prefix here anymoreNoel Grandin1-49/+7
Change-Id: Ie3b6681cb4ae8c1138766db7b19cc473367bfbd7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99422 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-31clang-tidy modernize-concat-nested-namespaceNoel Grandin1-3/+1
Change-Id: Iab35a8b85b3ba1df791c774f40b037f9420a071a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86708 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-19sal_Char->char in filterNoel Grandin1-1/+1
Change-Id: I0cec9d1f552e3350e2a2748861447a8f0afa64e8 Reviewed-on: https://gerrit.libreoffice.org/85474 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-17tdf#42949 Fix IWYU warnings in filter/Gabor Kelemen1-3/+0
Also drop inc/gfxtypes.hxx and source/svg/spirit_supplements.hxx which are unused since commit 3ca7be09834a26fbd1c371deabd7a58111092676 "Replace SVGFilter using SVGIO" Drop now unneeded pass-through header source/graphicfilter/icgm/main.hxx too. Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I8abaf294370c98256815a226168085dd01123f3e Reviewed-on: https://gerrit.libreoffice.org/84734 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann1-0/+4
...following up on 314f15bff08b76bf96acf99141776ef64d2f1355 "Extend loplugin:external to warn about enums". Cases where free functions were moved into an unnamed namespace along with a class, to not break ADL, are in: filter/source/svg/svgexport.cxx sc/source/filter/excel/xelink.cxx sc/source/filter/excel/xilink.cxx svx/source/sdr/contact/viewobjectcontactofunocontrol.cxx All other free functions mentioning moved classes appear to be harmless and not give rise to (silent, even) ADL breakage. (One remaining TODO in compilerplugins/clang/external.cxx is that derived classes are not covered by computeAffectedTypes, even though they could also be affected by ADL-breakage--- but don't seem to be in any acutal case across the code base.) For friend declarations using elaborate type specifiers, like class C1 {}; class C2 { friend class C1; }; * If C2 (but not C1) is moved into an unnamed namespace, the friend declaration must be changed to not use an elaborate type specifier (i.e., "friend C1;"; see C++17 [namespace.memdef]/3: "If the name in a friend declaration is neither qualified nor a template-id and the declaration is a function or an elaborated-type-specifier, the lookup to determine whether the entity has been previously declared shall not consider any scopes outside the innermost enclosing namespace.") * If C1 (but not C2) is moved into an unnamed namespace, the friend declaration must be changed too, see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71882> "elaborated-type-specifier friend not looked up in unnamed namespace". Apart from that, to keep changes simple and mostly mechanical (which should help avoid regressions), out-of-line definitions of class members have been left in the enclosing (named) namespace. But explicit specializations of class templates had to be moved into the unnamed namespace to appease <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92598> "explicit specialization of template from unnamed namespace using unqualified-id in enclosing namespace". Also, accompanying declarations (of e.g. typedefs or static variables) that could arguably be moved into the unnamed namespace too have been left alone. And in some cases, mention of affected types in blacklists in other loplugins needed to be adapted. And sc/qa/unit/mark_test.cxx uses a hack of including other .cxx, one of which is sc/source/core/data/segmenttree.cxx where e.g. ScFlatUInt16SegmentsImpl is not moved into an unnamed namespace (because it is declared in sc/inc/segmenttree.hxx), but its base ScFlatSegmentsImpl is. GCC warns about such combinations with enabled-by-default -Wsubobject-linkage, but "The compiler doesn’t give this warning for types defined in the main .C file, as those are unlikely to have multiple definitions." (<https://gcc.gnu.org/onlinedocs/gcc-9.2.0/gcc/Warning-Options.html>) The warned-about classes also don't have multiple definitions in the given test, so disable the warning when including the .cxx. Change-Id: Ib694094c0d8168be68f8fe90dfd0acbb66a3f1e4 Reviewed-on: https://gerrit.libreoffice.org/83239 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet1-4/+1
in embeddedobj and filter Change-Id: I2da3fa1df8782e449852358d1c86f5e4bc79ea1a Reviewed-on: https://gerrit.libreoffice.org/77627 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-16use more TOOLS_WARN_EXCEPTIONNoel Grandin1-2/+1
Change-Id: Ic21ea11ff106e0732bb8fa600ef39a549d7bda86 Reviewed-on: https://gerrit.libreoffice.org/77569 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): filterStephan Bergmann1-2/+2
Change-Id: I469205ac250bb78c626c8d237b6eea9445617f04 Reviewed-on: https://gerrit.libreoffice.org/76677 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-05-10an is used before a vowel soundCaolán McNamara1-1/+1
not before vowels with a consonant sound so its a url not an url Change-Id: Ic27ff3bee67469284d460c31ced6f63cb3633db2 Reviewed-on: https://gerrit.libreoffice.org/72062 Reviewed-by: Jens Carl <j.carl43@gmx.de> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-03-07log nice exception messages whereever possibleNoel Grandin1-2/+4
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11new loplugin writeonlyvarsNoel Grandin1-3/+0
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-10tdf#42949 Fix IWYU warnings in include/cppuhelper/*Gabor Kelemen1-0/+1
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ib420e9216b8313f5ed7634ec375e39ceb741fd45 Reviewed-on: https://gerrit.libreoffice.org/59297 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-07-30Add 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 filter to jvmfwk Change-Id: I2a73d63f2aaef5f26d7d08957daaa8a30b412ac5 Reviewed-on: https://gerrit.libreoffice.org/58204 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-02-28ofz#6571 catch exceptionCaolán McNamara1-0/+5
Change-Id: Ibbc5e7cc24d2125af8d757c8f59121d82ac8ce59 Reviewed-on: https://gerrit.libreoffice.org/50508 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-12-11loplugin:salcall fix functionsNoel Grandin1-1/+1
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-12-04new loplugin salcall: remove unnecessary SAL_CALLNoel Grandin1-1/+1
In this first commit, I use the plugin to verify the consistency of our SAL_CALL annotations. The point being to make the next commit more mechanical in nature, purely using the rewriter. There are various chunks of unix-only code that have never had to be compiled by MSVC, hence the inconsistencies. In bridges, I had to inline some typedefs to make the verification code happy, since it cannot see into typedefs. Change-Id: Iec6e274bed857febf7295cfcf5e9f21fe4a34da0 Reviewed-on: https://gerrit.libreoffice.org/45502 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-04add << operator for css::uno::ExceptionNoel Grandin1-3/+1
Change-Id: Ia23dafd07133779144965682df3b7125a3214235 Reviewed-on: https://gerrit.libreoffice.org/43046 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins <ci@libreoffice.org>
2017-05-07revert OSL_ASSERT changesChris Sherlock1-3/+3
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07tdf#43157: convert filter module away from OSL_ASSERT to assertChris Sherlock1-3/+3
Change-Id: Ib8abde011f2cf58c0e2fefbf68823bb0016265ff
2017-01-26Remove dynamic exception specificationsStephan Bergmann1-13/+5
...(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>
2017-01-25ScXMLTableRowCellContext implements fast interfaces:Mohammed Abdul Azeem1-1/+7
Implementation of fast interfaces for contexts in path from ScXMLImport::CreateFastContext to ScXMLTableRowCellContext. FastParser is enabled and duplicates are avoided at all possible places. OOoXML filters still need those legacy paths we removed, so I had to temporarily map them to fast elements, which would increase their load time, but hopefully it should help us in the long run. Change-Id: Ie997a9a8b72787da2356abc99ea2cd57c2e5b670 Reviewed-on: https://gerrit.libreoffice.org/28648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-04-20loplugin:salbool: Automatic rewrite of sal_False/TrueStephan Bergmann1-6/+6
Change-Id: I887a9161107e58c9343d240c2b54e02f4e59567f
2016-04-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke1-2/+0
Sequence.h(xx), Any.h(xx) and Type.h(xx) and remove unused using-declarations from these files. Add a few missing includes provided by them. Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4 Reviewed-on: https://gerrit.libreoffice.org/23805 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-08fix indentationMarkus Mohrhard1-12/+12
Change-Id: Ie79848c6649cfef6d32f0b2ca1e98ca0b00f716a
2015-12-25tdf#96713 OdfFlatXml: Seek to 0 before readingMaxim Monastirsky1-0/+4
Similar to tdf#45418. The problem is that sfx2 DocumentInserter code calls SfxMedium::IsStorage, which reads the stream but doesn't correctly seek back to 0. Actually SfxMedium_Impl has 2 members for the input stream, one of SvStream type and another one as Reference<XInputStream>. Turns out that reading with SvStream::Read changes the position in the object referenced by Reference<XInputStream>, but SvStream::Seek doesn't, so Seek(0) doesn't do the desired effect. My current solution is to ensure that we're reading from 0 inside the filter. I think it's a good thing to do anyway, and should be sufficient, given that other filters doesn't seem to be affected by this bug. Change-Id: I49b41077032d3e395c675e4f7824cc778c075473
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann1-2/+2
Change-Id: I61e494952df8cc40fff3ccad0936adf06035dbeb
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann1-5/+5
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-05cppcheck: noExplicitConstructorCaolán McNamara1-1/+1
Change-Id: I80950aaf1385bd76b012eab7866fd16848751f45
2015-10-01com::sun::star->css in filter/Noel Grandin1-3/+3
Change-Id: I3a5e6a349c903259698118542b0000b0f119859e
2015-06-08loplugin:cstylecast: deal with remaining pointer castsStephan Bergmann1-1/+1
Change-Id: I2976a8e6a3c9abf70e153a71bf0374d24d92968d
2015-03-31Reduce to static_cast any reinterpret_cast from void pointersStephan Bergmann1-1/+1
Change-Id: I1d8fc57cb95e12e2a3946fc1927427ab0efbf0db
2015-03-17Fix various XServiceInfo implementationsStephan Bergmann1-4/+21
...to match what is recorded in the .component files Change-Id: Ie548cd37872d3b8540222201afaac73040e65c8f
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl1-0/+1
Sadly cannot forward declare "struct {...} TimeValue;". rtl/(u)?string.hxx still include sal/log.hxx but removing osl/diagnose.h was painful enough for now... Change-Id: Id41e17f3870c4f24c53ce7b11f2c40a3d14d1f05
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-08-08[API CHANGE] Removed two cppuhelper deprecated headers.Matthew Pottage1-1/+0
The headers cppuheader/compbase.hxx and implbase.hxx. They have been deprecated since 2001. Moved the definitions of the deprecated functions to cppuhelper/source/compat.cxx. Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, adding fixes and clean-up in cppuhelper/source/compat.cxx and odk/Package_odk_headers.mk Change-Id: I48b3cbf551b59d72614737a883a96aab55fc2090
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann1-2/+2
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-02-26cppuhelper: retrofit std::exception into overriding exception specsStephan Bergmann1-4/+4
Change-Id: I56e32131b7991ee9948ce46765632eb823d463b3
2013-11-19remove unnecessary use of OUString constructor when assigningNoel Grandin1-2/+2
change code like aStr = OUString("xxxx"); to aStr = "xxxx"; Change-Id: Ib981a5cc735677ec5dba76ef9279a107d22e99d4
2013-10-11-Werror,-Wunused-variableStephan Bergmann1-3/+3
Change-Id: Ia3e6da86b47099106c4be793a1477979d327a2b9
2013-06-05fdo#46808, Convert XMultiServiceFactory in filter moduleNoel Grandin1-6/+6
Change-Id: I9dcddba4f5a8a7adeddc31b5df014b0174b9745d