Drop the space character from the places that rejected it in
table names:
- Insert Table dialog: text filter on the name entry
- Table Properties dialog: validation in DeactivatePage that
showed an info dialog
- Navigator rename: forbidden characters list
- UNO SwXTextTable::setName: check that threw RuntimeException
Other illegal characters (".<>") are still blocked, since they
are incorrectly handled in formulas and chart data sources.
Also remove the now unused STR_WRONG_TABLENAME string.
Allowing spaces exposed that a chart linked to such a table lost
its data connection after save/reload, so fix the table name
(de)serialization on both sides of the link:
- ODF export (xmltexte.cxx) wrote draw:notify-on-update-of-ranges
wrapped in single quotes when the name contained a space; write
it unmodified instead (the attribute also allows a plain string,
not only a cellRangeAddressList).
- ODF import (xmltexti.cxx) only unquotes the legacy single-quoted
form when the value actually starts with a quote, so both old and
new documents are read correctly.
- SwChartDataProvider::convertRangeFromXML split the space separated
range list with a naive tokenizer that broke inside a single-quoted
table name; split it in a quote-aware way so the chart range still
resolves to the table (instead of falling back to the chart's
internal local-table).
Added regression tests:
- verify that the Insert Table dialog accepts spaces in the
table name
- verify that a table name with a space can be set via UNO
and is preserved
- verify that the Table Properties dialog accepts and saves
a table name containing a space
- verify that, after save/reload, the chart's
notify-on-update-of-ranges keeps the unquoted table name
- verify the convertRangeToXML/convertRangeFromXML round-trip for
a table name containing a space
Fix found with the help of Claude Opus.
Change-Id: I92bbed3bfed5c90af4242c396608dd3802cd126a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/204381
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Writer paragraph styles already support percentage-based (80%, 115%)
and point-relative (+2pt, -4pt) font sizes for child styles inheriting
from a parent. Calc cell styles lacked this despite using the same
underlying SvxCharNamePage and FontSizeBox widgets.
The root cause was that Calc's ScStyleDlg::PageCreated() did not pass
the SVX_RELATIVE_MODE flag when creating the font tab page, so
FontSizeBox::EnableRelativeMode() and EnablePtRelativeMode() were
never called.
The fix adds a single SfxUInt32Item(SID_FLAG_TYPE, SVX_RELATIVE_MODE)
to the item set passed to the font page, matching what Writer's
SwTemplateDlgController already does.
No changes are needed in the core: SvxFontHeightItem::SetHeight()
already pre-calculates absolute values from relative ones, and
ScPatternAttr works correctly with these pre-calculated values.
Fix found with the help of Claude Sonnet 4.6 extended.
Change-Id: I3d759c028564a4722f96b325499ea0bfe8e4ba07
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200885
Tested-by: Jakub Trzebiatowski <ubap.dev@gmail.com>
Tested-by: Jenkins
Reviewed-by: Jakub Trzebiatowski <ubap.dev@gmail.com>
List and Page styles hasn't inheritance implemented.
tdf#89826 didn't distinguish them from the styles that
admit inheritance. SfxStyleDialogController::Ok()
was calling GetItemSet() unconditionally
to apply chip-invalidation resets. This call caused
user modifications to be lost.
A UITest is not included because the List (SfxStyleFamily::Pseudo) and
Page (SfxStyleFamily::Page) style edit dialogs in Writer are opened
asynchronously, and the UITest framework cannot capture them via
execute_dialog_through_action or execute_dialog_through_command.
The fix has been verified by manual testing.
Fix found with the help of Claude Sonnet 4.6 extended.
Change-Id: I456bf200df9f5cd5543752bc8ed3380dcc5a3fe8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201673
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Tested-by: Jenkins
+0pt
When editing a paragraph style in writer, setting font size to 100% or
+0pt
now correctly restores inheritance of font size instead of keeping an
explicit override.
This fix handles two cases:
- Relative 100% (meaning "same as parent")
- Relative +0pt (meaning "no change from parent")
The fix required changes in three areas:
- chardlg.cxx: Use InvalidateItem() to signal inheritance restoration
- tabdlg.cxx: Preserve invalid items when transferring between ItemSets
- docst.cxx: Preserve invalid items in the Para style branch
Added UITest (tdf170489.py) that verifies the property state changes
from DIRECT_VALUE to DEFAULT_VALUE after setting font size to 100%
or +0pt, confirming true inheritance restoration.
Fix found with the help of Claude Sonnet 4.6 extended.
Change-Id: I0271f69dec4400e5ddfcf132b987e6167eebac56
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198185
Tested-by: Jenkins
Reviewed-by: Jonathan Clark <jonathan@libreoffice.org>
Translate remaining Italian comments introduced in
commit 52010fde09 to English:
- "Passata 1/2" → "Pass 1/2"
- "copre le tab che accedono via Get/GetItemState" →
"covers tab pages that access items via Get/GetItemState"
- "copre le tab che accedono ItemSet interni" →
"covers tab pages that access internal ItemSets"
- "Solo se non già classificato dal tracker" →
"Only if not already classified by the tracker"
- "Restore delle tab page" → "Restore tab pages"
Change-Id: Ie3d6ba04f8de7561231ebc5a1a99367704377c22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201369
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
The presentation strings for SvxForbiddenRuleItem were swapped:
ON said 'Don't apply...' and OFF said 'Apply...'.
The presentation strings for SvxScriptSpaceItem were identical:
both ON and OFF said 'No automatic character spacing'.
Change-Id: I2ab6016a005a1582d9a50089f2bccbf1daef9285
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/200063
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins
The Organizer tab of the style dialog now shows interactive "chips"
for each property that differs from the parent style. Each chip
displays the property name and value, and includes an X button to
reset that property back to parent inheritance. All properties
are shown full text, no ellipsis.
Properties are grouped by tab page (Font, Font effects, etc.)
and displayed in a scrollable area. A View/Edit toggle lets the
user switch between the traditional description text and the
interactive chip view.
Implementation summary:
- New PropertyChip and PropertyCategoryRow widgets (sfx2) with
corresponding .ui files for the chip layout.
- SfxStyleSheetBase::GetItemPresentation() virtual method returns
per-property presentation strings, overridden in SwDocStyleSheet
and ScStyleSheet for module-specific attributes.
- SfxItemSet access tracker mechanism to automatically map WhichIds
to their owning tab pages via BuildWhichToTabMap().
- SfxTabDialogController::InvalidateItem() propagates chip resets
to the output set and affected tab pages.
- SwDocStyleSheet::ResetItems() uses SwDoc::ResetAttrAtFormat() to
ensure proper undo support in Writer.
- SfxStyleDialogController::Ok() clears invalidated items from the
style's item set on dialog confirmation.
- SvxAsianTabPage now calls SetExchangeSupport() and implements
DeactivatePage() so its items are properly tracked.
- Access tracker ignore guards in SvxCharBasePage::SetPrevFontWidthScale
and SvxTransparenceTabPage::InitPreview to avoid false positives
from preview-only item access.
Includes a UITest for Writer (sw/qa/uitest/ui/fmtui/tdf89826.py)
that creates a child style, modifies a property, removes it via
chip, and verifies inheritance is restored including undo.
A Calc UITest is not included because the style edit dialog in Calc
is opened asynchronously (ScTabViewShell::ExecuteStyleEdit) and the
UITest framework's execute_dialog_through_command cannot capture it.
The Calc functionality has been verified manually. A Calc UITest can
be added once the framework supports async style dialogs.
Change-Id: Ia764405798c212fe5340bba254f2ff6ac62365f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/199318
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins