Commit bd66a0201f did this for editengine
text in shapes, but it turns out it's a little more complicated in sw.
The SwTaggedPDFHelper nicely lived stack allocated, but list labels are
SwLinePortions inside a paragraph, and they can't be painted separately,
so if there's a list label the creation of LBody has to be delayed until
that is processed.
The SwNumberPortion can't even generate the Lbl itself, because there
can be multiple portions, they are broken across lines and at script
boundaries, and checking their follow flags is also tricky (see previous
commit).
Change-Id: I0dd383089a7ca0edddf6f805e79615c611a446f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148556
Tested-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Somehow a SwNumberPortion can be split into 2 SwNumberPortions and the
2nd one ends up with a '\t' character that is then removed from the
portion and via some HookChar thing converted to a SwTabLeftPortion.
To add further insult, the SwTabLeftPortion is inserted between the
first SwNumberPortion and the empty SwNumberPortion, and then
SwLineLayout::CalcLine() deletes the empty one but the first one still
has the m_bHasFollow flag set.
Change-Id: Ic902ed7f35d7faf168bef636b869e5cd9e2435ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148555
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
... drop reference"
It's no longer needed, since the original problem is solved
differently with Change-Id Id0c241d68ec4fbf933312008f7d0ee86bd3eab0c
("tdf#140659 gtk a11y: Don't unset model when freezing icon view")
in place.
This reverts commit 4e8331b77a2dcad2b10d3ca5b788711ea4e83a1b.
Change-Id: I5c94a1c610a807a09ab62577477135cc14dbcfa6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148558
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
As described in Change-Id I10249bbd8c684e89174ba91ce4690d37c24b5d5c
("tdf#153657 gtk3 a11y: Use IconView item tooltip as a11y desc"),
freezing the gtk3 icon view previously resulted in the accessible
child objects not being created at the time of insertion,
so setting the accessible description on them doesn't work.
As a result, e.g. the Orca screen reader would not properly
announce the focused item in Math's elements dock window when using
the gtk3 VCL plugin.
This was caused by clearing the model in
`GtkInstanceIconView::freeze` (and resetting it in
`GtkInstanceIconView::thaw`).
Stop doing that to fix the problem.
Thanks to Caolán for this suggestion!
This also allows to revert
commit 4e8331b77a2dcad2b10d3ca5b788711ea4e83a1b
Date: Wed Dec 7 13:20:03 2022 +0000
Resolves: tdf#152411 clear before freeze to let gtk a11y drop reference
in a follow-up commit since the problem described in
tdf#152411 also no longer happens with this in place.
Also switch the previous check + SAL_WARN to an assert
now that the underlying cause has been addressed.
Change-Id: Id0c241d68ec4fbf933312008f7d0ee86bd3eab0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148535
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Similar to how the non-gtk SalInstanceIconView does since
commit 2a28ebeef5
Date: Wed Jun 1 11:18:26 2022 +0300
Accessibility for IconView
, use the tooltip as accessible description for
the gtk3's IconView implementation as well.
(Another alternative might be to always require passing
a text/name in weld::IconView::insert, e.g. by turning the
`const OUString* pStr` param into a `const OUString&`
and adding a bool param to indicate whether the text
should be shown on screen or only used for the accessible
*name*. Might make sense to reconsider that when looking into
the remaining aspects from the IconView a11y discussions in [1]
and [2].)
Together with Change-Id Ic77cf485ed4b2b413d3d3368c15b788d693111cd
"tdf#153657 a11y: Set tooltip/a11y desc for fontwork styles",
this makes Orca announce the items in the fontwork
gallery by their title when using the gtk3 VCL plugin as well.
Setting the accessible description for the items in Math's
elements side bar still doesn't work with this change by
itself, since the fact that the IconView is frozen
(s. the call to `freeze()` in `SmElementsControl::addElements`)
apparently prevents the creation of the accessible child objects
on insertion (s. upcoming Change-Id Id0c241d68ec4fbf933312008f7d0ee86bd3eab0c,
"tdf#140659 gtk a11y: Don't unset model when freezing icon view").
[1] https://gerrit.libreoffice.org/c/core/+/135226
[2] https://gerrit.libreoffice.org/c/core/+/135593
Change-Id: I10249bbd8c684e89174ba91ce4690d37c24b5d5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148534
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add a map between ID and title and use that in a newly
introduced tooltip query handler to return the item's title
so it is shown as a tooltip.
This also implies that the title is used as the accessible
description for the items for the non-gtk case, see
`SalInstanceIconView::EntryAccessibleDescriptionHdl`,
introduced in
commit 2a28ebeef5
Date: Wed Jun 1 11:18:26 2022 +0300
Accessibility for IconView
Therefore, the NVDA screen reader on Windows now
announces the items using their title when they
receive focus.
Change-Id: Ic77cf485ed4b2b413d3d3368c15b788d693111cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148523
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The problem was that the bugdoc has a split row and the minimum row
height was only enforced for the master row, not the follow one.
It seems this behavior started with commit
6f5024de2e (tdf#104425 sw: split rows
w/large min height (fix layout loop), 2016-12-08), because that had a
case where the minimum row height didn't fit a page, but moving to the
next page didn't help, so we hit a loop. The trouble is that when we do
have enough space in the body frame, then not enforcing a minimal row
height for each part of a split row leads to bad layout, since the row
height will be smaller, so content after the table moves up.
Fix this by checking if the body frame has enough space
and not consider the height of the master + previous follows in that
case.
This is just for floating tables at the moment, doing this in general
may need more work. With this, orig-nocompat.docx from tdf#61594 renders
correctly with SW_FORCE_FLY_SPLIT=1.
Change-Id: I922434db8455aba03ebeab9eae845003935f1d77
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148595
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Decided (e.g., in tdf#147004, comment 20) to make UI reflect current
actual behavior. Therefore, this patch changes "Outline level"
to "Up to level" and its tooltip and extended tip are modified to
reflect actual behavior.
Change-Id: I6d7d14d6b6bc8f0000e748ddf15690474374e360
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148511
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
* Update helpcontent2 from branch 'master'
to 4bf58601f847370be00b3e600a7a3fdac9e6b315
- tdf#153549 more "chapter" to "heading" adjustments
Possibly this is the final patch needed to change
"Tools - Chapter Numbering" to "Tools - Heading Numbering".
Also, "chapter" is changed to "heading" where appropriate.
Where appropriate or necessary, corrections or command
updates were made.
Change-Id: I00a72a3c09909f2cf0a0ebe1320f5744c4ae4b68
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148506
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
* Update helpcontent2 from branch 'master'
to d1b4263237f2cb02929156ff556cc12f6460380f
- tdf#153561 adjustments for "Format" because of widget name change
Change-Id: Iaead2cc332a8889f8c174f1ccf84e9cdfbfc154c
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148507
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
Tested-by: Jenkins
* Update helpcontent2 from branch 'master'
to 6a25d11512dc078fc47c546585c9663b5804a3eb
- tdf#153561 "Chapter No." -> "Numbering" because of widget name change
also corrections to "Numbering" and "Entry text" descriptions
refactor <h2>,<h3> and remove <xml-lang>
Change-Id: I19fe8d8ecf74f3526a4d10b18a76ad1da47ad5c3
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/147370
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
since:
commit d062f097cc
Date: Wed Mar 8 02:14:11 2023 +0300
Simplify usage of BinaryDataContainer
It is always used to store data read from streams
Change-Id: I33d237a801b1cdf47b85b3fd3522c398ba08068b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148524
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This patch replaces sal_uLong usages in cui directory.
changed m_nOldCount in cui/source/inc/dbregister.hxx to size_t.
m_nOldCount has been used in dbregister.cxx where it is initially
assigned a value 0, later on it has been assigned the value
returned by registration.size() which returns type size_t.
Line 272 in cuigaldlg.cxx mrTakenList with type TokenList_impl
is pushed back with variable nPos of type sal_Int32 hence
changed TokenList_impl to store sal_Int32 types.
Change-Id: Ie0ba284dc4592cc69a1ded2fe232d18aaec3c92a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148237
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
ever since
commit af4e20426a
Author: Michael Stahl <michael.stahl@allotropia.de>
Date: Tue Dec 21 15:19:33 2021 +0100
tdf#135061 sw_redlinehide: create frames following hidden table
Specifically, remove the line
pFrameNd = &aIdx.GetNode();
because the pFrameNd is then immediately overwritten with nullptr.
Also re-indent the resulting code and removing an unnecessary block scope.
Change-Id: Ic4d40ee7835ed73038eba9da7ec72670cf0b97b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148384
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
...that hit at least with GCC 13 trunk and --enable-optimized,
> In file included from sw/inc/tox.hxx:35,
> from sw/inc/doc.hxx:35,
> from sw/source/core/inc/AccessibilityCheck.hxx:14,
> from sw/source/core/access/AccessibilityCheck.cxx:11:
> In constructor ‘sw::ClientIteratorBase::ClientIteratorBase(const SwModify&)’,
> inlined from ‘SwIterator<E, S, <anonymous> >::SwIterator(const TSource&) [with TElementType = SwTextFrame; TSource = SwTextNode; sw::IteratorMode eMode = sw::IteratorMode::UnwrapMulti]’ at sw/inc/calbck.hxx:364:68,
> inlined from ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’ at sw/source/core/access/AccessibilityCheck.cxx:937:99:
> sw/inc/calbck.hxx:295:32: error: storing the address of local variable ‘aIter’ in ‘sw::ClientIteratorBase::s_pClientIters’ [-Werror=dangling-pointer=]
> 295 | s_pClientIters = this;
> | ~~~~~~~~~~~~~~~^~~~~~
> sw/source/core/access/AccessibilityCheck.cxx: In member function ‘virtual void sw::{anonymous}::FakeCaptionCheck::check(SwNode*)’:
> sw/source/core/access/AccessibilityCheck.cxx:937:14: note: ‘aIter’ declared here
> 937 | auto aIter = SwIterator<SwTextFrame, SwTextNode, sw::IteratorMode::UnwrapMulti>(*pTextNode);
> | ^~~~~
> sw/inc/calbck.hxx:289:53: note: ‘sw::ClientIteratorBase::s_pClientIters’ declared here
> 289 | static SW_DLLPUBLIC ClientIteratorBase* s_pClientIters;
> | ^~~~~~~~~~~~~~
(And -Wdangling-pointer is unknown to older GCC versions, so would cause
-Werror=pragmas there.)
Change-Id: I64e53b52e04ab34da42c7adc54b8d8cb46123dfe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148515
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
There is only a single SwDoc instance in many cases, having an easy
to access pointer to that is helpful when the backtrace doesn't include
a frame in sw/ code.
This allows something like 'print SwDoc::s_pLast->dumpAsXml(0)' in gdb,
even if e.g. the current frame is xmloff/, without hunting for a parent
that is in sw/.
Change-Id: Id70baf7919ef6fde7b834704741dab70531e7e2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148522
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
FillGradient, which is a awt::Gradient, has many features which cannot
be represented in the <w14:textFill> element in docx. Therefore often
only workarounds are possible.
ELLIPTICAL and RADIAL are exported to 'circle', SQUARE and RECT to
'rect'. 'Angle' is ignored. A focus point is used instead of a focus
line.
LINEAR and AXIAL are exported to 'lin'. AXIAL is done be compress and
mirroring the color stops. Using Words feature of reflecting a gradient
would prevent detecting 'axial' in the current import filter.
'Border' is exported by introducing additional color stops.
'StepCount' is ignored. A workaround using additional color stops is
possible, but would require a simultaneous change of the import filter.
'StartIntensity' and 'EndIntensity' are exported as 'lumMod'.
Theme colors are considered where they can currently occur. But
tdf#151882 is yet not fixed, so Word will not render them because of
missing Theme folder.
To allow 'lumMod' and theme color and RGB color as well, the color of
a color stop is hold in a struct.
In case of two color stops, the color stop at position 0% is doubled.
That way Word uses the same linear color transition as LO and not its
quadratic one. AXIAL too introduces two color stops at position 50%.
Emulating 'StepCount' would produce two color stops at same position
too. Therefore a std::multimap is used for the color stops.
The implementation has a lot local parts. If they should be useful
for Fontwork shapes in Impress/Draw, they can be moved and adapted
later. The implementation separates the calculation of the required
color stops from the generation of the markup, so using parts in
Impress/Draw is likely possible.
Change-Id: I1032ab8d37b6f112d66f85a30210ebda3ae54486
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148354
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
The bugdoc has a single table cell, and widow control is meant to move
the last 2 lines to the second page, but only one page was moved there.
The problem is that widow / orphan control was completely disabled
inside split table rows, but Word does this.
We know when a table comes from a Word document, so in that case enable
widow / orphan control inside split rows as well.
Do this only for in-fly tables for now, doing this in general would need
more work, as pointed out by CppunitTest_sw_layoutwriter's
testForcepoint76. It is an RTF file that doesn't open in Word, but we
would layout-loop on it if this would be enabled in general right now.
Change-Id: Ie37be61443a274f408e1124983d1d495de5636c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148521
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Add newline after certain tags in head section and paragraphs, to make generated xhtml easier to read.
Change-Id: I9562ef48d9dd1283110be4a45527616dce186681
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148026
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>