Commit graph

500095 commits

Author SHA1 Message Date
Michael Weghorn
f5a20c68b3 tdf#160837 qt: Move logic for resize event handling to QtFrame
Add a new QtFrame::handleResizeEvent and move the
logic from QtWidget::resizeEvent to the new method
and call the new method from QtWidget::resizeEvent.

This decouples QtFrame and (its friend class) QtWidget
a bit more, and also prevents direct access to the
(currently public) SalFrame::maGeometry member from
QtWidget.

Change-Id: I8969687c64b87677836b436b7815298a8e8d5cf3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173952
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-26 07:10:59 +02:00
Michael Weghorn
79773cf276 tdf#160837 qt: Move logic for move event handling to QtFrame
Add a new QtFrame::handleMoveEvent and move the
logic previously duplicated in both,
QtMainWindow::moveEvent and QtWidget::moveEvent
there, then call the new method from these two.

this also prevents direct access to the
(currently public) SalFrame::maGeometry
member from QtWidget and lets the subclass
do it instead.

Change-Id: I468802f204d3ac5869d833526286ca8ab349697b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173951
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-26 07:10:52 +02:00
Caolán McNamara
7198c5e49e add a rtf to pdf fuzzer
Change-Id: Ib805b2e8245903f63096cc21f511ba7ae0a4f488
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173466
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 22:28:32 +02:00
Noel Grandin
747e2676ec fix Printer::EmulateDrawTransparent
after
    commit 9153a36b59
    Author: Chris Sherlock <chris.sherlock79@gmail.com>
    Date:   Fri Mar 28 23:30:02 2014 +1100
    fdo#74702 Refactor OutputDevice::DrawTransparent()

where it looks like a copy/paste error resulted in the metafile
and mpAlphaVDev being restored too early.

Change-Id: Ib2989927166bc2da7c8da6274f295a73218386fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173935
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-09-25 22:12:40 +02:00
Noel Grandin
f513741bdc fix basegfx.py
after
    commit 3c82f49fce
Author: Armin Le Grand (allotropia)
<armin.le.grand.extern@allotropia.de>
    Date:   Mon Sep 23 17:57:00 2024 +0200
    Adapting basegfx.py due to blocking in some situations

Change-Id: Ie266c7b5aeb5dccaae03c26b7cd73cd65841748c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173949
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-09-25 22:10:17 +02:00
Michael Weghorn
eb688cf19d tdf#130857 qt weld: Use native "Save Document?" dialog
Now that

    Change-Id: If6e03bfa48b9052016539a25aadf40b599095918
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Wed Sep 25 12:10:12 2024 +0200

        tdf#130857 qt weld: Implement QtBuilder::set_response

implemented handling for button response codes,
let QtInstanceBuilder create the "Save Document?"
dialog that shows when closing LibreOffice while
an unsaved modified document is open.

This means that a native QMessageBox is now used for
that dialog as well, unless env variable
SAL_VCL_QT_NO_WELDED_WIDGETS is set.

Change-Id: Ifb6c6f181d95d88138ed49f382b9eaad4d3ad944
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173932
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:10:28 +02:00
Michael Weghorn
9b08982ff4 tdf#130857 qt weld: Implement QtBuilder::set_response
Implement QtBuilder::set_response to set the
given response code for a button:

Set the `PROPERTY_VCL_RESPONSE_CODE` property
on the QPushButton.
`QtInstanceMessageDialog` makes use of that property
to return the corresponding response code of the
pressed button.

(Make `PROPERTY_VCL_RESPONSE_CODE` a static
member of `QtInstanceMessageDialog` to make
it available outside of the class as well.)

This works for buttons in message dialogs.
An implementation for other dialogs still needs
to be added when adding suppor for these to `QtBuilder`
and extending `QtInstanceDialog`/`QtInstanceButton`
accordingly.

Change-Id: If6e03bfa48b9052016539a25aadf40b599095918
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173931
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:10:21 +02:00
Michael Weghorn
547b99e0a8 tdf#130857: Move .ui -> VCL respone code mapping to handleActionWidget
Move mapping the (GTK) response code set in the .ui file
to the VCL equivalent from VclBuilder::set_response
to BuilderBase::handleActionWidget.

As VCL response codes are used by all implementations, this
is not specific to the vcl::Window implementation and
also allows an upcoming QtBuilder::set_response_code
implementation to use the passed value as is.

Change-Id: I5b6d262a657932038c423c0c2cdcf1fd32c8b6be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173930
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-09-25 21:10:13 +02:00
Michael Weghorn
ac0989b02f tdf#130857 VclBuilder: Use existing VclBuilder::get
... instead of reimplementing the logic in
VclBuilder::set_response.

Change-Id: I634d918a356caddc79419b94dda7bd0657fa8c20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173929
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:10:05 +02:00
Michael Weghorn
9282032894 tdf#130857 Use std::u16string_view for VclBuilder::get param
This prepares for reusing the method elsewhere in
`VclBuilder`.

Only the `SAL_WARN_IF` (a no-op in release builds without
`--enable-sal-log`) previously needed a `OUString`.
Call `OUStringToOString` for that one explicitly, which
is what previously happened implicitly by

    template< typename charT, typename traits >
    inline std::basic_ostream<charT, traits> & operator <<(
        std::basic_ostream<charT, traits> & stream, OUString const & rString)

defined in include/rtl/ustring.hxx.

Change-Id: I57ebac8c2189afeca33bfa483b8d5d5c7866d904
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173928
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:09:53 +02:00
Michael Weghorn
fa3e77680b tdf#130857 Consolidate to one VclBuilder::get method
Convert the single caller of the other variant to use
the same as all other places, and drop the now unused
method.

Change-Id: Icde971b50f39cb8c8f32d1a6ddf4d0cc84f90440
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173927
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:09:42 +02:00
OmkarAcharekar
7282421451 tdf#130857 qt weld: Implement QtBuilder + use it for first msg dialog
This implements an initial QtBuilder, which is used by
QtInstanceBuilder to create weld::Widget instances
using native Qt widgets.

This tries to be close to the VCL implementation (VclBuilder).
The selected approach is based on Caolán's suggestion in [1] to
rework VclBuilder to have overridable methods for widgets creation.

This way, we can have common code for the UI parser but the
function for widget creation is different.

Qt equivalents for Gtk's widget classes in the .ui files:

* GtkMessageDialog -> QMessageBox
* GtkBox -> QLayout (can be QVBoxLayout/QHBoxLayout based on
  property in .ui file)
* GtkButtonBox -> QDialogButtonBox
* GtkButton -> QPushButton

As QMessageBox already comes with a layout and
a QDialogButtonBox, don't create new ones, but
return the existing ones in QtBuilder::makeObject.

This commit implements initial support for the
above-mentioned widget types and adds the first
message dialog to the list of supported .ui files
in QtInstanceBuilder::IsUIFileSupported,
so a native QMessageBox is used for it now, unless
environment variable SAL_VCL_QT_NO_WELDED_WIDGETS
is set when starting LibreOffice.

The dialog ("modules/swriter/ui/inforeadonlydialog.ui")
gets shown when taking the following steps:

* start Writer
* type "hello world"
* select text
* "Insert" -> "Section"
* tick the "Protect" checkbox in the "Write Protection" section
* close dialog via "Insert" button
* try to type in the protected section

The dialog can be dismissed using the default "OK" button.
(Handling for response codes for buttons is not implemented
yet, which will be needed when welding dialogs that have multiple
buttons resulting in different behavior depending on what button
gets clicked.)

This change was originally submitted as a WIP change as part of
Omkar Acharekar's Outreachy project "Implement Qt/KDE Frameworks
theming using native Qt widgets" (see [2]), then further refined
by Michael Weghorn.

[1] https://lists.freedesktop.org/archives/libreoffice/2023-December/091288.html
[2] https://lists.freedesktop.org/archives/libreoffice/2023-December/091281.html

Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: I6dd010a2138c245dc1e6d83dd08123898e9d9048
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161831
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:09:26 +02:00
Michael Weghorn
1a1bf2b78d tdf#130857 VclBuilder: Extract helper to start parsing UI file
Extract logic to start parsing/processing the VclBuilder's
.ui file from the VclBuilder ctor to a new helper method in
the base class, WidgetBuilder::processUIFile.

This will allow to reuse it in the upcoming QtBuilder.

Change-Id: Ia7d31563e5aeef0786b0db34abb1a32a3a479947
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173902
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:09:14 +02:00
Michael Weghorn
ad19f3b9f2 tdf#130857 VclBuilder: Pass UI dir/root to BuilderBase
Pass the UI file root down to `BuilderBase`, and add
a new getter `BuilderBase::getUIFileUrl` to get the
URL composed of the UI dir and the UI file passed to
the ctor.
This is in preparation of moving the `XmlReader`
creation out of the `VclBuilder` ctor, so the code
can be reused by the upcoming `QtBuilder`.

Change the UI directory param from `const OUString&` to
`std::u16_string_view` as suggested by the clang plugin.

Change-Id: I3f7719e30e55bae3c774da704e642e4227165a76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173827
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:09:07 +02:00
Michael Weghorn
385bbbd6e1 tdf#130857 Move VclBuilder::handleObject to WidgetBuilder base
Move `VclBuilder::handleObject` to the template base class
`WidgetBuilder` introduced in previous commit

    Change-Id: I2d81cc6dd54d796b549357a4444b95627661c623
    Author: OmkarAcharekar <omkaracharekar12@gmail.com>
    Date:   Fri Sep 20 13:33:01 2024 +0200

        tdf#130857 refactor VclBuilder: Extract template base class

Add new virtual methods to that base class to override in the
subclasses. These are currently the ones that `VclBuilder`
already implements for `vcl::Window`.

More refactoring - in particular for those methods that currently
still do XML parsing themselves is planned for the future
once the relevant functionality will be implemented in
other subclasses. For now, those methods that do XML parsing
themseslves trigger an assert in the base class implementation
and remain unchanged in the `VclBuilder` implementation.

One aspect to be aware of is that `WidgetPtr` should explicitly
be initialized to `nullptr` if not assigned a different value:
While `VclPtr` that gets used for `VclBuilder` has a default ctor
that takes care of proper initialization, that's not the case for
the upcoming `QtBuilder` [1] that just uses `QObject*` for `WidgetPtr`.

[1] https://gerrit.libreoffice.org/c/core/+/161831

Change-Id: I5c1b7201c82ca2c0c2d7389642aee407ebea16ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173737
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-09-25 21:08:59 +02:00
OmkarAcharekar
f61ecf2563 tdf#130857 refactor VclBuilder: Extract template base class
Refactor `VclBuilder` by extracting the `handleChild` method
and moving it into a new template base class `WidgetBuilder`,
so both `VclBuilder` and an upcoming `QtBuilder` (see [1])
can share the common logic to parse the .ui file and override
the virtual methods like `applyPackingProperties`,
`tweakInsertedChild` etc. to handle toolkit specific cases,
as mentioned as one potential approach in Caolán's email [2].

The new class has 2 template parameters `Widget` and `WidgetPtr`
to account for the fact that `VclBuilder` doesn't just use
`vcl::Window*`, but there's a specific class, `VclPtr`.

As the inline comments say, more refactoring will be needed
to abstract the current `VclBuilder` implementations
of various methods from the `vcl::Window` specifics and
make them reusable for other subclasses as well, but this
commit is a start. The idea is to allow for incrementally
refactoring aspects relevant for specific .ui files/features
rather than having to refactor everything and implement
support for all widget types at once, see also

    commit 9b3a2996e7
    Author: OmkarAcharekar <omkaracharekar12@gmail.com>
    Date:   Wed Sep 18 09:35:09 2024 +0200

        tdf#130857 qt weld: Add QtInstanceBuilder skeleton

which adds an initially empty list of .ui files that
should be handled by the upcoming Qt-based implementation.

[1] https://gerrit.libreoffice.org/c/core/+/161831
[2] https://lists.freedesktop.org/archives/libreoffice/2023-December/091288.html

Co-authored-by: Michael Weghorn <m.weghorn@posteo.de>
Change-Id: I2d81cc6dd54d796b549357a4444b95627661c623
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163103
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-09-25 21:08:50 +02:00
Caolán McNamara
3cbe17c83c cid#1606825 Data race condition
Change-Id: If2a0385a0b9d7d09c05cacc9bbc1034bd14f53b3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173947
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 20:33:09 +02:00
Caolán McNamara
d26313ea19 cid#1607206 PA: Public Attribute
Change-Id: If140f3256a7e1afaae723147cb4870fa01b4e52e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173946
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 20:32:58 +02:00
Caolán McNamara
ca4f427d02 cid#1608290 PA: Public Attribute
Change-Id: I46bd84741d3958cb807df4f3080426fc2afdd6fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173945
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-09-25 20:32:51 +02:00
Caolán McNamara
48b2bfdb21 cid#1608090 PA: Public Attribute
Change-Id: I9bf9de822851bbf4f28614ae686e79a9c7438aac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173944
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 20:32:44 +02:00
Caolán McNamara
8c78ce59f8 remove call to getCatalogSeparator where return is ignored
since:

commit 43cc8ad33e
CommitDate: Mon Jan 5 08:23:29 2015 +0200

    java: remove dead code

Change-Id: Ib2b3e7a45ef1c9f1a7edf06ed6d474375bfe1c5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173943
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-09-25 20:32:32 +02:00
Caolán McNamara
1cb1e96979 cid#1606775 PA: Public Attribute
Change-Id: Ie5034470b02310f329c041224ebf035769374e50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173942
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 20:32:26 +02:00
Caolán McNamara
eea21fab2b cid#1606722 PA: Public Attribute
Change-Id: I23f518a7b492ae92417657f5a319eb1aae4dac3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173941
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 20:32:12 +02:00
Caolán McNamara
2c2fc06966 Related: cool#9735 allow LOK_CALLBACK_DOCUMENT_SIZE_CHANGED during paint
we want this to get through because of a scenario like

 #0  ignoreLibreOfficeKitViewCallback (nType=13, pImpl=0xf9bd620) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3219
 #1  0x00007fd4a2428979 in SfxViewShell::libreOfficeKitViewCallback (this=0xf9bd090, nType=13, pPayload=...) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/viewsh.cxx:3278
 #2  0x00007fd4a23ab80b in SfxLokHelper::notifyDocumentSizeChanged (pThisView=0xf9bd090, rPayload=..., pDoc=0xec53578, bInvalidateAll=true) at /home/caolan/LibreOffice/co-24.04/sfx2/source/view/lokhelper.cxx:711
 #3  0x00007fd484eba265 in SwViewShell::SizeChgNotify (this=0xf9bf3c0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:1154
 #4  0x00007fd484775a62 in AdjustSizeChgNotify (pRoot=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:842
 #5  0x00007fd48477e029 in SwRootFrame::CheckViewLayout (this=0xed16880, pViewOpt=0x0, pVisArea=0x0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:2436
 #6  0x00007fd484775da2 in SwPageFrame::Cut (this=0x120350f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:914
 #7  0x00007fd484779ec8 in SwRootFrame::RemovePage (this=0xed16880, pDelRef=0x7ffe90279548, eResult=SwRemoveResult::Prev) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1511
 #8  0x00007fd48477a187 in SwRootFrame::RemoveSuperfluous (this=0xed16880) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/pagechg.cxx:1550
 #9  0x00007fd4847336b2 in SwLayAction::InternalAction (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:694
 #10 0x00007fd4847323b8 in SwLayAction::Action (this=0x7ffe90279a60, pRenderContext=0xf9bb5f0) at /home/caolan/LibreOffice/co-24.04/sw/source/core/layout/layact.cxx:396
 #11 0x00007fd484eb5fc2 in SwViewShell::ImplEndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:309
 #12 0x00007fd483fa3f78 in SwViewShell::EndAction (this=0xf9bf3c0, bIdleEnd=false) at /home/caolan/LibreOffice/co-24.04/sw/inc/viewsh.hxx:637
 #13 0x00007fd484ebf56b in SwViewShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2235
 #14 0x00007fd484577013 in SwEditShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/core/edit/editsh.cxx:1094
 #15 0x00007fd48574a5cf in SwWrtShell::ApplyViewOptions (this=0xeddec90, rOpt=...) at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/wrtsh/wrtsh1.cxx:2137
 #16 0x00007fd484ebe79e in SwViewShell::PaintTile (this=0xeddec90, rDevice=..., contextWidth=1792, contextHeight=768, tilePosX=0, tilePosY=113280, tileWidth=13440, tileHeight=5760)
     at /home/caolan/LibreOffice/co-24.04/sw/source/core/view/viewsh.cxx:2019
 #17 0x00007fd4855fc5f0 in SwXTextDocument::paintTile (this=0xec53280, rDevice=..., nOutputWidth=1792, nOutputHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760)
     at /home/caolan/LibreOffice/co-24.04/sw/source/uibase/uno/unotxdoc.cxx:3145
 #18 0x00007fd4a24c5ada in doc_paintTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760)
     at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4431
 #19 0x00007fd4a24c6bb3 in doc_paintPartTile (pThis=0xed2fa10, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760)
     at /home/caolan/LibreOffice/co-24.04/desktop/source/lib/init.cxx:4629
 #20 0x00000000005f0f0e in lok::Document::paintPartTile (this=0xf521420, pBuffer=0x12871f30 "", nPart=0, nMode=0, nCanvasWidth=1792, nCanvasHeight=768, nTilePosX=0, nTilePosY=113280, nTileWidth=13440, nTileHeight=5760)
     at /home/caolan/LibreOffice/co-24.04/include/LibreOfficeKit/LibreOfficeKit.hxx:621
 #21 0x00000000005c2627 in RenderTiles::doRender(std::shared_ptr<lok::Document> const&, DeltaGenerator&, TileCombined&, ThreadPool&, std::function<void (unsigned char*, int, int, unsigned long, unsigned long, int, int, LibreOfficeKitTileMode)> const&, std::function<void (char const*, unsigned long)> const&, unsigned int, int, bool) (document=..., deltaGen=..., tileCombined=..., pngPool=..., blendWatermark=..., outputMessage=...,
     mobileAppDocId=3, canonicalViewId=1000, dumpTiles=false) at ./common/RenderTiles.hpp:123
 #22 0x00000000005cd29d in Document::renderTiles (this=0xe6eefc0, tileCombined=...) at kit/Kit.cpp:933

where otherwise the browser gets no update of the document size.

Change-Id: I396daa9c7ee5c306ee107839f6fba6b26a70683d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173936
Tested-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit ed75469d322f61abef634d417c5c81bb28585023)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173907
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 20:32:01 +02:00
Xisco Fauli
146dac7d30 tdf#162690, tdf#162687: Adapt to ODF 1.4
After this, the workaround introduced to
OpenDocument-v1.4+libreoffice-schema.rng in
afa4965e4d "schema: update to ODF 1.4 OS"
can be removed

Change-Id: Iecf31cec0bf187155a97e5b6ccf8173b6aba82fc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173940
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-25 19:31:28 +02:00
Xisco Fauli
71aeb561e7 NotoSerif: upgrade to v2.014
Downloaded from https://github.com/notofonts/latin-greek-cyrillic/releases/download/NotoSerif-v2.014/NotoSerif-v2.014.zip

Change-Id: I867b69c95d16c08f051569a2021a772272444dca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173926
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2024-09-25 19:31:11 +02:00
Mike Kaganski
12e08b3cba tdf#163145: revert commit 6f224a17db
I can't reproduce the problem from tdf#136933 anymore (using kf5
and qt5), while it's reproducible using v.7.0 bibisect repo with
qt5. I conclude, that the problem got resolved in the meanwhile.
So it seems to make sense to just revert the problematic commit.
The incorrect line drawing still may need to be fixed eventually.

There seem to be no way to test SlideImpl::getCurrentSlideBitmap,
which eventually calls CanvasHelper::strokePolyPolygon. So this
change has no unit test, unfortunately.

Change-Id: I1d82b6f734a4f69d93c9d61732f55ef8158cfbe6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173933
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-25 18:36:49 +02:00
Andrea Gelmini
828a836031 Fix typo
Change-Id: Id1e54ad708501733282851b6538bc946119742b2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173934
Tested-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2024-09-25 18:35:04 +02:00
Xisco Fauli
f709c1e7a8 NotoSans: upgrade to v2.014
Downloaded from https://github.com/notofonts/latin-greek-cyrillic/releases/download/NotoSans-v2.014/NotoSans-v2.014.zip

Change-Id: Ief6598bb959bfc408e7455e6a4f55a6cdc8db8ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173925
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2024-09-25 15:56:59 +02:00
Jaume Pujantell
34d242f509 tdf#163092 sw: fix broken anotations on save to docx
Opening an odt file and saving it as docx would break the comment
threads into unconnected comments.

This also fixes a regression from commit
3bb2668f5e753e9fa6aa7eea74454bf11cdfc853 where creating a commet
thread with multiple children and saving to docx would break it
into separate threads.

Change-Id: I76a0ec49bd69b953d816b3b5d3cc6d14065d5846
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173681
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173872
Tested-by: Jenkins
Reviewed-by: Jaume Pujantell <jaume.pujantell@collabora.com>
2024-09-25 15:44:06 +02:00
Jaume Pujantell
98cd8bac76 sw: add new command to make a response comment root
Adds the option to convert a reply comment into a new top comment
while preserving the parent-child realtions of the other comments
in the thread.

Change-Id: I3cd5e5466fadc2226651d7c244b5139ec2d1f949
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173051
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173870
Reviewed-by: Jaume Pujantell <jaume.pujantell@collabora.com>
Tested-by: Jenkins
2024-09-25 15:43:47 +02:00
Caolán McNamara
f3e308fd3d cid#1606875 Data race condition
Change-Id: Ic4932568bb3f0348595358fa19032aba56bfa6c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173899
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-09-25 15:38:05 +02:00
Caolán McNamara
bbac45eabe cid#1606887 Data race condition
and

cid#1607140 Data race condition

Change-Id: Ie27b42012b945bfad0c7344c734dc0b8f0816e70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173898
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 15:37:54 +02:00
Caolán McNamara
c30fa95c5d cid#1607313 silence Overflowed return value
and

cid#1608099 Overflowed constant

Change-Id: I10e08c1184bb6630b849c3e24a0c9b26302fd18a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173896
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 15:37:40 +02:00
Caolán McNamara
695a46783e cid#1606918 Data race condition
and

cid#1606991 Data race condition
cid#1607010 Data race condition
cid#1607323 Data race condition
cid#1607335 Data race condition
cid#1607635 Data race condition
cid#1608162 Data race condition

Change-Id: I65edcf08f92fb564d56d0e8954212533c1cbec91
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173895
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 15:37:23 +02:00
Caolán McNamara
cd5dcc6e43 cid#1619687 Not restoring ostream format
Change-Id: Id46d2317a0eeef612836fc58dc9da18cf7ee99a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173894
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-09-25 15:37:15 +02:00
Caolán McNamara
82584fe1b9 cid#1619686 Invalid iterator comparison
Change-Id: I731cc791b1efab895bddbea9a235a9add3288058
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173893
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-09-25 15:37:07 +02:00
Stephan Bergmann
fea3c9d69c Confine a hack to known-broken --enable-pch
The hack was introduced in 7db1150b2c "fix macos
build with clang 16".  (And for our --enable-pch for Clang being known-broken,
also see ffc1ab15ae "Work around some Clang PCH
consteval issue by disabling HAVE_CPP_CONSTEVAL".)

Change-Id: I5dcd7f96ba39bf4d0748940778699cb7d368f449
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173891
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2024-09-25 15:13:11 +02:00
Miklos Vajna
d95ab8d3a3 cool#9992 lok doc sign: fix import of the private key
Once the signing key is taken from the matching SfxViewShell (not yet
done), signing with a certificate specified via initializeForRendering()
failed with:

warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/nss/x509certificate_nssimpl.cxx:330: X509Certificate_NssImpl::getPrivateKey() cannot find private key
warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/nss/securityenvironment_nssimpl.cxx:812: Can't get the private key from the certificate.
warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: keys.c:1347: xmlSecKeysMngrGetKey() '' '' 45 'details=NULL'
warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: xmldsig.c:822: xmlSecDSigCtxProcessKeyInfoNode() '' '' 45 'details=NULL'
warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: xmldsig.c:537: xmlSecDSigCtxProcessSignatureNode() '' 'xmlSecDSigCtxProcessKeyInfoNode' 1 ' '
warn:xmlsecurity.xmlsec:13020:13005:xmlsecurity/source/xmlsec/errorcallback.cxx:53: xmldsig.c:301: xmlSecDSigCtxSign() '' 'xmlSecDSigCtxProcessSignatureNode' 1 ' '

The trouble was that we wanted to keep the private key in-memory,
presumably because initially the whole NSS database was in-memory for
the LOK case. This was changed in commit
87eec1b90b (NSS: create a temporary
database instead of in-memory, 2018-12-31), so there is no problem with
a not-in-memory private key anymore.

Note that the problematic codepath was only triggered when first the
certificate chooser was ran and only then we signed. So the testcase
also gets the cert flags before signing, otherwise the test would
succeed even without the fix.

Change-Id: I5086b205c91b630ddd343c0eb91bd9e63b3ea238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173892
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2024-09-25 13:14:42 +02:00
Kira Tubo
dd181a31d8 tdf#139619 Add Line Style to Impress standard toolbar
Change-Id: I00e07e80cf86bc60cb7323eedaf27931cfc71a1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173696
Tested-by: Jenkins
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2024-09-25 11:05:39 +02:00
Armin Le Grand (Collabora)
dad5b34d01 tdf#163131 CairoSDPR:
Added BColorModifierStack to SVG linear and radial
gradient direct support, was missing.

Change-Id: I1405ea0653180fa695b40082bf8b8520441d0620
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173871
Tested-by: Jenkins
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2024-09-25 10:56:34 +02:00
Armin Le Grand (allotropia)
3c82f49fce Adapting basegfx.py due to blocking in some situations
I have stumbled over the GDB integration in vscode hanging
when there is a BP and *below* a declaration of e.g. a
basegfx::B2DPolygon. This seems to happen due to the
instance not yet being incarnated, but the variable view
already listing it and triggering methods in basegfx.py
to evalualte stuff.
It just hangs/loops, I guess it's fetching the PointCount
from a random mem ptr'ed Polygon, then tries to evaluate
something with the Points.
I do not really know about what to do here, but I figured
out that testing 'if self.exists()' where the instance
gets accessed (using gdb.parse_and_eval) helps.
Thus this solves the problem for me and - after stepping
over the incarnation of the object I can see it's true
content.
I hope someone who might have more knowledge about that
GDB and python stuff can have a look and maybe tell if
tis is OK or should be done in a different way.

Change-Id: Ia844b0aded97220df7f4605fdcffeac5e2270db3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173826
Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
Tested-by: Jenkins
2024-09-25 10:56:18 +02:00
Heiko Tietze
e0808a1f84 Resolves tdf#161574 - Individual labels for TOXes in the UI
+ Upper-case for Delete Index
+ User-Defined amended with Index

Change-Id: I972ee22fa3681a0f1159426836a0ec1b83fa5e3f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173849
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2024-09-25 10:39:25 +02:00
Miklos Vajna
b248260bf8 sw: extract SwDoc::ForEachCharacterItem() from Underline/ColorItems
This is meant to avoid copy&paste while keeping the public interface
template-free.

Change-Id: I3bc27d35b135df1693737de6b0e02444a06e4cbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173890
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-09-25 10:33:21 +02:00
Ashok
dbccdea974 tdf#42982 Improve Error Messages with RuntimeException in UNO API
Improved UNO API RuntimeException to return descriptive message.

Change-Id: Idae14c2ae095270c30b86cfad64936ccead5e4d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173686
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-09-25 09:29:41 +02:00
Mike Kaganski
40a38b305c Simplify a bit
Change-Id: Ib82f6456707217412097473a4387d2e6088bd3f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173801
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-25 09:18:14 +02:00
Mike Kaganski
8b23abac49 tdf#163091: check rParam.mnX before passing it to RowInfo::cellInfo
When moving to the left, the RowInfo may have e.g. cells 21 to 41,
and rParam.mnX may be 15, which is outside of the RowInfo data.

It seems that in this case, when we handle the data outside of
the visible area, setting clip marks may be safely skipped anyway.

Change-Id: I2f507dc166468c44e34645bc34c827456f1ab1ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173857
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-09-25 07:15:49 +02:00
Jonathan Clark
5b494880e8 tdf#163105 Require kashida after Seen, even before a final Yeh
Small tweak to the kashida insertion rules to restore some previous
behavior. Kashida should not be inserted after a final Yeh, but should
be inserted after an initial or medial Seen, even if it is followed by a
final Yeh.

Change-Id: I1fef2d32961c6f55006b2df456827588f62af40b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173889
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
2024-09-25 07:15:23 +02:00
Jim Raykowski
6573d0ed54 Resolves tdf#152297 Track comments in the Navigator also by focus
inside the comment box

Change-Id: I7ced30c606d89a11012e21bfce18939b7660f038
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173824
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
2024-09-25 07:05:46 +02:00
Jonathan Clark
a3b0ef4088 tdf#163105 Restore some missing kashida opportunities
This change partially reverts the fix for tdf#65344, to allow more
candidate kashida insertion positions.

The final position fallback from the original ruleset has been restored.
Instead, tdf#65344 is now fixed by explicitly prohibiting kashida under
a final-position Yeh.

Change-Id: I9fe8c656768777c160205ad9892f2fe916a2a926
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173887
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2024-09-25 03:54:35 +02:00