After previous commit
Change-Id: Iea0a2d64a552ff27ff5f8595f6d4379b6b224f94
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Wed Jul 15 21:50:13 2026 +0200
vcl: Consolidate SystemWindow::GetWindowState callers
, only the variant directly returning the vcl::WindowData
is used outside of the class.
Cosolidate the two methods by merging them.
Change-Id: I0fb094a8ed583a9700ff64e34ebce86826320aa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208172
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Switch/Simplify the 2 remaining callers of the variant with the
vcl::WindowData in/out param to use the one that takes the mask
and returns the vcl::WindowData.
Make the other variant private as it's by now only used
inside of the SystemWindow class itself.
Change-Id: Iea0a2d64a552ff27ff5f8595f6d4379b6b224f94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208171
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Simplifies OutputDevice::ImplLogicToDevicePixel for B2DPolygons by
delegating coordinate transformation to the CoordinateMapper. By using
LogicToDevicePixelX and LogicToDevicePixelY, we eliminate redundant
if/else branching and ensure that window and pixel offsets are
consistently applied across both axes.
This refactoring also addresses systemic X/Y scaling mix-ups where the
horizontal scaler was being used for vertical coordinates, a bug
identified through failures in PDF export integration tests.
Changes:
* Simplified B2DPolygon transformation loop in map.cxx.
* Removed private visibility (SAL_DLLPRIVATE) from the B2DPolyPolygon
overload of LogicToPixel to allow for external unit testing.
* Added a new unit test fixture 'testB2DPolygonAsymmetricDPI' in
vclmaptest.cxx to verify scaling accuracy on asymmetric displays
(e.g., 100x200 DPI) and prevent future axis-specific regressions.
Change-Id: I718df9af8e5d8b2a446be74223047bdaa20ed148
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207555
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Usually, vcl::WindowData should be used directly
now, see also previous commit
Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Tue Jul 14 21:23:36 2026 +0200
Use vcl::WindowData instead of string for window state in more places
. For those cases where a WindowData object shall be created
from a string object, don't implicitly do it, but require to
call the ctor explicitly.
(Nothing is currently implicitly doing it anyway.)
Change-Id: Iac18cda2c8674757a8be724fad80e6ae55101e39
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208126
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
vcl::WindowData is used to manage/store various state
information for windows. It can be (de)serialized to/from string.
So far, both the weld::Window API to get/set window state
as well as the SvtViewOptions API were based on the string
representation.
Switch those and various related places to using vcl::WindowData
instead to use a stronger/more specific type than just OUString
in various places across the code base.
Do the string (de)serialization where necessary, but otherwise
prefer to use vcl::WindowData directly.
Calling weld::Window::set_window_state with a WindowData
param that doesn't indicate that anything should be set
(i.e. whose mask is vcl::WindowDataMask::NONE) should
have no effect, so drop extra checks that were previously
checking whether the string representation was empty
and skipping the call to weld::Window::set_window_state in
that case.
No change in user-observable behavior intended or
seen in a quick test.
Change-Id: I5bc4caeb49d0ab2bbc4fa597a5ef19d86d3aac2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208125
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The SvtViewOptions class is used to store the state
of windows/dialogs.
So far, SvtViewOptions::SetWindowState and
SvtViewOptions::GetWindowState are string-based
and the callers are responsible for (de)serializing
the vcl::WindowData to/from string.
This will be changed to become the responsibility
of SvtViewOptions in an upcoming commit.
Since unotools is below vcl in the module
dependency chain, it cannot make use of vcl,
i.e. vcl::WindowData couldn't be used there.
Therefore, move SvtViewOptions from unotools
to svtools, which is above vcl in the module
dependencies.
(svtools/README.md summarizes the purpose of the
module as "Tools on the Top of VCL", which seems
an appropriate place for helper code to manage
the state/options for dialogs, tab pages,...)
Change-Id: If849224c35c7ac895659ddb7c17e6d17061d61a4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208124
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Use the usual "m_" naming prefix for class members,
to distinguish them from local variables.
Change-Id: I4bdf9e274d43a87e93c558dda3c942fe0c7d707f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208120
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This looks like the second half of the comment for the
SfxChildWindow::pContext member removed in commit
commit feb8164afa
Date: Tue Mar 9 20:22:37 2021 +0000
drop newly unused code and macros
Drop the obsolete comment as well.
Change-Id: I350f8f331cfc0b85eaa4da91bdb983be653090aa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208119
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Use the usual naming prefix for class members,
to distinguish them from local variables.
Change-Id: I7f2ab60cb32d7166c3e05ad34bb5820363c98066
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208118
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
The only caller passes non-null SfxBindings.
Switch the param from pointer to ref, which
allows to drop some logic handling the null case.
Change-Id: I05fa77dafcbeac804dd0b70d2fd28bb25a83dadf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/208117
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Implementations of XBrowseNode have a bunch of extra methods which are
accessed by using XPropertySet::getPropertyValue to determine if the
action is possible and then XInvocation::invoke to invoke it. This patch
adds wrappers around checking and invoking these methods. The idea is to
abstract away the actual implementation so that the approach can be
changed in a later patch.
Change-Id: I117ab848391dbb1277f9331d6a93f71c2cb556ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207343
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
Tested-by: Jenkins
It is a misnomer now, so return to the original name.
Also drop the redundant private Font::GetAverageFontSize().
Change-Id: I67495fa675091b459a4e90ac09665489cc61fdd9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207991
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Rewrite font family and subfamily to use typographic names if they are
using legacy names, so we can elsewhere always assume typographic names
are used.
Change-Id: I8db2d4cf801c50794ff38b7d9e6d8419e66f5680
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207547
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
Tested-by: Khaled Hosny <khaled@libreoffice.org>
Identify a font by its typographic family (name ID 16) and subfamily
(name ID 17), falling back to legacy names (name ID 1 and 2), so we can
interoperate with systems that use legacy names, while using typographic
names internally.
Change-Id: Ie51c8c14fe91e7e314d9a4b4808485ea4483b524
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207546
Tested-by: Khaled Hosny <khaled@libreoffice.org>
Reviewed-by: Khaled Hosny <khaled@libreoffice.org>
ScLet and ScLambda read the parameter-name token's string without checking
GetType() first, so a token that isn't a string name faults on load, e.g.
forums/xlsx/forum-mso-en4-789942.xlsx:
#0 rtl::str::acquire (pThis=0x20d) at sal/rtl/strtmpl.hxx:735
#6 std::vector<OUString>::push_back
#8 ScInterpreter::ScLet at sc/source/core/tool/interpr1.cxx:10938
#9 ScInterpreter::DispatchOpCode (eOp=ocLet)
#13 ScFormulaCell::MaybeInterpret
#15 ScCellFormat::GetString
#17 ScColumn::GetRangeScriptType
#24 GetOptimalHeightsInColumn
ScLet used to have this check until it was rewritten, the new ScLambda
never had it, since:
commit 6ad6aebb83305608788c878909cd77c29b298271
Date: Sat Jun 20 23:50:39 2026 -0400
Implemented LAMBDA and ISOMITTED for Calc
use the same fix as:
commit 4f5764a223f86ceea1eca70cbec55eb8aebea1f3
Date: Tue May 5 11:45:29 2026 +0100
crashtesting: fix ScLet/ScMatch/IterateParametersIf[s] crashes
Add a GetStringNameToken() helper for this and use it in ScLet, ScLambda
and the dynamic_cast calls in callable.cxx.
see also:
commit 65da502b7b40bd3bcad0cfd146716e815c72d48d
Date: Thu Apr 16 12:31:01 2026 +0200
reduce virtual calling in String*Token
Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I7ce591bf5e53538aa947fafa9607b7339d715aaa
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/6107
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 8b1f9cc417d914d72ea223815e8306bcb07299ec)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207977
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The OOXML format marks an optional LAMBDA parameter with the _xlop.
prefix in the parameter list, while the body refers to the same
parameter through the _xlpm. prefix. Calc recognised only _xlpm., so an
optional parameter kept its prefix, did not match the bare name used in
the body, and lost the mark that made it optional. It failed to bind,
and a call that left it out reported an error.
Recognise _xlop. as a parameter marker and strip it to the bare name, so
the declaration and the body references match. Carry the optional mark
onto the parameter token so the compiled code treats it the same way as
the native square-bracket form.
Write an optional parameter back with the marker the grammar uses: the
_xlop. prefix in OOXML and square brackets in the native grammars.
Add a test that imports an optional parameter in the OOXML form and
checks that ISOMITTED sees it as omitted and that concatenating it
yields the other operand.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Ia1df0fa6ca498f4c607507b3a865b3b367e5c11a
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5782
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit f198d7a984654aabd5e988d3c327da5552bc68e0)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207891
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
LAMBDA now supports optional parameters with the [name] syntax; all
such parameters must appear after all required parameters in the
parameter list.
Optional parameters use svMissing, for compatibility with ISOMITTED.
Change-Id: Ice026eeb6937dadd3b1ffd8c07e0d3ce88de9afc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207392
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
weld::Entry and weld::TextView are implementing the
same logic for calling a callback/handler when the
text changes.
Now that
Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jul 9 14:04:00 2026 +0200
weld: Pass weld::TextWidget& in text change callback/handler
has prepared for that step, deduplicate the logic by
moving it to the shared weld::TextWidget base class,
which will also make sure the logic stays in sync
for both classes.
Change-Id: I69d4b85923fea05383c78f9145fee72b2bd62684
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207937
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
Switch the weld::Entry and weld::TextView handlers
that are called when the text changes due to user
interaction to pass a weld::TextWidget& param
instead of a weld::Entry& and weld::TextView&
one respectively.
Adjust related methods across the code base accordingly.
This unifies the behavior for both of these
weld::TextWidget subclasses and prepares for
deduplicating the logic and moving it to the
common base class in an upcoming commit.
That will also ensure they stay in sync.
(Change also motivated by the fact that their behavior was
differing before
Change-Id: I03d2a13cd84d53d806eb9e363f49c4b6be28d938
Author: Michael Weghorn <m.weghorn@posteo.de>
Date: Thu Jul 9 13:08:58 2026 +0200
tdf#130857 weld: Don't signal about programmatic TextView text change
.)
Change-Id: I5572fc88caf577fae9a23a39f1ec4f2179935a99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207936
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
These dialogs hide the standard Reset button that SfxTabDialogController
adds to dialogs. Instead of doing that, let's just not create a button
that has to be hidden in the first place.
Dialogs can be accessed via:
New Base doc -> Edit -> Database -> Advanced Settings...
New Base doc -> Tools -> User Administration...
New Base doc -> Edit -> Database -> Properties...
New <any> doc -> Export as... -> Export as PDF...
New Writer doc -> Insert -> Footnote and Endnote -> Footnote
then right-click in the footnote area -> Footnote/Endnote Settings...
Change-Id: I06ed3ff8f70db9eb081e654d2f73deda480c3322
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207236
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
A1# is the postfix counterpart of the @ prefix. When A1 is
the origin of a dynamic-array formula spilled into A1:A4, A1#
refers to the whole spill range, so SUM(A1#) totals the four
values and ROWS(A1#) returns 4.
The new opcode ocSpill sits in the unary-operator range. The
tokenizer produces it from a bare # after a reference or
value. Otherwise # stays the start of a #REF! or #NAME!
token. The compiler routes it through PostOpLine so it
follows its operand in the RPN.
ScSpilledRange pushes the spill range as an ScMatrixRangeToken
so aggregating functions see the whole range, and ISREF
reports it as a reference. A master yields its matrix. A
plain number, string, or non-master matrix slot yields the
the cell value.
A freshly typed =A1# counts as an array result, so it
promotes to a dynamic-array master and spills again. A cell
that does not promote collapses the range by implicit
intersection to the row-aligned value, or #VALUE! outside the
range, keeping that cell's number format.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: Idf2752af3f7575f6bc95b940344aa365415e4a2f
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5785
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 9b97b0fc91bce4b8726ea210347e8ea84270e148)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207904
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
Add BYCOL(tdf#164508), BYROW(tdf#164509), MAKEARRAY(tdf#164511),
MAP(tdf#164512), REDUCE(tdf#164513), SCAN(tdf#161428) formula
functions, which are usually used together with LAMBDA and are
important for interoperability with other Office suites.
Change-Id: I7eb5a992a113638fdadf0cf61592c082094fb44f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205979
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
The OOXML spec writes =@(expr) as =_xlfn.SINGLE(expr). Calc
emitted the bare @ glyph on save and dropped the wrapper on
load, so =@(F3:F5+0) fell back to a non-array context after a
round trip and lost the authored value.
Map "_xlfn.SINGLE" to ocSingleValue in the OOXML symbol
table. The regular exporter walk now spells ocSingleValue as
"_xlfn.SINGLE" and the import compiler recognises the
wrapper, so a parenthesised operand round-trips with no
further work. A small exporter branch wraps bare and
function-call operands in the wrapper's own parentheses.
OOXML files in the wild put the @ operand inside a redundant
parenthesis pair, _xlfn.SINGLE((expr)). A post-compile pass
on import drops the inner pair so the cell reads back as
=@(expr). The helper takes a trigger-opcode list for reuse.
testSingleOperatorXlsxRoundTrip covers the export path,
testIntersectionOperatorXlsxRoundTrip covers the import strip
from a fixture file.
Signed-off-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>
Change-Id: I2648da125945295fd8548842aba9c82978d96aa9
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/5573
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit 5ac9db1f563bbde01f9e24fc9bbb8c3599eb0c06)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207789
Tested-by: Jenkins
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
ScTokenArray::Clone and CloneValue have always allocated the parse-token array
pCode to hold exactly nLen entries, but unlike Assign they left mbFinalized at
false. And FormulaTokenArray::Add assumes that a non-finalized pCode has room
for at least MAX_FAST_TOKENS entries. Which now started to break with
a21f6a3a0eae72fef90576d249d96dc00beeb2c5 "sc: round-trip dynamic-array masters
and @ through ODF",
> ==611420==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x7befc900e420 at pc 0x7b8f762c6d53 bp 0x7ffdf0776f90 sp 0x7ffdf0776f88
> WRITE of size 8 at 0x7befc900e420 thread T0
> #0 in formula::FormulaTokenArray::Add(formula::FormulaToken*) at engine/formula/source/core/api/token.cxx:772:25
> #1 in ScTokenArray::AddRawToken(ScRawToken const&) at engine/sc/source/core/tool/token.cxx:2004:12
> #2 in ScTokenArray::AddOpCode(OpCode) at engine/sc/source/core/tool/token.cxx:2224:12
> #3 in (anonymous namespace)::prependImplicitIntersection(ScTokenArray&) at engine/sc/source/core/data/formulacell.cxx:1654:49
> #4 in ScFormulaCell::ResolveImplicitIntersection(ScTokenArray&, ScDocument&, ScAddress const&) at engine/sc/source/core/data/formulacell.cxx:2716:9
> #5 in ImportExcel::Formula(XclAddress const&, unsigned short, unsigned short, double, bool) at engine/sc/source/filter/excel/excform.cxx:127:17
> #6 in ImportExcel::Formula25() at engine/sc/source/filter/excel/excform.cxx:72:5
> #7 in ImportExcel8::Read() at engine/sc/source/filter/excel/read.cxx:1184:49
> #8 in ScFormatFilterPluginImpl::ScImportExcel(SfxMedium&, ScDocument*, EXCIMPFORMAT) at engine/sc/source/filter/excel/excel.cxx:255:35
> #9 in ScDocShell::ConvertFrom(SfxMedium&) at engine/sc/source/ui/docshell/docsh.cxx:1329:52
> #10 in SfxObjectShell::DoLoad(SfxMedium*) at engine/sfx2/source/doc/objstor.cxx:777:27
> #11 in ScFilterTestBase::loadDoc(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, int) at engine/sc/qa/unit/helper/scfiltertestbase.cxx:40:21
> #12 in ScFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at engine/sc/qa/unit/filters-test.cxx:68:31
> #13 in non-virtual thunk to ScFiltersTest::load(rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int) at engine/sc/qa/unit/filters-test.cxx
> #14 in test::FiltersTest::recursiveScan(test::filterStatus, rtl::OUString const&, rtl::OUString const&, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at engine/unotest/source/cpp/filters-test.cxx:132:20
> #15 in test::FiltersTest::testDir(rtl::OUString const&, std::basic_string_view<char16_t, std::char_traits<char16_t>>, rtl::OUString const&, SfxFilterFlags, SotClipboardFormatId, unsigned int, bool) at engine/unotest/source/cpp/filters-test.cxx:157:5
> #16 in ScFiltersTest::testCVEs() at engine/sc/qa/unit/filters-test.cxx:91:5
>
> 0x7befc900e420 is located 0 bytes after 64-byte region [0x7befc900e3e0,0x7befc900e420)
> allocated by thread T0 here:
> #0 in operator new[](unsigned long) at /home/sberg/github.com/llvm/llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:111:37
> #1 in ScTokenArray::Clone() const at engine/sc/source/core/tool/token.cxx:1901:24
> #2 in ImportExcel::Formula(XclAddress const&, unsigned short, unsigned short, double, bool) at engine/sc/source/filter/excel/excform.cxx:126:70
> #3 in ImportExcel::Formula25() at engine/sc/source/filter/excel/excform.cxx:72:5
Signed-off-by: Stephan Bergmann <stephan.bergmann@collabora.com>
Change-Id: I2ce67e89c24fee8e1bdfa7baf40ce02783637254
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/4962
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
(cherry picked from commit e4161389322e3f096e3b1537058a94e0636eaeaa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207469
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
On at least the GTK and gen plugins, iter_n_children was returning 1
when the node has children on demand but then iter_children will return
false in order to ignore the dummy node. This was causing an infinite
recursion when iter_previous is called and the previous node has
on-demand children because that uses the result of iter_n_children to
determine if the node has children and then uses iter_children to move
to a child node without checking the return value. That meant the
iterator wouldn’t move and it would keep searching from the same place
forever.
This patch fixes it by making iter_n_children non-virtual and making it
bail out early with 0 if the node has children on demand. Otherwise it
will ask the backend via a virtual function which has been renamed to
do_iter_n_children so that it is similar to how do_iter_children works.
Change-Id: Ie9a3d5d51c9eae0789048fa5240441663642595d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207589
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
This commit finalizes the migration of the core scalar coordinate
transformations by moving the logic out of OutputDevice and entirely
into CoordinateMapper.
To clearly separate the public API (which handles MapMode state
branching) from the internal math engine (which unconditionally
applies offsets and scaling), the mapping operations have been
explicitly split.
- Removed ImplLogicXToDevicePixel() and ImplLogicYToDevicePixel()
from OutputDevice.
- Added LogicToDevicePixelX() and LogicToDevicePixelY() to
CoordinateMapper to act as the primary state-checking API.
- Added ImplCalcDevicePixelX() and ImplCalcDevicePixelY() to
CoordinateMapper to isolate the raw transformation math.
- Updated all scalar call sites across vcl (bitmap, map, mask,
outdev, pixel, rect) to route their math through the mpMapper
instance.
Change-Id: Ibb23aec54dd6eab6e3a753c2a61f8e023aa03883
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203650
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
Completes the deprecation of legacy coordinate subsystem naming by
renaming GetOutOffYPixel() and SetOutOffYPixel() to
GetDeviceOriginY() and SetDeviceOriginY() across OutputDevice,
Window, and CoordinateMapper.
This unifies axis naming conventions following previous X-axis
refactoring passes, clarifying that these fields represent the
physical origin offsets of the device rendering canvas.
This patch also moves view transformation logic inline from outdev/map
to CoordinateMapper, and wraps sprawling multi-line logic formulas
across mapping routines to clean up formatting boundaries.
Key changes:
* include/vcl/outdev.hxx / window.hxx: Updated public declarations
to replace GetOutOffYPixel with GetDeviceOriginY.
* vcl/inc/CoordinateMapper.hxx: Migrated view transformation cache State
members and mapping calculation methods into the mapper object.
* Global adjustments: Patched all related coordinate offset reads
and tracking writes throughout desktop, editeng, sc, svx, and vcl.
Change-Id: I28fec54a7f3312cc41ada2de38b26351c0a65527
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203646
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Rename GetOutOffXPixel() and SetOutOffXPixel() to GetDeviceOriginX()
and SetDeviceOriginX() across OutputDevice, Window, and CoordinateMapper.
The legacy "OutOff" naming convention obscured the difference between
system-level window positioning offsets and internal content scrolling
(SetPixelOffset). The new nomenclature explicitly communicates that
these metrics strictly govern the device coordinate space origin.
This patch focuses strictly on the X-axis coordinate reads and cleans
up duplicated formatting signatures inside the CoordinateMapper header.
Impacted modules:
* include/vcl: Update public declarations in outdev.hxx and window.hxx.
* vcl/inc: Clean up CoordinateMapper.hxx whitespace and scaling hooks.
* Global: Patch dependent pixel coordinate reads across desktop, editeng,
sc, sfx2, svx, and vcl.
Change-Id: I546e1d255887e3b280ff15caca2e27ef10de52d7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/206509
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
Just launch Writer for example and notice this log on console:
warn:svx.dialog:651266:651266:svx/source/dialog/rlrcitem.cxx:75: SvxTabStopItem expected
Pb is SID_SVX_START + 946 is already used in include/svx/svxids.hrc with SID_ATTR_TABSTOP_VERTICAL
So use another free slot, SID_SVX_START + 1069
(which was indeed free contrary to what the comment said in include/svx/svxids.hrc)
Like this I suppose since 69e902d085
tdf#162120 Implement style:writing-mode-automatic (end of 2025)
Change-Id: I65c766ec1b8574fe7db5eca35bfd2c91735f3e2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207697
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Every time the user called a different command (find/findprev/findall)
the 'replace backwards' checkbox was being reset
to some seemingly random state.
That random state was 'whatever the checkbox was
the last time that "Replace" was called'.
Instead, it should retain the last state that the user provided.
[Fortunately, I found a couple of examples to guide me.
since m_pSearchOpt isn't reliable
as the 'Find Previous' button can also SetBackward.]
With this patch, the user's selection is:
-the sole controller of the checkbox
-saved and restored between sessions (wasn't restored earlier)
[ClickHdl_Impl calls SaveToModule_Impl - so immediately saved]
Change-Id: I1364c97f6a853989cb9b2706ec4a03a5e4c0ca13
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207696
Tested-by: Jenkins
Reviewed-by: Justin Luth <jluth@mail.com>
To solve the trade-off between better spacing and less hyphenation,
support hyphenation level and its user interface, the hyphenation
slider, like DTP software do.
Add new paragraph property com::sun::star::text::ParaHyphenationLevel
The hyphenation slider is the basic interface of DTP software to adjust
single (or all) paragraphs using better word spacing (i.e. more
hyphenation) or less hyphenation (i.e. worse word spacing). It allows 1)
to choose the best from the near equally good layouts and 2) to solve an
extreme bad layout (caused by words without hyphenation or other corner
cases).
– 50% hyphenation level means disabled hyphenation, if minimum
and maximum word spacing settings allow to break the line within
words (default interoperability value).
– 100% hyphenation level means using extra hyphenation only if that
results better word spacing in the line, than breaking within words.
– Between 50% and 100% hyphenation level, use extra hyphenation only if
its weighted word spacing is better, than breaking the line between
words (weighting grows with the hyphenation level).
– Between 0% and 50% hyphenation level it means disabled hyphenation
with increased desired and maximum word spacing, depending on the
hyphenation level. At %0, the desired word spacing is enlarged to the
original maximum word spacing, while maximum word spacing is enlarged
by a single space.
For example, the original 4-page unit test document with the default 50%
hyphenation level contains 14 hyphenations. 100% hyphenation level
results in 22 hyphenations, while 0% only results in 8 hyphenations.
– sw/qa/extras/layout/data/tdf167648_minimum.fodt,
sw/qa/extras/layout/data/tdf169168_minimum.fodt: set maximum
word-spacing to 100% from 101% to limit the original unit test only
for minimum letter spacing.
More information: LO/COOL Book & Typography projects:
https://www.numbertext.org/typography/https://www.numbertext.org/book/
Follow-up to commit cf104be5cb "tdf#119908
tdf#166113 cool#15973 sw smart justify: fix DOCX hyphenation",
commit d572576dd6
"tdf#119908 cool#15973 sw smart justify: fix "smart" hyphenation",
commit 529755f091
"tdf#166113 sw smart justify: adjust algorithm for interoperability" and
commit 7d08767b89 "tdf#130088 tdf#119908
smart justify: fix DOCX line count + compat opt."
Change-Id: I84b3893ea6c5cd4eff74a73514722285e7071392
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207545
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: Jenkins
Rename weld::TreeView::connect_column_clicked
and weld::TreeView::signal_column_clicked to make
clear that they are not about a click anywhere in a
column, but about the column *header* being clicked.
The GTK 4 doc for the corresponding
GtkTreeViewColumn::clicked signal [1] by which the API
was apparently inspired is clear about this:
> Emitted when the column’s header has been clicked.
[1] https://docs.gtk.org/gtk4/signal.TreeViewColumn.clicked.html
Change-Id: I0b4b337b5ca938bb1526d9857ed2b0b244daf23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/207591
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>