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>
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>
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
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>
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>
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>
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
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>
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
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>
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>
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>
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>
- 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>
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
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
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
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>
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>
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>
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
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>
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>
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>
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
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>
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>
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>
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>