This fixes a five year old (non-)easyhack with 3 duplicates.
Note the nice-to-have dependencies in the bug report(s).
When the document has a unique background (area) image,
it is now added to the list of available images
IF/WHEN the user looks in the area tab.
This allows the user to switch back after changing,
or re-use it in other places in the document.
Most of this patch ended up being plumbing to ensure that
this added image is ONLY available to the current document,
because it MUST NOT be saved to the user profile.
This change affects all apps and all types of areas: NICE
-tested Writer pages, paragraphs, headers, textbox, sidebar(page)
-tested Calc page style
-tested Draw page, sidebar(page), textbox
Caveats:
-the bitmap list is NOT updated at the time of document import,
only when area property inspected.
(The bug requesting inclusion at the time of import is tdf#100832).
make -srj1 UITest_writer_tests8 \
UITEST_TEST_NAME=tdf125969.tdf125969.test_tdf125969 \
SAL_USE_VCLPLUGIN=gen
Change-Id: Ic9fea9b199602c4df1376e781d5df019526473d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176253
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
...so it can be used with std::sort in impSolve() (further down in
basegfx/source/polygon/b2dpolypolygoncutter.cxx). At least on macOS with a
LLVM 20 trunk libc++ in hardened mode, JunitTest_sfx2_complex failed with
> ~/llvm/inst/bin/../include/c++/v1/__debug_utils/strict_weak_ordering_check.h:59: assertion __comp(*(__first + __a), *(__first + __b)) failed: Your comparator is not a valid strict-weak ordering
To simplify the new implementation of struct SN operator <, add a B2DPoint
operator <=> (but whose implementation would cause
> In file included from /home/tdf/lode/jenkins/workspace/android_arm/basegfx/source/curve/b2dbeziertools.cxx:21:
> In file included from /home/tdf/lode/jenkins/workspace/android_arm/include/basegfx/curve/b2dcubicbezier.hxx:22:
> /home/tdf/lode/jenkins/workspace/android_arm/include/basegfx/point/b2dpoint.hxx:129:41: error: invalid operands to binary expression ('tuple<const double &, const double &>' and 'tuple<const double &, const double &>')
> { return std::tie(a.mnX, a.mnY) <=> std::tie(b.mnX, b.mnY); }
> ~~~~~~~~~~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~
etc. on Android with NDK 23.2, see
<https://ci.libreoffice.org/job/gerrit_android_arm/43174/>, so work around that
in the implementation for now).
Change-Id: I9f46d39dc9e9024fe9ac59413c44e49642282c8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175622
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
to match the underlying field and avoid confusion.
The "IsOn" prefix normally means "is the current thread running on",
which is not what this method means
Change-Id: I3399a707582c9b0c681cd4aa03bc9f94860fc7fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177960
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Add clear method to clear the variables that we usually want to
be cleared. Also rename Encrypt to canEncrypt - which is more
clear what it means. Cleanup initializers.
Change-Id: I96735eb6f73a699fb0759496fc8781bcff3854de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176455
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177874
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Jenkins
This is needed because we have to separate the init. for both
encryption methods and we have to init both when the password is
entered. Currently we only prepared this, to make this possible
when we introduce the other encryption method.
Change-Id: Id6556ddc6a6218164a93bb689f03d6ec6dbad8b9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176454
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177873
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Make the `extractTitle` helper function used by
VclBuilder a static method in the BuilderBase
base class for reuse by QtBuilder.
In QtBuilder::makeObject, when encountering a "GtkTreeViewColumn"
object, add a new column to the QTreeView and set the
column title in the underlying model using
QStandardItemModel::setHeaderData.
Return the parent (tree view).
(Returning no object would cause WidgetBuilder::handleObject
to call WidgetBuilder::insertObject again, and thus result
in every column being processed twice, i.e. the double
amount of columns would be inserted).
Adjust QtInstanceTreeView::clear to no longer
call QStandardItemModel::clear [1], as that would
not only remove the "actual" items, but also the
header items, i.e. the column titles would get lost
as well. Remove all rows instead.
With this in place, the tree view in Writer's
"Tool" -> "XML Filter Settings" dialog has the
correct data + title set on open in a WIP branch
where support for that dialog is declared in
QtInstanceBuilder. (Other aspects in the dialog
still need to be addressed however.)
[1] https://doc.qt.io/qt-6/qstandarditemmodel.html#clear
Change-Id: I59956c007ed73cddb299ad2374afd88199ddc94d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178063
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Rename weld::TreeView member + methods to clarify
that these are about selection changes:
* m_aChangeHdl to m_aSelectionChangedHdl,
* signal_changed to signal_selection_changed
* connect_changed to connect_selection_changed
In GtkInstanceTreeview, also rename the
related methods calling signal_selection_changed
accordingly for consistency.
Change-Id: I299d7930484677395a0bdd0ff105df18688f2e04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178023
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
- weld::Menu doesn't have base with weld::Widget
- use separate container, only one menu per WindowId
- first only send menu and cancel, when user activates
option we will send another request and execute entry
as menu can be blocking
- there is connect_activated way of async setup too
Change-Id: Iea03f82a91ecc19af67b91f85364675c119056ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177722
(cherry picked from commit efeb511607dacce991866bcf328c96a01ab594f9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177852
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
follow up for f5ebf512ccd3d5ae3af5fe706b411a85fa19182d
now same actions are performed on all the dialogs
Change-Id: I6531a766327dda106770a2c513ebd492dea7c655
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176933
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
(cherry picked from commit 2fba6df7242586870988b62909156538b42c2bc0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177892
Tested-by: Jenkins
Similar to what already exists in most subclasses,
add signal_<event_name> methods to call the handlers
and use these in the subclasses instead of calling
the handlers directly.
Change-Id: I6b79ddd859b360e947d97ada57f1573a276d6177
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177834
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
... instead of using the toolkit/UNO wrapper
SVTXNumericField.
Change-Id: I86e274a06f210e2076e287087a1d4b979abe7c35
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177814
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Other than most of the a11y implementations for vcl
classes, VCLXAccessiblePopupMenu etc. do not
make use of any VCLXWindow (i.e. UNO/toolkit wrapper of a
vcl::Window) and thus do not depend on the toolkit
module, which the accessibility module depends on.
Therefore, there's also no need to use the accessible
factory to create them (which is needed when toolkit
classes are involved to avoid a dependency cycle).
Move those classes from the accessibility module to
vcl and add a new method Menu::CreateAccessible and
move the logic from AccessibleFactory::createAccessible
there. Drop the now unnecessary factory methods
previously used for those classes.
No change in behavior intended (yet), but this
also simplifies the code involved for the
tdf#164093 scenario.
Change-Id: Ie3f6f1a02bf6662206d31383473cdc868e1f9164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177812
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Move helpers to convert between the Rectangle, Point and Size
classes in vcl and in css::awt from VCLUnoHelper (in the toolkit module)
to vcl::unohelper (in the vcl module), for reuse in vcl in upcoming
commits.
Change-Id: I7b11c8a6b8c843a01ce25b1e4c0fb1869ad1e6ee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177816
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
... so these constants can be reused in vcl.
See commit message of
Change-Id: I6aeee104f271c804c85727002822b89a9263628f
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Dec 4 11:45:44 2024 +0100
a11y: Move CharacterAttributeshelper from accessibility to vcl
for motivation.
Change-Id: I1552c0a0111c81643ab9bb6f202c8a31662251d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177811
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This is in preparation of moving more from
the accessibility module to vcl.
Currently, the a11y implementations for vcl widgets
are implemented in the accessibility module (in
directory of the same name), which in turn depends
on the toolkit module.
To break the dependency cycle (vcl needs accessibility
to create a11y objects for its widgets), there's a UNO
service.
At least some a11y classes don't really need toolkit,
however, so the plan is to decouple this and move those
from the accessibility module into vcl in upcoming
commits.
Change-Id: I6aeee104f271c804c85727002822b89a9263628f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177810
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This method from the unpublished XAccessibleExtendedComponent
interface is not used by any of the a11y platform bridges, and
I don't know of any platform a11y API that would need it.
In order to report character/font attributes, there is the
XAccessibleText interface and its
XAccessiText::getCharacterAttributes method instead, which
actually gets used by the platform a11y bridges.
Therefore, drop this method to simplify code, and also decouple
the accessibility module a bit further from the toolkit
module without having to reorganize code further.
(VCLXFont from the toolkit module currently gets used in
various implementations.)
Change-Id: I06ea3cc5998a13927b3f869877b28f03ac07c89b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177809
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Pass arguments right away in ctor rather than
having a ctor that takes no arguments and then
having to call VCLXFont::Init with the arguments
right after calling the ctor.
Change-Id: I651e27154499f61638409377438f9589bc7412a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177795
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The call sites are actually passing in transparency, in fact to be
consistent with current conventions we are actually dealing with alpha
values. So we need to take the transparent values at the call sites and
convert to alpha values by just subtracting 255. Hence fixing the FIXME
comment.
Change-Id: Ibc55ea77f469ec8afcab0cc26d2b8cdf25ea8a72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173858
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
... in D2DWriteTextOutRenderer.
Commit 785a56b6be (D2DWriteTextOutRenderer:
use grayscale AA for file output, 2024-11-27) has disabled it only when
the export settings explicitly specified a concrete AA setting. In case
when the settings didn't specify explicitly, if AA should be used or not,
then system settings were used, which in case of D2DWriteTextOutRenderer
would still enable ClearType (subpixel AA).
This stores additional flag in StyleSettings, similar to what was done
in commit e6538f5bdd (tdf#118966 vcl: add
a flag to determine if AA of fonts is used from the system, 2018-07-28),
that tells the renderer to prevent subpixel AA, even if use of AA itself
is defined by system settings. This flag is currently only considered by
D2DWriteTextOutRenderer.
Change-Id: Ibd1879d3c222276eee00c37a442881d6d47c831f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177780
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
This fix offers two options to preserve the overflowed text:
1: if the "Original size" option is selected for printing,
the overflowed text will be displayed on a new page.
2: if the "Fit to Printable Area" option is selected for printing,
notes will be scaled to fit within the available printable space.
The "Multiple sheets of paper" and "Tile sheet of paper" options are disabled for notes because these options are intended for slide printing and do not make much sense for printing notes.
The orientation for the notes print page has also been fixed.
Change-Id: I99e56cf9aed5c32764797469a8ea7f3b25053882
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177511
Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
Tested-by: Jenkins
Change Menu::ClosePopup param from Menu* to
the child class PopupMenu*, as this is always
a PopupMenu. This also removes the need to
cast to PopupMenu in the PopupMenu::ClosePopup
override.
Change-Id: I129e6ebc7c801c1ca93514f26f79b76f970957a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177745
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
This avoids the need to do a dynamic_cast and makes
clear that this method always gets called with either
a window of a proper type or nullptr.
Change-Id: I8ca4020476c806ad423379c7c7ee6fdc6ceccd3a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177697
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Merge PopupMenu::PrepareRun into its only caller
which makes it a little easier to follow the logic
and track what's assigned to what local variable than
when using many out params.
Change-Id: Id967040a579e3f6532afa523215049bdb68f1cd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177694
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Application doesn't need access to any private members.
Change-Id: Ia69b64ecf8e380b0b8da7477e3a3c7d312629965
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177693
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
MenuFloatingWindow is the window used of PopupMenu,
while the window for MenuBar is MenuBarWindow.
MenuFloatingWindow only needs access to the menu
bar's MenuBarWindow, so make MenuBar::getMenuBarWindow
public and no longer let MenuFloatingWindow be a
friend of MenuBar, to make a little clearer who
is able to access whose private members,...
Change-Id: I7ee492e36d6e94884d1dba652d11f26cb8543a52
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177692
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
... and reset the view options that are toggled in
testHiddenParagraphFollowFrame and testHiddenParagraphFlys.
Backporting these tests to the libreoffice-24-8 branch broke 2 unrelated
tests because of the changed view settings:
Test name: (anonymous namespace)::testHiddenSectionPageDescs::TestBody
equality assertion failed
- Expected: 532
- Actual : 798
- In <>, attribute 'height' of '/root/page[2]/body/section[1]/infos/bounds' incorrect value.
xmltesttools.cxx:203:Assertion
Test name: (anonymous namespace)::testTable0HeightRows::TestBody
equality assertion failed
- Expected: 28
- Actual : 22
- In <>, XPath '/root/page[1]/body/tab/row' number of nodes is incorrect
Change-Id: Ie58242348fecabe163e54048f3896c6d427d2608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177691
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
And drop the then no longer needed const_cast in
Menu::GetSystemMenuData.
Change-Id: Iac438850c5258e5fc23a4b3901f4601edf82e57c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177659
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins