SwTextFrame 0x5dfb7a0 is join locked so doesn't GetFormatted() so
doesn't have a SwTextLineAccess created; add some defensive programming
just to make it not crash.
Whether this is the right fix or just a workaround for something going
wrong in the 179 layout stack frames is beyond my meager knowledge.
In case anybody has an obvious idea, the layout frames that are
currently being formatted (SwTextFrame or SwTabFrame) are:
#3 0x5dfb7a0 is master of 0x5e56330
#4 0x5e56330
#10 0x5e5f3f0 is follow of 0x5e56330
#19 0x5e60d30 SwTabFrame::Split
#30 0x5e56330
#44 0x5dfb7a0
#53 0x2cefae0 master of 0x5dfb7a0
#57 0x63d1440 SwTabFrame::MakeAll is follow of #58#58 0x5e106c0 SwTabFrame::MakeAll
#68 0x5e812d0
#77 0x5e11f80 is master of #68#86 0x2cef600 is master of #77#90 0x5f86c00 SwTabFrame::MakeAll
#91 0x63d0150 SwTabFrame::MakeAll
#98 SwFlowFrame::MoveFwd
#101 0x63cf3d0
#110 0x5e05ff0 is master of #101#119 0x5e0c700 is master of #110#128 0x5bd0ad0 is master of #119#136 0x5f8b800 is master of #128#145 0x86b29a0 is master of #136#154 0x2c37340 is master of #145#158 0x5e04ab0 SwTabFrame::MakeAll
#168 0x2c371a0
#173 0x5e16340 SwTabFrame::MakeAll
Change-Id: I716b5faec1512cbf1fbdb04a436da302bd628c51
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>
Switch underline font color if it is from the underline color
of the portion. If the underline color is auto, take the font
color into consideration.
Change-Id: I81a0e100cd024add603b574f07e10b5e3a785d0b
Reviewed-on: https://gerrit.libreoffice.org/41090
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
In standard mode the text grids are rectangle and do not have
dedicated space for ruby text. The ruby text either overlap
with base text of the last line or clipped ( after scrolling ).
Move ruby text inside the grid in standard mode as if there
is no grid, and algin text to the center to keep the original
text-to-text alignment behavior.
Change-Id: Ia75ee016f9d492e4e73da6d7245aaeff40cbe1f3
Reviewed-on: https://gerrit.libreoffice.org/40632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
* first, a non-const Date* may leave the impression that one could change the
NullDate through the pointer, which is only partly successful; luckily no one
did that
* second, there is always a NullDate so checking for nullptr is superfluous
* third, the pointer was dereferenced (maybe after a check) everywhere to
obtain the NullDate, luckily..
Change-Id: I3c3a788ba0336596ac6bde4c96e77a0cdb7a4a95
This is a follow-up to 45a7f5b62d "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>
to markup dtors that coverity warns might throw exceptions
which won't throw in practice, or where std::terminate is
an acceptable response if they do
Change-Id: I32b94814e8245372e1d1dc36be0d81e3564042f4
Reviewed-on: https://gerrit.libreoffice.org/38318
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Do not treat the line as full if the chacracter following
the hanging punctuation is a line break, so that the line
break is placed after the hanging punctuation instead of
at the beginning of the next line.
Change-Id: Ia6e07cf457b3e1ba39700eb6d6dc74e4b57b64de
Reviewed-on: https://gerrit.libreoffice.org/38216
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
Also
- rename SetOfByte to SdrLayerIDSet
- add asserts in SdrLayerAdmin::GetUniqueLayerID so that we don't
allocate overlapping SdrLayerID values
- add a new constant SDRLAYERPOS_NOTFOUND to be returned from
SdrLayerAdmin::GetLayerPos
Change-Id: I3bb3489f9338e3d02c4040bcbd811744699941c8
Reviewed-on: https://gerrit.libreoffice.org/37467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>