cui/source/options/optdict.cxx                           |    4 +---
 drawinglayer/source/primitive2d/textbreakuphelper.cxx    |    2 +-
 drawinglayer/source/tools/wmfemfhelper.cxx               |    2 +-
 filter/source/msfilter/svdfppt.cxx                       |    8 +++++++-
 sal/qa/rtl/math/test-rtl-math.cxx                        |    1 +
 sal/rtl/math.cxx                                         |   10 +++++++---
 sc/qa/unit/data/functions/statistical/fods/countif2.fods |   11 ++++++++++-
 sw/source/ui/dbui/mmgreetingspage.cxx                    |    4 ++--
 vcl/qa/cppunit/pdfexport/pdfexport2.cxx                  |    4 ++--
 vcl/source/filter/jpeg/Exif.cxx                          |    9 ++++-----
 10 files changed, 36 insertions(+), 19 deletions(-)

New commits:
commit b178f926c04b330fd07c9c022336a5049273a159
Author:     Khaled Hosny <[email protected]>
AuthorDate: Tue Oct 21 13:11:52 2025 +0300
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Oct 23 10:25:04 2025 +0200

    tdf#168884: Restore missing transparency in EMF files
    
    Revert unrelated changes from:
    
    commit 1bdf1e2d52a7fae3e1a58ddf15a7657df3d47004
    Author: Khaled Hosny <[email protected]>
    Date:   Thu Sep 25 16:33:09 2025 +0300
    
        tdf#168371: Disable ligatures in Impress/Draw with character spacing
    
    I added a new parameter to TextSimplePortionPrimitive2D constructor, and
    rTextFillColor that previously was using the default value had now to be
    explicitly set, but I should have used COL_TRANSPARENT as that is the
    default.
    
    Change-Id: Ie51e8f3f4c68a9539eb3f6cc77fb1e6cf44f673f
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192779
    Reviewed-by: Khaled Hosny <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit 1dce54d8fb070d3d4134317612c145a923497bb4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192789
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/drawinglayer/source/primitive2d/textbreakuphelper.cxx 
b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
index be3887d18363..b971fda62778 100644
--- a/drawinglayer/source/primitive2d/textbreakuphelper.cxx
+++ b/drawinglayer/source/primitive2d/textbreakuphelper.cxx
@@ -182,7 +182,7 @@ namespace drawinglayer::primitive2d
                         mrSource.getFontAttribute(),
                         mrSource.getLocale(),
                         mrSource.getFontColor(),
-                        mrSource.getTextFillColor(),
+                        COL_TRANSPARENT,
                         mrSource.getLetterSpacing()));
             }
         }
diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx 
b/drawinglayer/source/tools/wmfemfhelper.cxx
index 00aff7114203..cbbeb2e93e4f 100644
--- a/drawinglayer/source/tools/wmfemfhelper.cxx
+++ b/drawinglayer/source/tools/wmfemfhelper.cxx
@@ -1157,7 +1157,7 @@ namespace wmfemfhelper
                     std::move(aFontAttribute),
                     std::move(aLocale),
                     aFontColor,
-                    aFillColor,
+                    COL_TRANSPARENT,
                     rFont.GetFixKerning());
             }
         }
diff --git a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx 
b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
index 47c0a7f1fdb1..3c59b4b6d5f9 100644
--- a/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
+++ b/vcl/qa/cppunit/pdfexport/pdfexport2.cxx
@@ -4131,9 +4131,9 @@ CPPUNIT_TEST_FIXTURE(PdfExportTest2, testTdf145873)
     int nPageObjectCount = pPdfPage->getObjectCount();
 
     // tdf#145873: Without the fix #1 in place, this test would have failed 
with
-    // - Expected: 107
+    // - Expected: 66
     // - Actual  : 3
-    CPPUNIT_ASSERT_EQUAL(107, nPageObjectCount);
+    CPPUNIT_ASSERT_EQUAL(66, nPageObjectCount);
 
     auto pObject = pPdfPage->getObject(4);
     CPPUNIT_ASSERT_MESSAGE("no object", pObject != nullptr);
commit d50b7ec297c85b391446d8991bd7024df756ef2c
Author:     Mike Kaganski <[email protected]>
AuthorDate: Sun Oct 5 15:38:59 2025 +0500
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Oct 23 10:25:04 2025 +0200

    tdf#168673: approx equality threshold no less than 1/2 15th significand
    
    01:26,47 is 0.001000810185185185, which has 16 significant decimals. It
    is converted to string as "0.00100081018518519" (15 significands).
    
    The problem was, that when criterion "=0.00100081018518519" is used to
    check value 0.001000810185185185, the two numbers differ in five least
    significant bits, but rtl_math_approxEqual uses 0x1p-48 to ignore last
    four bits only. This is a common problem for numbers close to 1.0E(N).
    
    This change introduces a second threshold, in addition to "only take
    into account 48 signigicant bits of mantissa": it calculates the value
    of half of 15th decimal unit of the smaller absolute value, and uses
    the greater of the two thresholds for the approximate equality.
    
    Change-Id: I2f98ab23c94ca3a2949c3762fbfb6ea563eef94b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191883
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit d32c664c3df302b7107a70858aa55b11601225cf)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192698
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sal/qa/rtl/math/test-rtl-math.cxx 
b/sal/qa/rtl/math/test-rtl-math.cxx
index 5d2488f2c712..8741623c8648 100644
--- a/sal/qa/rtl/math/test-rtl-math.cxx
+++ b/sal/qa/rtl/math/test-rtl-math.cxx
@@ -524,6 +524,7 @@ public:
         CPPUNIT_ASSERT_EQUAL( true, rtl::math::approxEqual( 
7.4124095894894475e+158, 7.4124095894894514e+158));
         CPPUNIT_ASSERT_EQUAL( true, rtl::math::approxEqual( 
1.2905754687023132e+79, 1.2905754687023098e+79));
         CPPUNIT_ASSERT_EQUAL( true, rtl::math::approxEqual( 
3.5612905090455637e+38, 3.5612905090455599e+38));
+        CPPUNIT_ASSERT_EQUAL( true, rtl::math::approxEqual( 
0.001000810185185185, 0.00100081018518519));
         // 0.3 - 0.2 - 0.1 == 0.0
         CPPUNIT_ASSERT_EQUAL( 0.0, rtl::math::approxSub( rtl::math::approxSub( 
0.3, 0.2), 0.1));
         // ((2^53)-1) - ((2^53)-2) == 1.0
diff --git a/sal/rtl/math.cxx b/sal/rtl/math.cxx
index d6f733278867..e6f16ea17a99 100644
--- a/sal/rtl/math.cxx
+++ b/sal/rtl/math.cxx
@@ -604,7 +604,10 @@ double SAL_CALL rtl_math_approxValue(double fValue) 
noexcept
 
 bool SAL_CALL rtl_math_approxEqual(double a, double b) noexcept
 {
+    // threshold is last four bits of mantissa:
     static const double e48 = 0x1p-48;
+    // threshold is half of the 15th significant decimal (see doubleToString):
+    static const double half15thSignificand = 5E-15;
 
     if (a == b)
         return true;
@@ -617,10 +620,11 @@ bool SAL_CALL rtl_math_approxEqual(double a, double b) 
noexcept
         return false; // Nan or Inf involved
 
     a = fabs(a);
-    if (d >= (a * e48))
-        return false;
     b = fabs(b);
-    if (d >= (b * e48))
+    const double min_ab = std::min(a, b);
+    const double threshold1 = min_ab * e48;
+    const double threshold2 = getN10Exp(floor(log10(min_ab))) * 
half15thSignificand;
+    if (d >= std::max(threshold1, threshold2))
         return false;
 
     if (isRepresentableInteger(a) && isRepresentableInteger(b))
diff --git a/sc/qa/unit/data/functions/statistical/fods/countif2.fods 
b/sc/qa/unit/data/functions/statistical/fods/countif2.fods
index 35a61b34c642..3cf40c966b53 100644
--- a/sc/qa/unit/data/functions/statistical/fods/countif2.fods
+++ b/sc/qa/unit/data/functions/statistical/fods/countif2.fods
@@ -3143,8 +3143,17 @@
      <table:table-cell table:style-name="Default"/>
      <table:table-cell/>
     </table:table-row>
+    <table:table-row table:style-name="ro2">
+     <table:table-cell 
table:formula="of:=COUNTIF([.J10:.J10];&quot;=&quot;&amp;[.J10])" 
office:value-type="float"/>
+     <table:table-cell office:value-type="float" office:value="1"/>
+     <table:table-cell table:formula="of:=[.A10]=[.B10]" 
office:value-type="boolean"/>
+     <table:table-cell table:formula="of:=FORMULA([.A10])" 
office:value-type="string"/>
+     <table:table-cell office:value-type="string" 
office:string-value="tdf#168673"/>
+     <table:table-cell table:number-columns-repeated="4"/>
+     <table:table-cell office:value-type="time" 
office:time-value="PT00H01M26.47S"/>
+    </table:table-row>
     <calcext:conditional-formats>
-     <calcext:conditional-format 
calcext:target-range-address="Sheet2.C2:Sheet2.C9">
+     <calcext:conditional-format 
calcext:target-range-address="Sheet2.C2:Sheet2.C100">
       <calcext:condition calcext:apply-style-name="Default" 
calcext:value="=&quot;&quot;" calcext:base-cell-address="Sheet2.C2"/>
       <calcext:condition calcext:apply-style-name="Untitled1" 
calcext:value="=0" calcext:base-cell-address="Sheet2.C2"/>
       <calcext:condition calcext:apply-style-name="Untitled2" 
calcext:value="=1" calcext:base-cell-address="Sheet2.C2"/>
commit 447dfb5ef3e30d9232f5f8df6020d164607e289f
Author:     Mike Kaganski <[email protected]>
AuthorDate: Wed Oct 8 11:11:28 2025 +0500
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Oct 23 10:25:04 2025 +0200

    tdf#167143: set text of the correct row
    
    Regression after commit 00e2762c664614a1b33f54dfc990ba29f0f81a07
    (Drop uses of css::uno::Sequence::getConstArray in cppuhelper ..
    cui, 2024-04-29).
    
    Change-Id: I9544160ee3857c3ef8322c85529f5ff6a4ce0e2c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192055
    Reviewed-by: Mike Kaganski <[email protected]>
    Tested-by: Jenkins
    (cherry picked from commit f5cd16a252a73a3e594fc19eba365c52ec987fbb)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192710
    Reviewed-by: Xisco Fauli <[email protected]>
    (cherry picked from commit fb8332fd4ac068835ba3a6557e8a67c5a5006559)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192727

diff --git a/cui/source/options/optdict.cxx b/cui/source/options/optdict.cxx
index 98a3840ffbef..2e02d8a84f12 100644
--- a/cui/source/options/optdict.cxx
+++ b/cui/source/options/optdict.cxx
@@ -524,7 +524,6 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 
nId )
         });
 
     m_pWordsLB->freeze(); // speed up insert
-    int nRow = 0;
     for (OUString const & rStr : aSortedDicEntries)
     {
         sal_Int32 index = 0;
@@ -532,8 +531,7 @@ void SvxEditDictionaryDialog::ShowWords_Impl( sal_uInt16 
nId )
         if (index != -1 && m_pWordsLB == m_xDoubleColumnLB.get())
         {
             OUString sReplace = rStr.getToken(0, '     ', index);
-            m_pWordsLB->set_text(nRow, sReplace, 1);
-            ++nRow;
+            m_pWordsLB->set_text(m_pWordsLB->n_children() - 1, sReplace, 1);
         }
     }
     m_pWordsLB->thaw();
commit b70dd0f4f859415af8260ec0e178eb888e014fc9
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Oct 6 20:52:26 2025 +0200
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Oct 23 10:25:04 2025 +0200

    tdf#168723: realloc should create the _correct_ size before access ;-)
    
    This is how commit 36df0b837b398f1011cb6f9fdf978a24125eee89 (INTEGRATION:
    CWS os47 (1.3.190); FILE MERGED, 2005-01-28) desctibed the same change
    in commitPage. The leftover's time came, just after 20 years.
    
    Change-Id: Id960f84349b8885811ad750d5956965d0ccf47b5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191981
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>
    (cherry picked from commit 014612657286b8042580245773934c5a9433503b)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192699
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/sw/source/ui/dbui/mmgreetingspage.cxx 
b/sw/source/ui/dbui/mmgreetingspage.cxx
index 3e5f8d43c243..48308ea2d56a 100644
--- a/sw/source/ui/dbui/mmgreetingspage.cxx
+++ b/sw/source/ui/dbui/mmgreetingspage.cxx
@@ -403,8 +403,8 @@ IMPL_LINK_NOARG(SwMailBodyDialog, OKHdl, weld::Button&, 
void)
         const SwDBData& rDBData = m_rConfigItem.GetCurrentDBData();
         Sequence< OUString> aAssignment = m_rConfigItem.GetColumnAssignment( 
rDBData );
         sal_Int32 nPos = m_xFemaleColumnLB->get_active();
-        if(aAssignment.getLength() < MM_PART_GENDER)
-            aAssignment.realloc(MM_PART_GENDER);
+        if(aAssignment.getLength() <= MM_PART_GENDER)
+            aAssignment.realloc(MM_PART_GENDER + 1);
         if( nPos > 0 )
             aAssignment.getArray()[MM_PART_GENDER] = 
m_xFemaleColumnLB->get_active_text();
         else
commit 8ad5d2a278309fb084513931e3fe85e2631824eb
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Oct 10 21:43:25 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Oct 23 10:25:04 2025 +0200

    ofz Use-of-uninitialized-value
    
    Change-Id: I3dfc1296e174d6751300991f214e99b09d745e5c
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192190
    Tested-by: Jenkins
    Reviewed-by: Xisco Fauli <[email protected]>

diff --git a/vcl/source/filter/jpeg/Exif.cxx b/vcl/source/filter/jpeg/Exif.cxx
index 469281bdcc85..8d4ee9388029 100644
--- a/vcl/source/filter/jpeg/Exif.cxx
+++ b/vcl/source/filter/jpeg/Exif.cxx
@@ -81,13 +81,12 @@ void Exif::write(SvStream& rStream)
 
 bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
 {
-    sal_uInt16  aMagic16;
-    sal_uInt16  aLength;
-
     sal_uInt64 aSize = rStream.TellEnd();
     rStream.Seek(STREAM_SEEK_TO_BEGIN);
 
     rStream.SetEndian( SvStreamEndian::BIG );
+
+    sal_uInt16 aMagic16(0);
     rStream.ReadUInt16( aMagic16 );
 
     // Compare JPEG magic bytes
@@ -101,9 +100,8 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
     while(true)
     {
         sal_uInt8 aMarker = 0xD9;
-        sal_Int32 aCount;
 
-        for (aCount = 0; aCount < 7; aCount++)
+        for (sal_Int32 aCount = 0; aCount < 7; aCount++)
         {
             rStream.ReadUChar( aMarker );
             if (aMarker != 0xFF)
@@ -116,6 +114,7 @@ bool Exif::processJpeg(SvStream& rStream, bool bSetValue)
             }
         }
 
+        sal_uInt16 aLength(0);
         rStream.ReadUInt16( aLength );
 
         if (aLength < 8 || aLength > rStream.remainingSize())
commit 9ff9c2f08dcf2beb3e6ea8b36b84df101212cfe9
Author:     Caolán McNamara <[email protected]>
AuthorDate: Fri Oct 10 21:37:09 2025 +0100
Commit:     Andras Timar <[email protected]>
CommitDate: Thu Oct 23 10:25:04 2025 +0200

    ofz Use-of-uninitialized-value
    
    Change-Id: I6a80b3e16f904d50e72c03bab25164e03f192a21
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192187
    Reviewed-by: Xisco Fauli <[email protected]>
    Tested-by: Jenkins

diff --git a/filter/source/msfilter/svdfppt.cxx 
b/filter/source/msfilter/svdfppt.cxx
index 61ea0a2a7266..50daafa08069 100644
--- a/filter/source/msfilter/svdfppt.cxx
+++ b/filter/source/msfilter/svdfppt.cxx
@@ -1778,7 +1778,13 @@ static bool SdrPowerPointOLEDecompress( SvStream& 
rOutput, SvStream& rInput, sal
 {
     sal_uInt64 nOldPos = rInput.Tell();
     std::unique_ptr<char[]> pBuf(new char[ nInputSize ]);
-    rInput.ReadBytes(pBuf.get(), nInputSize);
+    auto nRead = rInput.ReadBytes(pBuf.get(), nInputSize);
+    if (nRead < nInputSize)
+    {
+        SAL_WARN("filter.ms", "Parsing error: " << nInputSize <<
+                 " bytes wanted, but " << nRead << " available");
+        nInputSize = nRead;
+    }
     ZCodec aZCodec( 0x8000, 0x8000 );
     aZCodec.BeginCompression();
     SvMemoryStream aSource( pBuf.get(), nInputSize, StreamMode::READ );

Reply via email to