Age | Commit message (Collapse) | Author |
|
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I504706ff1a3fc11a7a06ebe935f9dbc5323aefe8
Reviewed-on: https://gerrit.libreoffice.org/61369
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
found with
git grep -A2 -nP '!.*\.empty()' | grep -B1 -w clear
Change-Id: I87013eab9c6988048b891d20577e1f7efbce1b6c
Reviewed-on: https://gerrit.libreoffice.org/61295
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1eb6583bb9ec815bc0564b0d7c676f5b1fb9045f
Reviewed-on: https://gerrit.libreoffice.org/61177
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iff7936e440951e65653ef42ce5a2aebd22a03029
Reviewed-on: https://gerrit.libreoffice.org/61004
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2a74e0bcba46b730067b5baca5e934f95ba265ce
Reviewed-on: https://gerrit.libreoffice.org/60854
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6
Reviewed-on: https://gerrit.libreoffice.org/60232
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I849c1d0377a3d8a5dafedb017a6dfdb3189b799d
Reviewed-on: https://gerrit.libreoffice.org/59486
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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 directory sw
Change-Id: I1ede3f86e390bfec1a2d3ee8e8bb6ec67083b194
Reviewed-on: https://gerrit.libreoffice.org/58372
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I0f5ab46d117114b4d90f15252a7ea7fa01dab039
Reviewed-on: https://gerrit.libreoffice.org/57518
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I7cf635e238a16e7ec96e585e6eb5e2e9c39b545a
Reviewed-on: https://gerrit.libreoffice.org/57497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I0b4d18d2120ba2ce7d2526332bec199f52393290
Reviewed-on: https://gerrit.libreoffice.org/56363
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia4210410047ce3b37113cfe0d4dff5bb7122baf2
Reviewed-on: https://gerrit.libreoffice.org/53307
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Iee39219eb9de089ded9658eb75fcf258c3bd951d
Reviewed-on: https://gerrit.libreoffice.org/52931
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
This reverts commit 8bc951daf79decbd8a599a409c6d33c5456710e0.
As discussed at
<https://lists.freedesktop.org/archives/libreoffice/2018-April/079955.html>
"long->sal_Int32 in tools/gen.hxx", that commit caused lots of problems with
signed integer overflow, and the original plan was to redo it to consistently
use sal_Int64 instead of sal_Int32. <https://gerrit.libreoffice.org/#/c/52471/>
"sal_Int32->sal_Int64 in tools/gen.hxx" tried that. However, it failed
miserably on Windows, causing odd failures like not writing out Pictures/*.svm
streams out into .odp during CppunitTest_sd_export_ooxml2. So the next best
approach is to just revert the original commit, at least for now.
Includes revert of follow-up 8c50aff2175e85c54957d98ce32af40a3a87e168 "Fix
Library_vclplug_qt5".
Change-Id: Ia8bf34272d1ed38aac00e5d07a9d13fb03f439ae
Reviewed-on: https://gerrit.libreoffice.org/52532
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
which triggered a lot of changes in sw/
Change-Id: Ia2aa22ea3f76463a85ea077a411246fcfed00bf6
Reviewed-on: https://gerrit.libreoffice.org/48806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: I1a817d5575bbd57ecaa874a27158b9218e4210cc
Reviewed-on: https://gerrit.libreoffice.org/51603
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idb8ad6cda75b7112280ae71b4340d0187a602794
Reviewed-on: https://gerrit.libreoffice.org/50974
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I5aa3744ee7f26dfefecbe9b9fa6aef700049ff32
Reviewed-on: https://gerrit.libreoffice.org/50469
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
The share/template/common/internal/html.stw template we have is for
Writer/Web, loading that into Writer is questionable at best. Also it
means that the outline numbering of the heading styles is not set, which
is a problem, as the sw HTML import only sets the style, not the
outline numbering.
Change-Id: I86d11d8a5744c3c2ca71b03fd41a24d3f88ea333
Reviewed-on: https://gerrit.libreoffice.org/49381
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I4b6e799c1afc2a762a3729ee89f3226c59a6eef8
Reviewed-on: https://gerrit.libreoffice.org/48462
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
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: I0f49d21dfdf82742f11b27709f74294feb1e419e
|
|
Change-Id: I0c71a6fd2e094cebdb720e6c0661cd8a7bb8482c
Reviewed-on: https://gerrit.libreoffice.org/46812
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I03f8f5fd656d62410821f2f2851f1c584c97d1f4
|
|
Change-Id: Ia5654aaf88f13c37f52e3c17d61dd3475641070a
Reviewed-on: https://gerrit.libreoffice.org/46230
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
also removing an odd Swap function in sw::util::Setlayer
Change-Id: Ied4a4bb5a6ef3f6bdd29c40b19680600536407bc
Reviewed-on: https://gerrit.libreoffice.org/45740
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie5141a01b1a63c083d5fce1842a35a9a4b0d36e3
|
|
Change-Id: Ia477de0fb910f6a8fbb0a5054f4bdb43dd9ff381
Reviewed-on: https://gerrit.libreoffice.org/43951
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Removed 0L and 1L in sw/source/ directory files
Change-Id: I5c9a7c2f1ff7cc7a4d204540fd93efdc1b4859cf
Reviewed-on: https://gerrit.libreoffice.org/42562
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
|
|
Aha, now we know that the reason for the defensive programming
in lcl_AssureFieldMarksSet() was that there are actually 2
different use-cases for it: usually a new mark is inserted,
so there are no dummy characters and they must be inserted.
However when copying text, the dummy characters are copied too,
so they must not be inserted, or we get duplicate fieldmarks.
This also reverts commit d4036d3a89b65a4912f62e3930eb1a31cd90a16b
which fixed the problem only for CHECKBOX_FIELDMARK in a
different way.
(regression from bb069fe7b8b6a24f9ff4df4c7052961e17ea3a8c)
Change-Id: I3c99b8c6d720951655198e682018794337859373
|
|
moz1187869-1.doc crashes on export to ODF because an annotation
mark has been inserted that does not have a SwPostItField.
In fact, the SwPostItField exists, but the annotation mark is at
the wrong position.
There are 2 consecutive range annotations in the file, so when
Read_And() calls MoveAttrs(), the end of the both annotations
are moved 2 times, hence later SwFltControlStack::SetAttrInDoc()
will insert 2 annotation marks with the same end position,
and the 2nd one will overwrite the name that the 1st one set
on the 2nd SwPostItField, while the 1st SwPostItField remains
with an empty name.
Ensure that the end of an annotation mark is no longer moved
once it's on the position of the field inserted in Read_And().
Crash is a regression from 31c54fa7bb03768b425ae019096e0a0e26e9c736.
Change-Id: I0fd661e22e51701de67227f9145a13c62b10143e
|
|
Translates leftovers found using a custom regex.
Additionally translated:
- One randomly found comment in /reportdesign
- Test strings in /stoc/test (let's see if it works)
Change-Id: I5f893c194c4b56b5365700928a3b8b63936d03e2
Reviewed-on: https://gerrit.libreoffice.org/41583
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
|
|
Change-Id: I6c33709aa407ccb3eee7026ab9b40dc4257de209
Reviewed-on: https://gerrit.libreoffice.org/40769
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iad2bddb2359af3e7da40175d17d2d3ed7eda5be6
Reviewed-on: https://gerrit.libreoffice.org/40229
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... in document"
This reverts commit 2903d85d6197829633d7f96c95cd55821c2c20ff.
It was a good idea, but is not complete.
Change-Id: Ia0da2640889ce6e78b89b27c75fae9d6508afd40
|
|
Change-Id: If43c8bfa906fc711ed8026a1e06add3d7ac166d9
Reviewed-on: https://gerrit.libreoffice.org/39941
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
SwFltControlStack::SetAttrInDoc() will insert a RES_FLTR_ANNOTATIONMARK
without checking that there is actually a SwPostItField at that
position, which triggers the assertion "<AnnotationMark::InitDoc(..)> -
annotation field missing!" in AnnotationMark::InitDoc().
This happens when loading "crash-7.doc" which has a different kind of
field - a SwPageNameField - at that position.
In the WW8 filter, the SwPostItField is inserted in Read_And(),
the AnnotationMark in Read_AtnBook(), which look quite orthogonal.
Since it doesn't look like a valid document model to have the
AnnotationMark without its field, avoid inserting it in the filter.
Change-Id: I960d346601522b1a4d8644e538cde174763e99ff
|
|
Change-Id: Ia96172489eec09607113d388a5b683bb6e0d2dec
Reviewed-on: https://gerrit.libreoffice.org/39290
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
after commit 528632660b72b105345945c13c5b68060d94a91b
"convert ErrCode to strong typedef"
Change-Id: I31727d89f6450e5d1d0930abf7dba7a32f8b894a
|
|
would have preferred to re-use o3tl::strong_int, of which this
is a modified copy, but there are lots of convenience accessors
which are nice to define on the class.
Change-Id: I301b807aaf02fbced3bf75de1e1692cde6c0340a
Reviewed-on: https://gerrit.libreoffice.org/38497
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This is a follow-up to 45a7f5b62d0b1b21763c1c94255ef2309ea4280b "Keep WID ranges
sorted, and join adjacent ones". While SfxItemSet::MergeRange relies on the
m_pWhichRanges being sorted (and, under DBG_UTIL, asserts if they are not), the
various SfxItemSet constructors curiously only check (via assert or DBG_ASSERT)
that each individual range has an upper bound not smaller than its lower bound.
Arguably, all SfxItemSet instances should fulfill the stronger guarantees
required and checked by MergeRange.
And in many cases the ranges are statically known, so that the checking can
happen at compile time. Therefore, replace the two SfxItemSet ctors taking
explicit ranges with two other ctors that actually do proper checking. The
(templated) overload taking an svl::Items struct should be used in all cases
where the range values are statically known at compile time, while the overload
taking a std::initializer_list<Pair> is for the remaining cases (that can only
do runtime checking via assert). Most of those latter cases are simple cases
with a single range covering a single item, but a few are more complex.
(At least some of the uses of the existing SfxItemSet overload taking a
const sal_uInt16* pWhichPairTable
can probably also be strengthened, but that is left for another day.)
This commit is the first in a series of two. Apart from the manual changes to
compilerplugins/clang/store/sfxitemsetrewrite.cxx, include/svl/itemset.hxx, and
svl/source/items/itemset.cxx, it only consists of automatic rewriting of the
relevant SfxItemSet ctor calls (plus a few required manual fixes, see next).
But it does not yet check that the individual ranges are properly sorted (see
the TODO in svl::detail::validGap). That check will be enabled, and the ensuing
manual fixes will be made in a follow-up commit, to reduce the likelyhood of
accidents.
There were three cases of necessary manual intervention:
* sw/source/core/unocore/unostyle.cxx uses eAtr of enum type RES_FRMATR in
braced-init-list syntax now, so needs explicit narrowing conversion to
sal_uInt16.
* In sw/source/uibase/uiview/formatclipboard.cxx, the trailiing comma in the
definition of macro FORMAT_PAINTBRUSH_FRAME_IDS needed to be removed manually.
* In svx/source/svdraw/svdoashp.cxx, svx/source/svdraw/svdotext.cxx,
sw/source/uibase/app/docstyle.cxx, sw/source/uibase/shells/frmsh.cxx,
sw/source/uibase/shells/grfsh.cxx, and sw/source/uibase/shells/textsh1.cxx,
some comments had to be put back (see "TODO: the replaced range can contain
relevant comments" in compilerplugins/clang/store/sfxitemsetrewrite.cxx).
A few uses of the variadic form erroneously used nullptr instead of 0 for
termination. But this should have been harmless even if promoted std::nullptr_t
is larger than promoted sal_uInt16, assuming that the part of the nullptr value
that was interpreted as sal_uInt16/promoted int was all-zero bits. Similarly,
some uses made the harmless error of using 0L instead of 0.
Change-Id: I2afea97282803cb311b9321a99bb627520ef5e35
Reviewed-on: https://gerrit.libreoffice.org/38861
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
|
|
since the first is #define'd to the second, and offers no extra value
Change-Id: I2c67e09ea3aa5361b8e7dfe7a20858c6ae054450
Reviewed-on: https://gerrit.libreoffice.org/38406
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iadc660025e1501118cb0a659d92d42af924b1c6f
|
|
First tests for AutoText DOCX import:
+ checking if nothing will be imported when
there is no AutoText, only normal content
+ checking count of loaded entries
+ checking names of entries
+ checking first and last paragraph
Windows fix: Added swdocxreader to msword library
Change-Id: I3cf02572dd85e72b1566ce523e373753a4bd346c
Reviewed-on: https://gerrit.libreoffice.org/37176
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
|
|
This is a bad idea as the function is sometimes used to check if a
SwFormat has been deleted, which can happen in Undo.
Replace with ContainsFormat() and IsAlive(), and don't require a
non-const SwFormat parameter so that the dynamic_cast using one
isn't called all the time but only called once where it's safe.
Change-Id: Ib74b79629f5c8ed432a912ada5974a6d816e7d31
|
|
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
|
|
Change-Id: Idd2cdd9696a15ca5a215fc42b46cc470c4c25a28
Reviewed-on: https://gerrit.libreoffice.org/36550
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
|