core.git: vcl/qt5

2025-01-17 Thread Michael Weghorn (via logerrit)
 vcl/qt5/QtAccessibleWidget.cxx |   20 
 1 file changed, 4 insertions(+), 16 deletions(-)

New commits:
commit 94d851b27f26ad9a97c5a8a559592d6d9ea0f37b
Author: Michael Weghorn 
AuthorDate: Fri Jan 17 14:31:31 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 17 22:28:19 2025 +0100

Revert "tdf#163335 qt a11y: Work around broken sw selection handling"

The underlying issue in Writer was fixed in

commit 65a5a4772af919e71a1fe7a752e622ec4cdba7ad
Author: Michael Weghorn 
Date:   Tue Jan 14 12:11:46 2025 +0100

tdf#163335 sw a11y: Handle cursor selection consistently

, so revert the temporary workaround in the qt a11y bridge again
(on master only, workaround remains in place for release branches).

This reverts commit 3eaa35e8bacc19a85f5c9d907450846bfa8bffae.

Change-Id: Ib53aa2d16e0302c4ccd7ba8ac38e9ebb7cf186e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180410
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/qt5/QtAccessibleWidget.cxx b/vcl/qt5/QtAccessibleWidget.cxx
index f7f55f74f82d..7438c5e368d1 100644
--- a/vcl/qt5/QtAccessibleWidget.cxx
+++ b/vcl/qt5/QtAccessibleWidget.cxx
@@ -51,7 +51,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -1859,22 +1858,11 @@ QAccessibleInterface* 
QtAccessibleWidget::selectedItem(int nSelectionIndex) cons
 return nullptr;
 }
 
-try
-{
-Reference xChild = 
xSelection->getSelectedAccessibleChild(nSelectionIndex);
-if (xChild)
-return 
QAccessible::queryAccessibleInterface(QtAccessibleRegistry::getQObject(xChild));
-}
-catch (const css::lang::IndexOutOfBoundsException&)
-{
-// tdf#163335: temporarily work around inconsistency in
-// SwAccessibleSelectionHelper::getSelectedAccessibleChildCount
-// returning a larger number of selected items than
-// SwAccessibleSelectionHelper::getSelectedAccessibleChild supports
-SAL_WARN("vcl.qt", "QtAccessibleWidget::selectedItem triggered an 
exception");
-}
+Reference xChild = 
xSelection->getSelectedAccessibleChild(nSelectionIndex);
+if (!xChild)
+return nullptr;
 
-return nullptr;
+return 
QAccessible::queryAccessibleInterface(QtAccessibleRegistry::getQObject(xChild));
 }
 
 bool QtAccessibleWidget::isSelected(QAccessibleInterface* pItem) const


core.git: vcl/inc vcl/qt5 vcl/source

2025-01-17 Thread Michael Weghorn (via logerrit)
 vcl/inc/qt5/QtMenu.hxx |4 
 vcl/inc/salmenu.hxx|1 +
 vcl/qt5/QtMenu.cxx |   45 +
 vcl/source/window/menu.cxx |3 +++
 4 files changed, 53 insertions(+)

New commits:
commit a108fce773d46441e30dcc14abe29751410ae4ed
Author: Michael Weghorn 
AuthorDate: Fri Jan 17 14:18:30 2025 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 17 22:27:59 2025 +0100

tdf#163186 qt: Show menu item tooltips

So far, the qt VCL plugins were not handling/showing
menu item tooltips, like showing the full path for
entries in the "File" -> "Recent Documents" submenu.

Implement handling so they are shown:

* Set the tooltip for the menu entry's QAction in
  QtMenu::InsertMenuItem.

* Introduce SalMenu::SetItemTooltip, override it
  in the QtMenu subclass and call it in Menu::SetTipHelpText so
  newly set tooltips are propagated to the native
  Qt menu, to keep them up to date (similar to what already
  happens e.g. for the menu entry's displayed text in
  Menu::SetItemText).

* Since Qt doesn't by default show tooltips for
  QActions used in menus, install an event filter
  on the QMenu/QMenuBar objects that handles the QEvent::ToolTip
  event to manually show a tooltip. See [1] for
  more background and a similar example using custom
  QMenu/QMenuBar subclasses instead of the
  QObject::installEventFilter/QObject::eventFilter approach
  taken in this commit.

Only show the tooltip if one was explicitly set.
QToolTip::tooltip() [2] by default returns a text
based on the action's text (with accelerator's etc.
stripped), so only show the tooltip if QToolTip::tooltip()
returns something that differs from what would be used
based simply on the text.

[1] https://forum.qt.io/topic/6821/solved-settooltip-in-qaction-menu/2
[2] https://doc.qt.io/qt-6/qaction.html#toolTip-prop

Change-Id: I1e2568d9d6e9e2baf7dcd7dffbaaabae7862b489
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180408
Reviewed-by: Michael Weghorn 
Tested-by: Jenkins

diff --git a/vcl/inc/qt5/QtMenu.hxx b/vcl/inc/qt5/QtMenu.hxx
index 8042c67720ba..bbabb59e4ebd 100644
--- a/vcl/inc/qt5/QtMenu.hxx
+++ b/vcl/inc/qt5/QtMenu.hxx
@@ -73,6 +73,8 @@ private:
 public:
 QtMenu(bool bMenuBar);
 
+bool eventFilter(QObject* pObject, QEvent* pEvent) override;
+
 virtual bool VisibleMenuBar() override; // must return TRUE to actually 
DISPLAY native menu bars
 
 virtual void InsertItem(SalMenuItem* pSalMenuItem, unsigned nPos) override;
@@ -89,6 +91,8 @@ public:
 virtual void ShowItem(unsigned nPos, bool bShow) override;
 virtual void SetItemText(unsigned nPos, SalMenuItem* pSalMenuItem,
  const OUString& rText) override;
+
+virtual void SetItemTooltip(SalMenuItem* pSalMenuItem, const OUString& 
rTooltip) override;
 virtual void SetItemImage(unsigned nPos, SalMenuItem* pSalMenuItem,
   const Image& rImage) override;
 virtual void SetAccelerator(unsigned nPos, SalMenuItem* pSalMenuItem,
diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx
index 84939574d447..7ecd220209bb 100644
--- a/vcl/inc/salmenu.hxx
+++ b/vcl/inc/salmenu.hxx
@@ -71,6 +71,7 @@ public:
 virtual void CheckItem( unsigned nPos, bool bCheck ) = 0;
 virtual void EnableItem( unsigned nPos, bool bEnable ) = 0;
 virtual void SetItemText( unsigned nPos, SalMenuItem* pSalMenuItem, const 
OUString& rText )= 0;
+virtual void SetItemTooltip(SalMenuItem* /*pSalMenuItem*/, const OUString& 
/*rTooltip*/) {};
 virtual void SetItemImage( unsigned nPos, SalMenuItem* pSalMenuItem, const 
Image& rImage ) = 0;
 virtual void SetAccelerator( unsigned nPos, SalMenuItem* pSalMenuItem, 
const vcl::KeyCode& rKeyCode, const OUString& rKeyName ) = 0;
 virtual void GetSystemMenuData(SystemMenuData& rData);
diff --git a/vcl/qt5/QtMenu.cxx b/vcl/qt5/QtMenu.cxx
index e90248a032e3..845d1940b185 100644
--- a/vcl/qt5/QtMenu.cxx
+++ b/vcl/qt5/QtMenu.cxx
@@ -32,6 +32,7 @@
 #include 
 #endif
 #include 
+#include 
 
 #include 
 #include 
@@ -69,6 +70,37 @@ QtMenu::QtMenu(bool bMenuBar)
 {
 }
 
+bool QtMenu::eventFilter(QObject* pObject, QEvent* pEvent)
+{
+// manually trigger tooltip if action's tooltip is set,
+// Qt doesn't do that for menu entries
+if (pEvent->type() != QEvent::ToolTip)
+return false;
+
+QAction* pAction = nullptr;
+if (QMenu* pMenu = qobject_cast(pObject))
+pAction = pMenu->activeAction();
+else if (QMenuBar* pMenuBar = qobject_cast(pObject))
+pAction = pMenuBar->activeAction();
+
+if (!pAction)
+return false;
+
+// QAction::toolTip() is by default based on action's text, only display 
if it differs
+const QString sToolTip = pAction->toolTip();
+if (!sToolTip.isEmpty() && sToolTip != QAction(pAction-

core.git: vcl/source

2025-01-17 Thread Christopher Sherlock (via logerrit)
 vcl/source/bitmap/BlendFrameCache.cxx |  133 --
 1 file changed, 66 insertions(+), 67 deletions(-)

New commits:
commit f7af54d39a402b24f55bcfd9c1d906b9c8b3dac8
Author: Christopher Sherlock 
AuthorDate: Wed Jan 15 17:53:50 2025 +1100
Commit: Michael Weghorn 
CommitDate: Fri Jan 17 23:08:28 2025 +0100

vcl: followup to remove unnecessary resets

Followup for 44dfcebde64b9edfa9f50eace34e5e1497ab9314

Just enclose it in the correct scope.

Change-Id: I3bb3bfa0fa8bc5996d728f175aad16b64da52166
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180260
Reviewed-by: Mike Kaganski 
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/source/bitmap/BlendFrameCache.cxx 
b/vcl/source/bitmap/BlendFrameCache.cxx
index fc883710c988..56738369fbb2 100644
--- a/vcl/source/bitmap/BlendFrameCache.cxx
+++ b/vcl/source/bitmap/BlendFrameCache.cxx
@@ -43,93 +43,92 @@ BlendFrameCache::BlendFrameCache(Size const& rSize, 
sal_uInt8 nAlpha, Color cons
 
 aContent.Erase(COL_BLACK);
 
-BitmapScopedWriteAccess pContent(aContent);
-BitmapScopedWriteAccess pAlpha(aAlpha);
-
-if (!pContent || !pAlpha)
-return;
-
-Scanline pScanContent = pContent->GetScanline(0);
-Scanline pScanAlpha = pContent->GetScanline(0);
-
-// x == 0, y == 0, top-left corner
-pContent->SetPixelOnData(pScanContent, 0, rColorTopLeft);
-pAlpha->SetPixelOnData(pScanAlpha, 0, BitmapColor(nAlpha));
-
-tools::Long x(0);
-const tools::Long nW(rSize.Width());
-
-// y == 0, top line left to right
-for (x = 1; x < nW - 1; x++)
 {
-Color aMix(rColorTopLeft);
+BitmapScopedWriteAccess pContent(aContent);
+BitmapScopedWriteAccess pAlpha(aAlpha);
 
-aMix.Merge(rColorTopRight, 255 - sal_uInt8((x * 255) / nW));
-pContent->SetPixelOnData(pScanContent, x, aMix);
-pAlpha->SetPixelOnData(pScanAlpha, x, BitmapColor(nAlpha));
-}
+if (!pContent || !pAlpha)
+return;
 
-// x == nW - 1, y == 0, top-right corner
-// #i123690# Caution! When nW is 1, x == nW is possible (!)
-if (x < nW)
-{
-pContent->SetPixelOnData(pScanContent, x, rColorTopRight);
-pAlpha->SetPixelOnData(pScanAlpha, x, BitmapColor(nAlpha));
-}
-
-tools::Long y(0);
-const tools::Long nH(rSize.Height());
-
-// x == 0 and nW - 1, left and right line top-down
-for (y = 1; y < nH - 1; y++)
-{
-pScanContent = pContent->GetScanline(y);
-pScanAlpha = pContent->GetScanline(y);
-Color aMixA(rColorTopLeft);
+Scanline pScanContent = pContent->GetScanline(0);
+Scanline pScanAlpha = pContent->GetScanline(0);
 
-aMixA.Merge(rColorBottomLeft, 255 - sal_uInt8((y * 255) / nH));
-pContent->SetPixelOnData(pScanContent, 0, aMixA);
+// x == 0, y == 0, top-left corner
+pContent->SetPixelOnData(pScanContent, 0, rColorTopLeft);
 pAlpha->SetPixelOnData(pScanAlpha, 0, BitmapColor(nAlpha));
 
-// #i123690# Caution! When nW is 1, x == nW is possible (!)
-if (x < nW)
-{
-Color aMixB(rColorTopRight);
-
-aMixB.Merge(rColorBottomRight, 255 - sal_uInt8((y * 255) / nH));
-pContent->SetPixelOnData(pScanContent, x, aMixB);
-pAlpha->SetPixelOnData(pScanAlpha, x, BitmapColor(nAlpha));
-}
-}
-
-// #i123690# Caution! When nH is 1, y == nH is possible (!)
-if (y < nH)
-{
-// x == 0, y == nH - 1, bottom-left corner
-pContent->SetPixelOnData(pScanContent, 0, rColorBottomLeft);
-pAlpha->SetPixelOnData(pScanAlpha, 0, BitmapColor(nAlpha));
+tools::Long x(0);
+const tools::Long nW(rSize.Width());
 
-// y == nH - 1, bottom line left to right
+// y == 0, top line left to right
 for (x = 1; x < nW - 1; x++)
 {
-Color aMix(rColorBottomLeft);
+Color aMix(rColorTopLeft);
 
-aMix.Merge(rColorBottomRight, 255 - sal_uInt8(((x - 0) * 255) / 
nW));
+aMix.Merge(rColorTopRight, 255 - sal_uInt8((x * 255) / nW));
 pContent->SetPixelOnData(pScanContent, x, aMix);
 pAlpha->SetPixelOnData(pScanAlpha, x, BitmapColor(nAlpha));
 }
 
-// x == nW - 1, y == nH - 1, bottom-right corner
+// x == nW - 1, y == 0, top-right corner
 // #i123690# Caution! When nW is 1, x == nW is possible (!)
 if (x < nW)
 {
-pContent->SetPixelOnData(pScanContent, x, rColorBottomRight);
+pContent->SetPixelOnData(pScanContent, x, rColorTopRight);
 pAlpha->SetPixelOnData(pScanAlpha, x, BitmapColor(nAlpha));
 }
-}
 
-pContent.reset();
-pAlpha.reset();
+tools::Long y(0);
+const tools::Long nH(rSize.Height());
+
+// x == 0 and nW - 1, left and right line top-down
+for (y = 1; y < nH - 1; y++)
+

core.git: vcl/source

2025-01-17 Thread Chris Sherlock (via logerrit)
 vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx |   30 +++---
 1 file changed, 15 insertions(+), 15 deletions(-)

New commits:
commit a3ee63e617d166e5950e3d1355fe75e8fedcc48b
Author: Chris Sherlock 
AuthorDate: Fri Sep 20 18:32:46 2024 +1000
Commit: Michael Weghorn 
CommitDate: Fri Jan 17 23:08:54 2025 +0100

vcl: prefix member variables with 'm' in BitmapBasicMorphologyFilter

Change-Id: I7258502c509584301392c45a21cf0de2ccf5bca4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173700
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx 
b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
index 36c9d6d19c69..4c19cd7d374f 100644
--- a/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
+++ b/vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx
@@ -61,30 +61,30 @@ struct DilateOp
 
 template  struct Value
 {
-static constexpr int nWidthBytes = nComponentWidth / 8;
-static_assert(nWidthBytes * 8 == nComponentWidth);
+static constexpr int mnWidthBytes = nComponentWidth / 8;
+static_assert(mnWidthBytes * 8 == nComponentWidth);
 
-sal_uInt8 aResult[nWidthBytes];
+sal_uInt8 maResult[mnWidthBytes];
 
 // If we are at the start or at the end of the line, consider outside value
 Value(FilterSharedData const& rShared, bool bLookOutside)
 {
-std::fill_n(aResult, nWidthBytes,
+std::fill_n(maResult, mnWidthBytes,
 bLookOutside ? rShared.mnOutsideVal : 
MorphologyOp::initVal);
 }
 
 void apply(BitmapScopedReadAccess& pReadAccess, sal_Int32 x, sal_Int32 y,
sal_uInt8* pHint = nullptr)
 {
-sal_uInt8* pSource = (pHint ? pHint : pReadAccess->GetScanline(y)) + 
nWidthBytes * x;
-std::transform(pSource, pSource + nWidthBytes, aResult, aResult, 
MorphologyOp::apply);
+sal_uInt8* pSource = (pHint ? pHint : pReadAccess->GetScanline(y)) + 
mnWidthBytes * x;
+std::transform(pSource, pSource + mnWidthBytes, maResult, maResult, 
MorphologyOp::apply);
 }
 
 void copy(BitmapScopedWriteAccess& pWriteAccess, sal_Int32 x, sal_Int32 y,
   sal_uInt8* pHint = nullptr)
 {
-sal_uInt8* pDest = (pHint ? pHint : pWriteAccess->GetScanline(y)) + 
nWidthBytes * x;
-std::copy_n(aResult, nWidthBytes, pDest);
+sal_uInt8* pDest = (pHint ? pHint : pWriteAccess->GetScanline(y)) + 
mnWidthBytes * x;
+std::copy_n(maResult, mnWidthBytes, pDest);
 }
 };
 
@@ -96,11 +96,11 @@ template  struct Value
   MorphologyOp::initVal, 
MorphologyOp::initVal,
   MorphologyOp::initVal };
 
-Color aResult;
+Color maResult;
 
 // If we are at the start or at the end of the line, consider outside value
 Value(FilterSharedData const& rShared, bool bLookOutside)
-: aResult(bLookOutside ? rShared.maOutsideColor : initColor)
+: maResult(bLookOutside ? rShared.maOutsideColor : initColor)
 {
 }
 
@@ -108,16 +108,16 @@ template  struct 
Value
sal_uInt8* /*pHint*/ = nullptr)
 {
 const auto aSource = pReadAccess->GetColor(y, x);
-aResult = Color(ColorAlpha, MorphologyOp::apply(aSource.GetAlpha(), 
aResult.GetAlpha()),
-MorphologyOp::apply(aSource.GetRed(), 
aResult.GetRed()),
-MorphologyOp::apply(aSource.GetGreen(), 
aResult.GetGreen()),
-MorphologyOp::apply(aSource.GetBlue(), 
aResult.GetBlue()));
+maResult = Color(ColorAlpha, MorphologyOp::apply(aSource.GetAlpha(), 
maResult.GetAlpha()),
+ MorphologyOp::apply(aSource.GetRed(), 
maResult.GetRed()),
+ MorphologyOp::apply(aSource.GetGreen(), 
maResult.GetGreen()),
+ MorphologyOp::apply(aSource.GetBlue(), 
maResult.GetBlue()));
 }
 
 void copy(BitmapScopedWriteAccess& pWriteAccess, sal_Int32 x, sal_Int32 y,
   sal_uInt8* /*pHint*/ = nullptr)
 {
-pWriteAccess->SetPixel(y, x, aResult);
+pWriteAccess->SetPixel(y, x, maResult);
 }
 };
 


core.git: sdext/source

2025-01-17 Thread Dr. David Alan Gilbert (via logerrit)
 sdext/source/pdfimport/README.md |  106 +++
 1 file changed, 106 insertions(+)

New commits:
commit 9f147a024c2efd88a3fadbf2f89800a1659f544e
Author: Dr. David Alan Gilbert 
AuthorDate: Sat Jan 11 21:53:50 2025 +
Commit: David Gilbert 
CommitDate: Sat Jan 18 01:11:32 2025 +0100

sdext: Document the pdf import code

Change-Id: I572d9a73a652df1f26cf4c6434be4ebe8c5bff00
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180132
Tested-by: Jenkins
Reviewed-by: David Gilbert 

diff --git a/sdext/source/pdfimport/README.md b/sdext/source/pdfimport/README.md
new file mode 100644
index ..6ce7986005e9
--- /dev/null
+++ b/sdext/source/pdfimport/README.md
@@ -0,0 +1,106 @@
+# PDF import
+
+## Introduction
+
+The code in this directory parses a PDF file and builds a LibreOffice
+document contain similar elements, which can then be edited.
+It is invoked when opening a PDF file, but **not** when inserting
+a PDF into a document.  Inserting a PDF file renders it and inserts
+a non-editable, rendered version.
+
+The parsing is done by the libary [Poppler](https://poppler.freedesktop.org/)
+which then calls back into one layer of this code which is built as a
+Poppler output device implementation.
+
+The PDF format is specified by [this 
document](https://opensource.adobe.com/dc-acrobat-sdk-docs/pdfstandards/PDF32000_2008.pdf).
+
+Note that PDF is a language that describes how to **render** a page, not
+a language for describing an editable document, thus some of the conversion
+is a heuristic that doesn't always give good results.
+
+Indeed, PDF is Turing complete, and can embed Javascript, which is also
+Turing complete, so it's a wonder that PDFs ever manage to display anything.
+
+## Current limitations
+
+- Not all elements have clipping implemented.
+
+- LibreOffice's clipping routines all use Even-odd winding rules, where
+as PDF can (and usually does) use non-zero winding rules, making some
+clipping operations incorrect.
+
+- In PDF, there's no concept of lines of text or paragraphs, each
+character can be entirely separate.  The code has very simple heuristics
+for reassembling characters back into lines of text.
+Other programs, like *pdftotext* have more complex heuristics that might be 
worth a try.
+
+- Some cheap PDF operations, like the more advanced fills, generate many
+hundreds of objects in LibreOffice, which can make the document painfully
+slow to open.  At least some of these are possible to improve by adding
+more Poppler API implementations.  Some may require expanding LibreOffice's
+set of fill types.
+
+- There can be differences between distributions Poppler library builds
+and the builds LibreOffice builds when it doesn't have a distro build
+to use, e.g. in LibreOffice's own distributed builds or the bibisect
+builds.  In particular the distro builds may include another library
+(supporting another embedded image type) than LibreOffice's build.
+
+## Fundamental limitations
+
+- The ordering of fonts embedded in PDF are often ASCII, but not always.
+Sometimes they're arbitrary.  They may then include a *ToUnicode* map allowing
+programs to map the arbitrary index back to Unicode.  Alas not all PDFs
+include it, and some even use a bogus map to make it harder to copy/edit.
+If the same PDF renders correctly in other readers but fails to copy-and-paste
+then this is probably the issue.
+
+- PDF can use complex programming in many places, for example a simple fill
+could be composed of a complex program to generate the fill tiles instead
+of an obvious simple item that can be encoded as LibreOffice shading type.
+Rendering these down to image tiles works OK but can sometimes end up
+with a fuzzy image rather than a nice sharp vector representation.
+
+- Poppler's device interface API is not meant to be stable.  The code
+thus has lots of ifdef's to deal with different Poppler versions.
+
+## Structure
+
+Note that the structure is dictated by Poppler being GPL licensed, where
+as LibreOffice isn't.
+
+- *xpdfwrapper/* contains the GPL code that's linked with Poppler
+and forms the *xpdfimport* binary.That binary outputs a stream
+representing the PDF as simpler operations (lines, clipping operations,
+images etc).  These form a series of commands on stdout, and binary
+data (mostly images) on stderr.  This does make adding debugging tricky.
+
+- *wrapper/* contains the LibreOffice glue that execs the *xpdfimport*
+binary and parses the stream.  It also sets up password entry for
+protected PDFs.  After parsing the keyword and then any data that
+should be with the keyword, this layer than calls into the following
+tree layer.
+
+- *tree/*' forms internal tree objects for each of the calls from the
+wrapper layer.  The tree is then 'visited' by optimisation layers
+(that do things like assemble individual characters into lines of text)
+and then by backend specific XML generators (e.g. for Draw and Writer)
+t

core.git: soltools/cpp

2025-01-17 Thread Bogdan Buzea (via logerrit)
 soltools/cpp/cpp.h |2 --
 1 file changed, 2 deletions(-)

New commits:
commit d39b3dabbfdc61bb886e6dae36fb9740bf78db3b
Author: Bogdan Buzea 
AuthorDate: Sat Nov 23 16:47:36 2024 +0100
Commit: David Gilbert 
CommitDate: Sat Jan 18 01:16:13 2025 +0100

tdf#152299 - Remove unused define(s) from C/C++ files

Change-Id: I395cabac91b986e94869578921a1de491219dfc6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177157
Reviewed-by: David Gilbert 
Tested-by: Jenkins

diff --git a/soltools/cpp/cpp.h b/soltools/cpp/cpp.h
index 000327561d52..b72188472212 100644
--- a/soltools/cpp/cpp.h
+++ b/soltools/cpp/cpp.h
@@ -68,8 +68,6 @@ extern void setup_kwtab(void);
 
 #define EOB 0xFE/* sentinel for end of input buffer */
 #define EOFC0xFD/* sentinel for end of input file */
-#define XPWS1   /* token flag: white space to assure 
token sep. */
-#define XTWS2
 
 typedef struct token
 {


core.git: include/vcl

2025-01-17 Thread Bogdan Buzea (via logerrit)
 include/vcl/toolkit/combobox.hxx |1 -
 1 file changed, 1 deletion(-)

New commits:
commit 345738b9e6094d2d8f55c040c0d134d53adf3cf1
Author: Bogdan Buzea 
AuthorDate: Sat Nov 23 14:52:25 2024 +0100
Commit: David Gilbert 
CommitDate: Sat Jan 18 01:17:31 2025 +0100

tdf#152299 - Remove unused define(s) from C/C++ files

Change-Id: I3749b9d198eb0f237de31ae479394f4e3800c973
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177137
Tested-by: Jenkins
Reviewed-by: David Gilbert 

diff --git a/include/vcl/toolkit/combobox.hxx b/include/vcl/toolkit/combobox.hxx
index 9e676601f8a8..2448626cd597 100644
--- a/include/vcl/toolkit/combobox.hxx
+++ b/include/vcl/toolkit/combobox.hxx
@@ -28,7 +28,6 @@
 #include 
 
 #define COMBOBOX_APPEND (SAL_MAX_INT32)
-#define COMBOBOX_ENTRY_NOTFOUND (SAL_MAX_INT32)
 #define COMBOBOX_MAX_ENTRIES(SAL_MAX_INT32 - 1)
 
 class ImplBtn;


core.git: sfx2/source

2025-01-17 Thread Bogdan Buzea (via logerrit)
 sfx2/source/inc/openflag.hxx |4 
 1 file changed, 4 deletions(-)

New commits:
commit 0b3c285cedfa63285519354708e28c113851b98b
Author: Bogdan Buzea 
AuthorDate: Sat Nov 23 16:43:02 2024 +0100
Commit: David Gilbert 
CommitDate: Sat Jan 18 01:20:21 2025 +0100

tdf#152299 - Remove unused define(s) from C/C++ files

Change-Id: I469e956f24a33b803243ffe20ebac252766821cb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177154
Tested-by: Jenkins
Reviewed-by: David Gilbert 

diff --git a/sfx2/source/inc/openflag.hxx b/sfx2/source/inc/openflag.hxx
index 11421d8cfca4..e35d4191d86a 100644
--- a/sfx2/source/inc/openflag.hxx
+++ b/sfx2/source/inc/openflag.hxx
@@ -24,10 +24,6 @@
 // I work on the original, not a copy
 // -> file then can not be opened for editing
 #define SFX_STREAM_READONLY (StreamMode::READ | StreamMode::SHARE_DENYWRITE) 
// + !bDirect
-// Someone else is editing the file, a copy it created
-// -> the file can then be opened for editing
-#define SFX_STREAM_READONLY_MAKECOPY (StreamMode::READ | 
StreamMode::SHARE_DENYNONE)
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


New Defects reported by Coverity Scan for LibreOffice

2025-01-17 Thread scan-admin
Hi,

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

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


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


** CID 1640473:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/core/data/validat.cxx: 429 in ScValidationData::DoError(weld::Window 
*, const rtl::OUString &, const ScAddress &, std::function) const()



*** CID 1640473:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/sc/source/core/data/validat.cxx: 429 in ScValidationData::DoError(weld::Window 
*, const rtl::OUString &, const ScAddress &, std::function) const()
423 xBox->set_default_response(RET_CANCEL);
424 break;
425 default:
426 break;
427 }
428 
>>> CID 1640473:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "callback" is copied in call to copy constructor "std::function>> (bool)>", when it could be moved instead.
429 xBox->runAsync(xBox, [&, callback](sal_uInt32 result)
430{ callback(eErrorStyle == SC_VALERR_STOP || result 
== RET_CANCEL); });
431 }
432 
433 bool ScValidationData::IsDataValidCustom(
434 const OUString& rTest,

** CID 1640472:  Uninitialized members  (UNINIT_CTOR)
/sc/source/core/data/validat.cxx: 429 in ScValidationData::DoError(weld::Window 
*, const rtl::OUString &, const ScAddress &, std::function) 
const::[lambda(unsigned int) (instance 1)]::lambda([lambda(unsigned int) 
(instance 1)]&&)()



*** CID 1640472:  Uninitialized members  (UNINIT_CTOR)
/sc/source/core/data/validat.cxx: 429 in ScValidationData::DoError(weld::Window 
*, const rtl::OUString &, const ScAddress &, std::function) 
const::[lambda(unsigned int) (instance 1)]::lambda([lambda(unsigned int) 
(instance 1)]&&)()
423 xBox->set_default_response(RET_CANCEL);
424 break;
425 default:
426 break;
427 }
428 
>>> CID 1640472:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
429 xBox->runAsync(xBox, [&, callback](sal_uInt32 result)
430{ callback(eErrorStyle == SC_VALERR_STOP || result 
== RET_CANCEL); });
431 }
432 
433 bool ScValidationData::IsDataValidCustom(
434 const OUString& rTest,

** CID 1640471:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/cui/source/dialogs/SignSignatureLineDialog.cxx: 167 in 
SignSignatureLineDialog::chooseCertificate(weld::Button &)()



*** CID 1640471:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
/cui/source/dialogs/SignSignatureLineDialog.cxx: 167 in 
SignSignatureLineDialog::chooseCertificate(weld::Button &)()
161 = svx::SignatureLineHelper::getSignatureCertificate(pShell, 
nullptr, m_xDialog.get());
162 
163 if (xSignCertificate.is())
164 {
165 m_xSelectedCertifate = xSignCertificate;
166 svl::crypto::CertificateOrName aCertificateOrName;
>>> CID 1640471:  Performance inefficiencies  (COPY_INSTEAD_OF_MOVE)
>>> "xSignCertificate" is copied in a call to copy assignment "operator =", 
>>> when it could be moved instead.
167 aCertificateOrName.m_xCertificate = xSignCertificate;
168 m_xBtnChooseCertificate->set_label(
169 
svx::SignatureLineHelper::getSignerName(aCertificateOrName));
170 }
171 ValidateFields();
172 }

** CID 1640470:  Uninitialized members  (UNINIT_CTOR)
/sc/source/core/data/validat.cxx: 429 in ScValidationData::DoError(weld::Window 
*, const rtl::OUString &, const ScAddress &, std::function) 
const::[lambda(unsigned int) (instance 1)]::lambda(const [lambda(unsigned int) 
(instance 1)]&)()



*** CID 1640470:  Uninitialized members  (UNINIT_CTOR)
/sc/source/core/data/validat.cxx: 429 in ScValidationData::DoError(weld::Window 
*, const rtl::OUString &, const ScAddress &, std::function) 
const::[lambda(unsigned int) (instance 1)]::lambda(const [lambda(unsigned int) 
(instance 1)]&)()
423 xBox->set_default_response(RET_CANCEL);
424 break;
425 default:
426 break;
427 }
428 
>>> CID 1640470:  Uninitialized members  (UNINIT_CTOR)
>>> Non-static class member "this" is not initialized in this constructor 
>>> nor in any functions that it calls.
429 xBox->runAsync(xBox,

help.git: source/text

2025-01-17 Thread Andrea Gelmini (via logerrit)
 source/text/swriter/01/0513.xhp |1 -
 1 file changed, 1 deletion(-)

New commits:
commit e17de2924949bccdbe3aedb527fac6acc210e6e3
Author: Andrea Gelmini 
AuthorDate: Fri Jan 17 00:09:17 2025 +0100
Commit: Olivier Hallot 
CommitDate: Fri Jan 17 22:04:24 2025 +0100

Fix typo

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

diff --git a/source/text/swriter/01/0513.xhp 
b/source/text/swriter/01/0513.xhp
index ba1444e41d..5624eceee1 100644
--- a/source/text/swriter/01/0513.xhp
+++ b/source/text/swriter/01/0513.xhp
@@ -38,7 +38,6 @@
 
 Styles in Writer
 
-UFI: 
this is no more "Style Catalog" dialog, but we need the links and 
tablesUFI: another comment: the Style Catalog can be 
customized to be visible again!!! Dont know it this is temporary bug, 
workaround, or feature
 The following information 
concerns Writer styles that you can apply using the Styles deck of the Sidebar.
 
 If you want, you can edit the 
styles of the current document, and then save the document as a template. To 
save the document as template, choose File - Templates - Save as 
Template.


core.git: helpcontent2

2025-01-17 Thread Andrea Gelmini (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 526ea4cc178f8f923c7fcc3fc6b4eea0d8538a07
Author: Andrea Gelmini 
AuthorDate: Fri Jan 17 22:04:25 2025 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Jan 17 22:04:25 2025 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to e17de2924949bccdbe3aedb527fac6acc210e6e3
  - Fix typo

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

diff --git a/helpcontent2 b/helpcontent2
index 186169d9bd0f..e17de2924949 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 186169d9bd0f713a780e5aae2d8ac71916fb3a60
+Subproject commit e17de2924949bccdbe3aedb527fac6acc210e6e3


core.git: sw/qa sw/source

2025-01-17 Thread Justin Luth (via logerrit)
 sw/qa/core/header_footer/HeaderFooterTest.cxx  |5 +++
 sw/qa/extras/rtfexport/rtfexport8.cxx  |   12 +++
 sw/source/writerfilter/dmapper/PropertyMap.cxx |   39 ++---
 3 files changed, 40 insertions(+), 16 deletions(-)

New commits:
commit 23a73756211eb198c2e6e46975d564c6274165a2
Author: Justin Luth 
AuthorDate: Thu Jan 16 20:25:22 2025 -0500
Commit: Justin Luth 
CommitDate: Sat Jan 18 00:33:46 2025 +0100

tdf#164748 writerfilter: fix missing even/odd header properties

Lots of header/footer page style properties are ignored
if the header/footer is not first enabled.
So copying propertyList MUST follow completeCopyHeaderFooter()
[which is where all those settings are turned on].

However, copying properties AFTER turning on the header/footer
was Exception'ing when trying to copy
BottomMarginComplexColor as void().

So ignore any property-copy errors,
and then everything should work in theory...
...and it seems to.

make CppunitTest_sw_core_header_footer \
CPPUNIT_TEST_NAME=testBnc519228OddBreaks

make CppunitTest_sw_rtfexport8 \
CPPUNIT_TEST_NAME=testTdf160976_headerFooter

Change-Id: Iecf0a070e77525c04b44c4fc38efa0f9d558eca5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180417
Tested-by: Jenkins
Reviewed-by: Justin Luth 

diff --git a/sw/qa/core/header_footer/HeaderFooterTest.cxx 
b/sw/qa/core/header_footer/HeaderFooterTest.cxx
index af4e388dff2f..f277a0ed77aa 100644
--- a/sw/qa/core/header_footer/HeaderFooterTest.cxx
+++ b/sw/qa/core/header_footer/HeaderFooterTest.cxx
@@ -643,6 +643,8 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, 
testFirstPageFooterEnabled)
 CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testBnc519228OddBreaks)
 {
 auto verify = [this]() {
+CPPUNIT_ASSERT_EQUAL(5, getPages()); // logical pages - "blank page" 4 
usually not displayed
+
 // Check that all the normal styles are not set as right-only, those 
should be only those used after odd page breaks.
 auto xStyles = getStyles(u"PageStyles"_ustr);
 uno::Reference xStyle;
@@ -696,6 +698,9 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, 
testBnc519228OddBreaks)
 
 CPPUNIT_ASSERT_EQUAL(getProperty(page1Style, 
u"TopMargin"_ustr),
  getProperty(page2Style, 
u"TopMargin"_ustr));
+//tdf164748
+CPPUNIT_ASSERT_EQUAL(getProperty(page1Style, 
u"HeaderDynamicSpacing"_ustr),
+ getProperty(page2Style, 
u"HeaderDynamicSpacing"_ustr));
 }
 
 // Page 5
diff --git a/sw/qa/extras/rtfexport/rtfexport8.cxx 
b/sw/qa/extras/rtfexport/rtfexport8.cxx
index 7184b7cc5b89..e8e607c59126 100644
--- a/sw/qa/extras/rtfexport/rtfexport8.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport8.cxx
@@ -431,6 +431,18 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf160976_headerFooter)
 verify();
 saveAndReload(mpFilter);
 verify(/*IsExported*/ true);
+
+//tdf#164748: export must have the all same footer settings as the first 
page
+auto xStyles = getStyles(u"PageStyles"_ustr);
+auto xPara = getParagraph(2, "2");
+OUString page2StyleName = getProperty(xPara, 
u"PageDescName"_ustr);
+uno::Reference page2Style;
+page2Style.set(xStyles->getByName(page2StyleName), uno::UNO_QUERY);
+CPPUNIT_ASSERT(getProperty(page2Style, 
u"FooterDynamicSpacing"_ustr));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(915),
+ getProperty(page2Style, 
u"FooterBodyDistance"_ustr));
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1016), getProperty(page2Style, 
u"FooterHeight"_ustr));
+
 // note: an unexpected header surfaces on page 3.
 }
 
diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx 
b/sw/source/writerfilter/dmapper/PropertyMap.cxx
index ce373b092890..efd03896 100644
--- a/sw/source/writerfilter/dmapper/PropertyMap.cxx
+++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx
@@ -1478,11 +1478,22 @@ void 
SectionPropertyMap::CreateEvenOddPageStyleCopy(DomainMapper_Impl& rDM_Impl,
 {
 OUString evenOddStyleName = rDM_Impl.GetUnusedPageStyleName();
 rtl::Reference evenOddStyle = 
rDM_Impl.GetTextDocument()->createPageStyle();
-// Unfortunately using setParent() does not work for page styles, so make 
a deep copy of the page style.
+rDM_Impl.GetPageStyles()->insertStyleByName(evenOddStyleName, 
evenOddStyle);
+
 rtl::Reference pageProperties(m_aPageStyle);
 uno::Reference 
pagePropertiesInfo(pageProperties->getPropertySetInfo());
 const uno::Sequence 
propertyList(pagePropertiesInfo->getProperties());
 
+if (rDM_Impl.IsNewDoc())
+{
+bool const 
bEvenAndOdd(rDM_Impl.GetSettingsTable()->GetEvenAndOddHeaders());
+completeCopyHeaderFooter(pageProperties, evenOddStyle,
+!rDM_Impl.SeenHeaderFooter(PagePartType::Header, PageType::RIGHT)
+&& (!bEvenAndOdd || 
!rDM_Impl.SeenHeaderFooter(PagePartType::Header

core.git: include/basegfx include/o3tl

2025-01-17 Thread Tomaž Vajngerl (via logerrit)
 include/basegfx/tuple/Tuple2D.hxx |   16 +---
 include/o3tl/concepts.hxx |3 +++
 2 files changed, 8 insertions(+), 11 deletions(-)

New commits:
commit 76b55ced15a85f2cd5da8e14a1543cd98c921357
Author: Tomaž Vajngerl 
AuthorDate: Fri Jan 17 23:12:18 2025 +0900
Commit: Tomaž Vajngerl 
CommitDate: Sat Jan 18 02:56:34 2025 +0100

basegfx: simplify template code by using concepts

Change-Id: Ie5bff37dbc20253ec869b2e0e0379eb22e78f6d2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180415
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/include/basegfx/tuple/Tuple2D.hxx 
b/include/basegfx/tuple/Tuple2D.hxx
index 7494b4d1b13a..09acb035620c 100644
--- a/include/basegfx/tuple/Tuple2D.hxx
+++ b/include/basegfx/tuple/Tuple2D.hxx
@@ -10,6 +10,7 @@
 
 #pragma once
 
+#include 
 #include 
 #include 
 
@@ -68,26 +69,19 @@ public:
 
 // comparators with tolerance
 
-template , int> 
= 0>
-bool equal(const Tuple2D& rTup) const
+template  bool equal(const Tuple2D& rTup) 
const
 {
 return mnX == rTup.mnX && mnY == rTup.mnY;
 }
 
-template , 
int> = 0>
-bool equal(const Tuple2D& rTup) const
+template  bool equal(const Tuple2D& 
rTup) const
 {
 return this == &rTup || (fTools::equal(mnX, rTup.mnX) && 
fTools::equal(mnY, rTup.mnY));
 }
 
-template , int> 
= 0>
-bool equalZero() const
-{
-return mnX == 0 && mnY == 0;
-}
+template  bool equalZero() const { return mnX == 
0 && mnY == 0; }
 
-template , 
int> = 0>
-bool equalZero() const
+template  bool equalZero() const
 {
 return fTools::equalZero(mnX) && fTools::equalZero(mnY);
 }
diff --git a/include/o3tl/concepts.hxx b/include/o3tl/concepts.hxx
index 261d063ebca2..f47aef5f256d 100644
--- a/include/o3tl/concepts.hxx
+++ b/include/o3tl/concepts.hxx
@@ -23,6 +23,7 @@ namespace o3tl
 using std::integral;
 using std::signed_integral;
 using std::unsigned_integral;
+using std::floating_point;
 }
 
 #else
@@ -38,6 +39,8 @@ template  concept integral = 
std::is_integral_v;
 template  concept signed_integral = integral&& 
std::is_signed_v;
 
 template  concept unsigned_integral = integral && 
!signed_integral;
+
+template  concept floating_point = std::is_floating_point_v;
 }
 
 #endif


core.git: comphelper/source cppuhelper/source include/comphelper

2025-01-17 Thread Caolán McNamara (via logerrit)
 comphelper/source/misc/compbase.cxx |6 --
 cppuhelper/source/compbase.cxx  |6 --
 cppuhelper/source/implbase_ex.cxx   |6 --
 cppuhelper/source/weak.cxx  |   14 +-
 include/comphelper/proparrhlp.hxx   |9 +++--
 5 files changed, 8 insertions(+), 33 deletions(-)

New commits:
commit a1a3fd98dcb3c9336eeaffe1d9def7c3ca8c699b
Author: Caolán McNamara 
AuthorDate: Sun Nov 17 19:48:42 2024 +
Commit: Stephan Bergmann 
CommitDate: Fri Jan 17 09:34:24 2025 +0100

cid#1555986 Check of thread-shared field evades lock acquisition

and

cid#1556190 Check of thread-shared field evades lock acquisition
cid#1555295 Check of thread-shared field evades lock acquisition
cid#1608596 Check of thread-shared field evades lock acquisition
cid#1555236 Check of thread-shared field evades lock acquisition

Double-checked locking pattern

Change-Id: Id5cba26750bbd9c7e0248181f636ff653ada5654
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/176739
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-by: Stephan Bergmann 

diff --git a/comphelper/source/misc/compbase.cxx 
b/comphelper/source/misc/compbase.cxx
index eafabb013937..02efae8b71c4 100644
--- a/comphelper/source/misc/compbase.cxx
+++ b/comphelper/source/misc/compbase.cxx
@@ -97,7 +97,6 @@ static bool td_equals(typelib_TypeDescriptionReference const* 
pTDR1,
 static cppu::type_entry* getTypeEntries(cppu::class_data* cd)
 {
 cppu::type_entry* pEntries = cd->m_typeEntries;
-if (!cd->m_storedTypeRefs) // not inited?
 {
 static std::mutex aMutex;
 std::scoped_lock guard(aMutex);
@@ -122,14 +121,9 @@ static cppu::type_entry* getTypeEntries(cppu::class_data* 
cd)
 // ref is statically held by getCppuType()
 pEntry->m_type.typeRef = rType.getTypeLibType();
 }
-OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
 cd->m_storedTypeRefs = true;
 }
 }
-else
-{
-OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
-}
 return pEntries;
 }
 
diff --git a/cppuhelper/source/compbase.cxx b/cppuhelper/source/compbase.cxx
index ed4909b71106..aca77677a0f4 100644
--- a/cppuhelper/source/compbase.cxx
+++ b/cppuhelper/source/compbase.cxx
@@ -81,7 +81,6 @@ static bool td_equals(typelib_TypeDescriptionReference const* 
pTDR1,
 static cppu::type_entry* getTypeEntries(cppu::class_data* cd)
 {
 cppu::type_entry* pEntries = cd->m_typeEntries;
-if (!cd->m_storedTypeRefs) // not inited?
 {
 static std::mutex aMutex;
 std::scoped_lock guard(aMutex);
@@ -106,14 +105,9 @@ static cppu::type_entry* getTypeEntries(cppu::class_data* 
cd)
 // ref is statically held by getCppuType()
 pEntry->m_type.typeRef = rType.getTypeLibType();
 }
-OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
 cd->m_storedTypeRefs = true;
 }
 }
-else
-{
-OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
-}
 return pEntries;
 }
 
diff --git a/cppuhelper/source/implbase_ex.cxx 
b/cppuhelper/source/implbase_ex.cxx
index 3f88feb97dd1..9d3e03412737 100644
--- a/cppuhelper/source/implbase_ex.cxx
+++ b/cppuhelper/source/implbase_ex.cxx
@@ -64,7 +64,6 @@ static bool td_equals(
 static type_entry * getTypeEntries( class_data * cd )
 {
 type_entry * pEntries = cd->m_typeEntries;
-if (! cd->m_storedTypeRefs) // not inited?
 {
 static std::mutex aMutex;
 std::scoped_lock guard( aMutex );
@@ -86,14 +85,9 @@ static type_entry * getTypeEntries( class_data * cd )
 // ref is statically held by getCppuType()
 pEntry->m_type.typeRef = rType.getTypeLibType();
 }
-OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
 cd->m_storedTypeRefs = true;
 }
 }
-else
-{
-OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
-}
 return pEntries;
 }
 
diff --git a/cppuhelper/source/weak.cxx b/cppuhelper/source/weak.cxx
index 446cdc0e43ba..07fe1cbad359 100644
--- a/cppuhelper/source/weak.cxx
+++ b/cppuhelper/source/weak.cxx
@@ -254,16 +254,12 @@ OWeakObject::~OWeakObject() COVERITY_NOEXCEPT_FALSE
 // XWeak
 Reference< XAdapter > SAL_CALL OWeakObject::queryAdapter()
 {
-if (!m_pWeakConnectionPoint)
+std::scoped_lock aGuard( *gpWeakMutex );
+if( !m_pWeakConnectionPoint )
 {
-// only acquire mutex if member is not created
-std::scoped_lock aGuard( *gpWeakMutex );
-if( !m_pWeakConnectionPoint )
-{
-OWeakConnectionPoint * p = new OWeakConnectionPoint(this);
-p->acquire();
-m_pWeakConnectionPoint = p;
-}
+OWeakConnectionPoint * p = new OWeakConnectionPoint(this);
+p->acquire();
+m_pWeakConnectionPoint = p;
 }
 
 return m_pWeakConnectionPoint;
diff --git a/include/comphelper/propa

core.git: configure.ac

2025-01-17 Thread Xisco Fauli (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2761a14646da14cde30988c19cc22ee02a0281fd
Author: Xisco Fauli 
AuthorDate: Fri Jan 17 09:37:45 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 17 09:42:07 2025 +0100

configure.ac: fix typo

I hope it fixes https://ci.libreoffice.org/job/lo_tb_master_win_analyze/
where ENABLE_MSVC_ANALYZE=1 is not doing anything

Change-Id: Ibc2ca6151720d152400f80da611093ec4679e21e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180376
Reviewed-by: Xisco Fauli 
Tested-by: Xisco Fauli 

diff --git a/configure.ac b/configure.ac
index 6da72c76b577..740254251a29 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14395,7 +14395,7 @@ ENABLE_MSVC_ANALYZE=
 AC_MSG_CHECKING([whether to use MSVC /analyze])
 if test -n "$enable_msvc_analyze" -a "$enable_msvc_analyze" != "no"; then
 if test "$_os" = "WINNT"; then
-ENABLE_MSVC_ANALYZE=Yes
+ENABLE_MSVC_ANALYZE=yes
 AC_MSG_RESULT([yes])
 else
AC_MSG_ERROR([--enable-msvc-analyze is only supported on Windows])


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

2025-01-17 Thread Mike Kaganski (via logerrit)
 sfx2/source/appl/linkmgr2.cxx |   25 +
 1 file changed, 17 insertions(+), 8 deletions(-)

New commits:
commit e4e7616ab4c4fe23c9ec25c93a8006cef230b330
Author: Mike Kaganski 
AuthorDate: Thu Jan 16 13:21:46 2025 +0500
Commit: Miklos Vajna 
CommitDate: Fri Jan 17 09:46:00 2025 +0100

LOK: Do not try to show an "update links" dialog

In commit f8528cdda9292c7ae6c9d49b80c1a3a3b4a67094 (LOK: don't crash
when trying to show a dialog during file load, 2024-12-26), all not
yet async / not properly set up dialogs made to fail gracefully. In
the follow-up https://gerrit.libreoffice.org/c/core/+/180334, an
assert is added to still fail in debug builds.

The specific "update links" dialog case, that triggered the original
change in the first place, does not need to appear at all in the LOK
case, because there is no external documents available for updating.
This change avoids the dialog in that case.

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

diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 3412d727c656..22bccfe904e2 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -277,6 +280,12 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * 
pLink,
 return bRet;
 }
 
+static void disallowAllLinksUpdate(SvBaseLink* pShellProvider)
+{
+if (SfxObjectShell* pShell = 
pShellProvider->GetLinkManager()->GetPersist())
+pShell->getEmbeddedObjectContainer().setUserAllowsLinkUpdate(false);
+}
+
 void LinkManager::UpdateAllLinks(
 bool bAskUpdate,
 bool bUpdateGrfLinks,
@@ -322,6 +331,13 @@ void LinkManager::UpdateAllLinks(
 
 if( bAskUpdate )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+// only one document in jail, no update possible
+disallowAllLinksUpdate(pLink);
+return;
+}
+
 OUString aMsg = SfxResId(STR_QUERY_UPDATE_LINKS);
 INetURLObject aURL(pPersist->getDocumentBaseURL());
 aMsg = aMsg.replaceFirst("%{filename}", aURL.GetLastName());
@@ -333,14 +349,7 @@ void LinkManager::UpdateAllLinks(
 int nRet = xQueryBox->run();
 if( RET_YES != nRet )
 {
-SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
-
-if(pShell)
-{
-comphelper::EmbeddedObjectContainer& 
rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
-rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
-}
-
+disallowAllLinksUpdate(pLink);
 return ;// nothing should be updated
 }
 bAskUpdate = false;  // once is enough


core.git: sw/source

2025-01-17 Thread Noel Grandin (via logerrit)
 sw/source/uibase/uiview/view2.cxx |   21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

New commits:
commit a6c9519b5f92eab604a8884aa6db4e8f1ac616b3
Author: Noel Grandin 
AuthorDate: Fri Jan 17 11:17:33 2025 +0200
Commit: Noel Grandin 
CommitDate: Fri Jan 17 12:16:36 2025 +0100

tdf#137848 Speed up inserting rotated image

Since writer supports displaying rotation now, we don't need to convert
and rotate the image data itself

Change-Id: I547d8da98125f8956badeb0c113f2d6ab332ee86
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180380
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 74b2b9f738ab..a566915a7e16 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -157,6 +157,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -330,19 +331,13 @@ ErrCode SwView::InsertGraphic( const OUString &rPath, 
const OUString &rFilter,
 
 if( ERRCODE_NONE == aResult )
 {
+Degree10 aRotation;
 GraphicNativeMetadata aMetadata;
 if ( aMetadata.read(aGraphic) )
-{
-const Degree10 aRotation = aMetadata.getRotation();
-if (aRotation)
-{
-GraphicNativeTransform aTransform( aGraphic );
-aTransform.rotate( aRotation );
-}
-}
+aRotation = aMetadata.getRotation();
 
-SwFlyFrameAttrMgr aFrameManager( true, GetWrtShellPtr(), 
Frmmgr_Type::GRF, nullptr );
 SwWrtShell& rShell = GetWrtShell();
+SwFlyFrameAttrMgr aFrameManager( true, &rShell, Frmmgr_Type::GRF, 
nullptr );
 
 // #i123922# determine if we really want to insert or replace the 
graphic at a selected object
 const bool bReplaceMode(rShell.HasSelection() && SelectionType::Frame 
== rShell.GetSelectionType());
@@ -376,6 +371,14 @@ ErrCode SwView::InsertGraphic( const OUString &rPath, 
const OUString &rFilter,
 rShell.InsertGraphic( OUString(), OUString(), aGraphic, 
&aFrameManager );
 }
 
+if (aRotation)
+{
+SfxItemSetFixed 
aSet( rShell.GetAttrPool() );
+rShell.GetCurAttr( aSet );
+const SwRotationGrf& rRotation = aSet.Get(RES_GRFATR_ROTATION);
+aFrameManager.SetRotation(rRotation.GetValue(), aRotation, 
rRotation.GetUnrotatedSize());
+}
+
 // it is too late after "EndAction" because the Shell can already 
be destroyed.
 rShell.EndAction();
 }


core.git: Branch 'distro/collabora/co-24.04' - compilerplugins/LICENSE.TXT cui/inc odk/docs odk/examples odk/index.html odk/index_online.html readlicense_oo/license setup_native/source sfx2/uiconfig

2025-01-17 Thread Xisco Fauli (via logerrit)
 compilerplugins/LICENSE.TXT  |2 
 cui/inc/strings.hrc  |2 
 odk/docs/install.html|2 
 odk/docs/tools.html  |2 
 odk/examples/DevelopersGuide/examples.html   |2 
 odk/examples/examples.html   |2 
 odk/index.html   |2 
 odk/index_online.html|2 
 readlicense_oo/license/license.xml   |2 
 setup_native/source/packinfo/packinfo_brand.txt  |   16 -
 setup_native/source/packinfo/packinfo_extensions.txt |8 
 setup_native/source/packinfo/packinfo_librelogo_disabled.txt |2 
 setup_native/source/packinfo/packinfo_office.txt |  126 +--
 setup_native/source/packinfo/packinfo_office_help.txt|2 
 setup_native/source/packinfo/packinfo_office_lang.txt|   20 -
 setup_native/source/packinfo/packinfo_sdkoo.txt  |2 
 setup_native/source/packinfo/packinfo_ure.txt|4 
 sfx2/uiconfig/ui/licensedialog.ui|2 
 18 files changed, 100 insertions(+), 100 deletions(-)

New commits:
commit a35e66d02d9a8a9cbe3afb520c0952fb12e18c96
Author: Xisco Fauli 
AuthorDate: Thu Jan 2 11:26:43 2025 +0100
Commit: Andras Timar 
CommitDate: Fri Jan 17 13:26:20 2025 +0100

bump copyright year to 2025

Conflicts:
  setup_native/source/packinfo/packinfo_brand.txt
  setup_native/source/packinfo/packinfo_extensions.txt
  setup_native/source/packinfo/packinfo_office.txt
  setup_native/source/packinfo/packinfo_office_help.txt
  setup_native/source/packinfo/packinfo_office_lang.txt
  setup_native/source/packinfo/packinfo_sdkoo.txt
  setup_native/source/packinfo/packinfo_ure.txt

Change-Id: Id2d0597ed86a5f798eec22dde5b954c06442a2a1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179610
Reviewed-by: Xisco Fauli 
Tested-by: Jenkins
(cherry picked from commit 48527403950033b7002807bd248a5e887af5159d)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179615
Reviewed-by: Adolfo Jayme Barrientos 
Tested-by: Adolfo Jayme Barrientos 
(cherry picked from commit e52e3641de46dd41596687b357b3925a0f05ab09)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180383
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/compilerplugins/LICENSE.TXT b/compilerplugins/LICENSE.TXT
index 860092aee87e..0bb2ee4d236c 100644
--- a/compilerplugins/LICENSE.TXT
+++ b/compilerplugins/LICENSE.TXT
@@ -1,7 +1,7 @@
 University of Illinois/NCSA
 Open Source License
 
-Copyright (c) 2012-2024 The Document Foundation
+Copyright (c) 2012-2025 The Document Foundation
 All rights reserved.
 
 Developed by:
diff --git a/cui/inc/strings.hrc b/cui/inc/strings.hrc
index 52c4a7e4244a..79567e88d9e2 100644
--- a/cui/inc/strings.hrc
+++ b/cui/inc/strings.hrc
@@ -358,7 +358,7 @@
 
 #define RID_CUISTR_CANNOTCONVERTURL_ERR 
NC_("RID_SVXSTR_CANNOTCONVERTURL_ERR", "The URL <%1> cannot be converted to a 
filesystem path.")
 
-#define RID_CUISTR_ABOUT_COPYRIGHT  
NC_("aboutdialog|copyright", "Copyright © 2000–2024 LibreOffice contributors.")
+#define RID_CUISTR_ABOUT_COPYRIGHT  
NC_("aboutdialog|copyright", "Copyright © 2000–2025 LibreOffice contributors.")
 #define RID_CUISTR_ABOUT_VENDOR NC_("aboutdialog|vendor", 
"This release was supplied by %OOOVENDOR.")
 #define RID_CUISTR_ABOUT_BASED_ON   
NC_("aboutdialog|libreoffice", "LibreOffice was based on OpenOffice.org.")
 #define RID_CUISTR_ABOUT_DERIVEDNC_("aboutdialog|derived", 
"%PRODUCTNAME is derived from LibreOffice which was based on OpenOffice.org")
diff --git a/odk/docs/install.html b/odk/docs/install.html
index e23fa3a535fe..f25edd10ca40 100644
--- a/odk/docs/install.html
+++ b/odk/docs/install.html
@@ -534,7 +534,7 @@
 
 
   
-Copyright © 2000–2024 LibreOffice contributors. All rights
+Copyright © 2000–2025 LibreOffice contributors. All rights
   reserved.
   LibreOffice was created by The Document Foundation, based on 
OpenOffice.org.
   The Document Foundation acknowledges all community members, 
please
diff --git a/odk/docs/tools.html b/odk/docs/tools.html
index d17542825537..367fb5790bca 100644
--- a/odk/docs/tools.html
+++ b/odk/docs/tools.html
@@ -881,7 +881,7 @@ types the specified types depend on.
 
 
 
-Copyright © 2000–2024 LibreOffice contributors. 
All rights reserved.
+Copyright © 2000–2025 LibreOffice contributors. 
All r

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

2025-01-17 Thread Tomaž Vajngerl (via logerrit)
 sc/source/filter/excel/xename.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c1cf7ae8a734f26aee6fa38a08e53217f3ab88dd
Author: Tomaž Vajngerl 
AuthorDate: Wed Jan 15 13:58:34 2025 +0900
Commit: Andras Timar 
CommitDate: Fri Jan 17 13:28:03 2025 +0100

tdf#148812 write #NAME? for an empty definedName value

This keeps MSOffice silent when opening the documents that don't
have the any range/formula expression set for the define name.

Change-Id: Ib4cc01a5c51b3875c0d8e0870e2bdf9c15794df1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180258
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 1f7a4ef133542b19d5093fe8e02eb366a7888fd7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180370
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/source/filter/excel/xename.cxx 
b/sc/source/filter/excel/xename.cxx
index 84073da8ff90..d0e6a7bc92c2 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -321,6 +321,8 @@ OUString XclExpName::GetWithDefaultRangeSeparator( const 
OUString& rSymbol ) con
 }
 }
 }
+if (rSymbol.isEmpty())
+return u"#NAME?"_ustr;
 return rSymbol;
 }
 


ESC meeting minutes: 2025-01-16

2025-01-17 Thread Miklos Vajna

* Present:
  + Caolan, Cloph, Eike, Michael S, Heiko, Ilmari, Jonathan, Michael W, 
Olivier, Stephan, Hossein, Xisco, Thorsten, Miklos

* Completed Action Items:

* Pending Action Items:

* Release Engineering update (Cloph)
  + 24.8.5 rc1 in 2 weeks
  + 25.2 (final) rc3 next week
+ branch rules: https://wiki.documentfoundation.org/Development/Branches
  + 1 review needed
  + another 2 for the libreoffice-25-2-0 branch, as usual
+ late features:
  + Quick Look plugin for macOS implementation complete and
  installation/troubleshooting page added to wiki (Patrick):
  https://wiki.documentfoundation.org/MacOS/Quick_Look
+ new UI language: Abkhaz (ab) (cloph)
  + now also allowed as a document language
+ Mac App Store paperwork is sorted out, can publish releases there again 
(Cloph)

* Documentation (Olivier)
+ New Help
   + Add dark mode (ohallot)
 + Does that mean the new workflow for apparance? (Heiko)
 + no, the help pages itself can be dark (Olivier)
   + better grid solution in pages (buovjaga)
   + Simpler solution for no-JS browsers (ohallot, after cloph's idea)
+ Helpcontents2
   + Details on PDF passwords (G. Kelemen)
   + Sidebar cell appearance deck (D. Maddern)
   + Watchlist: New Calc functions: TOCOL, etc...
+ Guides
   + Published Calc Guide 24.8

+ Bugzilla Documentation statistics
223(223) bugs open
+ Updates:
BZ changes   1 week   1 month   3 months   12 months
   created 1(-11)   95(-7)121(-2)318(0)
 commented 3(-23)   55(-12)   154(1) 997(-1)
  resolved 0(-4)12(-2) 26(-2)180(0)
+ top 10 contributors:
  Bogdan B made 186 changes in 1 month, and 238 changes in 1 year
  Olivier Hallot made 20 changes in 1 month, and 371 changes in 1 year
  Vernon, Stuart Foote made 17 changes in 1 month, and 184 changes in 1 
year
  Heiko Tietze made 11 changes in 1 month, and 97 changes in 1 year
  Kelemen, Gabor made 4 changes in 1 month, and 10 changes in 1 year
  John made 4 changes in 1 month, and 4 changes in 1 year
  Sahil Gautam made 4 changes in 1 month, and 4 changes in 1 year
  *UNKNOWN* made 3 changes in 1 month, and 3 changes in 1 year
  Dieter made 3 changes in 1 month, and 29 changes in 1 year
  Dione Maddern made 3 changes in 1 month, and 120 changes in 1 year

* UX Update (Heiko)
+ Bugzilla (topicUI) statistics
228(228) (topicUI) bugs open, 17(17) (needsUXEval) needs to be 
evaluated by the UXteam
+ Updates:
BZ changes   1 week1 month   3 months   12 months
 added  1(-4) 6(-9) 10(-14) 17(-13)
 commented 24(-13)   93(-16)   277(-37)   1454(-33)
   removed  1(1)  1(1)   5(1)   12(1)
  resolved  4(-2)16(-1) 51(2)  242(-1)
+ top 10 contributors:
  Heiko Tietze made 56 changes in 1 month, and 780 changes in 1 year
  Vernon, Stuart Foote made 47 changes in 1 month, and 423 changes in 1 
year
  Bogdan B made 31 changes in 1 month, and 51 changes in 1 year
  Roman Kuznetsov made 17 changes in 1 month, and 39 changes in 1 year
  Dieter made 11 changes in 1 month, and 113 changes in 1 year
  Eyal Rozenberg made 7 changes in 1 month, and 185 changes in 1 year
  Ilmari Lauhakangas made 7 changes in 1 month, and 159 changes in 1 
year
  Samuel Mehrbrodt made 5 changes in 1 month, and 8 changes in 1 year
  Dennis Roczek made 4 changes in 1 month, and 4 changes in 1 year
  m.a.riosv made 4 changes in 1 month, and 46 changes in 1 year
   + [Bug 164044] Calc: Auto fill only works on one sheet. it should work across
  all sheets.
  + request is not clear, needinfo
   + [Bug 164679] Hide "save as" formats you never use


* Crash testing (Caolan)
+ 184(-27) import failure, 16(+2) export failures
  - https://wiki.documentfoundation.org/Development/Crashtesting
+ https://bugs.documentfoundation.org/show_bug.cgi?id=164056 (writer, 
layout?)
+ https://bugs.documentfoundation.org/show_bug.cgi?id=164421 (writer, 
rtf)
+ https://bugs.documentfoundation.org/show_bug.cgi?id=164249 (calc)
+ 0 coverity issues
  + new version is out, not yet upgrading
+ 1 ossfuzz issue
  - Integer overflow

* Crash Reporting (from crashreport.libreoffice.org) (Xisco)
+ 24.8.2.155962(+351)
+ 24.8.3.239595(+2583)
+ 24.8.4.28922(+4869)
+ 25.2.0.22(+0)

- New in 25.2: 
https://crashreport.libreoffice.org/stats/signature/SwDocShell::MakeInlineHeading(SwWrtShell%20*,SwTextFormatColl%20*,unsigned%20short)

- Plausible fix: https://gerrit.libreoffice.org/c/core/+/180356


* Mentoring (Hossein)
  + New blog post on dev blog
Outlook for the new year 2025

https://dev.blog.do

core.git: Branch 'distro/collabora/co-24.04' - sc/inc sc/qa sc/source

2025-01-17 Thread Balazs Varga (via logerrit)
 sc/inc/scfuncs.hrc   |4 ++--
 sc/qa/unit/ucalc_formula2.cxx|   14 +++---
 sc/source/core/inc/interpre.hxx  |2 +-
 sc/source/core/tool/interpr1.cxx |   13 -
 4 files changed, 18 insertions(+), 15 deletions(-)

New commits:
commit 0b0ceb3f6ce5092810b891bffc81b4e03e412bbb
Author: Balazs Varga 
AuthorDate: Thu Jun 20 14:07:57 2024 +0200
Commit: Andras Timar 
CommitDate: Fri Jan 17 13:26:46 2025 +0100

Related: tdf#127293 Add new Match_mode option for XLOOKUP and

XMATCH functions.

Introduce a value "3" for parameter Match_mode for Regular Expression mode
in XMATCH and XLOOKUP, to seperate the original Match_mode value "2",
which was used for both, Wildcard and Regular Expression mode as well.

Note: "The ODF TC will follow that in the specification of these functions 
and
at the same time specify, that the host dependent properties 
HOST-USE-REGULAR-EXPRESSIONS
and HOST-USE-WILDCARDS (file format table:use-regular-expressions and 
table:use-wildcards)
will be ignored by these functions."
https://issues.oasis-open.org/browse/OFFICE-4154

Also Microsoft Office will introduce this new value for Match_mode in 
XLOOKUP and XMATCH:

https://insider.microsoft365.com/en-us/blog/new-regular-expression-regex-functions-in-excel

Follow-up commit: 0ca20dca3349daa303b89251443f550491968a39
(Related: tdf#127293 Add unit test for xlookup regex search mode)

Conflicts:
  sc/qa/unit/ucalc_formula2.cxx

Change-Id: Ibcbfa4cf227ab9a9d317d94c1bab8254b1f91822
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169275
Reviewed-by: Balazs Varga 
Tested-by: Jenkins
(cherry picked from commit 17d578ba91f9c78a0e41d19b58183d2214c0b7a4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169294
(cherry picked from commit 607b99ea5b1b1e46622262cc5cfbeea01178d751)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180373
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/inc/scfuncs.hrc b/sc/inc/scfuncs.hrc
index d6509a5c941c..f09be74c8ed8 100644
--- a/sc/inc/scfuncs.hrc
+++ b/sc/inc/scfuncs.hrc
@@ -3390,7 +3390,7 @@ const TranslateId SC_OPCODE_X_LOOKUP_ARY[] =
 NC_("SC_OPCODE_X_LOOKUP", "Result if not found"),
 NC_("SC_OPCODE_X_LOOKUP", "If given, return given text, otherwise return 
#N/A."),
 NC_("SC_OPCODE_X_LOOKUP", "Match Mode"),
-NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
+NC_("SC_OPCODE_X_LOOKUP", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard match.
3 - Regular expression match."),
 NC_("SC_OPCODE_X_LOOKUP", "Search Mode"),
 NC_("SC_OPCODE_X_LOOKUP", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
@@ -3452,7 +3452,7 @@ const TranslateId SC_OPCODE_X_MATCH_ARY[] =
 NC_("SC_OPCODE_X_MATCH", "Search Array"),
 NC_("SC_OPCODE_X_MATCH", "The array or range to search."),
 NC_("SC_OPCODE_X_MATCH", "Match Mode"),
-NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard or regular expression match."),
+NC_("SC_OPCODE_X_MATCH", "0 - Exact match. Will return #N/A if no match. 
(default).
-1 - Exact match or the next smaller item.
1 - Exact match or the next larger item.
2 - Wildcard match.
3 - Regular expression match."),
 NC_("SC_OPCODE_X_MATCH", "Search Mode"),
 NC_("SC_OPCODE_X_MATCH", "1 - Search from the first value (default).
-1 - Search from the last value (reverse).
2 - Binary search values sorted in ascending order.
-2 - Binary search values sorted in descending order.")
 };
diff --git a/sc/qa/unit/ucalc_formula2.cxx b/sc/qa/unit/ucalc_formula2.cxx
index 725c3319f741..0e7a5816ac38 100644
--- a/sc/qa/unit/ucalc_formula2.cxx
+++ b/sc/qa/unit/ucalc_formula2.cxx
@@ -4646,13 +4646,13 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
 sc::AutoCalcSwitch aACSwitch(*m_pDoc, true);
 
 // Temporarily switch regex search mode.
-bool bOldWildCard = false;
+bool bOldRegex = false;
 ScDocOptions aDocOpt = m_pDoc->GetDocOptions();
-if (!aDocOpt.IsFormulaRegexEnabled())
+if (aDocOpt.IsFormulaRegexEnabled())
 {
-aDocOpt.SetFormulaRegexEnabled(true);
+aDocOpt.SetFormulaRegexEnabled(false);
 m_pDoc->SetDocOptions(aDocOpt);
-bOldWildCard = true;
+bOldRegex = true;
 }
 
 m_pDoc->InsertTab(0, "Test1");
@@ -4672,7 +4672,7 @@ CPPUNIT_TEST_FIXTURE(TestF

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

2025-01-17 Thread Andras Timar (via logerrit)
 desktop/source/lib/init.cxx   |   13 +
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |3 +++
 2 files changed, 16 insertions(+)

New commits:
commit 7b43ce868f980dc47c37f482900210eae2d0187e
Author: Andras Timar 
AuthorDate: Thu Jan 16 10:56:38 2025 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 17 09:57:29 2025 +0100

LOK: preload hyphenators

Without this fix the hyphenation feature did not work when
bind mounting was not available, e.g. in docker containers.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 7f09d490ba0a..498e8cb3975b 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7775,6 +7775,19 @@ static void preloadData()
 }
 std::cerr << "
";
 
+// preload all available hyphenators
+css::uno::Reference 
xHyphenator(xLngSvcMgr->getHyphenator());
+css::uno::Reference 
xHyphLocales(xHyphenator, css::uno::UNO_QUERY_THROW);
+aLocales = xHyphLocales->getLocales();
+std::cerr << "Preloading local hyphenators: ";
+for (auto &it : std::as_const(aLocales))
+{
+std::cerr << LanguageTag::convertToBcp47(it) << " ";
+css::beans::PropertyValues aNone;
+xHyphenator->createPossibleHyphens(u"forcefed"_ustr, it, aNone);
+}
+std::cerr << "
";
+
 std::cerr << "Preloading breakiterator
";
 if (aLocales.getLength())
 {
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx 
b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 8ac156ef8cb3..60cbfb5a87d9 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -138,6 +139,8 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
 {
 for (const auto& rLocaleName : dict.aLocaleNames)
 {
+if 
(!comphelper::LibreOfficeKit::isAllowlistedLanguage(rLocaleName))
+continue;
 aLocaleNamesSet.insert( rLocaleName );
 }
 }


core.git: 2 commits - sc/inc sc/source sw/source

2025-01-17 Thread Pranam Lashkari (via logerrit)
 sc/inc/validat.hxx   |3 ++-
 sc/source/core/data/validat.cxx  |   27 ++-
 sc/source/ui/app/inputhdl.cxx|   25 +++--
 sc/source/ui/inc/inputhdl.hxx|2 ++
 sw/source/uibase/docvw/PostItMgr.cxx |6 ++
 5 files changed, 39 insertions(+), 24 deletions(-)

New commits:
commit 1ee33246ae88f484e074a6ac15060cc41374ab5a
Author: Pranam Lashkari 
AuthorDate: Tue Dec 24 11:59:39 2024 +0530
Commit: Pranam Lashkari 
CommitDate: Fri Jan 17 14:41:51 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 
(cherry picked from commit 0b3e73526496875735eeb657929d94897a840b02)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180289
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/sw/source/uibase/docvw/PostItMgr.cxx 
b/sw/source/uibase/docvw/PostItMgr.cxx
index 3c20f0b3a675..97098f197283 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -183,6 +183,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", 
SwModule::get()->GetRedlineAuthor(SwModule::get()->GetRedlineAuthor()));
+}
 
 boost::property_tree::ptree aTree;
 aTree.add_child("comment", aAnnotation);
commit 72bbb0dd4a368dab2b1bd99917cd07d23a92a3f0
Author: Pranam Lashkari 
AuthorDate: Mon Dec 30 02:20:22 2024 +0530
Commit: Pranam Lashkari 
CommitDate: Fri Jan 17 14:41:36 2025 +0100

sc: make data validy error dialog async (invalid value error)

Change-Id: Icd06b26e21b226b4dee5beb1a5ff6dcf301a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179509
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Caolán McNamara 
(cherry picked from commit 495be2dcb34d22af59a2028d3a686a0d48774166)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180286
Tested-by: Jenkins
Reviewed-by: Pranam Lashkari 

diff --git a/sc/inc/validat.hxx b/sc/inc/validat.hxx
index 4afd9e2ba8f2..863397f3ca57 100644
--- a/sc/inc/validat.hxx
+++ b/sc/inc/validat.hxx
@@ -159,7 +159,8 @@ public:
 OUString& rStrResult, double& nVal, sal_uInt32& nFormat, bool& bIsVal) 
const;
 
 // TRUE -> break
-bool DoError(weld::Window* pParent, const OUString& rInput, const 
ScAddress& rPos) const;
+void DoError(weld::Window* pParent, const OUString& rInput, const 
ScAddress& rPos,
+ std::function callback) const;
 void DoCalcError( ScFormulaCell* pCell ) const;
 
 bool IsEmpty() const;
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index a830da8cef34..744cee56adeb 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -245,10 +245,10 @@ bool ScValidationData::DoScript( const ScAddress& rPos, 
const OUString& rInput,
 // Macro not found (only with input)
 {
 //TODO: different error message, if found, but not bAllowed ??
-std::unique_ptr 
xBox(Application::CreateMessageDialog(pParent,
+std::shared_ptr 
xBox(Application::CreateMessageDialog(pParent,
   VclMessageType::Warning, 
VclButtonsType::Ok,
   
ScResId(STR_VALID_MACRONOTFOUND)));
-xBox->run();
+xBox->runAsync(xBox, [] (sal_uInt32){ });
 }
 
 return bScriptReturnedFalse;
@@ -351,10 +351,10 @@ bool ScValidationData::DoMacro( const ScAddress& rPos, 
const OUString& rInput,
 if ( !bDone && !pCell ) // Macro not found (only with input)
 {
 //TODO: different error message, if found, but not bAllowed ??
-std::unique_ptr 
xBox(Application::CreateMessageDialog(pParent,
+std::shared_ptr 
xBox(Application::CreateMessageDialog(pParent,
   VclMessageType::Warning, 
VclButtonsType::Ok,
   
ScResId(STR_VALID_MACRONOTFOUND)));
-xBox->run();
+xBox->runAsync(xBox, [](sal_uInt32) {});
 }
 
 return bRet;
@@ -373,14 +373,16 @@ IMPL_STATIC_LINK_NOARG(ScValidationData, 
InstallLOKNotifierHdl

core.git: sc/source

2025-01-17 Thread Rafael Lima (via logerrit)
 sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx |   48 
++
 sc/source/ui/inc/TableFillingAndNavigationTools.hxx   |2 
 sc/source/ui/miscdlgs/optsolver.cxx   |   21 +++-
 3 files changed, 69 insertions(+), 2 deletions(-)

New commits:
commit 37f1999e15f2b5339e628a2f161672443af561f6
Author: Rafael Lima 
AuthorDate: Wed Jan 15 22:08:20 2025 +0100
Commit: Rafael Lima 
CommitDate: Fri Jan 17 14:37:01 2025 +0100

tdf#157519 Make solver's Sensitivity Report prettier

Currently the sensitivity report has no formatting whatsoever. This patch 
formats the report using table headers and adds a line delimiter at the table's 
end.

The new formatting capabilities were added into AddressWalkerWriter so that 
it can also be used to improve other statistics reports (such as the features 
in Data - Statistics).

Change-Id: I80da3c673fec457e3d5de07c5f7a09904412d01f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180305
Tested-by: Jenkins
Reviewed-by: Heiko Tietze 

diff --git a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx 
b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
index be843112859a..d109fb537fbd 100644
--- a/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
+++ b/sc/source/ui/StatisticsDialogs/TableFillingAndNavigationTools.cxx
@@ -13,6 +13,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 #include 
 
@@ -21,6 +24,8 @@
 #include 
 #include 
 
+using namespace ::editeng;
+
 FormulaTemplate::FormulaTemplate(ScDocument* pDoc)
 : mpDoc(pDoc)
 , mbUse3D(true)
@@ -213,7 +218,9 @@ void AddressWalkerWriter::writeBoldString(const OUString& 
aString)
 rEngine.SetTextCurrentDefaults(aString);
 SfxItemSet aItemSet = rEngine.GetEmptyItemSet();
 SvxWeightItem aWeight(WEIGHT_BOLD, EE_CHAR_WEIGHT);
+SvxHorJustifyItem aJustify(SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY);
 aItemSet.Put(aWeight);
+aItemSet.Put(aJustify);
 rEngine.QuickSetAttribs(aItemSet, ESelection(0, 0, 0, aString.getLength()) 
);
 std::unique_ptr pEditText(rEngine.CreateTextObject());
 mpDocShell->GetDocFunc().SetEditCell(mCurrentAddress, *pEditText, true);
@@ -224,6 +231,47 @@ void AddressWalkerWriter::writeValue(double aValue)
 mpDocShell->GetDocFunc().SetValueCell(mCurrentAddress, aValue, true);
 }
 
+// Applies a column header format to the current cell and subsequent (nCols - 
1) columns
+// Header format = bold font, horizontally centered, text wrap and top/bottom 
borders
+void AddressWalkerWriter::formatAsColumnHeader(SCCOL nCols)
+{
+ScPatternAttr aPattern(mrDocument.getCellAttributeHelper());
+SvxHorJustifyItem aHJustify(SvxCellHorJustify::Center, ATTR_HOR_JUSTIFY);
+SvxVerJustifyItem aVJustify(SvxCellVerJustify::Center, ATTR_VER_JUSTIFY);
+SvxWeightItem aWeight(WEIGHT_BOLD, ATTR_FONT_WEIGHT);
+ScLineBreakCell aWrap(true);
+SvxBoxItem aBorderOuter(ATTR_BORDER);
+SvxBorderLine aLine;
+aLine.GuessLinesWidths(aLine.GetBorderLineStyle(), 
SvxBorderLineWidth::Thin);
+aBorderOuter.SetLine(&aLine, SvxBoxItemLine::TOP);
+aBorderOuter.SetLine(&aLine, SvxBoxItemLine::BOTTOM);
+
+aPattern.GetItemSet().Put(aHJustify);
+aPattern.GetItemSet().Put(aVJustify);
+aPattern.GetItemSet().Put(aWeight);
+aPattern.GetItemSet().Put(aWrap);
+aPattern.GetItemSet().Put(aBorderOuter);
+
+mrDocument.ApplyPatternAreaTab(mCurrentAddress.Col(), 
mCurrentAddress.Row(),
+   mCurrentAddress.Col() + nCols - 1, 
mCurrentAddress.Row(),
+   mCurrentAddress.Tab(), aPattern);
+}
+
+// Formats as the bottom end of a table with a bottom line
+// Starts in the current cell and formats nCols in total
+void AddressWalkerWriter::formatTableBottom(SCCOL nCols)
+{
+ScPatternAttr aPattern(mrDocument.getCellAttributeHelper());
+SvxBoxItem aBorderOuter(ATTR_BORDER);
+SvxBorderLine aLine;
+aLine.GuessLinesWidths(aLine.GetBorderLineStyle(), 
SvxBorderLineWidth::Thin);
+aBorderOuter.SetLine(&aLine, SvxBoxItemLine::BOTTOM);
+aPattern.GetItemSet().Put(aBorderOuter);
+mrDocument.ApplyPatternAreaTab(mCurrentAddress.Col(), 
mCurrentAddress.Row(),
+   mCurrentAddress.Col() + nCols - 1, 
mCurrentAddress.Row(),
+   mCurrentAddress.Tab(), aPattern);
+}
+
 // DataCellIterator
 
 DataCellIterator::DataCellIterator(const ScRange& aInputRange, bool aByColumn)
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx 
b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index ab791151180f..0e678e3f4482 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -86,6 +86,8 @@ public:
 void writeString(const char* aCharArray);
 void writeBoldString(const OUString& aString);
 v

Fwd: [libreoffice-l10n] Strings with placeholders

2025-01-17 Thread sophi

Hi all,

I'm forwarding the request from Mihail (which I support :). He posted on 
our l10n list, but I'd like to draw your attention on it.

Thanks a lot in advance for your consideration.

In case it's not possible to avoid using those placeholders, please add 
comments for translators, preferably in the source string description 
(where the KeyID is located), or otherwise in the source file at the 
location of the string.


Kind regards
Sophie

 Message transféré 
Sujet : [libreoffice-l10n] Strings with placeholders
Date : Fri, 17 Jan 2025 13:57:42 +0200
De : Mihail Balabanov 
Pour : LibreOffice-l10n 

Hello,

I apologize for not knowing whom to address this to, so I'm posting it here.

Recently, I've noticed an increase in new strings using placeholders like
%1 to construct sentences. This approach is quite unfriendly to
localization. For example, we have strings like:

Edit %1 [1]
Update %1
Delete %1
While this may seem like a clever way to save work, it actually poses
several issues for translators:

- It is often impossible to translate the containing phrase correctly
without knowing what exactly %x stands for. For example, the outer phrase
may need to agree in number, gender, or other grammatical attributes with
all possible fill-in phrases.

- In many languages, the fill-in phrases themselves must also be translated
in a certain way to fit in. In languages with cases, the %1 above should be
in the appropriate case. In languages that do not use English
capitalization, the fill-in phrases should begin with a lowercase letter,
etc.

Constructing phrases using placeholders should be avoided if possible. When
it is absolutely necessary, the container phrase should be provided
together with the possible fill-in phrases, or at least there should be a
comment directing the translator to their location. The fill-in phrases
should also be labeled as such and not used for anything else.

[1]
https://translations.documentfoundation.org/translate/libo_ui-25-2/swmessages/bg/?checksum=cd786056e4c248be

Cheers,
Mihail

--
To unsubscribe e-mail to: l10n+unsubscr...@global.libreoffice.org
Problems? 
https://www.libreoffice.org/get-help/mailing-lists/how-to-unsubscribe/

Posting guidelines + more: https://wiki.documentfoundation.org/Netiquette
List archive: https://listarchives.libreoffice.org/global/l10n/
Privacy Policy: https://www.documentfoundation.org/privacy


core.git: include/vcl vcl/CppunitTest_vcl_app_test.mk vcl/inc vcl/Library_vcl.mk vcl/qa vcl/source

2025-01-17 Thread Tomaž Vajngerl (via logerrit)
 include/vcl/UserResourceScanner.hxx  |   56 +++
 vcl/CppunitTest_vcl_app_test.mk  |5 
 vcl/Library_vcl.mk   |1 
 vcl/inc/IconThemeScanner.hxx |   25 +---
 vcl/qa/cppunit/app/test_IconThemeScanner.cxx |   34 ++
 vcl/source/app/IconThemeScanner.cxx  |  130 ++---
 vcl/source/app/UserResourceScanner.cxx   |  137 +++
 vcl/source/app/settings.cxx  |   11 +-
 8 files changed, 230 insertions(+), 169 deletions(-)

New commits:
commit c212fd9254ed53e478b815c7fc4606d5e6d9850b
Author: Tomaž Vajngerl 
AuthorDate: Thu Jan 16 15:02:28 2025 +0900
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 17 15:17:26 2025 +0100

vcl: extract scanning for resources to UserResourceScanner class

So the scanning for resources can be reused for other things.

Change-Id: Ia1589eb6c2ce4f254be0a62e296b1e186d0ba323
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180371
Reviewed-by: Tomaž Vajngerl 
Tested-by: Jenkins

diff --git a/include/vcl/UserResourceScanner.hxx 
b/include/vcl/UserResourceScanner.hxx
new file mode 100644
index ..7a591a5951b4
--- /dev/null
+++ b/include/vcl/UserResourceScanner.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace vcl
+{
+namespace file
+{
+VCL_DLLPUBLIC bool readFileStatus(osl::FileStatus& rStatus, const OUString& 
rFile);
+}
+
+class VCL_DLLPUBLIC UserResourceScanner
+{
+protected:
+/** Scans the provided directory for the resoruce.
+ *
+ * The returned strings will contain the URLs to the resources.
+ */
+std::vector readFilesFromPath(const OUString& dir);
+
+/** Return true if the filename is a valid resource */
+virtual bool isValidResource(const OUString& rFilename) = 0;
+
+/** Adds the provided resource by path. */
+virtual bool addResource(const OUString& /*path*/) = 0;
+
+public:
+UserResourceScanner();
+virtual ~UserResourceScanner() {}
+
+/** Provide a semicolon-separated list of paths to search for resource.
+ *
+ * There are several cases when scan will fail:
+ * - The directory does not exist
+ * - There are no files which have a valid resource
+ */
+
+void addPaths(std::u16string_view paths);
+};
+
+} // end namespace vcl
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/CppunitTest_vcl_app_test.mk b/vcl/CppunitTest_vcl_app_test.mk
index 3749a7f29ca5..6545babe40fb 100644
--- a/vcl/CppunitTest_vcl_app_test.mk
+++ b/vcl/CppunitTest_vcl_app_test.mk
@@ -34,10 +34,7 @@ $(eval $(call gb_CppunitTest_use_sdk_api,vcl_app_test))
 $(eval $(call gb_CppunitTest_use_ure,vcl_app_test))
 $(eval $(call gb_CppunitTest_use_vcl,vcl_app_test))
 
-$(eval $(call gb_CppunitTest_use_components,vcl_app_test,\
-configmgr/source/configmgr \
-i18npool/util/i18npool \
-))
+$(eval $(call gb_CppunitTest_use_rdb,vcl_app_test,services))
 
 $(eval $(call gb_CppunitTest_use_configuration,vcl_app_test))
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index c8e797dfd270..769329d30cba 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -478,6 +478,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
 vcl/source/app/timer \
 vcl/source/app/unohelp2 \
 vcl/source/app/htmltransferable \
+vcl/source/app/UserResourceScanner \
 vcl/source/app/unohelp \
 vcl/source/app/vclevent \
 vcl/source/app/watchdog \
diff --git a/vcl/inc/IconThemeScanner.hxx b/vcl/inc/IconThemeScanner.hxx
index 60841eeddaab..85a7d8543ba4 100644
--- a/vcl/inc/IconThemeScanner.hxx
+++ b/vcl/inc/IconThemeScanner.hxx
@@ -13,6 +13,7 @@
 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -24,16 +25,10 @@ namespace vcl
 {
 /** This class scans a folder for icon themes and provides the results.
  */
-class VCL_DLLPUBLIC IconThemeScanner
+class VCL_DLLPUBLIC IconThemeScanner : public UserResourceScanner
 {
 public:
-/** Provide a semicolon-separated list of paths to search for IconThemes.
- *
- * There are several cases when scan will fail:
- * - The directory does not exist
- * - There are no files which match the pattern images_xxx.zip
- */
-explicit IconThemeScanner(std::u16string_view paths);
+IconThemeScanner();
 
 /** This method will return the standard path where icon themes are 
located.
  */
@@ -53,19 +48,11 @@ public:
 bool IconThemeIsInstalled(const OUString& themeId) const;
 
 private:
-IconThemeScanner();
-
-/** Adds the provided icon theme by path.
- 

Re: Fwd: [libreoffice-l10n] Strings with placeholders

2025-01-17 Thread Caolán McNamara
On Fri, 2025-01-17 at 14:58 +0100, sophi wrote:
> 
> In case it's not possible to avoid using those placeholders, please
> add comments for translators, preferably in the source string
> description (where the KeyID is located), or otherwise in the source
> file at the location of the string.

FWIW, here's a sample .hrc comment intended for translators:

https://opengrok.libreoffice.org/xref/core/cui/inc/strings.hrc?r=c007449ec38f49e18ed7d6b8f9ef74c5bd5c015a#320

Which gettext is supposed to extract and make available in the output
.po files that translating works from.

While in the .ui files, in glade there is a "Comments for translators"
option when editing a translatable string which will add the
appropriate "comments" attribute into the .ui

If translators have had to painfully figure out something about a
translation it might be worth considering submitting patches to put
that info back into the source .hrc/.ui as comments.


core.git: config_host.mk.in

2025-01-17 Thread Xisco Fauli (via logerrit)
 config_host.mk.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be1d81eeeaef67ce01ea2e307207a5657b1ceecd
Author: Xisco Fauli 
AuthorDate: Fri Jan 17 12:08:11 2025 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 17 15:54:11 2025 +0100

prevent assignment if ENABLE_MSVC_ANALYZE exists

so export ENABLE_MSVC_ANALYZE=1 can be used
in https://ci.libreoffice.org/job/lo_tb_master_win_analyze/

if a macro/variable is only used by make, then there's no need to use 
export in config_host.mk

Change-Id: I31ebef21c92dfaa279bd3bf7e5e5ecef1e960ac2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180384
Tested-by: Jenkins
Reviewed-by: Xisco Fauli 

diff --git a/config_host.mk.in b/config_host.mk.in
index 8baece8fb531..5cd8b0dbcede 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -153,7 +153,7 @@ export EMSCRIPTEN_WORKERJS=@EMSCRIPTEN_WORKERJS@
 export ENABLE_ANDROID_LOK=@ENABLE_ANDROID_LOK@
 export ENABLE_ANDROID_EDITING=@ENABLE_ANDROID_EDITING@
 export ENABLE_AVAHI=@ENABLE_AVAHI@
-export ENABLE_MSVC_ANALYZE=@ENABLE_MSVC_ANALYZE@
+ENABLE_MSVC_ANALYZE?=@ENABLE_MSVC_ANALYZE@
 export ENABLE_BREAKPAD=@ENABLE_BREAKPAD@
 export DEFAULT_CRASHDUMP_VALUE=@DEFAULT_CRASHDUMP_VALUE@
 export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@


core.git: wizards/source

2025-01-17 Thread Jean-Pierre Ledure (via logerrit)
 wizards/source/scriptforge/po/es.po |  123 +---
 wizards/source/scriptforge/po/fr.po |6 -
 wizards/source/scriptforge/po/pt.po |8 --
 3 files changed, 59 insertions(+), 78 deletions(-)

New commits:
commit a5ab9e78329cd8174274193c42039b49a049de8b
Author: Jean-Pierre Ledure 
AuthorDate: Fri Jan 17 14:53:34 2025 +0100
Commit: Jean-Pierre Ledure 
CommitDate: Fri Jan 17 16:46:57 2025 +0100

ScriptForge es.po Typos and enhancements

In addition the VALIDATEREGEX message
is obsolete and removed from next
language files

modified:   wizards/source/scriptforge/po/es.po
modified:   wizards/source/scriptforge/po/fr.po
modified:   wizards/source/scriptforge/po/pt.po

Change-Id: I67c2e5604e548870bf1bdceb9641d4802530e437
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180413
Reviewed-by: Jean-Pierre Ledure 
Tested-by: Jenkins

diff --git a/wizards/source/scriptforge/po/es.po 
b/wizards/source/scriptforge/po/es.po
index 201ac61589fa..1b3291215465 100644
--- a/wizards/source/scriptforge/po/es.po
+++ b/wizards/source/scriptforge/po/es.po
@@ -16,7 +16,7 @@ msgstr ""
 "Report-Msgid-Bugs-To: https://bugs.libreoffice.org/enter_bug.cgi?";
 "product=LibreOffice&bug_status=UNCONFIRMED&component=UI
"
 "POT-Creation-Date: 2025-01-11 13:09:17
"
-"PO-Revision-Date: 2025-01-14 12:43+0100
"
+"PO-Revision-Date: 2025-01-16 17:46+0100
"
 "Last-Translator: B. Antonio Fernández
"
 "Language-Team: es_ES
"
 "Language: es
"
@@ -94,7 +94,6 @@ msgid ""
 "« ByStep » = %3"
 msgstr ""
 "Los valores respectivos de 'From',UpTo' y 'ByStep' son incoherentes.
"
-"Les valeurs respectives de 'From', 'UpTo' et 'ByStep' sont incohérentes.
"
 "
"
 "« From » = %1
"
 "« UpTo » = %2
"
@@ -118,7 +117,7 @@ msgid ""
 "%3 = '%4'"
 msgstr ""
 "Ha fallado la apertura del documento de Base.
"
-"Algunos argumento pueden ser erróneos.
"
+"Algunos argumentos pueden ser erróneos.
"
 "
"
 "El archivo no existe o no está registrado con el nombre indicado.
"
 "
"
@@ -139,8 +138,8 @@ msgid ""
 "
"
 "The index = %1."
 msgstr ""
-"No se encuentra el formulario dentro de los formularios del documento '%2'."
-"El índice indicado está fuera de límites.
"
+"El formulario indicado no se encuentra entre los formularios del documento "
+"'%2'. El índice indicado está fuera de límites.
"
 "
"
 "El documento de Base es '%3'.
"
 "
"
@@ -197,13 +196,13 @@ msgid ""
 "The name of the sheet = '%2'
"
 "The index = %1."
 msgstr ""
-"El formulario no se encuentra en la hoja de Calc. El índice indicado está "
-"fuera de límites.
"
+"El formulario indicado no se encuentra en la hoja de Calc. El índice "
+"indicado está fuera de límites.
"
 "
"
-"El documento de Calc es '%3'.
"
+"Documento de Calc = '%3'.
"
 "
"
-"El nombre de la hoja = '%2'
"
-"El índice = %1."
+"Nombre de la hoja = '%2'
"
+"Índice = %1."
 
 #. SF_Session.ExecuteCalcFunction error message
 #. 'Calc' should not be translated
@@ -213,7 +212,7 @@ msgid ""
 "The Calc '%1' function encountered an error. Either the given function does "
 "not exist or its arguments are invalid."
 msgstr ""
-"La función de Calc '%1' a encontrado un error. La función no existe o los "
+"La función de Calc '%1' ha devuelto un error. La función no existe o los "
 "argumentos indicados no son válidos."
 
 #. SF_Chart.ExportToFile error message
@@ -233,7 +232,7 @@ msgid ""
 "%3 = %4"
 msgstr ""
 "No se ha podido exportar el gráfico.
"
-"El archivo de destino no se debe sobrescribir o tiene establecido el "
+"El archivo de destino no se puede sobrescribir o tiene establecido el "
 "atributo de solo lectura.
"
 "
"
 "%1 = '%2'
"
@@ -270,9 +269,9 @@ msgid ""
 msgstr ""
 "El archivo indicado no se reconoce como un archivo CSV válido.
"
 "
"
-"« File name »   = %1
"
-"Line number = %2
"
-"Content = %3"
+"« Nombre de archivo »   = %1
"
+"Línea = %2
"
+"Contenido = %3"
 
 #. SF_Base GetDatabase
 #. %1: An identifier
@@ -290,12 +289,12 @@ msgid ""
 "« %3 » = '%4'
"
 "« Document » = %5"
 msgstr ""
-"No se puede acceder a la base de datos asociada al documento Base.
"
-"Verifique los parámetros de conexión y contraseña .
"
+"No se puede acceder a la base de datos asociada al documento de Base.
"
+"Verifique los parámetros de conexión/ inicio de sesión .
"
 "
"
 "« %1 » = '%2'
"
 "« %3 » = '%4'
"
-"« Document » = %5"
+"« Documento » = %5"
 
 #. SF_Database when running update SQL statement
 #. %1: The concerned method
@@ -318,9 +317,10 @@ msgid ""
 "
"
 "The concerned dialog is '%1'."
 msgstr ""
-"No se pudo ejecutar el comando porque el diálogo se cerró inadvertidamente.
"
+"No se pudo ejecutar el comando porque el diálogo se ha cerrado "
+"inadvertidamente.
"
 "
"
-"El diálogo es '%1'."
+"Diálogo =  '%1'."
 
 #. SF_Dialog creation
 #. %1: An identifier
@@ -341,7 +341,8 @@ msgid ""
 "« %5 » = %6
"
 "« %7 » = %8"
 msgstr ""
-"No se ha podido encontrar el diálogo en la bibliotec

core.git: desktop/source

2025-01-17 Thread Gökay Şatır (via logerrit)
 desktop/source/lib/init.cxx |  120 ++--
 1 file changed, 73 insertions(+), 47 deletions(-)

New commits:
commit 7495a506642787e220917ce594346d3f6109791d
Author: Gökay Şatır 
AuthorDate: Tue Nov 12 11:45:50 2024 +0300
Commit: Miklos Vajna 
CommitDate: Fri Jan 17 16:56:31 2025 +0100

Refactor doc_paintPartTile a bit.

Move repeated lines into inline functions.
Move large code blocks into inline functions.
Separate the data validation and process parts.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index d48ded705473..ea9e089d4f73 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -4464,6 +4464,64 @@ static void doc_paintTile(LibreOfficeKitDocument* pThis,
 #endif
 }
 
+inline static ITiledRenderable* getDocumentPointer(LibreOfficeKitDocument* 
pThis)
+{
+ITiledRenderable* pDoc = getTiledRenderable(pThis);
+
+if (!pDoc)
+{
+SetLastExceptionMsg(u"Document doesn't support tiled rendering"_ustr);
+return nullptr;
+}
+return pDoc;
+}
+
+inline static void writeInfoLog(const int nPart, const int nMode,
+const int nTileWidth, const int nTileHeight, const int nTilePosX, const 
int nTilePosY,
+const int nCanvasWidth, const int nCanvasHeight)
+{
+SAL_INFO( "lok.tiledrendering", "paintPartTile: painting @ " << nPart << " 
: " << nMode << " ["
+   << nTileWidth << "x" << nTileHeight << "]@("
+   << nTilePosX << ", " << nTilePosY << ") to ["
+   << nCanvasWidth << "x" << nCanvasHeight << "]px" );
+}
+
+inline static int getFirstViewIdAsFallback(LibreOfficeKitDocument* pThis)
+{
+// tile painting always needs a SfxViewShell::Current(), but actually
+// it does not really matter which one - all of them should paint the
+// same thing. It's important to get a view for the correct document,
+// though.
+// doc_getViewsCount() returns the count of views for the document in the 
current view.
+int viewCount = doc_getViewsCount(pThis);
+
+if (viewCount == 0) return -1;
+
+std::vector viewIds(viewCount);
+doc_getViewIds(pThis, viewIds.data(), viewCount);
+
+int result = viewIds[0];
+doc_setView(pThis, result);
+
+SAL_WARN("lok.tiledrendering", "Why is this happening? A call to paint 
without setting a view?");
+
+return result;
+}
+
+inline static void disableViewCallbacks(LibLODocument_Impl* pDocument, const 
int viewId)
+{
+const auto handlerIt = pDocument->mpCallbackFlushHandlers.find(viewId);
+if (handlerIt != pDocument->mpCallbackFlushHandlers.end())
+handlerIt->second->disableCallbacks();
+}
+
+inline static void enableViewCallbacks(LibLODocument_Impl* pDocument, const 
int viewId)
+{
+const auto handlerIt = pDocument->mpCallbackFlushHandlers.find(viewId);
+if (handlerIt != pDocument->mpCallbackFlushHandlers.end())
+handlerIt->second->enableCallbacks();
+}
+
 static void doc_paintPartTile(LibreOfficeKitDocument* pThis,
   unsigned char* pBuffer,
   const int nPart,
@@ -4477,46 +4535,26 @@ static void doc_paintPartTile(LibreOfficeKitDocument* 
pThis,
 SolarMutexGuard aGuard;
 SetLastExceptionMsg();
 
-SAL_INFO( "lok.tiledrendering", "paintPartTile: painting @ " << nPart << " 
: " << nMode << " ["
-   << nTileWidth << "x" << nTileHeight << "]@("
-   << nTilePosX << ", " << nTilePosY << ") to ["
-   << nCanvasWidth << "x" << nCanvasHeight << "]px" );
+writeInfoLog(nPart, nMode, nTileWidth, nTileHeight, nTilePosX, nTilePosY, 
nCanvasWidth, nCanvasHeight);
 
-LibLODocument_Impl* pDocument = static_cast(pThis);
-int nOrigViewId = doc_getView(pThis);
-
-ITiledRenderable* pDoc = getTiledRenderable(pThis);
+ITiledRenderable* pDoc = getDocumentPointer(pThis);
 if (!pDoc)
-{
-SetLastExceptionMsg(u"Document doesn't support tiled rendering"_ustr);
 return;
-}
+
+LibLODocument_Impl* pDocument = static_cast(pThis);
+
+int nOrigViewId = doc_getView(pThis);
 
 if (nOrigViewId < 0)
-{
-// tile painting always needs a SfxViewShell::Current(), but actually
-// it does not really matter which one - all of them should paint the
-// same thing. It's important to get a view for the correct document,
-// though.
-// doc_getViewsCount() returns the count of views for the document in 
the current view.
-int viewCount = doc_getViewsCount(pThis);
-if (viewCount == 0)
-return;
+nOrigViewId = getFirstViewIdAsFallback(pThis);
 
-std::vector viewIds(viewCount);
-doc_getViewIds(pThis, viewIds.data(), viewCount);
+if (nOrigViewId == -1)

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

2025-01-17 Thread Mike Kaganski (via logerrit)
 vcl/source/window/dialog.cxx |4 
 1 file changed, 4 insertions(+)

New commits:
commit 3c31a10b8ad12fcfb09c6df930b185ad8a0fae6b
Author: Mike Kaganski 
AuthorDate: Thu Jan 16 13:04:25 2025 +0500
Commit: Miklos Vajna 
CommitDate: Fri Jan 17 09:05:19 2025 +0100

Add an assert to allow debugging not yet async dialogs

Commit f8528cdda9292c7ae6c9d49b80c1a3a3b4a67094 (LOK: don't crash when
trying to show a dialog during file load, 2024-12-26) fixed a crash
when a not async / not properly set up dialog was attempted in Online.
This is reasonable in release builds, but the added assert helps to
find the problem in development (debug) builds.

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

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 0a664b96d706..b8d9cc2183df 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -941,6 +941,10 @@ bool Dialog::ImplStartExecute()
 
 // Also pNotifier may be nullptr when a dialog (e.g., "update
 // links?") is to be shown when loading a document.
+// Never crash in release builds (assume "cancel"), but allow
+// to see the not yet async / not properly set up dialogs in
+// debug builds.
+assert(!"A dialog without a notifier: make me async / properly 
set up");
 return false;
 }
 }


core.git: sw/inc sw/source

2025-01-17 Thread bruh (via logerrit)
 sw/inc/viewopt.hxx  |4 
 sw/source/core/view/vnew.cxx|1 -
 sw/source/uibase/config/viewopt.cxx |   11 +--
 3 files changed, 1 insertion(+), 15 deletions(-)

New commits:
commit 589cd1b840ccdfb00c74d8ae776d853832bcdf4e
Author: bruh 
AuthorDate: Thu Jan 16 21:02:46 2025 +0530
Commit: Ilmari Lauhakangas 
CommitDate: Fri Jan 17 09:05:31 2025 +0100

tdf#153251 remove s_nPixelTwips

Change-Id: I43d39925931071b78e08adf47bf3c6c590b1a2ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180360
Reviewed-by: Michael Meeks 
Tested-by: Jenkins

diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index eff41b5be26d..bc273d58c4f2 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -262,8 +262,6 @@ class SwViewOption
 static SwViewColors s_aInitialColorConfig;
 OUString m_sThemeName;
 
-static sal_uInt16   s_nPixelTwips;// 1 Pixel == ? Twips
-
 OUString  m_sSymbolFont;// Symbolfont.
 ViewOptFlags1 m_nCoreOptions;   // Bits for SwViewShell.
 ViewOptCoreFlags2 m_nCore2Options;  // Bits for SwViewShell.
@@ -317,8 +315,6 @@ public:
 SW_DLLPUBLIC SwViewOption(const SwViewOption&);
 SW_DLLPUBLIC ~SwViewOption();
 
-static void Init(const OutputDevice* pWin);// Initializing of 
static data.
-
 inline void SetUIOptions( const SwViewOption& );
 
 void SetColorConfig(const SwViewColors& rColorConfig)
diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx
index 613a15df633b..2a40c099a393 100644
--- a/sw/source/core/view/vnew.cxx
+++ b/sw/source/core/view/vnew.cxx
@@ -104,7 +104,6 @@ void SwViewShell::Init( const SwViewOption *pNewOpt )
 SAL_INFO( "sw.core", "View::Init - after InitPrt" );
 if( GetWin() )
 {
-SwViewOption::Init( GetWin()->GetOutDev() );
 GetWin()->GetOutDev()->SetFillColor();
 GetWin()->SetBackground();
 GetWin()->GetOutDev()->SetLineColor();
diff --git a/sw/source/uibase/config/viewopt.cxx 
b/sw/source/uibase/config/viewopt.cxx
index 082f8f4331dd..162d6a103d66 100644
--- a/sw/source/uibase/config/viewopt.cxx
+++ b/sw/source/uibase/config/viewopt.cxx
@@ -41,7 +41,6 @@
 #include 
 #include 
 
-sal_uInt16 SwViewOption::s_nPixelTwips = 0;   // one pixel on the screen
 SwViewColors SwViewOption::s_aInitialColorConfig {};
 
 SwViewColors::SwViewColors() :
@@ -212,7 +211,7 @@ void SwViewOption::PaintPostIts( OutputDevice *pOut, const 
SwRect &rRect, bool b
 Color aOldLineColor( pOut->GetLineColor() );
 pOut->SetLineColor( COL_GRAY );
 // to make it look nice, we subtract two pixels everywhere
-SwTwips nPix = s_nPixelTwips * 2;
+SwTwips nPix = o3tl::narrowing(pOut->PixelToLogic( Size(1,1) 
).Height()) * 2;
 if( rRect.Width() <= 2 * nPix || rRect.Height() <= 2 * nPix )
 nPix = 0;
 const Point aTopLeft(  rRect.Left()  + nPix, rRect.Top()+ nPix );
@@ -387,14 +386,6 @@ SwViewOption::~SwViewOption()
 {
 }
 
-void SwViewOption::Init(const OutputDevice* pWin)
-{
-if( !s_nPixelTwips && pWin )
-{
-s_nPixelTwips = o3tl::narrowing(pWin->PixelToLogic( 
Size(1,1) ).Height());
-}
-}
-
 bool SwViewOption::IsAutoCompleteWords()
 {
 const SvxSwAutoFormatFlags& rFlags = 
SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags();


core.git: vcl/win

2025-01-17 Thread Sahil Gautam (via logerrit)
 vcl/win/gdi/salnativewidgets-luna.cxx |   19 +++
 1 file changed, 11 insertions(+), 8 deletions(-)

New commits:
commit b9464eadfc39c93f7c8beb04dc0d2b94b3a2e841
Author: Sahil Gautam 
AuthorDate: Fri Dec 27 02:41:49 2024 +0530
Commit: Sahil Gautam 
CommitDate: Fri Jan 17 09:07:34 2025 +0100

Set StyleSettings::DisableColor value in Win

WinSalFrame::UpdateSettings function loads colors from the widget
toolkit into the StyleSettings objects. Themes uses these colors as
default values.

I tried using `OpenThemeData(mhWnd, L"Button")` to get the fill color
value for background color, but didn't get the appropriate color.
For the time being, modifying the ButtonRect luminance for the disabled
state. Would replace it with something more appropriate as the Win32
welding work progresses.

Change-Id: Ied04a8c6c6cb01b1388ef1d744077ae6dfd27b1b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179439
Reviewed-by: Sahil Gautam 
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Tested-by: Heiko Tietze 

diff --git a/vcl/win/gdi/salnativewidgets-luna.cxx 
b/vcl/win/gdi/salnativewidgets-luna.cxx
index 18946824ed99..993a0113dcff 100644
--- a/vcl/win/gdi/salnativewidgets-luna.cxx
+++ b/vcl/win/gdi/salnativewidgets-luna.cxx
@@ -543,25 +543,28 @@ static bool drawThemedControl(HDC hDC, ControlType nType, 
int iPart, int iState,
 if (iPart == BP_PUSHBUTTON)
 {
 Color aButtonColor = 
ThemeColors::GetThemeColors().GetButtonColor();
-const Color& rButtonRectColor = 
ThemeColors::GetThemeColors().GetDisabledColor();
+Color aButtonRectColor = 
ThemeColors::GetThemeColors().GetDisabledColor();
 
 if (iState == PBS_PRESSED)
-aButtonColor.Merge(rButtonRectColor, 230);
+aButtonColor.Merge(aButtonRectColor, 230);
 else if (iState == PBS_DISABLED)
-aButtonColor = 
ThemeColors::GetThemeColors().GetDisabledColor();
+if (UseDarkMode())
+aButtonRectColor.DecreaseLuminance(150);
+else
+aButtonRectColor.IncreaseLuminance(150);
 else if (iState == PBS_HOT)
-aButtonColor.Merge(rButtonRectColor, 170);
+aButtonColor.Merge(aButtonRectColor, 170);
 else if (iState == PBS_DEFAULTED)
-aButtonColor.Merge(rButtonRectColor, 150);
+aButtonColor.Merge(aButtonRectColor, 150);
 
 ScopedHBRUSH hbrush(CreateSolidBrush(RGB(aButtonColor.GetRed(),
  aButtonColor.GetGreen(),
  aButtonColor.GetBlue(;
 FillRect(hDC, &rc, hbrush.get());
 
-hbrush = 
ScopedHBRUSH(CreateSolidBrush(RGB(rButtonRectColor.GetRed(),
-   
rButtonRectColor.GetGreen(),
-   
rButtonRectColor.GetBlue(;
+hbrush = 
ScopedHBRUSH(CreateSolidBrush(RGB(aButtonRectColor.GetRed(),
+   
aButtonRectColor.GetGreen(),
+   
aButtonRectColor.GetBlue(;
 FrameRect(hDC, &rc, hbrush.get());
 return true;
 }


core.git: helpcontent2

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

New commits:
commit aa94e5cdd98fd395ec7dd9c951aefa298f730b5c
Author: Olivier Hallot 
AuthorDate: Fri Jan 17 14:23:55 2025 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Jan 17 18:23:55 2025 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 186169d9bd0f713a780e5aae2d8ac71916fb3a60
  - Fix "Contents" heading color

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

diff --git a/helpcontent2 b/helpcontent2
index c0b77292ca59..186169d9bd0f 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit c0b77292ca59b964feb3d039e9cb9e3adb927c96
+Subproject commit 186169d9bd0f713a780e5aae2d8ac71916fb3a60


help.git: help3xsl/default.css

2025-01-17 Thread Olivier Hallot (via logerrit)
 help3xsl/default.css |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 186169d9bd0f713a780e5aae2d8ac71916fb3a60
Author: Olivier Hallot 
AuthorDate: Fri Jan 17 13:34:08 2025 -0300
Commit: Olivier Hallot 
CommitDate: Fri Jan 17 18:23:55 2025 +0100

Fix "Contents" heading color

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

diff --git a/help3xsl/default.css b/help3xsl/default.css
index ae05c472d5..04a9305c11 100644
--- a/help3xsl/default.css
+++ b/help3xsl/default.css
@@ -1046,6 +1046,7 @@ li.disabled a {
 label[for=accordion-1] {
 background-color: transparent;
 text-decoration: none;
+color:var(--heading-color);
 }
 label[for=accordion-1]:hover {
 background-color: transparent;


core.git: external/skia

2025-01-17 Thread Jonathan Clark (via logerrit)
 external/skia/share-grcontext.patch.1 |   31 +++
 1 file changed, 31 insertions(+)

New commits:
commit 145d82b5f0cab44a8c34071ddc4458dd3756f6e5
Author: Jonathan Clark 
AuthorDate: Fri Jan 17 09:44:19 2025 -0700
Commit: Jonathan Clark 
CommitDate: Fri Jan 17 18:57:41 2025 +0100

tdf#164394 Fix Vulkan vkCreateXcbSurfaceKHR validation error

Updates the Skia shared context patch to avoid surface/swapchain
construction on invalid X11 windows.

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

diff --git a/external/skia/share-grcontext.patch.1 
b/external/skia/share-grcontext.patch.1
index ce225bcbb6c7..71d7c247d334 100644
--- a/external/skia/share-grcontext.patch.1
+++ b/external/skia/share-grcontext.patch.1
@@ -199,6 +199,37 @@ diff -ur skia.org/tools/window/MetalWindowContext.mm 
skia/tools/window/MetalWind
 +}
 +
  }   //namespace skwindow::internal
+diff -ur skia.org/tools/window/unix/GaneshVulkanWindowContext_unix.cpp.orig 
skia/tools/window/unix/GaneshVulkanWindowContext_unix.cpp
+--- skia.org/tools/window/unix/GaneshVulkanWindowContext_unix.cpp.orig 
2025-01-17 09:32:18.346355282 -0700
 skia/tools/window/unix/GaneshVulkanWindowContext_unix.cpp  2025-01-17 
09:34:12.368151987 -0700
+@@ -23,7 +23,7 @@
+ return nullptr;
+ }
+
+-auto createVkSurface = [&info, instProc](VkInstance instance) -> 
VkSurfaceKHR {
++internal::VulkanWindowContext::CreateVkSurfaceFn createVkSurface = 
[&info, instProc](VkInstance instance) -> VkSurfaceKHR {
+ static PFN_vkCreateXcbSurfaceKHR createXcbSurfaceKHR = nullptr;
+ if (!createXcbSurfaceKHR) {
+ createXcbSurfaceKHR =
+@@ -47,6 +47,9 @@
+
+ return surface;
+ };
++// Allow creating just the shared context, without an associated window.
++if(info.fWindow == 0)
++createVkSurface = nullptr;
+
+ auto canPresent = [&info, instProc](VkInstance instance,
+ VkPhysicalDevice physDev,
+@@ -68,7 +71,7 @@
+ };
+ std::unique_ptr ctx(new internal::VulkanWindowContext(
+ displayParams, createVkSurface, canPresent, instProc));
+-if (!ctx->isValid()) {
++if (!ctx->isValid() && createVkSurface != nullptr) {
+ return nullptr;
+ }
+ return ctx;
 diff -ur skia.org/tools/window/VulkanWindowContext.cpp 
skia/tools/window/VulkanWindowContext.cpp
 --- skia.org/tools/window/VulkanWindowContext.cpp  2024-10-10 
14:11:32.362258108 +0200
 +++ skia/tools/window/VulkanWindowContext.cpp  2024-10-10 14:15:27.179546520 
+0200


core.git: Branch 'distro/collabora/co-24.04' - sc/qa

2025-01-17 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula2.cxx |   48 ++
 1 file changed, 48 insertions(+)

New commits:
commit 16ef0dc2056ebd4b0f3f2ffb5fe82640f9141d65
Author: Balazs Varga 
AuthorDate: Fri May 3 23:17:45 2024 +0200
Commit: Andras Timar 
CommitDate: Fri Jan 17 10:42:29 2025 +0100

Related: tdf#127293 Add unit test for xlookup regex search mode

Add unit test for regex search mode in case of xlookup.

Follow-up commit: 51abf44808c6793a184e986b62c0786753e11ded
(Related: tdf#127293 Fix regex search mode in XLOOKUP wildcards mode)

Change-Id: Id23c340ab6735c2c40defc8d231dc3da18c8694e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167192
Tested-by: Jenkins
Reviewed-by: Balazs Varga 
(cherry picked from commit 0ca20dca3349daa303b89251443f550491968a39)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180375
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sc/qa/unit/ucalc_formula2.cxx b/sc/qa/unit/ucalc_formula2.cxx
index e6606f126d8e..725c3319f741 100644
--- a/sc/qa/unit/ucalc_formula2.cxx
+++ b/sc/qa/unit/ucalc_formula2.cxx
@@ -4641,6 +4641,54 @@ CPPUNIT_TEST_FIXTURE(TestFormula2, 
testFormulaAfterDeleteRows)
 ASSERT_DOUBLES_EQUAL_MESSAGE("Wrong value at A4", 3.0, 
m_pDoc->GetValue(aPos));
 }
 
+CPPUNIT_TEST_FIXTURE(TestFormula2, testRegexForXLOOKUP)
+{
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true);
+
+// Temporarily switch regex search mode.
+bool bOldWildCard = false;
+ScDocOptions aDocOpt = m_pDoc->GetDocOptions();
+if (!aDocOpt.IsFormulaRegexEnabled())
+{
+aDocOpt.SetFormulaRegexEnabled(true);
+m_pDoc->SetDocOptions(aDocOpt);
+bOldWildCard = true;
+}
+
+m_pDoc->InsertTab(0, "Test1");
+
+std::vector> aData = { { "Element", "Relative 
Atomic Mass" },
+{ "Hydrogen", "1.008" },
+{ "Helium", "4.003" },
+{ "Lithium", "6.94" },
+{ "Beryllium", "9.012" },
+{ "Boron", "10.81" },
+{ "Carbon", "12.011" },
+{ "Nitrogen", "14.007" },
+{ "Oxygen", "15.999" },
+{ "Florine", "18.998" },
+{ "Neon", "20.18" } };
+
+insertRangeData(m_pDoc, ScAddress(0, 0, 0), aData); // A1:B11
+m_pDoc->SetString(4, 14, 0, "^bo.*"); // E15 - search regex string
+
+m_pDoc->SetFormula(ScAddress(5, 14, 0), 
"=XLOOKUP(E15;A$2:A$11;B$2:B$11;;2)",
+   formula::FormulaGrammar::GRAM_NATIVE_UI); // F15
+
+// Without the fix in place, this test would have failed with
+// - Expected: 10.81
+// - Actual  : 0
+CPPUNIT_ASSERT_EQUAL(10.81, m_pDoc->GetValue(5, 14, 0));
+
+// Switch back to wildcard mode if necessary.
+if (bOldWildCard)
+{
+aDocOpt.SetFormulaWildcardsEnabled(true);
+m_pDoc->SetDocOptions(aDocOpt);
+}
+m_pDoc->DeleteTab(0);
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


Tea Time Training, week 3

2025-01-17 Thread Miklos Vajna
Hi,

We run a Tea Time Training (TTT) on Fridays. The topics are typically
focused around LibreOffice Technology and Collabora Online.

These are developer-centric calls & opportunity to ask questions to the
experts right there.

The session today is at 13:00 CET.

Topic: The Curse of The Modal Dialog by Stephan Bergmann

Duration: 15-45 minutes

Join via this link: https://meet.jit.si/Fri-TTT-CPTEAM

More info about TTTs in general: 
https://collaboraonline.github.io/post/communicate/#tea-time-trainings

Regards,

Miklos


core.git: desktop/qa editeng/source include/editeng sw/source

2025-01-17 Thread Caolán McNamara (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx |   11 ++-
 editeng/source/editeng/editobj.cxx  |   21 +
 editeng/source/editeng/editobj2.hxx |1 +
 include/editeng/editobj.hxx |3 +++
 sw/source/uibase/wrtsh/wrtsh1.cxx   |5 +
 5 files changed, 40 insertions(+), 1 deletion(-)

New commits:
commit c73958bf812d4c1f0b08354bcd86cec5802c6d4e
Author: Caolán McNamara 
AuthorDate: Wed Jan 1 21:55:00 2025 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 17 11:38:05 2025 +0100

undo/redo of comment insertion assumes Par2 content matches TextObject

contents (as much as conversion to plain text makes possible)

To make things easier, add an EditTextObject::GetText() like
EditEngine::GetText() that serializes multiple paragraphs in an
equivalent way so there isn't a need to create an editengine just
to do this conversion.

Modify and extend DesktopLOKTest::testCommentsCallbacksWriter to
use a html payload and add a undo/redo to it.

Change-Id: I4d895138e919bab54ebbbcb966f9b9faef574086
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179594
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180377
Reviewed-by: Caolán McNamara 
Tested-by: Jenkins

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index 66b29c4cd1aa..a91270f94bad 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -2595,7 +2595,7 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 CPPUNIT_ASSERT_EQUAL(nCommentId2, 
aView2.m_aCommentCallbackResult.get("id"));
 
 // Reply to nCommentId1 again
-aCommandArgs = "{ \"Id\": { \"type\": \"string\", \"value\": \"" + 
OString::number(nCommentId1) + "\" }, \"Text\": { \"type\": \"string\", 
\"value\": \"Reply comment again\" } }";
+aCommandArgs = "{ \"Id\": { \"type\": \"string\", \"value\": \"" + 
OString::number(nCommentId1) + "\" }, \"Html\": { \"type\": \"string\", 
\"value\": \"Reply comment again\" } }";
 pDocument->pClass->postUnoCommand(pDocument, ".uno:ReplyComment", 
aCommandArgs.getStr(), false);
 Scheduler::ProcessEventsToIdle();
 
@@ -2607,6 +2607,15 @@ void DesktopLOKTest::testCommentsCallbacksWriter()
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), 
aView1.m_aCommentCallbackResult.get("html"));
 CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), 
aView2.m_aCommentCallbackResult.get("html"));
 
+// Ensure that an undo and redo restores the html contents
+aView1.m_aCommentCallbackResult.clear();
+aView2.m_aCommentCallbackResult.clear();
+pDocument->pClass->postUnoCommand(pDocument, ".uno:Undo", "", false);
+pDocument->pClass->postUnoCommand(pDocument, ".uno:Redo", "", false);
+Scheduler::ProcessEventsToIdle();
+CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), 
aView1.m_aCommentCallbackResult.get("html"));
+CPPUNIT_ASSERT_EQUAL(std::string("Reply comment again"), 
aView2.m_aCommentCallbackResult.get("html"));
+
 // .uno:ViewAnnotations returns total of 5 comments
 boost::property_tree::ptree aTree;
 char* pJSON = pDocument->m_pDocumentClass->getCommandValues(pDocument, 
".uno:ViewAnnotations");
diff --git a/editeng/source/editeng/editobj.cxx 
b/editeng/source/editeng/editobj.cxx
index 6f7182f383af..536d7c2c6acb 100644
--- a/editeng/source/editeng/editobj.cxx
+++ b/editeng/source/editeng/editobj.cxx
@@ -30,6 +30,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -398,6 +399,26 @@ OUString EditTextObjectImpl::GetText(sal_Int32 nPara) const
 return maContents[nPara]->GetText();
 }
 
+OUString EditTextObjectImpl::GetText(LineEnd eEnd) const
+{
+const size_t nParas = maContents.size();
+if (nParas == 0)
+return OUString();
+
+const OUString aSep = EditDoc::GetSepStr(eEnd);
+
+OUStringBuffer aBuffer;
+
+for (size_t nPara = 0; nPara < nParas; ++nPara)
+{
+if (!aSep.isEmpty() && nPara > 0)
+aBuffer.append(aSep);
+aBuffer.append(maContents[nPara]->GetText());
+}
+
+return aBuffer.makeStringAndClear();
+}
+
 sal_Int32 EditTextObjectImpl::GetTextLen(sal_Int32 nPara ) const
 {
 if (nPara < 0 || o3tl::make_unsigned(nPara) >= maContents.size())
diff --git a/editeng/source/editeng/editobj2.hxx 
b/editeng/source/editeng/editobj2.hxx
index f1bfa4e773ac..9cfe1c09f5e5 100644
--- a/editeng/source/editeng/editobj2.hxx
+++ b/editeng/source/editeng/editobj2.hxx
@@ -227,6 +227,7 @@ public:
 
 virtual sal_Int32 GetParagraphCount() const override;
 virtual OUString GetText(sal_Int32 nParagraph) const override;
+virtual OUString GetText(LineEnd eEnd = LINEEND_LF) const override;
 virtual sal_Int32 GetTextLen(sal_Int32 nParagraph) const override;
 
 virtual void ClearPortionInfo()

core.git: Branch 'distro/collabora/co-24.04' - sc/inc sc/qa sc/source

2025-01-17 Thread Balazs Varga (via logerrit)
 sc/inc/document.hxx |3 
 sc/inc/queryevaluator.hxx   |2 
 sc/inc/queryiter.hxx|2 
 sc/inc/rangecache.hxx   |2 
 sc/qa/unit/data/functions/spreadsheet/fods/xlookup.fods |  375 
 sc/qa/unit/data/functions/spreadsheet/fods/xmatch.fods  |   38 +
 sc/source/core/data/documen2.cxx|5 
 sc/source/core/data/queryevaluator.cxx  |4 
 sc/source/core/data/queryiter.cxx   |   20 
 sc/source/core/tool/rangecache.cxx  |   10 
 10 files changed, 266 insertions(+), 195 deletions(-)

New commits:
commit 04d1fb6581af5c4e2e67f833bae885a05794cf33
Author: Balazs Varga 
AuthorDate: Wed Jun 26 19:12:07 2024 +0200
Commit: Andras Timar 
CommitDate: Fri Jan 17 10:43:19 2025 +0100

Related: tdf#127293 Ignore 'search-criteria-must-apply-to-whole-cell'

dependency for XLOOKUP and XMATCH because of better compatibility.

The idea is to specify, that the global setting 
'search-criteria-must-apply-to-whole-cell'
is ignored and XMATCH and XLOOKUP always behaves as if 
'search-criteria-must-apply-to-whole-cell'=true.

That would affect exact search in Match_mode value 0. Users would need to 
use wildcard or regex
to get a match to part of the content. But removing dependency to the 
global setting increases
interoperability with MS Excel.

Also the ODF TC will follow that in the final specification of these 
functions:
https://issues.oasis-open.org/browse/OFFICE-4154

Follow-up commit: 17d578ba91f9c78a0e41d19b58183d2214c0b7a4
(Related: tdf#127293 Add new Match_mode option for XLOOKUP and XMATCH 
functions.)

Conflicts:
  sc/inc/queryevaluator.hxx
  sc/source/core/data/queryevaluator.cxx

Change-Id: I1317865631d2925eaff72e9c1425d93386c3d016
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169582
Reviewed-by: Balazs Varga 
Reviewed-by: Regina Henschel 
Tested-by: Jenkins
(cherry picked from commit f5f5ff719f30fccd207e36627f2e42b34d0a6fb1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169673
(cherry picked from commit 5127f1678f0fc0c1c9096a76691f9b5220b16631)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180374
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sc/inc/document.hxx b/sc/inc/document.hxx
index 2c3323118ac4..69cd77c0a90c 100644
--- a/sc/inc/document.hxx
+++ b/sc/inc/document.hxx
@@ -1404,7 +1404,8 @@ public:
 doesn't already exist. */
 ScLookupCache & GetLookupCache( const ScRange & rRange, 
ScInterpreterContext* pContext );
 ScSortedRangeCache & GetSortedRangeCache( const ScRange & rRange, const 
ScQueryParam& param,
-  ScInterpreterContext* pContext, 
sal_uInt8 nSortedBinarySearch = 0x00 );
+  ScInterpreterContext* pContext, 
bool bNewSearchFunction,
+  sal_uInt8 nSortedBinarySearch = 
0x00 );
 /** Only ScLookupCache dtor uses RemoveLookupCache(), do
 not use elsewhere! */
 voidRemoveLookupCache( ScLookupCache & rCache );
diff --git a/sc/inc/queryevaluator.hxx b/sc/inc/queryevaluator.hxx
index f5724083444d..f87ab626cc09 100644
--- a/sc/inc/queryevaluator.hxx
+++ b/sc/inc/queryevaluator.hxx
@@ -109,7 +109,7 @@ class ScQueryEvaluator
 public:
 ScQueryEvaluator(ScDocument& rDoc, const ScTable& rTab, const 
ScQueryParam& rParam,
  const ScInterpreterContext* pContext = nullptr,
- bool* pTestEqualCondition = nullptr);
+ bool* pTestEqualCondition = nullptr, bool 
bNewSearchFunction = false);
 
 bool ValidQuery(SCROW nRow, const ScRefCellValue* pCell = nullptr,
 sc::TableColumnBlockPositionSet* pBlockPos = nullptr);
diff --git a/sc/inc/queryiter.hxx b/sc/inc/queryiter.hxx
index ef84420431f2..61c60b2625d2 100644
--- a/sc/inc/queryiter.hxx
+++ b/sc/inc/queryiter.hxx
@@ -106,7 +106,7 @@ public:
 protected:
 ScQueryCellIteratorAccessSpecific( ScDocument& rDocument, 
ScInterpreterContext& rContext,
 const ScQueryParam& rParam, bool bReverseSearch );
-void InitPosStart(sal_uInt8 nSortedBinarySearch = 0x00);
+void InitPosStart(bool bNewSearchFunction, sal_uInt8 nSortedBinarySearch = 
0x00);
 void InitPosFinish( SCROW beforeRow, SCROW lastRow, bool bFirstMatch );
 void InitPosColFinish( SCCOL beforeCol, SCCOL lastCol, bool bFirstMatch );
 void IncPos() { IncPosImpl(); }
diff --git a/sc/inc/rangecache.hxx b/sc/inc/rangecache.hxx
index 5a9553e764ff..4f0e810db0a8 100644
--- a/sc/inc/rangecache.hxx
+++ b/sc/inc/rangecache.hxx
@@ -47,7 +47,7 @@ public:
 /// MUST be new'd be

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

2025-01-17 Thread Justin Luth (via logerrit)
 sw/source/ui/misc/outline.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 7cad29bde08beb7b943ac68ee13b1d661d13b40d
Author: Justin Luth 
AuthorDate: Tue Mar 19 13:20:36 2024 -0400
Commit: Andras Timar 
CommitDate: Fri Jan 17 10:43:53 2025 +0100

related tdf#150197: ensure HasListFormat

Steps to reproduce
1.) tools - Heading numbering - set "Number" to non-NONE (e.g. 1, 2, 3)
2.) set a paragraph to "Heading 1" style (to ensure we export style)
3.) export to assert.docx

hits commit 727c5ed30f68abc28bb04531b25a1df30810760f
assert(false && "deprecated format still exists and is unhandled.
 Inform Vasily or Justin");

Not reproduced with "Bullets and numbering"

Change-Id: I99395f8905075dc0ec6ae04a0fd7a28b64da06af
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165036
Tested-by: Jenkins
Reviewed-by: Justin Luth 
(cherry picked from commit f056f4d45080febc6c912bd623b5df8fa06f87a1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180369
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 6500bfdd6eca..c216289a0b10 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -623,6 +623,8 @@ IMPL_LINK_NOARG(SwOutlineSettingsTabPage, NumberSelect, 
weld::ComboBox&, void)
 {
 SwNumFormat aNumFormat(m_pNumRule->Get(i));
 aNumFormat.SetNumberingType(nNumberType);
+// ensure that HasListFormat
+aNumFormat.SetListFormat(aNumFormat.GetPrefix(), 
aNumFormat.GetSuffix(), i);
 m_pNumRule->Set(i, aNumFormat);
 CheckForStartValue_Impl(nNumberType);
 }


core.git: emfio/source

2025-01-17 Thread Caolán McNamara (via logerrit)
 emfio/source/reader/mtftools.cxx |   26 --
 1 file changed, 24 insertions(+), 2 deletions(-)

New commits:
commit e488385c994993c22d21ac8f1d967770b3145153
Author: Caolán McNamara 
AuthorDate: Fri Jan 17 09:32:58 2025 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 17 11:49:27 2025 +0100

ofz#390253942 Integer-overflow

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

diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 6d920a2ce5a4..a6409d0257b4 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1634,6 +1634,25 @@ namespace emfio
 }
 }
 
+static bool AllowDim(tools::Long nDim)
+{
+static bool bFuzzing = comphelper::IsFuzzing();
+if (bFuzzing)
+{
+if (nDim > 0x2000 || nDim < -0x2000)
+{
+SAL_WARN("vcl", "skipping huge dimension: " << nDim);
+return false;
+}
+}
+return true;
+}
+
+static bool AllowPoint(const Point& rPoint)
+{
+return AllowDim(rPoint.X()) && AllowDim(rPoint.Y());
+}
+
 void MtfTools::DrawPolyBezier( tools::Polygon rPolygon, bool bTo, bool 
bRecordPath )
 {
 sal_uInt16 nPoints = rPolygon.GetSize();
@@ -1861,8 +1880,11 @@ namespace emfio
 for (sal_Int32 i = 0; i < rText.getLength(); ++i)
 {
 Point aCharDisplacement( i ? (*pDXArry)[i-1] : 0, i ? 
pDYArry[i-1] : 0 );
-Point().RotateAround(aCharDisplacement, 
maFont.GetOrientation());
-mpGDIMetaFile->AddAction( new MetaTextArrayAction( 
rPosition + aCharDisplacement, OUString( rText[i] ), KernArraySpan(), {}, 0, 1 
) );
+if (AllowPoint(aCharDisplacement))
+{
+Point().RotateAround(aCharDisplacement, 
maFont.GetOrientation());
+mpGDIMetaFile->AddAction( new MetaTextArrayAction( 
rPosition + aCharDisplacement, OUString( rText[i] ), KernArraySpan(), {}, 0, 1 
) );
+}
 }
 }
 else


core.git: 2 commits - sfx2/source vcl/source

2025-01-17 Thread Mike Kaganski (via logerrit)
 sfx2/source/appl/linkmgr2.cxx |   25 +
 vcl/source/window/dialog.cxx  |4 
 2 files changed, 21 insertions(+), 8 deletions(-)

New commits:
commit ff41053e7700e5489630869afb4e063f5c8a2ede
Author: Mike Kaganski 
AuthorDate: Thu Jan 16 13:21:46 2025 +0500
Commit: Mike Kaganski 
CommitDate: Fri Jan 17 11:48:49 2025 +0100

LOK: Do not try to show an "update links" dialog

In commit f8528cdda9292c7ae6c9d49b80c1a3a3b4a67094 (LOK: don't crash
when trying to show a dialog during file load, 2024-12-26), all not
yet async / not properly set up dialogs made to fail gracefully. In
the follow-up https://gerrit.libreoffice.org/c/core/+/180334, an
assert is added to still fail in debug builds.

The specific "update links" dialog case, that triggered the original
change in the first place, does not need to appear at all in the LOK
case, because there is no external documents available for updating.
This change avoids the dialog in that case.

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

diff --git a/sfx2/source/appl/linkmgr2.cxx b/sfx2/source/appl/linkmgr2.cxx
index 8a54ac946945..6d9bb0476e17 100644
--- a/sfx2/source/appl/linkmgr2.cxx
+++ b/sfx2/source/appl/linkmgr2.cxx
@@ -17,6 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include 
+
+#include 
 #include 
 #include 
 #include 
@@ -278,6 +281,12 @@ bool LinkManager::GetDisplayNames( const SvBaseLink * 
pLink,
 return bRet;
 }
 
+static void disallowAllLinksUpdate(SvBaseLink* pShellProvider)
+{
+if (SfxObjectShell* pShell = 
pShellProvider->GetLinkManager()->GetPersist())
+pShell->getEmbeddedObjectContainer().setUserAllowsLinkUpdate(false);
+}
+
 void LinkManager::UpdateAllLinks(
 bool bAskUpdate,
 bool bUpdateGrfLinks,
@@ -325,6 +334,13 @@ void LinkManager::UpdateAllLinks(
 
 if( bAskUpdate )
 {
+if (comphelper::LibreOfficeKit::isActive())
+{
+// only one document in jail, no update possible
+disallowAllLinksUpdate(pLink);
+return;
+}
+
 OUString aMsg = SfxResId(STR_QUERY_UPDATE_LINKS);
 INetURLObject aURL(pPersist->getDocumentBaseURL());
 aMsg = aMsg.replaceFirst("%{filename}", aURL.GetLastName());
@@ -336,14 +352,7 @@ void LinkManager::UpdateAllLinks(
 int nRet = xQueryBox->run();
 if( RET_YES != nRet )
 {
-SfxObjectShell* pShell = pLink->GetLinkManager()->GetPersist();
-
-if(pShell)
-{
-comphelper::EmbeddedObjectContainer& 
rEmbeddedObjectContainer = pShell->getEmbeddedObjectContainer();
-rEmbeddedObjectContainer.setUserAllowsLinkUpdate(false);
-}
-
+disallowAllLinksUpdate(pLink);
 return ;// nothing should be updated
 }
 bAskUpdate = false;  // once is enough
commit f7499659050ace3d4a6aa133853125138f969ac4
Author: Mike Kaganski 
AuthorDate: Thu Jan 16 13:04:25 2025 +0500
Commit: Mike Kaganski 
CommitDate: Fri Jan 17 11:48:42 2025 +0100

Add an assert to allow debugging not yet async dialogs

Commit f8528cdda9292c7ae6c9d49b80c1a3a3b4a67094 (LOK: don't crash when
trying to show a dialog during file load, 2024-12-26) fixed a crash
when a not async / not properly set up dialog was attempted in Online.
This is reasonable in release builds, but the added assert helps to
find the problem in development (debug) builds.

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

diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 8b33aa64c8db..ecf2302bfe4d 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -939,6 +939,10 @@ bool Dialog::ImplStartExecute()
 
 // Also pNotifier may be nullptr when a dialog (e.g., "update
 // links?") is to be shown when loading a document.
+// Never crash in release builds (assume "cancel"), but allow
+// to see the not yet async / not properly set up dialogs in
+// debug builds.
+assert(!"A dialog without a notifier: make me async / properly 
set up");
 return false;
 }
 }


core.git: desktop/source lingucomponent/source

2025-01-17 Thread Andras Timar (via logerrit)
 desktop/source/lib/init.cxx   |   13 +
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx |3 +++
 2 files changed, 16 insertions(+)

New commits:
commit 0e512e7aeeda61e95d2eafc2a566a3cef24fadf6
Author: Andras Timar 
AuthorDate: Thu Jan 16 10:56:38 2025 +0100
Commit: Andras Timar 
CommitDate: Fri Jan 17 12:29:08 2025 +0100

LOK: preload hyphenators

Without this fix the hyphenation feature did not work when
bind mounting was not available, e.g. in docker containers.

Change-Id: I800012b5229ce5a56a5698db7057e3a27e760be3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180337
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit 7b43ce868f980dc47c37f482900210eae2d0187e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180382
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 9b6f387c37f2..d48ded705473 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -7957,6 +7957,19 @@ static void preloadData()
 }
 std::cerr << "
";
 
+// preload all available hyphenators
+css::uno::Reference 
xHyphenator(xLngSvcMgr->getHyphenator());
+css::uno::Reference 
xHyphLocales(xHyphenator, css::uno::UNO_QUERY_THROW);
+aLocales = xHyphLocales->getLocales();
+std::cerr << "Preloading local hyphenators: ";
+for (auto &it : std::as_const(aLocales))
+{
+std::cerr << LanguageTag::convertToBcp47(it) << " ";
+css::beans::PropertyValues aNone;
+xHyphenator->createPossibleHyphens(u"forcefed"_ustr, it, aNone);
+}
+std::cerr << "
";
+
 std::cerr << "Preloading breakiterator
";
 if (aLocales.getLength())
 {
diff --git a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx 
b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
index 1e527c8e8ada..a00b4e5a3d2f 100644
--- a/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
+++ b/lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -150,6 +151,8 @@ void Hyphenator::ensureLocales()
 {
 for (const auto& rLocaleName : dict.aLocaleNames)
 {
+if 
(!comphelper::LibreOfficeKit::isAllowlistedLanguage(rLocaleName))
+continue;
 aLocaleNamesSet.insert( rLocaleName );
 }
 }


core.git: helpcontent2

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

New commits:
commit 656a123c745a55582dc13a589c83c6fad07e1dd4
Author: Olivier Hallot 
AuthorDate: Fri Jan 17 08:39:39 2025 -0300
Commit: Gerrit Code Review 
CommitDate: Fri Jan 17 12:39:39 2025 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to c0b77292ca59b964feb3d039e9cb9e3adb927c96
  - tdf#131927 Clarify criterion as string expression in SUMIF

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

diff --git a/helpcontent2 b/helpcontent2
index d9104f52a1f7..c0b77292ca59 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit d9104f52a1f7e3b2eee958544659cabb6808cd3c
+Subproject commit c0b77292ca59b964feb3d039e9cb9e3adb927c96


help.git: source/text

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

New commits:
commit c0b77292ca59b964feb3d039e9cb9e3adb927c96
Author: Olivier Hallot 
AuthorDate: Thu Jan 16 15:57:42 2025 -0300
Commit: Olivier Hallot 
CommitDate: Fri Jan 17 12:39:39 2025 +0100

tdf#131927 Clarify criterion as string expression in SUMIF

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

diff --git a/source/text/scalc/01/ex_data_stat_func.xhp 
b/source/text/scalc/01/ex_data_stat_func.xhp
index dccc1bcb6c..bc6280ebb2 100644
--- a/source/text/scalc/01/ex_data_stat_func.xhp
+++ b/source/text/scalc/01/ex_data_stat_func.xhp
@@ -132,7 +132,7 @@
 
   Range1 – 
required argument. It is a range of cells, a name of a named range, or a label 
of a column or a row, to which the corresponding criterion is to be 
applied.
   
-Criterion: A criterion is a single cell 
Reference, Number or Text. It is used in comparisons with cell 
contents.
+Criterion: A criterion is a text 
expression computed from a single cell Reference, Formula, Number or Text. It 
is used in comparisons with cell contents.
 
   A reference to an 
empty cell is interpreted as the numeric value 0.
   A matching 
expression can be: