Age | Commit message (Collapse) | Author |
|
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>
|
|
Change-Id: I7206d3325b4bfedb852d559b68dc1678da524b41
|
|
change various ResId classes that use conversion operator to OUString to
functions that return a OUString
drop various defines
drop unnecessary toString calls
Change-Id: Ibeccdf2b91a46a2ed5b4b74e6024e301a023bc92
Reviewed-on: https://gerrit.libreoffice.org/37817
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
found by temporarily marking Reference as SAL_WARN_UNUSED.
Change-Id: I18809b62654467f890016adcc92576980ced393b
Reviewed-on: https://gerrit.libreoffice.org/37511
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4847b0f96033016e020212fb8d7331309db25b55
Reviewed-on: https://gerrit.libreoffice.org/37287
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iea88ddd619f10a2a2586ee24edbf07e246dcbb49
Reviewed-on: https://gerrit.libreoffice.org/37191
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9ccd69662f9d3a77d1921b3433b0e2f541960a90
Reviewed-on: https://gerrit.libreoffice.org/37020
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Idaf7d7e8e4da37e0ba423dca3e22dc6711ba806a
Reviewed-on: https://gerrit.libreoffice.org/36380
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1d52df4fe3f276ebf017aa7cfb7b313cefaf0844
|
|
Mostly generated using
make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"
Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.
Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6
Reviewed-on: https://gerrit.libreoffice.org/35722
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I2dab376d87804521aed6b6bd41ad7762830fa349
Reviewed-on: https://gerrit.libreoffice.org/35467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Use a static integer counter as identifier to each redline
Change few unit-tets that was testing redlines by using a hardcoded array
index. Instead use these unique redline identifiers now.
Change-Id: I63aec3fc8ab10d0dad0c936600d16e96999a2bcd
Reviewed-on: https://gerrit.libreoffice.org/35276
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: I5c7d1d47f347b3ce8de6e2e4995da8724a464941
Reviewed-on: https://gerrit.libreoffice.org/35045
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
|
|
See inline comment for reasons.
Also, move the SwRedlineTypeToOUString function as inline to same header
file containing redline types.
Change-Id: I9b4be4f104c095b2ccd8287d935347c81fd25974
Reviewed-on: https://gerrit.libreoffice.org/34950
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
|
|
and rename to SwFieldIds
Change-Id: I50d2b7550f68b4b020ffc1603f931c671c8e1de6
Reviewed-on: https://gerrit.libreoffice.org/34924
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
found with
git grep -nP '<<= OUString\(\w*[A-Za-z]+'
Change-Id: I43354842f1e0418fb292f2e8e0cb30f1229d1c67
Reviewed-on: https://gerrit.libreoffice.org/34864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
and related css::util::SearchOptions2
The TransliterationModules enum has it's constants spread over multiple
UNO enum/constant-collections - TransliterationModules and
TransliterationModulesExtra, which means that most code simply uses
sal_Int32.
Wrap them up into a better bundle so that only the lowest layer needs to
deal directly with the UNO constants.
Change-Id: I1edeab79fcc7817a4a97c933ef84ab7015bb849b
Reviewed-on: https://gerrit.libreoffice.org/34582
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9783b6b2839805189015dbad8a97128c89e0a4a9
|
|
Change-Id: I1a2239b596201bc0172f2a6ade177c10491be9c2
Reviewed-on: https://gerrit.libreoffice.org/34255
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
... instead of just sending the X, Y coordinates
Change-Id: Ie87b252ebfd64e806e1e5f66cfc27e77282cbaab
Reviewed-on: https://gerrit.libreoffice.org/33875
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: pranavk <pranavk@collabora.co.uk>
|
|
Change-Id: I2b6f0c922b0e70ecbf79f60831ff5d71cd1438fb
Reviewed-on: https://gerrit.libreoffice.org/33656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3a39b7adc44a61f1bd4379c2a46e559ad12e7184
|
|
... instead of just checking if its a root comment or reply one.
Change-Id: I2539e6893ee69bfe12911807504df49edf422be2
Reviewed-on: https://gerrit.libreoffice.org/33470
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
|
|
Change-Id: I1c3560ab4609c64da7a77e9a65febeb569ec1a3c
Reviewed-on: https://gerrit.libreoffice.org/33468
Reviewed-by: pranavk <pranavk@collabora.co.uk>
Tested-by: pranavk <pranavk@collabora.co.uk>
|
|
...(for now, from LIBO_INTERNAL_CODE only). See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.
Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly). The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually). There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).
Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code. Missing @throws
documentation has not been applied in such manual clean-up.
Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
instead of storing both a raw pointer and an uno::Reference
Change-Id: I94746e7fafcc7d2206ac0c1a6481e6006421529b
|
|
Change-Id: Ie418642242ada98d4a41f30bb6cefcd57f398ef0
Reviewed-on: https://gerrit.libreoffice.org/33472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
|
|
Change-Id: Id5d0a3cca9587f577000244a9776d7f1f61b5487
|
|
Change-Id: Ifed67e3c34663b056529719d78aa22f2a9f1da8d
|
|
Online is often used for taking minutes, and during that, people don't have
time to play with the formatting - so it is annoying when autocorrect goes in
the way.
Change-Id: Ia1794c46d3003198764f666951821f693d710653
|
|
Change-Id: Ib0f70ea6d2a4733b16048e03d7019cf735b3b353
|
|
The editeng-like approach is terribly annoying when typing, particularly in
bullet lists.
Change-Id: I66175579f801fa028273d9680d7383d8eb37bf28
|
|
Change-Id: Icb00102f064b845b33a072880c60a9aae5dc4a55
|
|
Change-Id: I003785715df7e72cbf398902aabb5c3fe900a2d7
|
|
commit 847e004e65ec3c35acff607588d15cd75a84f121
convert nsRedlineMode_t to typed_flags
...introduced some logical equivalency errors. A few static
redline functions utilize the correct logic, so use them to
simplify the code readability.
Change-Id: I4f5715b71dd4c8f2a6cea0c816637b1784892c0d
Reviewed-on: https://gerrit.libreoffice.org/30974
Reviewed-by: Justin Luth <justin_luth@sil.org>
Tested-by: Justin Luth <justin_luth@sil.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I1e0894f116e8288eb8b648ed3ac679be237806a3
Reviewed-on: https://gerrit.libreoffice.org/29845
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ifc54789d12d0b024ed28f13ec78b5c10afa902de
|
|
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>
|
|
These colors are used in the tiles, so it's a good idea if the client
can use matching colors for cursors and selections. But to be able to do
that, we need an API to expose these colors.
Change-Id: Ia688c07e6c300fecdf8dc428d5a3f000d1857387
|
|
including fixing a bug in SwXMLExport::exportDoc where it was ORing with
a constant from a different type: nsRedlineType_t::REDLINE_INSERT
Change-Id: I2bb154c9a35d106e64fd1a8b6e928d0384c9fafe
|
|
Change-Id: I731d93f9ab77e60880365c8e2f5e62221d8da5ad
|
|
Change-Id: I745b2f469e44b79a06a18bc5264aae75b096835c
|
|
Change-Id: Idd9414b4a10398130337e474fb8fd4063e3bd4f8
|
|
In case there are multiple SwView instances and SetRedlineAuthor() is
called with a non-empty string on them, switching views will keep the
SwModule redline author string up to date as expected.
Change-Id: I363221049dbacd67d7c8f4ff3e778f8032a3bc43
|
|
Change-Id: I12ccc8c7ba0885b3bacd0c17d430a853d327524b
|
|
This way a client can decide if the view cursor it gets is relevant (the
views show the same part) or not.
Change-Id: I7b274b28f0c4f0509df5071831acf50512eff640
Reviewed-on: https://gerrit.libreoffice.org/27311
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
Change-Id: I3231605c0468462a36d75318d0070e5e3c36f4d6
Reviewed-on: https://gerrit.libreoffice.org/27276
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
|
|
When changing the active view shell,
sw::DocumentLayoutManager::GetCurrentViewShell() is not instantly
updated, only when e.g. the focus changes. This means that calling
setView() + paintTile() pairs on random views typically did not use the
matching view shell, but the last one. This has a visible effect when
editing shape text, as the non-text-edit views had the outdated shape
text visible, unlike on the desktop.
Fix the problem by using SwDocShell::GetWrtShell() instead.
Change-Id: Ia4b67d0a8931692ed4fc5c5e97cc1a09ef81e647
|
|
Change-Id: I09c1ebaf5742e983ee05942a4c7c17c6aa5179cc
|