1070 Commits
Author SHA1 Message Date
Armin Le Grand (collabora) 5519a3d407 Correct StyleSheet handling when cloning to different Model II
Until now the 'local' StyleSheet got set, but that may
not be the same as the original. It was/gets identified just
by searching by name and type, not comparing content.

What to do? We could...

(a) the Style-Friendly way:
 - check if StyleSheet is identical
  - if not, create a new in-between StyleSheet hosting missing Items
  - if yes, use, done.

(b) the pragmatic/practical way:
 - Just hard-attribute the Items that are detected as different
   similar to what BurnInStyleSheetAttributes does/did, but only
   for a view differing Items

(b) is the most simple for now, but will lead to more hard
attributes. The other possibilities will be better in the
long term. For now, I will use (b).

Note that there are more cases in that VERY complex and grown
stuff emerging from SdDrawDocument::PasteBookmarkAsPage. More
things will need to be fixed, see this as a 1st step.

Needed to adapt postProcessAfterCloneToDifferentModel due to
UT testTdf96206 failing, see comment there for details.

That 1st implementation showed weaknesses with those Items
critical and only on MasterPages, so decided to give up on
that and implement ContentCompare to SdPage::Equals. That
was easier than thought: No parameter needed, only used by
InsertBookmarkAsPage_FindDuplicateLayouts::operator(). Thus,
SdPage::Equals needs no change, just SdrObject::Equals.

Due to still problems with Items corrected in Objects on
MasterPages I will for now exclude this.

Could now isolate remaining problems, these are defaults
and/or PresObj things on MasterPages. Important is that I can
completely correct all Items for all Objects in
postProcessAfterCloneToDifferentModel. I can react to these
false-positives in the ContentCompare in SdrObject::Equals.

Signed-off-by: Armin Le Grand (collabora) <Armin.LeGrand@collabora.com>
Change-Id: I10e17c8d6a893dbe92ab716182f07bafce1f3284
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6595
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Armin Le Grand <armin.legrand@collabora.com>
(cherry picked from commit 92ffaeac04c5c8586006b026f29ce12fba3674f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211729
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-10-05 08:52:54 +02:00
Noel Grandin 212d17f7ea add a non-const GetEditEngine() method to Outliner
to avoid const-casting all over the place

Change-Id: I75f3442341894dbe4e12cc7995669dc7f3bf63f7
Signed-off-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13354
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
(cherry picked from commit 318e2cf839c6311d4a69572b4534f554bdda3f96)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211604
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-10-01 09:01:52 +02:00
Michael Weghorn 6736df00ad svx a11y: Let AccessibleTableHeaderShape subclass OAccessible
Reuse existing OAccessible logic by subclassing it.
This aligns AccessibleTableHeaderShape with other
a11y implementations.

No user-visible change in behavior intended.

Sample steps to make use of the class on Linux with
the qt6 vcl plugin:

* start Impress
* use the "Insert" -> "Table" dialog to insert a table
* type something in some cells
* start Accerciser
* in Accerciser's tree view of LO's a11y hierarchy, navigate
  to the a11y object of the table (which uses an a11y name of
  "TableShape")
* use Accerciser's IPython console to interact with the table header:

    In [6]: table = acc.queryTable()
    In [7]: table_header_cell = table.getRowHeader(0)
    In [8]: table_header_cell.get_name()
    Out[8]: 'A1'

This matches the behavior without this change in place.

(The question of whether all of the semantics/logic implemented in
AccessibleTableHeaderShape makes sense as is is a separate question,
unrelated to this refactor.)

Change-Id: I15c6a19aaa4ae69085dd8cb3a53447e55bf096f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210456
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-04 08:15:00 +02:00
Michael Weghorn 6b7f5e35c9 editeng a11y: Stop declaring AccessibleContext support in AccessibleContextBase
The com.sun.star.accessibility.AccessibleContext UNO service
is unnecessary and not really used for implementing a11y support,
apart from some a11y implementations declaring support for it.
What is relevant is the com.sun.star.accessibility.XAccessibleContext
interface instead.

Stop declaring support for the com.sun.star.accessibility.AccessibleContext
service in AccessibleContextBase and drop related
XServiceInfo::getImplementationName overrides in subclasses,
in preparation of dropping the service altogether in an upcoming
commit.

AccessibleDrawDocumentView currently still declares support
for the "com.sun.star.drawing.AccessibleDrawDocumentView"
service, so let it implement XServiceInfo directly, now that
it no longer inherits that from the AccessibleContextBase
base class.

Change-Id: Ie927cd98f9e1c8eb5a80bfaab5cb1dacb64dc238
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210403
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-03 09:21:27 +02:00
Karthik fca86c4703 tdf#172504: Use localized table style names
This is a regression from 4fb31ea85f,
table style names were no longer localized.

Signed-off-by: Karthik <karthik.godha@collabora.com>
Change-Id: I02d0e9cbcce24a6a2747e43c4cf5fe4324e1ad3b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207825
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-07-23 12:53:22 +02:00
Julien Nabet 9ced3a0230 tdf#172714: fix errors in tablestyles.xml when inserting a table
I suppose after 4fb31ea85f
tdf#105933 GSoC: New Dialog to Edit Table Styles

Following Karthic's advice, I removed all
style:font-name style:font-name-asian style:font-name-complex attributes

+ "skip exporting these in `SvxTableStylesExport::exportTextProperties`"

Change-Id: I90f440d6db7ec4024f1900c8061f1675debff6ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207815
Tested-by: Jenkins
Reviewed-by: Karthik Godha <karthik.godha@collabora.com>
2026-07-09 15:51:25 +02:00
Tomaž Vajngerl 572d9c1582 Fix text auto color in table cells when there is no cell background
This fixes auto font color not changing to white when the slide
background is dark and the table cell has no explicit fill.

When resolving automatic font color for text in table cells, the
code previously used the table object's own fill (either on object
or from style). This fill is not rendered behind cell text at all,
so it shouldn't affect the text color.

Add GetActiveTextBackgroundColor() method on SdrTextObj that returns
the object's fill color for auto color resolution. SdrTableObj
uses it's own version that checks the specific cell's fill first,
then falls back to the page/master-page background, skipping the
table object's own fill entirely.

Change-Id: I06c1b23bc1876d2f8c69d8219958a46212b0f793
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/2435
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 21aade416e94db7d31244166a349f3590d3aa7f1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206336
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-06-11 09:02:32 +02:00
Andras Timar 41f64c4fea tdf#169398: Fix SIGSEGV in SdrTableHTMLParser pasting HTML without <col>
When HTML with <td>/<th> but no <col> elements is pasted into Impress
via PasteSpecial, mpActDefault is null and dereferenced in ProcToken().
Create column edges on-the-fly when no <col> definitions exist, and add
bounds check on maColumnEdges access in the TABLEDATA_OFF handler.

Change-Id: I3cedb4867a6cd0d3b3fe0116eaa6996a9502b6a7
Reviewed-on: https://gerrit.collaboraoffice.com/c/core/+/566
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Andras Timar <andras.timar@collabora.com>
(cherry picked from commit 0f331321daf1e1f8848b2c7ac98952258c675ab0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204799
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-05-05 14:16:44 +02:00
Julien Nabet 7229dfadd0 Related tdf#164685: Cleanup class SfxItemSetFixed (svx)
find . -type f \( -name "*.cxx" -o -name "*.hxx" \) -print0 | \
xargs -0 perl -pi.bak -e 's/SfxItemSetFixed<([^>]+)>\s+([A-Za-z_]\w*)\s*\(([^;]+)\)/SfxItemSet $2(SfxItemSet::makeFixedSfxItemSet<$1>($3))/g;'

Change-Id: I1077301a93813054971b80b03a2c60a803e912d0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203891
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-04-18 18:05:08 +02:00
Noel Grandin 1e0c448ebe Fraction->double in SdrObject::Resize
Change-Id: I01a7fa3303fdbc3db5e8b259f7bdb9631d64bd74
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201733
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-03-16 12:28:50 +01:00
Caolán McNamara ad3873bdb3 cid#1681370 Explicit null dereferenced
and

cid#1681367 Explicit null dereferenced
cid#1681363 Explicit null dereferenced

this appears to be basically bogus, it sees that the base class
doesn't enforce that the std::unique_ptr are non-null even though
the inherited ones do and then reports where those are dereferenced.

Reorg so things are always created.

Change-Id: Ifbc88b8abddc1474a2f5962aacbcbaea5c878162
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201111
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2026-03-07 12:32:54 +01:00
Michael Weghorn b2133f09d9 svx a11y: Stop reporting support for "com.sun.star.drawing.AccessibleCell"
In svx's AccessibleCell, no longer report support for a
service called "com.sun.star.drawing.AccessibleCell".

Such a service isn't defined in any .idl file and it's
not needed internally either.

Also stop reporting a custom service name.

Change-Id: I53814ce107521b820b56dd420d632831a58a2f29
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200950
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-03-05 11:13:47 +01:00
Noel Grandin 5505d3bc4d loplugin:constparams
Change-Id: I33c701be5a441c1121b797f1eb5a8bda6fc3f89b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200927
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-03-04 11:29:39 +01:00
Noel Grandin eff009e260 loplugin:unnecessaryvirtual
Change-Id: I678d6b4d8662fb9bb84895f04163577acff6db40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200164
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-24 18:00:38 +01:00
Gabor Kelemen a9e9175ba6 tdf#146619 Use more forward declarations in include/sfx2
This shaves off some 300M of input
Change-Id: I2fae9ff6c6dab31010986e55365676d4a01f402d

Change-Id: I3b2551a1937929100f25c01c0c416a419e7fbb51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199388
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-23 12:19:48 +01:00
Gabor Kelemen eb087d25b3 tdf#146619 Use more forward declarations in include/drawinglayer
Change-Id: I5911dfb1cfc2bfd291758334b69123cfbce559a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199387
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2026-02-22 12:08:33 +01:00
Gabor Kelemen 0a42ddbdf1 tdf#146619 Use more forward declarations in include/xmloff
Change-Id: I49e39d669ba77a99b77322275d2e54e211da5b11
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199386
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
2026-02-22 10:42:36 +01:00
Noel Grandin 21c09b87db tdf#168647 speed up copy of DataTable chart cells (2)
Improve how sdr::Cell handles setting multiple properties at the same
time.

Takes the copy time from 8s to 4s for me.

Change-Id: I3370ebace7641d8bbb4ea67f4ee205c039da810e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199624
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2026-02-20 17:44:23 +01:00
madhura b683ddb322 tdf#114441 Convert sal_uLong to sal_uInt8 in tableautofmtpreview.cxx
nNum is only used as a small field index and is later cast to sal_uInt8.
Since all assigned values are within 8-bit range,replace sal_uLong with sal_uInt8 and remove unnecessary cast.

Change-Id: I70e2cc246f4781f4e80d946ab1859063b27e5d2b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199823
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-02-20 16:34:42 +01:00
Noel Grandin 35a8e29b09 remove dead code in Cell::getPropertyValue
Ever since it was added in
  commit 75f7adefa1
  Author: Rüdiger Timm <rt@openoffice.org>
  Date:   Wed Mar 12 08:58:58 2008 +0000
  INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED

It is dead because we add an item to the pool when we construct the pool,
so the pool is never empty.

Change-Id: I1e3c0895e3b9bbef982cbe2758db9fa0ec4ae0a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199787
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-20 11:19:21 +01:00
Noel Grandin d780ca55a8 flatten sdr::properties::Cell a little
a fix which exception we throw inside setPropertyValue when
OWN_ATTR_TABLEBORDER does not have a valid value.

Change-Id: I9715f33500c2f7268c848993cf888150f575fb45
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199705
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-19 17:27:54 +01:00
Noel Grandin 1a49cc1a96 remove dead code in Cell::setPropertyValue
Ever since it was added in
  commit 75f7adefa1
  Author: Rüdiger Timm <rt@openoffice.org>
  Date:   Wed Mar 12 08:58:58 2008 +0000
  INTEGRATION: CWS impresstables2 (1.1.2); FILE ADDED

It is dead because we add an item to the pool when we construct the pool,
so the itemstate is always SET

Change-Id: Ic51a506eff1609ee54ae06d2040a835bf1681840
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2026-02-19 12:25:36 +01:00
Andrea Gelmini f2d6669594 Fix typo in code
Change-Id: I84684b4e9653d7ab8b26c1e0861bc9d02f1bf06b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198709
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-02-06 12:15:57 +01:00
Karthik 4fb31ea85f tdf#105933 GSoC: New Dialog to Edit Table Styles
- 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>
2026-02-04 14:02:33 +01:00
Michael Weghorn 59f9abdc4b svx a11y: Use ImplInheritanceHelper for all AccessibleTableShape UNO ifaces
Make the css::accessibility::XAccessibleTableSelection
interface another template param for this
ImplInheritanceHelper subclass, instead of having
this interface as a direct base class and and reimplementing
XInterface methods manually.

Change-Id: I16725519fb8e73a92a05d368cbf2840d4db3660b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/197141
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-01-13 19:38:44 +01:00
Caolán McNamara 93e9669998 drop some coverity markup
Change-Id: Iffb2542be9e973d67ea3fea5fc1e924e491f14e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194820
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-11-29 19:47:17 +01:00
Gabor Kelemen 4d24007632 tdf#146619 Run IWYU again on include/svl/
Change-Id: I5dc8757a6d06ab6917a9af733550295008fde5b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/193914
Reviewed-by: Gabor Kelemen <gabor.kelemen@collabora.com>
Tested-by: Jenkins
2025-11-29 13:59:05 +01:00
Mike Kaganski b8df7459ba Drop explicit template parameter where deducible
Namely, from SfxRequest::GetArg variant taking TypedWhichId.

Change-Id: I60e0fcf6defdc78d29bc98afe24ac22014d4aee2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/194672
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2025-11-27 19:20:38 +01:00
Noel Grandin 07832fbb45 reduce log noise in Cell::GetAnyForItem
and improve the warning message

Change-Id: I8f0d3d059fc9044fa5a9f5117c072d8e8ce783a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192831
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-10-22 14:19:33 +02:00
Caolán McNamara fc6d103827 cid#1662042 Variable copied when it could be moved
and

cid#1662041 Variable copied when it could be moved
cid#1662040 Variable copied when it could be moved
cid#1662038 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1659985 Variable copied when it could be moved

Change-Id: I34627585e593f9de6bfa195ee0617848d9ed6135
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189157
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-08 12:35:37 +02:00
Caolán McNamara b1ec05b4b1 cid#1662031 Variable copied when it could be moved
and

cid#1660225 Variable copied when it could be moved
cid#1660211 Variable copied when it could be moved
cid#1660185 Variable copied when it could be moved
cid#1660173 Variable copied when it could be moved
cid#1660168 Variable copied when it could be moved
cid#1660166 Variable copied when it could be moved
cid#1660165 Variable copied when it could be moved
cid#1660163 Variable copied when it could be moved
cid#1660152 Variable copied when it could be moved
cid#1660149 Variable copied when it could be moved
cid#1660147 Variable copied when it could be moved
cid#1660145 Variable copied when it could be moved
cid#1660142 Variable copied when it could be moved
cid#1660140 Variable copied when it could be moved
cid#1660137 Variable copied when it could be moved
cid#1660136 Variable copied when it could be moved
cid#1660135 Variable copied when it could be moved
cid#1660128 Variable copied when it could be moved
cid#1660124 Variable copied when it could be moved
cid#1660122 Variable copied when it could be moved
cid#1660117 Variable copied when it could be moved
cid#1660114 Variable copied when it could be moved
cid#1660110 Variable copied when it could be moved
cid#1660109 Variable copied when it could be moved
cid#1660105 Variable copied when it could be moved
cid#1660104 Variable copied when it could be moved
cid#1660102 Variable copied when it could be moved
cid#1660100 Variable copied when it could be moved
cid#1660098 Variable copied when it could be moved
cid#1660080 Variable copied when it could be moved
cid#1660079 Variable copied when it could be moved
cid#1660078 Variable copied when it could be moved
cid#1660075 Variable copied when it could be moved
cid#1660071 Variable copied when it could be moved
cid#1660070 Variable copied when it could be moved
cid#1660064 Variable copied when it could be moved
cid#1660063 Variable copied when it could be moved
cid#1660060 Variable copied when it could be moved
cid#1660058 Variable copied when it could be moved
cid#1660053 Variable copied when it could be moved
cid#1660050 Variable copied when it could be moved
cid#1660049 Variable copied when it could be moved
cid#1660046 Variable copied when it could be moved
cid#1660042 Variable copied when it could be moved
cid#1660028 Variable copied when it could be moved
cid#1660023 Variable copied when it could be moved
cid#1660022 Variable copied when it could be moved
cid#1660021 Variable copied when it could be moved
cid#1660020 Variable copied when it could be moved
cid#1660017 Variable copied when it could be moved
cid#1660013 Variable copied when it could be moved
cid#1660005 Variable copied when it could be moved
cid#1660003 Variable copied when it could be moved
cid#1659999 Variable copied when it could be moved
cid#1659998 Variable copied when it could be moved
cid#1659995 Variable copied when it could be moved
cid#1659993 Variable copied when it could be moved
cid#1659989 Variable copied when it could be moved
cid#1659988 Variable copied when it could be moved

Change-Id: I2a30c8a2ac8785050d49b98635b0b406535b185a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189056
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
2025-08-07 20:51:26 +02:00
Caolán McNamara 3d36a94b25 cid#1660296 Variable copied when it could be moved
and

cid#1660283 Variable copied when it could be moved
cid#1660278 Variable copied when it could be moved
cid#1660277 Variable copied when it could be moved
cid#1660272 Variable copied when it could be moved
cid#1660271 Variable copied when it could be moved
cid#1660269 Variable copied when it could be moved
cid#1660257 Variable copied when it could be moved
cid#1660251 Variable copied when it could be moved

Change-Id: I6684eaf2162dd3550e2eab3f72cccbaa09448f43
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188925
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2025-08-04 22:05:59 +02:00
Noel Grandin 9b79ae1161 loplugin:blockblock
found with a modified copy of this plugin

Change-Id: Ib2ca97c7479abdf1a375e2700f9c947e1101f0e4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188065
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-07-19 19:11:16 +02:00
Michael Weghorn 671b8cad97 a11y: Rename OAccessibleComponentHelper to OAccessible
The helper class used to implement less functionality
in the past and was used less than it is now.
But by now it is the central helper/base class used
by most a11y classes.

Since

    commit 22049f633b
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon May 26 12:24:52 2025 +0200

        vcl a11y: Let OAccessibleComponentHelper implement XAccessible

it also implements the XAccessible interface.

That will allow to switch parameters and class members
from the abstract XAccessible interface to using this
more concrete C++ base class in various places.

Rename the class to OAccessible to account for the
new responsibilities, and adjust its doc accordingly.

Renaming source and header file will be done in a
separate commit to simplify (git) keeping track.

Change-Id: I33210b47cda5f71820a3c0fa657e4c3548d45732
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186952
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-06-26 13:09:41 +02:00
Gabor Kelemen 195c44b6dc Remove obsolete fw declarations from svx/
found with bin/find-unneeded-includes --fwdecl

Change-Id: Iccc9ef1ae947fefbe95fe51c043725e27916739f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183907
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2025-05-16 10:25:55 +02:00
Michael Weghorn fcd88d5ceb editeng a11y: Drop AccessibleContextBase::ThrowIfDisposed
Use the equivalent base class method
OAccessibleComponentHelper::ensureAlive instead.

Change-Id: I17a87b743d2a7b324cd4ae04cb1b924c676f0195
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183979
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-10 19:45:00 +02:00
Michael Weghorn 0cb6632ece a11y: Merge OAccessibleComponentHelper and OCommonAccessibleComponent
Merge the two classes, now that OAccessibleComponentHelper
is the only OCommonAccessibleComponent subclass after

    Change-Id: I05547b12806a6a90b166edbe196b4bc5a27344be
    Author: Michael Weghorn <m.weghorn@posteo.de>
    Date:   Mon Mar 31 13:49:20 2025 +0200

        a11y: Merge OAccessible{,Extended}ComponentHelper, add default impl

Change-Id: Ic7a36c40066f307f8df29dc4dd45ed3ee966bcb2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183552
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2025-04-01 11:20:23 +02:00
Michael Weghorn 46f7fad86d editeng a11y: Use OAccessibleExtendedComponentHelper
Let editeng's AccessibleContextBase derive from
OAccessibleExtendedComponentHelper to make use of the
logic already implemented there instead of having to
implement all the XAccessible(Extended)Component
and XAccessibleEventBroadcaster methods manually.

Adjust the various subclasses accordingly as well.

Make OCommonAccessibleComponent::addAccessibleEventListener
and OCommonAccessibleComponent::removeAccessibleEventListener
no longer final so that AccessibleShape can override them
(to add/remove the listener for the AccessibleTextHelper
 object in addition to calling the base class implementation).

The existing XAccessibleComponent::getBounds implementations
provide the necessary logic to implement
OAccessibleExtendedComponentHelper::implGetBounds,
so rename those accordingly (and drop the extra guards,
as the base class takes care of that).

Drop all of the other overrides that are no longer
needed as the implementation is now provided by
the base class.

No change in behavior intended or observed in a quick
test with Impress and Accerciser and Orca when using
the gtk3 and qt6 VCL plugins on Linux.

Change-Id: I7c42a9cac1099991bc5763b87c55ace2b0fed8a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183549
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-01 11:19:58 +02:00
Michael Weghorn 18b7dc796f editeng a11y: Merge Accessible{Context,Component}Base
AccessibleContextBase and AccessibleComponentBase
are both subclassed by the exact same classes.

Merge AccessibleComponentBase into AccessibleContextBase
to simplify the class hierarchy.

Drop now unnecessary overrides.

This also aligns AccessibleContext further
with the comphelper::OAccessibleExtendedComponentHelper
class that also implements both, XAccessibleContext
and XAccessibleExtendedComponent, and thus also prepares
for potential refactoring to deduplicate code in those
two classes in the future.

Change-Id: Ia3331f2bd4563bf9cdfee35c9ea6cca91bd093cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183543
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2025-04-01 11:19:38 +02:00
Justin Luth a47776a938 tdf#165521 pptx layout: don't use font's leading for cells too
This patch also fixes tdf#119951 and perhaps tdf#148039.

WARNING: This patch will likely resize the text line height
in every table imported from PPTX.

Someone must have figured out that Microsoft just ignores
the font metrics, and simply adds 20% to the font height
to achieve a "single spacing" line height.

In LO, that is either termed FontIndependentLineSpacing
(a misnomer because it DOES depend on the font ascent/descent)
or FixedCellHeight
(also a misnomer because it so far hasn't applied to cells/tables
 and certainly is not restricted to cells/tables
 since it was implemented for customShapes).

With this patch, my particular document
now has the right "text/table height" according to a PDF overlay.
The theory is that this change is needed for every document.

The reason this patch is needed is because
svx/source/table/viewcontactoftableobj.cxx's
createPrimitive2DSequenceImpl
passes rCellItemSet as the ItemSet
that will eventually be checked for
rSet.Get(SDRATTR_TEXT_USEFIXEDCELLHEIGHT),
which creates attribute::SdrTextAttribute(bFixedCellHeight)
which is used by SdrTextObj::impDecomposeBlockTextPrimitive
to set SdrOutliner (and thus EditDoc) with
SetFixedCellHeight(rSdrBlockTextPrimitive.isFixedCellHeight());

With FixedCellHeight, impedit3.cxx calculates text/line height
using ImplCalculateFontIndependentLineSpacing.

make CppunitTest_svx_unit \
    CPPUNIT_TEST_NAME=testTdf165521_fixedCellHeight

I modified testTdf144092TableHeight,
and attached PDF overlay images to tdf#144092 as proof
the the table should be taller than originally stated.

Change-Id: Ibb4af395b77a3f4d30b5c2e8a08429b701f1ae95
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/183130
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
2025-03-31 14:43:18 +02:00
Noel Grandin 25ac3297b0 use more concrete UNO in svx
Change-Id: Ie947ba0209f9166ee1cd065f91341292f2b02668
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182621
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2025-03-08 17:42:14 +01:00
Noel Grandin 09e2627a83 use more concrete UNO types in some local vars
found by a little plugin I created.

Plugin parked into store/ folder because it needs hand-holding
when run.

Change-Id: I2b4da7378f0becbc5f020ac9e78cd765aa0119b4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181768
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
2025-02-26 16:56:56 +01:00
rafaelhlima e2c08c31cf tdf#164685 Cleanup SfxItemSetFixed - Part 3
This is the continuation of the cleanup of class SfxItemSetFixed, as described in the bug ticket.

Change-Id: I567f985af181d326a6adb6c3d3af2a9e2fa8df34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180975
Tested-by: Jenkins
Reviewed-by: Rafael Lima <rafael.palma.lima@gmail.com>
2025-02-11 01:19:10 +01:00
Jonathan Clark bf54efbe21 tdf#34837 sc: Use border from correct cell for merged cells in RTL
This change fixes a bug causing borders to fail to render for merged
cells in RTL spreadsheets.

The root cause for this bug was framelinkarray utility code using the
top-left cell as the source for border styles of merged cells. This use
was correct for LTR spreadsheets. However, this framelinkarray data is
mirrored for RTL documents. After mirroring, the correct cell containing
border styles is the top-right one.

This change also reverts and reimplements a prior fix for tdf#135843
(commit 586a0f149f), which violated the
framelinkarray contract that edge styles for merged cells must be added
to the top-left underlying cell of a merged cell.

Change-Id: I27eec416d54f9f99cd5df1151a12c758f350c789
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180256
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
2025-01-15 15:06:11 +01:00
Tomaž Vajngerl f3fc477dab pdf: change StructElement to enum class, move out of PDFWriter
Moves the StructElement out of PDFWriter and changes it to enum
class. This makes it mroe type safe, easier to search and more
clear what type we are using.

Change-Id: Icf469319a01f58397b131c3517bc75fba4072500
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179977
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2025-01-11 14:46:11 +01:00
Oliver Specht 853ddebc0b tdf#164183 Add hyperlink entries to context menu of tables
Table objects in Draw/Impress now have Open/Edit/Copy/Remove hyperlink
entries in context menu of text in table objects.

Change-Id: Id3a5346eb3227871a06d2ea7fdb3ed38c07654c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177849
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2025-01-09 13:27:12 +01:00
Oliver Specht 728f5eb01d tdf#164299 fix crash in pasting HTML table
Supports <colgroup> element now.

Change-Id: I4fe49f3c79c567e9364a1642e716846256c6070b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178536
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de>
2024-12-16 11:25:23 +01:00
Mike Kaganski 04c62acc63 Use std::initializer_list, C-style array instead of more expensive Sequence
Change-Id: Ibb268268926cc91f595f19026f6cee4b5a74a8bc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178038
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-12-07 19:10:08 +01:00
Mohamed Ali 6fa141074b tdf#145538 Use range based for loops
Change-Id: Iee3052f2fcc693b78c32fbae581f22527d64ffbd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177082
Tested-by: Jenkins
Reviewed-by: Hossein   <hossein@libreoffice.org>
2024-12-06 15:40:17 +01:00
Michael Weghorn a2c1a337f0 [API CHANGE] a11y: Drop XAccessibleExtendedComponent::getFont
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>
2024-12-04 20:46:21 +01:00