Age | Commit message (Collapse) | Author | Files | Lines |
|
for indexing into node children. Replaces various usage
of sal_uLong, tools::Long, sal_uInt32 with an underlying
type of sal_Int32.
Also add a NODE_OFFSET_MAX constant to replace usage
of ULONG_MAX
Change-Id: I2f466922e1ebc19029bb2883d2b29aa4c0614170
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123892
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
which is often hot on doing document layout
Change-Id: Ie78b6a6da4dba38b4ab682f4e1b9d86cc8171918
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120938
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Wrapping this in a scope based helper is mostly lipstick on a pig, but
at least one cant forget toggling back this way. Apparently, this flag
was already toggled in recursive calls without checking previous state,
which is likely buggy.
In the long run, this should a/ never be used recursively or better b/
not be a global flag at all.
Change-Id: Id3554d2acb94d565611701c046ca4d8669594cea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118371
Tested-by: Jenkins
Reviewed-by: Bjoern Michaelsen <bjoern.michaelsen@libreoffice.org>
|
|
See tdf#42949 for motivation
Change-Id: Ifc253bf800bb1468b5774663a93f4fb30bec81d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113657
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I4bb84c3f401aba8a3dede9cec3a7f2187a2ba02a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106473
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
... SwLooping
See tdf#94879 for motivation.
Change-Id: I4cf118cd7e68069ef3a73077b5340f7b93d87319
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105911
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
... SwOszControl
See tdf#94879 for motivation.
Change-Id: If36742218a4deca1b688ef8996702c5985310110
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105472
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
Change-Id: If4209f165912f5026d8bb2c311314dba8aaba1ff
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102518
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I67fd1a269d960174b88c57da4a0588f5d9252660
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99885
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
... SwURLStateChanged
See tdf#94879 for motivation.
Change-Id: Id20c322dc79f385cfa067a999c76938ee5896dcd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96311
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
|
|
from 11m46 to 11m21
Used ClangBuildAnalyzer to find headers that took a long time
to parse (in total, across all modules).
(*) moved the boost stuff out of sw/inc/docary into a new header.
(*) make sw/inc/ndtxt no longer include doc.hxx
Change-Id: Ia1d4ebddb4ddd4ec4ffbc011f4a5e24a42b46d3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89808
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...now that macOS builds are guaranteed to have std::optional since
358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to
Xcode 11.3 and macOS 10.14.4".
The change is done mostly mechanically with
> for i in $(git grep -Fl optional); do
> sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \
> -e 's/\<o3tl::optional\>/std::optional/g' \
> -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i"
> done
> for i in $(git grep -Flw o3tl::nullopt); do
> sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i"
> done
(though that causes some of the resulting
#include <optional>
to appear at different places relative to other includes than if they had been
added manually), plus a few manual modifications:
* adapt bin/find-unneeded-includes
* adapt desktop/IwyuFilter_desktop.yaml
* remove include/o3tl/optional.hxx
* quote resulting "<"/">" as "<"/">" in officecfg/registry/cppheader.xsl
* and then solenv/clang-format/reformat-formatted-files
Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
The bugdoc has this in meta.xml:
meta:page-count="819" meta:paragraph-count="302"
... for which SwLayHelper::CalcPageCount() cunningly estimates a maximum
of 0 paragraphs per page, and at that rate an infinite number of pages
are required...
Not sure what a reasonable minimum should be, paragraphs could be 16
pages long even with 64k limit, but it does appear unlikely.
(regression from 7e8b4756d95057f069467b34e7849f9354856578 which disabled
the use of the layout-cache in the bugdoc)
Change-Id: Icd9ab145cc2f0714b50de9b5b4a1ef10ac1d49a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89106
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
If SwFormatPageDesc is inited like that GetNumOffset() cannot have
value.
Change-Id: I4f303148c82541ef9d8fa6284018cfba35f20524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88980
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
This mostly reverts commit 14bb680949b47332d2921cc68f75340b31ad5c32 and
replaces it by a hopefully better approach: if the first page in the
document has an even number, it will become a right page, and "toggle"
the document so that even pages are right pages and odd pages are left
pages.
This is closer to what Word does; the tests adapted in the above commit
were actually regressions.
Add a new function IsRightPageByNumber() to determine how the page
number offsets should be interpreted.
Also make it explicit that even/odd and right/left page are no longer
synonymous by renaming various "Odd" variables.
Historically documents that start with even page number didn't work well
anyway; before the above commit you'd get a left page followed by a left
page followed by a right page, which is clearly nonsense if the page
style differs between left and right pages - so hopefully we can do
without a compat setting for those.
There is still one situation where an empty page is inserted before the
first page: if the page style is "Left Page"; this appears to be
impossible in Word so we'll have issues exporting that to Word formats
anyway.
Testing:
Writer pre-commit; LO 5.4/OOo 3.3:
1.odd -> right, 2.even -> left
1.even -> left, 2.odd -> right + inserts a blank page on the right
after reload:
1.even -> left, 2.odd -> left, no empty page
Writer w/ commit; LO 6.0+:
1.odd -> right, 2.even -> left
1.even -> left, 2.odd -> right + blank page as first page (right)
after reload:
1.even -> left, 2.odd -> right + blank page as first page (right)
Word:
1.odd -> right, 2.even -> left
1.even -> right but left style, 2.odd -> left but right style
[technically uses terminology even/odd instead of left/right, but if
mirrored, the "inner margin" is always the same and leads to
interpretation of left/right]
Writer and Word appear to agree on inserting empty pages on
SwFormatPageDesc items/Word section breaks: both even-ness of an
explicit page number and "Left Page" only page style or explicit
even/odd section break may insert empty page.
A useful improvement would be to detect in Word import filters that the
first page is even numbered and then invert the mapping of all of the
page styles, i.e. odd header/footer->left instead of right, and if
mirrorMargins, pgMar left -> inner instead of outer.
Change-Id: Ibed0dbf888c120a3a7d11892f40d07ffb5bc0b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88978
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
|
|
Change-Id: I9c0968bd93f41f983468ee7ba8a20e27c4866b32
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87954
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...with a boost::optional fallback for Xcode < 10 (as std::optional is only
available starting with Xcode 10 according to
<https://en.cppreference.com/w/cpp/compiler_support>, and our baseline for iOS
and macOS is still Xcode 9.3 according to README.md). And mechanically rewrite
all code to use o3tl::optional instead of boost::optional.
One immediate benefit is that disabling -Wmaybe-uninitialized for GCC as per
fed7c3deb3f4ec81f78967c2d7f3c4554398cb9d "Slience bogus
-Werror=maybe-uninitialized" should no longer be necessary (and whose check
happened to no longer trigger for GCC 10 trunk, even though that compiler would
still emit bogus -Wmaybe-uninitialized for uses of boost::optional under
--enable-optimized, which made me ponder whether this switch from
boost::optional to std::optional would be a useful thing to do; I keep that
configure.ac check for now, though, and will only remove it in a follow up
commit).
Another longer-term benefit is that the code is now already in good shape for an
eventual switch to std::optional (a switch we would have done anyway once we no
longer need to support Xcode < 10).
Only desktop/qa/desktop_lib/test_desktop_lib.cxx heavily uses
boost::property_tree::ptree::get_child_optional returning boost::optional, so
let it keep using boost::optional for now.
After a number of preceding commits have paved the way for this change, this
commit is completely mechanical, done with
> git ls-files -z | grep -vz -e '^bin/find-unneeded-includes$' -e '^configure.ac$' -e '^desktop/qa/desktop_lib/test_desktop_lib.cxx$' -e '^dictionaries$' -e '^external/' -e '^helpcontent2$' -e '^include/IwyuFilter_include.yaml$' -e '^sc/IwyuFilter_sc.yaml$' -e '^solenv/gdb/boost/optional.py$' -e '^solenv/vs/LibreOffice.natvis$' -e '^translations$' -e '\.svg$' | xargs -0 sed -i -E -e 's|\<boost(/optional)?/optional\.hpp\>|o3tl/optional.hxx|g' -e 's/\<boost(\s*)::(\s*)(make_)?optional\>/o3tl\1::\2\3optional/g' -e 's/\<boost(\s*)::(\s*)none\>/o3tl\1::\2nullopt/g'
(before committing include/o3tl/optional.hxx, and relying on some GNU features).
It excludes some files where mention of boost::optional et al should apparently
not be changed (and the sub-repo directory stubs). It turned out that all uses
of boost::none across the code base were in combination with boost::optional, so
had all to be rewritten as o3tl::nullopt.
Change-Id: Ibfd9f4b3d5a8aee6e6eed310b988c4e5ffd8b11b
Reviewed-on: https://gerrit.libreoffice.org/84128
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...to only use functions that are also available for std::optional (in
preparation for changing from boost::optional to std::optional):
* uses of get are replaced with operator * or operator ->
* uses of is_initialized are replaced with operator bool
* uses of reset with an argument are replace with operator =
(All of the replacements are also available for boost::optional "since forever",
so this change should not break builds against old --with-system-boost. An
alternative replacement for is_initialized would have been has_value, but that
is only available since Boost 1.68.)
Change-Id: I532687b6a5ee37dab28befb8e0eb05c22cbecf0f
Reviewed-on: https://gerrit.libreoffice.org/84124
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...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>
|
|
To complete this:
https://gerrit.libreoffice.org/#/c/78312/
This is a massive replace for lines ending with
".." instead of "..."
It passed "make check" on Linux.
Change-Id: I07fa7b2e30ba9ea17a1f9a5e21c57216ba958efe
Reviewed-on: https://gerrit.libreoffice.org/78356
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: Ie48d61e07ce44a3022b92cd295527b65532a64e7
Reviewed-on: https://gerrit.libreoffice.org/76773
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Except source/svdde/* which is WIN-specific
Also recheck include/svl
Change-Id: I32d3bcb6b14665c56c07a2f10526329b08c64cbe
Reviewed-on: https://gerrit.libreoffice.org/73630
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I7cd9837360e244741bfa22b4693fd221241daf12
Reviewed-on: https://gerrit.libreoffice.org/71833
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I6b7ee99bb38df882853e3695cd03dcc745c92318
Reviewed-on: https://gerrit.libreoffice.org/66035
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Just fix the TextFrameIndex / GetTextNode usages.
This does not make the layout cache actually work if IsHideRedlines is
enabled, hence the layout cache remains disabled in that case.
Change-Id: I9aa1fb490c3dd4fd26165f2e60513ec267857d78
|
|
Use range-based loop or replace with STL functions
Change-Id: I143e9a769e1c1bb0228933a0a92150f00e3e1f20
Reviewed-on: https://gerrit.libreoffice.org/63347
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: Ia11646ac8f2f57225a1cf37725c5e0742a8489d9
Reviewed-on: https://gerrit.libreoffice.org/57605
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
|
|
Change-Id: Ia652ff428c232b9307e41da8f6b9648f486f7179
|
|
Change-Id: I2378dd76100d335e24ec21f4cfe62afa61b4e0e4
|
|
Change-Id: If07efe4c15cfc28df38a9327856d39313ca78d50
Reviewed-on: https://gerrit.libreoffice.org/50078
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I753fcdd35d461880a8d8160213cabd465cfde967
Reviewed-on: https://gerrit.libreoffice.org/48189
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I18d224557173b9ae5f20399b05132f45f08022a4
Reviewed-on: https://gerrit.libreoffice.org/48544
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
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: I7d9f04262ab5420e9a14813fa1274bb9d01e3291
Reviewed-on: https://gerrit.libreoffice.org/45076
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idadd0a64e41cd02f5167b275081c3576a6224b12
Reviewed-on: https://gerrit.libreoffice.org/45075
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Isolated all Frame AreaDefinition and it's layout flags to
SwFrameAreaDefinition class which is now base for SwFrame.
Adapted calls to get/set and WriteAccess hekper classes accordingly.
This allows much deeper understanding what Writer is doing when
layouting it's frames and needed when reaction on such changes
is necessary
Change-Id: I96220a1d140e69c76cc63023aae26e4ed17f3504
|
|
Change-Id: Ife3c1b2391ad7beae8c7f31f796b1454709ddd26
|
|
Change-Id: I6cce40ec49dd5bd32d94fe06b9d2dabd368448be
|
|
Change-Id: I01f7b828fe2134411cc76639e880da46b415d767
|
|
To gain more control over changes of the Writer layout,
isolated mentioned members and replaced all calls with
inline methods for read and/or write access. Moved to
own class to also identify 'private' accesses reliably.
Change-Id: Ib0b7f852f5176744e860e2aad12dd13c9a906d68
|
|
Change-Id: Ifc3c4c31a31ee7189eeab6f1af30b94d64f2f92a
|
|
Change-Id: Ida715fad0c4587a9566184180bf159da12470dd7
Reviewed-on: https://gerrit.libreoffice.org/43207
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: I92fd035824f247dc61edfb18c54b960a7733fdf7
Reviewed-on: https://gerrit.libreoffice.org/42244
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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: I7206d3325b4bfedb852d559b68dc1678da524b41
|
|
ignore SAL_LOG type stuff in the destructor
Change-Id: If014382ca0c96edd3f2b325a28451d83b3d1f278
Reviewed-on: https://gerrit.libreoffice.org/37539
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I52ad9ac6d43881a02c4817ea7527761105a12786
Reviewed-on: https://gerrit.libreoffice.org/37529
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I604aa74e737894daa6e1878ac3ed61d9eeb6512a
Reviewed-on: https://gerrit.libreoffice.org/37296
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|