59 Commits
Author SHA1 Message Date
Gabor Kelemen 8439cf1292 tdf#146619 Run IWYU again on include/xmloff
Change-Id: I8d66d58c1c421724d8e6df7e9a045d518da85f38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193921
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2025-11-30 23:08:31 +01:00
Noel Grandin 8009183a7a tdf#151876 shave some time off chart load (2)
manage SvXMLImportPropertyMapper with unique_ptr instead
of rtl::Reference, which avoids a bunch of ref-counting
traffic

Change-Id: I1e0e95408cdd5dc4271fa72178e57087737eb062
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183751
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-04-06 14:25:02 +02:00
Gabor Kelemen 72df5a6fdf Drop unneeded forward declarations from include/
test drive the new bin/find-unneeded-includes --fwdecl mode

Change-Id: I507fa2b172ec9e348d1d91066ea241f02187b5ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179321
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2025-01-03 09:32:27 +01:00
Noel Grandin b7c6bc0bda tdf#164046 style searching improvement breaks Impress layout
regression from
    commit 6c2f827697
    Author: Noel Grandin <noel.grandin@collabora.co.uk>
    Date:   Sun Oct 20 15:07:41 2024 +0200
    improve style searching in SvXMLStylesContext

Two problems - the original code was searching by DisplayName,
not Name, so add another index for DisplayName,
and the prefix matching was not properly matching.

Change-Id: Ifd43bdb89d33067954298115c8700b87c7f93050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177488
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-11-29 11:04:50 +01:00
Noel Grandin 6c2f827697 improve style searching in SvXMLStylesContext
We can searching without needing a std::map by sorting
the style list. Which also allows to do prefix
searching. Which we can use to dramatically reduce
the number of styles we need to loop through in
SdXMLStylesContext::ImpSetGraphicStyles.

a similar mega-master-page scenario as reported in tdf#158773

13.5 - 9.1s

Needed to adjust some unit tests because
the order of iteration through styles is
now different, which affects some file output.

Change-Id: Ia7240fe520b70839d2519eba1fb70819a3c3bf81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175281
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-10-21 17:23:58 +02:00
Noel Grandin 5b2cd79ade loplugin:finalmethods
create a plugin that finds methods we can mark as final because they are
not override in subclasses.

Which is useful both as documentation (telling you that you don't need
to worry about subclasses changing the implementation under you),
and for performance, letting the compiler elide virtual calls in many
cases.

Apply the results to a subset of stuff in /include

Change-Id: I7b5cc893ec2f343bc356bfc338e4cf531ffba1e0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165054
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-03-26 17:16:47 +01:00
Mike Kaganski a6aa71f6f3 AutoName is only used as Any, no need to extract into intermediate string
Change-Id: I00b0d647946e3943852098ff96cc09b7a2fd49ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151233
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-05-01 19:28:23 +02:00
Miklos Vajna 05f863844d sw: paragraph styles: add ODT filter for a linked character style
And the same in the other direction: link a para style from a char
style.

With this, the ODT filter is on par with the DOCX one for this feature.

Change-Id: Idd994b933672ab47a5f87a75c92abc137d3c73b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122753
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2021-09-28 10:27:20 +02:00
Noel 8e6ec5ebcc use more string_view in IsXMLToken
Change-Id: Ib84e2e7db4b4e6e2486dd024d60057d9d42ff4b0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107932
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-18 09:29:49 +01:00
Noel Grandin 7896173f7f fastparser in styles
Change-Id: I39d285f1dd7dd18c396db96863f77f511741951c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107364
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-08 07:50:58 +01:00
Noel 03ef620caf loplugin:unusedenumconstants
Change-Id: I9a2eb83647d6620b3c5b5ed5642227be47a657f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105303
Tested-by: Jenkins
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-05 09:04:54 +01:00
Noel 8c5ffecf1d make SvXMLImport capable of mixing fast- and slow- contexts adhoc
so I can convert even *ImportContext subclasses in the middle of
a context stack, and thus break the cyclic dependency nature
of the writer import.

and adjust the xmlimport loplugin for the new rules.

As a consequence of the loplugin:xmlimport's checking, we remove
a bunch of now unnecessary overrides of startFastElement.

Change-Id: I97464522ede8ec5e345e928cdafa4b18364b1b80
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104730
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02 08:17:00 +01:00
Noel Grandin d8759f225c loplugin:unusedfields
Change-Id: Icecc024c4385ec69508369d2645d8412e6dbff69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-02 08:27:49 +02:00
Noel Grandin f59334988a use more fastparser in SvXMLStyleContext subclasses
Change-Id: I6a1596bdbfa4db128730a663fc590c9e5bfa249d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101659
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-30 13:50:06 +02:00
Noel Grandin b25e82b903 loplugin:unusedmethods
Change-Id: I2be47d2faf883b519f693e2d5ad58a5ab111849f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101629
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-29 16:15:04 +02:00
Noel Grandin f7336500ba remove slowparser stuff from SvXMLStyleContext
Change-Id: Ic4efc2eba7d1cdd71df76b535811c706bab3860e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101347
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-26 08:42:35 +02:00
Noel Grandin 5bf60ba188 use more fastparser in OReportStylesContext
Change-Id: Ie8126206d9144ccba1fb120d47af9ebe35a345d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101320
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-25 18:22:02 +02:00
Noel Grandin 764d52045b use fastparser in SvXMLNumFormatContext
which requires making SvXMLStylesContext capable of doing both
fast and slow-parser paths.

Change-Id: I57428b10ac2d67bc233cc978c9a0c0c3755d60e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101022
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-20 18:22:26 +02:00
Noel Grandin 7b83a28f1e use fastparser in SdXMLHeaderFooterDeclContext
actually, it can do both fast and slow parser paths for now, because
it is used in a place fast-parser doesn't reach yet.

Which means that I had to make SvXMLStyleContext also
capable of handling both fast and slow parser paths.

Change-Id: I24fd5bfb6603e93a5f752365c246ce47dabea8bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101017
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-20 09:38:13 +02:00
Noel Grandin 528dc27c3d rename Clear() to dispose() in SvXMLStylesContext
to make it "clearer" this is part of the memory cleanup on destruction
process

Change-Id: I789bdfa0323cf759ed4db2e2a657e73e581d9eed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99990
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-03 13:52:18 +02:00
Noel Grandin 47cd34a60f use more compact namespace syntax in /include
excluding the UDK headers of course

Change-Id: Iac7ab83d60265f7d362c860776f1de9d5e444ec0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93268
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-03 09:21:51 +02:00
Noel Grandin 729927f760 Revert "loplugin:constfields in xmloff"
This reverts commit 0302c9b192.

Change-Id: Ib919429e22ad039d6a82fe081f4e5421fe08905d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90549
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-16 10:55:27 +01:00
Noel Grandin d32289d715 loplugin:unusedmethods
Change-Id: I698981490eb1391930cdd06821a80a5f770e000e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90109
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-06 17:50:41 +01:00
Noel Grandin c1dae35c1e use the SetAttribute override in SvXMLStyleContext subclasses consistently
Change-Id: Ibdbf73c5e54fbbb051e4898fd8b3a7a155647b15
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89702
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-01 07:34:35 +01:00
Noel Grandin aa58c38089 convert XML_STYLE_FAMILY to scoped enum
Change-Id: I5335b0190a2f5a8111993c0c9c224c8a6a8f0cfb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88723
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-15 07:02:36 +01:00
Noel Grandin 998308c363 use more FastParser in SvXMLStylesContext
Change-Id: I05c7314739246a864b16723c13bd8fbb4ef725e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87146
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-01-21 17:56:56 +01:00
Noel Grandin a445b24d1e remove unnecessary CreateChildContext methods
that do the same as the base class method

Change-Id: I5048edf9d5fa40bb4ebdd96d9b13c303fb061945
Reviewed-on: https://gerrit.libreoffice.org/85646
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-12-21 08:25:23 +01:00
Noel Grandin 83e97fef3f convert ImportStoredChapterNumberingRules to XFastParser
Change-Id: I80ceed4bf2e767b86aedd1dd7bf4f892e3077138
Reviewed-on: https://gerrit.libreoffice.org/82132
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-06 12:35:29 +01:00
Andrea Gelmini 07fb0664fa Fix typos
Change-Id: I8222cf7aae977f0e26645dea6e4cfaee94446a2c
Reviewed-on: https://gerrit.libreoffice.org/75946
Tested-by: Jenkins
Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-19 17:35:39 +02:00
Noel Grandin ccb6b8967c loplugin:unnecessaryvirtual
Change-Id: I1fcde14b66ce80157cbebe7f3ec8c5ced1e13143
Reviewed-on: https://gerrit.libreoffice.org/68937
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09 07:28:18 +01:00
Gabor Kelemen 6e5cdd9d55 tdf#42949 Fix IWYU warnings in include/xmloff/*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Id20e0bc42e39f868a7c5d49d756f2ad5e14a86c0
Reviewed-on: https://gerrit.libreoffice.org/66637
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-01-22 09:27:34 +01:00
Noel Grandin 8467d76418 fix signatures of deleted copy/assign operators
Change-Id: Id1a0749b78a7021be3564487fb974d7084705129
Reviewed-on: https://gerrit.libreoffice.org/62718
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-02 07:03:08 +01:00
Noel Grandin 0302c9b192 loplugin:constfields in xmloff
Change-Id: I9623e6b483b28f5b50a2c76016bcc319b375a35a
Reviewed-on: https://gerrit.libreoffice.org/60394
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-09-13 12:56:39 +02:00
Noel Grandin 60bc263547 new loplugin:conststringfield
Look for const string fields which can be static, and
mostly convert them to OUStringLiteral

And add a getLength() method to OUStringLiteral to make
the transition easier.

Remove dead code in XclExpRoot::GenerateDefaultEncryptionData,
default password is never empty.

Change-Id: Iae75514d9dbb87289fd5b016222f640abe755091
Reviewed-on: https://gerrit.libreoffice.org/59204
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-08-22 13:31:57 +02:00
Caolán McNamara 442df6cf83 ofz: don't leak in face of exceptions
Change-Id: Ic15590a13bd3770ee5dd7db76b21c830a4fe73e2
Reviewed-on: https://gerrit.libreoffice.org/42587
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-22 11:01:53 +02:00
Caolán McNamara 00657aef09 migrate to boost::gettext
* all .ui files go from <interface> to <interface domain="MODULE"> e.g. vcl
* all .src files go away and the english source strings folded into the .hrc as NC_("context", "source string")
* ResMgr is dropped in favour of std::locale imbued by boost::locale::generator pointed at matching
  MODULE .mo files
* UIConfig translations are folded into the module .mo, so e.g. UIConfig_cui
  goes from l10n target to normal one, so the res/lang.zips of UI files go away
* translation via Translation::get(hrc-define-key, imbued-std::locale)
* python can now be translated with its inbuilt gettext support (we keep the name strings.hrc there
  to keep finding the .hrc file uniform) so magic numbers can go away there
* java and starbasic components can be translated via the pre-existing css.resource.StringResourceWithLocation
  mechanism
* en-US res files go away, their strings are now the .hrc keys in the source code
* remaining .res files are replaced by .mo files
* in .res/.ui-lang-zip files, the old scheme missing translations of strings
  results in inserting the english original so something can be found, now the
  standard fallback of using the english original from the source key is used, so
  partial translations shrink dramatically in size
* extract .hrc strings with hrcex which backs onto
   xgettext -C --add-comments --keyword=NC_:1c,2 --from-code=UTF-8 --no-wrap
* extract .ui strings with uiex which backs onto
   xgettext --add-comments --no-wrap
* qtz for gettext translations is generated at runtime as ascii-ified crc32 of
   content + "|" + msgid
* [API CHANGE] remove deprecated binary .res resouce loader related uno apis
      com::sun::star::resource::OfficeResourceLoader
      com::sun::star::resource::XResourceBundleLoader
      com::sun::star::resource::XResourceBundle
    when translating strings via uno apis
      com.sun.star.resource.StringResourceWithLocation
    can continue to be used

Change-Id: Ia2594a2672b7301d9c3421fdf31b6cfe7f3f8d0a
2017-07-21 08:20:50 +01:00
Noel Grandin f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +00:00
Noel Grandin 968f6a7f02 new loplugin: useuniqueptr: unotools..xmlscript
Change-Id: I6966d44cff644112dd837adfe7d9c4f459457271
Reviewed-on: https://gerrit.libreoffice.org/33298
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-19 11:28:41 +00:00
Markus Mohrhard 198fabe0f2 soon is now
Change-Id: Ib4b8b949f00609149f9134fb2f286cd7e0dc0255
Reviewed-on: https://gerrit.libreoffice.org/29254
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-09-26 08:32:00 +00:00
Stephan Bergmann 91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "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-09-13 13:19:22 +02:00
Noel Grandin e1d88a5745 use unique_ptr for pImpl's in xmloff/
Change-Id: Ib95118941938af83fed566a085837e17f092017a
2015-11-17 08:23:35 +02:00
Oliver Specht fa91dd31f3 5th step to remove tools/rtti.hxx
tools/rtti.hxx removed
completed the interface of some Sdr.*  Items
and removed pseudo items

Change-Id: I0cdcd01494be35b97a27d5985aa908affa96048a
Reviewed-on: https://gerrit.libreoffice.org/19837
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2015-11-11 10:49:30 +00:00
Noel Grandin 1c909a13a0 com::sun::star->css in include/ucbhelper to include/xmlscript
Change-Id: Iaa7f0b8455a601d3992c08cde0943c709c417256
2015-10-23 12:05:04 +02:00
Stephan Bergmann b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Noel Grandin a62129aa63 loplugin:unusedmethods xmloff
Change-Id: I9d15d8edcc6746c055336bf31e5b0c15cb971ffe
Reviewed-on: https://gerrit.libreoffice.org/17061
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-15 10:36:25 +00:00
Stephan Bergmann eaa9a73185 loplugin:deletedspecial
Change-Id: I806c9799f6eac357e5f200b53df3a9c1e6ecd841
2015-02-07 12:36:05 +01:00
Noel Grandin b44cbb26ef new loplugin: change virtual methods to non-virtual
Where we can prove that the virtual method is never overriden.

In the case of pure-virtual methods, we remove the method entirely.
Sometimes this leads to entire methods and fields being
eliminated.

Change-Id: I138ef81c95f115dbd8c023a83cfc7e9d5d6d14ae
2015-01-26 08:42:28 +02:00
Michael Stahl 2f69e16c72 override the overloading of "overload" to decrease cognitive (over-)load
Change-Id: I4d0e1de89d0bbdbea23bc5a46bf75ae0ce4e2796
2015-01-09 00:00:47 +01:00
Andrea Gelmini da40cac540 Fix common typos. No automatic tools. Handmade…
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-12 11:04:11 +00:00