this is a false positve, but perhaps we can help coverity work it
out properly with some constexpr
Change-Id: I8398153d6678585dacf4acaf7081ec32094bcda6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174150
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
If the paragraph has no First Line Indent applied, create a hanging
indent.
- In Writer: the indentation distance is based on the default tab
distance.
- In Draw/Impress: the indentation distance is based on the distance set
for the Increase/Decrease Indent buttons (1000 twips), which is
different from the default tab distance.
Change-Id: Ifc36c63ad7e6aa852a4b10aca22b7b4de6e10e95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174001
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This reverts commit f063ea562c.
Reason for revert: bad idea. We're not going to re-evalute the loop condition if we use a goto
Change-Id: I8b892cd35c3560396f65619cd095a9b186ecbd24
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174011
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
... from fields"
The intention of my 6.2 commit 579c0749be
hack was to avoid importing duplicate LO-exported bookmarks.
(LO exported the bookmarks inside the field definition,
while MS normally has the bookmarks outside the field.)
So the impact of this revert should be neglible,
affecting mainly documents that LO round-tripped before 6.2
which would just import one more "Copy" of a bookmark.
The reason for doing the revert is also not terribly important.
For a few odd documents that otherwise wouldn't import a bookmark
around a field, it will allow the LO navigator a way to quickly
jump to the field (since Legacy Fields are not included
in the Navigator's field list).
Note that what I am reverting was a HACK any way.
It did a pretty good job of only ignoring LO-exported bookmarks,
since MS Word usually puts the bookmark around the OUTSIDE
of the field, while LO always puts the bookmark
inside the field definition (and thus IsOpenField())
make CppunitTest_sw_ww8export3 \
CPPUNIT_TEST_NAME=testTdf79435_legacyInputFields
make CppunitTest_sw_ooxmlexport12 \
CPPUNIT_TEST_NAME=testTdf120224_textControlCrossRef
Change-Id: Iefaf1173794c66b2a6f3e5c2143ed594de7efe35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174081
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
This code does not appear to be handling the case where there
is no anchor correctly, all the way back to
commit c5718b9414
Author: Andreas Bille <abi@openoffice.org>
Date: Wed Oct 31 12:08:14 2001 +0000
#83054#
Now reading the necessary variables( provider.cxx ),
Change-Id: Ia8f514a95ca2e3ae17129b34f0ed444cd9d0ade8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174122
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
use less convoluted logic here
Change-Id: I786d7f857c7104358559782247c4272914299314
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174112
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
help out coverity by asserting what should be true here
Change-Id: I1c98c29cccf0fd40eb6cc19699428872a5bf56a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174111
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Now that previous commits have implemented what's
needed to display the dialog and for button clicks
to result in the expected action, add the .ui file
for the "Help" -> "License Information" dialog to the
list of supported .ui files for QtInstanceBuilder, so
native Qt widgets will be used for that one with
the Qt-based VCL plugins unless starting LO with
the SAL_VCL_QT_NO_WELDED_WIDGETS environment variable set.
Change-Id: I8a2dff1c751739567a3c9c0728e3357859069a9b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174080
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
For QDialogs (created for "GtkDialog" objects in .ui files)
that have a button box, let clicking any of the buttons
that have a response code set close the dialog with
that response code by connecting to the
QAbstractButton::clicked signal.
This addresses the remaining aspect for the
"Help" -> "License Information" dialog
mentioned in earlier commit
Change-Id: Ic9393755ec474f77ff22a1115e3cccba9d7b26cb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sat Sep 28 00:07:28 2024 +0200
tdf#130857 qt weld: Add initial support for dialog and label
> However, currently (...) clicking the buttons doesn't yet have any
> effect.
Actually using Qt(InstanceBuilder) for that dialog
will be enabled in an upcoming commit.
Change-Id: Ie3c26963318fd5832688e3ed73f6952e09da4bb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174079
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
It will be used for QDialog as well, not just QMessageBox
Change-Id: I887b3fe45beea40cc92f2b0b77f316ad73d7f922
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174078
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
For QDialog, make sure that if a button box is included in
the dialog's layout, that this is the last item in the layout,
by removing from the layout and adding it at the end again.
I don't see any explicit child index explicitly being set in
the .ui file for the "Help" -> "License Information" dialog
("sfx/ui/licensedialog.ui").
Potentially GTK implicitly visually makes the dialog's
button box the last item in the dialog.
Corresponding child is this one:
<child internal-child="action_area">
<object class="GtkButtonBox" id="dialog-action_area1">
Potentially the `<child internal-child="action_area">`
identifies this as the dialog's button box that should
be last, at least dialog newly created in glade
also has that set.
For QMessageBox, which is a QDialog subclass, this
special handling is not needed, as its default
button box is used, which is already at the right
place.
This addresses the first aspect mentioned in
previous commit:
Change-Id: Ic9393755ec474f77ff22a1115e3cccba9d7b26cb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Sat Sep 28 00:07:28 2024 +0200
tdf#130857 qt weld: Add initial support for dialog and label
> However, currently buttons and the label with the text
> are in the wrong order (i.e. buttons are above the text)
Still missing:
> and clicking the buttons doesn't yet have any effect.
Change-Id: Id991551548c1e54fdf2e169886a6c67fc307931f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174077
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Add initial support for the "GtkDialog" and "GtkLabel" objects
in .ui files by creating corresponding Qt widgets
(QDialog for "GtkDialog" and QLabel for "GtkLabel").
This makes the elements of the "Help" -> "License Information"
show up once the .ui file of that that dialog
("sfx/ui/licensedialog.ui") is added to the set of supported
.ui files.
However, currently buttons and the label with the text
are in the wrong order (i.e. buttons are above the text)
and clicking the buttons doesn't yet have any effect.
Those aspects will be addressed in separate commits
before actually claiming support for the dialog
in QtInstanceBuilder::IsUIFileSupported.
Change-Id: Ic9393755ec474f77ff22a1115e3cccba9d7b26cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174076
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Don't restrict to QMessageBox, but allow using the
method with any QDialog, and don't assert that
the dialog has a layout set in this case.
The method will be reused in an upcoming commit.
Change-Id: I1992f2eb4f34b25e487bbd349631b6ecd4365c95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174075
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
When creating a QLayout, pass the parent widget
to the ctor as well, which makes the layout be
set for the widget. Quoting from the QVBoxLayout ctor doc [1]
> Constructs a new top-level vertical box with parent parent.
>
> The layout is set directly as the top-level layout for parent.
> There can be only one top-level layout for a widget. It is returned
> by QWidget::layout().
Also add widgets to their parent layout if the parent
is a QLayout, and not a QWidget.
This makes the items of the "Help" -> "License" dialog
actually be part of the dialog in a WIP branch
that has "QtInstanceBuilder::IsUIFileSupported" in
the set of supported files in QtInstanceBuilder::IsUIFileSupported.
[1] https://doc.qt.io/qt-6/qvboxlayout.html#QVBoxLayout-1
Change-Id: Ib823896a28520b6f7e1e89244239d3204d1d10e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174072
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
In QtBuilder, ignore placeholders as encountered e.g. in
"sc/uiconfig/scalc/ui/checkwarningdialog.ui" (that's not
yet in the list of supported .ui files for QtInstanceBuilder
yet).
VclBuilder mostly ignores them as well, see
VclBuilder::makeObject.
Change-Id: I68481e31365561719af5e72ee20adb428b642941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174071
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
With previous commit
Change-Id: Icaf712c956297dbc7a774bbd995d42eb8a63a1bb
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Fri Sep 27 11:06:55 2024 +0200
qt: Query screen on demand in QtFrame
in place, all relevant members are explicitly set
for the returned SalFrameGeometry in
QtFrame::GetUnmirroredGeometry, so there's no more
reason to start with a copy of `maGeometry` instead of
a default-constructed SalFrameGeometry.
Margins for decorations are never set for the Qt-based
VCL plugins (using methods like SalFrameGeometry::setLeftDecoration),
so the default of 0 is fine for all of these.
Change-Id: Ibed98c665e61a4ba06bf9087a159048417598798
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174035
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins