core.git: Branch 'feature/cib_contract49d' - sw/inc sw/source

2025-02-03 Thread Oliver Specht (via logerrit)
 sw/inc/crsrsh.hxx|9 +
 sw/inc/fesh.hxx  |2 +-
 sw/inc/mdiexp.hxx|4 +++-
 sw/inc/view.hxx  |7 +--
 sw/inc/viewsh.hxx|9 -
 sw/source/core/crsr/crsrsh.cxx   |   19 ++-
 sw/source/core/frmedt/feshview.cxx   |4 ++--
 sw/source/core/view/viewsh.cxx   |4 ++--
 sw/source/ui/dialog/uiregionsw.cxx   |2 +-
 sw/source/ui/index/swuiidxmrk.cxx|2 +-
 sw/source/ui/misc/insfnote.cxx   |6 +++---
 sw/source/uibase/dochdl/swdtflvr.cxx |2 +-
 sw/source/uibase/docvw/edtdd.cxx |4 ++--
 sw/source/uibase/docvw/edtwin.cxx|   22 ++
 sw/source/uibase/docvw/edtwin3.cxx   |5 +++--
 sw/source/uibase/inc/edtwin.hxx  |4 +++-
 sw/source/uibase/inc/wrtsh.hxx   |   20 +---
 sw/source/uibase/shells/tabsh.cxx|2 +-
 sw/source/uibase/shells/textsh1.cxx  |2 +-
 sw/source/uibase/uiview/viewport.cxx |   29 +++--
 sw/source/uibase/uno/unotxdoc.cxx|2 +-
 sw/source/uibase/wrtsh/move.cxx  |6 +++---
 sw/source/uibase/wrtsh/select.cxx|   16 
 sw/source/uibase/wrtsh/wrtsh3.cxx|8 
 24 files changed, 118 insertions(+), 72 deletions(-)

New commits:
commit b357de0cb6eb5108b6b31de2c8ee652c71d0fe7a
Author: Oliver Specht 
AuthorDate: Wed Dec 18 15:11:38 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 20:20:42 2025 +0100

tdf#50743 Improve scrolling while selecting

If the mouse leaves the document window scrolling of selections
happens now in smaller steps so the user is able to stop at the
intended position easier.

Change-Id: Ifd21c92936021f8e2213d34446672e2a8eab568f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179855
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 2417fb507cae..2cb968fb7905 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -169,7 +169,7 @@ public:
 
 SW_DLLPUBLIC void UpdateCursor(
 sal_uInt16 eFlags = SwCursorShell::SCROLLWIN|SwCursorShell::CHKRANGE,
-bool bIdleEnd = false );
+bool bIdleEnd = false, ScrollSizeMode eScrollSizeMode = 
ScrollSizeMode::ScrollSizeDefault );
 
 private:
 
@@ -421,7 +421,7 @@ public:
  *the cursor is done in order to get at the properties under the 
mouse pointer.
  */
 SW_DLLPUBLIC int SetCursor(const Point& rPt, bool bOnlyText = false, bool 
bBlock = true,
-  bool bFieldInfo = false);
+  bool bFieldInfo = false, ScrollSizeMode eScrollSizeMode = 
ScrollSizeMode::ScrollSizeDefault);
 
 /*
  * Notification that the visible area was changed. m_aVisArea is reset, 
then
@@ -731,7 +731,8 @@ public:
 // Place only the visible cursor at the given position in the document.
 // Return false if SPoint was corrected by layout.
 // (This is needed for displaying the Drag&Drop/Copy-Cursor.)
-bool SetVisibleCursor( const Point &rPt );
+bool SetVisibleCursor( const Point &rPt,
+ScrollSizeMode eScrollSizeMode = ScrollSizeMode::ScrollSizeDefault );
 inline void UnSetVisibleCursor();
 SW_DLLPUBLIC SwVisibleCursor* GetVisibleCursor() const;
 
@@ -813,7 +814,7 @@ public:
 bool GotoRegion( std::u16string_view rName );
 
 // show the current selection
-virtual void MakeSelVisible();
+virtual void MakeSelVisible(ScrollSizeMode eScrollSizeMode = 
ScrollSizeMode::ScrollSizeDefault);
 
 // set the cursor to a NOT protected/hidden node
 bool FindValidContentNode( bool bOnlyText );
diff --git a/sw/inc/fesh.hxx b/sw/inc/fesh.hxx
index 6e4466dc60d7..b6ccbee8b939 100644
--- a/sw/inc/fesh.hxx
+++ b/sw/inc/fesh.hxx
@@ -360,7 +360,7 @@ public:
 void SetPageObjsNewPage( std::vector& rFillArr );
 
 /// Show current selection (frame / draw object as required).
-virtual void MakeSelVisible() override;
+virtual void MakeSelVisible(ScrollSizeMode eScrollSizeMode = 
ScrollSizeMode::ScrollSizeDefault) override;
 
 /** @return FrameFormat of object that may be under Point.
  Object does not become selected! */
diff --git a/sw/inc/mdiexp.hxx b/sw/inc/mdiexp.hxx
index afe308e1ad89..6d4af73bd80b 100644
--- a/sw/inc/mdiexp.hxx
+++ b/sw/inc/mdiexp.hxx
@@ -22,6 +22,7 @@
 #include "tblenum.hxx"
 #include "swdllapi.h"
 #include 
+#include "viewsh.hxx"
 
 #include 
 
@@ -30,7 +31,8 @@ class Size;
 class SwViewShell;
 class SwDocShell;
 
-extern void ScrollMDI(SwViewShell const * pVwSh, const SwRect &, sal_uInt16 
nRangeX, sal_uInt16 nRangeY);
+extern void ScrollMDI(SwViewShell const * pVwSh, const SwRect &, sal_uInt16 
nRangeX, sal_uInt16 nRangeY
+, ScrollSizeMode eScrollSizeMode = ScrollSizeMode::ScrollSizeDefault);
 extern bool IsScrollMDI(SwViewShell const * pVwSh, const SwRect &);
 extern void SizeNoti

core.git: 2 commits - compilerplugins/clang fpicker/source include/vcl vcl/inc vcl/source

2025-02-03 Thread Michael Weghorn (via logerrit)
 compilerplugins/clang/mergeclasses.results |1 
 fpicker/source/office/fpdialogbase.hxx |1 
 include/vcl/toolkit/svtabbx.hxx|   29 
 vcl/inc/treeglue.hxx   |   35 -
 vcl/source/app/salvtables.cxx  |   20 
 vcl/source/window/builder.cxx  |2 -
 6 files changed, 40 insertions(+), 48 deletions(-)

New commits:
commit fb0bd0e39bd8ccc618ef34bc6f830067723c1b4d
Author: Michael Weghorn 
AuthorDate: Fri Jan 31 15:36:05 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:39:43 2025 +0100

fpicker: Drop unused SvTabListBox forward decl

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

diff --git a/fpicker/source/office/fpdialogbase.hxx 
b/fpicker/source/office/fpdialogbase.hxx
index 60205695b719..fea0f6e9766e 100644
--- a/fpicker/source/office/fpdialogbase.hxx
+++ b/fpicker/source/office/fpdialogbase.hxx
@@ -24,7 +24,6 @@
 #include 
 #include "pickercallbacks.hxx"
 
-class SvTabListBox;
 class SvtFileView;
 class SvtFileDialogFilter_Impl;
 
commit a3befdae52513f04ce57b1f9ecab61ea439ebed9
Author: Michael Weghorn 
AuthorDate: Fri Jan 31 15:27:24 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:39:37 2025 +0100

vcl: Merge LclHeaderTabListBox into SvHeaderTabListBox

By now LclHeaderTabListBox is the only SvHeaderTabListBox
subclass and SvHeaderTabListBox is not used by itself.
Merge the former into the latter to make the class hierarchy
a little less complex.

The "plain" SvHeaderTabListBox or other subclasses used
to be used in the past, but that is no longer the case,
see e.g.

commit 4e07b178f58b1dabbb48bc9f26155b8270a4a72d
Date:   Tue Feb 18 10:16:40 2020 +

weld WatchWindow panel

which eliminated one use.

Copy the comment about the default NotifyStartDrag
implementation in the base class being weird from
vcl/inc/treeglue.hxx but also leave it there, as
it applies for the LclTabListBox class that is
still there just the same.

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

diff --git a/compilerplugins/clang/mergeclasses.results 
b/compilerplugins/clang/mergeclasses.results
index 7d96c32e075e..e3ddbd3d0576 100644
--- a/compilerplugins/clang/mergeclasses.results
+++ b/compilerplugins/clang/mergeclasses.results
@@ -221,7 +221,6 @@ merge StgAvlIterator with StgIterator
 merge StgAvlNode with StgDirEntry
 merge StgCache with StgIo
 merge StylesPreviewWindow_Base with StylesPreviewWindow_Impl
-merge SvHeaderTabListBox with LclHeaderTabListBox
 merge SvIdlDataBase with SvIdlWorkingBase
 merge SvListView with SvTreeListBox
 maybe merge SvLockBytes with utl::UcbLockBytes, in modules tools and unotools
diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx
index 4e6eb66b2969..65e6d106db7d 100644
--- a/include/vcl/toolkit/svtabbx.hxx
+++ b/include/vcl/toolkit/svtabbx.hxx
@@ -100,6 +100,9 @@ private:
 rtl::Reference  m_xAccessible;
 std::vector> 
m_aAccessibleChildren;
 
+Link m_aEditingEntryHdl;
+Link m_aEditedEntryHdl;
+
 DECL_DLLPRIVATE_LINK( ScrollHdl_Impl, SvTreeListBox*, void );
 DECL_DLLPRIVATE_LINK( CreateAccessibleHdl_Impl, HeaderBar*, void );
 
@@ -203,6 +206,32 @@ public:
 virtual sal_Int32   GetFieldIndexAtPoint(sal_Int32 
_nRow,sal_Int32 _nColumnPos,const Point& _rPoint) override;
 
 virtual void DumpAsPropertyTree(tools::JsonWriter& rJsonWriter) override;
+
+void SetEditingEntryHdl(const Link& rLink)
+{
+m_aEditingEntryHdl = rLink;
+}
+
+void SetEditedEntryHdl(const Link& rLink)
+{
+m_aEditedEntryHdl = rLink;
+}
+
+//the default NotifyStartDrag is weird to me, and defaults to enabling all
+//possibilities when drag starts, while restricting it to some subset of
+//the configured drag drop mode would make more sense to me, but I'm not
+//going to change the baseclass
+virtual DragDropMode NotifyStartDrag() override { return 
GetDragDropMode(); }
+
+virtual bool EditingEntry(SvTreeListEntry* pEntry) override
+{
+return m_aEditingEntryHdl.Call(pEntry);
+}
+
+virtual bool EditedEntry(SvTreeListEntry* pEntry, const OUString& 
rNewText) override
+{
+return m_aEditedEntryHdl.Call(IterString(pEntry, rNewText));
+}
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/treeglue.hxx b/vcl/inc/treeglue.hxx
index 16fc52a3a7ed..9c18057b0eb3 100644
--- a/vcl/inc/treeglue.hxx
+++ b/vcl/inc/treeglue.hxx
@@ -15,41 +15,6 @@
 //the configured drag drop mode would make more sense to me, but

core.git: 3 commits - cui/source include/vcl vcl/inc vcl/source

2025-02-03 Thread Michael Weghorn (via logerrit)
 cui/source/inc/macropg.hxx |2 --
 include/vcl/toolkit/svtabbx.hxx|3 +--
 vcl/inc/accessibility/accessibletablistbox.hxx |2 --
 vcl/inc/treeglue.hxx   |4 ++--
 vcl/source/treelist/svtabbx.cxx|   16 ++--
 vcl/source/window/builder.cxx  |3 +--
 6 files changed, 10 insertions(+), 20 deletions(-)

New commits:
commit aa3416b59abfde102e8589f53f75089cadffc242
Author: Michael Weghorn 
AuthorDate: Fri Jan 31 15:11:07 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:39:31 2025 +0100

cui: Drop unnecessary forward declarations

The SvTabListBox one is unused.
SvxMacroTabPage_ is declared just below.

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

diff --git a/cui/source/inc/macropg.hxx b/cui/source/inc/macropg.hxx
index 86d93115b416..02d10e1fd879 100644
--- a/cui/source/inc/macropg.hxx
+++ b/cui/source/inc/macropg.hxx
@@ -33,8 +33,6 @@
 typedef std::pair EventPair;
 typedef std::unordered_map EventsHash;
 
-class SvxMacroTabPage_;
-class SvTabListBox;
 class SvxMacroTabPage_Impl;
 
 
commit 6b67cef4fa7aaebaacfdc8715594d22a186555ce
Author: Michael Weghorn 
AuthorDate: Fri Jan 31 15:07:07 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:39:25 2025 +0100

vcl: SvHeaderTabListBox: Pass HeaderBar in ctor

... instead of having a separate method
SvHeaderTabListBox::InitHeaderBar that gets called
right after the ctor.

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

diff --git a/include/vcl/toolkit/svtabbx.hxx b/include/vcl/toolkit/svtabbx.hxx
index 0de912c20c21..4e6eb66b2969 100644
--- a/include/vcl/toolkit/svtabbx.hxx
+++ b/include/vcl/toolkit/svtabbx.hxx
@@ -106,13 +106,12 @@ private:
 voidRecalculateAccessibleChildren();
 
 public:
-SvHeaderTabListBox( vcl::Window* pParent, WinBits nBits );
+SvHeaderTabListBox(vcl::Window* pParent, WinBits nBits, HeaderBar* 
pHeaderBar);
 virtual ~SvHeaderTabListBox() override;
 virtual void dispose() override;
 
 virtual voidPaint( vcl::RenderContext& rRenderContext, const 
tools::Rectangle& ) override;
 
-voidInitHeaderBar(HeaderBar* pHeaderBar);
 HeaderBar*  GetHeaderBar();
 static bool IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 nCol );
 
diff --git a/vcl/inc/treeglue.hxx b/vcl/inc/treeglue.hxx
index 6e3930a017df..16fc52a3a7ed 100644
--- a/vcl/inc/treeglue.hxx
+++ b/vcl/inc/treeglue.hxx
@@ -22,8 +22,8 @@ private:
 Link m_aEditedEntryHdl;
 
 public:
-LclHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle)
-: SvHeaderTabListBox(pParent, nWinStyle)
+LclHeaderTabListBox(vcl::Window* pParent, WinBits nWinStyle, HeaderBar* 
pHeaderBar)
+: SvHeaderTabListBox(pParent, nWinStyle, pHeaderBar)
 {
 }
 
diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx
index c0d5c90e8a10..04f359d1696e 100644
--- a/vcl/source/treelist/svtabbx.cxx
+++ b/vcl/source/treelist/svtabbx.cxx
@@ -549,11 +549,16 @@ namespace vcl
 };
 }
 
-SvHeaderTabListBox::SvHeaderTabListBox( vcl::Window* pParent, WinBits 
nWinStyle )
+SvHeaderTabListBox::SvHeaderTabListBox(vcl::Window* pParent, WinBits 
nWinStyle, HeaderBar* pHeaderBar)
 : SvTabListBox(pParent, nWinStyle)
 , m_bFirstPaint(true)
 , m_pImpl(new ::vcl::SvHeaderTabListBoxImpl)
 {
+
+assert(pHeaderBar);
+m_pImpl->m_pHeaderBar = pHeaderBar;
+SetScrolledHdl(LINK(this, SvHeaderTabListBox, ScrollHdl_Impl));
+m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl(LINK(this, 
SvHeaderTabListBox, CreateAccessibleHdl_Impl));
 }
 
 SvHeaderTabListBox::~SvHeaderTabListBox()
@@ -581,15 +586,6 @@ void SvHeaderTabListBox::Paint( vcl::RenderContext& 
rRenderContext, const tools:
 SvTabListBox::Paint(rRenderContext, rRect);
 }
 
-void SvHeaderTabListBox::InitHeaderBar( HeaderBar* pHeaderBar )
-{
-DBG_ASSERT( !m_pImpl->m_pHeaderBar, "header bar already initialized" );
-DBG_ASSERT( pHeaderBar, "invalid header bar initialization" );
-m_pImpl->m_pHeaderBar = pHeaderBar;
-SetScrolledHdl( LINK( this, SvHeaderTabListBox, ScrollHdl_Impl ) );
-m_pImpl->m_pHeaderBar->SetCreateAccessibleHdl( LINK( this, 
SvHeaderTabListBox, CreateAccessibleHdl_Impl ) );
-}
-
 HeaderBar* SvHeaderTabListBox::GetHeaderBar()
 {
 return m_pImpl ? m_pImpl->m_pHeaderBar : nullptr;
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 871a90a603d2..763654d8bd50 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -1743,8 +1743,7 @@ VclPtr VclBuilder::makeObject(vcl::Window 
*pParent, const OUString

core.git: Branch 'distro/cib/libreoffice-6-4' - sc/qa sc/source

2025-02-03 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc.hxx |1 
 sc/qa/unit/ucalc_formula.cxx |   71 +++
 sc/source/core/tool/compiler.cxx |   29 +++
 3 files changed, 101 insertions(+)

New commits:
commit aaf14013a3fa97147f78159361d8b1148b91f5f4
Author: Balazs Varga 
AuthorDate: Mon Jan 27 09:57:25 2025 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 17:20:16 2025 +0100

tdf#164843 - sc optimize "SubTotal" function's reference ranges

Double references from relative named ranges can point to large
ranges (MAXCOL/MAXROW) and because of that some function evaluation
like SubTotal can be extreamly slow when we call 
ScTable::CompileHybridFormula
with these large ranges. Since all the SubTotal functions ignore empty cells
its worth to optimize and trim the double references in SubTotal functions.

cherry-pick from: 66eecde324aa1687ececc3f0f514358a7f69bc75

Change-Id: I9340b520cd3ac333b63b4aec35a3c647f5d9a119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180974
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sc/qa/unit/ucalc.hxx b/sc/qa/unit/ucalc.hxx
index 9852a16e7eb6..f89076770fb2 100644
--- a/sc/qa/unit/ucalc.hxx
+++ b/sc/qa/unit/ucalc.hxx
@@ -189,6 +189,7 @@ public:
 void testFuncSUM();
 void testFuncPRODUCT();
 void testFuncSUMPRODUCT();
+void testFuncSUBTOTAL();
 void testFuncSUMXMY2();
 void testFuncMIN();
 void testFuncN();
diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 1575731f56e7..1a81aa8abf74 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -4685,6 +4685,77 @@ void Test::testFuncSUMPRODUCT()
 m_pDoc->DeleteTab(0);
 }
 
+void Test::testFuncSUBTOTAL()
+{
+m_pDoc->InsertTab(0, "Formula");
+
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+
+// Fill C1:C1025 with values and insert formulas in D1:D1025 using the 
named expression.
+for (size_t i = 0; i < 1025; i++)
+m_pDoc->SetValue(ScAddress(2, i, 0), i + 1);
+
+// Add a named expression for a function.
+ScRangeName* pGlobalNames = m_pDoc->GetRangeName();
+CPPUNIT_ASSERT_MESSAGE("Failed to obtain global named expression object.", 
pGlobalNames);
+ScRangeData* pName = new ScRangeData(
+m_pDoc, "MyRelative", "$C1:$C$1000", ScAddress(2, 999, 0),
+ScRangeData::Type::Name, formula::FormulaGrammar::GRAM_NATIVE);
+bool bInserted = pGlobalNames->insert(pName);
+CPPUNIT_ASSERT_MESSAGE("Failed to insert a new name.", bInserted);
+
+for (size_t i = 0; i < 1025; i++)
+m_pDoc->SetString(ScAddress(3, i, 0), 
"=IF(SUBTOTAL(3;MyRelative)=1;"";SUBTOTAL(3;MyRelative))");
+
+// Make sure the results are correct.
+for (size_t i = 0; i < 1025; i++)
+{
+if (i < 999.0)
+CPPUNIT_ASSERT_EQUAL(26.0, m_pDoc->GetValue(3, i, 0));
+else
+CPPUNIT_ASSERT_EQUAL((1000.0 - (i - 999.0)), m_pDoc->GetValue(3, 
i, 0));
+}
+
+ScRange aTrimedRange(2, 999, 0, 2, 1024, 0);
+ScRange aValidRange(2, 0, 0, 2, 999, 0);
+for (size_t i = 0; i < 1025; i++)
+{
+ScFormulaCell* pCell = m_pDoc->GetFormulaCell(ScAddress(3, i, 0));
+ScTokenArray* pCode = pCell->GetCode();
+sal_uInt16 nLen = pCode->GetCodeLen();
+FormulaToken** pRPNArray = pCode->GetCode();
+OUString aCellName = pCell->aPos.GetColRowString();
+
+for (sal_uInt16 nIdx = 0; nIdx < nLen; ++nIdx)
+{
+FormulaToken* pTok = pRPNArray[nIdx];
+if (pTok && pTok->GetType() == svDoubleRef)
+{
+ScRange aRange = pTok->GetDoubleRef()->toAbs(ScAddress(3, i, 
0));
+if (i < 999)
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE(OUString("Double ref is 
incorrectly trimmed in: " + aCellName).toUtf8().getStr(),
+aRange, aTrimedRange);
+// Without the trim it would failed with
+// assertion failed
+// - Expression: aRange == aTrimedRange
+// - Double ref is incorrectly trimmed in : D1
+// ScRange aTrimmableRange(2, 999, 0, 0, 1048575, 0);
+}
+else
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE(OUString("Double ref is 
incorrectly trimmed in: " + aCellName).toUtf8().getStr(),
+aRange, aValidRange);
+}
+}
+}
+if (i >= 999)
+aValidRange.aStart.IncRow();
+}
+
+m_pDoc->DeleteTab(0);
+}
+
 void Test::testFuncSUMXMY2()
 {
 m_pDoc->InsertTab(0, "Test SumXMY2");
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 1a6833204f0b..a994f5cf1ebf 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6439,6 +6439,3

core.git: vcl/source

2025-02-03 Thread Christopher Sherlock (via logerrit)
 vcl/source/control/combobox.cxx |  110 
 1 file changed, 56 insertions(+), 54 deletions(-)

New commits:
commit aa1e2fc959633a589f6bf961d39991dbd1261947
Author: Christopher Sherlock 
AuthorDate: Tue Dec 10 20:52:10 2024 +1100
Commit: Noel Grandin 
CommitDate: Mon Feb 3 17:26:37 2025 +0100

vcl: rename enum variable prefixes

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

diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index 984138ac0e14..52c28c8b1380 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -136,28 +136,28 @@ void ComboBox::ImplCalcEditHeight()
 }
 }
 
-void ComboBox::ImplInit( vcl::Window* pParent, WinBits nStyle )
+void ComboBox::ImplInit(vcl::Window* pParent, WinBits eStyle)
 {
-const bool bNoBorder = ( nStyle & WB_NOBORDER ) != 0;
+const bool bNoBorder = (eStyle & WB_NOBORDER) != 0;
 
-if ( !(nStyle & WB_DROPDOWN) )
+if (!(eStyle & WB_DROPDOWN))
 {
-nStyle &= ~WB_BORDER;
-nStyle |= WB_NOBORDER;
+eStyle &= ~WB_BORDER;
+eStyle |= WB_NOBORDER;
 }
 else
 {
 if ( !bNoBorder )
-nStyle |= WB_BORDER;
+eStyle |= WB_BORDER;
 }
 
-Edit::ImplInit( pParent, nStyle );
+Edit::ImplInit(pParent, eStyle);
 SetBackground();
 
 // DropDown ?
-WinBits nEditStyle = nStyle & ( WB_LEFT | WB_RIGHT | WB_CENTER );
-WinBits nListStyle = nStyle;
-if( nStyle & WB_DROPDOWN )
+WinBits eEditStyle = eStyle & (WB_LEFT | WB_RIGHT | WB_CENTER);
+WinBits eListStyle = eStyle;
+if (eStyle & WB_DROPDOWN)
 {
 m_pFloatWin = VclPtr::Create( this );
 if (!IsNativeControlSupported(ControlType::Pushbutton, 
ControlPart::Focus))
@@ -170,21 +170,21 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits 
nStyle )
 m_pBtn->SetMBDownHdl(LINK(this, ComboBox, ImplClickBtnHdl));
 m_pBtn->Show();
 
-nEditStyle |= WB_NOBORDER;
-nListStyle &= ~WB_BORDER;
-nListStyle |= WB_NOBORDER;
+eEditStyle |= WB_NOBORDER;
+eListStyle &= ~WB_BORDER;
+eListStyle |= WB_NOBORDER;
 }
 else
 {
 if ( !bNoBorder )
 {
-nEditStyle |= WB_BORDER;
-nListStyle &= ~WB_NOBORDER;
-nListStyle |= WB_BORDER;
+eEditStyle |= WB_BORDER;
+eListStyle &= ~WB_NOBORDER;
+eListStyle |= WB_BORDER;
 }
 }
 
-m_pSubEdit.set( VclPtr::Create( this, nEditStyle ) );
+m_pSubEdit.set(VclPtr::Create(this, eEditStyle));
 m_pSubEdit->EnableRTL( false );
 SetSubEdit( m_pSubEdit );
 m_pSubEdit->SetPosPixel( Point() );
@@ -194,7 +194,7 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits 
nStyle )
 vcl::Window* pLBParent = this;
 if (m_pFloatWin)
 pLBParent = m_pFloatWin;
-m_pImplLB = VclPtr::Create( pLBParent, 
nListStyle|WB_SIMPLEMODE|WB_AUTOHSCROLL );
+m_pImplLB = VclPtr::Create(pLBParent, eListStyle | 
WB_SIMPLEMODE | WB_AUTOHSCROLL);
 m_pImplLB->SetPosPixel( Point() );
 m_pImplLB->SetSelectHdl(LINK(this, ComboBox, ImplSelectHdl));
 m_pImplLB->SetCancelHdl( LINK(this, ComboBox, ImplCancelHdl));
@@ -213,13 +213,15 @@ void ComboBox::ImplInit( vcl::Window* pParent, WinBits 
nStyle )
 SetCompoundControl( true );
 }
 
-WinBits ComboBox::ImplInitStyle( WinBits nStyle )
+WinBits ComboBox::ImplInitStyle(WinBits eStyle)
 {
-if ( !(nStyle & WB_NOTABSTOP) )
-nStyle |= WB_TABSTOP;
-if ( !(nStyle & WB_NOGROUP) )
-nStyle |= WB_GROUP;
-return nStyle;
+if (!(eStyle & WB_NOTABSTOP))
+eStyle |= WB_TABSTOP;
+
+if (!(eStyle & WB_NOGROUP))
+eStyle |= WB_GROUP;
+
+return eStyle;
 }
 
 void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase )
@@ -536,15 +538,15 @@ sal_uInt16 ComboBox::GetDropDownLineCount() const
 return nLines;
 }
 
-void ComboBox::setPosSizePixel( tools::Long nX, tools::Long nY, tools::Long 
nWidth, tools::Long nHeight,
-PosSizeFlags nFlags )
+void ComboBox::setPosSizePixel(tools::Long nX, tools::Long nY, tools::Long 
nWidth, tools::Long nHeight,
+   PosSizeFlags eFlags)
 {
-if( IsDropDownBox() && ( nFlags & PosSizeFlags::Size ) )
+if (IsDropDownBox() && (eFlags & PosSizeFlags::Size))
 {
 Size aPrefSz = m_pFloatWin->GetPrefSize();
-if ((nFlags & PosSizeFlags::Height) && (nHeight >= 2*m_nDDHeight))
+if ((eFlags & PosSizeFlags::Height) && (nHeight >= 2*m_nDDHeight))
 aPrefSz.setHeight( nHeight-m_nDDHeight );
-if ( nFlags & PosSizeFlags::Width )
+if (eFlags & PosSizeFlags::Width)
 aPrefSz.setWidth( nWidth );
 m_pFloatWin->SetPrefSize(aPrefSz);
 
@@ -552

Re: Add Instrumentation to the LibreOffice JVM

2025-02-03 Thread Pierre Vacher
Hi Noel,

Great I'll try to do it...

I found the configuration file:
libreoffice/officecfg/registry/schema/org/openoffice/Office/Java.xcs
But I can't find the model to modify (ie: the xcu file).

And I think I found where the JVM is loaded:
/home/prrvchr/github/libreoffice/libreoffice/stoc/source/javaloader/javaloader.cxx
However I don't really understand what is done. I see that the
configuration is read (ie: line 315) but I don't see where it is applied...

We also have to add a Java Jar archive in the folder:
program/classes
I suppose. Do you have a preference for the name of the archive and the
name of the Java package?

Thank you for your help.

Pierre.

Le lun. 3 févr. 2025 à 06:55, Noel Grandin  a écrit :

> Sounds quite reasonable to add this to the core product behind an option.
>
> On Sat, 01 Feb 2025 at 21:18, Pierre Vacher  wrote:
>
>> Hi all,
>>
>> I would like to add the Java Instrumentation
>> 
>> API to the extensions running under LibreOffice and written in Java.
>>
>> After some testing, I manage to load the Instrumentation
>> 
>> agent at JVM startup, having taken care to add the necessary startup option
>> (ie:
>> -javaagent:/home/prrvchr/github/jdbcDriverOOo/source/UnoAgent/dist/UnoAgent.jar)
>> and put this archive in the classpath (ie: Tools -> Options -> LibreOffice
>> -> Advanced -> Java Options).
>>
>> UnoAgent.jar is an archive containing only one class which itself
>> contains only two methods and this gives access to code injection and the
>> possibility of modifying the search path of the system bootloader. This
>> currently allows me to be able to deploy an SPI service type like
>> System.LoggerFinder,  and to be able to be the provider for the
>> System.Logger
>> 
>> interface for all running applications on the JVM.
>>
>> If we want to make this feature accessible to any extension written in
>> Java, it is necessary to make three modifications: - Add the UnoAgent.jar
>> archive to the SDK. - Add an entry in the LibreOffice configuration (ie:
>> xcu file) to enable or disable instrumentation. - Load the JVM with the
>> parameters needed for instrumentation depending on the configuration.
>>
>> Please let me know what you think about this.
>>
>> Pierre
>>
>>


Re: Add Instrumentation to the LibreOffice JVM

2025-02-03 Thread Noel Grandin
On Mon, 3 Feb 2025 at 22:16, Pierre Vacher  wrote:

> And I think I found where the JVM is loaded:
>
> /home/prrvchr/github/libreoffice/libreoffice/stoc/source/javaloader/javaloader.cxx
> However I don't really understand what is done. I see that the
> configuration is read (ie: line 315) but I don't see where it is applied...
>
>
The JavaVM is started by JavaVirtualMachine in stoc.cxx


core.git: sc/source

2025-02-03 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/ui/view/dbfunc.cxx |6 +-
 1 file changed, 1 insertion(+), 5 deletions(-)

New commits:
commit 85f3a41d6909b4d8adb10012289e64dea88d12d1
Author: Samuel Mehrbrodt 
AuthorDate: Mon Feb 3 15:10:30 2025 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 3 20:04:34 2025 +0100

tdf#145056 Delete autofilter settings when turning off autofilter

Otherwise when turning autofilter back on, colors will still be selected
in the dropdown (while the filter is not active)

Change-Id: I2bfeed08b187b3923e001d3b71658d5dc47556f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181053
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Jenkins

diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index 875531b37924..b330c89e662c 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -310,6 +310,7 @@ void ScDBFunc::ToggleAutoFilter()
 {
 nFlag = rDoc.GetAttr( nCol, nRow, nTab, ATTR_MERGE_FLAG 
)->GetValue();
 rDoc.ApplyAttr( nCol, nRow, nTab, ScMergeFlagAttr( nFlag & 
~ScMF::Auto ) );
+aParam.RemoveAllEntriesByField(nCol);
 }
 
 // use a list action for the AutoFilter buttons (ScUndoAutoFilter) and 
the filter operation
@@ -324,11 +325,6 @@ void ScDBFunc::ToggleAutoFilter()
 
 pDBData->SetAutoFilter(false);
 
-//  remove filter (incl. Paint / Undo)
-
-SCSIZE nEC = aParam.GetEntryCount();
-for (SCSIZE i=0; i

core.git: Branch 'distro/cib/libreoffice-6-4' - sw/inc sw/source

2025-02-03 Thread Oliver Specht (via logerrit)
 sw/inc/viewopt.hxx|2 +-
 sw/source/core/text/inftxt.cxx|   36 +++-
 sw/source/uibase/uiview/view.cxx  |4 
 sw/source/uibase/uiview/view0.cxx |2 +-
 4 files changed, 41 insertions(+), 3 deletions(-)

New commits:
commit cc0595e5598dd9bc0dac3f8815a2dabddf932b76
Author: Oliver Specht 
AuthorDate: Thu Apr 18 11:24:50 2024 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 23:17:17 2025 +0100

tdf#146553 Enable additonal functions in editable section while in r/o mode

Insert/Edit table, insert lists, insert AutoText
automatic spell checking

Change-Id: Iccef3965316dc6079ea56a0283023c5a658512cc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165031
Tested-by: Jenkins
Tested-by: Gabor Kelemen 
Reviewed-by: Thorsten Behrens 
(cherry picked from commit 40436e1dfdad42690cc0cfc4781c38e5419e0dc5)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181001
Tested-by: allotropia jenkins 

diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index 3a2148c7911c..a78cfb0aada8 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -343,7 +343,7 @@ public:
 { SetCoreOption(b, ViewOptFlags1::GridVisible); }
 
 bool IsOnlineSpell() const
-{ return !m_bReadonly && (m_nCoreOptions & 
ViewOptFlags1::OnlineSpell); }
+{ return bool(m_nCoreOptions & ViewOptFlags1::OnlineSpell); }
 void SetOnlineSpell( bool b );
 
 bool IsViewMetaChars() const
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index c79567a33c7b..fd7093e7b8d7 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -49,14 +49,17 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 #include "inftxt.hxx"
 #include 
 #include 
+#include 
 #include "porftn.hxx"
 #include "porrst.hxx"
 #include "itratr.hxx"
@@ -561,6 +564,30 @@ static bool lcl_IsDarkBackground( const SwTextPaintInfo& 
rInf )
 return pCol->IsDark();
 }
 
+static bool lcl_IsFrameReadonly(SwTextFrame* pFrame)
+{
+const SwFlyFrame* pFly;
+const SwSection* pSection;
+
+if( pFrame && pFrame->IsInFly() &&
+(pFly = 
pFrame->FindFlyFrame())->GetFormat()->GetEditInReadonly().GetValue() &&
+pFly->Lower() &&
+!pFly->Lower()->IsNoTextFrame() )
+{
+return false;
+}
+// edit in readonly sections
+else if ( pFrame && pFrame->IsInSct() &&
+nullptr != ( pSection = pFrame->FindSctFrame()->GetSection() ) &&
+pSection->IsEditInReadonlyFlag() )
+{
+return false;
+}
+
+return true;
+}
+
+
 void SwTextPaintInfo::DrawText_( const OUString &rText, const SwLinePortion 
&rPor,
 TextFrameIndex const nStart, TextFrameIndex 
const nLength,
 const bool bKern, const bool bWrong,
@@ -617,7 +644,14 @@ void SwTextPaintInfo::DrawText_( const OUString &rText, 
const SwLinePortion &rPo
 bool bCfgIsAutoGrammar = false;
 SvtLinguConfig().GetProperty( UPN_IS_GRAMMAR_AUTO ) >>= bCfgIsAutoGrammar;
 const bool bBullet = OnWin() && GetOpt().IsBlank() && IsNoSymbol();
-const bool bTmpWrong = bWrong && OnWin() && GetOpt().IsOnlineSpell();
+bool bTmpWrong = bWrong && OnWin() && GetOpt().IsOnlineSpell();
+SfxObjectShell* pObjShell = m_pFrame->GetDoc().GetDocShell();
+if (bTmpWrong && pObjShell)
+{
+if (pObjShell->IsReadOnly() && lcl_IsFrameReadonly(m_pFrame))
+bTmpWrong = false;
+}
+
 const bool bTmpGrammarCheck = bGrammarCheck && OnWin() && 
bCfgIsAutoGrammar && GetOpt().IsOnlineSpell();
 const bool bTmpSmart = bSmartTag && OnWin() && !GetOpt().IsPagePreview() 
&& SwSmartTagMgr::Get().IsSmartTagsEnabled();
 
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index aee84c09aa3b..8703285ae7f3 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -438,6 +438,7 @@ void SwView::SelectShell()
 rDispatcher.Push( *m_pShell );
 }
 m_pShell = new SwTextShell(*this);
+
 rDispatcher.Push( *m_pShell );
 if ( m_nSelectionType & SelectionType::Table )
 {
@@ -637,6 +638,9 @@ void SwView::CheckReadonlyState()
 SID_ATTR_PARA_MODEL,SID_PARA_DLG,
 FN_SELECT_PARA, SID_DEC_INDENT,
 SID_INC_INDENT,
+FN_INSERT_TABLE,FN_FORMAT_TABLE_DLG,
FN_EXPAND_GLOSSARY,
+FN_NUM_BULLET_ON,   FN_NUM_NUMBERING_ON,
FN_SVX_SET_NUMBER,
+FN_SVX_SET_BULLET,  FN_SVX_SET_OUTLINE, 
SID_AUTOSPELL_CHECK,
 FN_SPELL_GRAMMAR_DIALOG
 };
 static bool bFirst = true;
diff --git a/sw/source/uibase/uiview/view0.cxx 
b/sw/source/uibase/uiview/view0.cxx
index 79783e138496..a5a4f6306c94 100644
--- 

core.git: sw/qa

2025-02-03 Thread László Németh (via logerrit)
 sw/qa/extras/layout/data/tdf164932.fodt |   97 
 sw/qa/extras/layout/layout5.cxx |   10 +++
 2 files changed, 107 insertions(+)

New commits:
commit d60ea6596f7a394290f9a82ac5324e2e8307f5f9
Author: László Németh 
AuthorDate: Mon Feb 3 14:04:32 2025 +0100
Commit: László Németh 
CommitDate: Tue Feb 4 00:48:02 2025 +0100

tdf#164932 sw inline heading: unit test for fixed text frame AutoSize

Follow-up to commit b4d41f6b0deb0299cd01173c150c5b94568c9a21
"tdf#164932 sw inline heading: fix frame AutoSize at list offset".

Change-Id: I62521d3672695b35d592b9671c052d091d403b04
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181062
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/qa/extras/layout/data/tdf164932.fodt 
b/sw/qa/extras/layout/data/tdf164932.fodt
new file mode 100644
index ..7a2347d25613
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf164932.fodt
@@ -0,0 +1,97 @@
+
+
+http://www.w3.org/TR/css3-text/"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:office="urn:oasis:names:tc:opendocument:xmlns:office:1.0" 
xmlns:ooo="http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:ooow="http://openoffice.org/2004/writer"; 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:drawooo="http://openoffice.org/2010/draw"; 
xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:dc="http://purl.org/dc/elements/1.1/"; xmlns:c
 alcext="urn:org:documentfoundation:names:experimental:calc:xmlns:calcext:1.0" 
xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" 
xmlns:text="urn:oasis:names:tc:opendocument:xmlns:text:1.0" 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:tableooo="http://openoffice.org/2009/table"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" 
xmlns:rpt="http://openoffice.org/2005/report"; 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" 
xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" 
xmlns:officeooo="http://openoffice.org/2009/office"; 
xmlns:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:field="urn:openoffice:names:experimental:ooo-ms-interop:xmlns:field:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:
 meta:1.0" 
xmlns:loext="urn:org:documentfoundation:names:experimental:office:xmlns:loext:1.0"
 office:version="1.4" office:mimetype="application/vnd.oasis.opendocument.text">
+ 
+  
+  
+ 
+ 
+  
+   
+   
+
+   
+   
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+  
+  
+  
+   
+   
+  
+  
+   
+  
+  
+   
+   
+  
+  
+  
+   
+  
+  
+   
+
+ 
+
+   
+   
+
+ 
+
+   
+  
+  
+  
+  
+ 
+ 
+  
+  
+   
+  
+  
+   
+  
+  
+   
+
+   
+   
+   
+  
+  
+   
+  
+ 
+ 
+  
+ 
+ 
+  
+   
+ 
+  
+   
+
+ 
+  Defined Terms
+ 
+
+   
+  
+ 
+
+  
+ 
+
diff --git a/sw/qa/extras/layout/layout5.cxx b/sw/qa/extras/layout/layout5.cxx
index 1ad056f4b2a7..64d7e33a8b23 100644
--- a/sw/qa/extras/layout/layout5.cxx
+++ b/sw/qa/extras/layout/layout5.cxx
@@ -1148,6 +1148,16 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf124261)
 #endif
 }
 
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf164932)
+{
+// text frame with AutoText setting must use the left offset
+// of the list style of its text content
+createSwDoc("tdf164932.fodt");
+auto pDump = parseLayoutDump();
+// This was 4 (three lines in the text frame anchored as character in the 
first line
+assertXPath(pDump, "//SwLineLayout", 2);
+}
+
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter5, testTdf135991)
 {
 createSwDoc("tdf135991.odt");


core.git: sw/source

2025-02-03 Thread Oliver Specht (via logerrit)
 sw/source/core/doc/docfmt.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 527f81f2717812a10f88fb69edeaf062fd8589a1
Author: Oliver Specht 
AuthorDate: Thu Dec 5 09:51:03 2024 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 23:19:10 2025 +0100

fix regression from 075560420a7aa238182e2d80dfe1c5fbaad3edbd

Applying a paragraph style with an attached list style does now
overwrites a list style at a paragraph that had a list(style) applied

Change-Id: I0dc124dc2db167370dab8416a6cc97d563bcc03c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177842
Reviewed-by: Thorsten Behrens 
Tested-by: Jenkins

diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index 8a061ad33b55..34f0b7b34f2c 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -1025,8 +1025,7 @@ static bool lcl_SetTextFormatColl( SwNode* pNode, void* 
pArgs )
 SwNumRule* pNumRuleAtParagraph(rTNd.GetNumRule());
 if ( pNumRuleAtParagraph )
 {
-const SwNumRuleItem& rNumRuleItemAtParagraphStyle =
-rTNd.GetTextColl()->GetNumRule();
+const SwNumRuleItem& rNumRuleItemAtParagraphStyle = 
pFormat->GetNumRule();
 if ( rNumRuleItemAtParagraphStyle.GetValue() ==
 pNumRuleAtParagraph->GetName() )
 {


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

2025-02-03 Thread Andras Timar (via logerrit)
 sc/qa/unit/data/functions/date_time/fods/weeknum.fods |   10 +-
 sc/source/core/tool/interpr2.cxx  |   15 ++-
 2 files changed, 19 insertions(+), 6 deletions(-)

New commits:
commit 59b5c242816d6b0f8f72f98556b56c2a5ac1b2be
Author: Andras Timar 
AuthorDate: Mon Feb 3 14:55:54 2025 +0100
Commit: Mike Kaganski 
CommitDate: Tue Feb 4 05:41:13 2025 +0100

tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function

and treat it like if it was the the default "1".

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

diff --git a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods 
b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
index a4e1c08ebbd6..2f84286ae929 100644
--- a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
+++ b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
@@ -769,13 +769,13 @@
  
 
 
- 
-  Err:502
+ 
+  31
  
- 
-  ERR
+ 
+  31
  
- 
+ 
   PRAVDA
  
  
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 61f88d638a00..e29fa5e4829e 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -253,7 +253,20 @@ void ScInterpreter::ScGetWeekOfYear()
 if ( !MustHaveParamCount( nParamCount, 1, 2 ) )
 return;
 
-sal_Int16 nFlag = ( nParamCount == 1 ) ? 1 : GetInt16();
+sal_Int16 nFlag;
+if (nParamCount == 1)
+{
+nFlag = 1;
+}
+else if (GetRawStackType() == svMissing)
+{
+nFlag = 1;
+Pop();
+}
+else
+{
+nFlag = GetInt16();
+}
 
 Date aDate = pFormatter->GetNullDate();
 aDate.AddDays( GetFloor32());


core.git: Branch 'distro/cib/libreoffice-6-4' - desktop/source

2025-02-03 Thread Caolán McNamara (via logerrit)
 desktop/source/app/cmdlineargs.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 831bf77effea32407f0c7b517e716431ff00a2ea
Author: Caolán McNamara 
AuthorDate: Thu Jan 30 20:37:38 2025 +
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 23:22:50 2025 +0100

Filter out more unwanted command URIs

Change-Id: I24c95d73b4fee89bdf044d5dd6efc9cd89627c54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180970
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-by: Caolán McNamara 

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 846714158e25..a068f1451257 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -171,7 +171,7 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, 
CommandLineEvent cur
 if (nURIlen < 0)
 nURIlen = rest2.getLength();
 auto const uri = rest2.copy(0, nURIlen);
-if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+if (INetURLObject(uri).IsExoticProtocol()) {
 // Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
 // as the "Open" machinery does not know about those command URI 
schemes):
 curEvt = CommandLineEvent::Open;


core.git: sc/qa sc/source

2025-02-03 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/unique.fods |   51 +
 sc/source/core/tool/interpr1.cxx   |6 +-
 2 files changed, 54 insertions(+), 3 deletions(-)

New commits:
commit 11e62f3a0566464186cef88f6133dbf88fe60a08
Author: Xisco Fauli 
AuthorDate: Mon Feb 3 20:56:35 2025 +0100
Commit: Xisco Fauli 
CommitDate: Tue Feb 4 01:53:56 2025 +0100

related: tdf#162601 UNIQUE function is case-insensitive also for non ASCII

Kudos to M. Kaganski for flagging it

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

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods
index 662338de546f..ac9674441351 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods
@@ -5104,6 +5104,57 @@
  
  
 
+
+ 
+  Á
+ 
+ 
+ 
+  Á
+ 
+ 
+ 
+  TRUE
+ 
+ 
+  
{=UNIQUE({"Á";"á";"é";"É"})}
+ 
+ 
+
+
+ 
+  é
+ 
+ 
+ 
+  é
+ 
+ 
+ 
+  TRUE
+ 
+ 
+  
{=UNIQUE({"Á";"á";"é";"É"})}
+ 
+ 
+
+
+ 
+  c
+ 
+ 
+ 
+  c
+ 
+ 
+ 
+  TRUE
+ 
+ 
+  
{=UNIQUE({"Á";"á";"é";"É";"c"};
 ; 1)}
+ 
+ 
+
 
  
  
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index fcc3e9e1ba58..487e495b6d48 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9393,7 +9393,7 @@ void ScInterpreter::ScUnique()
 aStr += aCellStr + u"\x0001";
 }
 
-if (aStrSet.insert(aStr.toAsciiLowerCase()).second) // unique if 
inserted
+if (aStrSet.insert(ScGlobal::getCharClass().lowercase(aStr)).second) 
// unique if inserted
 {
 aResPos.emplace_back(std::make_pair(i, aStr));
 }
@@ -9402,9 +9402,9 @@ void ScInterpreter::ScUnique()
 if (bExactly_once)
 {
 auto it = std::find_if(aResPos.begin(), aResPos.end(),
-[&aStr](const std::pair& aRes)
+[str = ScGlobal::getCharClass().lowercase(aStr)](const 
std::pair& aRes)
 {
-return 
aRes.second.toAsciiLowerCase().equals(aStr.toAsciiLowerCase());
+return 
ScGlobal::getCharClass().lowercase(aRes.second).equals(str);
 }
 );
 if (it != aResPos.end())


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

2025-02-03 Thread Michael Weghorn (via logerrit)
 include/sfx2/module.hxx   |2 +-
 sc/inc/scmod.hxx  |2 +-
 sc/source/ui/app/scmod.cxx|2 +-
 sd/inc/sdmod.hxx  |2 +-
 sd/source/ui/app/sdmod2.cxx   |2 +-
 sfx2/source/dialog/StyleList.cxx  |   24 +++-
 sfx2/source/dialog/mgetempl.cxx   |7 +++
 sfx2/source/dialog/mgetempl.hxx   |3 +--
 sfx2/source/dialog/templdlg.cxx   |1 +
 sfx2/source/inc/StyleList.hxx |2 +-
 sw/inc/swmodule.hxx   |2 +-
 sw/source/ui/chrdlg/swuiccoll.cxx |6 +++---
 sw/source/uibase/app/swmodule.cxx |2 +-
 13 files changed, 27 insertions(+), 30 deletions(-)

New commits:
commit 6f441eba260db39df386c46c5ee7492e79e25c8c
Author: Michael Weghorn 
AuthorDate: Mon Feb 3 08:41:49 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:33:14 2025 +0100

tdf#165002 sidebar a11y: Set a11y names for styles tool buttons

For the toolbar buttons to switch between the different
styles categories ("Paragraph Styles", "Character Styles",...)
in the "Styles" sidebar deck, set the tooltip text also as
the accessible name.

This makes the Orca screen reader with announce them
(e.g. "Paragraph styles, toggle button, pressed") when using
the gtk3 VCL plugin instead of just saying "toggle button", which
doesn't give the screen reader any clue what those buttons are for.

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

diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index b26123129f88..20515f2d1f0d 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -857,6 +857,7 @@ void SfxTemplateDialog_Impl::InsertFamilyItem(sal_uInt16 
nId, const SfxStyleFami
 m_xActionTbL->set_item_visible(sId, true);
 m_xActionTbL->set_item_icon_name(sId, rItem.GetImage());
 m_xActionTbL->set_item_tooltip_text(sId, rItem.GetText());
+m_xActionTbL->set_item_accessible_name(sId, rItem.GetText());
 m_xActionTbL->set_item_help_id(sId, sHelpId);
 ++m_nActionTbLVisible;
 }
commit 700194c65544f130c92819425933d43528ba1598
Author: Michael Weghorn 
AuthorDate: Sun Feb 2 23:46:11 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:33:07 2025 +0100

No longer use std::optional for SfxModule::CreateStyleFamilies

Just return an empty std::vector instead of a std::optional that
contains no value in the default implementation, and adjust the
type of the local variables and class members that contain
the result and their use accordingly.

Change-Id: I4e25b3cbd96c6eb9f06b0ae44b36675bb11ab38a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181024
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
Reviewed-by: Noel Grandin 

diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 38f136ec6def..1d8cc18c405d 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -78,7 +78,7 @@ public:
const SfxItemSet& rSet );
 virtual voidInvalidate(sal_uInt16 nId = 0) override;
 
-virtual std::optional CreateStyleFamilies() { return {}; 
}
+virtual SfxStyleFamilies CreateStyleFamilies() { return {}; }
 
 static SfxModule*   GetActiveModule( SfxViewFrame* pFrame=nullptr 
);
 static FieldUnitGetCurrentFieldUnit();
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index fd19d67df5d9..0cf597af2103 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -229,7 +229,7 @@ public:
 virtual std::optional CreateItemSet( sal_uInt16 nId ) override;
 virtual void ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet 
) override;
 virtual std::unique_ptr CreateTabPage( sal_uInt16 nId, 
weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& 
rSet ) override;
-virtual std::optional CreateStyleFamilies() override;
+virtual SfxStyleFamilies CreateStyleFamilies() override;
 
 voidSetInSharedDocLoading( bool bNew )  { 
m_bIsInSharedDocLoading = bNew; }
 boolIsInSharedDocLoading() const{ return 
m_bIsInSharedDocLoading; }
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 84238486fa6b..26e40a2d3d9a 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -2344,7 +2344,7 @@ bool ScModule::HasThesaurusLanguage( LanguageType nLang )
 return bHasLang;
 }
 
-std::optional ScModule::CreateStyleFamilies()
+SfxStyleFamilies ScModule::CreateStyleFamilies()
 {
 SfxStyleFamilies aStyleFamilies;
 std::locale resLocale = ScModule::get()->GetResLocale();
diff --git a/sd/inc/sdmod.hxx b/sd/inc/sdmod.hxx
index 156a2ec09cec..074cabcfc0b6 100644
--- a/sd/inc/sdmod.hxx
+++ b/sd/inc/sdmod.hxx
@@ -119,7 +119

core.git: 2 commits - sfx2/uiconfig vcl/unx

2025-02-03 Thread Michael Weghorn (via logerrit)
 sfx2/uiconfig/ui/templatepanel.ui |   16 
 vcl/unx/gtk3/gtkinst.cxx  |4 ++--
 2 files changed, 18 insertions(+), 2 deletions(-)

New commits:
commit a90d3a8f09f8bea3630020eda42dad6fccac18e3
Author: Michael Weghorn 
AuthorDate: Mon Feb 3 17:30:30 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:34:03 2025 +0100

gtk4 a11y: Terminate gtk_accessible_update_property params

As the documentation [1] describes:

> A list of property and value pairs, terminated by -1.

Without explicitly terminating the list by -1, gtk4 was
seen crashing with a segfault when started after

Change-Id: I8c30b6b67366d1839acb725bc4af012c276a5ee2
Author: Michael Weghorn 
Date:   Mon Feb 3 08:41:49 2025 +0100

tdf#165002 sidebar a11y: Set a11y names for styles tool buttons

that triggered this preexisting issue.

[1] https://docs.gtk.org/gtk4/method.Accessible.update_property.html

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index 24d923728cd5..5001f71d11d3 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -12536,7 +12536,7 @@ public:
 atk_object_set_name(pAccessible, OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr());
 #else
 gtk_accessible_update_property(GTK_ACCESSIBLE(pItem), 
GTK_ACCESSIBLE_PROPERTY_LABEL,
-   OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr());
+   OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr(), -1);
 #endif
 }
 
@@ -12549,7 +12549,7 @@ public:
 atk_object_set_name(pAccessible, OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr());
 #else
 gtk_accessible_update_property(GTK_ACCESSIBLE(pItem), 
GTK_ACCESSIBLE_PROPERTY_LABEL,
-   OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr());
+   OUStringToOString(rName, 
RTL_TEXTENCODING_UTF8).getStr(), -1);
 #endif
 }
 
commit 8b221ecd50d2bd7ce84874333c06068e45c774cd
Author: Michael Weghorn 
AuthorDate: Mon Feb 3 13:58:28 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:33:51 2025 +0100

tdf#165002 sidebar a11y: Set a11y names for "Styles" toolbar items in .ui

Similar to how

Change-Id: I8c30b6b67366d1839acb725bc4af012c276a5ee2
Author: Michael Weghorn 
Date:   Mon Feb 3 08:41:49 2025 +0100

tdf#165002 sidebar a11y: Set a11y names for styles tool buttons

For the toolbar buttons to switch between the different
styles categories ("Paragraph Styles", "Character Styles",...)
in the "Styles" sidebar deck, set the tooltip text also as
the accessible name.

This makes the Orca screen reader with announce them
(e.g. "Paragraph styles, toggle button, pressed") when using
the gtk3 VCL plugin instead of just saying "toggle button", which
doesn't give the screen reader any clue what those buttons are for.

did for those toolbar buttons whose tooltips etc. are set in
C++ code, also set a11y names for those that are handled in
the .ui file and set the text used for the tooltip also
as the accessible name, so Orca can announce those as well.
This makes Orca also announce the items in the right-hand
side toolbar of the "Styles" sidebar deck when using the
gtk3 VCL plugin.

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

diff --git a/sfx2/uiconfig/ui/templatepanel.ui 
b/sfx2/uiconfig/ui/templatepanel.ui
index 60b8b574ca04..541cf8bc5f91 100644
--- a/sfx2/uiconfig/ui/templatepanel.ui
+++ b/sfx2/uiconfig/ui/templatepanel.ui
@@ -133,6 +133,7 @@
 res/sc05554.png
 
   
+Fill Format 
Mode
 Applies the 
selected style to the object or text that you select in the document. 

   
 
@@ -148,6 +149,11 @@
 New Style from 
Selection
 True
 res/sc0.png
+
+  
+New Style from 
Selection
+  
+
   
   
 False
@@ -160,6 +166,11 @@
 Styles actions
 True
 res/sc0.png
+
+  
+Styles 
actions
+

core.git: 2 commits - sfx2/source

2025-02-03 Thread Michael Weghorn (via logerrit)
 sfx2/source/sidebar/TabBar.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit d5617cd2a26c023eaf9e6b4df379a07aab63d0be
Author: Michael Weghorn 
AuthorDate: Mon Feb 3 19:29:57 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:34:24 2025 +0100

sidebar: Have sidebar deck tooltip only set on its button

Drop the tooltip from the toolbar that contains the
button.
This is already set for the button as well since

commit 9fdc7384eff0e9627de2d9c2b59a7716f9e8af25
Date:   Tue Dec 15 14:33:32 2020 +

tdf#138938 put the tooltip on the toolbar item instead of the 
toolbar

, so setting it on the toolbar in addition seems unnecessary.
(The tooltip showed fine in a quick test with both, gtk3
and gen as expected.)

commit bb1d48498c9fdedf8e78344765f6c6eda6f4707c
Date:   Wed May 18 22:22:06 2022 -0800

tdf#84502 related: Show keyboard shortcut in sidebar tab bar tab 
button

had added the shortcut in the tooltip text set for the button,
but not the toolbar, but having these two different variants
doesn't look intentional to me.

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

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 1ae9799dcac0..1506c1b7cf21 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -230,7 +230,6 @@ bool TabBar::EventNotify(NotifyEvent& rEvent)
 void TabBar::CreateTabItem(weld::Toolbar& rItem, const DeckDescriptor& 
rDeckDescriptor)
 {
 rItem.set_accessible_description(rDeckDescriptor.msHelpText);
-rItem.set_tooltip_text(rDeckDescriptor.msHelpText);
 const OUString sCommand = ".uno:SidebarDeck." + rDeckDescriptor.msId;
 OUString sShortcut = 
vcl::CommandInfoProvider::GetCommandShortcut(sCommand, mxFrame);
 if (!sShortcut.isEmpty())
commit bd9666444d0b914d4102a4ce9446148d7e258a0c
Author: Michael Weghorn 
AuthorDate: Mon Feb 3 19:23:24 2025 +0100
Commit: Michael Weghorn 
CommitDate: Tue Feb 4 00:34:16 2025 +0100

tdf#165002 sidebar a11y: Set a11y name on sidebar deck buttons

For sidebar deck tool buttons, set  the accessible name
for the actual button, not the toolbar that contains it.

That makes the Orca screen reader announce the name
when the button receives focus instead of just announcing
that a button received focus, leaving it unclear for the
user what this button is about.

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

diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx
index 8993b10fd92d..1ae9799dcac0 100644
--- a/sfx2/source/sidebar/TabBar.cxx
+++ b/sfx2/source/sidebar/TabBar.cxx
@@ -229,13 +229,13 @@ bool TabBar::EventNotify(NotifyEvent& rEvent)
 
 void TabBar::CreateTabItem(weld::Toolbar& rItem, const DeckDescriptor& 
rDeckDescriptor)
 {
-rItem.set_accessible_name(rDeckDescriptor.msTitle);
 rItem.set_accessible_description(rDeckDescriptor.msHelpText);
 rItem.set_tooltip_text(rDeckDescriptor.msHelpText);
 const OUString sCommand = ".uno:SidebarDeck." + rDeckDescriptor.msId;
 OUString sShortcut = 
vcl::CommandInfoProvider::GetCommandShortcut(sCommand, mxFrame);
 if (!sShortcut.isEmpty())
 sShortcut = u" (" + sShortcut + u")";
+rItem.set_item_accessible_name(u"toggle"_ustr, rDeckDescriptor.msTitle);
 rItem.set_item_tooltip_text(u"toggle"_ustr, rDeckDescriptor.msHelpText + 
sShortcut);
 }
 


core.git: sc/source

2025-02-03 Thread Bogdan Buzea (via logerrit)
 sc/source/core/opencl/op_math.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9179d008ab6b0f7996225b16723e5e7cf96bd5be
Author: Bogdan Buzea 
AuthorDate: Wed Jan 1 16:51:40 2025 +0100
Commit: Hossein 
CommitDate: Mon Feb 3 21:43:38 2025 +0100

Fix code typo: multiple ; in opencl/

Change-Id: I03a1bfd03de7c3ff9b28456c2a6c8074a5ebd20c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179592
Reviewed-by: Hossein   
Tested-by: Jenkins

diff --git a/sc/source/core/opencl/op_math.cxx 
b/sc/source/core/opencl/op_math.cxx
index d0e033f8843b..75475bc5f054 100644
--- a/sc/source/core/opencl/op_math.cxx
+++ b/sc/source/core/opencl/op_math.cxx
@@ -258,7 +258,7 @@ void OpSqrtPi::GenerateCode( outputstream& ss ) const
 
 void OpDeg::GenerateCode( outputstream& ss ) const
 {
-ss << "return arg0 / M_PI * 180;;
";
+ss << "return arg0 / M_PI * 180;
";
 }
 
 void OpFact::GenerateCode( outputstream& ss ) const
@@ -571,7 +571,7 @@ void OpLog::GenSlidingWindowFunction(outputstream &ss,
 ss << "int gid0 = get_global_id(0);
";
 GenerateArg( "arg0", 0, vSubArguments, ss );
 GenerateArgWithDefault( "arg1", 1, 10, vSubArguments, ss );
-ss << "return log10(arg0)/log10(arg1);;
";
+ss << "return log10(arg0)/log10(arg1);
";
 ss << "}";
 }
 


core.git: Branch 'feature/cib_contract49d' - sw/inc sw/Library_swui.mk sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk

2025-02-03 Thread Oliver Specht (via logerrit)
 sw/Library_swui.mk|1 
 sw/UIConfig_swriter.mk|1 
 sw/inc/cmdid.h|2 
 sw/inc/swabstdlg.hxx  |   13 ++
 sw/sdi/_textsh.sdi|5 
 sw/sdi/swriter.sdi|   18 +++
 sw/source/ui/dialog/swdlgfact.cxx |   17 +++
 sw/source/ui/dialog/swdlgfact.hxx |   15 ++
 sw/source/ui/utlui/copyfielddlg.cxx   |   58 +++
 sw/source/uibase/docvw/romenu.cxx |6 -
 sw/source/uibase/docvw/romenu.hxx |1 
 sw/source/uibase/inc/copyfielddlg.hxx |   37 +++
 sw/source/uibase/shells/textfld.cxx   |   32 +-
 sw/uiconfig/swriter/ui/copyfielddialog.ui |  157 ++
 sw/uiconfig/swriter/ui/readonlymenu.ui|   14 ++
 15 files changed, 375 insertions(+), 2 deletions(-)

New commits:
commit d36dc8169e0d32d42c6f7cf1a84d161310f3c4e7
Author: Oliver Specht 
AuthorDate: Wed Jan 8 14:20:43 2025 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 20:19:40 2025 +0100

Add dialog to show content of fields in readonly documents

Change-Id: I0036e8c02b57dab91361213489c5a6189149b553
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180351
Reviewed-by: Thorsten Behrens 
Tested-by: allotropia jenkins 

diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk
index 2c6d8512fe44..cf025735337e 100644
--- a/sw/Library_swui.mk
+++ b/sw/Library_swui.mk
@@ -168,6 +168,7 @@ $(eval $(call gb_Library_add_exception_objects,swui,\
 sw/source/ui/table/tabledlg \
 sw/source/ui/table/tautofmt \
 sw/source/ui/utlui/swrenamexnameddlg \
+sw/source/ui/utlui/copyfielddlg \
 ))
 
 ifneq (,$(filter DBCONNECTIVITY,$(BUILD_TYPE)))
diff --git a/sw/UIConfig_swriter.mk b/sw/UIConfig_swriter.mk
index 27b7248d74e5..21fe88323a4a 100644
--- a/sw/UIConfig_swriter.mk
+++ b/sw/UIConfig_swriter.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/swriter,\
sw/uiconfig/swriter/ui/contentcontroldropdown \
sw/uiconfig/swriter/ui/contentcontrollistitemdlg \
sw/uiconfig/swriter/ui/converttexttable \
+   sw/uiconfig/swriter/ui/copyfielddialog \
sw/uiconfig/swriter/ui/createaddresslist \
sw/uiconfig/swriter/ui/createauthorentry \
sw/uiconfig/swriter/ui/createautomarkdialog \
diff --git a/sw/inc/cmdid.h b/sw/inc/cmdid.h
index 5fc521d3eddf..6f5ea775dfa0 100644
--- a/sw/inc/cmdid.h
+++ b/sw/inc/cmdid.h
@@ -152,6 +152,8 @@ class SwUINumRuleItem;
 #define FN_REDLINE_ACCEPT_TONEXT (FN_EDIT2 + 45)/* Redlining Accept 
and jump to next*/
 #define FN_REDLINE_REJECT_TONEXT (FN_EDIT2 + 46)/* Redlining Reject 
and jump to next*/
 
+#define FN_COPY_FIELD(FN_EDIT2 + 48)/* show field content 
in readonly documents to copy content*/
+
 // Region: View
 #define FN_DRAW_WRAP_DLGTypedWhichId(FN_VIEW + 3)   /* 
Draw wrapping dlg */
 #define FN_RULER(FN_VIEW + 11)  /* Horizontal ruler */
diff --git a/sw/inc/swabstdlg.hxx b/sw/inc/swabstdlg.hxx
index 1d205f18624f..2426e5f25e16 100644
--- a/sw/inc/swabstdlg.hxx
+++ b/sw/inc/swabstdlg.hxx
@@ -367,6 +367,16 @@ public:
  css::uno::Reference< css::container::XNameAccess > & xThird ) = 0;
 };
 
+/**
+ * Interface for copy field value dialog in read only documents. It's 
implemented by
+ * AbstractCopyFieldDlg_Impl
+ */
+class AbstractCopyFieldDlg : public VclAbstractDialog
+{
+protected:
+virtual ~AbstractCopyFieldDlg() override = default;
+};
+
 /**
  * Interface for e.g. the form -> content control -> properties -> add dialog. 
It's implemented by
  * AbstractSwContentControlListItemDlg_Impl, but SwContentControlDlg only 
knows about this interface
@@ -548,6 +558,9 @@ public:
 virtual VclPtr 
CreateSwRenameXNamedDlg(weld::Widget* pParent,
 css::uno::Reference< css::container::XNamed > & xNamed,
 css::uno::Reference< css::container::XNameAccess > & xNameAccess) = 0;
+
+virtual VclPtr CreateCopyFieldDlg(weld::Widget* 
pParent, const rtl::OUString& rFieldValue ) = 0;
+
 virtual VclPtr 
CreateSwModalRedlineAcceptDlg(weld::Window *pParent) = 0;
 virtual VclPtr 
CreateSwPageNumberDlg(weld::Window* pParent) = 0;
 
diff --git a/sw/sdi/_textsh.sdi b/sw/sdi/_textsh.sdi
index 810932876bee..9c30229795a4 100644
--- a/sw/sdi/_textsh.sdi
+++ b/sw/sdi/_textsh.sdi
@@ -1023,6 +1023,11 @@ interface BaseText
 StateMethod = StateField ;
 DisableFlags="SfxDisableFlags::SwOnProtectedCursor";
 ]
+FN_COPY_FIELD // status()
+[
+ExecMethod = ExecField;
+StateMethod = StateField;
+]
 FN_UPDATE_SEL_FIELD
 [
 ExecMethod = ExecField ;
diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi
index deee2b2ee0ae..d6e0e703fb8b 100644
--- a/sw/sdi/swriter.sdi
+++ b/sw/sdi/swriter.sdi
@@ -8740,3 +8740,21 @@ SfxVoidItem OutlineLevelsShown FN_OUTLINE_LEVELS_SHOWN
 ToolBoxConfig = TRUE,

core.git: Branch 'feature/cib_contract49d' - sw/source

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

New commits:
commit de931a804181c4f317a8a6e65c4902ec9a257986
Author: Oliver Specht 
AuthorDate: Tue Jan 7 11:17:40 2025 +0100
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 20:21:10 2025 +0100

tdf#164621 Fix regression from 3e9658a201f60dee95bd1bd8421b18bf8905c308

Change-Id: I1026ae18bf9bb86b506e4ef1782b9f3aa5ae7125
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179876
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/sw/source/core/doc/DocumentContentOperationsManager.cxx 
b/sw/source/core/doc/DocumentContentOperationsManager.cxx
index 3d743c949458..5cc904419a74 100644
--- a/sw/source/core/doc/DocumentContentOperationsManager.cxx
+++ b/sw/source/core/doc/DocumentContentOperationsManager.cxx
@@ -488,6 +488,8 @@ namespace
 {
 const SwTextNode* pTextNd = rPam.Start()->GetNode().GetTextNode();
 const SwTextNode* pEndTextNd = rPam.End()->GetNode().GetTextNode();
+if (pTextNd == nullptr || pEndTextNd == nullptr)
+return false;
 bool bRet = pTextNd->IsInListFromStyle();
 //single paragraphs are preferred only if it's a has a list from style
 if (pTextNd == pEndTextNd)


core.git: vcl/headless vcl/inc vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/unx vcl/win

2025-02-03 Thread Noel Grandin (via logerrit)
 vcl/headless/svpinst.cxx  |   18 +++-
 vcl/inc/headless/svpinst.hxx  |   11 ++
 vcl/inc/osx/salinst.h |6 +
 vcl/inc/qt5/QtInstance.hxx|6 +
 vcl/inc/quartz/salvd.h|3 
 vcl/inc/salinst.hxx   |   12 ++
 vcl/inc/skia/x11/salvd.hxx|4 
 vcl/inc/unx/gtk/gtkinst.hxx   |6 +
 vcl/inc/unx/salinst.h |   10 +-
 vcl/inc/unx/salvd.h   |4 
 vcl/inc/win/salinst.h |6 +
 vcl/qt5/QtInstance.cxx|   27 +-
 vcl/quartz/salvd.cxx  |  170 +++---
 vcl/skia/x11/salvd.cxx|   20 
 vcl/source/gdi/virdev.cxx |7 +
 vcl/unx/generic/gdi/salvd.cxx |  123 +-
 vcl/unx/gtk3/gtkinst.cxx  |   18 +++-
 vcl/win/gdi/salvd.cxx |   83 +---
 18 files changed, 365 insertions(+), 169 deletions(-)

New commits:
commit a46c265051af9b383c928914087d1e91025c2d2f
Author: Noel Grandin 
AuthorDate: Mon Feb 3 15:29:57 2025 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 3 21:56:09 2025 +0100

split CreateVirtualDevice into two methods

because I need to make it more complicated in an upcoming patch, and
this is already complicated.

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

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 54ac078f83f0..d2a4941321e5 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -197,10 +197,22 @@ void SvpSalInstance::DestroyObject( SalObject* pObject )
 
 #ifndef IOS
 
+std::unique_ptr 
SvpSalInstance::CreateVirtualDevice(SalGraphics& rGraphics,
+   tools::Long nDX, 
tools::Long nDY,
+   DeviceFormat 
/*eFormat*/)
+{
+SvpSalGraphics *pSvpSalGraphics = 
dynamic_cast(&rGraphics);
+assert(pSvpSalGraphics);
+std::unique_ptr xNew(new 
SvpSalVirtualDevice(pSvpSalGraphics->getSurface(), 
/*pPreExistingTarget*/nullptr));
+if (!xNew->SetSize(nDX, nDY))
+xNew.reset();
+return xNew;
+}
+
 std::unique_ptr 
SvpSalInstance::CreateVirtualDevice(SalGraphics& rGraphics,
tools::Long &nDX, 
tools::Long &nDY,
DeviceFormat 
/*eFormat*/,
-   const 
SystemGraphicsData* pGd)
+   const 
SystemGraphicsData& rGd)
 {
 SvpSalGraphics *pSvpSalGraphics = 
dynamic_cast(&rGraphics);
 assert(pSvpSalGraphics);
@@ -208,10 +220,10 @@ std::unique_ptr 
SvpSalInstance::CreateVirtualDevice(SalGraphic
 // tdf#127529 normally pPreExistingTarget is null and we are a true 
virtualdevice drawing to a backing buffer.
 // Occasionally, for canvas/slideshow, pPreExistingTarget is pre-provided 
as a hack to use the vcl drawing
 // apis to render onto a preexisting cairo surface. The necessity for that 
precedes the use of cairo in vcl proper
-cairo_surface_t* pPreExistingTarget = pGd ? 
static_cast(pGd->pSurface) : nullptr;
+cairo_surface_t* pPreExistingTarget = 
static_cast(rGd.pSurface);
 #else
 //ANDROID case
-(void)pGd;
+(void)rGd;
 cairo_surface_t* pPreExistingTarget = nullptr;
 #endif
 std::unique_ptr xNew(new 
SvpSalVirtualDevice(pSvpSalGraphics->getSurface(), pPreExistingTarget));
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index f3d9205a8981..2edd71dd78c7 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -136,12 +136,19 @@ public:
 
 // VirtualDevice
 // nDX and nDY in Pixel
-// nBitCount: 0 == Default(=as window) / 1 == Mono
+SAL_DLLPRIVATE virtual std::unique_ptr
+CreateVirtualDevice( SalGraphics& rGraphics,
+ tools::Long nDX, 
tools::Long nDY,
+ DeviceFormat eFormat ) 
override;
+
+// VirtualDevice
+// nDX and nDY in Pixel
 // pData allows for using a system dependent graphics or device context
 SAL_DLLPRIVATE virtual std::unique_ptr
 CreateVirtualDevice( SalGraphics& rGraphics,
  tools::Long &nDX, 
tools::Long &nDY,
- DeviceFormat eFormat, 
const SystemGraphicsData *pData = nullptr ) override;
+ DeviceFormat eFormat,
+ const SystemGraphicsData& 
rData ) override;
 
 // Printer
 // pSetupData->mpDriverData can be 0
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 8811fa3c9c72..dbc9066d373d 100644
---

core.git: sfx2/source

2025-02-03 Thread Jaume Pujantell (via logerrit)
 sfx2/source/control/dispatch.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e748726e3cb7bd311d4c0808963d6847295385ea
Author: Jaume Pujantell 
AuthorDate: Thu Jan 30 12:11:39 2025 +0100
Commit: Jaume Pujantell 
CommitDate: Mon Feb 3 11:13:03 2025 +0100

lok: allow save on comment only mode

Allow execution of .uno:Save command on comment only mode for all types
of files, not only pdf.

Change-Id: I35387d93d00d709d209d3ed1ba2d315bd20b67d5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180940
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Miklos Vajna 
(cherry picked from commit adcfa0902b8641a50b11c9fb528bb971993d5f12)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181026
Reviewed-by: Jaume Pujantell 
Tested-by: Jenkins

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index cb0f26e3c4b6..1959b5e81efa 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1543,6 +1543,7 @@ bool SfxDispatcher::IsCommandAllowedInLokReadOnlyViewMode 
(const OUString & comm
 u".uno:DeleteAnnotation"_ustr,
 u".uno:EditAnnotation"_ustr,
 u".uno:PromoteComment"_ustr,
+u".uno:Save"_ustr,
 };
 
 if (std::find(std::begin(allowedList), std::end(allowedList), commandName) 
!= std::end(allowedList))


core.git: include/svx svx/source

2025-02-03 Thread Miklos Vajna (via logerrit)
 include/svx/gallery1.hxx |   18 ++---
 svx/source/gallery2/gallery1.cxx |   52 +++
 2 files changed, 35 insertions(+), 35 deletions(-)

New commits:
commit 1752e15c52deff5a0f73f68b7e957e9b0c36df5f
Author: Miklos Vajna 
AuthorDate: Mon Feb 3 09:53:40 2025 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 3 11:16:19 2025 +0100

svx: prefix members of Gallery

See tdf#94879 for motivation.

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

diff --git a/include/svx/gallery1.hxx b/include/svx/gallery1.hxx
index b28081695630..5519aa8cd32e 100644
--- a/include/svx/gallery1.hxx
+++ b/include/svx/gallery1.hxx
@@ -95,11 +95,11 @@ class SVXCORE_DLLPUBLIC Gallery final : public 
SfxBroadcaster
 
 private:
 
-std::vector< std::unique_ptr > aThemeList;
-GalleryCacheThemeList   aThemeCache;
-INetURLObject   aRelURL;
-INetURLObject   aUserURL;
-boolbMultiPath;
+std::vector< std::unique_ptr > m_aThemeList;
+GalleryCacheThemeList   m_aThemeCache;
+INetURLObject   m_aRelURL;
+INetURLObject   m_aUserURL;
+boolm_bMultiPath;
 
 SAL_DLLPRIVATE void ImplLoad( std::u16string_view rMultiPath );
 SAL_DLLPRIVATE void ImplLoadSubDirs( const INetURLObject& 
rBaseURL, bool& rbIsReadOnly );
@@ -119,9 +119,9 @@ public:
 
 static Gallery* GetGalleryInstance();
 
-size_t  GetThemeCount() const { return 
aThemeList.size(); }
+size_t  GetThemeCount() const { return 
m_aThemeList.size(); }
 SAL_DLLPRIVATE const GalleryThemeEntry* GetThemeInfo( size_t nPos )
-{ return nPos < aThemeList.size() ? 
aThemeList[ nPos ].get() : nullptr; }
+{ return nPos < m_aThemeList.size() ? 
m_aThemeList[ nPos ].get() : nullptr; }
 const GalleryThemeEntry* GetThemeInfo( std::u16string_view rThemeName ) { 
return ImplGetThemeEntry( rThemeName ); }
 
 boolHasTheme( std::u16string_view rThemeName );
@@ -136,8 +136,8 @@ public:
 
 public:
 
-SAL_DLLPRIVATE const INetURLObject& GetUserURL() const { return aUserURL; }
-SAL_DLLPRIVATE const INetURLObject& GetRelativeURL() const { return 
aRelURL; }
+SAL_DLLPRIVATE const INetURLObject& GetUserURL() const { return 
m_aUserURL; }
+SAL_DLLPRIVATE const INetURLObject& GetRelativeURL() const { return 
m_aRelURL; }
 };
 
 #endif // INCLUDED_SVX_GALLERY1_HXX
diff --git a/svx/source/gallery2/gallery1.cxx b/svx/source/gallery2/gallery1.cxx
index 899c606f0962..4813c724c98e 100644
--- a/svx/source/gallery2/gallery1.cxx
+++ b/svx/source/gallery2/gallery1.cxx
@@ -230,7 +230,7 @@ public:
 
 
 Gallery::Gallery( std::u16string_view rMultiPath )
-:   bMultiPath  ( false )
+:   m_bMultiPath  ( false )
 {
 ImplLoad( rMultiPath );
 }
@@ -253,15 +253,15 @@ void Gallery::ImplLoad( std::u16string_view rMultiPath )
 {
 bool bIsReadOnlyDir {false};
 
-bMultiPath = !rMultiPath.empty();
+m_bMultiPath = !rMultiPath.empty();
 
 INetURLObject aCurURL(SvtPathOptions().GetConfigPath());
 ImplLoadSubDirs( aCurURL, bIsReadOnlyDir );
 
 if( !bIsReadOnlyDir )
-aUserURL = aCurURL;
+m_aUserURL = aCurURL;
 
-if( bMultiPath )
+if( m_bMultiPath )
 {
 bool bIsRelURL {true};
 sal_Int32 nIdx {0};
@@ -270,22 +270,22 @@ void Gallery::ImplLoad( std::u16string_view rMultiPath )
 aCurURL = INetURLObject(o3tl::getToken(rMultiPath, 0, ';', nIdx));
 if (bIsRelURL)
 {
-aRelURL = aCurURL;
+m_aRelURL = aCurURL;
 bIsRelURL = false;
 }
 
 ImplLoadSubDirs( aCurURL, bIsReadOnlyDir );
 
 if( !bIsReadOnlyDir )
-aUserURL = aCurURL;
+m_aUserURL = aCurURL;
 }
 while (nIdx>0);
 }
 else
-aRelURL = INetURLObject( rMultiPath );
+m_aRelURL = INetURLObject( rMultiPath );
 
-DBG_ASSERT( aUserURL.GetProtocol() != INetProtocol::NotValid, "no writable 
Gallery user directory available" );
-DBG_ASSERT( aRelURL.GetProtocol() != INetProtocol::NotValid, "invalid URL" 
);
+DBG_ASSERT( m_aUserURL.GetProtocol() != INetProtocol::NotValid, "no 
writable Gallery user directory available" );
+DBG_ASSERT( m_aRelURL.GetProtocol() != INetProtocol::NotValid, "invalid 
URL" );
 }
 
 void Gallery::ImplLoadSubDirs( const INetURLObject& rBaseURL, bool& 
rbDirIsReadOnly )
@@ -451,7 +451,7 @@ void Gallery::ImplLoadSubDirs( const INetURLObject& 
rBaseURL, bool& rbDirIsReadO
 GalleryThemeEntry* pEntry = 
GalleryFileStorageEntry::CreateThemeEntry( aT

core.git: sc/source

2025-02-03 Thread Samuel Mehrbrodt (via logerrit)
 sc/source/ui/dbgui/filtdlg.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 5be5e9da58c7dcee418264b2da29ddcc07e4709d
Author: Samuel Mehrbrodt 
AuthorDate: Mon Feb 3 09:37:24 2025 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 3 11:20:14 2025 +0100

tdf#149907 Update results when changing condition

Regression from d9dd003f63a781e63bfbe380ea737e080c21881f

Change-Id: I9373be1f77ba13049a91816f57c5ae6b8913f071
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181028
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt 

diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx
index 0470d00e9291..317f7f3a9165 100644
--- a/sc/source/ui/dbgui/filtdlg.cxx
+++ b/sc/source/ui/dbgui/filtdlg.cxx
@@ -1160,8 +1160,7 @@ IMPL_LINK(ScFilterDlg, LbSelectHdl, weld::ComboBox&, rLb, 
void)
 UpdateColorList(4);
 }
 
-auto aEntry = theQueryData.GetEntry(nQ);
-aEntry.eOp = op;
+theQueryData.GetEntry(nQ).eOp = op;
 }
 else if (&rLb == m_xLbColor1.get() || &rLb == m_xLbColor2.get() || &rLb == 
m_xLbColor3.get()
  || &rLb == m_xLbColor4.get())


core.git: sw/source

2025-02-03 Thread László Németh (via logerrit)
 sw/source/core/text/txtfrm.cxx |   29 -
 1 file changed, 28 insertions(+), 1 deletion(-)

New commits:
commit b4d41f6b0deb0299cd01173c150c5b94568c9a21
Author: László Németh 
AuthorDate: Mon Feb 3 00:48:15 2025 +0100
Commit: László Németh 
CommitDate: Mon Feb 3 11:26:55 2025 +0100

tdf#164932 sw inline heading: fix frame AutoSize at list offset

Calculation of AutoSize of text frames was incomplete,
resulting narrower frame width and e.g. two-line numbered inline
heading instead of a single one, if the left offset of the
numbering level in the attached list style was not zero.

This is a general fix for all text frames, not only for
text frames with Inline Heading frame style.

Regression from commit 56588663a0fddc005c12afaa7d3f8874d036875f
"tdf#131728 sw inline heading: fix DOCX paragraph layout
interoperability".

Follow-up to commit 7a35f3dc7419d833b8f47069c4df63e900ccb880
"tdf#48459 sw inline heading: apply it on the selected words",
commit d87cf67f8f3346a1e380383917a3a4552fd9248e
"tdf#131728 sw inline heading: fix missing/broken DOCX export",
commit a1dcbd1d1ce6071d48bb5df26d7839aeb21b75a8
"tdf48459 sw inline heading: add Inline Heading frame style"

Change-Id: I4aea651d6982db61af0e423f25152b1401dc16c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181025
Tested-by: Jenkins
Reviewed-by: László Németh 

diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx
index 77ab42f41895..08b62b18e7db 100644
--- a/sw/source/core/text/txtfrm.cxx
+++ b/sw/source/core/text/txtfrm.cxx
@@ -3692,7 +3692,34 @@ SwTwips SwTextFrame::CalcFitToContent()
 
 SetPara( pOldPara );
 
-return nMax;
+// tdf#164932 handle numbering list offset
+const SwTextNode* pTextNode( GetTextNodeForParaProps() );
+SwTwips nNumOffset = 0;
+if ( pTextNode->IsNumbered(getRootFrame()) &&
+pTextNode->IsCountedInList() && pTextNode->GetNumRule() )
+{
+int nListLevel = pTextNode->GetActualListLevel();
+
+if (nListLevel < 0)
+nListLevel = 0;
+
+if (nListLevel >= MAXLEVEL)
+nListLevel = MAXLEVEL - 1;
+
+const SwNumFormat& rNumFormat =
+pTextNode->GetNumRule()->Get( 
o3tl::narrowing(nListLevel) );
+if ( rNumFormat.GetPositionAndSpaceMode() == 
SvxNumberFormat::LABEL_ALIGNMENT )
+{
+const SwAttrSet& rSet = pTextNode->GetSwAttrSet();
+::sw::ListLevelIndents const 
indents(pTextNode->AreListLevelIndentsApplicable());
+SvxTextLeftMarginItem leftMargin(rSet.GetTextLeftMargin());
+if (indents & ::sw::ListLevelIndents::LeftMargin)
+
leftMargin.SetTextLeft(SvxIndentValue::twips(rNumFormat.GetAbsLSpace()));
+nNumOffset = leftMargin.ResolveTextLeft(/*metrics*/ {});
+}
+}
+
+return nMax + nNumOffset;
 }
 
 /**


core.git: forms/source

2025-02-03 Thread Simon Chenery (via logerrit)
 forms/source/xforms/convert.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ad471148ec8763e17f55059aaf85e320175220f2
Author: Simon Chenery 
AuthorDate: Tue Jan 28 19:51:15 2025 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 3 11:26:32 2025 +0100

Add isEmpty() check to avoid possible OUStringBuffer underflow

Avoid accessing invalid index -1 if OUStringBuffer aBuffer is empty.

It cannot be guaranteed that callers will always pass strings that
result in aBuffer being non-empty.

Change-Id: Ied9abf753bcaf2bd1ee618b2431fa35b0bdb5573
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180856
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Jenkins

diff --git a/forms/source/xforms/convert.cxx b/forms/source/xforms/convert.cxx
index c95d5fae6856..98fd3391f220 100644
--- a/forms/source/xforms/convert.cxx
+++ b/forms/source/xforms/convert.cxx
@@ -328,7 +328,7 @@ OUString Convert::collapseWhitespace( const OUString& 
_rString )
 aBuffer.append( c );
 }
 }
-if( aBuffer[ aBuffer.getLength() - 1 ] == u' ' )
+if( !aBuffer.isEmpty() && aBuffer[ aBuffer.getLength() - 1 ] == u' ' )
 aBuffer.setLength( aBuffer.getLength() - 1 );
 return aBuffer.makeStringAndClear();
 }


core.git: linguistic/source

2025-02-03 Thread Simon Chenery (via logerrit)
 linguistic/source/spelldsp.cxx |4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

New commits:
commit 9df6108dd7bd301a1b8d60c08b2f2d508c8bd125
Author: Simon Chenery 
AuthorDate: Tue Jan 28 17:55:04 2025 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 3 11:30:13 2025 +0100

tdf#153109 simplify any_of to find without lambda

Simplify a std::any_of call to std::find, which avoids
the need for a lambda function.

Change-Id: Ibc4799b77e4997440d58995d37e39c6eae411764
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180851
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Jenkins

diff --git a/linguistic/source/spelldsp.cxx b/linguistic/source/spelldsp.cxx
index a8c20748bbab..0abdaa0489fe 100644
--- a/linguistic/source/spelldsp.cxx
+++ b/linguistic/source/spelldsp.cxx
@@ -83,9 +83,7 @@ void ProposalList::Append( const OUString &rOrig, bool 
bPrepend )
 {
 // convert ASCII apostrophe to the typographic one
 const OUString aText( rOrig.indexOf( '\'' ) > -1 ? rOrig.replace('\'', 
u'’') : rOrig );
-const bool bFound = std::any_of(aVec.begin(), aVec.end(),
-[&aText](const OUString& n){ return n == aText; });
-if (!bFound)
+if (std::find(aVec.begin(), aVec.end(), aText) == aVec.end())
 {
 if ( bPrepend )
 aVec.insert( aVec.begin(), aText );


core.git: vcl/win

2025-02-03 Thread Simon Chenery (via logerrit)
 vcl/win/window/keynames.cxx |8 
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 05c92d3bdc633186975d3191d9ae5629c57a9a60
Author: Simon Chenery 
AuthorDate: Sun Jan 26 21:55:48 2025 +0100
Commit: Samuel Mehrbrodt 
CommitDate: Mon Feb 3 11:28:00 2025 +0100

tdf#147021 avoid use of SAL_N_ELEMENTS macro in keynames.cxx

Change-Id: Id413378f638807355fa7ce4b37d8aee62fedefb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180769
Reviewed-by: Samuel Mehrbrodt 
Tested-by: Jenkins

diff --git a/vcl/win/window/keynames.cxx b/vcl/win/window/keynames.cxx
index e30f7284caa4..f0cecb2bd127 100644
--- a/vcl/win/window/keynames.cxx
+++ b/vcl/win/window/keynames.cxx
@@ -204,12 +204,12 @@ namespace vcl_sal {
 // translate keycodes, used within the displayed menu shortcuts
 OUString getKeysReplacementName( std::u16string_view pLang, LONG nSymbol )
 {
-for( unsigned int n = 0; n < SAL_N_ELEMENTS(aKeyboards); n++ )
+for( const auto& rKeyboard : aKeyboards )
 {
-if( o3tl::equalsAscii( pLang, aKeyboards[n].pLangName ) )
+if( o3tl::equalsAscii( pLang, rKeyboard.pLangName ) )
 {
-const struct KeysNameReplacement* pRepl = 
aKeyboards[n].pReplacements;
-for( int m = aKeyboards[n].nReplacements ; m ; )
+const struct KeysNameReplacement* pRepl = 
rKeyboard.pReplacements;
+for( int m = rKeyboard.nReplacements ; m ; )
 {
 if( nSymbol == pRepl[--m].aSymbol )
 return OUString( pRepl[m].pName, 
strlen(pRepl[m].pName), RTL_TEXTENCODING_UTF8 );


core.git: desktop/source

2025-02-03 Thread Simon Chenery (via logerrit)
 desktop/source/migration/migration.cxx |   15 +--
 1 file changed, 5 insertions(+), 10 deletions(-)

New commits:
commit 4cc35cf5d52b2e6f9458b27ea6b26a9ebd066af0
Author: Simon Chenery 
AuthorDate: Mon Jan 27 18:42:45 2025 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Mon Feb 3 11:34:18 2025 +0100

tdf#163738 use insert function instead of for loop in migration.cxx

Change-Id: Icf49d59fa56b6c7074abd476deeca040ea4c178f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180801
Tested-by: Jenkins
Reviewed-by: Ilmari Lauhakangas 

diff --git a/desktop/source/migration/migration.cxx 
b/desktop/source/migration/migration.cxx
index da01086b7a17..5006bc1c5507 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -347,32 +347,27 @@ migrations_vr MigrationImpl::readMigrationSteps(const 
OUString& rMigrationName)
 
 // read included files from current step description
 if (tmpAccess->getByName(u"IncludedFiles"_ustr) >>= tmpSeq) {
-for (const OUString& rSeqEntry : tmpSeq)
-tmpStep.includeFiles.push_back(rSeqEntry);
+tmpStep.includeFiles.insert(tmpStep.includeFiles.end(), 
tmpSeq.begin(), tmpSeq.end());
 }
 
 // excluded files...
 if (tmpAccess->getByName(u"ExcludedFiles"_ustr) >>= tmpSeq) {
-for (const OUString& rSeqEntry : tmpSeq)
-tmpStep.excludeFiles.push_back(rSeqEntry);
+tmpStep.excludeFiles.insert(tmpStep.excludeFiles.end(), 
tmpSeq.begin(), tmpSeq.end());
 }
 
 // included nodes...
 if (tmpAccess->getByName(u"IncludedNodes"_ustr) >>= tmpSeq) {
-for (const OUString& rSeqEntry : tmpSeq)
-tmpStep.includeConfig.push_back(rSeqEntry);
+tmpStep.includeConfig.insert(tmpStep.includeConfig.end(), 
tmpSeq.begin(), tmpSeq.end());
 }
 
 // excluded nodes...
 if (tmpAccess->getByName(u"ExcludedNodes"_ustr) >>= tmpSeq) {
-for (const OUString& rSeqEntry : tmpSeq)
-tmpStep.excludeConfig.push_back(rSeqEntry);
+tmpStep.excludeConfig.insert(tmpStep.excludeConfig.end(), 
tmpSeq.begin(), tmpSeq.end());
 }
 
 // excluded extensions...
 if (tmpAccess->getByName(u"ExcludedExtensions"_ustr) >>= tmpSeq) {
-for (const OUString& rSeqEntry : tmpSeq)
-tmpStep.excludeExtensions.push_back(rSeqEntry);
+tmpStep.excludeExtensions.insert(tmpStep.excludeExtensions.end(), 
tmpSeq.begin(), tmpSeq.end());
 }
 
 // generic service


core.git: include/vcl vcl/source

2025-02-03 Thread Arnaud VERSINI (via logerrit)
 include/vcl/builder.hxx   |2 
 vcl/source/window/builder.cxx |  254 +-
 2 files changed, 129 insertions(+), 127 deletions(-)

New commits:
commit c38e3562e3d644011a09a2d71af5ce70c75f8830
Author: Arnaud VERSINI 
AuthorDate: Tue Dec 31 14:59:33 2024 +0100
Commit: Arnaud Versini 
CommitDate: Mon Feb 3 09:11:29 2025 +0100

vcl : use frozen unordered_map to avoid allocations

Change-Id: I6b0ecd18fe3aa79211c5f1f28a2b87eece98d0e9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179581
Tested-by: Arnaud Versini 
Reviewed-by: Arnaud Versini 
Tested-by: Jenkins

diff --git a/include/vcl/builder.hxx b/include/vcl/builder.hxx
index d501ef0192de..b69290ba41e9 100644
--- a/include/vcl/builder.hxx
+++ b/include/vcl/builder.hxx
@@ -304,7 +304,7 @@ namespace BuilderUtils
 void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition);
 
 //Convert an accessibility role name to accessibility role number
-sal_Int16 getRoleFromName(const OUString& roleName);
+sal_Int16 getRoleFromName(std::u16string_view roleName);
 }
 
 //sID may not exist, but must be of type T if it does
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index b21d26bb5f1e..871a90a603d2 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -13,9 +13,11 @@
 
 #include 
 #include 
-#include 
 #include 
 
+#include 
+#include 
+
 #include 
 #include 
 #include 
@@ -2127,135 +2129,135 @@ namespace BuilderUtils
 }
 }
 
-sal_Int16 getRoleFromName(const OUString& roleName)
+sal_Int16 getRoleFromName(std::u16string_view roleName)
 {
 using namespace com::sun::star::accessibility;
 
-static const std::unordered_map 
aAtkRoleToAccessibleRole = {
+static constexpr frozen::unordered_map aAtkRoleToAccessibleRole = {
 /* This is in atkobject.h's AtkRole order */
-{ "invalid",   AccessibleRole::UNKNOWN },
-{ "accelerator label", AccessibleRole::UNKNOWN },
-{ "alert", AccessibleRole::ALERT },
-{ "animation", AccessibleRole::UNKNOWN },
-{ "arrow", AccessibleRole::UNKNOWN },
-{ "calendar",  AccessibleRole::UNKNOWN },
-{ "canvas",AccessibleRole::CANVAS },
-{ "check box", AccessibleRole::CHECK_BOX },
-{ "check menu item",   AccessibleRole::CHECK_MENU_ITEM },
-{ "color chooser", AccessibleRole::COLOR_CHOOSER },
-{ "column header", AccessibleRole::COLUMN_HEADER },
-{ "combo box", AccessibleRole::COMBO_BOX },
-{ "date editor",   AccessibleRole::DATE_EDITOR },
-{ "desktop icon",  AccessibleRole::DESKTOP_ICON },
-{ "desktop frame", AccessibleRole::DESKTOP_PANE }, // ?
-{ "dial",  AccessibleRole::UNKNOWN },
-{ "dialog",AccessibleRole::DIALOG },
-{ "directory pane",AccessibleRole::DIRECTORY_PANE },
-{ "drawing area",  AccessibleRole::UNKNOWN },
-{ "file chooser",  AccessibleRole::FILE_CHOOSER },
-{ "filler",AccessibleRole::FILLER },
-{ "font chooser",  AccessibleRole::FONT_CHOOSER },
-{ "frame", AccessibleRole::FRAME },
-{ "glass pane",AccessibleRole::GLASS_PANE },
-{ "html container",AccessibleRole::UNKNOWN },
-{ "icon",  AccessibleRole::ICON },
-{ "image", AccessibleRole::GRAPHIC },
-{ "internal frame",AccessibleRole::INTERNAL_FRAME },
-{ "label", AccessibleRole::LABEL },
-{ "layered pane",  AccessibleRole::LAYERED_PANE },
-{ "list",  AccessibleRole::LIST },
-{ "list item", AccessibleRole::LIST_ITEM },
-{ "menu",  AccessibleRole::MENU },
-{ "menu bar",  AccessibleRole::MENU_BAR },
-{ "menu item", AccessibleRole::MENU_ITEM },
-{ "option pane",   AccessibleRole::OPTION_PANE },
-{ "page tab",  AccessibleRole::PAGE_TAB },
-{ "page tab list", AccessibleRole::PAGE_TAB_LIST },
-{ "panel", AccessibleRole::PANEL }, // or SHAPE or 
TEXT_FRAME ?
-{ "password text", AccessibleRole::PASSWORD_TEXT },
-{ "popup menu",AccessibleRole::POPUP_MENU },
-{ "progress bar",  AccessibleRole::PROGRESS_BAR },
-{ "push button",   AccessibleRole::PUSH_BUTTON }, // or 
BUTTON_DROPDOWN or BUTTON_MENU
-   

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

2025-02-03 Thread Gökay Şatır (via logerrit)
 sc/source/ui/unoobj/docuno.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit e4a0e9ddd7b95f4bdc833b1e682784600e66f376
Author: Gökay Şatır 
AuthorDate: Tue Jan 7 11:14:10 2025 +0300
Commit: Gökay ŞATIR 
CommitDate: Mon Feb 3 09:59:55 2025 +0100

Online Calc: Update view pos after setting the client zoom.

Issue: If user zooms in/out while editing is active, the edited area is 
misplaced and tiles are rendering wrong.

Signed-off-by: Gökay Şatır 
Change-Id: Ib9ec8237da52363bffcf586b85a1bd041785c693
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/179857
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Marco Cecchetti 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180513

diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 1520b183beb9..8163b20edab8 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -1082,6 +1082,7 @@ void ScModelObj::setClientZoom(int nTilePixelWidth_, int 
nTilePixelHeight_, int
 pHdl->SetRefScale(pViewData->GetZoomX(), pViewData->GetZoomY());
 
 // refresh our view's take on other view's cursors & selections
+pViewData->GetActiveWin()->UpdateEditViewPos();
 pViewData->GetActiveWin()->updateKitOtherCursors();
 pViewData->GetActiveWin()->updateOtherKitSelections();
 


core.git: Branch 'distro/collabora/co-24.04' - 2 commits - configure.ac download.lst external/redland

2025-02-03 Thread Taichi haradaguchi (via logerrit)
 configure.ac   
   |2 
 download.lst   
   |4 
 external/redland/ExternalProject_raptor.mk 
   |   17 ++-
 external/redland/ExternalProject_redland.mk
   |6 -
 external/redland/Library_raptor.mk 
   |2 
 external/redland/README
   |2 
 external/redland/UnpackedTarball_raptor.mk 
   |5 -
 
external/redland/raptor/0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1
 |   33 ---
 
external/redland/raptor/0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1
 |   43 -
 external/redland/raptor/Wint-conversion.patch  
   |   22 
 external/redland/raptor/libtool.patch  
   |   27 -
 external/redland/raptor/raptor-android.patch.1 
   |   10 +-
 external/redland/raptor/raptor-bundled-soname.patch.1  
   |   12 +-
 external/redland/raptor/raptor-emscripten.patch.1  
   |8 -
 external/redland/raptor/raptor-freebsd.patch.1 
   |   31 ++
 external/redland/raptor/raptor-icu.patch   
   |   11 ++
 external/redland/raptor/raptor-msvc.patch.1
   |   10 --
 external/redland/raptor/raptor2.h  
   |   32 +-
 external/redland/raptor/raptor_config.h
   |   46 --
 external/redland/raptor/ubsan.patch
   |   14 ---
 external/redland/raptor/xml2-config.patch  
   |6 -
 external/redland/rasqal/rasqal-pkgconfig.patch.1   
   |3 
 22 files changed, 106 insertions(+), 240 deletions(-)

New commits:
commit ae7972baa8847712fcfde97cced2bb4791b793d9
Author: Taichi haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Sat Jan 6 14:49:07 2024 +0900
Commit: Andras Timar 
CommitDate: Mon Feb 3 16:40:49 2025 +0100

Upgrade raptor to 2.0.16

- Fixes CVE-2017-18926 and CVE-2020-25713.
- drop 0001-Calcualte-max-nspace-declarations-correctly-for-XML-.patch.1:
  merged upstream
- drop 0001-CVE-2020-25713-raptor2-malformed-input-file-can-lead.patch.1:
  merged upstream
- drop libtool.patch: merged upstream
- drop most of raptor-freebsd.patch.1: merged upstream
- drop most of raptor-msvc.patch.1: merged upsttream
- drop most of ubsan.patch: merged upstream
- drop Wint-conversion.patch: merged upstream

depend on package icu_ure to have libicuuc delivered and add corresponding
directory to rpath-link to make sure the right copy is picked up
use $(strip ...) in LDFLAGS to avoid having to escape , with $(COMMA)

(cherry-picked from c75c21eef670fce33eb5a501357935dbd25be923)

Change-Id: Ic05269ade5dae3761d98432ee504a51434a4c753
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161704
Reviewed-by: Christian Lohmaier 
Tested-by: Jenkins
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181057
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/configure.ac b/configure.ac
index 34af474b0046..85a8476948ca 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10921,7 +10921,7 @@ dnl 
===
 ICU_MAJOR=73
 ICU_MINOR=2
 ICU_CFLAGS_internal="-I${WORKDIR}/UnpackedTarball/icu/source/i18n 
-I${WORKDIR}/UnpackedTarball/icu/source/common"
-ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib"
+ICU_LIBS_internal="-L${WORKDIR}/UnpackedTarball/icu/source/lib -licuuc"
 libo_CHECK_SYSTEM_MODULE([icu],[ICU],[icu-i18n >= 66])
 if test "$SYSTEM_ICU" = TRUE; then
 AC_LANG_PUSH([C++])
diff --git a/download.lst b/download.lst
index feb268db4e5a..0c4679e5b4ac 100644
--- a/download.lst
+++ b/download.lst
@@ -668,8 +668,8 @@ QXP_TARBALL := libqxp-0.0.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-RAPTOR_SHA256SUM := 
ada7f0ba54787b33485d090d3d2680533520cd4426d2f7fb4782dd4a6a1480ed
-RAPTOR_TARBALL := a39f6c07ddb20d7dd2ff1f95fa21e2cd-raptor2-2.0.15.tar.gz
+RAPTOR_SHA256SUM := 
089db78d7ac982354bdbf39d973baf09581e6904ac4c92a98c5caadb3de44680
+RAPTOR_TARBALL := raptor2-2.0.16.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/redland/ExternalProject_raptor.mk 

core.git: Branch 'distro/collabora/co-24.04' - 2 commits - external/redland

2025-02-03 Thread Christian Lohmaier (via logerrit)
 external/redland/ExternalProject_raptor.mk  |2 ++
 external/redland/UnpackedTarball_redland.mk |1 +
 external/redland/redland/ubsan.patch|   11 +++
 3 files changed, 14 insertions(+)

New commits:
commit c34bc3841fece7d432f9749753e442c2a3a1d716
Author: Christian Lohmaier 
AuthorDate: Wed Jul 17 13:38:22 2024 +0200
Commit: Andras Timar 
CommitDate: Mon Feb 3 16:41:09 2025 +0100

fix raptor build when using system-icu

Change-Id: I1671e5872deb583c1c0395ab49ab33b171d0e086
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170620
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 
(cherry picked from commit c1b00424f17eaea8f55565dae285521c1ec4d042)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/174003
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181059
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/external/redland/ExternalProject_raptor.mk 
b/external/redland/ExternalProject_raptor.mk
index 31face289f6d..8b800f76eea0 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -14,7 +14,9 @@ $(eval $(call gb_ExternalProject_use_externals,raptor,\
libxml2 \
 ))
 
+ifeq ($(SYSTEM_ICU),)
 $(eval $(call gb_ExternalProject_use_package,raptor,icu_ure))
+endif
 
 $(eval $(call gb_ExternalProject_register_targets,raptor,\
build \
commit 9c16014322c57726a200e8f915e2c11f8af52f9c
Author: Stephan Bergmann 
AuthorDate: Wed Jul 10 11:19:36 2024 +0200
Commit: Andras Timar 
CommitDate: Mon Feb 3 16:40:57 2025 +0100

Fix UBSan build of ExternalProject_redland

...after c75c21eef670fce33eb5a501357935dbd25be923 "Upgrade raptor to 
2.0.16",
where it now started to fail with

> libtool: link: LD_RUN_PATH="/usr/local/lib:" /usr/bin/ccache 
/home/tdf/lode/opt_private/clang-llvmorg-12.0.1/bin/clang 
--gcc-toolchain=/opt/rh/gcc-toolset-12/root/usr -fsanitize=address 
-fsanitize=undefined -fsanitize=float-divide-by-zero -fsanitize=local-bounds 
-fsanitize-blacklist=/home/tdf/lode/jenkins/workspace/lo_ubsan/sanitize-ubsan-excludelist
 -fno-sanitize=function -DLIBRDF_INTERNAL=1 -O0 -Wp,-U_FORTIFY_SOURCE 
-fstrict-aliasing -fstrict-overflow -ggdb2 -gsplit-dwarf -Xclang 
-debug-info-kind=constructor -Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN 
-Wl,-rpath-link -Wl,/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program 
-Wl,-z -Wl,origin -Wl,-rpath -Wl,\$ORIGIN -Wl,-rpath-link 
-Wl,/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program -o 
.libs/redland-db-upgrade db_upgrade.o  
-L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/raptor/src/.libs
 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/raptor/src/.libs/libraptor2.so
 -L/home/tdf/
 lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2/.libs 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/libxml2/.libs/libxml2.so
 
-L/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/rasqal/src/.libs
 
/home/tdf/lode/jenkins/workspace/lo_ubsan/workdir/UnpackedTarball/rasqal/src/.libs/librasqal.so
 ../src/.libs/librdf.so
> /opt/rh/gcc-toolset-12/root/usr/bin/ld: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: 
undefined reference to `__ubsan_vptr_type_cache'
> /opt/rh/gcc-toolset-12/root/usr/bin/ld: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: 
undefined reference to `__ubsan_handle_function_type_mismatch_v1'
> /opt/rh/gcc-toolset-12/root/usr/bin/ld: 
/home/tdf/lode/jenkins/workspace/lo_ubsan/instdir/program/libicuuc.so.74: 
undefined reference to `__ubsan_handle_dynamic_type_cache_miss'
> clang-12: error: linker command failed with exit code 1 (use -v to see 
invocation)
> make[3]: *** [Makefile:489: redland-db-upgrade] Error 1

() because $(CC) is used to 
link
a (nominally C-only) executable that links against C++ ICU shared libraries 
that
in turn require a C++-specific UBSan library to be linked in.  So just use
$(CXX) for linking instead.

Change-Id: If7c61c6ee7e1b43965a928b1560f8ab4ae2b0603
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170277
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit b3300387f2e14ea59c70db513a8f6eda6fe17afa)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173793
Tested-by: Stephan Bergmann 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181058
Reviewed-by: Andras Timar 
Tested-by: Jenkins CollaboraOffice 

diff --git a/external/redland/UnpackedTarball_redland.mk 
b/external/redland/UnpackedTarball_redland.mk
index 66e766d20fee..31ebcb8f2f0a 100644
--- a/external/redland/UnpackedTarball_redland.mk
+++ b/external/redland/UnpackedTarball_redland.mk
@@ -33,6 +33,7 @@ $(eval $(call gb

core.git: Branch 'distro/collabora/co-24.04' - external/redland

2025-02-03 Thread Michael Stahl (via logerrit)
 external/redland/ExternalProject_raptor.mk |2 -
 external/redland/UnpackedTarball_raptor.mk |1 
 external/redland/raptor/CVE-2024-57823.patch.1 |   35 +
 3 files changed, 37 insertions(+), 1 deletion(-)

New commits:
commit 7b599301d90ad9c90a85568de0840b9e579d9908
Author: Michael Stahl 
AuthorDate: Wed Jan 15 10:55:05 2025 +0100
Commit: Andras Timar 
CommitDate: Mon Feb 3 16:41:18 2025 +0100

redland: disable all raptor parsers except for "rdfxml"

It's the only one the unordf component invokes.

CVE-2024-57823 CVE-2024-57822 affect the "ntriples" and "turtle"
parsers.

However it appears that the function raptor_uri_normalize_path() could
also be called from raptor_libxml_* functions?  Somewhat unclear, let's
add the patch just in case.

Change-Id: Idd7ebbc29c63e84ca2434b06c26f7aca34bdcaa5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180272
Tested-by: Jenkins
Reviewed-by: Michael Stahl 
(cherry picked from commit 2b50dc0e4482ac0ad27d69147b4175e05af4fba4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181060
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Andras Timar 

diff --git a/external/redland/ExternalProject_raptor.mk 
b/external/redland/ExternalProject_raptor.mk
index 8b800f76eea0..944f7e0b40d4 100644
--- a/external/redland/ExternalProject_raptor.mk
+++ b/external/redland/ExternalProject_raptor.mk
@@ -36,7 +36,7 @@ $(call gb_ExternalProject_get_state_target,raptor,build):
$(if $(SYSBASE),$(if $(filter LINUX 
SOLARIS,$(OS)),-L$(SYSBASE)/lib -L$(SYSBASE)/usr/lib -lpthread -ldl)))' \
CPPFLAGS="$(if $(SYSBASE),-I$(SYSBASE)/usr/include) 
$(gb_EMSCRIPTEN_CPPFLAGS)" \
$(gb_RUN_CONFIGURE) ./configure --disable-gtk-doc \
-   --enable-parsers="rdfxml ntriples turtle trig guess 
rss-tag-soup" \
+   --enable-parsers="rdfxml" \
--without-www \
--without-xslt-config \
$(gb_CONFIGURE_PLATFORMS) \
diff --git a/external/redland/UnpackedTarball_raptor.mk 
b/external/redland/UnpackedTarball_raptor.mk
index 6dc6491132df..dddfb4ba7923 100644
--- a/external/redland/UnpackedTarball_raptor.mk
+++ b/external/redland/UnpackedTarball_raptor.mk
@@ -30,6 +30,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,raptor,\
external/redland/raptor/xml2-config.patch \
external/redland/raptor/raptor-libxml2-11.patch.1 \
$(if $(SYSTEM_ICU),,external/redland/raptor/raptor-icu.patch) \
+   external/redland/raptor/CVE-2024-57823.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/redland/raptor/CVE-2024-57823.patch.1 
b/external/redland/raptor/CVE-2024-57823.patch.1
new file mode 100644
index ..b06689304b0a
--- /dev/null
+++ b/external/redland/raptor/CVE-2024-57823.patch.1
@@ -0,0 +1,35 @@
+--- raptor2-2.0.15/src/raptor_rfc2396.c.CVE-2024-57823 2014-07-26 
23:07:37.0 +0200
 raptor2-2.0.15/src/raptor_rfc2396.c2025-01-13 12:59:22.175568228 
+0100
+@@ -289,10 +289,8 @@ raptor_uri_normalize_path(unsigned char*
+   }
+ 
+   
+-#if defined(RAPTOR_DEBUG)
+   if(path_len != strlen((const char*)path_buffer))
+ RAPTOR_FATAL4("Path '%s' length %ld does not match calculated %ld.", 
(const char*)path_buffer, (long)strlen((const char*)path_buffer), 
(long)path_len);
+-#endif
+ 
+   /* Remove all "/../" path components */
+ 
+@@ -327,10 +325,8 @@ raptor_uri_normalize_path(unsigned char*
+ if(!prev || !cur)
+   continue;
+ 
+-#if defined(RAPTOR_DEBUG)
+ if(path_len != strlen((const char*)path_buffer))
+   RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", 
(long)strlen((const char*)path_buffer), (long)path_len);
+-#endif
+ 
+ /* If the current one is '..' */
+ if(s == (cur+2) && cur[0] == '.' && cur[1] == '.') {
+@@ -393,10 +389,8 @@ raptor_uri_normalize_path(unsigned char*
+   }
+ 
+ 
+-#if defined(RAPTOR_DEBUG)
+   if(path_len != strlen((const char*)path_buffer))
+ RAPTOR_FATAL3("Path length %ld does not match calculated %ld.", 
(long)strlen((const char*)path_buffer), (long)path_len);
+-#endif
+ 
+   /* RFC3986 Appendix C.2 / 5.4.2 Abnormal Examples
+* Remove leading /../ and /./ 


core.git: sc/qa sc/source

2025-02-03 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/functions/spreadsheet/fods/unique.fods |   60 +
 sc/source/core/tool/interpr1.cxx   |4 -
 2 files changed, 62 insertions(+), 2 deletions(-)

New commits:
commit 0ef05087b54621caec96e72fc8aaf13f86a90bf9
Author: Xisco Fauli 
AuthorDate: Mon Feb 3 12:11:34 2025 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 3 16:41:12 2025 +0100

tdf#162601: UNIQUE function is case-insensitive

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

diff --git a/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods 
b/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods
index 5fce49310229..662338de546f 100644
--- a/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods
+++ b/sc/qa/unit/data/functions/spreadsheet/fods/unique.fods
@@ -5044,6 +5044,66 @@
  
  
 
+
+ 
+ 
+ 
+ 
+  case insensitive
+ 
+ 
+
+
+ 
+  A
+ 
+ 
+ 
+  A
+ 
+ 
+ 
+  TRUE
+ 
+ 
+  
{=UNIQUE({"A";"a";"b";"B"})}
+ 
+ 
+
+
+ 
+  b
+ 
+ 
+ 
+  b
+ 
+ 
+ 
+  TRUE
+ 
+ 
+  
{=UNIQUE({"A";"a";"b";"B"})}
+ 
+ 
+
+
+ 
+  c
+ 
+ 
+ 
+  c
+ 
+ 
+ 
+  TRUE
+ 
+ 
+  
{=UNIQUE({"A";"a";"b";"B";"c"};
 ; 1)}
+ 
+ 
+
 
  
  
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 9498065f6bcf..fcc3e9e1ba58 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -9393,7 +9393,7 @@ void ScInterpreter::ScUnique()
 aStr += aCellStr + u"\x0001";
 }
 
-if (aStrSet.insert(aStr).second) // unique if inserted
+if (aStrSet.insert(aStr.toAsciiLowerCase()).second) // unique if 
inserted
 {
 aResPos.emplace_back(std::make_pair(i, aStr));
 }
@@ -9404,7 +9404,7 @@ void ScInterpreter::ScUnique()
 auto it = std::find_if(aResPos.begin(), aResPos.end(),
 [&aStr](const std::pair& aRes)
 {
-return aRes.second.equals(aStr);
+return 
aRes.second.toAsciiLowerCase().equals(aStr.toAsciiLowerCase());
 }
 );
 if (it != aResPos.end())


core.git: basic/source

2025-02-03 Thread Manish Bera (via logerrit)
 basic/source/runtime/methods.cxx |   29 -
 1 file changed, 12 insertions(+), 17 deletions(-)

New commits:
commit d8f405ccf6aa5c44a2fca659e62d7a8c09d9db7d
Author: Manish Bera 
AuthorDate: Wed Jan 29 11:02:44 2025 +0530
Commit: Hossein 
CommitDate: Mon Feb 3 12:49:54 2025 +0100

tdf#147132 Flatten Basic function implementations

Change-Id: I3a9fe3c74b869195ffa9b34f180e8e58c841d9ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180312
Tested-by: Jenkins
Reviewed-by: Hossein   

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index b36c734253c7..c5a36e7f24a5 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1742,24 +1742,19 @@ void SbRtl_CDateFromUnoDateTime(StarBASIC *, SbxArray & 
rPar, bool)
 // Function to convert date to ISO 8601 date format MMDD
 void SbRtl_CDateToIso(StarBASIC *, SbxArray & rPar, bool)
 {
-if (rPar.Count() == 2)
-{
-double aDate = rPar.Get(1)->GetDate();
+if (rPar.Count() != 2)
+return StarBASIC::Error(ERRCODE_BASIC_BAD_ARGUMENT);
 
-// Date may actually even be -YMMDD
-char Buffer[11];
-sal_Int16 nYear = implGetDateYear( aDate );
-snprintf( Buffer, sizeof( Buffer ), (nYear < 0 ? "%05d%02d%02d" : 
"%04d%02d%02d"),
-static_cast(nYear),
-static_cast(implGetDateMonth( aDate )),
-static_cast(implGetDateDay( aDate )) );
-OUString aRetStr = OUString::createFromAscii( Buffer );
-rPar.Get(0)->PutString(aRetStr);
-}
-else
-{
-StarBASIC::Error( ERRCODE_BASIC_BAD_ARGUMENT );
-}
+double aDate = rPar.Get(1)->GetDate();
+
+// Date may actually even be -YMMDD
+char Buffer[11];
+sal_Int16 nYear = implGetDateYear(aDate);
+snprintf(Buffer, sizeof(Buffer), (nYear < 0 ? "%05d%02d%02d" : 
"%04d%02d%02d"),
+ static_cast(nYear), 
static_cast(implGetDateMonth(aDate)),
+ static_cast(implGetDateDay(aDate)));
+OUString aRetStr = OUString::createFromAscii(Buffer);
+rPar.Get(0)->PutString(aRetStr);
 }
 
 // Function to convert date from ISO 8601 date format MMDD or -MM-DD


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

2025-02-03 Thread Jaume Pujantell (via logerrit)
 sd/qa/unit/data/odp/dupmastermultlayouts.odp |binary
 sd/qa/unit/export-tests-ooxml4.cxx   |   35 +++
 sd/source/filter/eppt/pptx-epptooxml.cxx |   40 ---
 3 files changed, 60 insertions(+), 15 deletions(-)

New commits:
commit b766b917517b95982002abe8eb034ca9c55a2a5b
Author: Jaume Pujantell 
AuthorDate: Mon Feb 3 11:06:28 2025 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 3 12:58:06 2025 +0100

sd: pptx export every layout used

Regression from commit 9205b4eb09dcb4c91539e092db521154fc4e9523. On
conversion from odp or ppt to pptx, some slide layouts were not saved if
their masters were seen as equivalent.

When reducing duplicated masters, only the layouts used in the Impress
masters were saved for each duplicated masters. But when converting from
other formats that handle masters/layouts differently it's necessary to
search for all used layouts in each Impress slide that uses each
duplicated master.

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

diff --git a/sd/qa/unit/data/odp/dupmastermultlayouts.odp 
b/sd/qa/unit/data/odp/dupmastermultlayouts.odp
new file mode 100644
index ..c68ade8a08e1
Binary files /dev/null and b/sd/qa/unit/data/odp/dupmastermultlayouts.odp differ
diff --git a/sd/qa/unit/export-tests-ooxml4.cxx 
b/sd/qa/unit/export-tests-ooxml4.cxx
index ada03b88a2dc..d60946adb451 100644
--- a/sd/qa/unit/export-tests-ooxml4.cxx
+++ b/sd/qa/unit/export-tests-ooxml4.cxx
@@ -1198,6 +1198,41 @@ CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, 
testDeduplicateMasters)
 CPPUNIT_ASSERT_EQUAL(Color(0x00), nColor);
 }
 
+CPPUNIT_TEST_FIXTURE(SdOOXMLExportTest4, testConvertWithMasterDeduplication)
+{
+createSdImpressDoc("odp/dupmastermultlayouts.odp");
+save("Impress Office Open XML");
+
+uno::Reference xNameAccess
+= 
packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory),
+  maTempFile.GetURL());
+
+// For each slide check that it's layout exists
+for (int i = 1; i <= 4; ++i)
+{
+xmlDocUniquePtr pXmlDocRels
+= parseExport("ppt/slides/_rels/slide" + OUString::number(i) + 
".xml.rels");
+
+assertXPath(
+pXmlDocRels,
+
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])"_ostr);
+// the relative target e.g. "../slideLayouts/slideLayout2.xml"
+OUString sRelativeLayoutPath = getXPathContent(
+pXmlDocRels,
+
"(/rels:Relationships/rels:Relationship[@Type='http://schemas.openxmlformats.org/officeDocument/2006/relationships/slideLayout'])/@Target"_ostr);
+
+// Check that the referenced slideLayout files exist
+// Without the accompanying fix in place, this test would have failed 
with:
+// equality assertion failed
+// - Expected: 1
+// - Actual  : 0
+// i.e. the referenced slideLayout file was missing on export.
+OUString sSlideLayoutName = sRelativeLayoutPath.getToken(2, '/');
+CPPUNIT_ASSERT_EQUAL(true,
+ bool(xNameAccess->hasByName("ppt/slideLayouts/" + 
sSlideLayoutName)));
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx 
b/sd/source/filter/eppt/pptx-epptooxml.cxx
index a9f2fa4603ab..1e4b10dde411 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -1569,15 +1569,18 @@ void PowerPointExport::ImplWriteSlideMaster(sal_uInt32 
nPageNum, Reference< XPro
 if (nPageNum != GetEquivalentMasterPage(nPageNum)
 && GetEquivalentMasterPage(nPageNum) != SAL_MAX_UINT32)
 {
-// It's equivalent to an already written master, write only the layout 
file
-if (maMastersLayouts[nPageNum].second != -1)
+// It's equivalent to an already written master, write only the 
layouts files
+OUString aSlideName;
+Reference xNamed(mXDrawPage, UNO_QUERY);
+if (xNamed.is())
+aSlideName = xNamed->getName();
+for (int i = 0; i < OOXML_LAYOUT_SIZE; ++i)
 {
-OUString aSlideName;
-Reference xNamed(mXDrawPage, UNO_QUERY);
-if (xNamed.is())
-aSlideName = xNamed->getName();
-ImplWritePPTXLayoutWithContent(maMastersLayouts[nPageNum].second, 
nPageNum, aSlideName,
-   aXBackgroundPropSet);
+if (mLayoutInfo[i].mnFileIdArray.size() > nPageNum
+&& mLayoutInfo[i].mnFileIdArray[nPageNum] > 0)
+{
+ImplWritePPTXLayoutWithCon

core.git: Branch 'libreoffice-25-2' - readlicense_oo/docs

2025-02-03 Thread Ilmari Lauhakangas (via logerrit)
 readlicense_oo/docs/readme.xrm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 76de1ce7b7bf1bdae2708ee517058765d7cf0934
Author: Ilmari Lauhakangas 
AuthorDate: Mon Feb 3 12:07:50 2025 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Mon Feb 3 15:01:41 2025 +0100

tdf#165005 Fix URL to community forum in readme

Change-Id: I11a2d9bd4ffcface3f3b0841aaf921dc5b0bca69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181034
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Jenkins
(cherry picked from commit 86429ad22f715d2e715d0bb4cb052e5194a23d01)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181040
Tested-by: Ilmari Lauhakangas 

diff --git a/readlicense_oo/docs/readme.xrm b/readlicense_oo/docs/readme.xrm
index 467fe288b8ab..2219c97ad027 100644
--- a/readlicense_oo/docs/readme.xrm
+++ b/readlicense_oo/docs/readme.xrm
@@ -166,7 +166,7 @@
 

User Support
-   The https://www.libreoffice.org/get-help/community-support/";>main support 
page offers various possibilities for help with ${PRODUCTNAME}. Your 
question may have already been answered - check the Community Forum at https://www.documentfoundation.org/nabble/";>https://www.documentfoundation.org/nabble/
 or search the archives of the 'us...@libreoffice.org' mailing list at https://www.libreoffice.org/lists/users/";>https://www.libreoffice.org/lists/users/.
 Alternatively, you can send in your questions to mailto:us...@libreoffice.org";>us...@libreoffice.org. If you like to 
subscribe to the list (to get email responses), send an empty mail to: mailto:users+subscr...@libreoffice.org";>users+subscr...@libreoffice.org.
+   The https://www.libreoffice.org/get-help/community-support/";>main support 
page offers various possibilities for help with ${PRODUCTNAME}. Your 
question may have already been answered - check the Community Forum at https://ask.libreoffice.org/";>https://ask.libreoffice.org/ or search 
the archives of the 'us...@libreoffice.org' mailing list at https://www.libreoffice.org/lists/users/";>https://www.libreoffice.org/lists/users/.
 Alternatively, you can send in your questions to mailto:us...@libreoffice.org";>us...@libreoffice.org. If you like to 
subscribe to the list (to get email responses), send an empty mail to: mailto:users+subscr...@libreoffice.org";>users+subscr...@libreoffice.org.
Also check the 
FAQ section at https://www.libreoffice.org/get-help/frequently-asked-questions/";>the 
LibreOffice website.

 


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

2025-02-03 Thread Miklos Vajna (via logerrit)
 xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 723ecfa63f5218b2f06f0a807b56869b80a19fe2
Author: Miklos Vajna 
AuthorDate: Tue Jan 28 16:38:10 2025 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 3 15:03:13 2025 +0100

tdf#161872 xmlsecurity nss: don't require trusted signing certs

Configure your signing cert in Firefox, (unusually) don't trust the CA
that you would use to issue your signing cert, try to sign a document,
error.

This is reportedly wrong since commit
bfd479abf0d1d8ce36c3b0dcc6c824216f88a95b (Update libxmlsec to 1.3.1,
2023-06-09), for some reason our usage of libxmlsec-1.2 didn't trigger
this problem.

Given that we already disable libxmlsec-side cert verify while
verifying a signature (and have our own logic there), it's consistent to
do the same while creating the signature, and that fixes the bug, too.

The Windows / MSCNG backend is not yet changed here.

Change-Id: I8a7adf06b9a26731f1a180a4f6257317084e414a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180844
Tested-by: Jenkins
Reviewed-by: Miklos Vajna 
(cherry picked from commit 1817760f56b74e47120c1b4d7641fbaebcf378ad)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180885
Reviewed-by: Moritz Duge 
Reviewed-by: Xisco Fauli 

diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx 
b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index ce61942dda27..feb31594f5d4 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -150,6 +150,7 @@ SAL_CALL XMLSignature_NssImpl::generate(
 }
 
 //Sign the template
+pDsigCtx->keyInfoReadCtx.flags |= 
XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS;
 if( xmlSecDSigCtxSign( pDsigCtx.get() , pNode ) == 0 )
 {
 if (pDsigCtx->status == xmlSecDSigStatusSucceeded)


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

2025-02-03 Thread Miklos Vajna (via logerrit)
 xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit b9c8f8a0fb0f56fc91b4882afcc06041796f1ca3
Author: Miklos Vajna 
AuthorDate: Wed Jan 29 09:40:46 2025 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 3 15:03:43 2025 +0100

tdf#161872 xmlsecurity mscrypt: don't require trusted signing certs

See commit 1817760f56b74e47120c1b4d7641fbaebcf378ad (tdf#161872
xmlsecurity nss: don't require trusted signing certs, 2025-01-28), this
is the same situation, but this time on Windows.

Change-Id: I945899da47ab5dcc421f35db31ec7af240c59b8c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180881
Reviewed-by: Miklos Vajna 
Tested-by: Jenkins
(cherry picked from commit ec9dbbe288ccb759ed95533fb849dac8a65c4a6b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180886
Reviewed-by: Moritz Duge 
Reviewed-by: Xisco Fauli 

diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx 
b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index 581249292f1a..1014addbff27 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -143,6 +143,7 @@ SAL_CALL XMLSignature_MSCryptImpl::generate(
 }
 
 //Sign the template
+pDsigCtx->keyInfoReadCtx.flags |= 
XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS;
 if( xmlSecDSigCtxSign( pDsigCtx , pNode ) == 0 )
 {
 if (pDsigCtx->status == xmlSecDSigStatusSucceeded)


core.git: sc/qa sc/source

2025-02-03 Thread Balazs Varga (via logerrit)
 sc/qa/unit/ucalc_formula.cxx |   72 +++
 sc/source/core/tool/compiler.cxx |   29 +++
 2 files changed, 101 insertions(+)

New commits:
commit b89047a0f0100fb30121084cf42815aa792c1f88
Author: Balazs Varga 
AuthorDate: Mon Jan 27 09:57:25 2025 +0100
Commit: Balazs Varga 
CommitDate: Mon Feb 3 12:54:01 2025 +0100

tdf#164843 - sc optimize "SubTotal" function's reference ranges

Double references from relative named ranges can point to large
ranges (MAXCOL/MAXROW) and because of that some function evaluation
like SubTotal can be extreamly slow when we call 
ScTable::CompileHybridFormula
with these large ranges. Since all the SubTotal functions ignore empty cells
its worth to optimize and trim the double references in SubTotal functions.

Change-Id: I9340b520cd3ac333b63b4aec35a3c647f5d9a119
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180773
Tested-by: Gabor Kelemen 
Tested-by: Jenkins
Reviewed-by: Gabor Kelemen 

diff --git a/sc/qa/unit/ucalc_formula.cxx b/sc/qa/unit/ucalc_formula.cxx
index 40d2c6f174de..4dd944fb1774 100644
--- a/sc/qa/unit/ucalc_formula.cxx
+++ b/sc/qa/unit/ucalc_formula.cxx
@@ -4761,6 +4761,78 @@ CPPUNIT_TEST_FIXTURE(TestFormula, testFuncSUMPRODUCT)
 m_pDoc->DeleteTab(0);
 }
 
+CPPUNIT_TEST_FIXTURE(TestFormula, testFuncSUBTOTAL)
+{
+m_pDoc->InsertTab(0, u"Formula"_ustr);
+
+sc::AutoCalcSwitch aACSwitch(*m_pDoc, true); // turn auto calc on.
+
+// Fill C1:C1025 with values and insert formulas in D1:D1025 using the 
named expression.
+for (size_t i = 0; i < 1025; i++)
+m_pDoc->SetValue(ScAddress(2, i, 0), i + 1);
+
+// Add a named expression for a function.
+ScRangeName* pGlobalNames = m_pDoc->GetRangeName();
+CPPUNIT_ASSERT_MESSAGE("Failed to obtain global named expression object.", 
pGlobalNames);
+ScRangeData* pName = new ScRangeData(
+*m_pDoc, u"MyRelative"_ustr, u"$C1:$C$1000"_ustr, ScAddress(2, 999, 0),
+ScRangeData::Type::Name, formula::FormulaGrammar::GRAM_NATIVE);
+
+bool bInserted = pGlobalNames->insert(pName);
+CPPUNIT_ASSERT_MESSAGE("Failed to insert a new name.", bInserted);
+
+for (size_t i = 0; i < 1025; i++)
+m_pDoc->SetString(ScAddress(3, i, 0), 
u"=IF(SUBTOTAL(3;MyRelative)=1;"";SUBTOTAL(3;MyRelative))"_ustr);
+
+// Make sure the results are correct.
+for (size_t i = 0; i < 1025; i++)
+{
+if (i < 999.0)
+CPPUNIT_ASSERT_EQUAL(26.0, m_pDoc->GetValue(3, i, 0));
+else
+CPPUNIT_ASSERT_EQUAL((1000.0 - (i - 999.0)), m_pDoc->GetValue(3, 
i, 0));
+}
+
+ScRange aTrimedRange(2, 999, 0, 2, 1024, 0);
+ScRange aValidRange(2, 0, 0, 2, 999, 0);
+for (size_t i = 0; i < 1025; i++)
+{
+ScFormulaCell* pCell = m_pDoc->GetFormulaCell(ScAddress(3, i, 0));
+ScTokenArray* pCode = pCell->GetCode();
+sal_uInt16 nLen = pCode->GetCodeLen();
+FormulaToken** pRPNArray = pCode->GetCode();
+OUString aCellName = pCell->aPos.GetColRowString();
+
+for (sal_uInt16 nIdx = 0; nIdx < nLen; ++nIdx)
+{
+FormulaToken* pTok = pRPNArray[nIdx];
+if (pTok && pTok->GetType() == svDoubleRef)
+{
+ScRange aRange = pTok->GetDoubleRef()->toAbs(*m_pDoc, 
ScAddress(3, i, 0));
+if (i < 999)
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE(OUString("Double ref is 
incorrectly trimmed in: " + aCellName).toUtf8().getStr(),
+aRange, aTrimedRange);
+// Without the trim it would failed with
+// assertion failed
+// - Expression: aRange == aTrimedRange
+// - Double ref is incorrectly trimmed in : D1
+// ScRange aTrimmableRange(2, 999, 0, 0, 1048575, 0);
+}
+else
+{
+CPPUNIT_ASSERT_EQUAL_MESSAGE(OUString("Double ref is 
incorrectly trimmed in: " + aCellName).toUtf8().getStr(),
+aRange, aValidRange);
+}
+}
+}
+if (i >= 999)
+aValidRange.aStart.IncRow();
+}
+
+m_pDoc->DeleteTab(0);
+}
+
 CPPUNIT_TEST_FIXTURE(TestFormula, testFuncSUMXMY2)
 {
 m_pDoc->InsertTab(0, u"Test SumXMY2"_ustr);
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 90f67c3eec22..07d59de2df16 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6817,6 +6817,35 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 --ppTok;
 }
 }
+else if (eOpCode == ocSubTotal)
+{
+// tdf#164843: Double references from relative named ranges can point 
to large
+// ranges (MAXCOL/MAXROW) and because of that some function evaluation
+// like SubTotal can be extreamly slow when we call 

core.git: Branch 'distro/cib/libreoffice-6-4' - formula/source include/formula sc/inc sc/qa sc/source

2025-02-03 Thread Dennis Francis (via logerrit)
 formula/source/core/api/FormulaCompiler.cxx |7 +
 include/formula/FormulaCompiler.hxx |2 
 sc/inc/compiler.hxx |2 
 sc/inc/refdata.hxx  |8 ++
 sc/qa/unit/ucalc.hxx|2 
 sc/qa/unit/ucalc_formula.cxx|  109 
 sc/source/core/tool/compiler.cxx|   98 +
 sc/source/core/tool/interpr5.cxx|   17 
 8 files changed, 245 insertions(+)

New commits:
commit 627bcc5ae23239cf6ba6acb28b706c460e9ade5b
Author: Dennis Francis 
AuthorDate: Wed Jan 6 17:44:00 2021 +0530
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 12:37:11 2025 +0100

tdf#133858 reduce the double-ref range to data content

in certain matrix formulas like SUM(IF(A1=G:G, H:H)*B1/B2) where whole
columns are used for comparison in the condition of IF ultimately
followed by a reducer like SUM. In such cases we can safely reduce the
double-refs involved in the comparison to the sheet area where there is
data before converting the data to ScMatrix.

This is a more restricted version of Noel's fix in
37ffe509ef011357123642577c04ff296d59ce68

Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109050
Reviewed-by: Luboš Luňák 
Tested-by: Jenkins CollaboraOffice 
(cherry picked from commit 65167a9265acfea04733b5ff6ee3220a9da624f4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109118
Tested-by: Jenkins
Reviewed-by: Dennis Francis 
(cherry picked from commit b14107dd0eaf9bfc276544e1900873d36075425e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109290
Reviewed-by: Xisco Fauli 

Change-Id: I1c2e8985adedb3f4c4648f541fb0e8e7d0fae033
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180972
Tested-by: allotropia jenkins 
Reviewed-by: Thorsten Behrens 

diff --git a/formula/source/core/api/FormulaCompiler.cxx 
b/formula/source/core/api/FormulaCompiler.cxx
index 16e58f9c8e71..8ea06dc2f61b 100644
--- a/formula/source/core/api/FormulaCompiler.cxx
+++ b/formula/source/core/api/FormulaCompiler.cxx
@@ -1676,18 +1676,25 @@ void FormulaCompiler::Factor()
 HandleIIOpCode(pFacToken, pArgArray,
std::min(nSepCount, 
static_cast(FORMULA_MAXPARAMSII)));
 }
+bool bDone = false;
 if (bBadName)
 ;   // nothing, keep current token for return
 else if (eOp != ocClose)
 SetError( FormulaError::PairExpected);
 else
+{
 NextToken();
+bDone = true;
+}
 // Jumps are just normal functions for the FunctionAutoPilot tree 
view
 if (!mbJumpCommandReorder && pFacToken->GetType() == svJump)
 pFacToken = new FormulaFAPToken( pFacToken->GetOpCode(), 
nSepCount, pFacToken );
 else
 pFacToken->SetByte( nSepCount );
 PutCode( pFacToken );
+
+if (bDone)
+AnnotateOperands();
 }
 else if (IsOpCodeJumpCommand(eOp))
 {
diff --git a/include/formula/FormulaCompiler.hxx 
b/include/formula/FormulaCompiler.hxx
index 185dd7a04ada..48fb18c53623 100644
--- a/include/formula/FormulaCompiler.hxx
+++ b/include/formula/FormulaCompiler.hxx
@@ -334,6 +334,8 @@ protected:
 // Called from CompileTokenArray() after RPN code generation is done.
 virtual void PostProcessCode() {}
 
+virtual void AnnotateOperands() {}
+
 OUStringaCorrectedFormula;  // autocorrected Formula
 OUStringaCorrectedSymbol;   // autocorrected Symbol
 
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index b45af659ecab..02734454de82 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -507,10 +507,12 @@ private:
 bool HandleIIOpCodeInternal(formula::FormulaToken* token, 
formula::FormulaToken*** pppToken, sal_uInt8 nNumParams);
 bool SkipImplicitIntersectionOptimization(const formula::FormulaToken* 
token) const;
 virtual void PostProcessCode() override;
+virtual void AnnotateOperands() override;
 static bool ParameterMayBeImplicitIntersection(const 
formula::FormulaToken* token, int parameter);
 void ReplaceDoubleRefII(formula::FormulaToken** ppDoubleRefTok);
 bool AdjustSumRangeShape(const ScComplexRefData& rBaseRange, 
ScComplexRefData& rSumRange);
 void CorrectSumRange(const ScComplexRefData& rBaseRange, ScComplexRefData& 
rSumRange, formula::FormulaToken** ppSumRangeToken);
+void AnnotateTrimOnDoubleRefs();
 };
 
 #endif
diff --git a/sc/inc/refdata.hxx b/sc/inc/refdata.hxx
index f46e13e60821..6edd7160cc04 100644
--- a/sc/inc/refdata.hxx
+++ b/sc/inc/refdata.hxx
@@ -121,6 +121,11 @@ struct ScComplexRefData
 {
 ScSingleRefData Ref1;
 ScSingleRefData Ref2;
+bool bTrimToData;
+
+ScComplexRefData

core.git: sw/qa

2025-02-03 Thread Gökay Şatır (via logerrit)
 sw/qa/core/txtnode/data/comment-reply-copy.odt |binary
 sw/qa/core/txtnode/txtnode.cxx |   36 +
 2 files changed, 36 insertions(+)

New commits:
commit 8b9bfe98259c54ba6e9407d3c486436965cdf7db
Author: Gökay Şatır 
AuthorDate: Fri Nov 29 10:55:27 2024 +0300
Commit: Miklos Vajna 
CommitDate: Mon Feb 3 12:55:15 2025 +0100

cool#10610: Test for ensuring the parent-child relations of comments.

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

diff --git a/sw/qa/core/txtnode/data/comment-reply-copy.odt 
b/sw/qa/core/txtnode/data/comment-reply-copy.odt
new file mode 100644
index ..0a046e2f85fc
Binary files /dev/null and b/sw/qa/core/txtnode/data/comment-reply-copy.odt 
differ
diff --git a/sw/qa/core/txtnode/txtnode.cxx b/sw/qa/core/txtnode/txtnode.cxx
index 1882602c8d93..0533c3601395 100644
--- a/sw/qa/core/txtnode/txtnode.cxx
+++ b/sw/qa/core/txtnode/txtnode.cxx
@@ -41,6 +41,9 @@
 #include 
 #include 
 #include 
+#include 
+#include 
+#include 
 
 /// Covers sw/source/core/txtnode/ fixes.
 class SwCoreTxtnodeTest : public SwModelTestBase
@@ -549,6 +552,39 @@ CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, 
testPlainContentControlCopy)
 mxComponent.clear();
 }
 
+CPPUNIT_TEST_FIXTURE(SwCoreTxtnodeTest, testCopyCommentsWithReplies)
+{
+createSwDoc("comment-reply-copy.odt");
+
+SwXTextDocument* pTextDoc = 
dynamic_cast(mxComponent.get());
+SwDocShell* pShell = pTextDoc->GetDocShell();
+SwWrtShell* pWrtShell = pShell->GetWrtShell();
+SwDoc aClipboard;
+pWrtShell->SelAll();
+pWrtShell->Copy(aClipboard);
+pWrtShell->SttEndDoc(/*bStart=*/false); // Send the cursor to the end of 
the document.
+pWrtShell->Paste(aClipboard);
+
+// Now we have selected all text (which is one line) and pasted it to the 
end.
+// A comment and its reply should also be copied to the end of the 
document.
+// We will check if our reply is referencing its copied parent instead of 
the source parent.
+
+SwPostItMgr* postItManager = pWrtShell->GetPostItMgr();
+
+std::vector comments;
+
+Scheduler::ProcessEventsToIdle();
+
+for (const auto& pItem : *postItManager) // There should be 4.
+{
+comments.push_back(pItem->mpPostIt->GetPostItField());
+}
+
+//   parents (original-copied), replies (original-copied)
+CPPUNIT_ASSERT_EQUAL(comments[0]->GetName(), comments[1]->GetParentName());
+CPPUNIT_ASSERT_EQUAL(comments[2]->GetName(), comments[3]->GetParentName());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


core.git: readlicense_oo/docs

2025-02-03 Thread Ilmari Lauhakangas (via logerrit)
 readlicense_oo/docs/readme.xrm |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 86429ad22f715d2e715d0bb4cb052e5194a23d01
Author: Ilmari Lauhakangas 
AuthorDate: Mon Feb 3 12:07:50 2025 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Mon Feb 3 14:06:03 2025 +0100

tdf#165005 Fix URL to community forum in readme

Change-Id: I11a2d9bd4ffcface3f3b0841aaf921dc5b0bca69
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181034
Reviewed-by: Ilmari Lauhakangas 
Tested-by: Jenkins

diff --git a/readlicense_oo/docs/readme.xrm b/readlicense_oo/docs/readme.xrm
index 39547853eb14..582e977ce7b4 100644
--- a/readlicense_oo/docs/readme.xrm
+++ b/readlicense_oo/docs/readme.xrm
@@ -166,7 +166,7 @@
 

User Support
-   The https://www.libreoffice.org/get-help/community-support/";>main support 
page offers various possibilities for help with ${PRODUCTNAME}. Your 
question may have already been answered - check the Community Forum at https://www.documentfoundation.org/nabble/";>https://www.documentfoundation.org/nabble/
 or search the archives of the 'us...@libreoffice.org' mailing list at https://www.libreoffice.org/lists/users/";>https://www.libreoffice.org/lists/users/.
 Alternatively, you can send in your questions to mailto:us...@libreoffice.org";>us...@libreoffice.org. If you like to 
subscribe to the list (to get email responses), send an empty mail to: mailto:users+subscr...@libreoffice.org";>users+subscr...@libreoffice.org.
+   The https://www.libreoffice.org/get-help/community-support/";>main support 
page offers various possibilities for help with ${PRODUCTNAME}. Your 
question may have already been answered - check the Community Forum at https://ask.libreoffice.org/";>https://ask.libreoffice.org/ or search 
the archives of the 'us...@libreoffice.org' mailing list at https://www.libreoffice.org/lists/users/";>https://www.libreoffice.org/lists/users/.
 Alternatively, you can send in your questions to mailto:us...@libreoffice.org";>us...@libreoffice.org. If you like to 
subscribe to the list (to get email responses), send an empty mail to: mailto:users+subscr...@libreoffice.org";>users+subscr...@libreoffice.org.
Also check the 
FAQ section at https://www.libreoffice.org/get-help/frequently-asked-questions/";>the 
LibreOffice website.

 


core.git: sw/source

2025-02-03 Thread Xisco Fauli (via logerrit)
 sw/source/core/layout/tabfrm.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 689a004df332888d5eca0b3386b84c82744e2b74
Author: Xisco Fauli 
AuthorDate: Mon Feb 3 14:27:52 2025 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 3 16:05:27 2025 +0100

sw: fix wrong condition

Changed by mistake in
commit 6b09bec95747d3bd9871bab3f49142a2fca2d368
Author: Xisco Fauli 
Date:   Fri Nov 29 18:36:52 2024 +0100

sw: use SAL_RET_MAYBENULL in Lower()

Kudos to Michael S. for finding it

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

diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 56f381729bb8..e61ccacaaafb 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -6130,7 +6130,7 @@ void SwCellFrame::Format( vcl::RenderContext* 
/*pRenderContext*/, const SwBorder
  !IsCoveredCell() &&
  (pPg = FindPageFrame())!=nullptr )
 {
-if ( !pLower->IsContentFrame() && pLower->IsSctFrame() && 
!pLower->IsTabFrame() )
+if ( !pLower->IsContentFrame() && !pLower->IsSctFrame() && 
!pLower->IsTabFrame() )
 {
 // OSL_ENSURE(for HTML-import!
 OSL_ENSURE( false, "VAlign to cell without content" );


core.git: sc/qa

2025-02-03 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/data/functions/date_time/fods/weekday.fods |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit afc90ce5850249bfb043ab274e6838c0c0010e06
Author: Xisco Fauli 
AuthorDate: Mon Feb 3 15:14:20 2025 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 3 17:44:05 2025 +0100

sc: a13ú -> A13

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

diff --git a/sc/qa/unit/data/functions/date_time/fods/weekday.fods 
b/sc/qa/unit/data/functions/date_time/fods/weekday.fods
index 16f35fdcfc21..7a8bf5343893 100644
--- a/sc/qa/unit/data/functions/date_time/fods/weekday.fods
+++ b/sc/qa/unit/data/functions/date_time/fods/weekday.fods
@@ -782,7 +782,7 @@
  
   Err
  
- 
+ 
   PRAVDA
  
  


core.git: sc/qa

2025-02-03 Thread Andras Timar (via logerrit)
 sc/qa/unit/data/functions/date_time/fods/weeknum.fods |   22 +-
 1 file changed, 11 insertions(+), 11 deletions(-)

New commits:
commit a6c1ed0e9c3bbd87d483ecb7c5d667418ffb650e
Author: Andras Timar 
AuthorDate: Mon Feb 3 14:44:10 2025 +0100
Commit: Andras Timar 
CommitDate: Mon Feb 3 17:46:27 2025 +0100

Fixed WEEKNUMBER test sheet, ISERROR(a13ú) did not seem right

Change-Id: I01ccd512d38c887bfcf834ef2fbfcf46a2e98246
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181047
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods 
b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
index a4e1c08ebbd6..655ca400fef9 100644
--- a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
+++ b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
@@ -825,7 +825,7 @@
  
   Err
  
- 
+ 
   PRAVDA
  
  
@@ -840,7 +840,7 @@
  
   30
  
- 
+ 
   PRAVDA
  
  
@@ -855,7 +855,7 @@
  
   30
  
- 
+ 
   PRAVDA
  
  
@@ -871,7 +871,7 @@
  
   30
  
- 
+ 
   PRAVDA
  
  
@@ -886,7 +886,7 @@
  
   30
  
- 
+ 
   PRAVDA
  
  
@@ -901,7 +901,7 @@
  
   30
  
- 
+ 
   PRAVDA
  
  
@@ -919,7 +919,7 @@
  
   31
  
- 
+ 
   PRAVDA
  
  
@@ -934,7 +934,7 @@
  
   31
  
- 
+ 
   PRAVDA
  
  
@@ -949,7 +949,7 @@
  
   29
  
- 
+ 
   PRAVDA
  
  
@@ -964,7 +964,7 @@
  
   29
  
- 
+ 
   PRAVDA
  
  
@@ -1008,4 +1008,4 @@

   
  
-
\ No newline at end of file
+


core.git: Branch 'distro/cib/libreoffice-6-4' - sc/source

2025-02-03 Thread Noel Grandin (via logerrit)
 sc/source/core/tool/compiler.cxx |  225 +++
 1 file changed, 157 insertions(+), 68 deletions(-)

New commits:
commit 18608dfa02000f1702eeb6f971001cacdbd662b3
Author: Noel Grandin 
AuthorDate: Wed Dec 28 17:30:12 2022 +0200
Commit: Thorsten Behrens 
CommitDate: Mon Feb 3 13:33:43 2025 +0100

optimise SUMPRODUCT(IF..) where we have entire column/row ranges

following the same pattern as for SUM, set those ranges to shrink to
available data.

Takes it from 3s to <500ms on my test spreadsheet.

Change-Id: I53ada996393a063b12ef7dd0f9bff40c90ecc8be
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144850
Tested-by: Jenkins
Reviewed-by: Noel Grandin 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180973
Reviewed-by: Thorsten Behrens 
Tested-by: allotropia jenkins 
Tested-by: Thorsten Behrens 

diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index 17a1cce61cd0..1a6833204f0b 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -6267,89 +6267,178 @@ void ScCompiler::AnnotateTrimOnDoubleRefs()
 // OpCode of the "root" operator (which is already in RPN array).
 OpCode eOpCode = (*(pCode - 1))->GetOpCode();
 // eOpCode can be some operator which does not change with operands with 
or contains zero values.
-if (eOpCode != ocSum)
-return;
+if (eOpCode == ocSum)
+{
+FormulaToken** ppTok = pCode - 2; // exclude the root operator.
+// The following loop runs till a "pattern" is found or there is a 
mismatch
+// and marks the push DoubleRef arguments as trimmable when there is a 
match.
+// The pattern is
+// SUM(IF(=, ))
+// such that one of the operands of ocEqual is a double-ref.
+// Examples of formula that matches this are:
+//   SUM(IF(D:D=$A$1,F:F)*$H$1*2.3/$G$2)
+//   SUM((IF(D:D=$A$1,F:F)*$H$1*2.3/$G$2)*$H$2*5/$G$3)
+//   SUM(IF(E:E=16,F:F)*$H$1*100)
+bool bTillClose = true;
+bool bCloseTillIf = false;
+sal_Int16 nToksTillIf = 0;
+constexpr sal_Int16 MAXDIST_IF = 15;
+while (*ppTok)
+{
+FormulaToken* pTok = *ppTok;
+OpCode eCurrOp = pTok->GetOpCode();
+++nToksTillIf;
+
+// TODO : Is there a better way to handle this ?
+// ocIf is too far off from the sum opcode.
+if (nToksTillIf > MAXDIST_IF)
+return;
 
-FormulaToken** ppTok = pCode - 2; // exclude the root operator.
-// The following loop runs till a "pattern" is found or there is a mismatch
-// and marks the push DoubleRef arguments as trimmable when there is a 
match.
-// The pattern is
-// SUM(IF(=, ))
-// such that one of the operands of ocEqual is a double-ref.
-// Examples of formula that matches this are:
-//   SUM(IF(D:D=$A$1,F:F)*$H$1*2.3/$G$2)
-//   SUM((IF(D:D=$A$1,F:F)*$H$1*2.3/$G$2)*$H$2*5/$G$3)
-//   SUM(IF(E:E=16,F:F)*$H$1*100)
-bool bTillClose = true;
-bool bCloseTillIf = false;
-sal_Int16 nToksTillIf = 0;
-constexpr sal_Int16 MAXDIST_IF = 15;
-while (*ppTok)
-{
-FormulaToken* pTok = *ppTok;
-OpCode eCurrOp = pTok->GetOpCode();
-++nToksTillIf;
-
-// TODO : Is there a better way to handle this ?
-// ocIf is too far off from the sum opcode.
-if (nToksTillIf > MAXDIST_IF)
-return;
+switch (eCurrOp)
+{
+case ocDiv:
+case ocMul:
+if (!bTillClose)
+return;
+break;
+case ocPush:
 
-switch (eCurrOp)
-{
-case ocDiv:
-case ocMul:
-if (!bTillClose)
-return;
-break;
-case ocPush:
+break;
+case ocClose:
+if (bTillClose)
+{
+bTillClose = false;
+bCloseTillIf = true;
+}
+else
+return;
+break;
+case ocIf:
+{
+if (!bCloseTillIf)
+return;
 
-break;
-case ocClose:
-if (bTillClose)
-{
-bTillClose = false;
-bCloseTillIf = true;
-}
-else
+if (!pTok->IsInForceArray())
+return;
+
+const short nJumpCount = pTok->GetJump()[0];
+if (nJumpCount != 2) // Should have THEN but no ELSE.
+return;
+
+OpCode eCompOp = (*(ppTok - 1))->Ge

core.git: sc/qa sc/source

2025-02-03 Thread Andras Timar (via logerrit)
 sc/qa/unit/data/functions/date_time/fods/weeknum.fods |   10 +-
 sc/source/core/tool/interpr2.cxx  |   15 ++-
 2 files changed, 19 insertions(+), 6 deletions(-)

New commits:
commit bfb8dbc4a6a462bc9a836d125faaeafd81daadd9
Author: Andras Timar 
AuthorDate: Mon Feb 3 14:55:54 2025 +0100
Commit: Andras Timar 
CommitDate: Tue Feb 4 07:54:19 2025 +0100

tdf#165011 accept empty second parameter of WEEKNUM spreadsheet function

and treat it like if it was the the default "1".

Change-Id: I618575a7441a2a6650228fc1a29177e294933ce0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/181048
Tested-by: Jenkins
Reviewed-by: Andras Timar 

diff --git a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods 
b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
index 655ca400fef9..4dadb429684f 100644
--- a/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
+++ b/sc/qa/unit/data/functions/date_time/fods/weeknum.fods
@@ -769,13 +769,13 @@
  
 
 
- 
-  Err:502
+ 
+  31
  
- 
-  ERR
+ 
+  31
  
- 
+ 
   PRAVDA
  
  
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 8fa8ffa0f67d..81013d3ed099 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -253,7 +253,20 @@ void ScInterpreter::ScGetWeekOfYear()
 if ( !MustHaveParamCount( nParamCount, 1, 2 ) )
 return;
 
-sal_Int16 nFlag = ( nParamCount == 1 ) ? 1 : GetInt16();
+sal_Int16 nFlag;
+if (nParamCount == 1)
+{
+nFlag = 1;
+}
+else if (GetRawStackType() == svMissing)
+{
+nFlag = 1;
+Pop();
+}
+else
+{
+nFlag = GetInt16();
+}
 
 Date aDate = mrContext.NFGetNullDate();
 aDate.AddDays( GetFloor32());


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

2025-02-03 Thread Caolán McNamara (via logerrit)
 basic/source/runtime/methods.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit a6599458af8e3f2e4758aaef92bfd34b41b36ead
Author: Caolán McNamara 
AuthorDate: Thu Jan 30 12:11:10 2025 +
Commit: Miklos Vajna 
CommitDate: Tue Feb 4 08:21:00 2025 +0100

disable SbRtl_Shell by default in kit-mode

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

diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx
index ad3b638805a2..0ba8658730af 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -44,6 +44,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -3461,6 +3462,13 @@ void SbRtl_Shell(StarBASIC *, SbxArray & rPar, bool)
 }
 else
 {
+// Just go straight to error in this case
+if (comphelper::LibreOfficeKit::isActive())
+{
+StarBASIC::Error(ERRCODE_BASIC_FILE_NOT_FOUND);
+return;
+}
+
 oslProcessOption nOptions = osl_Process_SEARCHPATH | 
osl_Process_DETACHED;
 
 OUString aCmdLine = rPar.Get(1)->GetOUString();


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

2025-02-03 Thread Caolán McNamara (via logerrit)
 sfx2/source/doc/objstor.cxx  |3 ++-
 sfx2/source/doc/sfxbasemodel.cxx |   39 +--
 2 files changed, 23 insertions(+), 19 deletions(-)

New commits:
commit e8fe17a10aaccb3c73e4e3e9cc6883243af09fff
Author: Caolán McNamara 
AuthorDate: Thu Jan 30 14:33:39 2025 +
Commit: Miklos Vajna 
CommitDate: Mon Feb 3 10:39:52 2025 +0100

ucbhelper::Content can do nothing with a "private:stream"

so don't bother, and skip throwing exceptions in this case

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

diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx
index 724c9cc31743..489221257dc0 100644
--- a/sfx2/source/doc/objstor.cxx
+++ b/sfx2/source/doc/objstor.cxx
@@ -1839,7 +1839,8 @@ bool SfxObjectShell::SaveTo_Impl
 aLockUIGuard.Unlock();
 pImpl->bForbidReload = bOldStat;
 
-if ( bOk )
+// ucbhelper::Content is unable to do anything useful with a private:stream
+if (bOk && !rMedium.GetName().equalsIgnoreAsciiCase("private:stream"))
 {
 try
 {
diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx
index a42f9e6703b8..1b1bdff80c12 100644
--- a/sfx2/source/doc/sfxbasemodel.cxx
+++ b/sfx2/source/doc/sfxbasemodel.cxx
@@ -4033,27 +4033,30 @@ OUString SAL_CALL SfxBaseModel::getTitle()
 SfxMedium* pMedium = m_pData->m_pObjectShell->GetMedium();
 if ( pMedium )
 {
-try {
-::ucbhelper::Content aContent( pMedium->GetName(),
-utl::UCBContentHelper::getDefaultCommandEnvironment(),
-comphelper::getProcessComponentContext() );
-const Reference < beans::XPropertySetInfo > xProps
- = aContent.getProperties();
-if ( xProps.is() )
-{
-static constexpr OUString aServerTitle( 
u"TitleOnServer"_ustr );
-if ( xProps->hasPropertyByName( aServerTitle ) )
+if (!pMedium->GetName().equalsIgnoreAsciiCase("private:stream"))
+{
+try {
+::ucbhelper::Content aContent( pMedium->GetName(),
+utl::UCBContentHelper::getDefaultCommandEnvironment(),
+comphelper::getProcessComponentContext() );
+const Reference < beans::XPropertySetInfo > xProps
+ = aContent.getProperties();
+if ( xProps.is() )
 {
-Any aAny = aContent.getPropertyValue( aServerTitle );
-aAny >>= aResult;
+static constexpr OUString aServerTitle( 
u"TitleOnServer"_ustr );
+if ( xProps->hasPropertyByName( aServerTitle ) )
+{
+Any aAny = aContent.getPropertyValue( aServerTitle 
);
+aAny >>= aResult;
+}
 }
 }
-}
-catch (const ucb::ContentCreationException &)
-{
-}
-catch (const ucb::CommandAbortedException &)
-{
+catch (const ucb::ContentCreationException &)
+{
+}
+catch (const ucb::CommandAbortedException &)
+{
+}
 }
 const SfxBoolItem* pRepairedDocItem = 
pMedium->GetItemSet().GetItem(SID_REPAIRPACKAGE, false);
 if ( pRepairedDocItem && pRepairedDocItem->GetValue() )


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

2025-02-03 Thread Caolán McNamara (via logerrit)
 desktop/source/app/cmdlineargs.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 75c1c3a25a36065d25f56a472ad3fcaf645c0041
Author: Caolán McNamara 
AuthorDate: Thu Jan 30 20:37:38 2025 +
Commit: Miklos Vajna 
CommitDate: Mon Feb 3 10:40:28 2025 +0100

Filter out more unwanted command URIs

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

diff --git a/desktop/source/app/cmdlineargs.cxx 
b/desktop/source/app/cmdlineargs.cxx
index 3a3f876f6e90..331e3d309619 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -166,7 +166,7 @@ CommandLineEvent CheckOfficeURI(/* in,out */ OUString& arg, 
CommandLineEvent cur
 if (nURIlen < 0)
 nURIlen = rest2.getLength();
 auto const uri = rest2.subView(0, nURIlen);
-if (INetURLObject(uri).GetProtocol() == INetProtocol::Macro) {
+if (INetURLObject(uri).IsExoticProtocol()) {
 // Let the "Open" machinery process the full command URI (leading to 
failure, by intention,
 // as the "Open" machinery does not know about those command URI 
schemes):
 curEvt = CommandLineEvent::Open;