Commit Graph

484278 Commits

Author SHA1 Message Date
Noel Grandin
50b68c341f improve loplugin:unnecessarylocking
to find more locking we can remove

Change-Id: Ief7bc5ec2a1ff31f22a0ad366910b7fcc4725818
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148599
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10 11:34:00 +00:00
Seth Chaiklin
8ceb85cafb tdf#153735 update tooltip because outline level "Text Body" -> "None"
Change-Id: I2af0ba85bcd30c89e7948d6057ccbb6a1e64f449
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148503
Tested-by: Jenkins
Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2023-03-10 11:18:15 +00:00
Michael Stahl
9b38beadf9 sw: PDF/UA export: produce Lbl tagged element
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>
2023-03-10 10:59:26 +00:00
Michael Stahl
6c0105307e sw: fix stale SwNumberPortion follow flag
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>
2023-03-10 10:57:07 +00:00
Michael Weghorn
76fcddcd95 Revert "Resolves: tdf#152411 clear before freeze to let gtk a11y ...
... 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>
2023-03-10 10:48:44 +00:00
Michael Weghorn
1255e9b3c0 tdf#140659 gtk a11y: Don't unset model when freezing icon view
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>
2023-03-10 10:48:36 +00:00
Michael Weghorn
ba0e36e607 tdf#153657 tdf#140659 gtk3 a11y: Use IconView item tooltip as a11y desc
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>
2023-03-10 10:48:29 +00:00
Michael Weghorn
1fbf95190e tdf#153657 a11y: Set tooltip/a11y desc for fontwork styles
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>
2023-03-10 10:48:23 +00:00
Noel Grandin
66b0bc5585 simplify initialisation in *DatabaseMetaData
Change-Id: I1d7e107e22a98489e4d1013e14bb780e20d87c40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148594
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10 09:50:16 +00:00
Miklos Vajna
913b71dbe0 sw floattable: ignore height of masters in lcl_CalcMinRowHeight()
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
2023-03-10 09:39:57 +00:00
Seth Chaiklin
5e937a3d1e Update git submodules
* Update helpcontent2 from branch 'master'
  to f9538fa1e908f7a8ecbd5f0d27c4ff72a53ad294
  - tdf#153735 changes because outline level Text Body -> "None"
    
    Change-Id: I9e37dc4033133a29862837c46ba1dc7890db559d
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148614
    Tested-by: Jenkins
    Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
2023-03-10 09:21:24 +00:00
Pranam Lashkari
f973d0259d jsdialog: enabled Format Paragraph dialog (writer)
can be found from:
Tabbed view > Format > Paragraph
sidebar > Paragraph
Compact view > Format > Paragraph

Change-Id: I5b0e59c88017cb039f9e441be76c350bf39f9614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148398
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2023-03-10 09:13:15 +00:00
Heiko Tietze
dc238d75ba Resolves tdf#153735 - No outline level should not be called Text Body
Changed to [None]

Change-Id: I841664f432d9235ac5486af7d27ba141ce35cd48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148562
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-10 09:10:48 +00:00
Vojtěch Doležal
61d55b67b0 Moved target-url and use-target-url into loext namespace
Change-Id: I4307a20f34543d4a187b5e59f117b43371f6f6fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148559
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-10 08:54:49 +00:00
Paris Oplopoios
c1d6af3e9a sw lok: notify clients about view option changes
Send a string of the view options to the kit when the view changes

Change-Id: I89f65ff1d22a83a54dde35e39eb487edda0b58e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148078
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-10 08:48:23 +00:00
Seth Chaiklin
f5b7967b01 tdf#153243 Make "level" label and tooltip correspond to actual behavior
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>
2023-03-10 08:46:51 +00:00
Miklos Vajna
9c75a7c950 sw layout xml dump: extract SwColumnFrame::dumpAsXml() from SwFrame
Ideally SwFrame should not really know anything about columns.

Change-Id: I0672dc685e846caa08ec9fe329ef45ec34aff04a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148563
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-10 08:35:50 +00:00
Noel Grandin
13a9d32cd1 simplify initialisation of some pool defaults
Change-Id: I794e528a08a5a76cef1955f5c4f3e594f1e90f4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148537
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10 08:31:15 +00:00
Rizal Muttaqin
83ea56910c tdf#154106 Colibre: Add Bulb assets for ToTD
Change-Id: I074cf1dc2d5f439b1e896767209519fb2b0ad01c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148569
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-10 03:16:18 +00:00
Seth Chaiklin
688f73c06e Update git submodules
* 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>
2023-03-10 02:02:30 +00:00
Seth Chaiklin
28e16dfab5 Update git submodules
* Update helpcontent2 from branch 'master'
  to 0affdd29956c531bf624da7c69c780e8ee2f14a6
  - tdf#153561 add <widget> to N#
    
    Change-Id: I1d8b36b06741a303b6e4a67e863b531a9b7dc55d
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/148512
    Reviewed-by: Seth Chaiklin <sdc.blanco@youmail.dk>
    Tested-by: Jenkins
2023-03-10 01:51:07 +00:00
Regina Henschel
be74558135 rename struct gradientStopColor to GradientStopColor
This is a follow-up to commit d95a09c1fc.
The change has been requested by reviewer Miklos Vajna.

Change-Id: If59cee0b757ef0afe0b48c5bce9d9e3024e81e4f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148566
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-03-09 22:20:51 +00:00
Caolán McNamara
b6d1cb8874 cid#1521901 Pointer to local outside scope
Change-Id: I38e76440606afb65a8c1ce419c446e234a513659
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148550
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09 20:17:15 +00:00
Vinit Agarwal
d898620cb4 tdf#147021 - Use std::size() instead of SAL_N_ELEMENTS() macro
Modified updatecheck.cxx where SAL_N_ELEMENTS (nRetryInterval) was used
to get the size of the array. Now it is replaced with std::size().

Change-Id: Ib43ff3ecaeb8e853f14d5b0be45654596a817ec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148367
Tested-by: Hossein <hossein@libreoffice.org>
Reviewed-by: Hossein <hossein@libreoffice.org>
2023-03-09 19:44:36 +00:00
Mike Kaganski
9aca8e1333 Use officecfg instead of SvxLanguageToolOptions
Change-Id: Ia9add4ff3ebe20ba491e33de1e9a2644a48ef7a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148548
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-09 19:36:57 +00:00
Xisco Fauli
92598f5a5e CppunitTest_sw_layoutwriter: split in two
it already has 110 tests

Change-Id: I4f218c873b5771e46cd2037249f0bb9db5f6b808
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148554
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-09 19:09:45 +00:00
Rizal Muttaqin
560a6307a1 tdf#153465 & tdf#153344 Sukapura Dark with 16px status bar icons
Change-Id: If255495c43f4606b7931b86901449453189e9994
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148551
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-09 18:21:20 +00:00
Miklos Vajna
ff1640fd59 sw layout xml dump: allow invoking this from out sw/ in a debugger
This is similar to SwDoc::s_pLast, but for the layout.

Change-Id: I48bb53a7595a4cec3fe47c563e91db671643d6b7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148529
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2023-03-09 18:14:31 +00:00
Seth Chaiklin
785bd2af80 Update git submodules
* 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
2023-03-09 17:46:39 +00:00
Noel Grandin
2b87bcf08c remove some unnecessary locking in TypeDetection
the FilterCache class is already internally thread-safe

Change-Id: Ic869bda1257cc61fc69557624c8d6e169645b23a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148538
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-09 17:33:18 +00:00
Heiko Tietze
49379a0b3f Resolves tdf#131177 - Replace Hard-Coded TotD bulb by themeable icon
Change-Id: I25006f64436a72f554450929b1b649478b02cbc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148536
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2023-03-09 17:07:04 +00:00
Tünde Tóth
ed77023797 tdf#148026 DOCX export: fix link with target frame and anchor
Hyperlink with target frame and anchor didn't work after export.

Change-Id: I84980e30d2e1d6d53cfe201cf4cac60354151aba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148041
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
2023-03-09 16:46:36 +00:00
Caolán McNamara
153313dd19 cid#1521899 Dereference after null check
Change-Id: I6cbdabfe794e37f7e00fa730f672bf8318b86b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148549
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09 16:27:46 +00:00
Seth Chaiklin
369f65d4aa Update git submodules
* 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>
2023-03-09 16:13:36 +00:00
Julien Nabet
ee19ca2286 Wrong value for VT_UI4 (sd/propread)
9 instead of 19
see https://learn.microsoft.com/en-us/windows/win32/api/wtypes/ne-wtypes-varenum

Change-Id: I00283e117a2a2fd2d5165047bf7dcad82ffc18ca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148446
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-09 12:48:06 +00:00
Mike Kaganski
3579343ec0 Some refactoring and deduplication
Change-Id: I443bd562bc9df6636bf71a230a05a12e443c6614
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148532
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-03-09 12:08:16 +00:00
Caolán McNamara
33153adfc2 ofz#56819 Null-dereference
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>
2023-03-09 11:50:42 +00:00
Arvind K
013fbfb592 tdf#114441 Convert sal_uLong to better integer types
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>
2023-03-09 11:01:51 +00:00
Caolán McNamara
bef33a6c59 ofz#56818 Integer-overflow
Change-Id: I4be620619e407be132b92f4ce82b7a26dbc34406
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148531
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09 10:49:01 +00:00
Noel Grandin
ab8ebc65af remove dead code in SwNodes::FindPrvNxtFrameNode
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>
2023-03-09 10:28:51 +00:00
Caolán McNamara
59b0f67675 ofz#56826 Heap-use-after-free
since:

commit abda72eeac
Date:   Mon Feb 20 00:32:22 2023 +0100

    tdf#82984 tdf#94915 zip64 support (import + export)

Change-Id: Iffc1c54b3ccc5464e217d7f94ecc34b57ec1afb1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148526
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09 10:18:42 +00:00
Yousef_Rabia
ddd2e00278 tdf#143148 Use pragma once instead of include guards
Change-Id: I1c175753242783d83b5b1edc9b8b4cee2a5bd277
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148449
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-03-09 10:12:10 +00:00
Stephan Bergmann
b48371ba61 Silence false -Werror=dangling-pointer=
...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>
2023-03-09 10:11:19 +00:00
Seth Chaiklin
4322248194 add a missing space in formatting
Change-Id: I17263a1a29ba0bb0821d11234d05b55f0697e34c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148496
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-09 10:06:04 +00:00
Miklos Vajna
ab61be6ed5 sw doc model dump: allow invoking this from outside sw/ in a debugger
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>
2023-03-09 09:54:03 +00:00
Rizal Muttaqin
db06ae5475 tdf#149144 Icons for sm Formula Editor in Sidebar Deck
Change-Id: I851e0e45df3331012eddcaa3240c6ffb27054e57
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148520
Tested-by: Jenkins
Reviewed-by: Rizal Muttaqin <rizmut@libreoffice.org>
2023-03-09 09:14:56 +00:00
Caolán McNamara
45d335e388 crashtesting: assert seen on load of moz1297206-1.svg
Change-Id: Ide16b0086ef81bb9580b93f63c2c5220459d74d3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148478
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-03-09 08:28:54 +00:00
Regina Henschel
d95a09c1fc tdf#51195 add docx export of gradient fill of Fontwork shapes
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>
2023-03-09 08:25:51 +00:00
Miklos Vajna
78b1631e96 sw floattable: enable widow / orphan control in split rows
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
2023-03-09 08:21:29 +00:00
Franklin Weng
d2e8705c9c tdf#153839: add newline after certain tags
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>
2023-03-09 07:43:14 +00:00