Re: Interdependent, failing commits

2025-01-07 Thread Noel Grandin
On Tue, 7 Jan 2025 at 18:12, Stephan Bergmann <
stephan.bergm...@allotropia.de> wrote:

> On 1/7/25 15:08, Noel Grandin wrote:
> > Should be fixed once https://gerrit.libreoffice.org/c/core/+/179890
> >  goes in
>
> What exactly should be fixed by that?


That fixes a failure that looks like
sw/inc/calbck.hxx:85:55: runtime error: member access within address
0x6cbf82939ea0 which does not point to an object of type 'const
sw::LegacyModifyHint'
0x6cbf82939ea0: note: object is of type 'sw::AttrSetChangeHint'
 00 00 00 00  d8 aa a7 43 bf 6c 00 00  b2 00 00 00 bf 6c 00 00  20 9e 93 82
bf 6c 00 00  60 9e 93 82
  ^~~
  vptr for 'sw::AttrSetChangeHint'
#0 0x6cbf38ee73be in sw::LegacyModifyHint::GetWhich() const
sw/inc/calbck.hxx:85:55
#1 0x6cbf3aa4a21c in SwSectionFormat::SwClientNotify(SwModify const&,
SfxHint const&) sw/source/core/docnode/section.cxx:803:34
#2 0x6cbf38e99fc3 in SwModify::CallSwClientNotify(SfxHint const&) const
sw/source/core/attr/calbck.cxx:231:18

in CppunitTest_sw_rtfexport4.




> With the above change
> cherry-picked on top of recent master
> 61c12dd1c80e4b7227a614227bb690b00feb78ad, I still get both the two
> different failures described at
>

Yeah, I can't help you there, my UBSAN build is happy with both those unit
tests.


testTdf146756 in CppunitTest_chart2_import failing on some systems

2025-01-07 Thread Ilmari Lauhakangas
A mentee reported a failure of this test and it fails for me as well 
when running with


CPPUNIT_TEST_NAME="testTdf146756" make CppunitTest_chart2_import

/home/user/libreofficetwo/test/source/xmltesttools.cxx:169:(anonymous 
namespace)::testTdf146756::TestBody

equality assertion failed
- Expected: 1697
- Actual  : 2013
- In <>, attribute 'sizeY' of '//XShape[@text='New service request and 
approval; 18%']' incorrect value.


We both use Linux.

Test is in chart2/qa/extras/chart2import.cxx line 2045. It checks the 
height of a pie chart label in the second slide of 
chart2/qa/extras/data/pptx/tdf146756_bestFit.pptx


Comment says:
// Expected something like 4 lines tall(1697), not 11 lines(3817).

It is 4 lines tall for me when opened. Font is Carlito, which is present.

Test added in https://gerrit.libreoffice.org/c/core/+/162704

Ilmari


Re: testTdf146756 in CppunitTest_chart2_import failing on some systems

2025-01-07 Thread Stephan Bergmann

On 07.01.25 13:06, Ilmari Lauhakangas wrote:
/home/user/libreofficetwo/test/source/xmltesttools.cxx:169:(anonymous 
namespace)::testTdf146756::TestBody

equality assertion failed
- Expected: 1697
- Actual  : 2013
- In <>, attribute 'sizeY' of '//XShape[@text='New service request and 
approval; 18%']' incorrect value.


see the comment thread at 
 
"tdf#146756 pie chart2 import: improve response to bestFit failure" and 
its continuation at 
 
"tdf#146756 unit test font: substitute Carlito for Calibri font", 
culminating in Justin's "Feel free to completely disable the test."  So, 
throw that flaky test away for good now?


core.git: helpcontent2

2025-01-07 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2f870ac44b28963b5f116c3f70fb697fab0317cc
Author: Olivier Hallot 
AuthorDate: Tue Jan 7 13:25:15 2025 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Jan 7 13:25:15 2025 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 00bbe2a984f64dd23c44ccc63d74021b99d4e0d4
  - Fix XML tag position

Change-Id: Iab81f4d3cd86848412c53639cce5c84fc73a646d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/179880
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/helpcontent2 b/helpcontent2
index 072df4685038..00bbe2a984f6 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 072df4685038ef66c35df633e7966529e63032d1
+Subproject commit 00bbe2a984f64dd23c44ccc63d74021b99d4e0d4


help.git: source/text

2025-01-07 Thread Olivier Hallot (via logerrit)
 source/text/scalc/00/0412.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 00bbe2a984f64dd23c44ccc63d74021b99d4e0d4
Author: Olivier Hallot 
AuthorDate: Tue Jan 7 13:09:38 2025 +0100
Commit: Olivier Hallot 
CommitDate: Tue Jan 7 13:25:15 2025 +0100

Fix XML tag position

Change-Id: Iab81f4d3cd86848412c53639cce5c84fc73a646d
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/179880
Tested-by: Jenkins
Reviewed-by: Olivier Hallot 

diff --git a/source/text/scalc/00/0412.xhp 
b/source/text/scalc/00/0412.xhp
index 2a4462659a..e98b90efca 100644
--- a/source/text/scalc/00/0412.xhp
+++ b/source/text/scalc/00/0412.xhp
@@ -572,7 +572,7 @@
 
 With cursor 
placed in a pivot table:
 
-Choose Data - 
Group and Outline - Group.
+Choose Data - 
Group and Outline - Group.
 
 Choose 
Data - Group
 On the 
Data menu of the Data tab, choose 
Group 


core.git: vcl/inc

2025-01-07 Thread Patrick Luby (via logerrit)
 vcl/inc/skia/gdiimpl.hxx |9 +++--
 vcl/inc/skia/utils.hxx   |   24 ++--
 2 files changed, 29 insertions(+), 4 deletions(-)

New commits:
commit 7ef881c76e656ece71cf6d1d472757edf5c1ff44
Author: Patrick Luby 
AuthorDate: Mon Jan 6 19:58:14 2025 -0500
Commit: Patrick Luby 
CommitDate: Tue Jan 7 13:29:43 2025 +0100

tdf#161480 use BmpScaleFlag::NearestNeighbor when upscaling on macOS

On macOS, due to Retina window scaling, it is very common to
have Skia surfaces that are 2 times the size of their respective
output device sizes so upscaling is often the default state.

But when upscaling bitmaps on macOS with either Skia/Metal or
Skia/Raster, some distortion to color and/or alpha values is
introduced and only BmpScaleFlag::NearestNeighbor will upscale
the bitmap correctly.

Change-Id: I9cf02d3acace82751fa6e114aaecf23cbbb85c65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179848
Tested-by: Jenkins
Reviewed-by: Patrick Luby 

diff --git a/vcl/inc/skia/gdiimpl.hxx b/vcl/inc/skia/gdiimpl.hxx
index c261e4af97c1..9ed245e7c696 100644
--- a/vcl/inc/skia/gdiimpl.hxx
+++ b/vcl/inc/skia/gdiimpl.hxx
@@ -292,7 +292,10 @@ protected:
 void performDrawPolyPolygon(const basegfx::B2DPolyPolygon& polygon, double 
transparency,
 bool useAA);
 
-BmpScaleFlag goodScalingQuality() const { return 
SkiaHelper::goodScalingQuality(isGPU()); }
+BmpScaleFlag goodScalingQuality(bool isUpscale = false) const
+{
+return SkiaHelper::goodScalingQuality(isGPU(), isUpscale);
+}
 SkSamplingOptions makeSamplingOptions(const SalTwoRect& rPosAry, int 
scalingFactor,
   int srcScalingFactor = 1)
 {
@@ -300,7 +303,9 @@ protected:
 }
 SkSamplingOptions makeSamplingOptions(const SkMatrix& matrix, int 
scalingFactor)
 {
-return SkiaHelper::makeSamplingOptions(goodScalingQuality(), matrix, 
scalingFactor);
+bool isUpscale = (matrix.getScaleX() > 1.0 || matrix.getScaleY() > 
1.0);
+return SkiaHelper::makeSamplingOptions(goodScalingQuality(isUpscale), 
matrix,
+   scalingFactor);
 }
 
 // Create SkPaint to use when drawing to the surface. It is not to be used
diff --git a/vcl/inc/skia/utils.hxx b/vcl/inc/skia/utils.hxx
index 37aedfb2165a..08d3ad4da44e 100644
--- a/vcl/inc/skia/utils.hxx
+++ b/vcl/inc/skia/utils.hxx
@@ -159,8 +159,23 @@ inline bool isUnitTestRunning(const char* name = nullptr)
 // In that case use only BmpScaleFlag::Default, which is bilinear+mipmap,
 // which should be good enough (and that's what the "super" bitmap scaling
 // algorithm done by VCL does as well).
-inline BmpScaleFlag goodScalingQuality(bool isGPU)
+inline BmpScaleFlag goodScalingQuality(bool isGPU, bool isUpscale = false)
 {
+#ifdef MACOSX
+// tdf#161480 use BmpScaleFlag::NearestNeighbor when upscaling on macOS
+// On macOS, due to Retina window scaling, it is very common to
+// have Skia surfaces that are 2 times the size of their respective
+// output device sizes so upscaling is often the default state.
+// But when upscaling bitmaps on macOS with either Skia/Metal or
+// Skia/Raster, some distortion to color and/or alpha values is
+// introduced and only BmpScaleFlag::NearestNeighbor will upscale
+// the bitmap correctly.
+if (isUpscale)
+return BmpScaleFlag::NearestNeighbor;
+#else
+(void)isUpscale;
+#endif
+
 return isGPU ? BmpScaleFlag::BestQuality : BmpScaleFlag::Default;
 }
 
@@ -235,7 +250,12 @@ inline SkSamplingOptions makeSamplingOptions(const 
SalTwoRect& rPosAry, int scal
 if (srcScalingFactor != 1)
 srcSize *= srcScalingFactor;
 if (srcSize != destSize)
-return makeSamplingOptions(goodScalingQuality(isGPU), srcSize, 
destSize, 1);
+{
+bool isUpscale
+= (srcSize.Width() < destSize.Width() || srcSize.Height() < 
destSize.Height());
+BmpScaleFlag scalingType = goodScalingQuality(isGPU, isUpscale);
+return makeSamplingOptions(scalingType, srcSize, destSize, 1);
+}
 return SkSamplingOptions(); // none
 }
 


core.git: cui/inc cui/source cui/uiconfig

2025-01-07 Thread Sahil Gautam (via logerrit)
 cui/inc/strings.hrc   |3 -
 cui/source/options/appearance.cxx |   19 --
 cui/source/options/appearance.hxx |1 
 cui/uiconfig/ui/appearance.ui |  108 --
 4 files changed, 48 insertions(+), 83 deletions(-)

New commits:
commit c007449ec38f49e18ed7d6b8f9ef74c5bd5c015a
Author: Sahil Gautam 
AuthorDate: Fri Dec 27 02:07:00 2024 +0530
Commit: Sahil Gautam 
CommitDate: Tue Jan 7 14:15:02 2025 +0100

tdf#164393 Change themes UI as per UX feedback

- inlined the controls for color/image with the labels. also inlined
  the image stretched/tiled radio buttons.

- There were plans to change the default theme's name from
  "Automatic" to "Default", but due to string freeze for 25-2,
  moved that to a separate patch which won't be backported to 25-2.

Change-Id: I8470dbf1c42d1b402d17f0feeec12d190e879ca6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179405
Reviewed-by: Sahil Gautam 
Tested-by: Jenkins

diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index e200921a7ac3..9d1687b72596 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -448,9 +448,6 @@
 #define BMP_TIGER   NC_("BMP_TIGER", "Tiger")
 #define BMP_ZEBRA   NC_("BMP_ZEBRA", "Zebra")
 
-#define LIGHT_COLOR_LBL NC_("LIGHT_COLOR_LBL", 
"Light")
-#define DARK_COLOR_LBL  NC_("DARK_COLOR_LBL", 
"Dark")
-
 // Translated Registry Entries
 #define REG_DOCCOLORNC_("REG_DOCCOLOR", "Document 
background")
 #define REG_DOCBOUNDARIES   NC_("REG_DOCBOUNDARIES", "Document 
boundaries")
diff --git a/cui/source/options/appearance.cxx 
b/cui/source/options/appearance.cxx
index f36c6255809e..46c80fd61bbe 100644
--- a/cui/source/options/appearance.cxx
+++ b/cui/source/options/appearance.cxx
@@ -103,7 +103,6 @@ SvxAppearanceTabPage::SvxAppearanceTabPage(weld::Container* 
pPage,
 , m_xColorEntryBtn(m_xBuilder->weld_combo_box(u"registrydropdown"_ustr))
 , m_xColorChangeBtn((new 
ColorListBox(m_xBuilder->weld_menu_button(u"colorsdropdownbtn"_ustr),
   [this] { return GetFrameWeld(); })))
-, m_xColorLbl(m_xBuilder->weld_label(u"colorlbl"_ustr))
 , 
m_xShowInDocumentChkBtn(m_xBuilder->weld_check_button(u"showindocumentchkbtn"_ustr))
 , m_xColorRadioBtn(m_xBuilder->weld_radio_button(u"colorradiobtn"_ustr))
 , m_xImageRadioBtn(m_xBuilder->weld_radio_button(u"imageradiobtn"_ustr))
@@ -541,24 +540,6 @@ void SvxAppearanceTabPage::EnableImageControls(bool 
bEnabled)
 
 void SvxAppearanceTabPage::UpdateColorDropdown()
 {
-switch (eCurrentAppearanceMode)
-{
-case Appearance::LIGHT:
-m_xColorLbl->set_label(CuiResId(LIGHT_COLOR_LBL));
-break;
-case Appearance::DARK:
-m_xColorLbl->set_label(CuiResId(DARK_COLOR_LBL));
-break;
-case Appearance::SYSTEM:
-{
-if (IsDarkModeEnabled())
-m_xColorLbl->set_label(CuiResId(DARK_COLOR_LBL));
-else
-m_xColorLbl->set_label(CuiResId(LIGHT_COLOR_LBL));
-}
-break;
-}
-
 // update color to light/dark
 ColorConfigEntry nEntry = GetActiveEntry();
 if (nEntry == ColorConfigEntryCount)
diff --git a/cui/source/options/appearance.hxx 
b/cui/source/options/appearance.hxx
index b6c78c69cf0b..5dc915a5f49e 100644
--- a/cui/source/options/appearance.hxx
+++ b/cui/source/options/appearance.hxx
@@ -53,7 +53,6 @@ private:
 std::unique_ptr m_xAppearanceDark;
 std::unique_ptr m_xColorEntryBtn;
 std::unique_ptr m_xColorChangeBtn;
-std::unique_ptr m_xColorLbl;
 std::unique_ptr m_xShowInDocumentChkBtn;
 
 std::unique_ptr m_xColorRadioBtn;
diff --git a/cui/uiconfig/ui/appearance.ui b/cui/uiconfig/ui/appearance.ui
index fb47f7663724..453675fa82c4 100644
--- a/cui/uiconfig/ui/appearance.ui
+++ b/cui/uiconfig/ui/appearance.ui
@@ -257,7 +257,7 @@
 vertical
 3
 
-  
+  
   
 True
 False
@@ -310,21 +310,6 @@
 1
   
 
-
-  
-True
-False
-start
-18
-colorlbl
-True
-colorsdropdownbtn
-  
-  
-0
-2
-  
-
 
   
 
@@ -339,7 +324,7 @@
 

core.git: Branch 'libreoffice-24-8' - vcl/qa

2025-01-07 Thread Caolán McNamara (via logerrit)
 vcl/qa/unx/generic/generic.cxx |   32 
 1 file changed, 20 insertions(+), 12 deletions(-)

New commits:
commit bc88302e1bdb9cfc103e72f93f4aaa98512ea141
Author: Caolán McNamara 
AuthorDate: Sun Jul 28 16:17:04 2024 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 15:22:29 2025 +0100

Related: tdf#162072 compare fallback to what "serif" resolves to

instead of assuming that the resolved serif font will have
serif in its name.

Change-Id: I3f85e2a8abd1dbf851debec9196e55d5c2da4e66
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171144
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit d01dcab81a6a66fd5b4448ccff348f69c82c538d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179887
Reviewed-by: Michael Stahl 

diff --git a/vcl/qa/unx/generic/generic.cxx b/vcl/qa/unx/generic/generic.cxx
index 8b79d99e510a..22176c28633c 100644
--- a/vcl/qa/unx/generic/generic.cxx
+++ b/vcl/qa/unx/generic/generic.cxx
@@ -30,32 +30,40 @@ public:
 : UnoApiTest(u"/vcl/qa/unx/generic/data/"_ustr)
 {
 }
+static OUString GetFallbackFont(const vcl::Font& rFont)
+{
+Size aSize(0, 3840);
+float fExactHeight = 3840;
+bool bNonAntialias = false;
+vcl::font::FontSelectPattern aPattern(rFont, rFont.GetFamilyName(), 
aSize, fExactHeight,
+  bNonAntialias);
+aPattern.maTargetName = rFont.GetFamilyName();
+psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
+OUString aMissingCodes;
+
+rMgr.Substitute(aPattern, aMissingCodes);
+
+return aPattern.maSearchName;
+}
 };
 
 CPPUNIT_TEST_FIXTURE(Test, testFontFallbackSerif)
 {
+OUString sResolvedSerif = GetFallbackFont(vcl::Font("serif", Size(12, 
12)));
+
 // Given a font select pattern with a font name we don't bundle and with a 
serif family:
 vcl::Font aFont;
 aFont.SetFamilyName("IBM Plex Serif");
 aFont.SetFamily(FAMILY_ROMAN);
-Size aSize(0, 3840);
-float fExactHeight = 3840;
-bool bNonAntialias = false;
-vcl::font::FontSelectPattern aPattern(aFont, aFont.GetFamilyName(), aSize, 
fExactHeight,
-  bNonAntialias);
-aPattern.maTargetName = aFont.GetFamilyName();
-psp::PrintFontManager& rMgr = psp::PrintFontManager::get();
-OUString aMissingCodes;
-
-// When substituting that font:
-rMgr.Substitute(aPattern, aMissingCodes);
+
+OUString sPlexFallback = GetFallbackFont(aFont);
 
 // Then make sure we get a serif fallback:
 // Without the accompanying fix in place, this test would have failed with:
 // - Expected: Noto Serif (or DejaVu Serif)
 // - Actual  : Noto Kufi Arabic
 // i.e. we got a sans fallback for a serif pattern, which is clearly poor.
-CPPUNIT_ASSERT(aPattern.maSearchName.endsWith(u"Serif"));
+CPPUNIT_ASSERT_EQUAL(sResolvedSerif, sPlexFallback);
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testFontFallbackCaching)


Re: Interdependent, failing commits

2025-01-07 Thread Noel Grandin
Should be fixed once https://gerrit.libreoffice.org/c/core/+/179890 goes in

On Tue, 7 Jan 2025 at 01:04, Bjoern Michaelsen <
bjoern.michaelsen-...@libreoffice.org> wrote:

> Hi Stephan,
>
> ok from my site. While I am still working on a fix, it was unfortunately
> not as trivial as I thought and I currently do not find the time to
> commit to fix this by tomorrow.
>
> Best,
>
> Bjoern
>
> On 1/6/25 22:27, Stephan Bergmann wrote:
> > The two recent commits  > d8e29e2697e90da6acf5858fd74d6054ed9e5aa3%5E%21> "Revert 'Revert
> > 'stronger typing for SwClient::GetRegisteredIn'' and fix SwIterator
> > cast" and  > +/404fbec25740406e3b926844f3bd0f324dc38b8c%5E%21> "convert
> > RES_ATTRSET_CHG to SfxHint" are both known-broken and cause at least
> > UBSan builds to fail (see the comments at  > gerrit.libreoffice.org/c/core/
> > +/179480/3#message-1d186afad4accdcf814507953175bf0e483b0e2e> and
> >  > e7324ab2f8feb8f37c28a4f8845176d82f658648>, respectively).
> >
> > Now, a third commit  > +/404fbec25740406e3b926844f3bd0f324dc38b8c%5E%21> "convert
> > RES_ATTRSET_CHG to SfxHint" interferes with (local) reverts of the other
> > two commits, so it becomes increasingly messy to try and keep a
> > successful (local) UBsan build, and keep an eye on further commits that
> > could potentially introduce further/unrelated breakage.
> >
> > Therefore, unless there are fixes for the two known-broken commits
> > available by then, I suggest to revert for now all three of those
> > commits tomorrow evening.
>
>


core.git: sc/source

2025-01-07 Thread Henry Castro (via logerrit)
 sc/source/ui/view/output.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c0392315ba3691f55ddbcf205544c21f019a9b6a
Author: Henry Castro 
AuthorDate: Mon Dec 30 06:19:24 2024 -0400
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 17:19:14 2025 +0100

tdf#164130: ensure valid column and row values

Sometimes the range mark has not valid col/row values.

Signed-off-by: Henry Castro 
Change-Id: I29cf70c8c2a4e832f1ee65abac0ff55e49295fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179563
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index ddf3dd5e0b78..417aa596b724 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2091,7 +2091,8 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW 
nRefStartY,
 
 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
 mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
-else if (mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
+else if (mpDoc->ValidCol(nRefEndX) && mpDoc->ValidRow(nRefEndY) &&
+ mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
 mpDoc->ExtendMerge(nRefEndX, nRefEndY, nRefEndX, nRefEndY, nTab);
 
 if ( !(nRefStartX <= nVisX2 && nRefEndX >= nVisX1 &&


core.git: Branch 'libreoffice-25-2' - translations

2025-01-07 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 02967c638b1e8f1ef04953675cbe130ba2a1ba0d
Author: Christian Lohmaier 
AuthorDate: Tue Jan 7 16:32:25 2025 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Jan 7 16:32:25 2025 +0100

Update git submodules

* Update translations from branch 'libreoffice-25-2'
  to 241c25e23ec493f6d92a9b7eec081cde61bd16a6
  - update translations for 25-2

and force-fix errors using pocheck

Change-Id: Ic6ed3513f8ec2b9d1847c0ea3c2bc8a1817c9a50

diff --git a/translations b/translations
index 77b6ad601c21..241c25e23ec4 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 77b6ad601c215497e22f8e93e9e26297dd396284
+Subproject commit 241c25e23ec493f6d92a9b7eec081cde61bd16a6


core.git: xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk xmlsecurity/qa

2025-01-07 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk |9 +++
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 -
 xmlsecurity/qa/unit/signing/signing.cxx   |2 -
 xmlsecurity/qa/unit/signing/signing2.cxx  |7 -
 xmlsecurity/qa/xmlsec/xmlsec.cxx  |   32 +-
 5 files changed, 42 insertions(+), 10 deletions(-)

New commits:
commit f0efcb917049547ad0496c004830ff0153602071
Author: Michael Stahl 
AuthorDate: Tue Jan 7 15:22:22 2025 +0100
Commit: Michael Stahl 
CommitDate: Tue Jan 7 16:40:07 2025 +0100

xmlsecurity: fix CppunitTest_xmlsecurity_xmlsec with F41 system NSS

xmlsecurity/qa/xmlsec/xmlsec.cxx:102:(anonymous 
namespace)::testInsertPrivateKey::TestBody
equality assertion failed
- Expected: 1
- Actual  : 0

Just copying the NSS setup code from the other tests lets the test pass.

Also sync all the copies of the setup code while at it.

Change-Id: Idcaebec4dff29f37e0ed0f05d6d7d62782947325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179893
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk
index 526bb85d8a1d..53691195e997 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk
@@ -15,6 +15,15 @@ $(eval $(call 
gb_CppunitTest_use_externals,xmlsecurity_xmlsec,\
 boost_headers \
 ))
 
+ifneq ($(OS),WNT)
+ifneq (,$(ENABLE_NSS))
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_xmlsec,\
+nssutil3 \
+nss3 \
+))
+endif
+endif
+
 $(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_xmlsec, \
 xmlsecurity/qa/xmlsec/xmlsec \
 ))
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 5762bae5415d..97d8163b143d 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -79,7 +79,7 @@ void PDFSigningTest::setUp()
 uno::Reference xSecurityContext
 = xSEInitializer->createSecurityContext(OUString());
 #if USE_CRYPTO_NSS
-#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+#ifdef NSS_USE_ALG_IN_SIGNATURE
 // policy may disallow using SHA1 for signatures but unit test documents
 // have such existing signatures (call this after createSecurityContext!)
 NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0);
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index e6c20316face..00a835119642 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -102,7 +102,7 @@ void SigningTest::setUp()
 mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext);
 mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
 #if USE_CRYPTO_NSS
-#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+#ifdef NSS_USE_ALG_IN_SIGNATURE
 // policy may disallow using SHA1 for signatures but unit test documents
 // have such existing signatures (call this after createSecurityContext!)
 NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0);
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx 
b/xmlsecurity/qa/unit/signing/signing2.cxx
index 1854c9e013a0..5eb4ce76e55f 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -13,6 +13,7 @@
 
 #if USE_CRYPTO_NSS
 #include 
+#include 
 #endif
 
 #include 
@@ -62,10 +63,12 @@ void SigningTest2::setUp()
 mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext);
 mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
 #if USE_CRYPTO_NSS
-#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+#ifdef NSS_USE_ALG_IN_SIGNATURE
 // policy may disallow using SHA1 for signatures but unit test documents
 // have such existing signatures (call this after createSecurityContext!)
-NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0);
+NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0);
+// the minimum is 2048 in Fedora 40
+NSS_OptionSet(NSS_RSA_MIN_KEY_SIZE, 1024);
 #endif
 #endif
 }
diff --git a/xmlsecurity/qa/xmlsec/xmlsec.cxx b/xmlsecurity/qa/xmlsec/xmlsec.cxx
index cc24b7e4db58..a455aecf2aeb 100644
--- a/xmlsecurity/qa/xmlsec/xmlsec.cxx
+++ b/xmlsecurity/qa/xmlsec/xmlsec.cxx
@@ -7,6 +7,13 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#if USE_CRYPTO_NSS
+#include 
+#include 
+#endif
+
 #include 
 
 #include 
@@ -25,6 +32,10 @@ namespace
 /// Covers xmlsecurity/source/xmlsec/ fixes.
 class Test : public UnoApiTest
 {
+protected:
+uno::Reference mxSEInitializer;
+uno::Reference mxSecurityContext;
+
 public:
 Test()
 : UnoApiTest("/xmlsecurity/qa/xmlsec/data/")
@@ -35,6 +46,19 @@ public:
 {
 UnoApiTest::setUp();
 MacrosTest::setUpX509(

core.git: i18nutil/qa i18nutil/source

2025-01-07 Thread Jonathan Clark (via logerrit)
 i18nutil/qa/cppunit/test_scriptchangescanner.cxx |   23 +++
 i18nutil/source/utility/scriptchangescanner.cxx  |  154 ---
 2 files changed, 104 insertions(+), 73 deletions(-)

New commits:
commit 1afdda6bca508abe56edf7968677e689b5ee07d4
Author: Jonathan Clark 
AuthorDate: Tue Jan 7 05:52:27 2025 -0700
Commit: Jonathan Clark 
CommitDate: Tue Jan 7 16:44:06 2025 +0100

tdf#164493 Update script change algorithm to always make progress

Fixes ofz#385256118 Timeout on ImpEditEngine::InitScriptTypes.

Previously, the script assignment algorithm could backtrack in certain
cases where a script run ends with weak characters that should be
included in the following run. Fuzz testing unearthed a case involving
right-to-left override and a CJK combining mark, which caused the
algorithm to make no progress and hang.

The algorithm now always makes progress on each iteration.

Change-Id: I4da138c51d391c152afcee2428c21dc762a2dafc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179888
Tested-by: Jenkins
Reviewed-by: Jonathan Clark 

diff --git a/i18nutil/qa/cppunit/test_scriptchangescanner.cxx 
b/i18nutil/qa/cppunit/test_scriptchangescanner.cxx
index 1b033d94218a..ea8f6c9e1518 100644
--- a/i18nutil/qa/cppunit/test_scriptchangescanner.cxx
+++ b/i18nutil/qa/cppunit/test_scriptchangescanner.cxx
@@ -39,6 +39,7 @@ public:
 void testRtlRunEmbeddedLtrStrong();
 void testRtlRunEmbeddedLtrWeakComplex();
 void testRtlRunOverrideCJKAsian();
+void testTdf164493InfiniteLoop();
 
 CPPUNIT_TEST_SUITE(ScriptChangeScannerTest);
 CPPUNIT_TEST(testEmpty);
@@ -57,6 +58,7 @@ public:
 CPPUNIT_TEST(testRtlRunEmbeddedLtrStrong);
 CPPUNIT_TEST(testRtlRunEmbeddedLtrWeakComplex);
 CPPUNIT_TEST(testRtlRunOverrideCJKAsian);
+CPPUNIT_TEST(testTdf164493InfiniteLoop);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -592,6 +594,27 @@ void ScriptChangeScannerTest::testRtlRunOverrideCJKAsian()
 CPPUNIT_ASSERT(pScanner->AtEnd());
 }
 
+void ScriptChangeScannerTest::testTdf164493InfiniteLoop()
+{
+// tdf#164493: Tests a case causing an infinite loop due to interaction
+// between right-to-left override and a CJK combining mark.
+
+// U+202E: RIGHT-TO-LEFT OVERRIDE
+// U+302E: HANGUL SINGLE DOT TONE MARK
+auto aText = u"\u202e\u302e"_ustr;
+auto pDirScanner = MakeDirectionChangeScanner(aText, 0);
+auto pScanner = MakeScriptChangeScanner(aText, 
css::i18n::ScriptType::LATIN, *pDirScanner);
+
+CPPUNIT_ASSERT(!pScanner->AtEnd());
+CPPUNIT_ASSERT_EQUAL(css::i18n::ScriptType::ASIAN, 
pScanner->Peek().m_nScriptType);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(0), pScanner->Peek().m_nStartIndex);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), pScanner->Peek().m_nEndIndex);
+
+pScanner->Advance();
+
+CPPUNIT_ASSERT(pScanner->AtEnd());
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(ScriptChangeScannerTest);
 }
 
diff --git a/i18nutil/source/utility/scriptchangescanner.cxx 
b/i18nutil/source/utility/scriptchangescanner.cxx
index 456af39bb495..a3e27bdaf155 100644
--- a/i18nutil/source/utility/scriptchangescanner.cxx
+++ b/i18nutil/source/utility/scriptchangescanner.cxx
@@ -132,84 +132,28 @@ private:
 ScriptChange m_stCurr;
 DirectionChangeScanner* m_pDirScanner;
 const OUString& m_rText;
-sal_Int16 m_nPrevScript = css::i18n::ScriptType::WEAK;
 sal_Int32 m_nIndex = 0;
+sal_Int32 m_nNextStart = 0;
+sal_Int16 m_nPrevScript = css::i18n::ScriptType::WEAK;
 bool m_bAtEnd = false;
 bool m_bApplyAsianToWeakQuotes = false;
 
-public:
-GreedyScriptChangeScanner(const OUString& rText, sal_Int16 
nDefaultScriptType,
-  DirectionChangeScanner* pDirScanner)
-: m_pDirScanner(pDirScanner)
-, m_rText(rText)
+void AdvanceOnce()
 {
-// tdf#66791: For compatibility with other programs, the Asian script 
is
-// applied to any weak-script quote characters if the enclosing 
paragraph
-// contains Chinese- or Japanese-script characters.
-// In the original Writer algorithm, the application language is used 
for
-// all leading weak characters (#94331#). This implementation deviates 
by
-// instead using the first-seen non-weak script.
-sal_Int32 nCjBase = 0;
-while (nCjBase < m_rText.getLength())
-{
-auto nChar = m_rText.iterateCodePoints(&nCjBase);
-auto nScript = GetScriptClass(nChar);
-if (m_nPrevScript == css::i18n::ScriptType::WEAK)
-{
-m_nPrevScript = nScript;
-}
+m_stCurr
+= ScriptChange{ /*start*/ m_nNextStart, /*end*/ m_nNextStart, 
/*type*/ m_nPrevScript };
 
-if (nScript == css::i18n::ScriptType::COMPLEX)
-{
-m_bApplyAsianToWeakQuotes = false;
-break;
-}
-
-auto nUnicodeScript = u_getIntPropertyVal

core.git: Branch 'distro/collabora/co-24.04' - sw/source

2025-01-07 Thread Szymon Kłos (via logerrit)
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 8c5945b9590cd120b2b5ac275ddb55dda94a4d0e
Author: Szymon Kłos 
AuthorDate: Mon Nov 25 15:15:36 2024 +0100
Commit: Aron Budea 
CommitDate: Tue Jan 7 14:06:09 2025 +0100

tdf#86731 bNoDictionaryAvailable should trigger meesagebox

Reverts "PVS: V547 Expression 'bNoDictionaryAvailable' is always false"
This reverts commit 816b51c7a9cdd72eaa01f3c074ba5a8446917d19.

It removed the message completely from the code while, we should
fix it rather by using correct condition.

It was somehow too aggresively limited in commit 
f200dd5cb84681558700c49de0969907f78f8db1
tdf#86731 Don't show 'start from beginning' when dictionary is missing

Change-Id: I5f4b859047216399a09c7aefb8a47244c4833df5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177271
(cherry picked from commit 16bce5bb1cb4e446f45633b128f6ab02a48b6840)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177309
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Aron Budea 

diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx 
b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 869a0fba0025..bdb3608523bf 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -400,7 +400,7 @@ The code below would only be part of the solution.
 bCloseMessage = false; // no closing message if a wrap 
around has been denied
 }
 }
-if( aRet.empty() && bCloseMessage && !bNoDictionaryAvailable )
+if( aRet.empty() && bCloseMessage )
 {
 LockFocusNotification( true );
 OUString sInfo( SwResId( bNoDictionaryAvailable ? 
STR_DICTIONARY_UNAVAILABLE : STR_SPELLING_COMPLETED ) );


core.git: Branch 'libreoffice-25-2' - xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk xmlsecurity/qa

2025-01-07 Thread Michael Stahl (via logerrit)
 xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk |9 +++
 xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx |2 -
 xmlsecurity/qa/unit/signing/signing.cxx   |2 -
 xmlsecurity/qa/unit/signing/signing2.cxx  |7 -
 xmlsecurity/qa/xmlsec/xmlsec.cxx  |   32 +-
 5 files changed, 42 insertions(+), 10 deletions(-)

New commits:
commit 39077d4b62f69121c469bf50065a1cffabe7fd10
Author: Michael Stahl 
AuthorDate: Tue Jan 7 15:22:22 2025 +0100
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 17:49:50 2025 +0100

xmlsecurity: fix CppunitTest_xmlsecurity_xmlsec with F41 system NSS

xmlsecurity/qa/xmlsec/xmlsec.cxx:102:(anonymous 
namespace)::testInsertPrivateKey::TestBody
equality assertion failed
- Expected: 1
- Actual  : 0

Just copying the NSS setup code from the other tests lets the test pass.

Also sync all the copies of the setup code while at it.

Change-Id: Idcaebec4dff29f37e0ed0f05d6d7d62782947325
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179893
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit f0efcb917049547ad0496c004830ff0153602071)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179895
Reviewed-by: Caolán McNamara 

diff --git a/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk 
b/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk
index 526bb85d8a1d..53691195e997 100644
--- a/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk
+++ b/xmlsecurity/CppunitTest_xmlsecurity_xmlsec.mk
@@ -15,6 +15,15 @@ $(eval $(call 
gb_CppunitTest_use_externals,xmlsecurity_xmlsec,\
 boost_headers \
 ))
 
+ifneq ($(OS),WNT)
+ifneq (,$(ENABLE_NSS))
+$(eval $(call gb_CppunitTest_use_externals,xmlsecurity_xmlsec,\
+nssutil3 \
+nss3 \
+))
+endif
+endif
+
 $(eval $(call gb_CppunitTest_add_exception_objects,xmlsecurity_xmlsec, \
 xmlsecurity/qa/xmlsec/xmlsec \
 ))
diff --git a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx 
b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
index 5762bae5415d..97d8163b143d 100644
--- a/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
+++ b/xmlsecurity/qa/unit/pdfsigning/pdfsigning.cxx
@@ -79,7 +79,7 @@ void PDFSigningTest::setUp()
 uno::Reference xSecurityContext
 = xSEInitializer->createSecurityContext(OUString());
 #if USE_CRYPTO_NSS
-#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+#ifdef NSS_USE_ALG_IN_SIGNATURE
 // policy may disallow using SHA1 for signatures but unit test documents
 // have such existing signatures (call this after createSecurityContext!)
 NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0);
diff --git a/xmlsecurity/qa/unit/signing/signing.cxx 
b/xmlsecurity/qa/unit/signing/signing.cxx
index e6c20316face..00a835119642 100644
--- a/xmlsecurity/qa/unit/signing/signing.cxx
+++ b/xmlsecurity/qa/unit/signing/signing.cxx
@@ -102,7 +102,7 @@ void SigningTest::setUp()
 mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext);
 mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
 #if USE_CRYPTO_NSS
-#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+#ifdef NSS_USE_ALG_IN_SIGNATURE
 // policy may disallow using SHA1 for signatures but unit test documents
 // have such existing signatures (call this after createSecurityContext!)
 NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0);
diff --git a/xmlsecurity/qa/unit/signing/signing2.cxx 
b/xmlsecurity/qa/unit/signing/signing2.cxx
index 1854c9e013a0..5eb4ce76e55f 100644
--- a/xmlsecurity/qa/unit/signing/signing2.cxx
+++ b/xmlsecurity/qa/unit/signing/signing2.cxx
@@ -13,6 +13,7 @@
 
 #if USE_CRYPTO_NSS
 #include 
+#include 
 #endif
 
 #include 
@@ -62,10 +63,12 @@ void SigningTest2::setUp()
 mxSEInitializer = xml::crypto::SEInitializer::create(m_xContext);
 mxSecurityContext = mxSEInitializer->createSecurityContext(OUString());
 #if USE_CRYPTO_NSS
-#ifdef NSS_USE_ALG_IN_ANY_SIGNATURE
+#ifdef NSS_USE_ALG_IN_SIGNATURE
 // policy may disallow using SHA1 for signatures but unit test documents
 // have such existing signatures (call this after createSecurityContext!)
-NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_ANY_SIGNATURE, 0);
+NSS_SetAlgorithmPolicy(SEC_OID_SHA1, NSS_USE_ALG_IN_SIGNATURE, 0);
+// the minimum is 2048 in Fedora 40
+NSS_OptionSet(NSS_RSA_MIN_KEY_SIZE, 1024);
 #endif
 #endif
 }
diff --git a/xmlsecurity/qa/xmlsec/xmlsec.cxx b/xmlsecurity/qa/xmlsec/xmlsec.cxx
index cc24b7e4db58..a455aecf2aeb 100644
--- a/xmlsecurity/qa/xmlsec/xmlsec.cxx
+++ b/xmlsecurity/qa/xmlsec/xmlsec.cxx
@@ -7,6 +7,13 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
+#if USE_CRYPTO_NSS
+#include 
+#include 
+#endif
+
 #include 
 
 #include 
@@ -25,6 +32,10 @@ namespace
 /// Covers xmlsecurity/source/xmlsec/ fixes.
 class Test : public UnoApiTest
 {
+protected:
+uno::Reference mxSEInitializer;
+uno::Reference mxSecurityContext;

core.git: translations

2025-01-07 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 98d5b8783246aaf9b2bdf92cf69667685c21aa79
Author: Christian Lohmaier 
AuthorDate: Tue Jan 7 15:07:20 2025 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Jan 7 15:07:20 2025 +0100

Update git submodules

* Update translations from branch 'master'
  to c0a323a8e6bf862e47a6f93909ddef6aaaef35dc
  - update translations for master

and force-fix errors using pocheck

Change-Id: I5f9bfb155d155c02685c11c39083e5d13d57c9f2

diff --git a/translations b/translations
index 85cefda4f491..c0a323a8e6bf 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 85cefda4f49164a075a4b03568a281caaa6f9710
+Subproject commit c0a323a8e6bf862e47a6f93909ddef6aaaef35dc


core.git: Branch 'distro/collabora/co-24.04' - sw/source

2025-01-07 Thread Pranam Lashkari (via logerrit)
 sw/source/uibase/docvw/PostItMgr.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 0b3e73526496875735eeb657929d94897a840b02
Author: Pranam Lashkari 
AuthorDate: Tue Dec 24 11:59:39 2024 +0530
Commit: Szymon Kłos 
CommitDate: Tue Jan 7 15:08:15 2025 +0100

lok: send username of the person who removed comments

This can be userful to know when a user is editing comment
and another user deletes it.
It will help to identify and inform about
the conflict to relevent users only

Change-Id: I81f5edc8f6cbb85ad00e03b5bf668b68eeae1ad8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179298
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 21a498e8dd56..b46015e077d0 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -181,6 +181,12 @@ namespace {
 aAnnotation.put("textRange", sRects.getStr());
 aAnnotation.put("layoutStatus", pItem->mLayoutStatus);
 }
+if (nType == CommentNotificationType::Remove && 
comphelper::LibreOfficeKit::isActive())
+{
+// Redline author is basically the author which has made the 
modification rather than author of the comments
+// This is important to know who removed the comment
+aAnnotation.put("author", 
SW_MOD()->GetRedlineAuthor(SW_MOD()->GetRedlineAuthor()));
+}
 
 boost::property_tree::ptree aTree;
 aTree.add_child("comment", aAnnotation);


Re: test failure due to xmlsec

2025-01-07 Thread Caolán McNamara
On Wed, 2024-12-18 at 17:26 +, Mattia Verga wrote:
> I've been trying to build LO 25.2.0.0.beta1 on Fedora Rawhide and saw
> a 
> new test failure in
> 
> /builddir/build/BUILD/libreoffice-25.2.0.0-build/libreoffice-
> 25.2.0.0.beta1/xmlsecurity/qa/xmlsec/xmlsec.cxx:100:(anonymous 
> namespace)::testInsertPrivateKey::TestBody
> equality assertion failed
> - Expected: 1
> - Actual  : 0

mstahl had a recent patch that references the same failure as this,
"fix CppunitTest_xmlsecurity_xmlsec with F41 system NSS"
https://gerrit.libreoffice.org/c/core/+/179895
so I imagine this was the same issue.


core.git: 2 commits - sw/Library_swqahelper.mk sw/qa vcl/inc vcl/qt5

2025-01-07 Thread Stephan Bergmann (via logerrit)
 sw/Library_swqahelper.mk|1 
 sw/qa/extras/tiledrendering/tiledrendering.cxx  |   88 ++--
 sw/qa/extras/tiledrendering/tiledrendering2.cxx |   12 
 sw/qa/extras/tiledrendering/tiledrenderingmodeltestbase.cxx |  221 
 sw/qa/inc/swtestviewcallback.hxx|   70 +++
 sw/qa/unit/swtestviewcallback.cxx   |  205 +++
 vcl/inc/qt5/QtClipboard.hxx |2 
 vcl/qt5/QtClipboard.cxx |   50 ++
 8 files changed, 369 insertions(+), 280 deletions(-)

New commits:
commit 5a4ca3ce934ca3f34669bc66b8941544aef1bc89
Author: Stephan Bergmann 
AuthorDate: Tue Jan 7 16:21:05 2025 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Jan 7 17:56:12 2025 +0100

Rudimentary Emscripten copy -> paste support

...with two hacks, so that at least copying text from LO and pasting it back
into LO works (instead of the copying step either hitting the

> assert(pTrans);

in QtClipboard::getContents in --enable-assert-always-abort builds or doing
nothing in --disable-assert-always-abort builds)

Change-Id: I246986fa1beaf17a8390eccb404408605e121630
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179894
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/vcl/inc/qt5/QtClipboard.hxx b/vcl/inc/qt5/QtClipboard.hxx
index b3360744fd6a..46bdabf925d2 100644
--- a/vcl/inc/qt5/QtClipboard.hxx
+++ b/vcl/inc/qt5/QtClipboard.hxx
@@ -50,7 +50,7 @@ class QtClipboard final
 css::uno::Reference 
m_aOwner;
 
std::vector>
 m_aListeners;
 
-static bool isOwner(const QClipboard::Mode aMode);
+bool isOwner(const QClipboard::Mode aMode);
 static bool isSupported(const QClipboard::Mode aMode);
 
 explicit QtClipboard(OUString aModeString, const QClipboard::Mode aMode);
diff --git a/vcl/qt5/QtClipboard.cxx b/vcl/qt5/QtClipboard.cxx
index a61273a734bd..a8cabc7664d8 100644
--- a/vcl/qt5/QtClipboard.cxx
+++ b/vcl/qt5/QtClipboard.cxx
@@ -158,14 +158,31 @@ void QtClipboard::handleChanged(QClipboard::Mode aMode)
 
 osl::ClearableMutexGuard aGuard(m_aMutex);
 
-// QtWayland will send a second change notification (seemingly without any
-// trigger). And any C'n'P operation in the Qt file picker emits a signal,
-// with LO still holding the clipboard ownership, but internally having 
lost
-// it. So ignore any signal, which still delivers the internal QtMimeData
-// as the clipboard content and is no "advertised" change.
-if (!m_bOwnClipboardChange && isOwner(aMode)
-&& qobject_cast(QApplication::clipboard()->mimeData(aMode)))
-return;
+if (!m_bOwnClipboardChange && isOwner(aMode))
+{
+auto const mimeData = QApplication::clipboard()->mimeData(aMode);
+
+// QtWayland will send a second change notification (seemingly without 
any
+// trigger). And any C'n'P operation in the Qt file picker emits a 
signal,
+// with LO still holding the clipboard ownership, but internally 
having lost
+// it. So ignore any signal, which still delivers the internal 
QtMimeData
+// as the clipboard content and is no "advertised" change.
+if (qobject_cast(mimeData))
+return;
+
+#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && defined EMSCRIPTEN
+// At least for the Qt5 Wasm backend, copying text from LO and then 
pasting it back into LO
+// will, for whatever reason, call here with an empty text/plain 
mimeData; while that
+// doesn't seem to be an issue at least with the current upstream Qt6 
dev branch (again, for
+// whatever reason), for at least our Qt 5.15.2+wasm branch the below 
m_aContents.clear()
+// would make us lose the text just copied from LO into the clipboard 
and thus make us paste
+// an empty text into LO, so, as a hack, filter out this unhelpful 
event here:
+if (mimeData != nullptr && mimeData->hasText() && 
mimeData->text().isEmpty())
+{
+return;
+}
+#endif
+}
 
 css::uno::Reference 
xOldOwner(m_aOwner);
 css::uno::Reference 
xOldContents(m_aContents);
@@ -254,7 +271,22 @@ bool QtClipboard::isOwner(const QClipboard::Mode aMode)
 return pClipboard->ownsFindBuffer();
 
 case QClipboard::Clipboard:
-return pClipboard->ownsClipboard();
+if (pClipboard->ownsClipboard())
+{
+return true;
+}
+#if defined EMSCRIPTEN
+// QWasmClipboard::ownsMode (in 
qtbase/src/plugins/platforms/wasm/qwasmclipboard.cpp,
+// which is the actual implementation of the above ownsClipboard 
call) unconditionally
+// returns false, so as a hack use "m_aContents is a LO-internal 
XTransferable type" as
+// a poor approximation of "LO owns the clipboard":
+if 

core.git: sw/source

2025-01-07 Thread Noel Grandin (via logerrit)
 sw/source/core/docnode/section.cxx |   34 --
 1 file changed, 16 insertions(+), 18 deletions(-)

New commits:
commit bbb53997c3a6890567ee991aed8502b397dcb7a6
Author: Noel Grandin 
AuthorDate: Tue Jan 7 16:07:50 2025 +0200
Commit: Noel Grandin 
CommitDate: Tue Jan 7 18:08:00 2025 +0100

fix ubsan failure

since
commit 404fbec25740406e3b926844f3bd0f324dc38b8c
Author: Noel Grandin 
Date:   Sat Jan 4 16:20:57 2025 +0200
convert RES_ATTRSET_CHG to SfxHint

where the code is incorrectly continuing, and thus doing
an invalid downcast

Change-Id: I04f69e73fc14c7ba04ef619ef7647320931d9a51
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179890
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/sw/source/core/docnode/section.cxx 
b/sw/source/core/docnode/section.cxx
index 62bbbd2c2ed1..b78c08ce8143 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -713,14 +713,12 @@ void SwSectionFormat::SwClientNotify(const SwModify& 
rMod, const SfxHint& rHint)
 if(!pSect || rSectionHidden.m_isHidden == pSect->IsHiddenFlag()) // 
already at target state, skipping.
 return;
 GetNotifier().Broadcast(rSectionHidden);
-return;
 }
 else if(SfxHintId::SwRemoveUnoObject == rHint.GetId())
 {
 SwFrameFormat::SwClientNotify(rMod, rHint);
 // invalidate cached uno object
 SetXTextSection(nullptr);
-return;
 }
 else if (rHint.GetId() == SfxHintId::SwFormatChange)
 {
@@ -735,7 +733,6 @@ void SwSectionFormat::SwClientNotify(const SwModify& rMod, 
const SfxHint& rHint)
 return;
 }
 SwFrameFormat::SwClientNotify(rMod, rHint);
-return;
 }
 else if (rHint.GetId() == SfxHintId::SwAttrSetChange)
 {
@@ -797,23 +794,24 @@ void SwSectionFormat::SwClientNotify(const SwModify& 
rMod, const SfxHint& rHint)
 }
 SwFrameFormat::SwClientNotify(rMod, rHint);
 }
-else if (rHint.GetId() != SfxHintId::SwLegacyModify)
-return;
-auto pLegacy = static_cast(&rHint);
-sal_uInt16 nWhich = pLegacy->GetWhich();
-auto pOld = pLegacy->m_pOld;
-auto pNew = pLegacy->m_pNew;
-switch( nWhich )
+else if (rHint.GetId() == SfxHintId::SwLegacyModify)
 {
-case RES_FTN_AT_TXTEND:
-case RES_END_AT_TXTEND:
-case RES_PROTECT:
-case RES_EDIT_IN_READONLY: // edit in readonly sections
-// Pass through these Messages until the End of the tree!
-GetNotifier().Broadcast(sw::LegacyModifyHint(pOld, pNew));
-return; // That's it!
+auto pLegacy = static_cast(&rHint);
+sal_uInt16 nWhich = pLegacy->GetWhich();
+auto pOld = pLegacy->m_pOld;
+auto pNew = pLegacy->m_pNew;
+switch( nWhich )
+{
+case RES_FTN_AT_TXTEND:
+case RES_END_AT_TXTEND:
+case RES_PROTECT:
+case RES_EDIT_IN_READONLY: // edit in readonly sections
+// Pass through these Messages until the End of the tree!
+GetNotifier().Broadcast(sw::LegacyModifyHint(pOld, pNew));
+return; // That's it!
+}
+SwFrameFormat::SwClientNotify(rMod, rHint);
 }
-SwFrameFormat::SwClientNotify(rMod, rHint);
 }
 
 void SwSectionFormat::SetXTextSection(rtl::Reference const& 
xTextSection)


Re: Interdependent, failing commits

2025-01-07 Thread Stephan Bergmann

On 1/7/25 15:08, Noel Grandin wrote:
Should be fixed once https://gerrit.libreoffice.org/c/core/+/179890 
 goes in


What exactly should be fixed by that?  With the above change 
cherry-picked on top of recent master 
61c12dd1c80e4b7227a614227bb690b00feb78ad, I still get both the two 
different failures described at


On Tue, 7 Jan 2025 at 01:04, Bjoern Michaelsen t...@libreoffice.org > wrote:

On 1/6/25 22:27, Stephan Bergmann wrote:

[...]

 > UBSan builds to fail (see the comments at  gerrit.libreoffice.org/c/core/ 
 > +/179480/3#message-1d186afad4accdcf814507953175bf0e483b0e2e> and
 > 
 > e7324ab2f8feb8f37c28a4f8845176d82f658648>, respectively).


core.git: Branch 'libreoffice-25-2' - sc/source

2025-01-07 Thread Henry Castro (via logerrit)
 sc/source/ui/view/output.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 289667abb3bcf165402f4f5c10af91ec59b0d26f
Author: Henry Castro 
AuthorDate: Mon Dec 30 06:19:24 2024 -0400
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 18:32:01 2025 +0100

tdf#164130: ensure valid column and row values

Sometimes the range mark has not valid col/row values.

Signed-off-by: Henry Castro 
Change-Id: I29cf70c8c2a4e832f1ee65abac0ff55e49295fc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179897
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index ddf3dd5e0b78..417aa596b724 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -2091,7 +2091,8 @@ void ScOutputData::DrawRefMark( SCCOL nRefStartX, SCROW 
nRefStartY,
 
 if ( nRefStartX == nRefEndX && nRefStartY == nRefEndY )
 mpDoc->ExtendMerge( nRefStartX, nRefStartY, nRefEndX, nRefEndY, nTab );
-else if (mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
+else if (mpDoc->ValidCol(nRefEndX) && mpDoc->ValidRow(nRefEndY) &&
+ mpDoc->HasAttrib(nRefEndX, nRefEndY, nTab, HasAttrFlags::Merged))
 mpDoc->ExtendMerge(nRefEndX, nRefEndY, nRefEndX, nRefEndY, nTab);
 
 if ( !(nRefStartX <= nVisX2 && nRefEndX >= nVisX1 &&


Re: tdf157829-rtl.fodt test failure

2025-01-07 Thread Mattia Verga
Il 28/12/24 14:46, Mattia Verga ha scritto:
> Il 28/12/24 12:31, Caolán McNamara - caolan.mcnamara at collabora.com 
> ha scritto:
>> On Sat, 2024-12-28 at 09:41 +, Mattia Verga wrote:
>>> WHile running tests for 25.2.0.1 I see a new test failure:
>>>
>>> file:///builddir/build/BUILD/libreoffice-25.2.0.1-build/libreoffice-
>>> 25.2.0.1//sw/qa/extras/layout/data//tdf157829-ltr.fodt:
>>> (anonymous namespace)::TestTdf157829LTR::TestBody finished in: 42ms
>>> [_RUN_] (anonymous namespace)::TestTdf157829RTL::TestBody
>>> file:///builddir/build/BUILD/libreoffice-25.2.0.1-build/libreoffice-
>>> 25.2.0.1//sw/qa/extras/layout/data//tdf157829-rtl.fodt:
>>> terminating test due to missing font: Noto Sans Hebrew
>>>
>>> The font is installed (as you can see tdf157829-ltr.fodt is passing),
>>> yet tdf157829-rtl.fodt complains it isn't.
>> It's possible that in the passing document, that while Noto Sans Hebrew
>> is listed in the document, that it might not actually be used, while it
>> is used in the other documents. That said, assuming this is the .spec
>> file:
>> https://src.fedoraproject.org/rpms/libreoffice/blob/rawhide/f/libreoffice.spec#_297
>>  
>>
>> then "BuildRequires: google-noto-sans-hebrew-fonts" does suggest that
>> the font is installed.
>>
>> So it *might* be that the font is installed, but missing some glyphs
>> that it needs to have to render the offending text. Hard to tell. You
>> might have to attach a debugger to where that abort is, or some
>> additionally dumping of the contents of "rMissingCodes" to see if
>> there's any merit in that theory. If there are some missing codes, you
>> can check with fontforge to see if the "Noto Sans Hebrew" font is
>> really missing the glyphs that LibreOffice might believe are missing.
>>
> Thanks, I do see some "rMissingCodes" lines in the failure output. I 
> cannot understand it all, but a simple comparison of 
> NotoSansHebrew-Regular font provided by Fedora and the font downloaded 
> from LO extra sources shows that Fedora font is missing a lot of glyphs.
>
> I'll try to ask why to the Fedora maintainer of the font.
>
> Mattia
>
With support [1] from Fedora packager of Google Noto Sans fonts, the 
issue seems due to the fact that LibreOffice uses the "full" version of 
the font from the font sources, while Fedora (and possibly other linux 
distro, I've checked Debian, for example) ships "hinted" or "unhinted" 
versions.

The full version, quoting upstream:

We also (based on a configuration file) use UFO merging to add subsets 
of Noto
Sans, Noto Serif or Noto Sans Devanagari into the sources to produce a 
"full"
build of the font.


Therefore, using those "extra" glyphs in tests doesn't cause any failure 
when testing LO on builds using the bundled fonts, while running tests 
on downstream linux distribution using packaged fonts will fail. It 
would be nice if LO could switch to use the hinted/unhinted version 
(already present in the bundled sources) and avoid using those extra 
glyphs in tests.

Mattia

[1] https://bugzilla.redhat.com/show_bug.cgi?id=2334719





core.git: Branch 'libreoffice-24-8' - translations

2025-01-07 Thread Christian Lohmaier (via logerrit)
 translations |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1d1c801619128c5726d97263a2fa6e68835f7930
Author: Christian Lohmaier 
AuthorDate: Tue Jan 7 18:53:52 2025 +0100
Commit: Gerrit Code Review 
CommitDate: Tue Jan 7 18:53:52 2025 +0100

Update git submodules

* Update translations from branch 'libreoffice-24-8'
  to dcdab8953fe901a914c95a55fd30f740c22d6f8d
  - update translations for 24-8

and force-fix errors using pocheck

Change-Id: I519c7b3dfd86b2509629d5ba13d033e387868fa6

diff --git a/translations b/translations
index 06f2f2e19bd7..dcdab8953fe9 16
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 06f2f2e19bd7140228a2b028592c4058e9190044
+Subproject commit dcdab8953fe901a914c95a55fd30f740c22d6f8d


Re: test failure due to xmlsec

2025-01-07 Thread Michael Stahl




On 19/12/2024 07:59, Mattia Verga wrote:

Il 18/12/24 20:49, Mattia Verga ha scritto:

Il 18/12/24 19:05, Thorsten Behrens - thb at libreoffice.org ha scritto:

Hi Mattia,

Mattia Verga wrote:

I've been trying to build LO 25.2.0.0.beta1 on Fedora Rawhide and saw a
new test failure in

/builddir/build/BUILD/libreoffice-25.2.0.0-build/libreoffice-25.2.0.0.beta1/xmlsecurity/qa/xmlsec/xmlsec.cxx:100:(anonymous

namespace)::testInsertPrivateKey::TestBody
equality assertion failed
- Expected: 1
- Actual  : 0


There was a recent fix that might help:

   commit 68c3c643bb3142908c7370b1dea4b636d905cbb6
   Author: Michael Stahl 
   Date:   2024-12-17 13:41:33 +0100

Cheers,

-- Thorsten


Thanks, I'll try to backport it and see if it helps, then.

Mattia


I got the same failure with the patch applied... I'll set up a virtual
machine to build LO in different combinations LO/xmlsec and see where
the test passes or fails.

Mattia


apparently this test is relatively new; please try this patch:

https://gerrit.libreoffice.org/c/core/+/179893




core.git: external/redland

2025-01-07 Thread Stephan Bergmann (via logerrit)
 external/redland/raptor/ubsan.patch |   11 +++
 1 file changed, 11 insertions(+)

New commits:
commit 8b2f6b4fba6c466ed399f4f4b80e9631f13a6232
Author: Stephan Bergmann 
AuthorDate: Tue Jan 7 17:49:45 2025 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Jan 7 19:37:59 2025 +0100

Fix UBSan build of ExternalProject_raptor

Using an autogen.input somewhat different from what I usually use for 
ASan/UBSan
builds, that caused

> libtool: link: /home/sberg/llvm/inst/bin/clang -fdiagnostics-color=always 
-fsanitize=address -fsanitize-address-globals-dead-stripping 
-fsanitize-address-use-after-return=always -fsanitize=undefined 
-fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize=nullability 
-fno-sanitize=function -O0 -Wp,-U_FORTIFY_SOURCE -fstrict-aliasing 
-fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor 
-ggnu-pubnames -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link 
-Wl,/home/sberg/lo-asanubsan/core/instdir/program -o .libs/rapper rapper.o  
../src/.libs/libraptor2.so -Wl,-rpath -Wl,/usr/local/lib
> /usr/bin/ld: 
/home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined 
reference to `__ubsan_vptr_type_cache'
> /usr/bin/ld: 
/home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined 
reference to `__ubsan_handle_dynamic_type_cache_miss'
> clang: error: linker command failed with exit code 1 (use -v to see 
invocation)
> make[3]: *** [Makefile:540: rapper] Error 1
> make[3]: *** Waiting for unfinished jobs
> libtool: link: /home/sberg/llvm/inst/bin/clang -fdiagnostics-color=always 
-fsanitize=address -fsanitize-address-globals-dead-stripping 
-fsanitize-address-use-after-return=always -fsanitize=undefined 
-fsanitize=float-divide-by-zero -fsanitize=local-bounds -fsanitize=nullability 
-fno-sanitize=function -O0 -Wp,-U_FORTIFY_SOURCE -fstrict-aliasing 
-fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang -debug-info-kind=constructor 
-ggnu-pubnames -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link 
-Wl,/home/sberg/lo-asanubsan/core/instdir/program -o .libs/rdfdiff rdfdiff.o  
../src/.libs/libraptor2.so -Wl,-rpath -Wl,/usr/local/lib
> /usr/bin/ld: 
/home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined 
reference to `__ubsan_vptr_type_cache'
> /usr/bin/ld: 
/home/sberg/lo-asanubsan/core/instdir/program/libicuuc.so.75: undefined 
reference to `__ubsan_handle_dynamic_type_cache_miss'
> clang: error: linker command failed with exit code 1 (use -v to see 
invocation)

It appears that different configurations cause different libraries to be 
created
in ExternalProject_raptor, so that's why I never ran into this before, but 
the
solution is the same as in b3300387f2e14ea59c70db513a8f6eda6fe17afa "Fix 
UBSan
build of ExternalProject_redland".

Change-Id: I8bf955632af8c6490d9bd66a1d7dcd19b623c305
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179898
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/external/redland/raptor/ubsan.patch 
b/external/redland/raptor/ubsan.patch
index 54b041e80f1f..58ef502f0400 100644
--- a/external/redland/raptor/ubsan.patch
+++ b/external/redland/raptor/ubsan.patch
@@ -9,3 +9,14 @@
  /* Remove /.. at the end of the path */
  *prev = '
  path_len -= (s-prev);
+--- utils/Makefile.in
 utils/Makefile.in
+@@ -174,7 +17,7 @@
+ am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
+ am__v_CC_0 = @echo "  CC  " $@;
+ am__v_CC_1 = 
+-CCLD = $(CC)
++CCLD = $(CXX)
+ LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+   $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+   $(AM_LDFLAGS) $(LDFLAGS) -o $@


core.git: Branch 'distro/collabora/co-24.04' - postprocess/CustomTarget_registry.mk

2025-01-07 Thread Gökay Şatır (via logerrit)
 postprocess/CustomTarget_registry.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit b0288101b8aa6c09975bc73577c0fadf62f36cf7
Author: Gökay Şatır 
AuthorDate: Tue Jan 7 12:48:00 2025 +0300
Commit: Andras Timar 
CommitDate: Tue Jan 7 23:01:47 2025 +0100

Make sure that certain accelerator files are included for LOK case.

Issue:
Accelerators-unxwnt file is omitted when window system is different than 
X11.
This causes LOK to miss the shortcuts which has "install:module="unxwnt"" 
signature.

This commit adds the required file in linux case.

Signed-off-by: Gökay Şatır 
Change-Id: I4a8425d17a5d95b03a176153506f29a3f393c173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179873
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index 3a45ac47a53a..219ba2c9eb0a 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -290,6 +290,10 @@ postprocess_FILES_main += \
$(postprocess_MOD)/org/openoffice/VCL-unixdesktop.xcu
# Inet-unixdesktop.xcu must come after Inet.xcu
# VCL-unixdesktop.xcu must come after VCL.xcu
+else ifeq (LINUX,$(OS))
+postprocess_FILES_main += \
+   $(postprocess_MOD)/org/openoffice/Office/Accelerators-unxwnt.xcu
+   # This condition is for LOK case. When the windowing system is not X11, 
above condition is not met. So we add the required files here.
 else ifeq (WNT,$(OS))
 postprocess_FILES_main += \
$(postprocess_MOD)/org/openoffice/Inet-wnt.xcu \


core.git: Branch 'distro/collabora/co-24.04.10' - postprocess/CustomTarget_registry.mk

2025-01-07 Thread Gökay Şatır (via logerrit)
 postprocess/CustomTarget_registry.mk |4 
 1 file changed, 4 insertions(+)

New commits:
commit b11f6006084b3a2587ba60fc29fdfb1976c9181b
Author: Gökay Şatır 
AuthorDate: Tue Jan 7 12:48:00 2025 +0300
Commit: Andras Timar 
CommitDate: Tue Jan 7 23:02:29 2025 +0100

Make sure that certain accelerator files are included for LOK case.

Issue:
Accelerators-unxwnt file is omitted when window system is different than 
X11.
This causes LOK to miss the shortcuts which has "install:module="unxwnt"" 
signature.

This commit adds the required file in linux case.

Signed-off-by: Gökay Şatır 
Change-Id: I4a8425d17a5d95b03a176153506f29a3f393c173
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179873
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit b0288101b8aa6c09975bc73577c0fadf62f36cf7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179919
Tested-by: Andras Timar 

diff --git a/postprocess/CustomTarget_registry.mk 
b/postprocess/CustomTarget_registry.mk
index 3a45ac47a53a..219ba2c9eb0a 100644
--- a/postprocess/CustomTarget_registry.mk
+++ b/postprocess/CustomTarget_registry.mk
@@ -290,6 +290,10 @@ postprocess_FILES_main += \
$(postprocess_MOD)/org/openoffice/VCL-unixdesktop.xcu
# Inet-unixdesktop.xcu must come after Inet.xcu
# VCL-unixdesktop.xcu must come after VCL.xcu
+else ifeq (LINUX,$(OS))
+postprocess_FILES_main += \
+   $(postprocess_MOD)/org/openoffice/Office/Accelerators-unxwnt.xcu
+   # This condition is for LOK case. When the windowing system is not X11, 
above condition is not met. So we add the required files here.
 else ifeq (WNT,$(OS))
 postprocess_FILES_main += \
$(postprocess_MOD)/org/openoffice/Inet-wnt.xcu \


core.git: Changes to 'refs/tags/cp-24.04.10-4'

2025-01-07 Thread Andras Timar (via logerrit)
Tag 'cp-24.04.10-4' created by Andras Timar  at 
2025-01-07 22:08 +

cp-24.04.10-4

Changes since cp-24.04.10-3-4:
---
 0 files changed
---


help.git: Changes to 'refs/tags/cp-24.04.10-4'

2025-01-07 Thread Taichi Haradaguchi (via logerrit)
Tag 'cp-24.04.10-4' created by Andras Timar  at 
2025-01-07 22:08 +

cp-24.04.10-4

Changes since cp-24.04.3-6:
Taichi Haradaguchi (1):
  Fix bad links in help page

---
 source/text/scalc/01/0212.xhp |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---


dictionaries.git: Changes to 'refs/tags/cp-24.04.10-4'

2025-01-07 Thread Xisco Fauli (via logerrit)
Tag 'cp-24.04.10-4' created by Andras Timar  at 
2025-01-07 22:08 +

cp-24.04.10-4

Changes since cp-24.04.8-5-1:
---
 0 files changed
---


translations.git: Changes to 'refs/tags/cp-24.04.10-4'

2025-01-07 Thread Andras Timar (via logerrit)
Tag 'cp-24.04.10-4' created by Andras Timar  at 
2025-01-07 22:08 +

cp-24.04.10-4

Changes since cp-24.04.10-1:
Andras Timar (1):
  French and German translation of Conditional Formatting dialog

---
 source/fr/sc/messages.po | 1990 ++-
 1 file changed, 1279 insertions(+), 711 deletions(-)
---


core.git: svgio/source

2025-01-07 Thread Armin Le Grand (Collabora) (via logerrit)
 svgio/source/svgreader/svgsymbolnode.cxx |   96 +++
 1 file changed, 72 insertions(+), 24 deletions(-)

New commits:
commit 6700b311310a94e0de8123b307275cd553bb0d9b
Author: Armin Le Grand (Collabora) 
AuthorDate: Mon Jan 6 13:57:39 2025 +0100
Commit: Armin Le Grand 
CommitDate: Tue Jan 7 22:09:44 2025 +0100

tdf#164434 Correct SvgSymbolNode SVG import

The embedding cannot rely on SVG providing all
values of x/y/w/h, so added fallbacks to real
geometric size. Also removed double-adding
geometry.

Change-Id: I1914ed0c3e1e42ba899db4f3eb9193fd29e9c4be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179831
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 

diff --git a/svgio/source/svgreader/svgsymbolnode.cxx 
b/svgio/source/svgreader/svgsymbolnode.cxx
index f2d25c330316..0853e7d566f7 100644
--- a/svgio/source/svgreader/svgsymbolnode.cxx
+++ b/svgio/source/svgreader/svgsymbolnode.cxx
@@ -127,35 +127,83 @@ namespace svgio::svgreader
 void 
SvgSymbolNode::decomposeSvgNode(drawinglayer::primitive2d::Primitive2DContainer&
 rTarget, bool bReferenced) const
 {
 // decompose children
-SvgNode::decomposeSvgNode(rTarget, bReferenced);
+drawinglayer::primitive2d::Primitive2DContainer aContent;
+SvgNode::decomposeSvgNode(aContent, bReferenced);
 
-if (rTarget.empty())
+// no geometry provided, done
+if (aContent.empty())
 return;
 
-if(getViewBox())
+// if no ViewBox append aContent without embedding
+if(nullptr == getViewBox())
 {
-// create mapping
-const SvgAspectRatio& rRatio = getSvgAspectRatio();
-
-const double fX(maX.solve(*this, NumberType::xcoordinate));
-const double fY(maY.solve(*this, NumberType::ycoordinate));
-const double fWidth(maWidth.solve(*this, 
NumberType::xcoordinate));
-const double fHeight(maHeight.solve(*this, 
NumberType::ycoordinate));
-const basegfx::B2DRange aRange(fX, fY, fX + fWidth, fY + 
fHeight);
-
-// let mapping be created from SvgAspectRatio
-const basegfx::B2DHomMatrix aEmbeddingTransform(
-rRatio.createMapping(aRange, *getViewBox()));
-
-// prepare embedding in transformation
-// create embedding group element with transformation
-const drawinglayer::primitive2d::Primitive2DReference xRef(
-new drawinglayer::primitive2d::TransformPrimitive2D(
-aEmbeddingTransform,
-
drawinglayer::primitive2d::Primitive2DContainer(rTarget)));
-
-rTarget.push_back(xRef);
+rTarget.append(aContent);
+return;
+}
+
+// prepare range of imported geometry
+// tdf#164434 CAUTION: There *are* svg files which do not define
+// all needed data, e.g. x/y/w/h might be missing in any 
combination.
+// As fallback, use size of imported geometry. Do this separate for
+// position and size to do the best if only one value pair is 
provided
+basegfx::B2DRange aImportedRange;
+basegfx::B2DPoint aPosition;
+basegfx::B2DVector aSize;
+
+// evaluate position
+if (maX.isSet() && maY.isSet())
+{
+// use values from imported svg if both provided
+aPosition = basegfx::B2DPoint(
+maX.solve(*this, NumberType::xcoordinate),
+maY.solve(*this, NumberType::ycoordinate));
+}
+else
+{
+// fallback to imported geometry
+drawinglayer::geometry::ViewInformation2D aViewInfo;
+aImportedRange = aContent.getB2DRange(aViewInfo);
+aPosition = aImportedRange.getMinimum();
 }
+
+// evaluate size
+if (maWidth.isSet() && maHeight.isSet())
+{
+// use values from imported svg if both provided
+aSize = basegfx::B2DVector(
+maWidth.solve(*this, NumberType::xcoordinate),
+maHeight.solve(*this, NumberType::ycoordinate));
+}
+else
+{
+// fallback to imported geometry
+if (aImportedRange.isEmpty())
+{
+drawinglayer::geometry::ViewInformation2D aViewInfo;
+aImportedRange = aContent.getB2DRange(aViewInfo);
+}
+
+aSize = aImportedRange.getRange();
+}
+
+// tdf#164434 no size, no geometry, done
+if (0.0 == aSize.getX() || 0.0 == aSize.getY())
+return;
+
+  

core.git: ridljar/com

2025-01-07 Thread Caolán McNamara (via logerrit)
 ridljar/com/sun/star/lib/uno/protocols/urp/urp.java |   14 --
 1 file changed, 8 insertions(+), 6 deletions(-)

New commits:
commit 14693204260bb6e19b28ea9994d81f99166ac1cd
Author: Caolán McNamara 
AuthorDate: Sat Nov 23 19:24:35 2024 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 22:01:54 2025 +0100

cid#1557414 Unguarded read

Change-Id: I4b0bd74d0841989905dd8034a9352b6d59b40dad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177189
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java 
b/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java
index 0ce9d35be75f..eec830ea3c9c 100644
--- a/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java
+++ b/ridljar/com/sun/star/lib/uno/protocols/urp/urp.java
@@ -408,12 +408,14 @@ public final class urp implements IProtocol {
 {
 boolean internal = PROPERTIES_OID.equals(inL1Oid);
 // inL1Oid may be null in XInstanceProvider.getInstance("")
-XCurrentContext cc =
-(currentContext && !internal
- && functionId != MethodDescription.ID_RELEASE)
-? (XCurrentContext) unmarshal.readInterface(
-new Type(XCurrentContext.class))
-: null;
+XCurrentContext cc;
+synchronized (monitor) {
+cc = (currentContext && !internal
+  && functionId != MethodDescription.ID_RELEASE)
+? (XCurrentContext) unmarshal.readInterface(
+new Type(XCurrentContext.class))
+: null;
+}
 MethodDescription desc = inL1Type.getMethodDescription(functionId);
 if (desc == null) {
 throw new IOException(


core.git: Branch 'distro/collabora/co-24.04' - svx/source svx/uiconfig

2025-01-07 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/tbcontrl.cxx  |   12 
 svx/uiconfig/ui/currencywindow.ui |   29 +
 2 files changed, 1 insertion(+), 40 deletions(-)

New commits:
commit 8a03a31393ab814b96c893ec9b906367fac4fe5e
Author: Szymon Kłos 
AuthorDate: Tue Jan 7 13:58:11 2025 +0100
Commit: Andras Timar 
CommitDate: Tue Jan 7 23:19:05 2025 +0100

Improve UX of currency dropdown

- single click activation
- no additional ok button in the dropdown
- no label

It's not common that dropdown has to be confirmed using button

Signed-off-by: Szymon Kłos 
Change-Id: Ib5ad5509f99466710cd898bf0baedeac8fdb49ab
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179886
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins CollaboraOffice 

diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index cec2c181140a..0d4951f2f921 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -3898,16 +3898,13 @@ namespace
 {
 private:
 rtl::Reference m_xControl;
-std::unique_ptr m_xLabel;
 std::unique_ptr m_xCurrencyLb;
-std::unique_ptr m_xOkBtn;
 OUString&   m_rSelectedFormat;
 LanguageType&   m_eSelectedLanguage;
 
 std::vector m_aFormatEntries;
 LanguageType  m_eFormatLanguage;
 DECL_LINK(RowActivatedHdl, weld::TreeView&, bool);
-DECL_LINK(OKHdl, weld::Button&, void);
 
 virtual void GrabFocus() override;
 
@@ -3915,9 +3912,7 @@ namespace
 SvxCurrencyList_Impl(SvxCurrencyToolBoxControl* pControl, 
weld::Widget* pParent, OUString& rSelectedFormat, LanguageType& 
eSelectedLanguage)
 : WeldToolbarPopup(pControl->getFrameInterface(), pParent, 
"svx/ui/currencywindow.ui", "CurrencyWindow")
 , m_xControl(pControl)
-, m_xLabel(m_xBuilder->weld_label("label"))
 , m_xCurrencyLb(m_xBuilder->weld_tree_view("currency"))
-, m_xOkBtn(m_xBuilder->weld_button("ok"))
 , m_rSelectedFormat(rSelectedFormat)
 , m_eSelectedLanguage(eSelectedLanguage)
 {
@@ -3984,9 +3979,7 @@ namespace
 // enable multiple selection enabled so we can start with nothing 
selected
 m_xCurrencyLb->set_selection_mode(SelectionMode::Multiple);
 m_xCurrencyLb->connect_row_activated( LINK( this, 
SvxCurrencyList_Impl, RowActivatedHdl ) );
-m_xLabel->set_label(SvxResId(RID_SVXSTR_TBLAFMT_CURRENCY));
 m_xCurrencyLb->select( nSelectedPos );
-m_xOkBtn->connect_clicked(LINK(this, SvxCurrencyList_Impl, OKHdl));
 
 // gtk will initially make a best guess depending on the first few 
entries, so copy the probable
 // longest entry to the start temporarily and force in the width 
at this point
@@ -4001,11 +3994,6 @@ namespace
 m_xCurrencyLb->grab_focus();
 }
 
-IMPL_LINK_NOARG(SvxCurrencyList_Impl, OKHdl, weld::Button&, void)
-{
-RowActivatedHdl(*m_xCurrencyLb);
-}
-
 IMPL_LINK_NOARG(SvxCurrencyList_Impl, RowActivatedHdl, weld::TreeView&, 
bool)
 {
 if (!m_xControl.is())
diff --git a/svx/uiconfig/ui/currencywindow.ui 
b/svx/uiconfig/ui/currencywindow.ui
index c58a0c49226d..c65ce6763b03 100644
--- a/svx/uiconfig/ui/currencywindow.ui
+++ b/svx/uiconfig/ui/currencywindow.ui
@@ -21,20 +21,6 @@
 False
 vertical
 6
-
-  
-True
-False
-True
-currency
-0
-  
-  
-False
-True
-0
-  
-
 
   
 True
@@ -45,6 +31,7 @@
 in
 
   
+True
 True
 True
 True
@@ -76,20 +63,6 @@
 1
   
 
-
-  
-_OK
-True
-True
-True
-True
-  
-  
-False
-True
-2
-  
-
   
 
   


core.git: Branch 'distro/collabora/co-24.04.10' - configure.ac

2025-01-07 Thread Andras Timar (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7921f9dbd5189dd447ec5241cb9d3c24bbcd3ea5
Author: Andras Timar 
AuthorDate: Tue Jan 7 23:08:08 2025 +0100
Commit: Andras Timar 
CommitDate: Tue Jan 7 23:08:08 2025 +0100

Bump version to 24.04.10.4

Change-Id: Ic5bdea6a44766990cb98b3142a51058a125f838c

diff --git a/configure.ac b/configure.ac
index 36db23fb0102..5c0d8b90cc8e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for 
the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no 
idea.
 
-AC_INIT([Collabora Office],[24.04.10.3],[],[],[https://collaboraoffice.com/])
+AC_INIT([Collabora Office],[24.04.10.4],[],[],[https://collaboraoffice.com/])
 
 dnl libnumbertext needs autoconf 2.68, but that can pick up autoconf268 just 
fine if it is installed
 dnl whereas aclocal (as run by autogen.sh) insists on using autoconf and fails 
hard


core.git: Branch 'libreoffice-25-2' - sw/source

2025-01-07 Thread Ashod Nakashian (via logerrit)
 sw/source/uibase/shells/textfld.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ebbebb3668a1f85478968bbc2b9e55ade0daa677
Author: Ashod Nakashian 
AuthorDate: Mon Dec 23 18:49:08 2024 -0500
Commit: Xisco Fauli 
CommitDate: Tue Jan 7 09:00:16 2025 +0100

sw: protect against null annotation window

Signed-off-by: Ashod Nakashian 
Change-Id: I3d2b820d492757c60e396b5eda484bb3c049928c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179375
Tested-by: Jenkins
Reviewed-by: Jaume Pujantell 
(cherry picked from commit 75d47b87abde45591128ae7a12fb0b0fad6768c2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179841
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/shells/textfld.cxx 
b/sw/source/uibase/shells/textfld.cxx
index 554ccb610a7c..42fd111f2684 100644
--- a/sw/source/uibase/shells/textfld.cxx
+++ b/sw/source/uibase/shells/textfld.cxx
@@ -124,7 +124,7 @@ static bool lcl_canUserModifyAnnotation(const SwView& 
rView, std::u16string_view
 static bool lcl_canUserModifyAnnotation(const SwView& rView,
 const sw::annotation::SwAnnotationWin* 
pAnnotationWin)
 {
-return lcl_canUserModifyAnnotation(rView, pAnnotationWin->GetAuthor());
+return pAnnotationWin && lcl_canUserModifyAnnotation(rView, 
pAnnotationWin->GetAuthor());
 }
 
 static bool lcl_canUserModifyAnnotation(const SwView& rView, sal_uInt32 
nPostItId)


core.git: Branch 'libreoffice-24-8' - sal/osl

2025-01-07 Thread Noel Grandin (via logerrit)
 sal/osl/unx/socket.cxx |   79 -
 1 file changed, 40 insertions(+), 39 deletions(-)

New commits:
commit 9e3eda2753e1816d364d02f572b8151c5961dfff
Author: Noel Grandin 
AuthorDate: Fri Dec 20 11:07:40 2024 +0200
Commit: Michael Stahl 
CommitDate: Tue Jan 7 12:19:50 2025 +0100

correct caching in osl_getLocalHostname*

the change

commit eac00017e34e77343b9ac3638bed9c75115a23fe
Author: Samuel Mehrbrodt 
Date:   Thu Dec 10 14:24:05 2020 +0100
[API CHANGE] Do not call getaddrinfo if we just want the hostname

means that the result returned from osl_getLocalHostname and
osl_getLocalHostnameFQDN is always the same, but depends on which one is
called first.

Rather cache them independently, so they always return the right thing

Change-Id: Ifa2f731a6002550cf08f57b53fd6e25e8b79295f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178872
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
(cherry picked from commit 46533f9c308bb57545fd25527f3141daec0080d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178930
Reviewed-by: Xisco Fauli 
(cherry picked from commit eb83239ef26a8ddf77d82d1f6805c58ee366c172)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178957
Reviewed-by: Michael Stahl 

diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index e875e415e709..2b3a877ec977 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -862,66 +862,67 @@ void SAL_CALL osl_destroyHostAddr (oslHostAddr pAddr)
 
 namespace
 {
-oslSocketResult lcl_getLocalHostname(rtl_uString **ustrLocalHostname, bool 
bUseFQDN)
+std::pair lcl_getLocalHostname(bool bUseFQDN)
 {
-static auto const init = [bUseFQDN]() -> std::pair {
-char LocalHostname[256] = "";
+char LocalHostname[256] = "";
 
 #ifdef SYSV
-struct utsname uts;
+struct utsname uts;
 
-if (uname(&uts) < 0)
-return {osl_Socket_Error, OUString()};
+if (uname(&uts) < 0)
+return {osl_Socket_Error, OUString()};
 
-if ((strlen(uts.nodename) + 1) > nBufLen)
-return {osl_Socket_Error, OUString()};
+if ((strlen(uts.nodename) + 1) > nBufLen)
+return {osl_Socket_Error, OUString()};
 
-strncpy(LocalHostname, uts.nodename, sizeof( LocalHostname ));
+strncpy(LocalHostname, uts.nodename, sizeof( LocalHostname ));
 #else  /* BSD compatible */
-if (gethostname(LocalHostname, sizeof(LocalHostname)-1) != 0)
-return {osl_Socket_Error, OUString()};
+if (gethostname(LocalHostname, sizeof(LocalHostname)-1) != 0)
+return {osl_Socket_Error, OUString()};
 #endif /* SYSV */
-LocalHostname[sizeof(LocalHostname)-1] = 0;
-
-/* check if we have an FQDN */
-if (bUseFQDN && strchr(LocalHostname, '.') == nullptr)
-{
-oslHostAddr Addr;
-
-/* no, determine it via dns */
-Addr = osl_psz_createHostAddrByName(LocalHostname);
+LocalHostname[sizeof(LocalHostname)-1] = 0;
 
-const char *pStr;
-if ((pStr = osl_psz_getHostnameOfHostAddr(Addr)) != nullptr)
-{
-strncpy(LocalHostname, pStr, sizeof( LocalHostname ));
-LocalHostname[sizeof(LocalHostname)-1] = 0;
-}
-osl_destroyHostAddr(Addr);
-}
+/* check if we have an FQDN */
+if (bUseFQDN && strchr(LocalHostname, '.') == nullptr)
+{
+oslHostAddr Addr;
 
-if (LocalHostname[0] != '
-{
-return {osl_Socket_Ok, 
OUString::createFromAscii(LocalHostname)};
-}
+/* no, determine it via dns */
+Addr = osl_psz_createHostAddrByName(LocalHostname);
 
-return {osl_Socket_Error, OUString()};
-}();
+const char *pStr;
+if ((pStr = osl_psz_getHostnameOfHostAddr(Addr)) != nullptr)
+{
+strncpy(LocalHostname, pStr, sizeof( LocalHostname ));
+LocalHostname[sizeof(LocalHostname)-1] = 0;
+}
+osl_destroyHostAddr(Addr);
+}
 
-rtl_uString_assign(ustrLocalHostname,init.second.pData);
+if (LocalHostname[0] != '
+{
+return {osl_Socket_Ok, OUString::createFromAscii(LocalHostname)};
+}
 
-return init.first;
-}
+return {osl_Socket_Error, OUString()};
 }
 
+} // anonymous namespace
+
 oslSocketResult SAL_CALL osl_getLocalHostname(rtl_uString **ustrLocalHostname)
 {
-return lcl_getLocalHostname(ustrLocalHostname, false);
+static auto const init = lcl_getLocalHostname(/*bUseFQDN*/false);
+
+rtl_uString_assign(ustrLocalHostname,init.second.pData);
+return init.first;
 }
 
 oslSocketResult osl_getLocalHostnameFQDN(rtl_uString **ustrLocalHostname)
 {
-return lcl_getLocalHostname(ustrLocalHostname, tr

core.git: Branch 'libreoffice-24-8' - sw/source

2025-01-07 Thread Justin Luth (via logerrit)
 sw/source/core/unocore/unostyle.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit fcfc754b8f8aaa6bc6d3f22c007b3d8a94d53d9f
Author: Justin Luth 
AuthorDate: Mon Dec 16 16:47:36 2024 -0500
Commit: Michael Stahl 
CommitDate: Tue Jan 7 12:26:37 2025 +0100

tdf#164263: avoid exception when SAL_DISABLE_PRINTERLIST #2

This fixes a backported to 24.2.1 regression
from commit e6f75eb50bc5d1ebccda0c0f80a7b353d991106e

Although an empty OUString is returned when IsDisplayPrinter(),
using that to setPropertyValue causes an exception.
Since IsDisplayPrinter always returns static values for all queries,
there is no need to actually attempt to make any changes
when IsDisplayPrinter().

I don't see any unit test examples from the offending regression,
or anything else in SW relating to Printer or environment variables,
nor is there any explict call available to set mpDisplayDev,
so I don't know how I can create a unit test for this.

Change-Id: I3d4054df57ab460833d9994d71133aef64cbb714
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178753
Reviewed-by: Justin Luth 
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178827
(cherry picked from commit 1dc4846e76570ab19c028ac23786e4ffd8fc4679)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178843
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/unocore/unostyle.cxx 
b/sw/source/core/unocore/unostyle.cxx
index b163817d3aca..a796f88078f7 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -1574,6 +1574,11 @@ void 
SwXStyle::SetPropertyValue(const SfxItemProperty
 if (!rValue.has() && !rValue.has())
 throw lang::IllegalArgumentException();
 SfxPrinter* pPrinter = m_pDoc->getIDocumentDeviceAccess().getPrinter(true);
+
+// PAPER_BINs have no meaning when there is no actual printer
+if (pPrinter->IsDisplayPrinter())
+return;
+
 using printeridx_t = decltype(pPrinter->GetPaperBinCount());
 printeridx_t nBin = std::numeric_limits::max();
 if(rValue.has())


core.git: sfx2/source

2025-01-07 Thread Mike Kaganski (via logerrit)
 sfx2/source/doc/objstor.cxx |   41 +
 1 file changed, 13 insertions(+), 28 deletions(-)

New commits:
commit 61c12dd1c80e4b7227a614227bb690b00feb78ad
Author: Mike Kaganski 
AuthorDate: Tue Jan 7 13:30:18 2025 +0500
Commit: Mike Kaganski 
CommitDate: Tue Jan 7 12:26:38 2025 +0100

tdf#164619: bite the bullet, and write the correct ODF version

The problem was the inconsistency between ODF versions for the forms
in the package and the form's content.xml. The check
for consistency was introduced in version 5.4 in commit
0a0f205775807d63e7f6dd910de368bb12b11a49 (tdf#105686 - fixed wrongly
imported named expressions:, 2017-03-21). In version 7.0, commit
9fdf8c0a5cc036ea9bd1e11dd8f2c1a6e601fae2 (Also consider saved
exceptions when terminating parse, 2019-11-16) made the exception
from that check fatal.

Commit 519d96fd8b83ef4c61576d87b58f97b7e6e6e3c6 (tdf#134582 sfx2:
when storing, set Version on embedded object storage, 2020-07-10)
started to write the embedded object versions to package manifest,
and commit 16de54a5c47fbc4691ee099c1f7bb559a8fe11ac (tdf#138209 ODF
export: work around forms problem in LO < 7.0, 2021-05-10) created
an exception for forms, to workaround the problem in older versions.
But the latter commit created the reverse inconsistency, where the
newer versions started to write older ODF version in manifest.xml,
but newer ODF version in content.xml.

This change restores the correct version written to the manifest.
It is already messy in the already-released versions; it doesn't
look possible to restore sanity retroactively, so just make it
correct from now on, and accept the problem in older versions.

Change-Id: If5d07b6000b9f08b33844db48b815881bed2915b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179867
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index aa1dc0c29070..9e1861285ac8 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -132,6 +132,17 @@ using namespace ::com::sun::star::document;
 using namespace ::cppu;
 
 
+static css::uno::Any getODFVersionAny(SvtSaveOptions::ODFSaneDefaultVersion v)
+{
+if (v >= SvtSaveOptions::ODFSaneDefaultVersion::ODFSVER_014)
+return css::uno::Any(ODFVER_014_TEXT);
+else if (v >= SvtSaveOptions::ODFSaneDefaultVersion::ODFSVER_013)
+return css::uno::Any(ODFVER_013_TEXT);
+else
+return css::uno::Any(ODFVER_012_TEXT);
+}
+
+
 void impl_addToModelCollection(const css::uno::Reference< css::frame::XModel 
>& xModel)
 {
 if (!xModel.is())
@@ -346,22 +357,7 @@ void SfxObjectShell::SetupStorage( const uno::Reference< 
embed::XStorage >& xSto
 try
 {
 // older versions can not have this property set, it exists only 
starting from ODF1.2
-uno::Reference const xModule(GetModel(), 
uno::UNO_QUERY);
-bool const isBaseForm(xModule.is() &&
-xModule->getIdentifier() == "com.sun.star.sdb.FormDesign");
-SAL_INFO_IF(isBaseForm, "sfx.doc", "tdf#138209 force form export 
to ODF 1.2");
-if (!isBaseForm && SvtSaveOptions::ODFSVER_014 <= nDefVersion)
-{
-xProps->setPropertyValue(u"Version"_ustr, 
uno::Any(ODFVER_014_TEXT));
-}
-else if (!isBaseForm && SvtSaveOptions::ODFSVER_013 <= nDefVersion)
-{
-xProps->setPropertyValue(u"Version"_ustr, 
uno::Any(ODFVER_013_TEXT));
-}
-else
-{
-xProps->setPropertyValue(u"Version"_ustr, 
uno::Any(ODFVER_012_TEXT));
-}
+xProps->setPropertyValue(u"Version"_ustr, 
getODFVersionAny(nDefVersion));
 }
 catch( uno::Exception& )
 {
@@ -1330,18 +1326,7 @@ bool SfxObjectShell::DoSave()
 {
 try // tdf#134582 set Version on embedded objects as they
 {   // could have been loaded with a different/old version
-uno::Reference const xModule(GetModel(), 
uno::UNO_QUERY);
-bool const isBaseForm(xModule.is() &&
-xModule->getIdentifier() == 
"com.sun.star.sdb.FormDesign");
-SAL_INFO_IF(isBaseForm, "sfx.doc", "tdf#138209 force form 
export to ODF 1.2");
-if (!isBaseForm && SvtSaveOptions::ODFSVER_013 <= 
nDefVersion)
-{
-xProps->setPropertyValue(u"Version"_ustr, 
uno::Any(ODFVER_013_TEXT));
-}
-else
-{
-xProps->setPropertyValue(u"Version"_ustr, 
uno::Any(ODFVER_012_TEXT));
-}
+xProps->setPropertyValue(u"Version"_ustr, 
getODFVersionAny(nDefVersion));
 }

core.git: Branch 'libreoffice-25-2' - sw/source

2025-01-07 Thread Xisco Fauli (via logerrit)
 sw/source/core/layout/colfrm.cxx |   14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 32e792800a6635da9cdf88a2348e72c35286a2a2
Author: Xisco Fauli 
AuthorDate: Mon Dec 23 11:44:19 2024 +0100
Commit: Michael Stahl 
CommitDate: Tue Jan 7 12:28:16 2025 +0100

crashreporting: check Lower()

See 
https://crashreport.libreoffice.org/stats/signature/SwLayoutFrame::AdjustColumns(SwFormatCol%20const%20*,bool)

Change-Id: I690a6358c8964f5511aedf3246384649cf004d9f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179234
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit e080eebd4ebb20ddb0aff1f168096ec22b326546)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179248
Reviewed-by: Michael Stahl 

diff --git a/sw/source/core/layout/colfrm.cxx b/sw/source/core/layout/colfrm.cxx
index 8b6aa8b60a3b..5aec69496c8c 100644
--- a/sw/source/core/layout/colfrm.cxx
+++ b/sw/source/core/layout/colfrm.cxx
@@ -312,9 +312,13 @@ void SwLayoutFrame::ChgColumns( const SwFormatCol &rOld, 
const SwFormatCol &rNew
 
 void SwLayoutFrame::AdjustColumns( const SwFormatCol *pAttr, bool 
bAdjustAttributes )
 {
-if( !Lower()->GetNext() )
+SwFrame* pLower = Lower();
+if (!pLower)
+return;
+
+if( !pLower->GetNext() )
 {
-Lower()->ChgSize( getFramePrintArea().SSize() );
+pLower->ChgSize( getFramePrintArea().SSize() );
 return;
 }
 
@@ -328,7 +332,7 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol 
*pAttr, bool bAdjustAttribu
 if ( !bAdjustAttributes )
 {
 tools::Long nAvail = fnRect.GetWidth(getFramePrintArea());
-for ( SwLayoutFrame *pCol = static_cast(Lower());
+for ( SwLayoutFrame *pCol = static_cast(pLower);
   pCol;
   pCol = static_cast(pCol->GetNext()) )
 nAvail -= fnRect.GetWidth(pCol->getFrameArea());
@@ -344,7 +348,7 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol 
*pAttr, bool bAdjustAttribu
 const sal_uInt16 nMin = bLine ? sal_uInt16( 20 + ( pAttr->GetLineWidth() / 
2) ) : 0;
 
 const bool bR2L = IsRightToLeft();
-SwFrame *pCol = bR2L ? GetLastLower() : Lower();
+SwFrame *pCol = bR2L ? GetLastLower() : pLower;
 
 // #i27399#
 // bOrtho means we have to adjust the column frames manually. Otherwise
@@ -429,7 +433,7 @@ void SwLayoutFrame::AdjustColumns( const SwFormatCol 
*pAttr, bool bAdjustAttribu
 return;
 
 tools::Long nInnerWidth = ( nAvail - nGutter ) / pAttr->GetNumCols();
-pCol = Lower();
+pCol = pLower;
 for( sal_uInt16 i = 0; i < pAttr->GetNumCols() && pCol; pCol = 
pCol->GetNext(), ++i ) //i118878, value returned by GetNumCols() can't be 
trusted
 {
 SwTwips nWidth;


core.git: 2 commits - cui/source include/vcl officecfg/registry svtools/source vcl/qt5 vcl/source

2025-01-07 Thread Sahil Gautam (via logerrit)
 cui/source/options/appearance.cxx  |   10 ++---
 include/vcl/themecolors.hxx|   24 ++---
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   19 --
 svtools/source/config/colorcfg.cxx |   12 +++---
 vcl/qt5/QtCustomStyle.cxx  |8 ++--
 vcl/source/app/themecolors.cxx |   15 +++-
 6 files changed, 65 insertions(+), 23 deletions(-)

New commits:
commit 242b8a9540f8e019dbe82c11d989d20d3a0f0ea7
Author: Sahil Gautam 
AuthorDate: Tue Jan 7 10:43:29 2025 +0530
Commit: Mike Kaganski 
CommitDate: Tue Jan 7 12:24:40 2025 +0100

tdf#164393 [API CHANGE] ThemeColors refactor part 3

- add functions like IsThemeEnabled(), IsThemeDisabled(), GetThemeState(),
  SetThemeState() to check/change registry (theme state) values so that
  code outside ThemeColors class remains unaffected from any API changes,
  and use enums like ENABLED and DISABLED to represent int values from
  registry.

Change-Id: I6067cb5b0fa40d6c038e398229ef8ba93d26ca92
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179404
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/cui/source/options/appearance.cxx 
b/cui/source/options/appearance.cxx
index fa70705ab327..f36c6255809e 100644
--- a/cui/source/options/appearance.cxx
+++ b/cui/source/options/appearance.cxx
@@ -21,6 +21,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -196,11 +197,10 @@ bool SvxAppearanceTabPage::FillItemSet(SfxItemSet* /* 
rSet */)
 // commit LibreOfficeTheme, enable it if the current scheme is not 
Automatic
 if (m_xSchemeList->get_value_changed_from_saved())
 {
-bool bIsLibreOfficeThemeEnabled = m_xSchemeList->get_active_id() != 
AUTOMATIC_COLOR_SCHEME;
-auto pChange(comphelper::ConfigurationChanges::create());
-
officecfg::Office::Common::Appearance::LibreOfficeTheme::set(bIsLibreOfficeThemeEnabled,
- pChange);
-pChange->commit();
+ThemeState eLibreOfficeThemeState = m_xSchemeList->get_active_id() != 
AUTOMATIC_COLOR_SCHEME
+? ThemeState::ENABLED
+: ThemeState::DISABLED;
+ThemeColors::SetThemeState(eLibreOfficeThemeState);
 }
 
 return true;
diff --git a/include/vcl/themecolors.hxx b/include/vcl/themecolors.hxx
index 55d6d5836489..3e23368bd351 100644
--- a/include/vcl/themecolors.hxx
+++ b/include/vcl/themecolors.hxx
@@ -11,6 +11,15 @@
 #include 
 #include 
 
+/* ThemeState represents registry values for "LibreOfficeTheme" enumeration
+ * in officecfg/registry/schema/org/openoffice/Office/Common.xcs, which means
+ * that the associations here have a meaning. Please don't change it. */
+enum class ThemeState
+{
+DISABLED = 0,
+ENABLED = 1,
+};
+
 class VCL_DLLPUBLIC ThemeColors
 {
 ThemeColors() {}
@@ -28,6 +37,13 @@ public:
 return rThemeName == svtools::AUTOMATIC_COLOR_SCHEME;
 }
 
+static ThemeState GetThemeState();
+static void SetThemeState(ThemeState eState);
+
+static bool IsThemeDisabled() { return GetThemeState() == 
ThemeState::DISABLED; };
+static bool IsThemeEnabled() { return GetThemeState() == 
ThemeState::ENABLED; };
+
+// !IsThemeCached means that the ThemeColors object doesn't have the 
colors from the registry yet.
 static bool VclPluginCanUseThemeColors()
 {
 return IsThemeCached()
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs 
b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 5946b021e16a..be596df8e308 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5163,11 +5163,24 @@
   
 Specifies appearance settings for the application.
   
-  
+  
 
-  Enable UI Themeing in LibreOffice.
+  Specifies LibreOfficeTheme state.
+  LibreOffice Theme
 
-false
+
+  
+
+  Disabled
+
+  
+  
+
+  Enabled
+
+  
+
+0
   
   
 
diff --git a/svtools/source/config/colorcfg.cxx 
b/svtools/source/config/colorcfg.cxx
index 138f22025979..2ec5abf16d28 100644
--- a/svtools/source/config/colorcfg.cxx
+++ b/svtools/source/config/colorcfg.cxx
@@ -472,7 +472,7 @@ void ColorConfig::LoadThemeColorsFromRegistry()
 
 void ColorConfig::SetupTheme()
 {
-if (!officecfg::Office::Common::Appearance::LibreOfficeTheme::get()
+if (ThemeColors::IsThemeDisabled()
 || ThemeColors::IsAutomaticTheme(GetCurrentSchemeName()))
 {
 ThemeColors::SetThemeCached(false);
diff --git a/vcl/

core.git: Branch 'libreoffice-24-8' - sc/source

2025-01-07 Thread Xisco Fauli (via logerrit)
 sc/source/ui/drawfunc/fuins1.cxx |   39 +--
 1 file changed, 21 insertions(+), 18 deletions(-)

New commits:
commit 805bd3bf57f1e88d579def0ac5d2436b38fc8966
Author: Xisco Fauli 
AuthorDate: Fri Oct 18 01:56:51 2024 +0200
Commit: Michael Stahl 
CommitDate: Tue Jan 7 12:22:27 2025 +0100

tdf#163486: PVS: check pDrawView

V595The 'pDrawView' pointer was utilized before it was verified against 
nullptr. Check lines: 128, 133.

Change-Id: Ic07658428e4eb74d42d800df23b198800a9bab09
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175115
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 
(cherry picked from commit 7d9357eb5d996e4c70bbb4cd534daa9f70f78354)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175059
Reviewed-by: Michael Stahl 

diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 886d2b29ecf3..83fd3d7227c0 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -125,32 +125,35 @@ static void lcl_InsertGraphic( const Graphic& rGraphic,
 }
 }
 ScDrawView* pDrawView = rViewSh.GetScDrawView();
-const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList();
 
 // #i123922# check if an existing object is selected; if yes, evtl. replace
 // the graphic for a SdrGraphObj (including link state updates) or adapt 
the fill
 // style for other objects
-if(pDrawView && 1 == rMarkList.GetMarkCount())
+if(pDrawView)
 {
-SdrObject* pPickObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
-
-if(pPickObj)
+const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList();
+if (1 == rMarkList.GetMarkCount())
 {
-//sal_Int8 nAction(DND_ACTION_MOVE);
-//Point aPos;
-const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
-
-SdrObject* pResult = pDrawView->ApplyGraphicToObject(
-*pPickObj,
-rGraphic1,
-aBeginUndo,
-bAsLink ? rFileName : OUString());
+SdrObject* pPickObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
 
-if(pResult)
+if(pPickObj)
 {
-// we are done; mark the modified/new object
-pDrawView->MarkObj(pResult, pDrawView->GetSdrPageView());
-return;
+//sal_Int8 nAction(DND_ACTION_MOVE);
+//Point aPos;
+const OUString aBeginUndo(ScResId(STR_UNDO_DRAGDROP));
+
+SdrObject* pResult = pDrawView->ApplyGraphicToObject(
+*pPickObj,
+rGraphic1,
+aBeginUndo,
+bAsLink ? rFileName : OUString());
+
+if(pResult)
+{
+// we are done; mark the modified/new object
+pDrawView->MarkObj(pResult, pDrawView->GetSdrPageView());
+return;
+}
 }
 }
 }


core.git: solenv/gbuild

2025-01-07 Thread Stephan Bergmann (via logerrit)
 solenv/gbuild/CppunitTest.mk |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b20d18054ca5c13376bfd723b7e442c2e011c6de
Author: Stephan Bergmann 
AuthorDate: Tue Jan 7 09:38:14 2025 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Jan 7 11:33:08 2025 +0100

Move setting of LD_LIBRARY_PATH closer to invocation of cppunittester

At least for a Linux build of mine, `make CppunitTest_vcl_gtk3_a11y` would 
fail
with something like

> workdir/LinkTarget/Executable/cppunittester X11 error: Can't open display:
>Set DISPLAY environment variable, use -display option
>or check permissions of your X-Server
>(See "man X" resp. "man xhost" for details)

apparently because that test adds an invocation of xvfb-run to ICECREAM_RUN,
which appeared on the command line after gb_CppunitTest_CPPTESTPRECOMMAND
(which, on Linux, sets up LD_LIBRARY_PATH to include instdir/program), so 
that
the execution of xvfb-run picked up libraries from instdir/program instead 
of
from the system (at least libpixman-1.so.0, it appears), which then 
apparently
caused things to not work well.

So move the contents of gb_CppunitTest_CPPTESTPRECOMMAND further down on the
command line (which then requires an invocation of `env`).  (This still 
leaves
me with a `make CppunitTest_vcl_gtk3_a11y` that fails in a different way 
now,
but that's something for another day...)

Change-Id: Ic53dd8f87e3fa548a998363f5489819a02b2bf8b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179862
Reviewed-by: Stephan Bergmann 
Tested-by: Jenkins

diff --git a/solenv/gbuild/CppunitTest.mk b/solenv/gbuild/CppunitTest.mk
index 7ff3caec5f31..4aca3b7f2186 100644
--- a/solenv/gbuild/CppunitTest.mk
+++ b/solenv/gbuild/CppunitTest.mk
@@ -146,7 +146,6 @@ else
$(if $(filter allow,$(NON_APPLICATION_FONT_USE)),, \
$(if $(filter 
abort,$(NON_APPLICATION_FONT_USE)),SAL_NON_APPLICATION_FONT_USE=abort, \
$(if $(filter 
deny,$(NON_APPLICATION_FONT_USE)),SAL_NON_APPLICATION_FONT_USE=deny))) \
-   $(if $(filter 
gdb,$(gb_CppunitTest_GDBTRACE)),,$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
$(if $(G_SLICE),G_SLICE=$(G_SLICE)) \
$(if 
$(GLIBCXX_FORCE_NEW),GLIBCXX_FORCE_NEW=$(GLIBCXX_FORCE_NEW)) \
$(if $(strip $(PYTHON_URE)),\
@@ -155,6 +154,7 @@ else
PYTHONWARNINGS=default) \
LO_RUNNING_UNIT_TEST=1 \
$(ICECREAM_RUN) $(gb_CppunitTest_coredumpctl_run) 
$(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) $(gb_CppunitTest_RR) \
+   $(if $(filter gdb,$(gb_CppunitTest_GDBTRACE)),,env 
$(gb_CppunitTest_CPPTESTPRECOMMAND)) \
$(gb_CppunitTest_CPPTESTCOMMAND) \
$(call gb_CppunitTest_get_linktarget_target,$*) \
$(call gb_CppunitTest__make_args) "-env:CPPUNITTESTTARGET=$@" \


core.git: Branch 'libreoffice-25-2' - sc/qa sc/source sw/qa sw/source

2025-01-07 Thread Andreas Heinisch (via logerrit)
 sc/qa/filter/html/data/tdf132770_inserted_text.html   |1 
 sc/qa/filter/html/html.cxx|   24 ++
 sc/source/filter/html/htmlpars.cxx|2 +
 sw/qa/extras/htmlimport/data/tdf132770-inserted-text.html |1 
 sw/qa/extras/htmlimport/htmlimport.cxx|   12 +++
 sw/source/filter/html/swhtml.cxx  |2 -
 6 files changed, 41 insertions(+), 1 deletion(-)

New commits:
commit c21dba1350d0c810200acee15347f5cfcd75ada7
Author: Andreas Heinisch 
AuthorDate: Sat Jan 4 11:44:39 2025 +0100
Commit: Xisco Fauli 
CommitDate: Tue Jan 7 09:52:31 2025 +0100

tdf#132770 - FORMATTING: Import inserted text tag  (underlined)

Change-Id: I5819ce4d4551bbd781921d847131f15cf2b94a38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179771
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch 
(cherry picked from commit 7112bc2a98b06217302fb18e52fcbd03f8744f79)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179840
Reviewed-by: Xisco Fauli 

diff --git a/sc/qa/filter/html/data/tdf132770_inserted_text.html 
b/sc/qa/filter/html/data/tdf132770_inserted_text.html
new file mode 100644
index ..d07966ffef47
--- /dev/null
+++ b/sc/qa/filter/html/data/tdf132770_inserted_text.html
@@ -0,0 +1 @@
+ins
\ No newline at end of file
diff --git a/sc/qa/filter/html/html.cxx b/sc/qa/filter/html/html.cxx
index 2f6b9cb249b8..2c1d02aab0b5 100644
--- a/sc/qa/filter/html/html.cxx
+++ b/sc/qa/filter/html/html.cxx
@@ -14,6 +14,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -231,6 +232,29 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf79298_strikeout_variants)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf132770_inserted_text)
+{
+// Given a document with an inserted text tag 
+OUString aURL = createFileURL(u"tdf132770_inserted_text.html");
+
+// When loading that document to Calc:
+uno::Sequence aParams = {
+comphelper::makePropertyValue(u"DocumentService"_ustr,
+  
u"com.sun.star.sheet.SpreadsheetDocument"_ustr),
+};
+loadWithParams(aURL, aParams);
+
+// Verify HTML inserted text tag 
+ScDocument* pDoc = getScDoc();
+const ScPatternAttr* pAttr = pDoc->GetPattern(ScAddress(0, 0, 0));
+CPPUNIT_ASSERT_MESSAGE("Failed to get cell attribute.", pAttr);
+const SvxUnderlineItem& rUnderlineItem = 
pAttr->GetItem(ATTR_FONT_UNDERLINE);
+// Without the accompanying fix in place, this tests would have failed 
with:
+// - Expected: 1 (FontLineStyle::LINESTYLE_SINGLE)
+// - Actual  : 0 (FontLineStyle::NONE)
+CPPUNIT_ASSERT_EQUAL(FontLineStyle::LINESTYLE_SINGLE, 
rUnderlineItem.GetLineStyle());
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testCopyText)
 {
 // Given a document with 01 in A1:
diff --git a/sc/source/filter/html/htmlpars.cxx 
b/sc/source/filter/html/htmlpars.cxx
index 6c225c3020c8..a4e0f7069a1f 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -1804,6 +1804,7 @@ void ScHTMLLayoutParser::ProcToken( HtmlImportInfo* pInfo 
)
 }
 break;
 case HtmlTokenId::UNDERLINE_ON :
+case HtmlTokenId::INSERTEDTEXT_ON:
 {
 if ( IsAtBeginningOfText( pInfo ) )
 mxActEntry->aItemSet.Put( SvxUnderlineItem( LINESTYLE_SINGLE,
@@ -3099,6 +3100,7 @@ void ScHTMLQueryParser::ProcessToken( const 
HtmlImportInfo& rInfo )
 break;
 
 case HtmlTokenId::UNDERLINE_ON: // 
+case HtmlTokenId::INSERTEDTEXT_ON:  // 
 mpCurrTable->PutItem( SvxUnderlineItem( LINESTYLE_SINGLE, 
ATTR_FONT_UNDERLINE ) );
 break;
 default: break;
diff --git a/sw/qa/extras/htmlimport/data/tdf132770-inserted-text.html 
b/sw/qa/extras/htmlimport/data/tdf132770-inserted-text.html
new file mode 100644
index ..d07966ffef47
--- /dev/null
+++ b/sw/qa/extras/htmlimport/data/tdf132770-inserted-text.html
@@ -0,0 +1 @@
+ins
\ No newline at end of file
diff --git a/sw/qa/extras/htmlimport/htmlimport.cxx 
b/sw/qa/extras/htmlimport/htmlimport.cxx
index 746379b6f7b1..c118872158cb 100644
--- a/sw/qa/extras/htmlimport/htmlimport.cxx
+++ b/sw/qa/extras/htmlimport/htmlimport.cxx
@@ -395,6 +395,18 @@ CPPUNIT_TEST_FIXTURE(HtmlImportTest, 
testTdf79298StrikeoutVariants)
 getProperty(getRun(getParagraph(3), 1), 
u"CharStrikeout"_ustr));
 }
 
+CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf132770InsertedText)
+{
+createSwWebDoc("tdf132770-inserted-text.html");
+
+// Without the accompanying fix in place, this tests would have failed 
with:
+// - Expected: 1 (FontLineStyle::LINESTYLE_SINGLE)
+// - Actual  : 0 (FontLineStyle::NONE)
+CPPUNIT_ASSERT_EQUAL_MESSAGE(
+"Underline for  missing", sal_Int16(awt::FontUnderline::SINGLE),
+getProperty(getRun(getParagraph(1), 1), 
u"CharUnderline"_ustr));
+}
+
 CPPUNIT_TEST_FIXTURE(HtmlImportTest, testTdf142781)
 

core.git: Branch 'libreoffice-25-2' - oox/source sd/qa

2025-01-07 Thread Balazs Varga (via logerrit)
 oox/source/drawingml/fillproperties.cxx |   13 +
 sd/qa/unit/data/pptx/tdf163852.pptx |binary
 sd/qa/unit/import-tests2.cxx|   18 ++
 3 files changed, 31 insertions(+)

New commits:
commit f0f813ab5e7dc48924e9d42889912c3fb79208eb
Author: Balazs Varga 
AuthorDate: Thu Jan 2 16:45:10 2025 +0100
Commit: Xisco Fauli 
CommitDate: Tue Jan 7 09:53:45 2025 +0100

tdf#163852 ooxml: fix import of cropped vector graphic objects

We need to store the vector graphic objects size, so later
we can calculate with that for the cropping.

follow-up commit of: 1db193c6c744289139b1df2af0b8defcf974b238
(tdf#126084 import svg image from ooxml document that use svgBlip elem)

Change-Id: Iffa98cc6a03063544bdf2b8ec3012415868e7c65
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179626
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
Tested-by: Gabor Kelemen 
(cherry picked from commit 63753117640dde3e8e0b0e677afe26b7f57c626b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179838
Reviewed-by: Xisco Fauli 

diff --git a/oox/source/drawingml/fillproperties.cxx 
b/oox/source/drawingml/fillproperties.cxx
index eaeb0029c415..b75dfed5aac8 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -832,6 +832,19 @@ void GraphicProperties::pushToPropMap( PropertyMap& 
rPropMap, const GraphicHelpe
 {
 geometry::IntegerRectangle2D oClipRect( 
maBlipProps.moClipRect.value() );
 awt::Size aOriginalSize( rGraphicHelper.getOriginalSize( xGraphic 
) );
+
+if (aOriginalSize.Width <= 0 || aOriginalSize.Height <= 0)
+{
+// VectorGraphic Objects need the correct object size for 
cropping
+Graphic aGraphic(xGraphic);
+if (aGraphic.getVectorGraphicData())
+{
+Size aPrefSize = aGraphic.GetPrefSize();
+aOriginalSize.Height = 
static_cast(aPrefSize.getHeight());
+aOriginalSize.Width = 
static_cast(aPrefSize.getWidth());
+}
+}
+
 if (aOriginalSize.Width > 0 && aOriginalSize.Height > 0)
 {
 text::GraphicCrop aGraphCrop( 0, 0, 0, 0 );
diff --git a/sd/qa/unit/data/pptx/tdf163852.pptx 
b/sd/qa/unit/data/pptx/tdf163852.pptx
new file mode 100644
index ..542a8268f6f8
Binary files /dev/null and b/sd/qa/unit/data/pptx/tdf163852.pptx differ
diff --git a/sd/qa/unit/import-tests2.cxx b/sd/qa/unit/import-tests2.cxx
index 8e9b7f5f72b9..13a86cf25d77 100644
--- a/sd/qa/unit/import-tests2.cxx
+++ b/sd/qa/unit/import-tests2.cxx
@@ -1370,6 +1370,24 @@ CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf149206)
 CPPUNIT_ASSERT_EQUAL(static_cast(0), aCrop.Right);
 }
 
+CPPUNIT_TEST_FIXTURE(SdImportTest2, testtdf163852)
+{
+// Check that the svg image is cropped
+createSdImpressDoc("pptx/tdf163852.pptx");
+
+uno::Reference 
xPropertySet(getShapeFromPage(/*nShape=*/1, /*nPage=*/0));
+text::GraphicCrop aCrop;
+xPropertySet->getPropertyValue(u"GraphicCrop"_ustr) >>= aCrop;
+
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aCrop.Top);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aCrop.Left);
+CPPUNIT_ASSERT_EQUAL(static_cast(0), aCrop.Right);
+// Without the fix in place, this test would have failed with
+// - Expected: 702
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(static_cast(702), aCrop.Bottom);
+}
+
 CPPUNIT_TEST_FIXTURE(SdImportTest2, testTdf149785)
 {
 // Without the fix in place, this test would have failed to load the file


core.git: Branch 'libreoffice-25-2' - sw/source

2025-01-07 Thread Szymon Kłos (via logerrit)
 sw/source/core/crsr/crsrsh.cxx  |   16 
 sw/source/uibase/wrtsh/move.cxx |9 +
 2 files changed, 1 insertion(+), 24 deletions(-)

New commits:
commit c38c2a53d42c8e42f0b4bb4b6906e7f0fdc30f43
Author: Szymon Kłos 
AuthorDate: Fri Nov 29 10:29:13 2024 +0100
Commit: Xisco Fauli 
CommitDate: Tue Jan 7 09:54:19 2025 +0100

Revert "lok: sw: fix PageDown position when cursor is not visible"

This reverts commit ddb454bb80622a2fd625bc09af8a66b025b0739f.
lok: sw: fix PageDown position when cursor is not visible

It caused sending of incorrect cursor position during tile rendering
in LOK case - LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR while
`SwCursorShell::VisPortChgd` <- which is used eg. in the PaintTile to
make interesting part visible:
```
libswlo.so!SwCursorShell::VisPortChgd(SwCursorShell * this, const SwRect & 
rRect) (sw/source/core/crsr/crsrsh.cxx:1800)
libswlo.so!SwViewShell::PaintTile(SwViewShell * this, VirtualDevice & 
rDevice, int contextWidth, int contextHeight, int tilePosX, int tilePosY, 
tools::Long tileWidth, tools::Long tileHeight) 
(sw/source/core/view/viewsh.cxx:2034)
```

There are 2 problems:
1. It generates and sends it just-now, not using the optimized delayed 
version `SfxLokHelper::notifyUpdatePerViewId`
2. Even more important: rendering tiles shouldn't cause cursor 
movement/invalidation

Change-Id: I2315cf7dd5575586276b86ca5285d6c5b15ff73a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177520
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179613
Reviewed-by: Szymon Kłos 
Tested-by: Jenkins
(cherry picked from commit d8a7b0e9708603aca3f18107e47cb6872598c725)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179700
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index 6386b8673856..3c026b0f6391 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -78,7 +78,6 @@
 #include 
 #include 
 #include 
-#include 
 
 using namespace com::sun::star;
 
@@ -1831,21 +1830,6 @@ void SwCursorShell::VisPortChgd( const SwRect & rRect )
 if( m_bSVCursorVis && bVis ) // show SV cursor again
 m_pVisibleCursor->Show();
 
-if( comphelper::LibreOfficeKit::isActive() && !rRect.Overlaps( m_aCharRect 
))
-{
-boost::property_tree::ptree aParams;
-tools::Rectangle aRect(rRect.TopLeft(), Size(1, 1));
-
-aParams.put("rectangle", aRect.toString());
-aParams.put("scroll", true);
-aParams.put("hyperlink", "");
-
-SfxLokHelper::notifyOtherView(GetSfxViewShell(),
-  GetSfxViewShell(),
-  LOK_CALLBACK_INVALIDATE_VISIBLE_CURSOR,
-  aParams);
-}
-
 if( m_nCursorMove )
 m_bInCMvVisportChgd = true;
 
diff --git a/sw/source/uibase/wrtsh/move.cxx b/sw/source/uibase/wrtsh/move.cxx
index 2b6c7745b75b..0a58d03e6779 100644
--- a/sw/source/uibase/wrtsh/move.cxx
+++ b/sw/source/uibase/wrtsh/move.cxx
@@ -27,7 +27,6 @@
 #include 
 #include 
 #include 
-#include 
 
 /**
Always:
@@ -455,13 +454,7 @@ bool SwWrtShell::PushCursor(SwTwips lOffset, bool bSelect)
 {
 Point aPt( aOldRect.Center() );
 
-if (SfxViewShell* pKitView = comphelper::LibreOfficeKit::isActive() ? 
GetSfxViewShell() : nullptr)
-{
-SwRect aLOKVis(pKitView->getLOKVisibleArea());
-if (!aLOKVis.Overlaps(aOldRect))
-aPt.setY( aLOKVis.Top() + aLOKVis.Height() / 2 );
-}
-else if( !IsCursorVisible() )
+if( !IsCursorVisible() )
 // set CursorPos to top-/bottom left pos. So the pagescroll is not
 // be dependent on the current cursor, but on the visarea.
 aPt.setY( aTmpArea.Top() + aTmpArea.Height() / 2 );


core.git: Branch 'libreoffice-25-2' - sc/source

2025-01-07 Thread Caolán McNamara (via logerrit)
 sc/source/core/tool/interpr1.cxx |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 791bce14b10a27da2a4172865b9ba260fa3da098
Author: Caolán McNamara 
AuthorDate: Mon Jan 6 15:01:00 2025 +
Commit: Xisco Fauli 
CommitDate: Tue Jan 7 09:54:40 2025 +0100

crashtesting: assert on reimport of forum-mso-en4-29087.ods

conversion of xlsx to ods and reload

Change-Id: I8f1f10520e3601326405acd90a310ebd6163ffbe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179834
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 
(cherry picked from commit 202de88b10cf0b7ba16a3c767865a386f04c355f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179836
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 2116cab1297f..d3af5a51f8a4 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -10207,7 +10207,9 @@ void ScInterpreter::ScIndex()
 SetError(FormulaError::IllegalArgument);
 sal_uInt16 nOldSp = sp;
 ScMatrixRef pMat = GetMatrix();
-if (pMat)
+if (!pMat)
+PushError(FormulaError::NoRef);
+else
 {
 SCSIZE nC, nR;
 pMat->GetDimensions(nC, nR);


core.git: Branch 'libreoffice-25-2' - sw/source

2025-01-07 Thread Caolán McNamara (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |   12 ++--
 sw/source/filter/ww8/docxattributeoutput.hxx |7 +--
 2 files changed, 15 insertions(+), 4 deletions(-)

New commits:
commit cdb9efdb6adea8cc0e4ba54af381e297ceaf03bf
Author: Caolán McNamara 
AuthorDate: Mon Jan 6 12:07:46 2025 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 10:04:47 2025 +0100

crashtesting: assert on reimport of forum-mso-en-2419.docx

after export to docx. Use similar duplicate preventation mechanism as
normal bookmarks and annotations use.

Change-Id: I31a70f1ee437a5d8cce790c7ec2c7a8d5894d3f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179828
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins
(cherry picked from commit 08111edaeb425f1b66d0c69c415dbd7d2f44ac8c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179837

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 69408eddad61..222ac359e906 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2336,8 +2336,12 @@ void 
DocxAttributeOutput::DoWriteBookmarksEnd(std::vector& rEnds)
 // - "permission-for-user::"
 // - "permission-for-group::"
 //
-void DocxAttributeOutput::DoWritePermissionTagStart(std::u16string_view 
permission)
+void DocxAttributeOutput::DoWritePermissionTagStart(const OUString& permission)
 {
+if (m_aOpenedPermissions.find(permission) != m_aOpenedPermissions.end())
+return;
+m_aOpenedPermissions.insert(permission);
+
 std::u16string_view permissionIdAndName;
 
 if (o3tl::starts_with(permission, u"permission-for-group:", 
&permissionIdAndName))
@@ -2375,8 +2379,11 @@ void 
DocxAttributeOutput::DoWritePermissionTagStart(std::u16string_view permissi
 // - "permission-for-user::"
 // - "permission-for-group::"
 //
-void DocxAttributeOutput::DoWritePermissionTagEnd(std::u16string_view 
permission)
+void DocxAttributeOutput::DoWritePermissionTagEnd(const OUString& permission)
 {
+if (m_aOpenedPermissions.find(permission) == m_aOpenedPermissions.end())
+return;
+
 std::u16string_view permissionIdAndName;
 
 auto const ok = o3tl::starts_with(permission, u"permission-for-group:", 
&permissionIdAndName) ||
@@ -2389,6 +2396,7 @@ void 
DocxAttributeOutput::DoWritePermissionTagEnd(std::u16string_view permission
 
 m_pSerializer->singleElementNS(XML_w, XML_permEnd,
 FSNS(XML_w, XML_id), GetExport().BookmarkToWord(permissionId));
+m_aOpenedPermissions.erase(permission);
 }
 
 /// Write the start permissions
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 385ce344c21d..e19940a673a2 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -783,8 +783,8 @@ private:
 void DoWriteBookmarkStartIfExist(sal_Int32 nRunPos);
 void DoWriteBookmarkEndIfExist(sal_Int32 nRunPos);
 
-void DoWritePermissionTagStart(std::u16string_view permission);
-void DoWritePermissionTagEnd(std::u16string_view permission);
+void DoWritePermissionTagStart(const OUString& permission);
+void DoWritePermissionTagEnd(const OUString& permission);
 void DoWritePermissionsStart();
 void DoWritePermissionsEnd();
 
@@ -927,6 +927,9 @@ private:
 /// Name of the last opened annotation mark.
 OUString m_sLastOpenedAnnotationMark;
 
+/// Set of currently opened permissions
+std::unordered_set m_aOpenedPermissions;
+
 /// If there are bookmarks around sequence fields, this map contains the
 /// names of these bookmarks for each sequence.
 std::map > m_aSeqBookmarksNames;


core.git: 2 commits - include/vcl svtools/source vcl/osx vcl/qt5 vcl/unx vcl/win

2025-01-07 Thread Sahil Gautam (via logerrit)
 include/vcl/themecolors.hxx   |6 
 svtools/source/config/colorcfg.cxx|   12 +---
 vcl/osx/salframe.cxx  |4 +-
 vcl/osx/salnativewidgets.cxx  |   12 
 vcl/qt5/QtCustomStyle.cxx |3 --
 vcl/qt5/QtMenu.cxx|6 +---
 vcl/unx/gtk3/custom-theme.cxx |3 --
 vcl/unx/gtk3/salnativewidgets-gtk.cxx |2 -
 vcl/win/gdi/salnativewidgets-luna.cxx |   50 +-
 vcl/win/window/salframe.cxx   |4 +-
 10 files changed, 54 insertions(+), 48 deletions(-)

New commits:
commit c398498fe155790a8e6510353427ffa5224343ac
Author: Sahil Gautam 
AuthorDate: Tue Jan 7 10:05:08 2025 +0530
Commit: Mike Kaganski 
CommitDate: Tue Jan 7 09:19:23 2025 +0100

tdf#164393 ThemeColors refactor part 1

- Use a single `ThemeColors::VclPluginCanUseThemeColors()` check instead of
  `ThemeColors::IsThemeLoaded()` and then checking if the current scheme
  is Automatic or not

Change-Id: I96294c3b4b75b5f2cee02c72a8b0dd1a85bedec4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179853
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/include/vcl/themecolors.hxx b/include/vcl/themecolors.hxx
index 80f56db5e0e4..67551dbdac8d 100644
--- a/include/vcl/themecolors.hxx
+++ b/include/vcl/themecolors.hxx
@@ -28,6 +28,12 @@ public:
 return rThemeName == svtools::AUTOMATIC_COLOR_SCHEME;
 }
 
+static bool VclPluginCanUseThemeColors()
+{
+return IsThemeLoaded()
+   && 
!ThemeColors::IsAutomaticTheme(ThemeColors::GetThemeColors().GetThemeName());
+};
+
 void SetWindowColor(const Color& rColor) { m_aWindowColor = rColor; }
 void SetWindowTextColor(const Color& rColor) { m_aWindowTextColor = 
rColor; }
 void SetBaseColor(const Color& rColor) { m_aBaseColor = rColor; }
diff --git a/vcl/osx/salframe.cxx b/vcl/osx/salframe.cxx
index 4e1266234f1f..a5e74df04386 100644
--- a/vcl/osx/salframe.cxx
+++ b/vcl/osx/salframe.cxx
@@ -1557,7 +1557,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 StyleSettings aStyleSettings = rSettings.GetStyleSettings();
 
 bool bUseDarkMode(GetUseDarkMode());
-if (!ThemeColors::IsThemeLoaded())
+if (!ThemeColors::VclPluginCanUseThemeColors())
 {
 OUString sThemeName(!bUseDarkMode ? u"sukapura_svg" : 
u"sukapura_dark_svg");
 aStyleSettings.SetPreferredIconTheme(sThemeName, bUseDarkMode);
@@ -1731,7 +1731,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 aStyleSettings.SetHideDisabledMenuItems( true );
 aStyleSettings.SetPreferredContextMenuShortcuts( false );
 
-if (ThemeColors::IsThemeLoaded())
+if (ThemeColors::VclPluginCanUseThemeColors())
 lcl_LoadColorsFromTheme(aStyleSettings);
 
 rSettings.SetStyleSettings( aStyleSettings );
diff --git a/vcl/osx/salnativewidgets.cxx b/vcl/osx/salnativewidgets.cxx
index 07f26c51171a..cfbb154eef74 100644
--- a/vcl/osx/salnativewidgets.cxx
+++ b/vcl/osx/salnativewidgets.cxx
@@ -423,7 +423,7 @@ static void drawBox(CGContextRef context, const NSRect& rc, 
NSColor* pColor)
 static void drawEditableBackground(CGContextRef context, const NSRect& rc)
 {
 CGContextSaveGState(context);
-if (ThemeColors::IsThemeLoaded())
+if (ThemeColors::VclPluginCanUseThemeColors())
 CGContextSetFillColorWithColor(context, 
colorFromRGB(ThemeColors::GetThemeColors().GetBaseColor()).CGColor);
 else
 CGContextSetFillColorWithColor(context, [NSColor 
controlBackgroundColor].CGColor);
@@ -443,14 +443,14 @@ bool 
AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType,
 AquaSalFrame* mpFrame)
 {
 bool bOK = false;
-bool bThemeLoaded(ThemeColors::IsThemeLoaded());
+bool bCanUseThemeColors(ThemeColors::VclPluginCanUseThemeColors());
 AquaSalInstance* pInst = GetSalData()->mpInstance;
 HIRect rc = ImplGetHIRectFromRectangle(rControlRegion);
 switch (nType)
 {
 case ControlType::Toolbar:
 {
-if (bThemeLoaded)
+if (bCanUseThemeColors)
 drawBox(context, rc, 
colorFromRGB(ThemeColors::GetThemeColors().GetWindowColor()));
 else
 drawBox(context, rc, NSColor.windowBackgroundColor);
@@ -459,7 +459,7 @@ bool 
AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType,
 break;
 case ControlType::WindowBackground:
 {
-if (bThemeLoaded)
+if (bCanUseThemeColors)
 drawBox(context, rc, 
colorFromRGB(ThemeColors::GetThemeColors().GetWindowColor()));
 else
 drawBox(context, rc, NSColor.windowBackgroundColor);
@@ -470,7 +470,7 @@ bool 
AquaGraphicsBackendBase::performDrawNativeControl(ControlType nType,
 {
 rc.size.width += 2;
 rc.size.height += 2;
-if (b

core.git: sc/source

2025-01-07 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xelink.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 410653b9f654a0a265fffbb79c0bac0205b52278
Author: Caolán McNamara 
AuthorDate: Mon Jan 6 21:11:29 2025 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 09:25:36 2025 +0100

crashtesting: raw & exported unescaped to xl/externalLinks/externalLink1.xml

seen on reimport of xlsx export of forum-mso-en4-136321.xlsx as:

XmlFilterBase::importFragment - XML parser failed in fragment 
'xl/externalLinks/externalLink1.xml'
com.sun.star.xml.sax.SAXParseException message: 
"[xl/externalLinks/externalLink1.xml line 2]: xmlParseEntityRef: no name

Change-Id: I71f2d5b01905349bedff7c66fc4b087358569bd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179845
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/sc/source/filter/excel/xelink.cxx 
b/sc/source/filter/excel/xelink.cxx
index 520e06b8ab74..4374b0bc3ef7 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1235,7 +1235,7 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm )
 {
 pFS->startElement(XML_cell, XML_r, 
XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), ScRange(aAdr)), XML_t, "str");
 pFS->startElement(XML_v);
-pFS->write( rValue.get< OUString >() );
+pFS->writeEscaped( rValue.get< OUString >() );
 }
 else if( rValue.has< bool >() )
 {


core.git: Branch 'libreoffice-25-2' - include/svx sd/source svx/source

2025-01-07 Thread Noel Grandin (via logerrit)
 include/svx/annotation/ObjectAnnotationData.hxx |5 +
 include/svx/svdobj.hxx  |4 ++--
 sd/source/ui/annotations/annotationmanager.cxx  |2 +-
 svx/source/annotation/AnnotationObject.cxx  |2 +-
 svx/source/svdraw/svdobj.cxx|   12 +++-
 svx/source/svdraw/svdpage.cxx   |2 +-
 6 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit 4c17b9c33b5d8bee3bbc3f645d8dd2ed88198e88
Author: Noel Grandin 
AuthorDate: Thu Dec 26 15:38:24 2024 +0200
Commit: Noel Grandin 
CommitDate: Tue Jan 7 12:09:14 2025 +0100

no need to allocate AnnotationData for every SdrObject

SdrObject is performance sensitive, because we allocate a boatload
of them when drawing charts. Avoiding an extra allocation that
only a tiny handful of SdrObjects need is worthwhile.

Change-Id: I4974bc1eacfe8abcce45ea659d9edaa8694135d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179433
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179869

diff --git a/include/svx/annotation/ObjectAnnotationData.hxx 
b/include/svx/annotation/ObjectAnnotationData.hxx
index 4530df2fb61c..f7dc220d789d 100644
--- a/include/svx/annotation/ObjectAnnotationData.hxx
+++ b/include/svx/annotation/ObjectAnnotationData.hxx
@@ -19,9 +19,6 @@ namespace sdr::annotation
 class ObjectAnnotationData
 {
 public:
-/// Does the (sdr) object represent an annotation
-bool mbIsAnnotation : 1 = false;
-
 /// The annotation
 rtl::Reference mxAnnotation;
 
@@ -31,7 +28,7 @@ public:
 /// Open popup for the annotation
 void openPopup()
 {
-if (mbIsAnnotation && mpAnnotationPopup)
+if (mpAnnotationPopup)
 mpAnnotationPopup->openPopup();
 }
 };
diff --git a/include/svx/svdobj.hxx b/include/svx/svdobj.hxx
index d109c15f3ee3..927d0f55fba2 100644
--- a/include/svx/svdobj.hxx
+++ b/include/svx/svdobj.hxx
@@ -361,8 +361,8 @@ public:
 virtual bool IsDecorative() const;
 
 // Object representing an annotation
-bool isAnnotationObject() const;
-void setAsAnnotationObject(bool bSetAnnotation);
+bool isAnnotationObject() const { return bool(mpAnnotationData); }
+void setAsAnnotationObject();
 std::unique_ptr& 
getAnnotationData();
 
 // for group objects
diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index 9d22ed38d735..ec876c667aaa 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -949,7 +949,7 @@ namespace
 
 void applyAnnotationCommon(SdrObject& rObject, 
rtl::Reference const& xAnnotation)
 {
-rObject.setAsAnnotationObject(true);
+rObject.setAsAnnotationObject();
 auto& xAnnotationData = rObject.getAnnotationData();
 xAnnotationData->mpAnnotationPopup.reset(new AnnotationPopup(xAnnotation));
 xAnnotationData->mxAnnotation = xAnnotation;
diff --git a/svx/source/annotation/AnnotationObject.cxx 
b/svx/source/annotation/AnnotationObject.cxx
index 55175ba90998..88e63d5565ad 100644
--- a/svx/source/annotation/AnnotationObject.cxx
+++ b/svx/source/annotation/AnnotationObject.cxx
@@ -139,7 +139,7 @@ AnnotationObject::AnnotationObject(SdrModel& rSdrModel, 
tools::Rectangle const&
 
 void AnnotationObject::setup()
 {
-setAsAnnotationObject(true);
+setAsAnnotationObject();
 mbTextFrame = true; // need this so the frame can be adjusted to the text
 bool bLOK = comphelper::LibreOfficeKit::isActive();
 SetVisible(getSdrModelFromSdrObject().IsPDFDocument() || !bLOK);
diff --git a/svx/source/svdraw/svdobj.cxx b/svx/source/svdraw/svdobj.cxx
index 3d37873a52cc..4eb5146a0c0e 100644
--- a/svx/source/svdraw/svdobj.cxx
+++ b/svx/source/svdraw/svdobj.cxx
@@ -338,7 +338,6 @@ SdrObject::SdrObject(SdrModel& rSdrModel)
 : mpFillGeometryDefiningShape(nullptr)
 , mrSdrModelFromSdrObject(rSdrModel)
 , m_pUserCall(nullptr)
-, mpAnnotationData(new sdr::annotation::ObjectAnnotationData)
 , mpImpl(new Impl)
 , mpParentOfSdrObject(nullptr)
 , m_nOrdNum(0)
@@ -374,7 +373,6 @@ SdrObject::SdrObject(SdrModel& rSdrModel, SdrObject const & 
rSource)
 : mpFillGeometryDefiningShape(nullptr)
 , mrSdrModelFromSdrObject(rSdrModel)
 , m_pUserCall(nullptr)
-, mpAnnotationData(new sdr::annotation::ObjectAnnotationData)
 , mpImpl(new Impl)
 , mpParentOfSdrObject(nullptr)
 , m_nOrdNum(0)
@@ -854,14 +852,10 @@ bool SdrObject::IsDecorative() const
 return m_pPlusData == nullptr ? false : m_pPlusData->isDecorative;
 }
 
-bool SdrObject::isAnnotationObject() const
+void SdrObject::setAsAnnotationObject()
 {
-return mpAnnotationData->mbIsAnnotation;
-}
-
-void SdrObject::setAsAnnotationObject(bool bSetAnnotation)
-{
-mpAnnotationData->mbIsAnnotation = bSetAnnotation;
+if (!mpAnnotationData

core.git: Branch 'libreoffice-25-2' - sd/source

2025-01-07 Thread Tomaž Vajngerl (via logerrit)
 sd/source/ui/annotations/annotationmanager.cxx |   13 -
 1 file changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 3d3af64f315203d36940d82f54a39e51aff8c8b3
Author: Tomaž Vajngerl 
AuthorDate: Tue Jan 7 12:12:52 2025 +0900
Commit: Ilmari Lauhakangas 
CommitDate: Tue Jan 7 12:09:35 2025 +0100

tdf#162246 use main ViewShell when synching the annotations

Current ViewShell is not always available, but we use the main
ViewShell most of the time anyway in AnnotationManager, so use
that when annotation synching. Use only the current ViewShell
when opening the annotation pop-up window.

Change-Id: Ibbc8e0859d0b91617577148e76e8293cb8015941
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179849
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179871
Reviewed-by: Ilmari Lauhakangas 

diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index ec876c667aaa..6fbb13637a72 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -983,17 +983,12 @@ void AnnotationManagerImpl::SyncAnnotationObjects()
 if (!mxCurrentPage.is() || !mpDoc)
 return;
 
-sd::DrawDocShell* pDocShell = 
dynamic_cast(SfxObjectShell::Current());
-sd::ViewShell* pViewShell = pDocShell ? pDocShell->GetViewShell() : 
nullptr;
+std::shared_ptr pDrawViewShell = 
std::dynamic_pointer_cast(mrBase.GetMainViewShell());
 
-if (!pViewShell)
-{
-pViewShell = mrBase.GetMainViewShell().get();
-if (!pViewShell)
-return;
-}
+if (!pDrawViewShell)
+return;
 
-auto* pView = pViewShell->GetView();
+auto* pView = pDrawViewShell->GetView();
 if (!pView)
 return;
 


core.git: Branch 'libreoffice-25-2' - include/svx sd/source

2025-01-07 Thread Tomaž Vajngerl (via logerrit)
 include/svx/annotation/ObjectAnnotationData.hxx |9 ++
 sd/source/core/sdpage2.cxx  |4 --
 sd/source/ui/annotations/annotationmanager.cxx  |   33 +---
 sd/source/ui/annotations/annotationwindow.hxx   |2 -
 sd/source/ui/func/fusel.cxx |5 ---
 sd/source/ui/inc/annotationmanager.hxx  |3 +-
 6 files changed, 44 insertions(+), 12 deletions(-)

New commits:
commit 7485d2378cf8c680ddaace23565df3500c6b99a0
Author: Tomaž Vajngerl 
AuthorDate: Tue Jan 7 11:58:19 2025 +0900
Commit: Ilmari Lauhakangas 
CommitDate: Tue Jan 7 12:12:39 2025 +0100

tdf#164529 support annotation selection with edit (trigger pop-up)

In some instances we want to select the annotation and edit them
at the same time - trigger pop-up. This change adds back support
for that.

Also properly close the pop-ups when the view shell and window
are destroyed.

Change-Id: I17abeb39a751b148b8923eb9028d297a40a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179664
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179870
Reviewed-by: Ilmari Lauhakangas 

diff --git a/include/svx/annotation/ObjectAnnotationData.hxx 
b/include/svx/annotation/ObjectAnnotationData.hxx
index f7dc220d789d..bedbb1a0da29 100644
--- a/include/svx/annotation/ObjectAnnotationData.hxx
+++ b/include/svx/annotation/ObjectAnnotationData.hxx
@@ -19,6 +19,8 @@ namespace sdr::annotation
 class ObjectAnnotationData
 {
 public:
+~ObjectAnnotationData() { closePopup(); }
+
 /// The annotation
 rtl::Reference mxAnnotation;
 
@@ -31,6 +33,13 @@ public:
 if (mpAnnotationPopup)
 mpAnnotationPopup->openPopup();
 }
+
+/// Close popup for the annotation
+void closePopup()
+{
+if (mpAnnotationPopup)
+mpAnnotationPopup->closePopup();
+}
 };
 }
 
diff --git a/sd/source/core/sdpage2.cxx b/sd/source/core/sdpage2.cxx
index 794b30f2c592..08194915d4a0 100644
--- a/sd/source/core/sdpage2.cxx
+++ b/sd/source/core/sdpage2.cxx
@@ -603,9 +603,7 @@ void 
SdPage::removeAnnotationNoNotify(rtl::ReferenceisAnnotationObject() && 
pObject->getAnnotationData()->mxAnnotation == xAnnotation)
 {
-auto& pAnnotationPopup = 
pObject->getAnnotationData()->mpAnnotationPopup;
-if (pAnnotationPopup)
-pAnnotationPopup->closePopup();
+pObject->getAnnotationData()->closePopup();
 RemoveObject(nObjectIndex);
 }
 }
diff --git a/sd/source/ui/annotations/annotationmanager.cxx 
b/sd/source/ui/annotations/annotationmanager.cxx
index 6fbb13637a72..cfcfa52ef971 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -25,6 +25,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -208,6 +209,22 @@ void AnnotationManagerImpl::init()
 // WeakComponentImplHelper
 void AnnotationManagerImpl::disposing (std::unique_lock&)
 {
+for (sal_uInt16 i = 0; i < mpDoc->GetPageCount(); i++)
+{
+SdrPage* pPage = mpDoc->GetPage(i);
+SdrObjListIter aIterator(pPage, SdrIterMode::DeepWithGroups);
+while (aIterator.IsMore())
+{
+SdrObject* pObject = aIterator.Next();
+if (pObject)
+{
+auto& xAnnotationData = pObject->getAnnotationData();
+if (xAnnotationData)
+xAnnotationData->closePopup();
+}
+}
+}
+
 try
 {
 uno::Reference xModel 
(mrBase.GetDocShell()->GetModel(), uno::UNO_QUERY_THROW);
@@ -875,9 +892,19 @@ void AnnotationManagerImpl::SelectNextAnnotation(bool 
bForward)
 while( true );
 }
 
-void 
AnnotationManagerImpl::SelectAnnotation(rtl::Reference
 const& xAnnotation, bool /*bEdit*/)
+void 
AnnotationManagerImpl::SelectAnnotation(rtl::Reference
 const& xAnnotation, bool bEdit)
 {
 mxSelectedAnnotation = xAnnotation;
+if (bEdit)
+{
+SdrObject* pObject = xAnnotation->findAnnotationObject();
+if (pObject)
+{
+auto& pAnnotationData = pObject->getAnnotationData();
+if (pAnnotationData)
+pAnnotationData->openPopup();
+}
+}
 }
 
 void AnnotationManagerImpl::GetSelectedAnnotation( 
rtl::Reference& xAnnotation )
@@ -1287,9 +1314,9 @@ void AnnotationManager::GetAnnotationState(SfxItemSet& 
rItemSet)
 mxImpl->GetAnnotationState(rItemSet);
 }
 
-void 
AnnotationManager::SelectAnnotation(rtl::Reference 
const& xAnnotation)
+void 
AnnotationManager::SelectAnnotation(rtl::Reference 
const& xAnnotation, bool bEdit)
 {
-mxImpl->SelectAnnotation(xAnnotation);
+mxImpl->SelectAnnotation(xAnnotation, bEdit);
 }
 
 } // end sd
diff --git a/sd/source/ui/annotations/annotationwindow.hxx 
b/sd/source/ui/annotations/annotationwindow

core.git: Branch 'libreoffice-25-2' - sw/qa

2025-01-07 Thread Miklos Vajna (via logerrit)
 sw/qa/extras/tiledrendering/tiledrendering2.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 361e3f17217b87aa34a6e07fd85811132b59378a
Author: Miklos Vajna 
AuthorDate: Wed Dec 18 09:01:26 2024 +0100
Commit: Xisco Fauli 
CommitDate: Tue Jan 7 10:12:14 2025 +0100

CppunitTest_sw_tiledrendering2: make this more stable, try 3

I got the workaround condition wrong in commit
d248d8f5271c380e51af9482b6724d471e2cb929
(CppunitTest_sw_tiledrendering2: try to make this more stable,
2024-11-20), the intent was to return early when we get no state
changes, but we did the early return when there *were* state changes,
fix this.

Change-Id: I90abcec062c59360642da87069911f937cc2110a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178706
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 02ab907ef7f8ad8d4b0d31baead9d1749669e812)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179860
Tested-by: Xisco Fauli 
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/extras/tiledrendering/tiledrendering2.cxx 
b/sw/qa/extras/tiledrendering/tiledrendering2.cxx
index 767aee6d15a6..112d0ce90c1d 100644
--- a/sw/qa/extras/tiledrendering/tiledrendering2.cxx
+++ b/sw/qa/extras/tiledrendering/tiledrendering2.cxx
@@ -75,7 +75,7 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, 
testStatusBarPageNumber)
 
 // Then make sure the page number in view 2 is correct:
 // FIXME this should not happen, but it does from time to time.
-if (!aView2.m_aStateChanges.empty())
+if (aView2.m_aStateChanges.empty())
 {
 return;
 }


core.git: Branch 'libreoffice-25-2' - sc/source

2025-01-07 Thread Caolán McNamara (via logerrit)
 sc/source/filter/excel/xelink.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 440e48bed38f914074fd7fda620970fa3be0c807
Author: Caolán McNamara 
AuthorDate: Mon Jan 6 21:11:29 2025 +
Commit: Caolán McNamara 
CommitDate: Tue Jan 7 10:18:11 2025 +0100

crashtesting: raw & exported unescaped to xl/externalLinks/externalLink1.xml

seen on reimport of xlsx export of forum-mso-en4-136321.xlsx as:

XmlFilterBase::importFragment - XML parser failed in fragment 
'xl/externalLinks/externalLink1.xml'
com.sun.star.xml.sax.SAXParseException message: 
"[xl/externalLinks/externalLink1.xml line 2]: xmlParseEntityRef: no name

Change-Id: I71f2d5b01905349bedff7c66fc4b087358569bd0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179858
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/sc/source/filter/excel/xelink.cxx 
b/sc/source/filter/excel/xelink.cxx
index 520e06b8ab74..4374b0bc3ef7 100644
--- a/sc/source/filter/excel/xelink.cxx
+++ b/sc/source/filter/excel/xelink.cxx
@@ -1235,7 +1235,7 @@ void XclExpCrn::SaveXml( XclExpXmlStream& rStrm )
 {
 pFS->startElement(XML_cell, XML_r, 
XclXmlUtils::ToOString(rStrm.GetRoot().GetDoc(), ScRange(aAdr)), XML_t, "str");
 pFS->startElement(XML_v);
-pFS->write( rValue.get< OUString >() );
+pFS->writeEscaped( rValue.get< OUString >() );
 }
 else if( rValue.has< bool >() )
 {


core.git: include/sfx2 sfx2/source

2025-01-07 Thread Miklos Vajna (via logerrit)
 include/sfx2/objsh.hxx  |2 +
 sfx2/source/doc/objserv.cxx |   74 +++-
 2 files changed, 49 insertions(+), 27 deletions(-)

New commits:
commit fa5be641bc0ad23ed51fb1702a157878cc3ecb04
Author: Miklos Vajna 
AuthorDate: Mon Jan 6 10:17:42 2025 +0100
Commit: Miklos Vajna 
CommitDate: Tue Jan 7 10:52:50 2025 +0100

cool#10630 doc sign: fix Impress sign line, to be able to finish signing 
again

Open a PDF for signing on the desktop, insert a signature line, click
the "finish signing" button on the infobar, Draw first asks if you want
to save your modified document as ODG, then crashes.

The first problem is that opening a PDF for signing and adding a
signature line / visual signature didn't result in a modified doc model,
but that now happens since commit
aca32a55456aa4e907b216fb490b3c15d26c3d55 (tdf#146547 sfx2: allow
read-only documents to be modified, 2023-06-16). Probably we want to
keep this feaature that read-only documents can be modified in some
cases, so explicitly mark the PDF document as not-modified before
signing in SfxObjectShell::SignDocumentContentUsingCertificate().

The other problem is that visual signing tried to reload the document:
this is handy, as it shows if our PDF export worked correctly, but
reloading is problematic since the signing code moved to async and it
assumes that the underlying object shell is never deleted, so callbacks
can have a pointer to it without worrying about the lifecycle. Fix this
problem by not reloading, but clearing the marker on the signature shape
and invalidating the signature status, instead of reloading, in
SfxObjectShell::ExecFile_Impl().

With this, visual signing of an existing PDF file works again in desktop
Draw.

Change-Id: I743983947d4607aa06674a1329bc8efb5af8a6d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179856
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 

diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index de6b46e23ea8..3238e40d85a9 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -814,6 +814,8 @@ public:
 /// Gets the certificate that is already picked by the user but not yet 
used for signing.
 css::uno::Reference GetSignPDFCertificate() 
const;
 
+void ResetSignPDFCertificate();
+
 /// Gets grab-bagged password info to unprotect change tracking with 
verification
 css::uno::Sequence< css::beans::PropertyValue > 
GetDocumentProtectionFromGrabBag() const;
 
diff --git a/sfx2/source/doc/objserv.cxx b/sfx2/source/doc/objserv.cxx
index 25a541691921..674afcbad1d2 100644
--- a/sfx2/source/doc/objserv.cxx
+++ b/sfx2/source/doc/objserv.cxx
@@ -430,27 +430,30 @@ bool SfxObjectShell::IsSignPDF() const
 return false;
 }
 
-uno::Reference SfxObjectShell::GetSignPDFCertificate() 
const
+namespace
+{
+uno::Reference GetSelectedShapeOfModel(const 
uno::Reference& xModel)
 {
-uno::Reference xModel = GetBaseModel();
 if (!xModel.is())
 {
-return uno::Reference();
+return uno::Reference();
 }
 
 uno::Reference xShapes(xModel->getCurrentSelection(), 
uno::UNO_QUERY);
 if (!xShapes.is() || xShapes->getCount() < 1)
 {
-return uno::Reference();
+return uno::Reference();
 }
 
 uno::Reference xShapeProps(xShapes->getByIndex(0), 
uno::UNO_QUERY);
-if (!xShapeProps.is())
-{
-return uno::Reference();
-}
+return xShapeProps;
+}
+}
 
-if 
(!xShapeProps->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr))
+uno::Reference SfxObjectShell::GetSignPDFCertificate() 
const
+{
+uno::Reference xShapeProps = 
GetSelectedShapeOfModel(GetBaseModel());
+if (!xShapeProps.is() || 
!xShapeProps->getPropertySetInfo()->hasPropertyByName(u"InteropGrabBag"_ustr))
 {
 return uno::Reference();
 }
@@ -465,6 +468,27 @@ uno::Reference 
SfxObjectShell::GetSignPDFCertificate() c
 return uno::Reference(it->second, uno::UNO_QUERY);
 }
 
+void SfxObjectShell::ResetSignPDFCertificate()
+{
+uno::Reference xShapeProps = 
GetSelectedShapeOfModel(GetBaseModel());
+if 
(!xShapeProps->getPropertySetInfo()->hasPropertyByName("InteropGrabBag"))
+{
+return;
+}
+
+comphelper::SequenceAsHashMap 
aMap(xShapeProps->getPropertyValue("InteropGrabBag"));
+auto it = aMap.find("SignatureCertificate");
+if (it == aMap.end())
+{
+return;
+}
+
+aMap.erase(it);
+xShapeProps->setPropertyValue("InteropGrabBag", 
uno::Any(aMap.getAsConstPropertyValueList()));
+// The shape's property is now reset, so the doc model is no longer 
modified.
+SetModified(false);
+}
+
 static void sendErrorToLOK(const ErrCodeMsg& error)
 {
 if (error.GetCode().GetClass() == ErrCodeClass::NONE)
@@ -585,26 +609,15 @@ void SfxObjectShell::ExecFile_Impl(SfxRequest &rReq)
 aSigningConte

core.git: Branch 'distro/collabora/co-24.04' - sw/source

2025-01-07 Thread Darshan-upadhyay1110 (via logerrit)
 sw/source/uibase/wrtsh/wrtsh1.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 0cce452b93ce657e4baedb5b1574184b32e950e3
Author: Darshan-upadhyay1110 
AuthorDate: Mon Jan 6 15:16:03 2025 +0530
Commit: Szymon Kłos 
CommitDate: Tue Jan 7 13:48:48 2025 +0100

tdf#164374 - Fix Edit comments in navigator creates new comment

- Create new comment on same position for online
- This will fix the edit comment problem described in Bug 164374

Change-Id: If0aae9ad1e59eae8c7c09c72e8d7b0df5dbb38bf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179823
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Szymon Kłos 

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 4e3dd61bbd5b..ab45f8317a66 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -2244,7 +2244,8 @@ void SwWrtShell::SetShowHeaderFooterSeparator( 
FrameControlType eControl, bool b
 void SwWrtShell::InsertPostIt(SwFieldMgr& rFieldMgr, const SfxRequest& rReq)
 {
 SwPostItField* pPostIt = 
dynamic_cast(rFieldMgr.GetCurField());
-
+bool bNew = !(pPostIt && pPostIt->GetTyp()->Which() == SwFieldIds::Postit);
+if (bNew || GetView().GetPostItMgr()->IsAnswer() || 
comphelper::LibreOfficeKit::isActive())
 {
 const SvxPostItAuthorItem* pAuthorItem = 
rReq.GetArg(SID_ATTR_POSTIT_AUTHOR);
 OUString sAuthor;


core.git: sw/source

2025-01-07 Thread Oliver Specht (via logerrit)
 sw/source/core/doc/DocumentContentOperationsManager.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit fa9d3f5706606379f66622d51e74699b94df45d6
Author: Oliver Specht 
AuthorDate: Tue Jan 7 11:17:40 2025 +0100
Commit: Oliver Specht 
CommitDate: Wed Jan 8 07:19:14 2025 +0100

tdf#164621 Fix regression from 3e9658a201f60dee95bd1bd8421b18bf8905c308

Change-Id: I1026ae18bf9bb86b506e4ef1782b9f3aa5ae7125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179874
Tested-by: Jenkins
Reviewed-by: Oliver Specht 

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 22d52654e612..c26b9198c3da 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -488,6 +488,8 @@ namespace
 {
 const SwTextNode* pTextNd = rPam.Start()->GetNode().GetTextNode();
 const SwTextNode* pEndTextNd = rPam.End()->GetNode().GetTextNode();
+if (pTextNd == nullptr || pEndTextNd == nullptr)
+return false;
 bool bRet = pTextNd->IsInListFromStyle();
 //prefer list if it's a single paragraph with list from style
 if (pTextNd == pEndTextNd && bRet)


core.git: include/systools

2025-01-07 Thread Mike Kaganski (via logerrit)
 include/systools/win32/retry_if_failed.hxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 158e43c438049fa5d3c28dbcc3edfbfe11021aac
Author: Mike Kaganski 
AuthorDate: Wed Jan 8 06:26:51 2025 +0100
Commit: Mike Kaganski 
CommitDate: Wed Jan 8 07:31:40 2025 +0100

Fix naming of the argument

Change-Id: Ice5ab90ddfee0e1273e0607cb1c3251b1435b6dd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179924
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/include/systools/win32/retry_if_failed.hxx 
b/include/systools/win32/retry_if_failed.hxx
index 1372843ab8a6..7d01a1d2a3f7 100644
--- a/include/systools/win32/retry_if_failed.hxx
+++ b/include/systools/win32/retry_if_failed.hxx
@@ -18,19 +18,19 @@ namespace sal::systools
 {
 // Some system calls (e.g., clipboard access functions) may fail first time, 
because the resource
 // may only be accessed by one process at a time. This function allows to 
retry failed call up to
-// specified number of times with a specified timeout (in ms), until the call 
succeeds or the limit
+// specified number of times with a specified interval (in ms), until the call 
succeeds or the limit
 // of attempts is exceeded.
 // Usage:
 // HRESULT hr = sal::systools::RetryIfFailed(10, 100, []{ return 
OleFlushClipboard(); });
 template 
 std::enable_if_t, HRESULT>, HRESULT>
-RetryIfFailed(unsigned times, unsigned msTimeout, Func func)
+RetryIfFailed(unsigned times, unsigned msInterval, Func func)
 {
 for (unsigned i = 0;; ++i)
 {
 if (HRESULT hr = func(); SUCCEEDED(hr) || i >= times)
 return hr;
-Sleep(msTimeout);
+Sleep(msInterval);
 }
 }
 }


New Defects reported by Coverity Scan for LibreOffice

2025-01-07 Thread scan-admin
Hi,

Please find the latest report on new defect(s) introduced to LibreOffice found 
with Coverity Scan.

1 new defect(s) introduced to LibreOffice found with Coverity Scan.


New defect(s) Reported-by: Coverity Scan
Showing 1 of 1 defect(s)


** CID 1638256:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/fields/docufld.cxx: 2291 in 
SwRefPageGetFieldType::SwClientNotify(const SwModify &, const SfxHint &)()



*** CID 1638256:  Null pointer dereferences  (FORWARD_NULL)
/sw/source/core/fields/docufld.cxx: 2291 in 
SwRefPageGetFieldType::SwClientNotify(const SwModify &, const SfxHint &)()
2285 for(auto pFormatField: vFields)
2286 UpdateField(pFormatField->GetTextField(), aTmpLst, 
pLayout);
2287 }
2288 };
2289 
2290 // update all GetReference fields
>>> CID 1638256:  Null pointer dereferences  (FORWARD_NULL)
>>> Dereferencing null pointer "pChangeHint".
2291 if( (pLegacy && !pLegacy->m_pNew && !pLegacy->m_pOld && 
HasWriterListeners())
2292 || (!pChangeHint->m_pNew && !pChangeHint->m_pOld && 
HasWriterListeners()))
2293 {
2294 SwRootFrame const* pLayout(nullptr);
2295 SwRootFrame const* pLayoutRLHidden(nullptr);
2296 for (SwRootFrame const*const pLay : m_rDoc.GetAllLayouts())



To view the defects in Coverity Scan visit, 
http://url2497.blackduck.com/ls/click?upn=u001.Ji18sHaXCxZb7Rfw8sC51j9Suwl84vq-2FeHTSxCm409PgV-2BgtLQew0iCdGmwnoGphEuBjI6-2FVO7wLojrRBYaE0Alg3Y0-2F5TqGlQEQ8dzyIUg-3DqdyZ_A9M4dSy7guk8NP6DcfgslOyvJRzavztVIKj6nRqYjYpWom7SJFyX0y710bz0kUGtfZpdabz1hCE5vJFrNmzPaoHli1bvBNuZld3ipZuRd4EugwpLpcUqEL6mVFIj3YHJUvLgEkrzFFQ7k0xGKtbdSW-2Bk-2BkDrq9CSmMQagKlD3bAtWCJTGO5DD2-2BfN5A8LAIfb1HX9gXUpyfH7ANs3MtSk1-2BuG-2FB-2FveIppEP0BdOK5-2Bw-3D



Re: Interdependent, failing commits

2025-01-07 Thread Stephan Bergmann

On 1/6/25 22:27, Stephan Bergmann wrote:
The two recent commits  "Revert 'Revert 
'stronger typing for SwClient::GetRegisteredIn'' and fix SwIterator 
cast" and  "convert 
RES_ATTRSET_CHG to SfxHint" are both known-broken and cause at least 
UBSan builds to fail (see the comments at gerrit.libreoffice.org/c/core/ 
+/179480/3#message-1d186afad4accdcf814507953175bf0e483b0e2e> and 
, respectively).


Now, a third commit  "convert 
RES_ATTRSET_CHG to SfxHint" interferes with (local) reverts of the other 
two commits, so it becomes increasingly messy to try and keep a 
successful (local) UBsan build, and keep an eye on further commits that 
could potentially introduce further/unrelated breakage.


The above paragraph erroneously references the wrong commit.  The third 
commit, which interferes with reverts of the other two commits, rather 
is  "convert 
RES_OBJECTDYING to SfxHint".


Therefore, unless there are fixes for the two known-broken commits 
available by then, I suggest to revert for now all three of those 
commits tomorrow evening.


(Before I could exercise that plan, things started to get even more 
messy, with more new and interdependent commits getting thrown into the 
fire, causing further UBSan failures, and some of the UBSan failures 
seemingly only experienced with some builds but not with others.  Stay 
tuned...)


core.git: 3 commits - basic/qa basic/source include/basic

2025-01-07 Thread Mike Kaganski (via logerrit)
 basic/qa/basic_coverage/test_isnumeric_method.bas |   35 --
 basic/qa/vba_tests/isnumeric.vb   |8 +
 basic/source/runtime/runtime.cxx  |2 -
 basic/source/sbx/sbxbool.cxx  |2 -
 basic/source/sbx/sbxconv.hxx  |6 +--
 basic/source/sbx/sbxexec.cxx  |2 -
 basic/source/sbx/sbxscan.cxx  |   25 +++
 basic/source/sbx/sbxvalue.cxx |7 ++--
 include/basic/sbxvar.hxx  |2 -
 9 files changed, 64 insertions(+), 25 deletions(-)

New commits:
commit f8ac9d3311a623fdca64583b08780ea8ebed157c
Author: Mike Kaganski 
AuthorDate: Mon Jan 6 15:16:40 2025 +0500
Commit: Mike Kaganski 
CommitDate: Wed Jan 8 06:02:43 2025 +0100

tdf#164599: Allow space between sign and number in VBASupport mode

Change-Id: Ib9e8c8770f8c2d1b348ff032502467915829c4f3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179865
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/basic/qa/basic_coverage/test_isnumeric_method.bas 
b/basic/qa/basic_coverage/test_isnumeric_method.bas
index 21e4a91a8b45..eb476e8a6b35 100644
--- a/basic/qa/basic_coverage/test_isnumeric_method.bas
+++ b/basic/qa/basic_coverage/test_isnumeric_method.bas
@@ -28,7 +28,7 @@ Sub verify_IsNumeric
 TestUtil.Assert(Not IsNumeric(" "), "Not IsNumeric("" "")")
 TestUtil.Assert(Not IsNumeric(" + "), "Not IsNumeric("" + "")")
 TestUtil.Assert(Not IsNumeric(" - "), "Not IsNumeric("" - "")")
-' Note: the two following tests should behave different in VBA 
(TODO/FIXME);
+' Note: the two following tests behave different in VBA;
 ' should it be unified maybe in non-VBA, too (a breaking change)?
 TestUtil.Assert(Not IsNumeric(" + 0 "), "Not IsNumeric("" + 0 "")")
 TestUtil.Assert(Not IsNumeric(" - 0 "), "Not IsNumeric("" - 0 "")")
diff --git a/basic/qa/vba_tests/isnumeric.vb b/basic/qa/vba_tests/isnumeric.vb
index ead7e83e1494..721a2fb7f4b6 100644
--- a/basic/qa/vba_tests/isnumeric.vb
+++ b/basic/qa/vba_tests/isnumeric.vb
@@ -26,6 +26,14 @@ remTestUtil.Assert(IsNumeric(True), "IsNumeric(True)")
 TestUtil.Assert(IsNumeric("123"),   "IsNumeric(""123"")")
 TestUtil.Assert(IsNumeric("+123"),  "IsNumeric(""+123"")")
 
+TestUtil.Assert(Not IsNumeric(""), "Not IsNumeric()")
+TestUtil.Assert(Not IsNumeric(" "), "Not IsNumeric("" "")")
+TestUtil.Assert(Not IsNumeric(" + "), "Not IsNumeric("" + "")")
+TestUtil.Assert(Not IsNumeric(" - "), "Not IsNumeric("" - "")")
+
+TestUtil.Assert(IsNumeric(" + 0 "), "IsNumeric("" + 0 "")")
+TestUtil.Assert(IsNumeric(" - 0 "), "IsNumeric("" - 0 "")")
+
 Exit Sub
 errorHandler:
 TestUtil.ReportErrorHandler("verify_testIsNumeric", Err, Error$, Erl)
diff --git a/basic/source/sbx/sbxscan.cxx b/basic/source/sbx/sbxscan.cxx
index 84e2e78dc99e..f843d6b44e13 100644
--- a/basic/source/sbx/sbxscan.cxx
+++ b/basic/source/sbx/sbxscan.cxx
@@ -102,6 +102,13 @@ ErrCode ImpScan( std::u16string_view rWSrc, double& nVal, 
SbxDataType& rType,
 p++;
 bMinus = true;
 }
+#if HAVE_FEATURE_SCRIPTING
+if (SbiRuntime::isVBAEnabled())
+{
+while (p != rWSrc.end() && (*p == ' ' || *p == '   '))
+p++;
+}
+#endif
 const auto pNumberStart = p;
 if (p != rWSrc.end()
 && (rtl::isAsciiDigit(*p)
commit 20db60030eaa9a2bc099894d89a63808e12c7635
Author: Mike Kaganski 
AuthorDate: Mon Jan 6 14:49:40 2025 +0500
Commit: Mike Kaganski 
CommitDate: Wed Jan 8 06:02:37 2025 +0100

Use sal_Int32 for string length

Change-Id: Ie069c20b7d91631cb3b5d39e1a52f09cc13e8a22
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179864
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/basic/source/runtime/runtime.cxx b/basic/source/runtime/runtime.cxx
index 2fcbfb7372cb..3a715a9278db 100644
--- a/basic/source/runtime/runtime.cxx
+++ b/basic/source/runtime/runtime.cxx
@@ -2521,7 +2521,7 @@ void SbiRuntime::StepINPUT()
 // then with a string value
 if( !pVar->IsFixed() || pVar->IsNumeric() )
 {
-sal_uInt16 nLen = 0;
+sal_Int32 nLen = 0;
 if( !pVar->Scan( s, &nLen ) )
 {
 err = SbxBase::GetError();
diff --git a/basic/source/sbx/sbxbool.cxx b/basic/source/sbx/sbxbool.cxx
index fd9002b4eff3..c6d9c2fbd166 100644
--- a/basic/source/sbx/sbxbool.cxx
+++ b/basic/source/sbx/sbxbool.cxx
@@ -79,7 +79,7 @@ enum SbxBOOL ImpGetBool( const SbxValues* p )
 bool bError = true;
 double n;
 SbxDataType t;
-sal_uInt16 nLen = 0;
+sal_Int32 nLen = 0;
 if( ImpScan( *p->pOUString, n, t, &nLen ) == ERRCODE_NONE )
 {
 if( nLen == p->pOUString->getLength() )
dif

core.git: basic/qa basic/source

2025-01-07 Thread Mike Kaganski (via logerrit)
 basic/qa/basic_coverage/test_isnumeric_method.bas |5 +
 basic/qa/vba_tests/isnumeric.vb   |2 +-
 basic/source/runtime/methods.cxx  |2 +-
 basic/source/sbx/sbxvalue.cxx |4 
 4 files changed, 11 insertions(+), 2 deletions(-)

New commits:
commit b76d70338258811bb0ca516d01c6cfe7a222ca76
Author: Mike Kaganski 
AuthorDate: Mon Jan 6 15:19:28 2025 +0500
Commit: Mike Kaganski 
CommitDate: Wed Jan 8 06:02:48 2025 +0100

tdf#164600: Return true from IsNumeric for booleans in VBASupport mode

Change-Id: Ib68f237001389c8f7b9d2771d5162a583b544b83
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179866
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins

diff --git a/basic/qa/basic_coverage/test_isnumeric_method.bas 
b/basic/qa/basic_coverage/test_isnumeric_method.bas
index eb476e8a6b35..5f6bbac5c0cb 100644
--- a/basic/qa/basic_coverage/test_isnumeric_method.bas
+++ b/basic/qa/basic_coverage/test_isnumeric_method.bas
@@ -24,6 +24,11 @@ Sub verify_IsNumeric
 TestUtil.Assert(IsNumeric(" 0 "), "IsNumeric("" 0 "")")
 TestUtil.Assert(IsNumeric(" +0 "), "IsNumeric("" +0 "")")
 TestUtil.Assert(IsNumeric(" -0 "), "IsNumeric("" -0 "")")
+
+' Note: the following test behaves different in VBA;
+' should it be unified maybe in non-VBA, too (a breaking change)?
+TestUtil.Assert(Not IsNumeric(True), "Not IsNumeric(True)")
+
 TestUtil.Assert(Not IsNumeric(""), "Not IsNumeric()")
 TestUtil.Assert(Not IsNumeric(" "), "Not IsNumeric("" "")")
 TestUtil.Assert(Not IsNumeric(" + "), "Not IsNumeric("" + "")")
diff --git a/basic/qa/vba_tests/isnumeric.vb b/basic/qa/vba_tests/isnumeric.vb
index 721a2fb7f4b6..b44e37001797 100644
--- a/basic/qa/vba_tests/isnumeric.vb
+++ b/basic/qa/vba_tests/isnumeric.vb
@@ -22,7 +22,7 @@ Sub verify_testIsNumeric()
 TestUtil.Assert(IsNumeric(-123),"IsNumeric(-123)")
 TestUtil.Assert(IsNumeric(123.8),   "IsNumeric(123.8)")
 TestUtil.Assert(Not IsNumeric("a"), "Not IsNumeric(""a"")")
-remTestUtil.Assert(IsNumeric(True), "IsNumeric(True)")
+TestUtil.Assert(IsNumeric(True), "IsNumeric(True)")
 TestUtil.Assert(IsNumeric("123"),   "IsNumeric(""123"")")
 TestUtil.Assert(IsNumeric("+123"),  "IsNumeric(""+123"")")
 
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index 2ce6361c8d8b..0982c591de6c 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1358,7 +1358,7 @@ void SbRtl_Str(StarBASIC *, SbxArray & rPar, bool)
 pArg->Format( aStr );
 
 // Numbers start with a space
-if( pArg->IsNumericRTL() )
+if (pArg->GetType() != SbxBOOL && pArg->IsNumericRTL())
 {
 // replace commas by points so that it's symmetric to Val!
 aStr = aStr.replaceFirst( ",", "." );
diff --git a/basic/source/sbx/sbxvalue.cxx b/basic/source/sbx/sbxvalue.cxx
index 146c4f50faf1..8fac8fd867ef 100644
--- a/basic/source/sbx/sbxvalue.cxx
+++ b/basic/source/sbx/sbxvalue.cxx
@@ -699,6 +699,10 @@ bool SbxValue::ImpIsNumeric( bool bOnlyIntntl ) const
 }
 return false;
 }
+#if HAVE_FEATURE_SCRIPTING
+else if (t == SbxBOOL && bOnlyIntntl && SbiRuntime::isVBAEnabled())
+return true;
+#endif
 else
 return t == SbxEMPTY
 || ( t >= SbxINTEGER && t <= SbxCURRENCY )