summaryrefslogtreecommitdiff
path: root/xmloff/source/transform/StyleOOoTContext.cxx
AgeCommit message (Collapse)Author
2023-05-17Removed more constant concatenationsVojtěch Doležal
Change-Id: I4fce6eeb6652914e1883037b41a2dc3c09a88ada Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151826 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-02-19loplugin:refcounting in xmloffNoel
Change-Id: I739aa5914359edc4fdfdc341b09718ddbb7c04e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111121 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-21use std::u16string_view in SvXMLTokenEnumeratorNoel
Change-Id: I1194441063047637adc20c8e37bb717fdb787714 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14rename xmlnmspe -> xmlnamespaceNoel Grandin
Change-Id: I8fdf9833dede6f4c9ba4bbb76b9ab9b6b419f155 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100722 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14rename nmspmap.hxx -> namespacemap.hxxNoel Grandin
we're not in DOS anymore, Dorothy Change-Id: I79926e0d694163940ba7ebf20419724dd0a486f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100721 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-06loplugin:flatten in xml/transformNoel Grandin
Change-Id: Ib428dca2e0afffd53f2f3a2c66682b60e8be43b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100190 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-02Upcoming improved loplugin:staticanonymous -> redundantstatic: xmloffStephan Bergmann
Change-Id: I47bd2f4b6bbe47b8a6c0aa8102186bf25a3804f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97772 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-22tdf#42949 Simplify use of rtl::math::approxEqual in include/basegfx/Gabor Kelemen
Turns out we can save about 500Mb of preprocessor input if we use rtl_math_approxEqual from rtl/math.h instead of its C++ wrapper rtl::math::approxEqual from rtl/math.hxx and manage the fallout accordingly. Before: bin/includebloat.awk | head sum total bytes included (excluding system headers): 19017296671 After: $ bin/includebloat.awk | head sum total bytes included (excluding system headers): 18535432672 Change-Id: I1691171f3a309405a7099882ad9989d147f59118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92508 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-22Extend loplugin:external to warn about classesStephan Bergmann
...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-10-02tdf#42949 Fix IWYU warnings in xmloff/source/[s-x]*/*cxxGabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I986ba9f661854d1b5fafc337ec109b0ee558a86a Reviewed-on: https://gerrit.libreoffice.org/79904 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-02-20More loplugin:simplifyboolStephan Bergmann
...found with (trunk) libc++ on macOS, where the standard library iterator implementations are apparently sufficiently different to libstdc++ to find more cases of !(... == ...) vs. ... != ... Change-Id: Ia3861406aa584c7b1d33f47448190b5cf2e770f7 Reviewed-on: https://gerrit.libreoffice.org/68089 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-19loplugin:staticvar in xmloffNoel Grandin
Change-Id: I283d162807a906334627613be7c340af566144f1 Reviewed-on: https://gerrit.libreoffice.org/61921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-30loplugin:stringloop in svgio..xmlsecurityNoel Grandin
Change-Id: I1b2fe5674c8350690efc3d3219b9273cc61d5b0c Reviewed-on: https://gerrit.libreoffice.org/58332 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-24loplugin:unusedfields,can-be-const in xmloff(1)Noel Grandin
(*) When passing a part of a global static data to XMLPropertiesOOoTContext_Impl, just store a reference to it instead of copying (*) Simplify the OOo2OasisTransformer constructor and call sites to make the const-ness work Change-Id: I012d638cfd9266ed3514164e84b381d0d577f821 Reviewed-on: https://gerrit.libreoffice.org/57853 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-12Add 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 w* x* Change-Id: I27bff44da3d34d24262031c7489e755311599bc5 Reviewed-on: https://gerrit.libreoffice.org/57307 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-01-15More loplugin:cstylecast: xmloffStephan Bergmann
Change-Id: I870bc9fd1c7361913b073411065ec723f6b080da
2018-01-12More loplugin:cstylecast: xmloffStephan Bergmann
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: Ic872cef7bb9982305528ec3ce12a1871f055b752
2017-05-28remove unnecessary use of OString::getStrNoel Grandin
Change-Id: I0490efedf459190521f4339854b3394d57765fdb Reviewed-on: https://gerrit.libreoffice.org/38058 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-03-21Old-to-new mapping of attributes is moved into a Module:Mohammed Abdul Azeem
This should make it easy to reuse the mapping code wherever necessary and restores the loading of writerperfect documents. Change-Id: I505bffa47fe37270b0430d9ae5afec5072762b4c Reviewed-on: https://gerrit.libreoffice.org/35263 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: David Tardon <dtardon@redhat.com>
2017-02-02expand out ::sax::Converter::convertNumber to OUString::numberNoel Grandin
which results in much simpler code overall, there is no need to go via an OUStringBuffer all the time Change-Id: I69eba92c93f471fa9a45f97c29c56dcf3cd1ebf8 Reviewed-on: https://gerrit.libreoffice.org/33773 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-25ScXMLTableRowCellContext implements fast interfaces:Mohammed Abdul Azeem
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>
2017-01-07coverity#705098 Explicit null dereferencedCaolán McNamara
Change-Id: Icf32bbe9ce259048219ba88aa7e4dc51592f7cb5
2016-12-01loplugin:unnecessaryoverride (dtors) in xmloffStephan Bergmann
Change-Id: I351ff5955d766118e3a6b2234181774af0d1f522
2016-09-18loplugin:unusedenumvaluesNoel Grandin
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b Reviewed-on: https://gerrit.libreoffice.org/28942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-08-18coverity#1371368 Resource leakCaolán McNamara
Change-Id: I5c35b3eaa6e9afe10096bf5013f83ff51cb870a4
2016-05-13clang-tidy modernize-loop-convert in writerfilter to xmlsecurityNoel Grandin
Change-Id: I334411c6b57c028ffb41b5deb72002f9d54038c3 Reviewed-on: https://gerrit.libreoffice.org/24923 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin
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>
2015-12-17Hold XMLTransformerContext by rtl::ReferenceStephan Bergmann
Change-Id: I60b8d422d53d47537996756aa1b7fb3c26f8383a
2015-11-26com::sun::star->css in xmloff/Noel Grandin
Change-Id: Iee6e21e093fb1383f19a0716dbc1c341f446b8c2 Reviewed-on: https://gerrit.libreoffice.org/20192 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-10loplugin:nullptr (automatic rewrite)Stephan Bergmann
Change-Id: I8690de2cb68dcfedc9f2239ce66cea06fd94bc16
2015-10-12Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY codeStephan Bergmann
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-06-25remove our custom RTTI from xmloff moduleNoel Grandin
not being used, anyhow Change-Id: I0eb0d6377efe324d9a442a70fc2046a58ed2f3c4
2014-11-17sal: clean up public headers with include-what-you-useMichael Stahl
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-11-14fdo#86023 - O[U]String needs a 'clear' methodBrij Mohan Lal Srivastava
Added clear() method to OString and OUString class, Updated appropriate call-sites. Change-Id: I0ba97fa6dc7af3e31b605953089a4e8e9c3e61ac Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
2014-11-12Fix common typos. No automatic tools. Handmade…Andrea Gelmini
Change-Id: I1ab4e23b0539f8d39974787f226e57a21f96e959 Reviewed-on: https://gerrit.libreoffice.org/12164 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2014-11-05markup with event type not checker typeCaolán McNamara
Change-Id: I14c0c5d90b67000cb4fe9e6be647854abfe784da
2014-08-11-Werror,-Wundefined-bool-conversionStephan Bergmann
Change-Id: Icf4a55f7e76a723014a7b8b5f6b9350db7370dd9
2014-06-13loplugin:staticcallStephan Bergmann
Change-Id: I7691a6d267ea572e3fdd028c1cfae7b721a76da7
2014-04-15xmloff: sal_Bool->boolNoel Grandin
Change-Id: I873c80baec8e70e3e8f642644563b92137571a30
2014-03-26First batch of adding SAL_OVERRRIDE to overriding function declarationsStephan Bergmann
...mostly done with a rewriting Clang plugin, with just some manual tweaking necessary to fix poor macro usage. Change-Id: I71fa20213e86be10de332ece0aa273239df7b61a
2014-03-26Split TYPEINFO into plain and TYPEINFO_OVERRIDEStephan Bergmann
...where the latter contains SAL_OVERRIDE annotations Change-Id: Id64794b388d83dfe7026440e8b20a5b5efd412d1
2013-11-11xmloff: include <> for external includesNorbert Thiebaud
Change-Id: Ic92d0121e928041bcff00b12706f794a4d8e25c8
2013-11-04remove redundant calls to OUString constructorNoel Grandin
Change code like this: aStr = OUString("xxxx"); into this: aStr = "xxxx"; Change-Id: I31cb92e21658d57bb9e14b65c179536eae8096f6
2013-09-12Mark as constTakeshi Abe
Change-Id: I1d62c66bd89ec5a813eb7b211042e392903c8baf
2013-08-21finish deprecation of O(U)String::valueOf()Luboš Luňák
Compiler plugin to replace with matching number(), boolean() or OUString ctor, ran it, few manual tweaks, mark as really deprecated. Change-Id: I4a79bdbcf4c460d21e73b635d2bd3725c22876b2
2013-08-10fdo#62475 removed pointless commentsJelle van der Waa
Change-Id: I176886fbc9f3d9e2b8ad2308ac2b127d9c68d9a6 Reviewed-on: https://gerrit.libreoffice.org/5331 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
2013-06-29String to OUString and cleanupThomas Arnhold
Change-Id: Idc18c1a6a64edea3399c8747ec0f096a2f964b68
2013-04-07mass removal of rtl:: prefixes for O(U)String*Luboš Luňák
Modules sal, salhelper, cppu, cppuhelper, codemaker (selectively) and odk have kept them, in order not to break external API (the automatic using declaration is LO-internal). Change-Id: I588fc9e0c45b914f824f91c0376980621d730f09
2012-11-15re-base on ALv2 code. Includes:Michael Meeks
Patches contributed by: Armin Le Grand. #118558# Correcting OLE attributes of LO3.4 at load time by loading as OOo3.3, details see task. http://svn.apache.org/viewvc?view=revision&revision=1195906 #118485# - Styles for OLEs are not saved. http://svn.apache.org/viewvc?view=revision&revision=1182166 #118898# Adapted ImpGraphic::ImplGetBitmap to correctly convert metafiles http://svn.apache.org/viewvc?view=revision&revision=1293316 #119337# Solves the wrong get/setPropertyValue calls in SvxShapeText (and thus in SvxOle2Shape) http://svn.apache.org/viewvc?view=revision&revision=1344156 Patches contributed by Mathias Bauer (and others) gnumake4 work variously http://svn.apache.org/viewvc?view=revision&revision=1394707 http://svn.apache.org/viewvc?view=revision&revision=1394326 cws mba34issues01: #i117717#: remove wrong assertion http://svn.apache.org/viewvc?view=revision&revision=1172349 Patch contributed by Herbert Duerr goodbye Registration and License dialogs, don't let the door hit you http://svn.apache.org/viewvc?view=revision&revision=1172613 help gcc 4.6.0 on 32bit ubuntu 11.10" http://svn.apache.org/viewvc?view=revision&revision=1245357 Do not add targets for junit tests when junit is disabled. Patch contributed by Andre Fischer http://svn.apache.org/viewvc?view=revision&revision=1241508 Revert "sb140: #i117082# avoid unncessary static class data members commit 21d97438e2944861e26e4984195f959a0cce1e41. remove obsolete FreeBSD visibility special case. retain consolidated BSD bridge code, remove OS/2 pieces.