Commit Graph
520627 Commits
Author SHA1 Message Date
Julien Nabet fe341d29d1 Fix typo in code: DELIMETER->DELIMITER in hwpfilter
Change-Id: I55f1ff646e065ae32ca3ff9a5c3c2fc9b9eae7db
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211493
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-27 17:04:29 +02:00
ApurvR20 c8e8114c11 tdf#170667 Add space after DrawObject string in sw
Change-Id: I77d367ef7f836ddf10fdbf65a319493dc453a7e8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211483
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2026-09-27 10:56:21 +02:00
Justin Luth a8b4e7c698 tdf#163868 writerfilter: recognize framePrs in header/footers
This allowed headers and footers paragraph content
to be put into frames by paragraph/style formatting.

I'm pretty sure the bIgnoreFrameState bits were irrelevant
ever since bIsPreviousParagraphFramed was put on the m_StreamStateStack.
commit 86ad08f9d2
Author: Michael Stahl on Fri Feb 2 17:17:28 2024 +0100
    writerfilter: fix missing paragraph break on tdf136445-1.rtf
That was a mass move to the stack,
so no surprise that there was no attempt at a thorough cleanup.

Change-Id: Icd98045b55056d9cb4acd8c2fc37febb975539af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211487
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-09-27 00:47:46 +02:00
Heiko Tietze 3a9ee3a2a7 Resolve tdf#173739 - Consider dark UI for icon fallback
Do not only fall back to Colibre but also Colibre Dark if the
UI is dark

Change-Id: I5f7625f75be9c11baebf4a10503943701c107fe0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211478
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-09-26 20:47:29 +02:00
Julien Nabet 21861ba274 tdf#173731: Missing space in the tooltip for UseVerticalNotebookbar
Change-Id: If261b486c03575d1b81b7608fff058312a066b5c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211479
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Jenkins
2026-09-26 20:01:21 +02:00
ApurvR20 f894152072 tdf#155630 De-duplicate code
Found the duplicated code by PMD analyser.

Change-Id: I5c9858cca37c65fdedca109fa0f26be2baaf87a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210482
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-09-26 15:27:46 +02:00
Heiko Tietze 3b602bc4fc Related tdf#173606 - Show an icon in combobox depending on msg type
Following the prototype of gtk3

Change-Id: Id25c0a61c3c38427e86525f58c6bb40b9cd257ed
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211476
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2026-09-26 11:19:15 +02:00
Jason Whitmore 94f01698f5 tdf#155628 split upper triangular code into new function and call
This change reduces the cognitive complexity of the
CalculateBSplines function by moving some of the linear
algebra code into a new function and then calling
the function. No changes are made to external code behavior.

Change-Id: I4116d24b30e922a2f3777aa8dcd926ee690b8243
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/205231
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2026-09-26 10:05:54 +02:00
ApurvR20 2a64f606b5 tdf#140226 Use StaticWhichCast
Change-Id: I551d97a7d0c18bc2778cd4374d9be2543fc47af8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210684
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-09-26 09:20:30 +02:00
Michael Weghorn dc64548702 tdf#173418 vcl: Make ColorFieldControl RTL-aware
When in RTL mode (e.g. enabled via SAL_RTL_ENABLED=1),
translate/invert the X value as needed when retrieving/setting
it for the ColorFieldControl.

Otherwise, the position is horizontally inverted/mirrored
as described in tdf#173418 in the custom LO color chooser
dialog (e.g. clicking at the color at the right edge sets the
color that's at the left edge).

Change-Id: Ifd3e5b93aab4e8f3cf8ed72f0bedab652e9cb1e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211458
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-26 08:07:21 +02:00
Heiko Tietze c279ce5108 Related tdf#151121 - Feedback on the actual replacement font
* Missing glyphs such as U+1234 are not detected as missing
* Missing variants such as 'Italic Light' are not detected
* Language on the font is not taken into account

Change-Id: I6329a2607f7e13b8ba09050b1037d4e33b4c7eb4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211324
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Tested-by: Jenkins
2026-09-26 08:00:17 +02:00
DrRobotto 3ca06ba114 tdf#133808 - Use cell counts in order to shrink entire columns/rows
Otherwise, entire ranges will never be shrunk leading to performance
issues.

Change-Id: If0c1d482ccaffd9446f0321782e3c0963514135f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211472
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-09-26 02:35:03 +02:00
Justin Luth e43ac28d22 tdf#169024 docx export: LINE_TOP is not inside/LINE_BOTTOM not outside
A previous patch mapped the import to LINE_TOP (for GUI's sake)
so now we need to make extra sure we export LINE_TOP properly.

LINE_* was originally set to inside/outside by
commit 6ceeb0df69
Author: Luboš Luňák on Mon Sep 29 18:56:21 2014 +0200
    proper reading of mso-position-(horizontal|vertical)(-relative)
but the import side (for vertical) inside/outside
was later changed away from LINE_TOP.
No one bothered to adjust the export side at that time.

For the most part, this patch seems to be irrelevant:
-DML doesn't use the result at all
-VML does use it, but VML is obsolete/ignored when DML is present
  -so only affects ancient MS Word 2007
-framePr seems to ignore any 'text' value - in both MS Word and LO
  -MS Word dialog shows 'page': shifts the object when pressing 'OK'
    -dialog prevents using anything but 'from top' relative to 'para'
  -LO imports everything as from top by 0: seems to match MS Word

The unit test doesn't fail without the patch: DML import priority...
make CppunitTest_sw_ooxmlexport19 \
    CPPUNIT_TEST_NAME=testTdf169024_verticalTopFrame

Change-Id: I3e8447fedae748954d1e5b080461720bcb9c4476
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211442
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Justin Luth <jluth@mail.com>
2026-09-26 00:01:59 +02:00
DrRobotto 2a6ccbc40b tdf#164516 - Allow changing the chart type to of-pie by macro
Register BarOfPieDiagram and PieOfPieDiagram and map them to the
existing chart2 BarOfPie/PieOfPie templates used by the chart type
dialog.

Change-Id: Id5ba30d7547d290826bb360b2ccb3713fdb95a42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211460
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-09-25 23:00:20 +02:00
Samuel Mehrbrodt 24ccaeea23 cool#10640 Save drop caps to DOCX
A drop cap set in Writer was lost on save to DOCX and came back as
ordinary text. Writer keeps a drop cap as an attribute of the paragraph
it starts, while DOCX wants the initial in a framed paragraph of its own
followed by a paragraph with the rest of the text, so the export has to
split the paragraph where the initial ends. It wrote nothing at all
instead.

Write that frame now, together with the line height and the font size
that the layout computed, because a DOCX reader does not enlarge the
initial on its own. Reading the file back joins the two paragraphs
again, so a drop cap survives the round trip.

Leave the drop cap out when a hyperlink, a content control or a ruby
starts in the initial and reaches past it, because such an element wraps
the runs of both paragraphs, so the first paragraph would end while that
element is still open, and the file would not open at all. A tag that
only a grab bag knows about is caught later, but still before the size
of the initial is written, so that such a paragraph is not left with a
large letter in the middle of a sentence. Take the framing paragraph out
of the list when the paragraph style has a list, because that paragraph
carries the style, and the number would otherwise be shown in front of
the initial as well as in front of the text.

Also reset the character height for Asian and complex text on a drop cap
that is read from DOCX, which kept the large size of the initial.

Signed-off-by: Samuel Mehrbrodt <samuel.mehrbrodt@collabora.com>
Change-Id: If2a63ba6d1a54fdcba770eabbe47bfc25ac79693
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/12134
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Balázs Varga <balazs.varga@collabora.com>
(cherry picked from commit 1c04a9103691fa37cf973395d7acb313325ee761)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211459
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-25 19:38:57 +02:00
Caolán McNamara 984bb7858f check the byte ranges of a pdf signature against the file
The offsets and lengths come from the document, so a range that is
not inside the file leaves the signature unchecked now.

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I4c293d4c49326cb08336295714dec91d833bbd88
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13334
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 2fb3bbcf0afd5d13f41d526551835a24a0d8b5aa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211454
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-25 19:37:47 +02:00
Xisco Fauli db7dd67ddb nss: upgrade to 3.130
Downloaded from https://ftp.mozilla.org/pub/security/nss/releases/NSS_3_130_RTM/src/nss-3.130-with-nspr-4.39.tar.gz

Change-Id: Ic56c69ce1ae92b65ab1ec8e7cab4a2fb1f10ad94
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211452
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-25 19:36:01 +02:00
Andreas Heinisch 25d30234d5 tdf#104892 - Rebuild the sidebar at once only on an application switch
Change-Id: Iedf872c53cc8fdfb6300298ce980dafc4a60b719
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211428
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
2026-09-25 17:33:14 +02:00
DrRobotto 43185ab0d2 tdf#160001 - Restore AllowDuplicateFieldNames from the last user settings
Change-Id: Ibe8027e532e669bab1551df798ec973b50767590
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211449
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-09-25 17:08:14 +02:00
Justin Luth e92d181289 tdf#169024 writerfilter: import TEXT_LINE as LINE_CENTER etc
The GUI dialog is expecting AT_CHAR TEXT_LINE anchors
to indicate that they are LINE_TOP, LINE_BOTTOM, LINE_CENTER
instead of simply TOP, BOTTOM, CENTER.

Since it didn't find a match, it just fell back to
m_nOldV(text::VertOrientation::TOP)

make CppunitTest_sw_ooxmlexport19 CPPUNIT_TEST_NAME=testTdf169024

make CppunitTest_sw_writerfilter_dmapper \
    CPPUNIT_TEST_NAME=testTextboxTextlineTop

Change-Id: I860d71a529c6d1e09771c58548fe646a604281f8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211344
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
2026-09-25 16:11:43 +02:00
Caolán McNamara aa74bed8ff consider javascript an exotic protocol
no document feature needs javascript: urls, it defaulted into the
list with the rest in:

commit 7e5feed961ef2344d580d63a5752e9d6e2c0797e
Date:   Fri Aug 21 10:12:08 2026 +0200

    switch INetURLObject::IsExoticProtocol to default-deny

Signed-off-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Change-Id: I6546e08af67f00c9783c96dca9c3a736205033ef
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13501
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.com>
(cherry picked from commit 6c66678f8ba35fc9b7758a88fa0294fdb871cf1b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211457
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-25 15:54:51 +02:00
Andreas Heinisch aa306ba447 tdf#154463 - Prevent crash from AutoCorrect copying fieldmark char
A wildcard AutoCorrect entry like ".*->.*" copied that character into
its replacement text, inserting a second FIELDSTART into the node which
crashes FindFieldSep.

Extend the delimiter check to the entire 0x01 ... 0x08 char range
put in the text (CH_TXTATR_BREAKWORD, CH_TXT_ATR_FIELDSEP,
CH_TXT_ATR_INPUTFIELDSTART/END, CH_TXT_ATR_FORMELEMENT,
CH_TXT_ATR_FIELDSTART/END).

Change-Id: Ib58bb7e3c614977082cd9d23722497f77fe9ca8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211447
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Tested-by: Jenkins
2026-09-25 14:24:19 +02:00
Mike Kaganski 8343c6e702 vcl: size an appended cross-reference stream's offsets by the file
WriteXRef wrote /W[1 3 1] and three offset bytes whatever the document.
Signing a PDF larger than 16 MB recorded every offset in the appended update
modulo 16777216, so the updated catalog and the signature itself pointed into
the middle of the original body.

The field is as wide as the largest offset needs now. /DecodeParms/Columns
counts the bytes of a row apart from its predictor byte, so it follows the
field rather than staying at 5, and each byte is shifted out of the offset
rather than masked with an int too narrow to hold the mask.

Reachable only from a file whose cross-reference is already a stream, which is
why our own exports never met it. It has no test: the only path that appends a
cross-reference section is signing, and that needs a certificate.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I08279fcb43d0c538f66dc029890a58a76f6dab7e
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13206
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 7e52e9eabbda9de67fedab5bf96a71902e53bc28)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211445
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-25 12:02:23 +02:00
Mike Kaganski 010611712f vcl: read a cross-reference stream that carries no predictor
PDFDocument sized every row of a /Type/XRef stream as one predictor byte plus
the /W fields and read the fields from offset one, and the no-prediction arm
of the filter never copied the row it had read. /Predictor defaults to 1, so
a stream written without /DecodeParms decoded as nothing but free entries. It
gave up entirely when /Filter was absent, which is as legal.

An indirect /Length is resolved through those offsets. With none of them the
tokenizer cannot skip a stream body, so it reads the compressed bytes as
tokens and Read() fails on the file.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I4929e879e02ba91dce8280421f129f91dba9074d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13205
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 3adab88af78016314f210f2be66668190b1f3493)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211444
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-25 12:02:18 +02:00
Neil Roberts b991ec6042 tdf#173293 Use InvocationHelper in ooo.vba.excel.Application
ScVbaApplication now contains a comphelper::InvocationHelper member
which it forwards methods and properties to when ScVbaSWFunction doesn’t
recognise them. This makes it possible to access methods such as
getSelection when via the XInvocation such as when accessing the object
via pyuno.

Change-Id: I1481d4f2e613037ae9283bd86844bd4d805cd2bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210131
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-09-25 10:39:30 +02:00
Neil Roberts 6154aa313c Related tdf#173293 comphelper: Add helper class for XInvocation
Lots of classes implement XInvocation in order to add extra methods and
properties that are determined at runtime. One problem with this is that
when such an object is introspected with the css.script.Invocation
service then that service uses the XInvocation interface directly to
query what methods and properties are supported instead of creating an
XIntrospectionAccess via the css.beans.Introspection service. It looks
like probably all of the current implementations of XInvocation only use
it to advertise the dynamic methods and don’t advertise any concrete
methods provided by any interfaces that the object implements. This
means for example that when the object is accessed by pyuno, only the
dynamic methods and properties can be used.

This patch adds a helper class that can be used to help implement
XInvocation in such a way that if a requested method isn’t found as a
dynamic method, it can pass the method call on to the helper which will
use the normal Introspection service to query the available methods and
properties.

Change-Id: Ia4363594ee274c36249a0d1c94f16a829ace4647
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210130
Tested-by: Jenkins
Reviewed-by: Neil Roberts <nroberts@libreoffice.org>
2026-09-25 10:39:19 +02:00
Christopher Ross 8b00664342 qt: support other QPA platforms
Platform::Invalid was renamed to Platform::Other when platform
identification moved to SalInstance, but the Qt VCL plugin retained
the assertions and aborts used for the former invalid sentinel.

Allow unrecognised Qt platform plugins to use the generic native-window
path. This lets third-party QPA plugins operate without requiring an
explicit LibreOffice platform classification.

Tested with the MWS (Mercurius Window System) Qt 5 QPA plugin by
starting LibreOffice Writer. Also exercised with Impress editing an image-heavy presentation.

Change-Id: Idb0be3d7d0b5508565d6beb17729f768e552bb85
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211434
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-25 09:37:58 +02:00
Julien Nabet 56f02227d7 Update git submodules
* Update helpcontent2 from branch 'master'
  to f4cfb26c69d3ea72ebb1e5af60209367c8157db5
  - tdf#173714: error in the sample script for "Calling Basic Macros from Python"
    
    Change-Id: I5448988e9d7739ef528cc0c5f156d45c64fff455
    Reviewed-on: https://gerrit.libreoffice.org/c/help/+/211446
    Tested-by: Julien Nabet <serval2412@yahoo.fr>
    Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-25 09:15:17 +02:00
Mike Kaganski 59453af50d tdf#171555 sw: draw a non-breaking hyphen as a plain hyphen
Regression after commit 367ef7c1dca300b1966093de5bbfca8ea97d403a
(tdf#167946: reimplement the fix for tdf#120677, 2026-02-11). A
non-breaking hyphen was shown as an empty box on macOS, and on Windows
in a font other than the rest of the text. Inside a field it wasn't
painted at all, and the brackets around double-lined text came out as
the text they enclose.

SwTextFormatter::NewPortion builds the portion for U+2011 with a plain
'-'. The SwTextSlot in SwExpandPortion carried that character to the
font; dropping the base class sent U+2011 instead. Carlito, Caladea,
Arial and Courier New have no glyph for it, nor for the U+2010
HarfBuzz falls back to.

So declare the substitution in SwBlankPortion. A blank stands in for
one character; it doesn't expand to computed text. Format, measure and
paint all use that character where it differs from the model one; a
no-break space is shown as itself, so tdf#120677 and tdf#167946 stay
fixed. SwTextPortion::Paint splits in two for it, since the
decorations read the index that the swap resets, and a blank with no
length still has a width to paint.

Signed-off-by: Mike Kaganski <mike.kaganski@collabora.com>
Change-Id: I93af27f8647e7e04014734af7100372fa66018cb
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13203
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit e9ce5e4424deb3a28db630fdb540ccfac1f4c0a2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211440
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-25 08:58:35 +02:00
ApurvR20 1bbdd21a9d tdf#164490 Use stronger typed SwClient
Change-Id: I5a0104038656ad037feab3b2bb7c939afdb62a9c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211229
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-09-24 23:27:29 +02:00
ApurvR20 d1473c1738 tdf#146150 Update test to use dispatch command instead of numerical ID
Change-Id: Ib160576a2a8167cd1cc2cc619b7dd1cbed994a1e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211033
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
2026-09-24 22:18:05 +02:00
Jan Luethi a942eb4878 tdf#145614 Convert #define to constexpr
Change-Id: I156a1a231cab8277462eddbc044f4b3378f73448
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211386
Reviewed-by: Hossein <hossein@libreoffice.org>
Tested-by: Jenkins
2026-09-24 21:59:48 +02:00
Bogdan Buzea cb887cedda tdf#143148: Use pragma once instead of include guards
Change-Id: I46fe07bebaff12c4c6f6d2f0b2e32b1eb9046d31
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211347
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2026-09-24 21:01:12 +02:00
Christopher Sherlock 5bf98dd16c vcl: remove dead code
if (bOverflow)
    {
        const auto [n2, n3] = o3tl::getConversionMulDiv(eFrom, eTo);
        BigInt a4 = n1;
        a4 *= n2;
    }

this does... nothing at all.

Change-Id: Ia47a8f80d6de8a981d71301454f1ffe4feb587f6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203681
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-09-24 20:01:12 +02:00
Christopher Sherlock fdad8a0460 vcl: encapsulate full coordinate transformation in ImplMapRes
This commit finalizes the refactoring of the LogicToLogic() coordinate
mapping pipeline by completely encapsulating both scaling and origin
translation within the ImplMapRes struct.

By recognizing the mathematical symmetry of the affine transformation,
origin shifts are now explicitly decoupled from the scaling logic. This
allows the complete transformation pipeline to be handled internally,
making the call sites in map.cxx significantly cleaner and less prone
to offset-related bugs.

Key changes:
- Removed the intermediate ScaleLogicX() and ScaleLogicY() methods.
- Introduced explicit LocalToAbsolute() and AbsoluteToLocal() helper
  methods to handle origin offset addition and subtraction.
- Added TransformPointX() and TransformPointY(), which cleanly implement
  the full pipeline: LocalToAbsolute() -> ScaleDistance() -> AbsoluteToLocal().
- Updated OutputDevice::LogicToLogic() overloads for Point and Rectangle
  to use the new TransformPoint methods, successfully removing all
  manual destination offset subtractions from map.cxx.

Change-Id: Ibb42f62d6904ae282dabf697b35455aec7c17677
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203680
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-09-24 19:58:11 +02:00
Christopher Sherlock 74176cfe53 vcl: encapsulate coordinate and distance scaling in ImplMapRes
This commit refactors the procedural scaling logic in map.cxx into
clean, object-oriented methods on the ImplMapRes struct. This greatly
improves readability and structurally prevents mathematical bugs by
separating the concepts of coordinate scaling and distance scaling.

Previously, map.cxx relied heavily on the standalone static function
lcl_scaleLogicValue(), requiring manual extraction and passing of
internal scales and offsets at every call site.

Key changes:
- Moved lcl_scaleLogicValue() into ImplMapRes.cxx as an internal helper.
- Added ScaleLogicX() and ScaleLogicY() to ImplMapRes to handle absolute
  coordinates (Points and Rectangles), which safely apply the local
  origin offset before scaling.
- Added ScaleDistanceX() and ScaleDistanceY() to ImplMapRes to handle
  pure vectors (Sizes), ensuring origin offsets are bypassed.
- Refactored OutputDevice::LogicToLogic() overloads to utilize these
  new encapsulated methods.

Change-Id: Ib46f6f2bac09b23baa37f29b8a71fdf6a0ffe164
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203679
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-09-24 19:55:22 +02:00
Christopher Sherlock 32071cd6f1 vcl: rename parameters in lcl_scaleLogicValue() for clarity
This commit updates the parameter names in lcl_scaleLogicValue() to
better reflect their mathematical roles and strictly adhere to
VCL's Hungarian notation conventions.

Key changes:
- Renamed 'n1' (tools::Long) to 'nSourceValue' for semantic clarity.
- Renamed 'n2' (double) to 'fSourceScale', correcting the prefix
  from integer ('n') to float/double ('f').
- Renamed 'n3' (double) to 'fDestScale', correcting the prefix and
  making the divide-by-zero safety check instantly understandable.

Change-Id: Id50ca85ae334b6ec40cdd1a8e533f9a5d902ab8a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203678
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
Tested-by: Jenkins
2026-09-24 19:53:47 +02:00
Christopher Sherlock 2a021a9e60 vcl: introduce parameterized ImplMapRes constructor
This commit introduces a parameterized constructor for ImplMapRes to
streamline map resolution initialization across VCL mapping functions.

Previously, instantiating a local ImplMapRes required an error-prone,
two-step process: default construction followed by a call to the
CalcMapResolution mutator.

The new constructor elegantly bridges this by delegating the complex
scaling math to CalcMapResolution() while explicitly handling the absolute
origin offsets (mnMapOfs) required for a fresh resolution state.

Key changes:
- Added ImplMapRes(MapMode, nDPIX, nDPIY) constructor.
- Refactored CoordinateMapper and OutputDevice mapping functions
  (LogicToPixel, PixelToLogic) to use the new single-line RAII-style
  initialization, eliminating repetitive two-step setup code.

Change-Id: I68072cd66d01fd1663b58330890fe90a7bb8f94c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/203677
Tested-by: Jenkins
Reviewed-by: Dan Williams <dcbw@libreoffice.org>
2026-09-24 19:53:11 +02:00
Xisco Fauli 1e3ace6710 sfx2: fix crash in SfxCommonTemplateDialog_Impl::FamilySelect
Seen in https://crashreport.libreoffice.org/stats/signature/SfxCommonTemplateDialog_Impl::FamilySelect(unsigned%20short,bool)

Change-Id: I3c778270301e9e140ee40a1288813dacf43b1a0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211429
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-24 17:18:47 +02:00
Xisco Fauli 3da93d717e tdf#173608: Revert "sc: Fix backward reference when copying a sheet"
The reverted commit changed the way references are handled when
copying sheets in order to mimic how Excel behaves.
However, LibreOffice behaves differently (tested back to
LibreOffice 3.3) so the change might break the workflow of
many users (https://xkcd.com/1172/)
The proper way to address this would be by adding a new
config option, so users can choose how LibreOffice behaves,
but that needs to be implemented in a different patch.

This reverts commit 5cefed66bc.

Change-Id: I16636e80de52328ef4c89a11da899b9e33b6aa00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211421
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-24 16:13:59 +02:00
Kurt Nordback f81e4abac2 Axis and rendering fixes for funnel charts
Fix the plot direction and axis visibility for funnel charts created via the
UI (rather than imported from a file).

Signed-off-by: Kurt Nordback <kurt.nordback@collabora.com>
Change-Id: Iccf81a31d5f1ea8f9e63ffe369752e9c8a3f991d
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/8837
Reviewed-by: Tomaž Vajngerl <tomaz.vajngerl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit f5c7bc0a29c87993a83d9c492e8c545936e60a0e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211424
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Tested-by: Jenkins
2026-09-24 16:12:36 +02:00
Weblateandvpanter a90fc86337 android-viewer translated using Weblate
Dutch currently translated at 100.0% (116 of 116 strings)

Change-Id: I04bad1324f8cb273f10468d43da4d80dcbcc17a1
Co-authored-by: Weblate <noreply@documentfoundation.org>
Co-authored-by: vpanter <Leo.Moons@proximus.be>
Translate-URL: https://translations.documentfoundation.org/projects/android-viewer/android-strings/nl/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/210659
Tested-by: Michael Weghorn <m.weghorn@posteo.de>
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-24 15:04:41 +02:00
Michael Weghorn 825d4da651 tdf#130857 cui: Create graphics bullet submenu when menu button is shown
Trying to create and populate the submenu for the "Gallery"
menu entry in the bullets and numbering dialog only when
its menu button is clicked is too late, as the toggle
handler isn't guaranteed to be called before the menu
gets shown. Therefore, instead do this as soon as the
menu button gets shown.

This is similar to what

  commit 9456449751
  Author: Michael Weghorn <m.weghorn@posteo.de>
  Date:   Fri Jun 20 18:20:42 2025 +0200

      tdf#167034 sd: Populate graphics bullet menu when creating dlg

did for the Impress-specific bullets and numbering dialog,
but now for the dialog used in other modules.

Steps to reproduce:

* start Writer
* "Format" -> "Bullets and Numbering..."
* go to "Customize" tab
* select "Graphics" in the "Type" combobox
* Press the "Select..." menu button
* hover over the "Gallery" menu item to open its submenu

Without this commit in place, the menu would not be shown
unless using the gtk3 vcl plugin.

For the vcl implementation (SalInstanceMenuButton), the
submenu would be present after the menu button got clicked
for the second time.
For the implementation using native Qt widgets
(QtInstanceMenuButton, enabled via SAL_VCL_QT_USE_WELDED_WIDGETS=1)
the submen would even not be shown then.

With this commit in place, the menu is now shown as
expected already the first time for all 3 weld::MenuButton
implementations.

Change-Id: I9076efe1375360554701d76c5330494eceba1391
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211423
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-24 15:01:29 +02:00
Michael Weghorn 6761f30360 cui: Prefix SvxNumOptionsTabPage members with "m_"
Add the usual "m_" prefix to those SvxNumOptionsTabPage
members that don't have it yet, to make it easier to
distinguish them from local variables by their name.

Change-Id: I08eb0870efe37bf81a4b8da32ee37d75f73ce639
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211422
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-24 15:01:21 +02:00
Michael Weghorn 32763a0f55 tdf#130857 qt weld: Drop assert for layout in QtInstanceContainer ctor
QtInstanceContainer has a virtual QtInstanceContainer::getLayout
method that is responsible for providing a QLayout when needed.
The base class implementation just returns the widget's layout,
but subclasses could be doing something else. Therefore, don't
already assert that the widget has a layout in the ctor.

If QtInstanceContainer::getLayout is called, that one
already has the same assert. (Add a message to that assert.)

This way, the check will only be performed once a layout
is actually needed.

The main motivation for this change is that QColorDialog
used in QtInstanceColorChooserDialog isn't guaranteed to
have a layout when a platform-native one is used, which
is e.g. the case on current KDE Plasma by default,
unless deactivated, which could be done like this:

    --- a/vcl/qt5/QtInstance.cxx
    +++ b/vcl/qt5/QtInstance.cxx
    @@ -985,6 +985,7 @@ QtInstance::CreateColorChooserDialog(weld::Window* pParent, vcl::ColorPickerMode
         std::unique_ptr<weld::ColorChooserDialog> pColorChooserDialog;
         RunInMainThread([&] {
             QColorDialog* pDialog = new QColorDialog(GetQWidget(pParent));
    +        pDialog->setOption(QColorDialog::DontUseNativeDialog);
             pColorChooserDialog = std::make_unique<QtInstanceColorChooserDialog>(pDialog);
         });

Without this change (and without deactivating the native dialog),
opening e.g. the font color chooser in the Writer formatting
toolbar and then pressing the "Custom color..." button would
otherwise trigger the assert.

(QtInstanceColorChooserDialog also doesn't override
QtInstanceContainer::getLayout, so if any of the
weld::Container method implementations actually requiring
a layout were ever called the assert would still be triggered,
but that is not the case. Should that ever become relevant
in the future, disabling the native dialog could be one
potential way forward.)

Change-Id: I6d34e46d564af7a7da56cba5413872e13ba51a9e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211420
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Tested-by: Jenkins
2026-09-24 15:01:14 +02:00
Michael Weghorn 3964cf79ab sw: Return reference in SwContentTree::GetParentWindow
This makes clear the return value is non-null and
allows to drop the null check in one caller.

Change-Id: I7f3df77029af7a0a722c743afdb3b8a0f9b1e730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211419
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-24 15:01:06 +02:00
Michael Weghorn 52738e868a sw: Switch SwContentTree::m_pDialog to reference
... and rename accordingly. This makes clear it's
always non-null and therefore safe to dereference.

Change-Id: Ic01556edfc9fea9cf74ce6087a36c7c9a2f39a4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211418
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2026-09-24 15:00:59 +02:00
Miklos Vajna d91da67575 pdfium: replace extractpatterns.patch with the upstreamed version
Similar to commit a7850ccd6656d1718fd0d89709550664e997c759 (pdfium:
replace the fix-windows-build patch with the upstreamed version,
2026-09-11).

The upstreamed version doesn't need a pdf page parameter, so clean up
some (now) unused pPage and (pre-existing) nPageObjectIndex parameters
as well.

Signed-off-by: Miklos Vajna <vmiklos@collabora.com>
Change-Id: Ieef207bf39124fdf4a8bff14ab1532f1836087ec
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/13355
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit ba15a8ac8921a3a82fbc193f781610d7c5a18c38)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211417
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-24 13:59:52 +02:00
Vissarion Fisikopoulos 1d0c317229 tdf#173673 dbaccess: allow changing the filter while "Apply Filter" is off
Instead of using getFilter and getHavingClause that report an empty filter/
having whenever "Apply Filter" is unchecked, use the raw Filter/HavingClause
properties. Add UITest.

Change-Id: Id0995217c48aba77c4e89327ede990bc31d19c1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211413
Tested-by: Jenkins
Reviewed-by: Vissarion Fisikopoulos <vfisikop@libreoffice.org>
2026-09-24 13:28:20 +02:00
Bayram Çiçek 3e131896fc starmath OOXML: keep the color of the lines and signs in a formula
A fraction whose terms are red came back with red terms and a black
bar, and a colored square root came back with a black root sign.

The formula draws these parts itself, so their color is not in the
text. It sits in the m:ctrlPr of the fraction or the root, which
neither filter read.

Read m:ctrlPr on import and keep the color while the parts inside are
read, so the command comes out once around the whole fraction rather
than repeated on the bar and on both terms. An inner color beats an
outer one, which is how the parser treats nested commands. A border box
that Writer does not draw is dropped, and the color it named stays on
the content that is left.

Write m:ctrlPr back on export wherever a node has a color of its own, but
only for a DOCX. A slide or a sheet does not declare the w namespace that
the color needs. The fraction, the brackets, the root, the accent, the
over and underline, the overbrace and underbrace, the border box and the
n-ary operator each have a property element that can hold one.

Added the testMathFractionBarColor unit test.

Signed-off-by: Bayram Çiçek <bayram.cicek@collabora.com>
Change-Id: Ic13c9e59756806932f61a6fb51e4919a49cdfcd6
Reviewed-on: https://gerrit.collaboraoffice.com/c/online/+/10047
Reviewed-by: Michael Stahl <michael.stahl@collabora.com>
Tested-by: Jenkins CPCI <releng@collaboraoffice.com>
(cherry picked from commit 568ac1d9bdfc8bd43995dbd3626e73084d4f90d6)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/211416
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2026-09-24 13:12:27 +02:00