Add a helper method QtBuilder::deleteObject
that takes care of marking no longer needed
objects for deletion and use it in the 3 places
so far calling QObject::deleteLater themselves.
If the object marked for deletion is a widget,
hide it as well, as it could otherwise still
be "in the way".
This was seen wit the edit (QLineEdit) of the editable
combobox in the "File" -> "Properties" dialog,
"General" tab (in a WIP branch for adding support
for that dialog), where the unnecessary edit was
shown on top of the combobox, hiding the combobox
content + dropdown button.
Change-Id: Ie299b80824c94d40cfac9f7962c9bd4ba95b446d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177057
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
If QtInstanceNotebook::get_page gets called with
and ID that none of the existing pages actually have,
return nullptr early and don't try to QtInstanceContainer
instance for the null widget, which would trigger an
assert when nullptr is passed to the QtInstanceWidget
base class ctor.
Calling QtInstanceNotebook::get_page with an ID for
which no page exists yet is what
SfxTabDialogController::AddTabPage does explicitly
before asserting a page to assert that there isn't
such a page yet.
SalInstanceNotebook::get_page and GtkInstanceNotebook
also have specific handling for that case.
Change-Id: Ib2044fd4c9f986f2252afed5754a6383f940e5e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177055
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
When this method gets called the first time, insert
a widget with a QVBoxLayout at the beginning
of the dialog's layout, remember and return that.
On subsequent call, return the same one.
Initially, handle the case where the dialog's
layout is a QBoxLayout (subclass), which is
the case for the "File" -> "Printer Settings"
-> "Options" dialog in Writer.
This should be easy to extend for other layouts
as well when needed. For now, assert when another
layout is used, so it will become clear when
working on adding support for another dialog
that needs this.
Change-Id: Ia41a87f8cf62666efc91c05f25dae5fccb3da41d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177054
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
The encoding of the string passed to Hunspell/hyphen service depends on the
encoding of the dictionary itself. When the usual UTF-8 encoding is used,
the resulting octet string may be longer than the original UTF-16 code unit
count. In that case, the length of the buffer receiving the positions will
be longer, respectively. But on return, the buffer will only contain data
in positions corresponding to the characters, not code units (it is unclear
if we even need to pass buffer that large). So just as the following loop
only iterates up to nWord length, the calculation of hyphen count must use
its length, too, not the length of encWord.
I suspect that the use of UTF-16 code units as hyphen positions is wrong;
it will break in SMP surrogate pairs. The proper would be to iterate code
points. However, I don't have data to test, so let it be TODO/LATER.
Change-Id: Ieed5e696e03cb22e3b48fabc14537372bbe74363
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177077
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Before commit 0c96119895 (tdf#159565
prerequisite: make hidden sections have zero-height frames, 2024-02-15),
the hidden sections were absent from layout, so didn't appear in the
SwTOXBaseSection::Update* functions. Now they are zero-height, but
present, so their visibility must be taken into account explicitly.
Change-Id: I95cc72b383a99e1f65152579c5458e253a3f60ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177079
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
No need to check chart title paragraph style name and ID, since its
never exists.
follow-up of:
d7214aba956fdad72372
Change-Id: Ieffe3026adc848cfbf3a847b4f876b5aa2e2a026
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177011
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Tested-by: Jenkins
* Update translations from branch 'master'
to 318e92fb60edf7a9889cac87bd0489123553ce1d
- update translations for master/25.2.0 alpha1
and force-fix errors using pocheck
Change-Id: Ie52bd18e7f82e90d5095b195ffbf6bbc4f84e254
SwFrame::PaintSwFrameShadowAndBorder() is called by upper's
SwFrame::PaintSwFrameBackground() so it needs another check.
(regression from commit ff7f1b59e2)
Change-Id: Ic7ac28e4af8e0abf4970d87edb40a79ad4d25156
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177032
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>