- Introduce 'SvxAutoFormat' which combines the common funtionality of
Writer and Calc Autoformats.
- Replace module specific 'AutoFormat' dialog and preview with shared
dialog and preview in 'svx'.
- tdf#49437: Load and Save Autoformats through XML instead of
'autotbl.fmt'.
- New Dialog to edit and create table styles shared b/w Writer and Calc.
Change-Id: I7fa108e527141c05703e0e14298eea818fd10378
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190024
Tested-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
gdb on the crashreport's core file:
#0 0x00007afad505b307 in sc::SheetView::unsync (this=0x0) at sc/inc/SheetView.hxx:44
#1 sc::SheetViewManager::unsyncAllSheetViews (this=0x11fa76c0) at sc/source/core/data/SheetViewManager.cxx:120
#2 0x00007afad552a415 in sc::SheetViewOperationsTester::check (this=this@entry=0x7ffcad3703c0, eOperation=<optimized out>, eOperation@entry=sc::Operation::DeleteRows)
at sc/source/ui/docshell/SheetViewOperationsTester.cxx:157
#3 0x00007afad54c2235 in ScDocFunc::CheckSheetViewProtection (eOperation=sc::Operation::DeleteRows)
at sc/source/ui/docshell/docfunc.cxx:126
#4 ScDocFunc::DeleteCells (this=0x124ca680, rRange=..., pTabMark=pTabMark@entry=0x164cec90, eCmd=<optimized out>, eCmd@entry=DelCellCmd::Rows, bApi=bApi@entry=false)
at sc/source/ui/docshell/docfunc.cxx:2469
#5 0x00007afad5971e06 in ScViewFunc::DeleteCells (this=this@entry=0x164cec60, eCmd=eCmd@entry=DelCellCmd::Rows) at /opt/rh/devtoolset-12/root/usr/include/c++/12/bits/unique_ptr.h:445
#6 0x00007afad57f13c6 in ScCellShell::ExecuteEdit (this=0x183359d0, rReq=...)
at sc/source/ui/view/cellsh1.cxx:348
Seeing that SheetViewManager::getPreviousSheetView() checks if the
pointers in the maViews container are nullptr, do the same here.
Change-Id: I0e430edacccae83e2d2d5e7228c437dbd1de5d60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198645
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
The offset position (RegStart) for page line-spacing should be defined
by the body frame of the given page to be aligned with the baseline grid
properly. For fly frames and sections with their own body frame,
this offset was incorrectly defined based on another layout frame.
Since a fly frame can be outside of the page's body frame, we also need
to align the line height calculation to handle this corner case.
Change-Id: If88ac21e69c91ed160d6ef3a1d9ae5d034e554cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198593
Tested-by: Jenkins
Reviewed-by: Tamás Zolnai <zolnaitamas2000@gmail.com>
Here is effort to avoid a crash that occurs when a fly frame is
unfloated that has a drawing object or fly frame anchored to its frame.
To avoid the crash, this approach uses FN_TOOL_ANCHOR_PARAGRAPH to
change the anchor of frame anchored drawing and fly frame objects to be
paragraph anchored in the fly frame content. MoveObjToVisibleLayer is
added in SwDrawContact::SwClientNotify
sw::DrawFrameFormatHintId::POST_RESTORE_FLY_ANCHOR case handling to make
undo restored fly anchored objects visible. SwFEShell::SelectFlyFrame is
made SW_DLLPUBLIC to make the clang linker not complain about 'linker
cannot find symbol(s) for architecture x86_64' when used in the included
unit test.
Change-Id: Ie6791cb45e7dce31132d3b6a8dac79d63bc27eb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/195650
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj@gmail.com>
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: Ia2dd3c9168a179ec7e44efeec309b591f6c85a03
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198619
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Move the class out of weld.hxx into its own header, in
order to make it easier to keep an overview and to avoid
having to recompile ~all UI code when the class is
modified.
Change-Id: I56cea12845bc906a8b7aff13abe033e9723b85c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198614
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Writer
* "Form" -> "Form Navigator..."
This is the first case for native Qt widgets created using
the interim builder (QtInstance::CreateInterimBuilder)
for which support was added in previous commit
Change-Id: I5a9c65918fe6bd7f5da0e4976d842a68052dec6f
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Feb 3 15:48:31 2026 +0100
tdf#130857 qt weld: Add initial support for interim builder
Change-Id: Ic44aa008c7bfc5ebf3d4428d0e59373e45900d20
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198608
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Add QtInstance::CreateInterimBuilder that overrides the
base class implementation in a similar way to how
GtkInstance::CreateInterimBuilder does it for the gtk3
VCL plugin:
Create a SystemChildWindow which is known to have
a QWidget and embed the widget tree from the .ui
file into that widget.
Do the same as for the non-interim builder and
only support .ui files explicitly added to a
whitelist, so implementing support can be
done incrementally (one window/.ui file/... at a
time).
Reuse the existing set of .ui files for non-top-levels
supported as children of native Qt widgets.
This adds the initial logic. An upcoming commit
will make use of this by declaring support for
Writer's "Form" -> "Form Navigator..." dialog.
Implementing that the widgets created by the interim
builder are also reported as accessible children
of their parent vcl widget in the a11y tree will
still have to be done separately.
Change-Id: I5a9c65918fe6bd7f5da0e4976d842a68052dec6f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198607
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.
See
commit 02692566ad
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 24 17:43:35 2024 +0200
tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order
for more background.
The dialog can be triggered like this:
* start Calc
* select multiple cells, e.g. A1:B2
* "Tools" -> "Scenarios..."
Change-Id: I6c0470c6c2a5517256c78e1cf3e5751675169e7f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198606
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.
See
commit 02692566ad
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 24 17:43:35 2024 +0200
tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order
for more background.
This is for the "New Document" page of the "Insert" -> "Hyperlink"
dialog.
Change-Id: I0e17f19ecadcd674d8cd197a6ee765eac728d752
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198605
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
When clipboard document is set up in Biff12 paste code, a call to
ScDocument::ResetClip is required. In nearby code, the destination
document is used for that, which was why I did the same.
But it turned out, that following call to SfxObjectShell::DoLoad
called ScDocShell::InitNew, and there some shared pooled items got
reset, including an ScPatternAttr used for default attributes. It
included clearing style pattern's, and that change affected target
document. Then, in export, the document's formatting ranges were
collected in ScXMLExport::AddStyleFromCells, which checked direct
properties of each range. The document's default ScPatternAttr was
missing style, and ScCellRangesBase::GetOnePropertyState returned
PropertyState_AMBIGUOUS_VALUE, and ScXMLExport::AddStyleFromCells
got empty aPropStates, without style name (which is documented to
not have a default, so it must always be present). In the end, the
default-formatted document ranges didn't create respective entries
in ScRowFormatRanges::aRowFormatRanges.
Then in ScXMLExport::ExportFormatRanges, trying to export formats
for the first (default-formatted) rows, calls to GetFormatRanges
left pRowFormatRanges empty, meaning that nMaxRows were 0, and no
advance happened in the loop -> hang. (Maybe a similar situation
caused commit b36a8a532b - busy loop
seen on ods export attempt, 2023-12-07.)
This change avoids unintended modification of the target document,
by creating a fake "source" document to use in ResetClip.
Also, this changes OSL_ENSURE to an assert, and fails export with
XMLERROR_CANCEL | XMLERROR_FLAG_SEVERE error, when nMaxRows is 0
in ScXMLExport::ExportFormatRanges - same as what the mentioned
commit b36a8a532b did in an adjacent
branch.
Change-Id: I3839ef0d2cb42d33cfc0b36b329658e159022586
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198609
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.
See
commit 02692566ad
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 24 17:43:35 2024 +0200
tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order
for more background.
This is for the "Document" page of the "Insert" -> "Hyperlink"
dialog.
Change-Id: Ie56fbf9800d3732d534e5dd59b8e8d2456af84f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198604
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.
See
commit 02692566ad
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 24 17:43:35 2024 +0200
tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order
for more background.
This is for the "Mail" page of the "Insert" -> "Hyperlink"
dialog.
Change-Id: I662668b2e262628b59b7e57aca1472a63c0d7546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198603
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch the order in which the widgets in the .ui file
are defined so that the order better matches the visual appearance
and logical order, which makes sure that tab focus order with the
Qt-based VCL plugins is correct as well when using native Qt
widgets (SAL_VCL_QT_USE_WELDED_WIDGETS=1), where
focus order is (by default) based on widget creation order.
See
commit 02692566ad
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Oct 24 17:43:35 2024 +0200
tdf#130857 optnewdictionarydialog.ui: Define focusable widgets in order
for more background.
This is for the "Internet" page of the "Insert" -> "Hyperlink"
dialog.
Change-Id: I38cb42b98c4df703328e69147269a67cb545dfaa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198602
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Previously, the UNO commands to change paragraph direction could also
affect paragraph alignment in certain situations. For example, a
left-aligned LTR paragraph would become right-aligned after a switch to
RTL. This was done in order to smooth over usability rough edges due to
the lack of native start/end paragraph alignment.
We now support start/end paragraph alignment, and encourage its use by
default. This extra alignment change is no longer necessary.
Change-Id: I90b96c28e194e37fe0e782c054f6f7efdd4bf739
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198597
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Tested-by: Jenkins
it allows to simplify the code a bit since the
TestFilter is passed as the first parameter.
In preparation for a follow-up commit
Change-Id: I316c88e1583dc7d9b04876883b971bdfa54e8967
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198588
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Convert the vcl accelerator to the Qt equivalent in
QtInstanceNotebook::insert_page.
Without this, e.g. the "Internet" tab page in the "Insert" -> "Hyperlink"
dialog would show up with a literal "~Internet" label instead
of as "Internet" with the "I" underlined when using the qt6 VCL
plugin with SAL_VCL_QT_USE_WELDED_WIDGETS=1.
Now, it shows up as expected and Alt+I results in a switch
to that tab page.
Change-Id: Ib7fd10f2feabd1a0eb2c0def7e4dbc3117bc9627
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198578
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can e.g. be triggered like this:
* start Writer
* "Insert" -> "Hyperlink"
This dialog was just converted into a more standard SfxTabDialog in
commit 1c6eb5324d
AuthorDate: Sun Dec 7 18:46:28 2025 +0000
CommitDate: Mon Feb 2 17:35:21 2026 +0100
tdf#147630 Transform Hyperlink dialog into a standard SfxTabDialog
Change-Id: Ibe2ca47a3eb76a623f3e63bc1fbeae52f2ee036c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198577
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can e.g. be triggered like this:
* start Writer
* "Insert" -> "Hyperlink"
* switch to the "Document" tab
* click on the "Events" button
Change-Id: I76df029cbd012d96d6c3df59cf989414e87a22d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198576
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
For the QToolButton objects created for "GtkMenuButton"
objects in .ui files, set the toolbutton style [1] to
Qt::ToolButtonTextBesideIcon instead of the default
of Qt::ToolButtonIconOnly when the
text is non-empty, so it actually gets displayed.
Keep the style of Qt::ToolButtonIconOnly if the text is empty,
to avoid any unnecessary space getting reserved/used otherwise.
(The latter was seen e.g. with the Fusion style shipped with Qt
while the KDE Breeze style wouldn't use extra space in either
case for empty text.)
This makes the text for the current color show up in Calc's
"Create Scenario" dialog newly supported since
commit f984b7f6de
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Mon Feb 2 17:42:31 2026 +0100
tdf#130857 qt weld: Support Calc "Create Scenario" dialog
[1] https://doc.qt.io/qt-6/qtoolbutton.html#toolButtonStyle-prop
Change-Id: I61de2b72d517d1a9d17f142e95cd91e4da9fae33
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198575
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
...after 50f1498332 "Remove ten year old file that
is unused" removed it completely and thus broke
<https://ci.libreoffice.org/job/lo_ubsan/3808/>. (And if an empty file turns
out to be enough, we can either remove it completely in a second step, from both
core and lode, or keep it around in case we ever need to add new content into
it.)
Change-Id: Ieedc93de5e98b76e754dcd9393e66ee64fbf42cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198581
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Open the bugdoc, switch to a non-standard redline render mode (omit
inserts or omit deletes), it's expected to see red-gray or gray-green
pairs of text (for delete and insert), but instead double underline was
shown for some inserts.
This comes from the insert part of moves, which is wanted for the
stanard redline render mode, where an author-specific color is used,
then green (on top of that) means a move.
Fix the problem by avoiding the move-specific rendering for the
non-standard redline render mode case, similar to what the
officecfg::Office::Writer::Comparison::DisplayMovedTextInGreen setting
does.
This required extending the metafile dumper a bit, since underlines were
not exposed in the XML dump.
Change-Id: I717eb0925c1959f787701ef9778ddb704b28031a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198583
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Calc
* select multiple cells, e.g. A1:B2
* "Tools" -> "Scenarios..."
Change-Id: I690302f660bd31fd1703355cfbd5389d4e293d00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198566
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Resave with glade 3.40, but manually restore the
<property name="label" translatable="no"></property>
for a GtkMenuButton that would go missing on resave.
The dialog can be triggered like this:
* start Calc
* select multiple cells, e.g. A1:B2
* "Tools" -> "Scenarios..."
Change-Id: Ic735a9d895e92132c63edaf454c346fd13ba8ad8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198565
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Calc
* "Format" -> "Conditional" -> "Manage..."
Change-Id: Id811f6c77f804096fb9e6a7032db0be36fb426ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198563
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
The dialog can be started like this:
* start Calc
* "Format" -> "Conditional" -> "Manage..."
Change-Id: I3f0249d09bcb31cd25db599705c9241755a21dec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198562
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Calc
* "Tools" -> "Share Spreadsheet..."
Change-Id: I9a425751d5b4f811886f94ee17164b3f5e0dadce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198561
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This means that native Qt widgets are used for that dialog
now when using the qt5 or qt6 VCL plugin and starting LO with
environment variable SAL_VCL_QT_USE_WELDED_WIDGETS=1 set.
The dialog can be triggered like this:
* start Impress
* type something for the title
* with the title text field selected, right-click to
open the context menu
* activate the "Interaction..." context menu entry
Change-Id: I613b75441844eabe57ab3194bdeecf8cf4e3db44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198560
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
...contrary to what c511c65434 "tdf#146619 Use
more forward declarations in include/tools" apparently assumed, as seen at least
with recent Clang 23 trunk against recent libstdc++ 16 trunk,
> In file included from tools/source/generic/poly2.cxx:22:
> In file included from tools/inc/poly.h:22:
> In file included from ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/memory:80:
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:131:18: error: invalid application of 'sizeof' to an incomplete type 'Point'
> 131 | static_assert(sizeof(_Tp)>0,
> | ^~~~~~~~~~~
> ~/gcc/inst/lib/gcc/x86_64-pc-linux-gnu/16.0.1/../../../../include/c++/16.0.1/bits/unique_ptr.h:684:4: note: in instantiation of function template specialization 'std::default_delete<Point[]>::operator()<Point>' requested here
> 684 | get_deleter()(__ptr);
> | ^
> tools/inc/poly.h:33:21: note: in instantiation of member function 'std::unique_ptr<Point[]>::~unique_ptr' requested here
> 33 | ImplPolygon() : mnPoints(0) {}
> | ^
> include/tools/poly.hxx:60:7: note: forward declaration of 'Point'
> 60 | class Point;
> | ^
Change-Id: I0b96222dcec7e98b974151004248a91ba1854e60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@collabora.com>