Commit graph

502402 commits

Author SHA1 Message Date
Mike Kaganski
0f3f371028 NameContainer need not be an UNO object itself
Change-Id: I56f07a62ed3d2388eede16a85e673027cfed8158
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177616
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 22:44:38 +01:00
Christian Lohmaier
827fa4cb7b mac-sandboxing: also exclude AppleRemote when using --enable-mergelibs
mergelibs have been added to the LibreOfficeMacOSX distro config in
e6e22bee15, but AppleRemote has been
disabled in the sandboxing case since 2013
4fe9ef81aa "The AppleRemote code is
blocked by sandboxing so bypass it in that case"
(unclear to me whether fundamentally not working or whether it was
disabled to get sandboxing as a whole in a working state quickly, since
there was an earlier entitlement for mac.remotecontrols)

Change-Id: I8514319b1d9ffa3a993267eaebac0c2ff058740f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177621
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-12-01 19:31:45 +01:00
Christian Lohmaier
16652e55f9 mac: don't try to strip Contents/Frameworks/intl directory
the intl data for firebird has been added with
07cc2fdc3d (and the associated config file
later moved to Resources with dfa78d2eac)

Change-Id: I4fe666076c42bae21b371fe0ea9495ebc915bd21
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177617
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2024-12-01 19:30:36 +01:00
Caolán McNamara
90248dca6b cid#1608083 Overflowed constant
Change-Id: I1aaa2ca5711b932676621ee37b00fd0683593214
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177619
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-01 19:20:55 +01:00
Caolán McNamara
1c8d7d826f rearrange to compare against unoperated-on nCharCount
Change-Id: I5bd1e8c4974616289b563bfd4893bf9616c04a59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177618
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-01 19:20:32 +01:00
Caolán McNamara
87aa067bae This TODO got fixed in 2016
with:

commit 8a2149c105
CommitDate: Fri May 20 07:55:30 2016 +0000

    clang-tidy misc-assign-operator-signature

Change-Id: I9ffbfd4cfa5742b4fa62b616591c19ebe3fc1f0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177615
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-12-01 19:20:01 +01:00
Caolán McNamara
2ca770830c nothing consumes the ReadParaProps nCharCount arg, so drop it from params
Change-Id: Iea1bd3bb7df6466aeee480d8e44659b71bef580e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177614
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-01 19:19:54 +01:00
Caolán McNamara
6b4908d77d disentangle nCharCount variable used for two different things
Change-Id: Ia8a5eef35c7a4ccdc9d7747fbb408f670777a49b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177613
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-12-01 19:19:38 +01:00
Caolán McNamara
caeed20075 ReadCharProps always overwrites nCharCount
its an out only param, not in-out

Change-Id: I4e969bf06bed41a7e04497880f8ea51a3f784feb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177612
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-01 19:19:13 +01:00
Caolán McNamara
f82818ad04 cid#1557419 Data race condition
and

cid#1557189 Data race condition

Change-Id: I6ee6dd60d7b0eccca3042ad5ff7846f77f16feec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177610
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-01 17:12:42 +01:00
Caolán McNamara
ad338cae4e cid#1606986 COPY_INSTEAD_OF_MOVE
and

cid#1556101 COPY_INSTEAD_OF_MOVE
cid#1555475 COPY_INSTEAD_OF_MOVE
cid#1555310 COPY_INSTEAD_OF_MOVE

Change-Id: Ibabd8fd59a5435b8ab6c33d78c1303e5e1bdfd9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177609
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-12-01 16:59:29 +01:00
Christian Lohmaier
658b492c1a Update git submodules
* Update translations from branch 'master'
  to 685db476dad288f6635917ae0ca05d5369c64c15
  - update translations for master / 25.2
    
    and force-fix errors using pocheck
    
    Change-Id: Iad27f4c2f514466569dcb982849dee099b6c77d7
2024-12-01 16:54:30 +01:00
Mike Kaganski
297b7a7676 Optimize SfxLibrary / SfxLibraryContainer memory layout a bit
Change-Id: I63ba583ef990dd2bbfb7f44af613fce1d8d1b411
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177608
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 16:06:31 +01:00
Mike Kaganski
d91eca950e Simplify SfxLibrary hierarchy
For some reason, SfxLibrary's own interfaces were used outside of
WeakComponentImplHelper; and derived classes didn't use inheritance
helper.

Change-Id: Ib0b6cf5cfa559fe5eedc4d05247655aca1bfc4b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177607
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-12-01 16:06:24 +01:00
Mike Kaganski
ac334d5c76 Simplify a bit
Change-Id: Ia48a24d1696aaf2ee7e49f5e8c9f9dcc0ae9e8e2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177606
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 16:06:17 +01:00
Caolán McNamara
ece47db816 make this a little more readable
Change-Id: I922b150f2c1682ec48331319bbf6222482c6cd3c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177595
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-12-01 15:36:19 +01:00
Caolán McNamara
32ac606ec3 new doesn't return null on failure since C++98
Change-Id: Ib9260ec6ba148f0de248753148309a6c578e796d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177600
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-12-01 15:35:56 +01:00
Caolán McNamara
e3b9a442e0 drop 'store' from libs we pagein on startup
it's there to speed up later read of it, but in normal situations we
shouldn't use it anymore IIUC

Change-Id: Ia075e32cd4820729b341d4d47dbfb9126a363559
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177601
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-12-01 15:33:57 +01:00
Laurent Balland
3ee73a4d1e tdf#163102 Replace DocBookTemplate.stw by build-in...
DocBookTemplate.ott
Simply copy makefile of extra/templates
fix bug tdf#161930: mimetype is zipped only once

Modifications to DocBookTemplate.stw:
- change fonts to bundled fonts: Liberation Serif, Noto Sans CJK, Noto Sans Devanagari
(not so useful as used fonts are defined in
docbooktosoffheadings.xsl and sofftodocbookheadings.xsl)
- remove language and country tags
- remove page size
- remove writing mode tags
- remove content.xml
- remove meta.xml
- simplify settings.xml
- remove unused namespaces

Change-Id: Ic2a2284c3d890b8a6b7b4e29bdab18c33d40dcee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174847
Tested-by: Jenkins
Reviewed-by: Laurent Balland <laurent.balland@mailo.fr>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 12:30:30 +01:00
Mike Kaganski
ea2a974386 Simplify NameContainer
Having a map, two vectors, and a counter for what is a job for a single
map is a bit too much.

Change-Id: I50d29f03a2463e6f63ed8e645c36b4c77aa1413a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177604
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 12:27:02 +01:00
Mike Kaganski
e413d962ac Drop unneeded indirection and unused argument
The extra complexity was introduced for #i94994# in commit
3266965986 (CWS-TOOLING: integrate CWS
ab61, 2009-02-11).

Change-Id: If5a69984e3c2c963d4eea2824373fbf1e8a47fef
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177603
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-01 10:27:16 +01:00
Michael Weghorn
afc441e651 tdf#130857 qt weld: Support "Insert Breaks" dialog
Declare support for the "Insert Breaks" dialog that
can be triggered using the "Insert" -> "More Breaks" ->
"Manual Break" menu entry in Writer.

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.

Change-Id: I338b017d082532a831168f1c6d0e3e5147e04a39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177599
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-12-01 00:35:00 +01:00
Michael Weghorn
7498b77bf6 tdf#130857 qt weld: Support "Split Table" dialog
Declare support for the "Split Table" dialog that
can be triggered using the "Table" -> "Split Table"
menu entry in Writer while the cursor is inside of a
table cell.

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.

Change-Id: Iae4855027de533ff7f9a4148f8101a56c281abcf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177598
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-12-01 00:34:54 +01:00
Michael Weghorn
6eb823fa40 tdf#130857 qt weld: Support "Split Cells" dialog
Declare support for the "Split Cells" dialog that
can e.g. be triggered using the "Table" -> "Split Cells"
menu entry in Writer while the cursor is inside of a
table cell.

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.

Change-Id: I5b994698ea46e9ede763169d21fe53527b3b369b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177597
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-12-01 00:34:48 +01:00
Caolán McNamara
8c1dbd3188 cid#1607542 COPY_INSTEAD_OF_MOVE
and

cid#1606986 COPY_INSTEAD_OF_MOVE
cid#1557969 COPY_INSTEAD_OF_MOVE
cid#1557837 COPY_INSTEAD_OF_MOVE
cid#1557772 COPY_INSTEAD_OF_MOVE
cid#1557735 COPY_INSTEAD_OF_MOVE
cid#1557672 COPY_INSTEAD_OF_MOVE
cid#1557664 COPY_INSTEAD_OF_MOVE
cid#1557650 COPY_INSTEAD_OF_MOVE
cid#1557642 COPY_INSTEAD_OF_MOVE
cid#1557639 COPY_INSTEAD_OF_MOVE
cid#1557628 COPY_INSTEAD_OF_MOVE
cid#1557623 COPY_INSTEAD_OF_MOVE
cid#1557581 COPY_INSTEAD_OF_MOVE
cid#1557489 COPY_INSTEAD_OF_MOVE
cid#1557473 COPY_INSTEAD_OF_MOVE
cid#1557317 COPY_INSTEAD_OF_MOVE
cid#1557261 COPY_INSTEAD_OF_MOVE
cid#1557146 COPY_INSTEAD_OF_MOVE
cid#1557135 COPY_INSTEAD_OF_MOVE
cid#1557134 COPY_INSTEAD_OF_MOVE
cid#1557079 COPY_INSTEAD_OF_MOVE
cid#1557063 COPY_INSTEAD_OF_MOVE
cid#1557052 COPY_INSTEAD_OF_MOVE
cid#1556982 COPY_INSTEAD_OF_MOVE
cid#1556977 COPY_INSTEAD_OF_MOVE
cid#1556950 COPY_INSTEAD_OF_MOVE
cid#1556943 COPY_INSTEAD_OF_MOVE
cid#1556804 COPY_INSTEAD_OF_MOVE
cid#1556736 COPY_INSTEAD_OF_MOVE
cid#1556658 COPY_INSTEAD_OF_MOVE
cid#1556621 COPY_INSTEAD_OF_MOVE
cid#1556590 COPY_INSTEAD_OF_MOVE
cid#1556579 COPY_INSTEAD_OF_MOVE
cid#1556534 COPY_INSTEAD_OF_MOVE
cid#1556524 COPY_INSTEAD_OF_MOVE
cid#1556478 COPY_INSTEAD_OF_MOVE
cid#1556467 COPY_INSTEAD_OF_MOVE
cid#1556422 COPY_INSTEAD_OF_MOVE
cid#1556314 COPY_INSTEAD_OF_MOVE
cid#1556309 COPY_INSTEAD_OF_MOVE
cid#1556258 COPY_INSTEAD_OF_MOVE
cid#1556143 COPY_INSTEAD_OF_MOVE
cid#1556119 COPY_INSTEAD_OF_MOVE
cid#1556101 COPY_INSTEAD_OF_MOVE
cid#1556097 COPY_INSTEAD_OF_MOVE
cid#1556039 COPY_INSTEAD_OF_MOVE
cid#1555966 COPY_INSTEAD_OF_MOVE
cid#1555948 COPY_INSTEAD_OF_MOVE
cid#1555915 COPY_INSTEAD_OF_MOVE
cid#1555836 COPY_INSTEAD_OF_MOVE
cid#1555748 COPY_INSTEAD_OF_MOVE
cid#1555644 COPY_INSTEAD_OF_MOVE
cid#1555582 COPY_INSTEAD_OF_MOVE
cid#1555478 COPY_INSTEAD_OF_MOVE
cid#1555475 COPY_INSTEAD_OF_MOVE
cid#1555409 COPY_INSTEAD_OF_MOVE
cid#1555372 COPY_INSTEAD_OF_MOVE
cid#1555334 COPY_INSTEAD_OF_MOVE
cid#1555330 COPY_INSTEAD_OF_MOVE
cid#1555310 COPY_INSTEAD_OF_MOVE
cid#1555257 COPY_INSTEAD_OF_MOVE
cid#1555247 COPY_INSTEAD_OF_MOVE
cid#1555147 COPY_INSTEAD_OF_MOVE
cid#1555120 COPY_INSTEAD_OF_MOVE
cid#1555059 COPY_INSTEAD_OF_MOVE
cid#1555016 COPY_INSTEAD_OF_MOVE
cid#1554880 COPY_INSTEAD_OF_MOVE
cid#1554824 COPY_INSTEAD_OF_MOVE
cid#1554808 COPY_INSTEAD_OF_MOVE
cid#1546189 COPY_INSTEAD_OF_MOVE

Change-Id: I2d2f33c603f1596228c9ecb169472ba6751e7826
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177593
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 22:39:23 +01:00
Caolán McNamara
096a1f0a6f cid#1608320 COPY_INSTEAD_OF_MOVE
and

cid#1607135 COPY_INSTEAD_OF_MOVE

Change-Id: If8f36744c53bb0515516a23589ffdb389aaec02c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177592
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 21:58:21 +01:00
Caolán McNamara
10ea4f0b93 cid#1635783 silence Using invalid iterator
and

cid#1635784 Using invalid iterator
cid#1635785 Using invalid iterator

Change-Id: I88ca7325b45a556638dc7b7ee01e78cf0238a0de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177591
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2024-11-30 21:40:05 +01:00
Caolán McNamara
9fa6704670 cid#1607234 Overflowed return value
Change-Id: Ic4b47f0dd0f5d24026a4ce001d52d1fd29a0c656
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177590
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 21:37:44 +01:00
Caolán McNamara
6fd05636e2 cid#1557258 Data race condition
Change-Id: Iaf4fdba3696669763511aa476e53a0fea36a05c0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177589
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-11-30 21:12:16 +01:00
Arnaud VERSINI
fb30ee5a63 tdf#147021 : use std::size in scaddins
Change-Id: I8a17b5a782aedd8784595c7febbacc24921bce1d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169357
Tested-by: Jenkins
Reviewed-by: Arnaud Versini <arnaud.versini@pm.me>
2024-11-30 19:27:58 +01:00
László Németh
20ee4ecfeb tdf#164074 sw inline heading: clean-up outline moving
Fix bad condition with ++std::npos in the following !WithChildren
inline heading branch:

else if( pOutlNdsInline && ++nEndPosInline < pOutlNdsInline->size() )

The problem was reported by Caolán McNamara.

Remove also an unused variable in docnum.cxx.

Follow-up to commit 32398232e9
"tdf#164074 sw inline heading: add up/down outline moving".

Change-Id: I61d75451adeb13fe8e74ce586c4668a8caf0105b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177580
Tested-by: László Németh <nemeth@numbertext.org>
Reviewed-by: László Németh <nemeth@numbertext.org>
2024-11-30 18:37:33 +01:00
Mike Kaganski
34a63a22df sd: simplify UpdateShellStack
Change-Id: I10a21d1d62afa6118b665c031cb6d70b1bc006ba
Co-authored-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177497
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2024-11-30 15:25:05 +01:00
Mike Kaganski
7d89a348fb tdf#164101: avoid incorrect OLE object scaling during loading
Use an internal property for that, alowing to pass the option from the
import site to SdrOle2Obj::AddOwnLightClient. Maybe there is some more
proper way to do this, but I couldn't find it.

Change-Id: I74c881c5c35689a7b58d44d8d65c1010d202c98d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177586
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-11-30 14:23:22 +01:00
Michael Weghorn
f36de41877 tdf#130857 vcl: Deduplicate extract* methods returning OUString
This is similar to

    Change-Id: Id0cd9ca29ee0cbd638f90a32434b1ce6b4200e6b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Sat Nov 30 10:24:30 2024 +0100

        tdf#130857 VclBuilder: Deduplicate extract* methods returning bool

, but for methods extracting an OUString value instead
of a bool one.

Change-Id: Ic90ac0c630ee7454b8a7fa4f34383f8635d21ff3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177585
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 12:32:31 +01:00
Michael Weghorn
1e54fbfa6b tdf#130857 vcl: Deduplicate extract* methods returning bool
Add new `extractBoolEntry` helper that takes the
map, key and a default value to return if the
map doesn't contain the key.

Use that new helper to deduplicate the various
methods implementing the same logic over and over
again.

Change-Id: Id0cd9ca29ee0cbd638f90a32434b1ce6b4200e6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177584
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 12:32:25 +01:00
Michael Weghorn
2fe4500628 vcl: Drop local var pointing to self in WindowData ctor
Before

    commit 2e509b886f
    Date:   Sun Jun 12 17:42:05 2022 +0200

        Convert ImplWindowStateFromStr to WindowData(str)

, `rData` was a method param for ImplWindowStateFromStr.

Now, using it instead of just using `this` is
unnecessary.

Change-Id: I7974161990375e44d4d78097e49a9f42e118bcce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177579
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:41:49 +01:00
Michael Weghorn
de7cfac4df tdf#130857 qt weld: Assign QtInstanceFrame::m_pGroupBox
That was apparently forgotten in

    commit 0a4ec73c23
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Fri Oct 25 10:04:10 2024 +0200

        tdf#130857 qt weld: Add a QtInstanceFrame

and none of the dialogs declared as supported this
far was actually calling any method making use
of it, as that would have triggered nullptr
dereference.
(Seen now while experimenting with adding support for
the "Search and Replace" dialog.)

Change-Id: I84ec83f4d4af8b2828e5033f366037b3114629d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177578
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:41:36 +01:00
Michael Weghorn
9ccfc8a719 tdf#130857 Search dialog: Use weld::Container ptr instead of Box
None of the weld::Box methods are used, so having a pointer
to the weld::Container subclass is sufficient in the
"Find and Replace" dialog implementation.

Change-Id: I1219dd657ab8fb6067c90aabdc27b2b84c0a1443
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177577
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 09:41:21 +01:00
Michael Weghorn
05c8f91d5a tdf#130857 qt weld: Implement more TreeView methods wrt selection
Change-Id: I3479b138a0986f1fbac7745e575e318bf63c1911
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177576
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:41:05 +01:00
Michael Weghorn
ec395cfd20 tdf#130857 qt weld: Add member for tree view selection model
... and use it in misc places instead of calling
QTreeView::selectionModel repeatedly.

Change-Id: I9d9ee622bb98bf3267d858ee484128b364d14ad2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177574
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:40:56 +01:00
Michael Weghorn
7003cb1d74 tdf#130857 qt weld: Notify about current tree view item change
When the current (focus) item in the tree view changes,
call weld::TreeView::signal_changed to notify about this.

While QTreeView doesn't have a signal for that itself,
its QItemSelectionModel does, so connect to that one.

With this in place, SvPasteObjectDialog::SelectHdl
now gets called when switching between items in the
"Past Special" dialog when using the qt6 VCL plugin
with native Qt widgets, as is the case with the gtk3
VCL plugin.

Change-Id: I5aab68055f711480d56b043252d15621f18c4919
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177573
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:40:48 +01:00
Michael Weghorn
0513dbac40 tdf#130857 qt weld: Call tree view row activation handler
Change-Id: Ib95cc7d4c2b60d3b426b76573ff06917637d838e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177572
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 09:40:37 +01:00
Michael Weghorn
f96959a377 tdf#130857 qt weld: Support "Paste Special" dialog
Declare support for the "Paste Special" dialog
that appears when copying something using Ctrl+Shift+V.

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.

At least copying text from a browser gives the expected
result when copying as either HTML or plain text in a quick
test.

Change-Id: I967f5edd00b19e7ee70f1f7ef4d55240ae700e2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177570
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:40:28 +01:00
Michael Weghorn
210088db7c tdf#130857 qt weld: Implement QtInstanceTreeView::get_selected_{id,text}
Change-Id: I6a732606c6bf762033744824e857f861077b0237
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177569
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 09:40:21 +01:00
Michael Weghorn
17b49c778d tdf#130857 qt weld: Implement QtInstanceTreeView::find_{id,text}
Still untested.

Change-Id: I2124852eb00bc515264ae99798e4b05a37c7266b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177568
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 09:40:12 +01:00
Michael Weghorn
f956faffde tdf#130857 qt weld: Implement setting tree view entry ID
Use QStandardItem::setData with a custom role
(ROLE_ID, with a value sufficiently larger than
Qt::UserRole to avoid any accidental overlap, as
e.g. QStandardItem::setData would use a default
role of Qt::UserRole + 1) to set the ID.

Implement QtInstanceTreeView::get_id
to get the ID for the entry with a given index.

Change-Id: If1c8cecac44fb3eb9ca2152abb05c3864240383a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177567
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:39:56 +01:00
Michael Weghorn
25c0fe3f49 cui: Resave pastespecial.ui with glade 3.40
This is the "Paste Special" dialog that shows
when pasting using Ctrl+Shift+V.

Change-Id: I7a3166251111a4fd568ad8c395e4d4053ae1f868
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177566
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:39:49 +01:00
Michael Weghorn
5073fc170e tdf#130857 qt weld: Evaluate GtkTreeView:show-expanders property
Evaluate the GtkTreeView:show-expanders property [1]
and set the QTreeView::rootIsDecorated propert accordingly [2]:

> This property holds whether to show controls for expanding and
> collapsing top-level items
>
> Items with children are typically shown with controls to expand and
> collapse them, allowing their children to be shown or hidden. If this
> property is false, these controls are not shown for top-level items.
> This can be used to make a single level tree structure appear like a
> simple list of items.

With this in place, there are no more expanders shown for
Calc's "Sheets" -> "Show Sheet" dialog for the native Qt
version, just like with the gtk3 or gen versions.

[1] https://docs.gtk.org/gtk3/property.TreeView.show-expanders.html
[2] https://doc.qt.io/qt-6/qtreeview.html#rootIsDecorated-prop

Change-Id: I11bcdd39695d230866abddf6d4b305dd6af52f59
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177548
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 09:39:42 +01:00
Michael Weghorn
cb17f33b67 tdf#130857 qt weld: Evaluate tree view header visibility
Take into account the "headers-visible" property
for "GtkTreeView" in .ui files.

With this in place, Calc's "Sheets" -> "Show Sheet"
dialog no longer shows an unexpected "1" title
above the list of hidden sheets.

Change-Id: I054cca7e2b379782cf3548cb822ecdba0f5553d4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177547
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2024-11-30 09:39:35 +01:00
Michael Weghorn
480d38b18c tdf#130857 VclBuilder: Move extractHeadersVisible to base class
Move this helper function to the base class, for reuse
in QtBuilder in an upcoming commit.

Change-Id: Ide125c87bd4ebf63f70f94239a9bc42c3eab3c98
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177546
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2024-11-30 09:39:27 +01:00