Commit graph

493750 commits

Author SHA1 Message Date
Caolán McNamara
8f7cb2b747 use member init list
Change-Id: I09dea90e3e3f3fd0a4047b989329a027f788f695
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164148
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 16:43:47 +01:00
Caolán McNamara
9fcee419dd if we rearrange, we don't need to create maLanguageTag twice
Change-Id: I2c8ad9999adc406dc850c59b48e49681099dc054
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164147
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 16:23:02 +01:00
Caolán McNamara
023e59d028 there is only the one ctor, so drop misleading "preferred" comment
that suggests there are alternatives to choose from

Change-Id: Ica3367fae93f57f339bdc39b1cd91d47a2c9618e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164146
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 16:22:55 +01:00
Stephan Bergmann
41feb036b4 Some minimal Embind support for UNO type
...which should be rare enough in practical use that it should be sufficient to
only have toString-functionality for instances mapped from C++ to JS, but no
constructor for new instances on the JS side.  (The natural choice for the
latter would be a mapping of the C++

>     inline Type( TypeClass eTypeClass, const ::rtl::OUString & rTypeName );

constructor, but which requires a mapping for the css::uno::TypeClass UNOIDL
enum, which is only provided "later" through CustomTarget_static/unoembind, so
would at least conceptually be a bit dirty.)

This Embind mapping treats css::uno::Type as a smart pointer for the underlying
typelib_TypeDescriptionReference, to benefit from the fallback garbage
collection (in more recent Emscripten versions, at least) for smart pointers,
obviating the need to call .delete() on each instance mapped to JS.

Change-Id: Ic113967c264c28641dfd1fe159012c85519f4a9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164140
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 16:19:19 +01:00
Tomaž Vajngerl
6588c30ed4 vcl: separate scanline direction from ScanlineFormat
ScanlineFormat enum is used to indicate 2 things - scanline format
type and scanline direction (TopDown or BottomUp). This makes it
complex to manipulate with (using bit arithmetics) and hard to use
in general for no benefit, so this commit separates direction out
from the ScanlineFormat into ScanlineDirection enum. ScanlineFormat
is now just a simple enum class (not a bit field).

Change-Id: Iad55d0a4c8c07b71221c2facf7cf6a2d518fec0c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163943
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-29 16:12:18 +01:00
Caolán McNamara
6576317914 SvNumberFormatter::ImpConstruct is only used once by the single ctor
so fold it into the ctor

Change-Id: If063143ef47a8ab293edf3896fb51079d0e0284f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164144
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 15:13:20 +01:00
Caolán McNamara
0956dda717 cid#1169880 Uninitialized scalar field
Change-Id: I0ac1cc740f8d559cf8fa7b69947b6f152eae807a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164138
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 15:07:18 +01:00
Noel Grandin
1af510e951 Create an UNO service to do the symbol lookup in toolkit::AccessibilityClient
which means I can remove one usage of gb_Library_set_plugin_for, which is blocking linking the accessibility module into --enable-mergelibs=more

Change-Id: I8664ae1d2da4526cc7eab79b36e1589eb391d7c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163680
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 14:41:48 +01:00
Gülşah Köse
b1f84f5479 Online: Make tooltip message specific to function usage tooltip
Using same callback caused a regression about showing tooltip while
reviewing a change in writer. So we need a type to understand which
tooltip comes.

Signed-off-by: Gülşah Köse <gulsah.kose@collabora.com>
Change-Id: Iae26ff48f9c5c711af071fd66b5314e7bc96ff8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164093
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2024-02-29 14:24:20 +01:00
Caolán McNamara
676f4e6749 cid#1592640 Dereference after null check
also possibly could be
if (mpDocSh && !maPresSettings.mbInteractive)

Change-Id: If68df161f4f7e72d6598469e398c3a8b44e1eba9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164139
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 13:29:09 +01:00
Stephan Bergmann
f1a47d476a Improve sample code, missing delete()
Change-Id: I26ddbfb8b6742d816290d122d22c3c6c3ceabcc0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164143
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 13:25:54 +01:00
Xisco Fauli
e66f5cb353 tdf#159420: Show empty option even if empty is filtered out
in other columns

Regression from 89e032e9c4
"tdf#158314: show Empty and Error entries as non-selected and inactive...
...when hidden by autofilter."

The mbHasEmpties variable was added in
9c1826d980
"sc-perf: do not add a million empty filter entries just to sort and
discard"

Change-Id: Ie0d81fd57f68038fac62cb6a3442e93ed547167a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162752
Tested-by: Jenkins
Reviewed-by: Kevin Suo <suokunlong@126.com>
2024-02-29 12:59:36 +01:00
Mike Kaganski
18a5df4993 Restore a comment
Mistakenly removed in commit c2dca161c0
(Use <bit> instead of platform-specific intrinsics, 2024-02-29)

Change-Id: I6091a767aebcbb2543656cee2c27330fb6f9d16b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164141
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29 12:50:12 +01:00
Michael Weghorn
1b6963cda0 tdf#158030 qt a11y: Implement new QAccessibleAttributesInterface
Implement the new `QAccessibleAttributesInterface`
just added upstream to Qt in qtbase commit [1]

    commit fb5ffe862688a87cfc136113e067bcba0c49a7ae
    Author:     Michael Weghorn <m.weghorn@posteo.de>
    AuthorDate: Fri Nov 10 18:25:02 2023 +0100
    Commit:     Volker Hilsheimer <volker.hilsheimer@qt.io>
    CommitDate: Thu Feb 29 04:44:22 2024 +0000

        a11y: Add new QAccessibleAttributesInterface

, see also QTBUG-119057. [2]
This API is available with Qt >= 6.8.

That interface makes it possible to report
object attributes that are bridged to the platform a11y
layers.
Use it to bridge the attributes retrieved from
the `XAccessibleExtendedAttributes` UNO interface.

Together with the pending upstream qtbase change that
implements the AT-SPI bridge for Linux [3], the "level"
AT-SPI object attribute for headings in Writer
is correctly reported to AT-SPI, making the
Orca screen reader announce "Heading level N" as expected.

For now, map not explicitly handled attributes
as key-value pairs to Qt via the special
`QAccessible::Attribute::Custom` attribute,
which causes them to be mapped to AT-SPI unchanged, and
can e.g. be used for testing the tdf#158030 scenario.

For common attributes - like those specified in the
Core Accessibility API Mappings specification [4] -
suggesting to add new enum values to the
`QAccessible::Attribute` enum to upstream Qt
and using those instead should be considered for the future.

Related commit for gtk4:

    commit 3aca2d9776
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Thu Nov 9 15:31:57 2023 +0100

        gtk4 a11y: Handle the "level" object attribute

[1] https://code.qt.io/cgit/qt/qtbase.git/commit/?id=fb5ffe862688a87cfc136113e067bcba0c49a7ae
[2] https://bugreports.qt.io/browse/QTBUG-119057
[3] https://codereview.qt-project.org/c/qt/qtbase/+/517526
[4] https://www.w3.org/TR/core-aam-1.2/

Change-Id: Ibe357bfd72bb2dc6e44ad941e62737d5cac21e1c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159309
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-02-29 12:34:37 +01:00
Rafael Lima
3432dec53c tdf#159847 Fix "Duplicate Sheet" when two files have the same name
Prior to this fix, if two files were opened and had the same file name (but in a different directory), Calc might not create the duplicate sheet in the correct file.

Change-Id: I7cdbdd2f3dae6752a3b78bbdcb74fbecb5b24b68
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163763
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29 12:28:04 +01:00
Miklos Vajna
186de7178c tdf#158801 sw floattable: fix crash with headers and interactive editing
Regression from commit ce2fc5eb29
(tdf#158341 sw floattable: fix layout loop when fly is below the body
frame, 2023-11-29), open the bugdoc, add an empty paragraph at the
start, Writer layout crashes. The immediate problem is that
SwTabFrame::MakeAll() assumes that in case HasFollowFlowLine() is true,
then GetFollow()->GetFirstNonHeadlineRow() is always non-nullptr,
similar to the situation in commit
223d2fac61 (sw floattable: fix crash by
trying harder to split tables, 2023-11-22).

The deeper problem is that the bugdoc has a repeated table header row,
the fly frame temporarily gets shifted down, so nominally the header
doesn't fit anymore, and this leads to a modification of the doc model,
which creates inconsistency: the model now says we have no header rows
but the layout still contains table row frames where the header bit is
true. This is problematic in theory, but in practice caused no problem
so far.

Fix the problem by disabling this mechanism for floating tables: trying
to have a table header that doesn't fit the table is asking for trouble
anyway, and this way at least we have a layout that is consistent with
the model, which also avoids the crash, now that nobody violates the
"HasFollowFlowLine -> follow's FirstNonHeadlineRow != nullptr"
invariant.

Also extend the layout dump, so it's easier to see when the master's
flag and the follow's row list gets out of sync.

Change-Id: I52b51f6d86ab4e0bab560f892e9cceb183aecd5f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164136
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-02-29 11:39:54 +01:00
Miklos Vajna
62f71496c9 CppunitTest_sw_tiledrendering2: turn on set_non_application_font_use
Similar to commit dc4d7500c9 (Fix
CppunitTest_sd_import_tests-smartart non_application_font_use,
2023-10-23), though this didn't find anything.

Change-Id: Ia3a58220b772c4a68ca86dff01fae7e693b48fca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164137
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-02-29 10:25:47 +01:00
Stephan Bergmann
acce5d17ac Read of uninitialized Printer::mbResetPrintArea
...introduced in 364f0bb1ca "tdf#155218 sc: fix
regression page orientation in print dialog", causing UITest_calc_dialogs to
fail with

> /include/vcl/print.hxx:227:61: runtime error: load of value 190, which is not a valid value for type 'bool'
>     #0 0x7f1337c5ec9e in Printer::IsPrintAreaReset() /include/vcl/print.hxx:227:61
>     #1 0x7f1337bd64be in ScModelObj::getRendererCount(com::sun::uno::Any const&, com::sun::uno::Sequence<com::sun:🫘:PropertyValue> const&) /sc/source/ui/unoobj/docuno.cxx:1856:41
>     #2 0x7f13ca466d5f in SfxPrinterController::getPageCount() const /sfx2/source/view/viewprn.cxx:228:36
>     #3 0x7f13a130580e in Printer::PreparePrintJob(std::shared_ptr<vcl::PrinterController>, JobSetup const&) /vcl/source/gdi/print3.cxx:420:53
>     #4 0x7f13a13027e3 in Printer::ImplPrintJob(std::shared_ptr<vcl::PrinterController> const&, JobSetup const&) /vcl/source/gdi/print3.cxx:575:9
>     #5 0x7f13a134cdc8 in (anonymous namespace)::PrintJobAsync::ExecJob(void*) /vcl/source/gdi/print3.cxx:318:5
>     #6 0x7f13a1302b28 in (anonymous namespace)::PrintJobAsync::LinkStubExecJob(void*, void*) /vcl/source/gdi/print3.cxx:316:1
>     #7 0x7f139f592d0d in Link<void*, void>::Call(void*) const /include/tools/link.hxx:111:45
>     #8 0x7f139f579a00 in ImplHandleUserEvent(ImplSVEvent*) /vcl/source/window/winproc.cxx:2287:30
>     #9 0x7f139f5646c0 in ImplWindowFrameProc(vcl::Window*, SalEvent, void const*) /vcl/source/window/winproc.cxx:2851:13
>     #10 0x7f13a3273a82 in SalFrame::CallCallback(SalEvent, void const*) const /vcl/inc/salframe.hxx:310:29
>     #11 0x7f13a3320ea1 in SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) /vcl/headless/svpinst.cxx:266:22
>     #12 0x7f13a3321632 in non-virtual thunk to SvpSalInstance::ProcessEvent(SalUserEventList::SalUserEvent) /vcl/headless/svpinst.cxx
>     #13 0x7f13a1b7e593 in SalUserEventList::DispatchUserEvents(bool)::$_0::operator()() const /vcl/source/app/salusereventlist.cxx:119:58
>     #14 0x7f13a1b7dd25 in SalUserEventList::DispatchUserEvents(bool) /vcl/source/app/salusereventlist.cxx:120:13
>     #15 0x7f13a3325345 in SvpSalInstance::ImplYield(bool, bool) /vcl/headless/svpinst.cxx:395:22
>     #16 0x7f13a3327b4e in SvpSalInstance::DoYield(bool, bool) /vcl/headless/svpinst.cxx:471:21
>     #17 0x7f13a2012c4a in ImplYield(bool, bool) /vcl/source/app/svapp.cxx:390:48
>     #18 0x7f13a20112b8 in Application::Yield() /vcl/source/app/svapp.cxx:474:5
>     #19 0x7f13a2010b57 in Application::Execute() /vcl/source/app/svapp.cxx:368:13
>     #20 0x7f13e355d421 in desktop::Desktop::Main() /desktop/source/app/app.cxx:1614:13
>     #21 0x7f13a20b6ae2 in ImplSVMain() /vcl/source/app/svmain.cxx:229:35
>     #22 0x7f13a20bfd20 in SVMain() /vcl/source/app/svmain.cxx:261:12
>     #23 0x7f13e376dc40 in soffice_main /desktop/source/app/sofficemain.cxx:94:12
>     #24 0x4fda3c in sal_main /desktop/source/app/main.c:51:15

(<https://ci.libreoffice.org/job/lo_ubsan/3090/>)

Change-Id: Ibf9ed98b133337457e983155b960dfc40f84c819
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 10:03:27 +01:00
Stephan Bergmann
792b4b676b Try to appease Flathub linter
...which caused a recent
<https://buildbot.flathub.org/#/builders/33/builds/12708> test build to fail
with

> {
>     "errors": [
>         "appstream-failed-validation"
>     ],
>     "warnings": [
>         "appstream-screenshot-missing-caption"
>     ],
>     "appstream": [
>         "E: org.libreoffice.LibreOffice.desktop:~: desktop-app-launchable-omitted"
>     ],
>     "message": "Please consult the documentation at https://docs.flathub.org/docs/for-app-authors/linter"
> }

Change-Id: I3655d3985c70780e5980bec2d4753120fb302f1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164134
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 10:02:36 +01:00
Caolán McNamara
7ecf1c5ace move inline spelling setting out of document and into viewshell
like what writer does, so one view of a document can have spelling
enabled and another disabled

Change-Id: I9eae02fd1a2def56bfa9399860e416180fc178c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163874
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-29 09:59:26 +01:00
Tomaž Vajngerl
a8a2c49d19 sc: use emplace_back instead of a temporary object and push_back
Change-Id: I5913d760fcfa45eb5162fecf25efa68bc17dcbcc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164037
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-29 08:32:35 +01:00
Dr. David Alan Gilbert
cf776a6fa6 tdf#113050 sdext.pdfimport: Enable tilingPatternFill
Now we've got everything wired up, turn it on.

Change-Id: I2333e5163493ef0312619f54d2f90ae266fc655b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163575
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:28:48 +01:00
Dr. David Alan Gilbert
81fbaf4bb9 tdf#113050 sdext.pdfimport: Set and write TileWidth/Height
Set the tile width/height from the step size and write it into the
draw:fill-image-width/height properties.

Change-Id: I70d69a6d5e77929bd14282731dd68d3bcafa9c1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163574
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:28:31 +01:00
Dr. David Alan Gilbert
784696e47c tdf#113050 sdext.pdfimport: Add TileWidth and TileHeight fields
We need to scale the tiled image that fills our polygon, so add
width and height fields, we'll fill in and process them in subsequent
patches.

Change-Id: Ib0000066170ccbc0f4a4c971e1d6df72c3f7df14
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163573
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:28:08 +01:00
Dr. David Alan Gilbert
4b295b1b77 tdf#113050 sdext.pdfimport: Create the fill-image style and use it
In a poly which is being image filled, we need to create a style
with the actual image definition in the 'Contents'
and then set the (automatically created) name of this in
the prop on the main style.
Also we need to set draw:fill to "bitmap" rather than "solid"

Change-Id: I253704519011e98fd106331ccfb139ad93ef6dee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:27:48 +01:00
Dr. David Alan Gilbert
9f21f816a1 tdf#113050 sdext.pdfimport: Expose the ImageContainer const
I need the finalisers to be able to read an image, they have
a ref to the processor but not the emitter; so allow the container
to be read via the processor reference.

Change-Id: Ifd3b2af1d456561ad42ae3e7c664f03b2e0c971c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163571
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:26:58 +01:00
Dr. David Alan Gilbert
2bf5664823 tdf#113050 sdext.pdfimport: Add FillImage field to PolyPolyElement
Use -1 to mean the existing solid fill, otherwise it's the ID
of the image to use as the fill.

Change-Id: I596c26145f5285f75af631a3bb7ddf09600982a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163570
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:26:40 +01:00
Dr. David Alan Gilbert
d7e5eae44e tdf#113050 sdext.pdfimport: Add ImageContainer::asBase64EncodedString'
For fill-images we need the image as a string.

Change-Id: I4a8429563b0e19ad977b4e933a0ffee378dab244
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163569
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:26:04 +01:00
Dr. David Alan Gilbert
ff160e93d3 tdf#113050 sdext.pdfimport: In styles wrap 'Contents'
For draw:fill-image we need output like:

<draw:fill-image draw:name="foo">
  <office:binary-data>Base64stuff
  </office:binary-data>
</draw:fill-image

Style's 'Contents' entry, almost does that and is currently
unused; but it doesn't put the tags in.   Adding the tags
manually in the Contents string doesn't work (because it bypasses
something in the Emitter?).

Since it's not currently used, add the office:binary-data
tags for our use.

Change-Id: Idaf11b49bd075bb82116a0578bb4c38790dd0fb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163568
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:25:35 +01:00
Dr. David Alan Gilbert
bc5bd022a9 tdf#113050 sdext.pdfimport: In styles Specialise draw:fill-image
Like stroke-dash, draw:fill-image needs the name setting in
the draw:name attribute.

Change-Id: Ib9c888765af8bfb0849f0f1ef15f9774808a1661
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:25:08 +01:00
Dr. David Alan Gilbert
2350357d5c tdf#113050 sdext.pdfimport: Create poly for tiling pattern
Create a poly for the tiling pattern fill.

Change-Id: Iaeadfe51bed6d4de87f36b3a78145829ea8443e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163566
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:24:48 +01:00
Dr. David Alan Gilbert
4a13e1890e tdf#113050 sdext.pdfimport: Plumb tiling pattern fill to pdfiprocessor
Change-Id: I68459834fd903d31c9b2e57d637265dd67da4f56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163565
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:24:17 +01:00
Dr. David Alan Gilbert
ec0b9062dc tdf#113050 sdext.pdfimport Tiling pattern fill parser
Add a parser for the TilingPatternFill entry from the poppler wrapper.

This doesn't get triggered yet until the wrapper enables the
tilingPatternFill.

Change-Id: I34ab84ba1ab9d6773f33d667b324bef5d6c6e409
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163564
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:23:54 +01:00
Dr. David Alan Gilbert
b7a63d2646 tdf#113050 sdext.pdfimport: Flip bitmap
We need to flip the bitmap between the wrapper and LO, but there's no
easy way to do this in a Poly image fill in LO, so do it as a simple
bitmap flip in the wrapper.

Change-Id: Ifd84d37926c21edf30654d3884be975849a6dca3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163563
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:23:28 +01:00
Dr. David Alan Gilbert
8ac5f40b33 tdf#113050 sdext.pdfimport: Write the tiling pattern image
Render the tile down to a common format using Splash
and write it to the stream.

Change-Id: Iccc451d1a02ed2ad77538883ab3fe5542fc633e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163562
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:22:38 +01:00
Dr. David Alan Gilbert
8e4a351f12 tdf#113050 sdext.pdfimport: Write the tiling pattern header
Add the 'tilingPatternFill' hook to our output device, but don't enable
it yet; we can do that at the end of the series.

Change-Id: Id52b023c3025f5addce1ab09663da9b8bd8a75e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163561
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:21:09 +01:00
Dr. David Alan Gilbert
18a1c3d6c9 tdf#113050 poppler: Enable splash
Enable the splash module, to be used in the xpdf conversion
for tiled patterns.

I've jumped through a couple of hoops to avoid splash
bringing in freetype, extending the existing hack.
This might cause us problems if someone tries to use
text as a tile, but otherwise isOK.

Change-Id: I76ad1268f44137ae5e3205d56170c3a7c55a2dc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163560
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 08:20:20 +01:00
Keldin Maldonado (KNM)
c78679b349 tdf#147021 replace SAL_N_ELEMENTS() with std::size()
Change-Id: I2a415e7c20d134d400e48745278597b475076d52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163927
Tested-by: Jenkins
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-02-29 08:19:54 +01:00
Stephan Bergmann
c39b832e85 Avoid -Werror,-Wunused-but-set-variable for ENABLE_WASM_STRIP_PINGUSER
...after 607740654f "Resolves tdf#131550 -
Suppress Donate/Involve infobar if another is visible"

Change-Id: I1d788a0f71a5baa8ce427631485643f0fd6e626d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164102
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 07:54:30 +01:00
Stephan Bergmann
6cc09586f5 Test Embind'ing of UNO enums
Change-Id: I87d55236ee09b80aadcc95e2c0f06f15b9e24a44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164100
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 07:54:11 +01:00
Stephan Bergmann
6064939d40 Embind support for constant groups
The constants are only reflected directly as JS values in the generated *.js
file.  Reflecting them via emscripten::constant in the generated *.cxx did not
work well:  Most importantly, emscripten::constant (and its underlying
_embind_register_constant) coerce all values to double, so UNO (unsigned) hyper
would not survive as JS BigInt, which would then cause e.g.

>     console.assert(test.isHyper(uno.org.libreoffice.embindtest.Constants.Hyper));

passing such a (JS number, not BigInt) value into the
org.libreoffice.embindtest.XTest::isHyper method (which expects a UNO hyper) to
fail.  (Also, constants of UNO boolean type would be represented as numbers 0/1
rather than as false/true.)

Change-Id: I056db0ccce0bf40eb53728fd439cc74964eb6951
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164097
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-02-29 07:53:54 +01:00
Noel Grandin
08d2651444 assert on failure to load .ui file
otherwise I get hard to diagnose SIGSEGV further on in other code

Change-Id: Ic0397c7dd532f639482dfc2ee9ec36b32023fb5a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164099
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-29 07:38:25 +01:00
Mike Kaganski
40336ee0b4 Simplify a bit
Change-Id: I9fbc43916fe0d7af87001e48854a87636115a1f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164133
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29 07:24:00 +01:00
Tomaž Vajngerl
3e2147537f sc: prefix ScDPOutput members
Change-Id: I628854772a2a13d113e2b488a78f0f72d2fa66c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164036
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2024-02-29 06:56:12 +01:00
Mike Kaganski
0ccf447843 Simplify a bit
Change-Id: I90e26030cb7a002bfd76cbc7aa73a5d3ea7a7f1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164132
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29 05:43:38 +01:00
Mike Kaganski
c2dca161c0 Use <bit> instead of platform-specific intrinsics
Change-Id: I79636ff9c3b2fe601b0b3c94a111b36af0011775
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164131
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29 04:01:48 +01:00
Mike Kaganski
e2473fe3a5 Drop redundant code: this is handled below
And use standard functions in the rtl_math_RoundingMode_HalfEven
handler.

Change-Id: If9f29aa63423db9457a02ed003cfc27cf3df5585
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164104
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-29 01:39:00 +01:00
Tibor Nagy
364f0bb1ca tdf#155218 sc: fix regression page orientation in print dialog
The print page orientation set in the Print Dialog displays incorrect
print area borders on the sheet after closing the Print Dialog or
interrupting the printing process.

The print dialog increase in size if the "Pages" and "All pages" radio
buttons are toggled many times.(problem is not reproduced on Windows)

regression was made by: I5e494a0714e398221bee00744d7e25c419a41df7

Change-Id: I5a0ab3d781b21eff575afaebb233237eff1827d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164085
Tested-by: Jenkins
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-02-29 01:36:08 +01:00
Matt K
6a064b1967 tdf#139004 Prevent crash when deleting footnote styles
The problem was that a pointer was assumed valid, but
was not, so now we check the value of the pointer
before using it.  Works now to delete footnote style.

Also, change assert to variable check to ensure the
proper method is only called when it is supposed to
be, and to prevent a failing assert.  We add a new
Destr method on SwFormat so that it can be called
from the SwTextFormatColl context and thus avoid
the assert.

Change-Id: Ia4b8029fb89e627cd685b3317606e2b9d60cf248
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162965
Tested-by: Jenkins
Reviewed-by: Matt K <mattkse@gmail.com>
2024-02-28 22:08:38 +01:00
Caolán McNamara
b8237d35d9 ofz#67092 Integer-overflow
Change-Id: I74a5218b44de06b06e8c16493e76992e496527d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164098
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-02-28 20:30:42 +01:00