Commit Graph
118 Commits
Author SHA1 Message Date
Gabor Kelemen 14001bc758 Recheck modules s[a-c]* with IWYU
See tdf#42949 for motivation

Change-Id: I867e1f7a2c44210de3281b36e22708a5d32ddb7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129476
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2022-02-14 15:25:30 +01:00
Eike Rathke ec4f8cd217 Resolves: tdf#126565 RefEditModified() preset current sheet for address-only
Change-Id: Ifa662a9d55fae10e3e1e3e115c9c5eb10972cbbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126899
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
2021-12-16 00:28:21 +01:00
Noel Grandin 3b8e53f66f loplugin:constparams improve handling of pointer params
Change-Id: I4c0002e72703eded435bfe4985f5b0121bf8524b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122843
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-09-30 11:24:33 +02:00
Samuel Mehrbrodt d157c1bd70 tdf#126665 Remember last used file picker directory
This introduces internal tracking of last used directories.
Each caller of the file picker can pass a "context". The selected
directory will then be saved & restored when opening the file picker
with the same context again.

After ffa636ba74 , the Windows file picker
no longer tracks the last used directory itself.
This is a replacement and an improvement at the same time, since there is not
one global last used directory, but one per context.

Change-Id: I10650cfb9359922690954fa65c89b4e47477e2c5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118597
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-07-12 14:31:20 +02:00
Caolán McNamara 30bb3657ee ScAddress::Parse never passed a null ScDocument*
Change-Id: I8832f2cc4311b30b9a15883e831260a19d089a57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102974
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18 14:22:13 +02:00
Kohei Yoshida 109ed8f775 Upgrade liborcus to 0.16.0.
Change-Id: Iae29fb26417dfc161698a81bee84e81545969065
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102502
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2020-09-12 05:49:10 +02:00
Caolán McNamara 85eda0537b cid#1459028 various checked_return warnings
and

cid#1459027, cid#1459026, cid#1459025, cid#1459024, cid#1459021,
cid#1459018

Change-Id: If92e7665fcf947c5daf3094b9003e85c5c51f48f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89763
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-03-01 16:39:50 +01:00
Caolán McNamara 914f9ee7bf SetReference ScDocument arg is never null
Change-Id: Ifdfe305e5319926d804e14962e786389b79fe476
Reviewed-on: https://gerrit.libreoffice.org/82682
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-14 16:44:57 +01:00
Noel Grandin bdc8fda4be loplugin:constmethod in sc
Change-Id: I78c4fb4acf21756f91582caee5e30e3ad1fc2ae4
Reviewed-on: https://gerrit.libreoffice.org/79543
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-26 10:15:00 +02:00
Kohei Yoshida 0fb2927a8f Remove unnecessary braces.
As to the reason why they were there can be explained by the commit
48b35ed43d.  They braces did make sense
before that commit.

Change-Id: Ie889d9e2404436c1cc0249dcf71bf18ebfd40636
Reviewed-on: https://gerrit.libreoffice.org/78212
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-08-28 00:04:32 +02:00
Kohei Yoshida 52cff86bc7 Fully support importing of XML with nested repeat elements.
With this change, Calc's XML Source will allow importing XML that
contains nested repeat elements.  It is something the old implementation
did not support.

Change-Id: I73fa1087ccd727390a47007bcfabd411cf007621
Reviewed-on: https://gerrit.libreoffice.org/77941
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-08-22 01:55:00 +02:00
Kohei Yoshida 494b11bb7a Return std::unique_ptr directly.
Change-Id: If0b8263ec6659fccfb329676e09d5441bec6e60c
Reviewed-on: https://gerrit.libreoffice.org/77864
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-08-21 03:30:52 +02:00
Kohei Yoshida bf03ccae15 Namespace doesn't need a semicolon.
Change-Id: I0f34f02ea7827cddb842e2d2ce466fe61e6fd95a
Reviewed-on: https://gerrit.libreoffice.org/77863
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-08-21 00:01:51 +02:00
Kohei Yoshida 56ffe3c0a1 Switch mdds to 1.5.0 and liborcus to 0.15.0.
Change-Id: Ibff9a5e0f0771e4cf12b4dc3985661a01195e265
Reviewed-on: https://gerrit.libreoffice.org/77482
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida <kohei@libreoffice.org>
2019-08-15 06:09:52 +02:00
Gabor Kelemen 22c484b597 tdf#42949 Fix IWYU warnings in sc/source/ui/{view,xmlsource}/*cxx
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ie47dff381392ef57cb857184c179bf82d3b55862
Reviewed-on: https://gerrit.libreoffice.org/77258
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-08-12 09:55:47 +02:00
Caolán McNamara 00ae441bc7 drop some unneeded includes
Change-Id: I3c9a3b73c099b70bdbd6b16688e83ee01231a27e
Reviewed-on: https://gerrit.libreoffice.org/72204
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-13 13:57:14 +02:00
Arkadiy Illarionov 038e4b3b1e Use hasElements to check Sequence emptiness in sax..sdext
Similar to clang-tidy readability-container-size-empty

Change-Id: If6a567708d3c59355d54933fad23c85195846624
Reviewed-on: https://gerrit.libreoffice.org/71763
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-12 14:18:12 +02:00
Caolán McNamara d56ee7339f remove unused RefEdit/RefButton
and rename WeldRefEdit/WeldRefButton back

Change-Id: I3aab8585d4ba1017cc755bf21e827522e7ee6980
Reviewed-on: https://gerrit.libreoffice.org/71957
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-05-11 20:31:04 +02:00
Caolán McNamara 260e5b6120 weld ScXMLSourceDlg
Change-Id: If8894b7c432006f196e040571757943c940f13ea
Reviewed-on: https://gerrit.libreoffice.org/71489
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-29 14:31:51 +02:00
Caolán McNamara 3788e31b2e set parent for file picker dialog
Change-Id: I92c83dcb9fd0fa3305aa2f40f6cc0d28fc0ad022
Reviewed-on: https://gerrit.libreoffice.org/71438
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-28 15:39:57 +02:00
Arkadiy Illarionov 48b35ed43d Simplify containers iterations in sc/source/ui/{view,xmlsource}
Use range-based loop or replace with STL functions

Change-Id: I5604325cd25c099d3b5580956417620f298faa1e
Reviewed-on: https://gerrit.libreoffice.org/65572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-25 18:36:29 +01:00
Gabor Kelemen febe0fd100 tdf#42949 Fix IWYU warnings in include/vcl/[t-u]*
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ib32ea54a3fa690a0722fa75ddb4121ec78c0b64f
Reviewed-on: https://gerrit.libreoffice.org/65386
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2018-12-20 12:36:41 +01:00
Noel Grandin 15f0d61206 use Image(OUString) instead of Image(Bitmap(OUString))
which benefits LOOL since we can delay creating the image until
we know the dpi setting of the display we are going to write to.

Achieved by

    perl -pi -w -e "s/\bImage\s*\(\s*BitmapEx\s*\((\w+)\s*\)\s*\)/Image\(\1\)/g" $( git grep -lw "BitmapEx" )

followed by

    git grep -nP '\bImage\s*\(\s*BitmapEx\s*\('

followed by commenting out the BitmapEx(OUString) constructor and seeing
what needed adjusting.

Change-Id: I3224e11937d720fa484b0d659d25673a9e809267
Reviewed-on: https://gerrit.libreoffice.org/64760
Tested-by: Jenkins
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2018-12-08 19:15:09 +01:00
Caolán McNamara 6311f7ffce move SvTreeListBox to vcl
Change-Id: I04a146d3d8a428ac1678827dc883525c40240a44
Reviewed-on: https://gerrit.libreoffice.org/62787
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-07 22:01:02 +01:00
Noel Grandin 904c97bbdf move SvTreeList::*Sibling to SvTreeListEntry
since they don't depend on SvTreeList at all

Change-Id: If48c83976a95943e5cfa92490d68f74281cf4b5f
Reviewed-on: https://gerrit.libreoffice.org/56819
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-07-03 08:16:19 +02:00
Gabor Kelemen 104b26b246 tdf#42949 Remove unnecessary localization headers from sc
Found by searching for the header names and the localization function:
git grep -l -e \<scresid.hxx\> -e \<strings.hrc\> sc | xargs grep -c ScResId | grep :0$ | grep -v /pch
and
git grep -l -e \<globstr.hrc\> sc | xargs grep -c GetRscString | grep :0$ | grep -v /pch
since global.hxx contains so much more, it's omitted from this round.
This also gives some false positives used in ErrorMessage() calls or just untranslated strings.

Also translate some stray German comments

Change-Id: Icfea2b2942d12c3c134d419cb7c9a84534c04a86
Reviewed-on: https://gerrit.libreoffice.org/52932
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2018-04-16 10:12:10 +02:00
Michael Stahl 11d2f3d6e1 vcl: make MapMode constructor explicit
Insert constructor everywhere, except a couple places that apparently
want to compare GetMapUnit().

Change-Id: I1910deb60562e5e949203435e827057f70a3f988
2017-10-26 23:17:45 +02:00
Stephan Bergmann 3e1d3c25e0 loplugin:includeform: sc
Change-Id: I2ed763e0584a188032c80fde60890de3c6985cbd
2017-10-23 22:45:57 +02:00
Noel Grandin b6819a53c0 clang-tidy modernize-use-emplace in sc
Change-Id: Ifc38e1fc188fe957a0c717aec19cdd6637e4c658
Reviewed-on: https://gerrit.libreoffice.org/42183
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-12 09:42:55 +02:00
Noel Grandin bcc372d15e loplugin:constparam in sc part8
Change-Id: I6cf9c5e662b20de9c9698a8c1fab56a09950c522
Reviewed-on: https://gerrit.libreoffice.org/41683
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-29 14:15:16 +02:00
Jochen Nitschke c4ddf6cd6d C++11 remove std::unary_function bases from functors
std::unary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
   is used in a std::not1 function helper who uses the members
   return_type and argument_type.
   - replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
   lcl_weakReferenceToSame used the argument_type member in the
   operator() parameter.
   - inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
   used result_type and argument_type in operator().
   - inline the types

Also fix compile error with gcc about finding std::for_each.

Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03 12:21:03 +02:00
Chris Sherlock 97eb00c75e revert OSL_ASSERT changes
Change-Id: I365d140446bd2a62cf8256acbfdd53fe72987380
2017-05-07 17:03:35 +10:00
Chris Sherlock 83017d884d tdf#43157: convert sc module away from OSL_ASSERT to assert
Change-Id: Iead653868ea7e0d1ed4ba83ef1a46e1ae5874d13
2017-05-07 14:17:19 +10:00
Caolán McNamara 6022a17e79 remove sc bitmaps from .src files
Change-Id: I351b67616b240e3c0c91ea31d8f14ecfa6de8b4a
Reviewed-on: https://gerrit.libreoffice.org/36991
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-04-26 16:18:48 +02:00
Caolán McNamara f0421b64cb sc: load BitmapEx resources instead of Image ones
Change-Id: If10ae4238a580ab6d19287968aecbf29acbd550e
2017-01-19 10:02:14 +00:00
Noel Grandin a66731982e convert SFX_HINT to scoped enum
Notes

(*) In SC, BULK_DATACHANGED was or'ed into the hint id. Replaced with a
dynamic_cast check.

(*) In SC, removed the hint id field from ScIndexHint, no point in
storing the hint id twice

(*) Fold the SfxStyleSheetHintId enum into the new SfxHintId enum, no
point in storing two different hint ids

(*) In some cases, multiple #define's used to map to the same SFX_HINT
value (notably the SFX_HINT_USER* values). I made all of those separate
values.

Change-Id: I990e2fb587335ebc51c9005588c6a44f768d9de5
Reviewed-on: https://gerrit.libreoffice.org/31751
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-08 12:35:09 +00:00
Noel Grandin bfde4866e0 convert DecodeMechanism to scoped enum
Change-Id: I5c56634b1bca8e37fa73d02d2428645301b6c547
2016-12-05 12:49:02 +02:00
Noel Grandin 954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Stephan Bergmann 106ea87205 Remove _TYPED suffix from tools/link.hxx macros
...which was introduced with 3ead3ad52f "Gradually
typed Link" to distinguish the new, typed versions from the old, untyped ones,
but is no longer necessary since 382eb1a23c
"remove untyped Link<>" removed the old versions.

Change-Id: I494025df486a16a45861fcd8192dfe0275b1103c
2016-10-05 07:56:12 +02:00
Eike Rathke 7d8196ea2f perf: eliminate SfxSimpleHint and move to SfxHint, tdf#87101 related
There were over 150 places in *::Notify() functions that did some
dynamic_cast<SfxSimpleHint*> of which ~98% were unnecessary because the
base class SfxHint passed was an SfxSimpleHint anyway. dynamic_cast
operations come with quite some cost, so avoid if possible. Specifically
for ScFormulaCell::Notify() that created a bottleneck in scenarios where
cells were notified that already handled a previous notification. In
mass operations doing the dynamic_cast before it could be decided
whether having to act on it or not this made 2/3 of all time spent in
the Notify() call.

To get rid of that rename/move SfxSimpleHint to SfxHint and let classes
derive from SfxHint instead of SfxSimpleHint. This comes only with a
slight cost that an additional sal_uInt32 is transported in such hints,
initialized to 0, but this is neglectable compared to the huge gain.

For the rare cases where a Notify() actually expects both, an SfxHint
(formerly SfxSimpleHint) and a derived hint, this changed order of the
dynamic_cast involved so the simple SfxHint::GetId() is handled last.
Modules using such combinations can further optimize by treating the
simple SfxHint::GetId() first once verified that none of the other
derived hints use an ID not equal to zero respectively none of the ID
values the simple hint uses.

Change-Id: I9fcf723e3a4487ceb92336189d23a62c344cf0ce
Reviewed-on: https://gerrit.libreoffice.org/29205
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-09-23 15:14:03 +00:00
Jochen Nitschke ef699b4d41 convert SV_ITEM_ID_LBOX defines to scoped enum
and remove unused SV_ITEM_ID_EXTENDRLBOXSTRING

Change-Id: Ic84d9341d0225b01b9ef46814483c66b1af307b5
Reviewed-on: https://gerrit.libreoffice.org/28397
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-26 07:51:19 +00:00
Jochen Nitschke 51d0b4037b tdf#84938 Change defines to typed_flags
Put defines into an enum class and use typed_flags template from o3tl
to give them flag operators.

There were some shift operations to apply flags from start references
to end references, these went into a helper in address.hxx to hide
them. A marco with shift operations in address.cxx was rewritten in two
helpers without shifts.
One shift remained in ScRange::Format with a comment.

The other flag untypical operator was a minus 1 in a helper for
ScRefFinder::ToggleRel, which iteratates through all possible
combinations for absolute references. This is used to make referecnces
absolute via SHIFT+F4. A replacement would be too complex.

Change-Id: I4850f1623e01e56c60ac2260b95fc5cad8b6fd71
Signed-off-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-on: https://gerrit.libreoffice.org/22840
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Eike Rathke <erack@redhat.com>
2016-03-12 00:21:29 +00:00
Stephan Bergmann 00c62e306f loplugin:privatebase: Publicly derive from binary_/unary_function
Somewhat arbitrarily prefer public over private derivation; ultimately,
derivation from those deprecated (C++11)/removed (C++17) classes should be
removed, anyway.

Change-Id: I5ed24427d37586e72f8c16509cf5002a54af73f1
2016-01-11 13:17:08 +01:00
Stephan Bergmann de29ac0953 loplugin:nullptr (automatic rewrite)
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
2015-11-10 10:31:36 +01:00
Caolán McNamara 4ea0390faa cppcheck: noExplicitConstructor
Change-Id: I06186e8f0bbc8522f538e8639a68e816093becc2
2015-11-02 10:16:38 +00:00
Noel Grandin 6f1313b3d4 convert Link<> to typed
Change-Id: Icbba339dac0be31e30dff021bba06a219f8aecd6
Reviewed-on: https://gerrit.libreoffice.org/19405
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-10-16 09:11:29 +00:00
Julien Nabet 849877871a Prefer getSelectedFiles to getFiles (sc)
Change-Id: I78e5c590b99113d01545c8f83f6024226aa185c8
Reviewed-on: https://gerrit.libreoffice.org/19133
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2015-10-04 19:45:27 +00:00
Noel Grandin e85b2333bc convert Link<> to typed
Change-Id: I59d325c3b051690303a5841907317122fa1ec98b
Reviewed-on: https://gerrit.libreoffice.org/18825
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-24 16:19:37 +00:00
Noel Grandin 61623d5b90 convert Link<> to typed
Change-Id: I365a81a0a960f5da736c9a97aa056da16c99452f
2015-09-08 08:16:46 +02:00
Noel Grandin 167bc621ef Convert vcl Button Link<> click handler to typed Link<Button*,void>
Change-Id: Ie80dfb003118d40741549c41ebcc7eda4819f05b
2015-08-26 11:15:35 +02:00