Joining LibreOffice mailing List - GSOC 2024

2024-01-12 Thread Seturaj Matroja
Greetings,
My name is Seturaj Matroja , a computer engineering student at University
of Waterloo. I am proficient in C,C++,Python and Js.
I'm eager to learn and contribute! and want to join the mailing list

Thank You


core.git: sw/qa writerfilter/source

2024-01-12 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx |6 ++
 writerfilter/source/dmapper/GraphicImport.cxx |7 +++
 2 files changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 29cd541dfcff93a50c2e1ae9eab74f1908214c2e
Author: Justin Luth 
AuthorDate: Fri Jan 12 16:17:03 2024 -0500
Commit: Justin Luth 
CommitDate: Sat Jan 13 01:53:22 2024 +0100

tdf#139915 tdf#159157 writerfilter: fix image position with TEXT_LINE

This is an IMAGE followup to vmiklos' shape/textbox fix in
LO 7.2 commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02

Images follow a different code path, but needed the same treatment.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 2463534dd8ba..0ea69e698807 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -174,10 +174,8 @@ after they are loaded.
 CPPUNIT_ASSERT_EQUAL( OUString( "Red" ), descr2 );
 CPPUNIT_ASSERT_EQUAL( OUString( "Green" ), descr3 );
 
-//FIXME: MS Word shows the image below the line of text, not above it.
-// tdf#139915 This was 826, but it should be -826
-if (isExported())
-CPPUNIT_ASSERT_EQUAL(sal_Int32(-826), getProperty(image1, 
"VertOrientPosition"));
+// tdf#139915/tdf#159157 This was 826, but it should be -826
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-826), getProperty(image1, 
"VertOrientPosition"));
 sal_Int16 nExpected = text::RelOrientation::TEXT_LINE;
 CPPUNIT_ASSERT_EQUAL(nExpected, getProperty(image1, 
"VertOrientRelation"));
 
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx 
b/writerfilter/source/dmapper/GraphicImport.cxx
index 86870565baed..4f0fd03b6db7 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1850,6 +1850,13 @@ uno::Reference 
GraphicImport::createGraphicObject(uno::Refer
 m_pImpl->m_nLeftPosition = 0;
 }
 
+if (m_pImpl->m_nVertRelation == 
text::RelOrientation::TEXT_LINE)
+{
+// Word's "line" is "below the bottom of the line", our 
TEXT_LINE is
+// "towards top, from the bottom of the line", so invert 
the vertical position.
+m_pImpl->m_nTopPosition *= -1;
+}
+
 m_pImpl->applyPosition(xGraphicObjectProperties);
 m_pImpl->applyRelativePosition(xGraphicObjectProperties);
 if( !m_pImpl->m_bOpaque )


core.git: sw/qa sw/source

2024-01-12 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/ooxmlexport19.cxx |1 +
 sw/qa/extras/ooxmlexport/ooxmlexport8.cxx  |8 
 sw/source/filter/ww8/docxsdrexport.cxx |5 +
 3 files changed, 14 insertions(+)

New commits:
commit 81f67b474fad0b8967a7edebcb560daa35b87455
Author: Justin Luth 
AuthorDate: Fri Jan 12 09:34:51 2024 -0500
Commit: Justin Luth 
CommitDate: Sat Jan 13 01:51:52 2024 +0100

tdf#139915 DOCX export: fix anchored obj position with TEXT_LINE

The position of objects was waffling back and forth
between "above" or "below" every round-trip.
For example, the unit test was alternating between 410 and 3951.

make CppunitTest_sw_ooxmlexport19 CPPUNIT_TEST_NAME=testTdf97371

This is an export followup to vmiklos' import fix in
LO 7.2 commit 2f21e4f357ec60450df84ddd858c3cf0a4711b02

I noticed that import still does not correctly position images:
make CppunitTest_sw_ooxmlexport8 CPPUNIT_TEST_NAME=testN747461
so I created tdf#159157 and tdf#159158 as follow-up bugs for that.

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

diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
index 0c1d1a25fb35..d6193305e96c 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx
@@ -609,6 +609,7 @@ DECLARE_OOXMLEXPORT_TEST(testTdf97371, "tdf97371.docx")
 tools::Long nDiff = std::abs(pShape->GetSnapRect().Top() - 
pTextBox->GetSnapRect().Top());
 // The top of the two shapes were 410 and 3951, now it should be 3950 and 
3951.
 CPPUNIT_ASSERT(nDiff < 10);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(tools::Long(3900), 
pShape->GetSnapRect().Top(), 100);
 }
 
 CPPUNIT_TEST_FIXTURE(Test, testTdf99140)
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
index 10fd87ebec2c..2463534dd8ba 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport8.cxx
@@ -173,6 +173,14 @@ after they are loaded.
 CPPUNIT_ASSERT_EQUAL( OUString( "Black" ), descr1 );
 CPPUNIT_ASSERT_EQUAL( OUString( "Red" ), descr2 );
 CPPUNIT_ASSERT_EQUAL( OUString( "Green" ), descr3 );
+
+//FIXME: MS Word shows the image below the line of text, not above it.
+// tdf#139915 This was 826, but it should be -826
+if (isExported())
+CPPUNIT_ASSERT_EQUAL(sal_Int32(-826), getProperty(image1, 
"VertOrientPosition"));
+sal_Int16 nExpected = text::RelOrientation::TEXT_LINE;
+CPPUNIT_ASSERT_EQUAL(nExpected, getProperty(image1, 
"VertOrientRelation"));
+
 }
 
 DECLARE_OOXMLEXPORT_TEST(testN750255, "n750255.docx")
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 310b5c2b5130..4722e7ce4079 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -942,6 +942,11 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 relativeFromV = "paragraph";
 break;
 case text::RelOrientation::TEXT_LINE:
+relativeFromV = "line";
+// Word's "line" is "below the bottom of the line", our 
TEXT_LINE is
+// "towards top, from the bottom of the line", so invert the 
vertical position.
+aPos.Y *= -1;
+break;
 default:
 relativeFromV = "line";
 break;


core.git: sw/source

2024-01-12 Thread Justin Luth (via logerrit)
 sw/source/filter/ww8/docxsdrexport.cxx |   38 -
 1 file changed, 19 insertions(+), 19 deletions(-)

New commits:
commit e86ff39d8c9c6ef8113814ff2bfdce53572812cf
Author: Justin Luth 
AuthorDate: Fri Jan 12 08:34:46 2024 -0500
Commit: Justin Luth 
CommitDate: Sat Jan 13 01:01:08 2024 +0100

simplify docxsdrexport: Get*Orient/GetSurround once

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

diff --git a/sw/source/filter/ww8/docxsdrexport.cxx 
b/sw/source/filter/ww8/docxsdrexport.cxx
index 0c42d28fc6ad..310b5c2b5130 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -669,6 +669,8 @@ void DocxSdrExport::setFlyWrapAttrList(
 
 void DocxSdrExport::startDMLAnchorInline(const SwFrameFormat* pFrameFormat, 
const Size& rSize)
 {
+const SwFormatSurround& rSurround(pFrameFormat->GetSurround());
+
 // Word uses size excluding right edge. Caller writeDMLDrawing and 
writeDiagram are changed for
 // now. ToDo: Look whether the other callers give the size this way.
 m_pImpl->setDrawingOpen(true);
@@ -871,8 +873,9 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 xShapeProps->getPropertyValue("IsFollowingTextFlow") >>= 
bLclInTabCell;
 }
 
-if (pFrameFormat->GetSurround().GetValue() == 
text::WrapTextMode_THROUGH
-&& pFrameFormat->GetHoriOrient().GetRelationOrient() == 
text::RelOrientation::FRAME)
+const SwFormatHoriOrient& rHoriOri(pFrameFormat->GetHoriOrient());
+if (rSurround.GetValue() == text::WrapTextMode_THROUGH
+&& rHoriOri.GetRelationOrient() == text::RelOrientation::FRAME)
 {
 // "In front of text" and horizontal positioning relative to 
Column is ignored on
 // import, add it back here.
@@ -908,8 +911,8 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 
 // Position is either determined by coordinates aPos or alignment 
keywords like 'center'.
 // First prepare them.
-awt::Point aPos(pFrameFormat->GetHoriOrient().GetPos(),
-pFrameFormat->GetVertOrient().GetPos());
+const SwFormatVertOrient& rVertOri(pFrameFormat->GetVertOrient());
+awt::Point aPos(rHoriOri.GetPos(), rVertOri.GetPos());
 
 aPos.X += nPosXDiff; // Make the postponed position move of frames.
 aPos.Y += nPosYDiff;
@@ -921,7 +924,7 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 const char* relativeFromV;
 const char* alignH = nullptr;
 const char* alignV = nullptr;
-switch (pFrameFormat->GetVertOrient().GetRelationOrient())
+switch (rVertOri.GetRelationOrient())
 {
 case text::RelOrientation::PAGE_PRINT_AREA:
 relativeFromV = "margin";
@@ -943,13 +946,12 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 relativeFromV = "line";
 break;
 }
-switch (pFrameFormat->GetVertOrient().GetVertOrient())
+switch (rVertOri.GetVertOrient())
 {
 case text::VertOrientation::TOP:
 case text::VertOrientation::CHAR_TOP:
 case text::VertOrientation::LINE_TOP:
-if (pFrameFormat->GetVertOrient().GetRelationOrient()
-== text::RelOrientation::TEXT_LINE)
+if (rVertOri.GetRelationOrient() == 
text::RelOrientation::TEXT_LINE)
 alignV = "bottom";
 else
 alignV = "top";
@@ -957,8 +959,7 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 case text::VertOrientation::BOTTOM:
 case text::VertOrientation::CHAR_BOTTOM:
 case text::VertOrientation::LINE_BOTTOM:
-if (pFrameFormat->GetVertOrient().GetRelationOrient()
-== text::RelOrientation::TEXT_LINE)
+if (rVertOri.GetRelationOrient() == 
text::RelOrientation::TEXT_LINE)
 alignV = "top";
 else
 alignV = "bottom";
@@ -971,7 +972,7 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 default:
 break;
 }
-switch (pFrameFormat->GetHoriOrient().GetRelationOrient())
+switch (rHoriOri.GetRelationOrient())
 {
 case text::RelOrientation::PAGE_PRINT_AREA:
 relativeFromH = "margin";
@@ -993,7 +994,7 @@ void DocxSdrExport::startDMLAnchorInline(const 
SwFrameFormat* pFrameFormat, cons
 relativeFromH = "column";
 break;
 }
-switch (pFrameFormat->GetHoriOrient().GetHori

core.git: basctl/source basic/source chart2/source oox/source sfx2/source stoc/source sw/source ucb/source

2024-01-12 Thread Caolán McNamara (via logerrit)
 basctl/source/dlged/dlged.cxx|2 +-
 basic/source/classes/eventatt.cxx|2 +-
 chart2/source/view/main/AxisUsage.hxx|2 +-
 oox/source/export/shapes.cxx |2 +-
 sfx2/source/appl/preventduplicateinteraction.cxx |2 +-
 sfx2/source/appl/shutdownicon.cxx|5 +
 stoc/source/inspect/introspection.cxx|4 ++--
 stoc/source/security/access_controller.cxx   |2 +-
 stoc/source/servicemanager/servicemanager.cxx|4 ++--
 sw/source/core/crsr/crstrvl.cxx  |2 +-
 ucb/source/cacher/contentresultsetwrapper.cxx|2 +-
 11 files changed, 13 insertions(+), 16 deletions(-)

New commits:
commit 3808ef2b27a79f55f99543be20c26f0a4ad191b2
Author: Caolán McNamara 
AuthorDate: Fri Jan 12 10:55:35 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 20:21:35 2024 +0100

cid#1545535 COPY_INSTEAD_OF_MOVE

and

cid#1545526 COPY_INSTEAD_OF_MOVE
cid#1545442 COPY_INSTEAD_OF_MOVE
cid#1545426 COPY_INSTEAD_OF_MOVE
cid#1545425 COPY_INSTEAD_OF_MOVE
cid#1545387 COPY_INSTEAD_OF_MOVE
cid#1545379 COPY_INSTEAD_OF_MOVE
cid#1545337 COPY_INSTEAD_OF_MOVE
cid#1545334 COPY_INSTEAD_OF_MOVE
cid#1545289 COPY_INSTEAD_OF_MOVE
cid#1545282 COPY_INSTEAD_OF_MOVE
cid#1545270 COPY_INSTEAD_OF_MOVE
cid#1545237 COPY_INSTEAD_OF_MOVE

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

diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index 2eb099718b5b..be3c4cc1584f 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -427,7 +427,7 @@ Reference< util::XNumberFormatsSupplier > const & 
DlgEditor::GetNumberFormatsSup
 ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
 if ( !m_xSupplier.is() )
 {
-m_xSupplier = xSupplier;
+m_xSupplier = std::move(xSupplier);
 }
 }
 return m_xSupplier;
diff --git a/basic/source/classes/eventatt.cxx 
b/basic/source/classes/eventatt.cxx
index 47930d1f3135..93399726ef11 100644
--- a/basic/source/classes/eventatt.cxx
+++ b/basic/source/classes/eventatt.cxx
@@ -113,7 +113,7 @@ void SFURL_firing_impl( const ScriptEvent& aScriptEvent, 
Any* pRet, const Refere
 Any result = xScript->invoke( inArgs, outIndex, outArgs );
 if ( pRet )
 {
-*pRet = result;
+*pRet = std::move(result);
 }
 }
 catch ( const RuntimeException& )
diff --git a/chart2/source/view/main/AxisUsage.hxx 
b/chart2/source/view/main/AxisUsage.hxx
index 83451870755f..51a32a59b0e1 100644
--- a/chart2/source/view/main/AxisUsage.hxx
+++ b/chart2/source/view/main/AxisUsage.hxx
@@ -73,7 +73,7 @@ public:
 if (nFoundDimension < nDimensionIndex)
 return;
 }
-aCoordinateSystems[pCooSys] = aFullAxisIndex;
+aCoordinateSystems[pCooSys] = std::move(aFullAxisIndex);
 
 //set maximum scale index
 auto aIter = aMaxIndexPerDimension.find(nDimensionIndex);
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 5997728e316b..c0c08c7ccf28 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -552,7 +552,7 @@ ShapeExport& ShapeExport::WriteGroupShape(const 
uno::Reference&
 
 mnXmlNamespace = nSavedNamespace;
 }
-m_xParent = xParent;
+m_xParent = std::move(xParent);
 
 pFS->endElementNS(mnXmlNamespace, nGroupShapeToken);
 return *this;
diff --git a/sfx2/source/appl/preventduplicateinteraction.cxx 
b/sfx2/source/appl/preventduplicateinteraction.cxx
index c7d6341fa8f0..694591225ee4 100644
--- a/sfx2/source/appl/preventduplicateinteraction.cxx
+++ b/sfx2/source/appl/preventduplicateinteraction.cxx
@@ -56,7 +56,7 @@ void PreventDuplicateInteraction::useDefaultUUIHandler()
 
 // SAFE ->
 std::unique_lock aLock(m_aLock);
-m_xHandler = xHandler;
+m_xHandler = std::move(xHandler);
 // <- SAFE
 }
 
diff --git a/sfx2/source/appl/shutdownicon.cxx 
b/sfx2/source/appl/shutdownicon.cxx
index fca7e56b3f3f..0e61f8eb040e 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -464,10 +464,9 @@ void ShutdownIcon::init()
 {
 css::uno::Reference < XDesktop2 > xDesktop = Desktop::create( m_xContext );
 std::unique_lock aGuard(m_aMutex);
-m_xDesktop = xDesktop;
+m_xDesktop = std::move(xDesktop);
 }
 
-
 void ShutdownIcon::disposing(std::unique_lock&)
 {
 m_xContext.clear();
@@ -476,13 +475,11 @@ void 
ShutdownIcon::disposing(std::unique_lock&)
 deInitSystray();
 }
 
-
 // XEventListener
 void SAL_CALL ShutdownIcon::disposing( const css::lang::EventObject& )
 {
 }
 
-
 // XTerminateListener
 void SAL_CALL ShutdownIcon::queryTerm

core.git: Branch 'libreoffice-24-2' - vcl/win

2024-01-12 Thread Mike Kaganski (via logerrit)
 vcl/win/window/salframe.cxx |  126 +++-
 1 file changed, 125 insertions(+), 1 deletion(-)

New commits:
commit 45023ae9619cdc4332afb8f743d1695a23e8d866
Author: Mike Kaganski 
AuthorDate: Wed Jan 10 19:48:16 2024 +0600
Commit: Xisco Fauli 
CommitDate: Fri Jan 12 19:30:52 2024 +0100

tdf#156443, tdf#159079, tdf#158112: support Windows Alt codes >=256

This change in fact disables Alt+NumPad accelerators. Alt+Number will
still work, when Number is from main keyboard.

Since this intercepts Alt+NumPad completely, it also disables movement
of caret ny NumPad arrows, when NumLock is off.

Change-Id: I82a3b0521f94038a84fa4dae2e3b1cfd4d4e23ac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161891
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 772da0f1aa6891a0b31d45d99a5978c65ed24e34)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161860
Reviewed-by: Michael Weghorn 
Reviewed-by: Vernon, Stuart Foote 
Reviewed-by: Xisco Fauli 

diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index cf2c8c6f8b02..1eed596e6c3d 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3522,6 +3522,125 @@ static void FlushIMBeforeShortCut(WinSalFrame* pFrame, 
SalEvent nEvent, sal_uInt
 }
 }
 
+// When Num Lock is off, the key codes from NumPag come as arrows, PgUp/PgDn, 
etc.
+static WORD NumPadFromArrows(WORD vk)
+{
+switch (vk)
+{
+case VK_CLEAR:
+return VK_NUMPAD5;
+case VK_PRIOR:
+return VK_NUMPAD9;
+case VK_NEXT:
+return VK_NUMPAD3;
+case VK_END:
+return VK_NUMPAD1;
+case VK_HOME:
+return VK_NUMPAD7;
+case VK_LEFT:
+return VK_NUMPAD4;
+case VK_UP:
+return VK_NUMPAD8;
+case VK_RIGHT:
+return VK_NUMPAD6;
+case VK_DOWN:
+return VK_NUMPAD2;
+case VK_INSERT:
+return VK_NUMPAD0;
+default:
+return vk;
+}
+}
+
+static bool HandleAltNumPadCode(HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM 
lParam)
+{
+struct
+{
+bool started = false;
+//static bool hex = false; // TODO: support HKEY_CURRENT_USER\Control 
Panel\Input Method\EnableHexNumpad
+sal_UCS4 ch = 0;
+bool wait_WM_CHAR = false;
+void clear()
+{
+started = false;
+ch = 0;
+wait_WM_CHAR = false;
+}
+} static state;
+
+WORD vk = LOWORD(wParam);
+WORD keyFlags = HIWORD(lParam);
+
+switch (nMsg)
+{
+case WM_CHAR:
+if (state.wait_WM_CHAR && MapVirtualKeyW(LOBYTE(keyFlags), 
MAPVK_VSC_TO_VK) == VK_MENU)
+{
+state.clear();
+// Ignore it - it is synthetized (incorrect, truncated) 
character from system
+return true;
+}
+
+break;
+
+case WM_SYSKEYDOWN:
+if (vk == VK_MENU)
+{
+if (!(keyFlags & KF_REPEAT))
+state.clear();
+state.started = true;
+return true;
+}
+
+if (!state.started)
+break;
+
+if (keyFlags & KF_EXTENDED)
+break; // NUMPAD numeric keys are *not* considered extended
+
+vk = NumPadFromArrows(vk);
+if (vk >= VK_NUMPAD0 && vk <= VK_NUMPAD9)
+return true;
+
+break;
+
+case WM_SYSKEYUP:
+if (!state.started)
+break;
+
+if (keyFlags & KF_EXTENDED)
+break; // NUMPAD numeric keys are *not* considered extended
+
+vk = NumPadFromArrows(vk);
+if (vk >= VK_NUMPAD0 && vk <= VK_NUMPAD9)
+{
+state.ch *= 10;
+state.ch += vk - VK_NUMPAD0;
+return true;
+}
+
+break;
+
+case WM_KEYUP:
+if (vk == VK_MENU && state.started && state.ch)
+{
+sal_UCS4 ch = state.ch;
+state.clear();
+// Let system provide codes for values below 256
+if (ch >= 256 && rtl::isUnicodeCodePoint(ch))
+{
+PostMessageW(hWnd, WM_UNICHAR, ch, 0);
+state.wait_WM_CHAR = true;
+}
+return true;
+}
+break;
+}
+
+state.clear();
+return false;
+}
+
 static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
   WPARAM wParam, LPARAM lParam, LRESULT& rResult )
 {
@@ -3531,7 +3650,9 @@ static bool ImplHandleKeyMsg( HWND hWnd, UINT nMsg,
 static sal_uInt16   nLastChar   = 0;
 static ModKeyFlags  nLastModKeyCode = ModKeyFlags::NONE;
 static bool bWaitForMo

Re: questions regarding of-pie chart work

2024-01-12 Thread Kurt Nordback
Thank you, Miklos and Regina. This is very helpful and gives me some good 
directions to push this forward.

Kurt



On Friday, January 12th, 2024 at 6:40 AM, Regina Henschel 
 wrote:


> Kurt Nordback schrieb am 10.01.2024 um 02:29:
> 
> > I've been working on support for bar-of-pie and pie-of-pie charts.
> > Related bug is here:
> > https://bugs.documentfoundation.org/show_bug.cgi?id=50934
> > and gerrit page for my preliminary implementation is here:
> > https://gerrit.libreoffice.org/c/core/+/160742 (feedback welcome!)
> > 
> > I have several questions about how to take this further. It seems like
> > the bug page and gerrit aren't the right places for discussing these, so
> > I'm raising them here.
> > 
> > 1. I've implemented OOXML import/export, but not ODF import/export
> > because ODF doesn't support of-pie charts. The spec [19.15] does
> > say: "Additional chart types may be supported by using a different
> > namespace."But I'm not sure what that really means. Are there
> > examples of this already?
> 
> 
> I do not know examples.
> 
> Example for "Additional chart types may be supported by using a
> different namespace.":
> For a normal pie-chart the attribute is chart:class="chart:circle". For
> an own chart the attribute would be chart:class="loext:mytypename". Of
> cause instead of 'mytypename' you use a meaningful word.
> 
> For to make it possible for other applications to implement the new
> chart type it is necessary that you describe it, similar to the way it
> is done for the predefined chart types in section 19.15. in ODF 1.3.
> 
> The new attribute value has to be added to
> https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_Extensions.
> But the place there is not large enough to describe a new chart type.
> Thus you should write a new Wiki-page for this type. Such is necessary
> anyway to help documentation team and is useful too for the release
> notes. Such page needs to have a section that addresses users and
> section that addresses developers and includes information about file
> format.
> 
> In addition you need to change the section "chart:coordinate-region" in
> https://wiki.documentfoundation.org/Development/ODF_Implementer_Notes/List_of_LibreOffice_ODF_implementation-defined_items.
> For that section it is useful too to have a Wiki-page about the new
> chart type, so that a link is sufficient there.
> 
> Kind regards,
> Regina
>


core.git: 2 commits - helpcontent2 svl/source

2024-01-12 Thread Eike Rathke (via logerrit)
 helpcontent2|2 +-
 svl/source/numbers/zforfind.cxx |   21 +++--
 2 files changed, 16 insertions(+), 7 deletions(-)

New commits:
commit 988db36e0992829b01a1341e92d6d2df715a7be5
Author: Eike Rathke 
AuthorDate: Fri Jan 12 17:03:35 2024 +0100
Commit: Eike Rathke 
CommitDate: Fri Jan 12 18:10:36 2024 +0100

Resolves: tdf#159148 Accept int32 hours:minutes:seconds input

... and detect overflow to result in text instead of 00:00 input loss.

Change-Id: Ib2b9f16ab6c3c2963c5a2058c27366219f090096
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161977
Reviewed-by: Eike Rathke 
Tested-by: Jenkins

diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index d29a6a025cd8..c1898104a905 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -983,9 +983,9 @@ bool ImpSvNumberInputScan::GetTimeRef( double& fOutNumber,
  ) const
 {
 bool bRet = true;
-sal_uInt16 nHour;
-sal_uInt16 nMinute = 0;
-sal_uInt16 nSecond = 0;
+sal_Int32 nHour;
+sal_Int32 nMinute = 0;
+sal_Int32 nSecond = 0;
 double fSecond100 = 0.0;
 sal_uInt16 nStartIndex = nIndex;
 
@@ -1000,7 +1000,10 @@ bool ImpSvNumberInputScan::GetTimeRef( double& 
fOutNumber,
 }
 else if (nIndex - nStartIndex < nCnt)
 {
-nHour   = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
+const OUString& rValStr = sStrArray[nNums[nIndex++]];
+nHour = rValStr.toInt32();
+if (nHour == 0 && rValStr != "0" && rValStr != "00")
+bRet = false;   // overflow -> Text
 }
 else
 {
@@ -1031,7 +1034,10 @@ bool ImpSvNumberInputScan::GetTimeRef( double& 
fOutNumber,
 }
 else if (nIndex - nStartIndex < nCnt)
 {
-nMinute = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
+const OUString& rValStr = sStrArray[nNums[nIndex++]];
+nMinute = rValStr.toInt32();
+if (nMinute == 0 && rValStr != "0" && rValStr != "00")
+bRet = false;   // overflow -> Text
 if (!(eInputOptions & SvNumInputOptions::LAX_TIME) && !bAllowDuration
 && nIndex > 1 && nMinute > 59)
 bRet = false;   // 1:60 or 1:123 is invalid, 123:1 or 0:123 is 
valid
@@ -1040,7 +1046,10 @@ bool ImpSvNumberInputScan::GetTimeRef( double& 
fOutNumber,
 }
 if (nIndex - nStartIndex < nCnt)
 {
-nSecond = 
static_cast(sStrArray[nNums[nIndex++]].toInt32());
+const OUString& rValStr = sStrArray[nNums[nIndex++]];
+nSecond = rValStr.toInt32();
+if (nSecond == 0 && rValStr != "0" && rValStr != "00")
+bRet = false;   // overflow -> Text
 if (!(eInputOptions & SvNumInputOptions::LAX_TIME) && !bAllowDuration
 && nIndex > 1 && nSecond > 59 && !(nHour == 23 && nMinute == 
59 && nSecond == 60))
 bRet = false;   // 1:60 or 1:123 or 1:1:123 is invalid, 123:1 or 
123:1:1 or 0:0:123 is valid, or leap second
commit 23987653e8f0b6f15f546496b4895cefc0d89a94
Author: Dione Maddern 
AuthorDate: Fri Jan 12 18:10:21 2024 +0100
Commit: Gerrit Code Review 
CommitDate: Fri Jan 12 18:10:21 2024 +0100

Update git submodules

* Update helpcontent2 from branch 'master'
  to 2039fbabf053a19c9eaeee3db95dc8d710dfeb69
  - tdf#155877 Update help page with "how to get" information

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

diff --git a/helpcontent2 b/helpcontent2
index 04877b3bb878..2039fbabf053 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 04877b3bb878e30f8df562a35bc97163ee6be9ff
+Subproject commit 2039fbabf053a19c9eaeee3db95dc8d710dfeb69


help.git: source/text

2024-01-12 Thread Dione Maddern (via logerrit)
 source/text/sdraw/00/insert_menu.xhp  |8 +++-
 source/text/sdraw/01/insert_layer.xhp |3 +--
 source/text/simpress/00/0405.xhp  |6 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit 2039fbabf053a19c9eaeee3db95dc8d710dfeb69
Author: Dione Maddern 
AuthorDate: Fri Jan 5 17:09:11 2024 +0100
Commit: Olivier Hallot 
CommitDate: Fri Jan 12 18:10:20 2024 +0100

tdf#155877 Update help page with "how to get" information

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

diff --git a/source/text/sdraw/00/insert_menu.xhp 
b/source/text/sdraw/00/insert_menu.xhp
index c1c5bb4649..d694374056 100644
--- a/source/text/sdraw/00/insert_menu.xhp
+++ b/source/text/sdraw/00/insert_menu.xhp
@@ -18,8 +18,14 @@
 
 Only for Draw (OH)
 
+
 Choose Insert - 
Layer
+Select the layer and choose 
Format - Layer.
+
+Choose 
Insert - Insert Layer.
+
 Open context menu of layer 
tabs - choose Insert Layer
+Open context menu of the 
layer tab - choose Modify Layer.  
 
 
-
+
\ No newline at end of file
diff --git a/source/text/sdraw/01/insert_layer.xhp 
b/source/text/sdraw/01/insert_layer.xhp
index 894b403c28..9f3a3ce214 100644
--- a/source/text/sdraw/01/insert_layer.xhp
+++ b/source/text/sdraw/01/insert_layer.xhp
@@ -40,7 +40,6 @@
 Inserts a new layer or modify a 
layer in the document. Layers are only available in Draw, not in Impress. 

 
   
-  
 
 To select a layer, click the corresponding tab at the 
bottom of the workspace.
 
@@ -76,4 +75,4 @@
 
 
 
-
+
\ No newline at end of file
diff --git a/source/text/simpress/00/0405.xhp 
b/source/text/simpress/00/0405.xhp
index 525fcabdea..7e10258192 100644
--- a/source/text/simpress/00/0405.xhp
+++ b/source/text/simpress/00/0405.xhp
@@ -29,11 +29,6 @@
 In the context menu of a 
dimension line, choose Dimensions.
 On the Lines and 
Arrows toolbar, click the Dimension Line icon.
   
-Only for Draw (OH)
-  
-Select the layer and choose 
Format - Layer.
-Open context menu of the 
layer tab - choose Modify Layer.
-  
   
 Choose Format - 
Interaction.
 On the 
Standard toolbar, click
@@ -48,3 +43,4 @@
   
 
 
+


core.git: cui/source

2024-01-12 Thread Xisco Fauli (via logerrit)
 cui/source/dialogs/hltpbase.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 3635a2d6d5ba348dfbce05705917fe086e328ada
Author: Xisco Fauli 
AuthorDate: Fri Jan 12 13:07:10 2024 +0100
Commit: Julien Nabet 
CommitDate: Fri Jan 12 17:42:06 2024 +0100

cui: fix typo

Change-Id: I587d60c8da53df937ed8992a846993078710659f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161971
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx
index f0aa7c368c04..24621538caec 100644
--- a/cui/source/dialogs/hltpbase.cxx
+++ b/cui/source/dialogs/hltpbase.cxx
@@ -465,13 +465,13 @@ void SvxHyperlinkTabPageBase::Reset( const SfxItemSet& 
rItemSet)
 
SotExchange::GetFormatDataFlavor(SotClipboardFormatId::STRING, aFlavor);
 if (xTransferable->isDataFlavorSupported(aFlavor))
 {
-OUString aClipBoardConentent;
+OUString aClipBoardContent;
 try
 {
-if (xTransferable->getTransferData(aFlavor) >>= 
aClipBoardConentent)
+if (xTransferable->getTransferData(aFlavor) >>= 
aClipBoardContent)
 {
 INetURLObject aURL;
-aURL.SetSmartURL(aClipBoardConentent);
+aURL.SetSmartURL(aClipBoardContent);
 if (!aURL.HasError())
 aStrURL
 = 
aURL.GetMainURL(INetURLObject::DecodeMechanism::Unambiguous);


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

2024-01-12 Thread Andras Timar (via logerrit)
 .gitreview |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7547920a67a6704ca7fcd97bc9f464f335ac3845
Author: Andras Timar 
AuthorDate: Sun Mar 28 19:36:03 2021 +0200
Commit: Andras Timar 
CommitDate: Fri Jan 12 17:31:23 2024 +0100

[cp] set .gitreview for distro/collabora/co-24.04

Change-Id: I64ff8f83ad0c995f2abbb1267102a28053c9c2f4

diff --git a/.gitreview b/.gitreview
index 2dacecedd467..b19dbd6215d2 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,5 @@ host=gerrit.libreoffice.org
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-24-2
+defaultbranch=distro/collabora/co-24.`4
 


core.git: Changes to 'distro/collabora/co-24.04'

2024-01-12 Thread Stephan Bergmann (via logerrit)
New branch 'distro/collabora/co-24.04' available with the following commits:


core.git: external/onlineupdate

2024-01-12 Thread Stephan Bergmann (via logerrit)
 external/onlineupdate/UnpackedTarball_onlineupdate.mk |1 +
 external/onlineupdate/inifiles.patch  |   11 +++
 2 files changed, 12 insertions(+)

New commits:
commit a31f334d36b5735ba6fc8d0f89e834a73bdcc561
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 14:00:35 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 12 17:26:49 2024 +0100

Windows MAR update issues with program/{setup,version}.ini

At least on Windows, our MSI install sets differ from our archive install 
sets
in that their program/setup.ini and program/version.ini files have differing
content:  For one, they have ProductCode, UpdateCode, and MsiProductVersion 
(the
latter only in version.ini) lines that have empty values in archive install 
sets
and non-empty values in MSI install sets.  For another, setup.ini in MSI 
install
sets has additional ALLUSERS, BASISINSTALLLOCATION, FINDPRODUCT,
INSTALLLOCATION, OFFICEINSTALLLOCATION, and UREINSTALLLOCATION lines that 
are
completely missing in archive install sets.

This is a problem when building MAR updates with create-partial-info:  Both 
ini
files contain the buildid, so will always change between builds, so will 
always
be recorded in MAR updates.  But when they are recorded as "patch", actually
applying the MAR update file (generated from archive install sets) to an
installation (originating from an MSI install set) will fail, as the size 
of the
ini file in the installation doesn't match the expected size recorded in 
the MAR
update file.

I naively but strongly assume that those differences in ini file content are
historic junk by now that have no practical consequences (i.e., I assume 
that no
code actually makes use of those ini file entries).  Which would mean that 
it
should actually be harmless to replace an installation's (MSI-originating) 
ini
files with smaller (archive-originating) ones during an update.

So for now I work around that problem by always forcing these two files to 
be
recorded as a full "add" rather than as a "patch" in the generated MAR 
update
file.

In parallel, I will look into the history of all those problematic ini file
entries, and will try to verify that they are indeed unused junk, and will 
try
to clean that up.  (So that ultimately there will be no more differences 
between
MSI and archive versions.)

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

diff --git a/external/onlineupdate/UnpackedTarball_onlineupdate.mk 
b/external/onlineupdate/UnpackedTarball_onlineupdate.mk
index 166ede0a6b9b..43c189b84a18 100644
--- a/external/onlineupdate/UnpackedTarball_onlineupdate.mk
+++ b/external/onlineupdate/UnpackedTarball_onlineupdate.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \
 ifeq ($(OS),WNT)
 $(eval $(call gb_UnpackedTarball_add_patches,onlineupdate, \
 external/onlineupdate/cygpath.patch \
+external/onlineupdate/inifiles.patch \
 ))
 endif
 
diff --git a/external/onlineupdate/inifiles.patch 
b/external/onlineupdate/inifiles.patch
new file mode 100644
index ..1d285f09af1b
--- /dev/null
+++ b/external/onlineupdate/inifiles.patch
@@ -0,0 +1,11 @@
+--- tools/update-packaging/make_incremental_update.sh
 tools/update-packaging/make_incremental_update.sh
+@@ -226,7 +227,7 @@
+   patchsize=$(get_file_size "$patchfile")
+   fullsize=$(get_file_size "$workdir/$f")
+ 
+-  if [ $patchsize -lt $fullsize ]; then
++  if [ $patchsize -lt $fullsize ] && [ "$f" != program/setup.ini ] && [ 
"$f" != program/version.ini ]; then
+ make_patch_instruction "$f" "$updatemanifestv3"
+ mv -f "$patchfile" "$workdir/$f.patch"
+ rm -f "$workdir/$f"


translations.git: Changes to 'distro/collabora/co-24.04'

2024-01-12 Thread Christian Lohmaier (via logerrit)
New branch 'distro/collabora/co-24.04' available with the following commits:


help.git: Changes to 'distro/collabora/co-24.04'

2024-01-12 Thread Rafael Lima (via logerrit)
New branch 'distro/collabora/co-24.04' available with the following commits:


dictionaries.git: Changes to 'distro/collabora/co-24.04'

2024-01-12 Thread Olivier Hallot (via logerrit)
New branch 'distro/collabora/co-24.04' available with the following commits:


core.git: Changes to 'refs/tags/co-24.04-branch-point'

2024-01-12 Thread Stephan Bergmann (via logerrit)
Tag 'co-24.04-branch-point' created by Andras Timar 
 at 2024-01-12 16:25 +

co-24.04-branch-point

Changes since libreoffice-24-2-branch-point-274:
---
 0 files changed
---


translations.git: Changes to 'refs/tags/co-24.04-branch-point'

2024-01-12 Thread Christian Lohmaier (via logerrit)
Tag 'co-24.04-branch-point' created by Andras Timar 
 at 2024-01-12 16:25 +

co-24.04-branch-point

Changes since libreoffice-24-2-branch-point-10:
---
 0 files changed
---


help.git: Changes to 'refs/tags/co-24.04-branch-point'

2024-01-12 Thread Rafael Lima (via logerrit)
Tag 'co-24.04-branch-point' created by Andras Timar 
 at 2024-01-12 16:25 +

co-24.04-branch-point

Changes since libreoffice-24-2-branch-point-29:
---
 0 files changed
---


dictionaries.git: Changes to 'refs/tags/co-24.04-branch-point'

2024-01-12 Thread Olivier Hallot (via logerrit)
Tag 'co-24.04-branch-point' created by Andras Timar 
 at 2024-01-12 16:25 +

co-24.04-branch-point

Changes since libreoffice-24-2-branch-point-3:
---
 0 files changed
---


dev-tools.git: help3/xhpeditor

2024-01-12 Thread Juan José González (via logerrit)
 help3/xhpeditor/index.php |   12 +++-
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 3d3cff05f9da95f870fd3c5b1336716cdaec7fc9
Author: Juan José González 
AuthorDate: Sat Jan 6 16:26:09 2024 -0600
Commit: Olivier Hallot 
CommitDate: Fri Jan 12 17:20:00 2024 +0100

Changes to improve SEO

Change-Id: I069863ec421e2a77a0f302318e84c9dffd794f02
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/161730
Tested-by: Olivier Hallot 
Reviewed-by: Olivier Hallot 

diff --git a/help3/xhpeditor/index.php b/help3/xhpeditor/index.php
index b8647d3a..c3ac4a97 100644
--- a/help3/xhpeditor/index.php
+++ b/help3/xhpeditor/index.php
@@ -17,12 +17,14 @@ if ($xhp) {
 $label_editing =  isset($xhp_filename) ? "Editing: {$xhp_filename[0]}" : 
" ";
 $escaped_xhp_source = htmlspecialchars($xhp, ENT_NOQUOTES);
 ?>
-
+
   
 
-
-LibreOffice XHP Editor
-
+
+LibreOffice Help XHP Editor
+
+
+
 
 
 
@@ -84,7 +86,7 @@ $escaped_xhp_source = htmlspecialchars($xhp, ENT_NOQUOTES);
 
   
 
-LibreOffice Documentation XHP Editor
+LibreOffice Help XHP Editor
 
   
 


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

2024-01-12 Thread Dennis Francis (via logerrit)
 sc/inc/colorscale.hxx  |   13 ++-
 sc/inc/conditio.hxx|   20 +++
 sc/source/core/data/colorscale.cxx |   37 +++--
 sc/source/core/data/conditio.cxx   |   63 +
 4 files changed, 113 insertions(+), 20 deletions(-)

New commits:
commit 1aa1a5340f63b31524117a3cfd6e05bee2aa1aa0
Author: Dennis Francis 
AuthorDate: Tue Oct 3 12:40:25 2023 +0530
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 17:09:44 2024 +0100

sc: condfmt-perf: use a shared cache that...

is reset only when the data changes. Resetting is done only on
invalidation of associated ranges of data via a listener.

Earlier there were three separate caches that resets on every draw.

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

diff --git a/sc/inc/colorscale.hxx b/sc/inc/colorscale.hxx
index 6652e224fe67..f43f533e8f60 100644
--- a/sc/inc/colorscale.hxx
+++ b/sc/inc/colorscale.hxx
@@ -224,7 +224,7 @@ public:
 virtual ~ScColorFormat() override;
 
 const ScRangeList& GetRange() const;
-void SetCache(const std::vector& aValues);
+void SetCache(const std::vector& aValues) const;
 std::vector GetCache() const;
 
 virtual void SetParent(ScConditionalFormat* pParent) override;
@@ -240,14 +240,6 @@ protected:
 double getMaxValue() const;
 
 ScConditionalFormat* mpParent;
-
-private:
-
-struct ScColorFormatCache
-{
-std::vector maValues;
-};
-mutable std::unique_ptr mpCache;
 };
 
 typedef std::vector>> ScColorScaleEntries;
@@ -265,7 +257,10 @@ private:
 public:
 ScColorScaleFormat(ScDocument* pDoc);
 ScColorScaleFormat(ScDocument* pDoc, const ScColorScaleFormat& rFormat);
+ScColorScaleFormat(const ScColorScaleFormat&) = delete;
 virtual ~ScColorScaleFormat() override;
+const ScColorScaleFormat& operator=(const ScColorScaleFormat&) = delete;
+
 virtual ScColorFormat* Clone(ScDocument* pDoc) const override;
 
 virtual void SetParent(ScConditionalFormat* pParent) override;
diff --git a/sc/inc/conditio.hxx b/sc/inc/conditio.hxx
index 8e5af1dd3c3c..e1cf5dc2f581 100644
--- a/sc/inc/conditio.hxx
+++ b/sc/inc/conditio.hxx
@@ -538,6 +538,20 @@ private:
 OUString maStyleName;
 };
 
+class ScColorFormatCache final : public SvtListener
+{
+private:
+ScDocument& mrDoc;
+
+public:
+explicit ScColorFormatCache(ScDocument& rDoc, const ScRangeList& rRanges);
+virtual ~ScColorFormatCache() override;
+
+void Notify( const SfxHint& rHint ) override;
+
+std::vector maValues;
+};
+
 //  complete conditional formatting
 class SC_DLLPUBLIC ScConditionalFormat
 {
@@ -547,6 +561,8 @@ class SC_DLLPUBLIC ScConditionalFormat
 std::vector> maEntries;
 ScRangeList maRanges;// Ranges for conditional format
 
+mutable std::unique_ptr mpCache;
+
 public:
 ScConditionalFormat(sal_uInt32 nNewKey, ScDocument* pDocument);
 ~ScConditionalFormat();
@@ -606,6 +622,10 @@ public:
 
 // Forced recalculation for formulas
 void CalcAll();
+
+void ResetCache() const;
+void SetCache(const std::vector& aValues) const;
+std::vector* GetCache() const;
 };
 
 class RepaintInIdle final : public Idle
diff --git a/sc/source/core/data/colorscale.cxx 
b/sc/source/core/data/colorscale.cxx
index 97cc50f73829..d5d40ec2c94d 100644
--- a/sc/source/core/data/colorscale.cxx
+++ b/sc/source/core/data/colorscale.cxx
@@ -462,22 +462,39 @@ const ScRangeList& ScColorFormat::GetRange() const
 
 std::vector ScColorFormat::GetCache() const
 {
-std::vector empty;
-return mpCache ? mpCache->maValues : empty;
+if (!mpParent)
+return {};
+
+std::vector* pRes = mpParent->GetCache();
+if (pRes)
+return *pRes;
+
+return {};
 }
 
-void ScColorFormat::SetCache(const std::vector& aValues)
+void ScColorFormat::SetCache(const std::vector& aValues) const
 {
-mpCache.reset(new ScColorFormatCache);
-mpCache->maValues = aValues;
+if (!mpParent)
+return;
+
+mpParent->SetCache(aValues);
 }
 
 std::vector& ScColorFormat::getValues() const
 {
-if(!mpCache)
+assert(mpParent);
+
+std::vector* pCache = mpParent->GetCache();
+if (!pCache || pCache->empty())
 {
-mpCache.reset(new ScColorFormatCache);
-std::vector& rValues = mpCache->maValues;
+if (!pCache)
+{
+SetCache({});
+pCache = mpParent->GetCache();
+assert(pCache);
+}
+
+std::vector& rValues = *pCache;
 
 size_t n = GetRange().size();
 const ScRangeList& aRanges = GetRange();
@@ -515,7 +532,7 @@ std::vector& ScColorFormat::getValues() const
 std::sort(rValues.begin(), rValues.end());
 }
 
-return mpCache->maValues;
+return *pCache;
 }
 
 double ScColorFormat::getMinVa

core.git: sc/qa

2024-01-12 Thread Miklos Vajna (via logerrit)
 sc/qa/unit/tiledrendering/tiledrendering.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit e5f80cc94fc0d8874e47e4425f2c58f0dde9debe
Author: Miklos Vajna 
AuthorDate: Fri Jan 12 11:26:01 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 12 16:44:02 2024 +0100

CppunitTest_sc_tiledrendering: ignore invalid json payload for STATE_CHANGED

The interesting case for this testsuite is when the json for
LOK_CALLBACK_STATE_CHANGED has a commandName key, ignore it callback
when that's not the case.

See


for a case where this can happen, the json payload was

"{
\"state\": \"0\"
}
"

Which can happen when SfxLokHelper::sendUnoStatus() thinks that the
commandName value would be empty.

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

diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index 0475a034cd8b..902fee6293ef 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -596,7 +596,13 @@ public:
 
 boost::property_tree::ptree aTree;
 boost::property_tree::read_json(aStream, aTree);
-std::string aCommandName = aTree.get("commandName");
+auto it = aTree.find("commandName");
+if (it == aTree.not_found())
+{
+break;
+}
+
+std::string aCommandName = it->second.get_value();
 m_aStateChanges[aCommandName] = aTree;
 }
 break;


core.git: Branch 'libreoffice-24-2' - distro-configs/LibreOfficeFlatpak.conf solenv/flatpak-manifest.in

2024-01-12 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeFlatpak.conf |1 +
 solenv/flatpak-manifest.in |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit 6ed4050f16265bfb02090592c6e88813796ac68d
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 09:41:28 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 12 16:29:20 2024 +0100

Adapt Flatpak build to new external/argon2

Change-Id: I584956151b036e1ba781439205a76f579f32c064
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161955
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 2b1a4f6309437128077c33e27262c052a408b9ba)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161990
Reviewed-by: Michael Stahl 

diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index b8375380ce02..3850269ace0f 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -11,6 +11,7 @@
 --without-junit
 --without-lxml
 --without-system-abseil
+--without-system-argon2
 --without-system-beanshell
 --without-system-bluez
 --without-system-boost
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index e9fa79e8f55f..a8d8b88394a8 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -786,6 +786,13 @@
 "dest": "external/tarballs",
 "dest-filename": "@ZXCVBN_C_TARBALL@"
 },
+{
+"url": 
"https://dev-www.libreoffice.org/src/@ARGON2_TARBALL@";,
+"sha256": "@ARGON2_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@ARGON2_TARBALL@"
+},
 {
 "url": 
"https://dev-www.libreoffice.org/extern/@OPENSYMBOL_TTF@";,
 "sha256": "@OPENSYMBOL_SHA256SUM@",


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

2024-01-12 Thread Méven Car (via logerrit)
 sw/source/ui/dialog/uiregionsw.cxx  |2 ++
 sw/source/uibase/inc/regionsw.hxx   |1 +
 sw/uiconfig/swriter/ui/editsectiondialog.ui |2 +-
 3 files changed, 4 insertions(+), 1 deletion(-)

New commits:
commit f9546a5e9e204fc058365aaddfb0dfa8f9a26418
Author: Méven Car 
AuthorDate: Wed Jan 10 10:26:38 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 12 15:50:54 2024 +0100

sw Edit Sections: hide Link section in LOK case

In the LibreOfficeKit case the section does not make sense as the
application has only restricted access to files, so hide it.

Test: In Writer new document, insert a section, right click on section,
Edit section..., Link section is visible.

In LOK case the Link section is not present.

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

diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index b3dff074fdc1..dfab16785270 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -357,6 +357,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 , m_xOptionsPB(m_xBuilder->weld_button("options"))
 , m_xDismiss(m_xBuilder->weld_button("remove"))
 , m_xHideFrame(m_xBuilder->weld_widget("hideframe"))
+, m_xLinkFrame(m_xBuilder->weld_frame("linkframe"))
 {
 m_xTree->set_size_request(-1, m_xTree->get_height_rows(16));
 m_xFileCB->set_state(TRISTATE_FALSE);
@@ -418,6 +419,7 @@ SwEditRegionDlg::SwEditRegionDlg(weld::Window* pParent, 
SwWrtShell& rWrtSh)
 
 if(comphelper::LibreOfficeKit::isActive())
 {
+m_xLinkFrame->hide();
 m_xDDECB->hide();
 m_xDDECommandFT->hide();
 m_xFileNameFT->hide();
diff --git a/sw/source/uibase/inc/regionsw.hxx 
b/sw/source/uibase/inc/regionsw.hxx
index 8cd22491cc3a..dae59fc58362 100644
--- a/sw/source/uibase/inc/regionsw.hxx
+++ b/sw/source/uibase/inc/regionsw.hxx
@@ -77,6 +77,7 @@ class SwEditRegionDlg final : public SfxDialogController
 std::unique_ptr m_xOptionsPB;
 std::unique_ptr m_xDismiss;
 std::unique_ptr m_xHideFrame;
+std::unique_ptr m_xLinkFrame;
 
 voidRecurseList(const SwSectionFormat* pFormat, const weld::TreeIter* 
pIter);
 size_t  FindArrPos(const SwSectionFormat* pFormat);
diff --git a/sw/uiconfig/swriter/ui/editsectiondialog.ui 
b/sw/uiconfig/swriter/ui/editsectiondialog.ui
index 3a571100684f..2c358fa69fa5 100644
--- a/sw/uiconfig/swriter/ui/editsectiondialog.ui
+++ b/sw/uiconfig/swriter/ui/editsectiondialog.ui
@@ -237,7 +237,7 @@
 12
 12
 
-  
+  
 True
 False
 True


core.git: bin/update external/onlineupdate Makefile.gbuild

2024-01-12 Thread Stephan Bergmann (via logerrit)
 Makefile.gbuild |2 
 bin/update/create_partial_update.py |   25 +-
 external/onlineupdate/cygpath.patch |2 
 external/onlineupdate/lo.patch  |   88 +++-
 4 files changed, 113 insertions(+), 4 deletions(-)

New commits:
commit c469bffa3be4b2d3ca7f59448dbcc7b9bfdd7bf5
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 13:51:57 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 12 15:46:11 2024 +0100

Further adapting of create-partial-info

...along the lines of what had already been done for create-update-info, 
passing
files to the mar executable with an -f files.txt instead of on the command 
line
(which could grow too long for Windows), and taking the archive metadata 
into
account.

For the latter, `make create-partial-info` now expects a second make 
variable,
ONLINEUPDATE_MAR_OLDMETADATA, in addition to ONLINEUPDATE_MAR_OLDARCHIVE.  
And
there is a new TODO in update/create_partial_update.py that the old and new
metadata should be compared for problematic changes.  (For now, any such 
changes
would just get lost by an update.)

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

diff --git a/Makefile.gbuild b/Makefile.gbuild
index 211066becd37..3dce54520b27 100644
--- a/Makefile.gbuild
+++ b/Makefile.gbuild
@@ -60,7 +60,7 @@ create-partial-info:
$(eval VERSION := 
$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX))
$(eval PLATFORM := $(RTL_OS)_$(RTL_ARCH))
$(eval MAR_NAME_PREFIX := 
$(PRODUCTNAME)_$(VERSION)_$(PLATFORM)_$(BUILDID))
-   MBSDIFF=$(WORKDIR)/LinkTarget/Executable/mbsdiff 
MAR=$(INSTDIR)/program/mar $(if $(filter WNT,$(OS)),$(shell cygpath -u 
$(SRCDIR)/bin/update/create_partial_update.py),$(SRCDIR)/bin/update/create_partial_update.py)
 "$(WORKDIR)" "$(MAR_NAME_PREFIX)" LOOnlineUpdater 
"$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" "$(ONLINEUPDATE_MAR_CERTIFICATENAME)" 
"$(ONLINEUPDATE_MAR_BASEURL)" "$(PRODUCTNAME)" 
'$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)'
 "$(ONLINEUPDATE_MAR_OLDARCHIVE)"
+   MBSDIFF=$(WORKDIR)/LinkTarget/Executable/mbsdiff 
MAR=$(INSTDIR)/program/mar $(if $(filter WNT,$(OS)),$(shell cygpath -u 
$(SRCDIR)/bin/update/create_partial_update.py),$(SRCDIR)/bin/update/create_partial_update.py)
 "$(WORKDIR)" "$(MAR_NAME_PREFIX)" LOOnlineUpdater 
"$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" "$(ONLINEUPDATE_MAR_CERTIFICATENAME)" 
"$(ONLINEUPDATE_MAR_BASEURL)" "$(PRODUCTNAME)" 
'$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)'
 "$(ONLINEUPDATE_MAR_OLDARCHIVE)" "$(ONLINEUPDATE_MAR_OLDMETADATA)"
 
 # also possible to bypass the dependencies/the gbuild processing by just 
running
 # LD_LIBRARY_PATH=instdir/program make cmd cmd='ALL_LANGS="$(ALL_LANGS)" 
workdir/LinkTarget/Executable/pocheck'
diff --git a/bin/update/create_partial_update.py 
b/bin/update/create_partial_update.py
index cc9bb745852b..88a4553d6a36 100755
--- a/bin/update/create_partial_update.py
+++ b/bin/update/create_partial_update.py
@@ -30,6 +30,7 @@ def main():
 product_name = sys.argv[7]
 version = sys.argv[8]
 old_archive = sys.argv[9]
+old_metadata = sys.argv[10]
 
 old_uncompress_dir = uncompress_file_to_dir(old_archive, 
updater_path.get_previous_build_dir())
 versionini = os.path.join(old_uncompress_dir, 'program', 'version.ini') 
#TODO: Linux, macOS
@@ -43,6 +44,14 @@ def main():
 if old_build_id is None:
 raise Exception(f'Cannot find buildid in {versionini}')
 
+#TODO: check for problematic changes between old and new metadata
+with open(old_metadata) as meta:
+for l in meta:
+m = re.fullmatch('skip (.*)', l.rstrip())
+if m and m.group(1).startswith(f'{product_name}/'):
+path = m.group(1)[len(f'{product_name}/'):]
+os.remove(os.path.join(old_uncompress_dir, path))
+
 new_tar_file_glob = os.path.join(updater_path.get_workdir(), 
"installation", product_name, "archive", "install", "*", 
f'{product_name}_*_archive*')
 new_tar_files = glob.glob(new_tar_file_glob)
 if len(new_tar_files) != 1:
@@ -50,6 +59,19 @@ def main():
 new_tar_file = new_tar_files[0]
 new_uncompress_dir = uncompress_file_to_dir(new_tar_file, 
updater_path.get_current_build_dir())
 
+new_metadata = os.path.join(
+updater_path.get_workdir(), 'installation', product_name, 'archive', 
'install', 'metadata')
+ifsfile = os.path.join(updater_path.get_mar_dir(), 'ifs')
+with open(new_metadata) as meta, open(ifsfile, 'w') as ifs:
+for l in meta:
+m = re.fullmatch('(skip|cond) (.*)', l.rstrip())
+if m and m.group(2).startsw

core.git: sw/source

2024-01-12 Thread Armin Le Grand (allotropia) (via logerrit)
 sw/source/core/tox/tox.cxx|8 +++-
 sw/source/ui/index/swuiidxmrk.cxx |   37 -
 sw/source/uibase/index/toxmgr.cxx |3 ++-
 3 files changed, 29 insertions(+), 19 deletions(-)

New commits:
commit d22a86089edfcadbef5231525a2947b954f4784e
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Jan 12 11:22:04 2024 +0100
Commit: Armin Le Grand 
CommitDate: Fri Jan 12 15:22:36 2024 +0100

tdf#158783 Correct compares of SwTOXMark Items

That item was never 'pooled', so operator== was not really
ever used. It just compared the 'type', so pretty many
instances were assumed to be equal, what is wrong.
We discussed to implement it (there is quite some content),
but we came to the point that it's only safe to say
instances are equal when same instance -> fallback to ptr
compare.
This came into play since I identified/changed many (160?)
places where SfxPoolItems were ptr-compared when doing that
paradigm change in Items. This leads to the two methods
'areSfxPoolItemPtrsEqual' which just makes ptr compare and
'SfxPoolItem::areSame' which also will use op==. For the
initial adaption I chose the wrong function adapting
places where SwTOXMark were involved.

Change-Id: I7df029ad4542719681b1455de17ed5990d248395
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161963
Reviewed-by: Michael Stahl 
Tested-by: Armin Le Grand 

diff --git a/sw/source/core/tox/tox.cxx b/sw/source/core/tox/tox.cxx
index 04f43e5d41f8..b29bafde11f6 100644
--- a/sw/source/core/tox/tox.cxx
+++ b/sw/source/core/tox/tox.cxx
@@ -148,7 +148,13 @@ void SwTOXMark::RegisterToTOXType(SwTOXType& rType)
 bool SwTOXMark::operator==( const SfxPoolItem& rAttr ) const
 {
 assert(SfxPoolItem::operator==(rAttr));
-return m_pType == static_cast(rAttr).m_pType;
+// tdf#158783 this item was never 'pooled', so operator== was not really
+// ever used. We discussed to implement it (there is quite some
+// content), but we came to the point that it's only safe to say
+// instances are equal when same instance -> fallback to ptr compare.
+// NOTE: Do *not* use areSfxPoolItemPtrsEqual here, with DBG_UTIL
+//   active the contol/test code there would again call operator==
+return this == &rAttr;
 }
 
 SwTOXMark* SwTOXMark::Clone( SfxItemPool* ) const
diff --git a/sw/source/ui/index/swuiidxmrk.cxx 
b/sw/source/ui/index/swuiidxmrk.cxx
index a0a8a2f93c0c..92c25f2e9aee 100644
--- a/sw/source/ui/index/swuiidxmrk.cxx
+++ b/sw/source/ui/index/swuiidxmrk.cxx
@@ -287,19 +287,20 @@ void SwIndexMarkPane::InitControls()
 bool bShow = false;
 
 pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_PRV );
-if (!SfxPoolItem::areSame( pMoveMark, pMark ))
+// tdf#158783 ptr compare OK for SwTOXMark (more below)
+if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark ))
 {
 m_pSh->GotoTOXMark( *pMoveMark, TOX_NXT );
 bShow = true;
 }
-m_xPrevBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark));
+m_xPrevBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, pMark));
 pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_NXT );
-if (!SfxPoolItem::areSame( pMoveMark, pMark ))
+if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark ))
 {
 m_pSh->GotoTOXMark( *pMoveMark, TOX_PRV );
 bShow = true;
 }
-m_xNextBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark));
+m_xNextBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, pMark));
 if( bShow )
 {
 m_xPrevBT->show();
@@ -308,19 +309,19 @@ void SwIndexMarkPane::InitControls()
 }
 
 pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_SAME_PRV );
-if (!SfxPoolItem::areSame( pMoveMark, pMark ))
+if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark ))
 {
 m_pSh->GotoTOXMark( *pMoveMark, TOX_SAME_NXT );
 bShow = true;
 }
-m_xPrevSameBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark));
+m_xPrevSameBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, 
pMark));
 pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_SAME_NXT );
-if (!SfxPoolItem::areSame( pMoveMark, pMark ))
+if (!areSfxPoolItemPtrsEqual( pMoveMark, pMark ))
 {
 m_pSh->GotoTOXMark( *pMoveMark, TOX_SAME_PRV );
 bShow = true;
 }
-m_xNextSameBT->set_sensitive(!SfxPoolItem::areSame(pMoveMark, pMark));
+m_xNextSameBT->set_sensitive(!areSfxPoolItemPtrsEqual(pMoveMark, 
pMark));
 if( bShow )
 {
 m_xNextSameBT->show();
@@ -894,25 +895,26 @@ void SwIndexMarkPane::UpdateDialog()
 if( m_xPrevBT->get_visible() )
 {
 const SwTOXMark* pMoveMark = &m_pSh->GotoTOXMark( *pMark, TOX_PRV );
-if (!SfxPoolItem::areSame( pMoveMark, pMark ))
+// tdf

core.git: sw/source

2024-01-12 Thread Caolán McNamara (via logerrit)
 sw/source/uibase/uiview/viewling.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit ae3a730a4b64fdb9698c753313504bbe174f1519
Author: Caolán McNamara 
AuthorDate: Fri Jan 12 10:54:25 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 15:21:09 2024 +0100

cid#1545669 aArgs is never set

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

diff --git a/sw/source/uibase/uiview/viewling.cxx 
b/sw/source/uibase/uiview/viewling.cxx
index a9f64d7bf760..4cf6505b9de2 100644
--- a/sw/source/uibase/uiview/viewling.cxx
+++ b/sw/source/uibase/uiview/viewling.cxx
@@ -594,7 +594,6 @@ struct ExecuteInfo
 {
 uno::Reference< frame::XDispatch >  xDispatch;
 util::URL   aTargetURL;
-uno::Sequence< PropertyValue >  aArgs;
 };
 
 class AsyncExecute
@@ -614,7 +613,7 @@ IMPL_STATIC_LINK( AsyncExecute, ExecuteHdl_Impl, void*, p, 
void )
 // Asynchronous execution as this can lead to our own destruction!
 // Framework can recycle our current frame and the layout manager 
disposes all user interface
 // elements if a component gets detached from its frame!
-pExecuteInfo->xDispatch->dispatch( pExecuteInfo->aTargetURL, 
pExecuteInfo->aArgs );
+pExecuteInfo->xDispatch->dispatch(pExecuteInfo->aTargetURL, 
uno::Sequence());
 }
 catch (const Exception&)
 {
@@ -759,7 +758,6 @@ bool SwView::ExecSpellPopup(const Point& rPt)
 
 aURL.Complete = aCommand;
 xURLTransformer->parseStrict(aURL);
-uno::Sequence< beans::PropertyValue > aArgs;
 xDispatch = xDispatchProvider->queryDispatch( 
aURL, OUString(), 0 );
 
 if (xDispatch.is())
@@ -768,7 +766,6 @@ bool SwView::ExecSpellPopup(const Point& rPt)
 ExecuteInfo* pExecuteInfo   = new 
ExecuteInfo;
 pExecuteInfo->xDispatch = xDispatch;
 pExecuteInfo->aTargetURL= aURL;
-pExecuteInfo->aArgs = aArgs;
 Application::PostUserEvent( LINK(nullptr, 
AsyncExecute , ExecuteHdl_Impl), pExecuteInfo );
 }
 }


core.git: 2 commits - desktop/source framework/inc framework/source package/source sd/source sfx2/source stoc/source ucb/source vcl/source writerfilter/source xmlscript/source

2024-01-12 Thread Caolán McNamara (via logerrit)
 desktop/source/deployment/gui/dp_gui_theextmgr.cxx|2 +-
 framework/inc/uielement/toolbarsmenucontroller.hxx|3 +--
 framework/source/services/autorecovery.cxx|2 +-
 framework/source/uielement/toolbarsmenucontroller.cxx |4 +---
 package/source/zippackage/ZipPackageStream.cxx|2 +-
 sd/source/console/PresenterToolBar.cxx|   18 ++
 sfx2/source/view/viewsh.cxx   |6 +-
 stoc/source/corereflection/crbase.cxx |2 +-
 stoc/source/inspect/introspection.cxx |2 +-
 ucb/source/cacher/cacheddynamicresultset.cxx  |5 ++---
 ucb/source/cacher/cacheddynamicresultsetstub.cxx  |5 ++---
 vcl/source/control/wizardmachine.cxx  |8 
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx   |5 ++---
 writerfilter/source/ooxml/OOXMLFactory.hxx|3 ++-
 writerfilter/source/ooxml/factoryimpl.py  |2 +-
 xmlscript/source/xmldlg_imexp/xmldlg_import.cxx   |2 +-
 16 files changed, 32 insertions(+), 39 deletions(-)

New commits:
commit 2362e414ef1533c52215d16431d58edb59900751
Author: Caolán McNamara 
AuthorDate: Fri Jan 12 10:39:21 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 15:21:02 2024 +0100

cid#1546222 COPY_INSTEAD_OF_MOVE

and

cid#1546154 COPY_INSTEAD_OF_MOVE
cid#1546120 COPY_INSTEAD_OF_MOVE
cid#1546115 COPY_INSTEAD_OF_MOVE
cid#1546111 COPY_INSTEAD_OF_MOVE
cid#1546096 COPY_INSTEAD_OF_MOVE
cid#1546016 COPY_INSTEAD_OF_MOVE
cid#1545980 COPY_INSTEAD_OF_MOVE
cid#1545942 COPY_INSTEAD_OF_MOVE
cid#1545902 COPY_INSTEAD_OF_MOVE
cid#1545869 COPY_INSTEAD_OF_MOVE
cid#1545853 COPY_INSTEAD_OF_MOVE
cid#1545769 COPY_INSTEAD_OF_MOVE
cid#1545742 COPY_INSTEAD_OF_MOVE
cid#1545735 COPY_INSTEAD_OF_MOVE
cid#1545689 COPY_INSTEAD_OF_MOVE

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

diff --git a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx 
b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
index 48ed3b329b96..ac42a446c67c 100644
--- a/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
+++ b/desktop/source/deployment/gui/dp_gui_theextmgr.cxx
@@ -525,7 +525,7 @@ void TheExtensionManager::modified( ::lang::EventObject 
const & /*rEvt*/ )
 if ( ! s_ExtMgr.is() )
 {
 OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
-s_ExtMgr = that;
+s_ExtMgr = std::move(that);
 }
 
 if ( !extensionURL.isEmpty() )
diff --git a/framework/source/services/autorecovery.cxx 
b/framework/source/services/autorecovery.cxx
index 03936b54aee8..22bdb916a642 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -1791,7 +1791,7 @@ void AutoRecovery::implts_openConfig()
 
 /* SAFE */ {
 osl::MutexGuard g(cppu::WeakComponentImplHelperBase::rBHelper.rMutex);
-m_xRecoveryCFG= xCFG;
+m_xRecoveryCFG= std::move(xCFG);
 m_nMinSpaceDocSave= nMinSpaceDocSave;
 m_nMinSpaceConfigSave = nMinSpaceConfigSave;
 } /* SAFE */
diff --git a/package/source/zippackage/ZipPackageStream.cxx 
b/package/source/zippackage/ZipPackageStream.cxx
index d3068a666519..cc763e8d6f1f 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -1112,7 +1112,7 @@ void SAL_CALL ZipPackageStream::setRawStream( const 
uno::Reference< io::XInputSt
 m_xStream = xNewStream;
 if ( !ParsePackageRawStream() )
 {
-m_xStream = xOldStream;
+m_xStream = std::move(xOldStream);
 throw packages::NoRawFormatException(THROW_WHERE );
 }
 
diff --git a/sd/source/console/PresenterToolBar.cxx 
b/sd/source/console/PresenterToolBar.cxx
index 5e7c770df208..04a37a92cf0c 100644
--- a/sd/source/console/PresenterToolBar.cxx
+++ b/sd/source/console/PresenterToolBar.cxx
@@ -1349,14 +1349,16 @@ void ElementMode::ReadElementMode (
 msAction = rpDefaultMode->msAction;
 
 // Read text and font
-OUString sText(rpDefaultMode != nullptr ? rpDefaultMode->maText.GetText() 
: OUString());
-PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= sText;
-Reference xFontNode (
-PresenterConfigurationAccess::GetProperty(xProperties, "Font"), 
UNO_QUERY);
-PresenterTheme::SharedFontDescriptor pFont(PresenterTheme::ReadFont(
-xFontNode, rpDefaultMode != nullptr ? rpDefaultMode->maText.GetFont()
-: 
PresenterTheme::SharedFontDescriptor()));
-maText = Text(sText,pFont);
+{
+OUString sText(rpDefaultMode != nullptr ? 
rpDefaultMode->maText.GetText() : OUString());
+PresenterConfigurationAccess::GetProperty(xProperties, "Text") >>= 
sText;
+Refe

core.git: distro-configs/LibreOfficeFlatpak.conf solenv/flatpak-manifest.in

2024-01-12 Thread Stephan Bergmann (via logerrit)
 distro-configs/LibreOfficeFlatpak.conf |1 +
 solenv/flatpak-manifest.in |7 +++
 2 files changed, 8 insertions(+)

New commits:
commit d8133badce2152a2c5bd2872a408bda8fb45fa54
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 09:41:28 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 12 15:18:51 2024 +0100

Adapt Flatpak build to new external/argon2

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

diff --git a/distro-configs/LibreOfficeFlatpak.conf 
b/distro-configs/LibreOfficeFlatpak.conf
index b8375380ce02..3850269ace0f 100644
--- a/distro-configs/LibreOfficeFlatpak.conf
+++ b/distro-configs/LibreOfficeFlatpak.conf
@@ -11,6 +11,7 @@
 --without-junit
 --without-lxml
 --without-system-abseil
+--without-system-argon2
 --without-system-beanshell
 --without-system-bluez
 --without-system-boost
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index e9fa79e8f55f..a8d8b88394a8 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -786,6 +786,13 @@
 "dest": "external/tarballs",
 "dest-filename": "@ZXCVBN_C_TARBALL@"
 },
+{
+"url": 
"https://dev-www.libreoffice.org/src/@ARGON2_TARBALL@";,
+"sha256": "@ARGON2_SHA256SUM@",
+"type": "file",
+"dest": "external/tarballs",
+"dest-filename": "@ARGON2_TARBALL@"
+},
 {
 "url": 
"https://dev-www.libreoffice.org/extern/@OPENSYMBOL_TTF@";,
 "sha256": "@OPENSYMBOL_SHA256SUM@",


core.git: sw/source

2024-01-12 Thread Michael Stahl (via logerrit)
 sw/source/core/crsr/crstrvl.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 3fefff7ce29a234694343105c50c7bc3259a9cb8
Author: Michael Stahl 
AuthorDate: Fri Jan 12 12:52:51 2024 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 12 15:13:21 2024 +0100

tdf#158783 sw: SwCursorShell::GotoTOXMark() must actually move cursor

The problem was that the buttons in SwIndexMarkPane got the
next/previous mark, but SwCursorShell::GotoTOXMark() may return the
next/previous mark without actually moving the cursor.

It happens that the current mark is outside a table and the next mark is
inside a table, then UpdateCursor() doesn't accept the invalid cursor
range and resets the point to its previous position.

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

diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 00c1c2e61c6d..e934cd1a8686 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -602,6 +602,7 @@ const SwTOXMark& SwCursorShell::GotoTOXMark( const 
SwTOXMark& rStart,
 SwPosition& rPos = *GetCursor()->GetPoint();
 rPos.Assign(rNewMark.GetTextTOXMark()->GetTextNode(),
  rNewMark.GetTextTOXMark()->GetStart() );
+GetCursor()->DeleteMark(); // tdf#158783 prevent UpdateCursor resetting 
point
 
 if( !m_pCurrentCursor->IsSelOvr() )
 UpdateCursor( SwCursorShell::SCROLLWIN | SwCursorShell::CHKRANGE |


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

2024-01-12 Thread Caolán McNamara (via logerrit)
 sc/source/ui/app/inputhdl.cxx |   11 +++
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 393a4bee9492f3d95922a6c89f776730d3135d42
Author: Caolán McNamara 
AuthorDate: Thu Jan 11 08:46:07 2024 +
Commit: Skyler Grey 
CommitDate: Fri Jan 12 14:56:19 2024 +0100

cid#1583748 Dereference after null check

Change-Id: I147e0454e215b3a26e97c0a6d727db25fd2549a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161864
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Skyler Grey 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 9ab8a7cde4e5..18d6bb98b792 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3867,8 +3867,10 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, 
bool bStartEdit /* = false
 
 ScModule* pScMod = SC_MOD();
 const ScInputOptions& rOpt = pScMod->GetInputOptions();
-if ( (rOpt.GetMoveKeepEdit() && 
!comphelper::LibreOfficeKit::isActive())
-|| (pActiveViewSh->GetMoveKeepEdit() && 
comphelper::LibreOfficeKit::isActive()) )
+const bool bKit = comphelper::LibreOfficeKit::isActive();
+
+if ( (rOpt.GetMoveKeepEdit() && !bKit)
+|| (pActiveViewSh && pActiveViewSh->GetMoveKeepEdit() && 
bKit) )
 pScMod->SetInputMode( SC_INPUT_TABLE );
 
 bUsed = true;
commit 7434a301ccdab3ceb966842209ff62766c492513
Author: Caolán McNamara 
AuthorDate: Wed Jan 10 08:45:18 2024 +
Commit: Skyler Grey 
CommitDate: Fri Jan 12 14:56:14 2024 +0100

cid#1583748 Dereference after null check

since:

commit 20502992b862e5a83140b6d2b19722cdc652eeab
Date:   Mon Dec 4 14:08:09 2023 +

calc: Add option to keep edit mode on enter/tab

Change-Id: Ic338602945fb77cebf771fe3d0ad2e4e94fc0318
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161874
Tested-by: Caolán McNamara 
Reviewed-by: Caolán McNamara 
(cherry picked from commit e80842b37ed8b3e76dce68719ac0dfbeaefd567c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161853
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Skyler Grey 

diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 0f7a2afc858f..9ab8a7cde4e5 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -3819,9 +3819,10 @@ bool ScInputHandler::KeyInput( const KeyEvent& rKEvt, 
bool bStartEdit /* = false
 
 ScModule* pScMod = SC_MOD();
 const ScInputOptions& rOpt = pScMod->GetInputOptions();
+const bool bKit = comphelper::LibreOfficeKit::isActive();
 
-if ( (rOpt.GetMoveKeepEdit() && 
!comphelper::LibreOfficeKit::isActive())
- || (pActiveViewSh->GetMoveKeepEdit() && 
comphelper::LibreOfficeKit::isActive()) )
+if ( (rOpt.GetMoveKeepEdit() && !bKit)
+ || (pActiveViewSh && pActiveViewSh->GetMoveKeepEdit() && bKit) )
 pScMod->SetInputMode( SC_INPUT_TABLE );
 
 return true;


core.git: 2 commits - canvas/workben chart2/source cui/uiconfig scripting/source sd/source svtools/source

2024-01-12 Thread Caolán McNamara (via logerrit)
 canvas/workben/canvasdemo.cxx  |   40 ++---
 chart2/source/model/main/Diagram.cxx   |2 -
 cui/uiconfig/ui/hyperlinkdocpage.ui|8 ++---
 scripting/source/dlgprov/dlgevtatt.cxx |2 -
 sd/source/ui/unoidl/unocpres.cxx   |2 -
 svtools/source/misc/acceleratorexecute.cxx |2 -
 6 files changed, 28 insertions(+), 28 deletions(-)

New commits:
commit f1dc4e0d2a0bb3561c539bbdbdf1678d712d5cb3
Author: Caolán McNamara 
AuthorDate: Fri Jan 12 10:27:13 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 14:52:08 2024 +0100

cid#1546414 COPY_INSTEAD_OF_MOVE

and

cid#1546408 COPY_INSTEAD_OF_MOVE
cid#1546367 COPY_INSTEAD_OF_MOVE
cid#1546283 COPY_INSTEAD_OF_MOVE
cid#1546268 COPY_INSTEAD_OF_MOVE

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

diff --git a/canvas/workben/canvasdemo.cxx b/canvas/workben/canvasdemo.cxx
index 792fc49c7943..3ec7a3d6df75 100644
--- a/canvas/workben/canvasdemo.cxx
+++ b/canvas/workben/canvasdemo.cxx
@@ -182,7 +182,7 @@ class DemoRenderer
 const double RADIUS = 60.0;
 int i, j;
 
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 translate( center_x, center_y );
 
 for (i = 0; i < VERTICES; i++)
@@ -202,7 +202,7 @@ class DemoRenderer
 }
 }
 
-maRenderState = maOldRenderState; // pop
+maRenderState = std::move(aOldRenderState); // pop
 }
 
 void drawHilbert( double anchor_x, double anchor_y )
@@ -269,7 +269,7 @@ class DemoRenderer
 
 void drawRectangles()
 {
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 
 drawTitle( "Rectangles"_ostr );
 
@@ -279,12 +279,12 @@ class DemoRenderer
 // color steelblue, filled, no outline
 drawRect( tools::Rectangle( 10, 80, 80, 140 ), maColorBlack, 1 );
 
-maRenderState = maOldRenderState; // pop
+maRenderState = std::move(aOldRenderState); // pop
 }
 
 void drawEllipses()
 {
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 translate( maBox.Width(), 0.0 );
 
 drawTitle( "Ellipses"_ostr );
@@ -310,12 +310,12 @@ class DemoRenderer
 aStrokeAttrs.JoinType = rendering::PathJoinType::MITER;
 mxCanvas->strokePolyPolygon( xPoly, maViewState, maRenderState, 
aStrokeAttrs );
 
-maRenderState = maOldRenderState; // pop
+maRenderState = std::move(aOldRenderState); // pop
 }
 
 void drawText()
 {
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 translate( maBox.Width() * 2.0, 0.0 );
 
 drawTitle( "Text"_ostr );
@@ -324,12 +324,12 @@ class DemoRenderer
maBox.Height() * .5 );
 drawTitle( "This is lame"_ostr );
 
-maRenderState = maOldRenderState; // pop
+maRenderState = std::move(aOldRenderState); // pop
 }
 
 void drawImages()
 {
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 translate( 0.0, maBox.Height() );
 
 drawTitle( "Images"_ostr );
@@ -357,12 +357,12 @@ class DemoRenderer
 //bitmapExFromXBitmap(): could not extract bitmap' thrown
 //  Thorsten says that this is a bug, and Thorsten never lies.
 
-maRenderState = maOldRenderState; // pop
+maRenderState = std::move(aOldRenderState); // pop
 }
 
 void drawLines()
 {
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 translate( maBox.Width(), maBox.Height() );
 
 drawTitle( "Lines"_ostr );
@@ -370,12 +370,12 @@ class DemoRenderer
 drawPolishDiamond( 70.0, 80.0 );
 drawHilbert( 140.0, 140.0 );
 
-maRenderState = maOldRenderState; // pop
+maRenderState = std::move(aOldRenderState); // pop
 }
 
 void drawCurves()
 {
-rendering::RenderState maOldRenderState = maRenderState; // push
+rendering::RenderState aOldRenderState = maRenderState; // push
 translate( maBox.Width() * 2.0, maBox.Height() );
 
 d

core.git: cui/uiconfig

2024-01-12 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/hyperlinkdocpage.ui  |  230 +++
 cui/uiconfig/ui/hyperlinkinternetpage.ui |  155 ++--
 2 files changed, 191 insertions(+), 194 deletions(-)

New commits:
commit ca25be7ec49144d636675f389afc9f817e8b5b5f
Author: Caolán McNamara 
AuthorDate: Fri Jan 12 09:41:37 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 14:51:18 2024 +0100

resave with latest glade

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

diff --git a/cui/uiconfig/ui/hyperlinkdocpage.ui 
b/cui/uiconfig/ui/hyperlinkdocpage.ui
index 1e769d50862e..64c23c356879 100644
--- a/cui/uiconfig/ui/hyperlinkdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinkdocpage.ui
@@ -1,63 +1,63 @@
 
-
+
 
   
   
 True
-False
-res/target.png
+False
+res/target.png
   
   
 True
-False
-res/fileopen.png
+False
+res/fileopen.png
   
   
 True
-False
+False
 True
 True
-6
+6
 vertical
 12
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-True
-True
-6
-12
+False
 12
 6
+True
+True
+6
+12
 
   
 True
-False
+False
 start
 _Path:
-True
-path
+True
+path
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-True
-True
-Open File
+True
+True
+Open File
 image2
 True
 
@@ -67,21 +67,21 @@
 
   
   
-2
-0
+2
+0
   
 
 
   
 True
-False
+False
 True
-True
+True
 
   
-True
+True
+True
 True
-True
   
 
 
@@ -91,8 +91,8 @@
 
   
   
-1
-0
+1
+0
   
 
   
@@ -100,7 +100,7 @@
 
   
 True
-False
+False
 Document
 
   
@@ -117,53 +117,53 @@
 
   
 True
-False
-0
-none
+False
+0
+none
 
-  
+  
   
 True
-False
-6
-12
+False
 12
 6
+6
+12
 
   
 True
-False
+False
 start
 Targ_et:
-True
-target
+True
+target
 0
   
   
-0
-0
+0
+0
   
 
 
   
 True
-False
+False
 start
 URL:
-True
+True
 0
   
   
-0
-1
+0
+1
   
 
 
   
 True
-True
-True
-Target in Document
+True
+True
+Target in Document
 image1
 True
 
@@ -173,15 +173,15 @@
 
   
   
-2
-0
+2
+0
   
 
 
   
 True
-True
-True
+True
+True
 True
 
   
@@ -190,21 +190,21 @@
 
   
   
-1
-0
+1
+0
   
 
 
   
 True
-   

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

2024-01-12 Thread Mike Kaganski (via logerrit)
 sc/CppunitTest_sc_uicalc.mk|1 
 sc/qa/unit/uicalc/uicalc.cxx   |   80 +
 sc/source/core/data/table2.cxx |   17 
 3 files changed, 98 insertions(+)

New commits:
commit 24a7aca41e92ff791eee2d74c07fed395ac3d0dc
Author: Mike Kaganski 
AuthorDate: Thu Dec 21 16:57:27 2023 +0300
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 12 14:20:06 2024 +0100

tdf#154044: Also store default column data, when copying to Undo document

And restore from it un Undo.

Change-Id: I3e14b345cff25068d0555c5bceb4d6e97ce7cf76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161127
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161512
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 

diff --git a/sc/CppunitTest_sc_uicalc.mk b/sc/CppunitTest_sc_uicalc.mk
index 97a8291ff66c..021d86a8edfa 100644
--- a/sc/CppunitTest_sc_uicalc.mk
+++ b/sc/CppunitTest_sc_uicalc.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_uicalc, \
 comphelper \
 cppu \
 cppuhelper \
+editeng \
 i18nlangtag \
 sal \
 sc \
diff --git a/sc/qa/unit/uicalc/uicalc.cxx b/sc/qa/unit/uicalc/uicalc.cxx
index 7aa6109fa02d..1b6abab3a326 100644
--- a/sc/qa/unit/uicalc/uicalc.cxx
+++ b/sc/qa/unit/uicalc/uicalc.cxx
@@ -8,6 +8,7 @@
  */
 
 #include "../helper/qahelper.hxx"
+#include 
 #include 
 #include 
 #include 
@@ -30,8 +31,10 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
@@ -3138,6 +3141,83 @@ CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testMouseMergeRef)
 }
 }
 
+CPPUNIT_TEST_FIXTURE(ScUiCalcTest, testTdf154044)
+{
+createScDoc();
+ScDocument* pDoc = getScDoc();
+
+auto getBackColor = [pDoc](SCCOL c) {
+const ScPatternAttr* pattern = pDoc->GetPattern(c, 0, 0);
+const SvxBrushItem& brush = pattern->GetItemSet().Get(ATTR_BACKGROUND);
+return brush.GetColor();
+};
+
+CPPUNIT_ASSERT_EQUAL(INITIALCOLCOUNT, pDoc->GetAllocatedColumnsCount(0));
+for (SCCOL i = 0; i <= pDoc->MaxCol(); ++i)
+{
+OString msg = "i=" + OString::number(i);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_AUTO, getBackColor(i));
+}
+
+// Set the background color of A1:CV1
+auto aColorArg(
+comphelper::InitPropertySequence({ { "BackgroundColor", 
uno::Any(COL_LIGHTBLUE) } }));
+goToCell("A1:CV1");
+dispatchCommand(mxComponent, ".uno:BackgroundColor", aColorArg);
+
+// Partial row range allocates necessary columns
+CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0));
+
+// Check that settings are applied
+for (SCCOL i = 0; i < 100; ++i)
+{
+OString msg = "i=" + OString::number(i);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_LIGHTBLUE, 
getBackColor(i));
+}
+
+// Undo
+SfxUndoManager* pUndoMgr = pDoc->GetUndoManager();
+CPPUNIT_ASSERT(pUndoMgr);
+pUndoMgr->Undo();
+
+// Check that all the cells have restored the setting
+for (SCCOL i = 0; i < 100; ++i)
+{
+OString msg = "i=" + OString::number(i);
+// Without the fix in place, this would fail with
+// - Expected: rgba[ff00]
+// - Actual  : rgba[]
+// - i=1
+CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_AUTO, getBackColor(i));
+}
+
+// Also check the whole row selection case - it is handled specially: 
columns are not allocated.
+// See commit 3db91487e57277f75d64d95d06d4ddcc29f1c4e0 (set properly 
attributes for cells in
+// unallocated Calc columns, 2022-03-04).
+goToCell("A1:" + pDoc->MaxColAsString() + "1");
+dispatchCommand(mxComponent, ".uno:BackgroundColor", aColorArg);
+
+// Check that settings are applied
+for (SCCOL i = 0; i <= pDoc->MaxCol(); ++i)
+{
+OString msg = "i=" + OString::number(i);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_LIGHTBLUE, 
getBackColor(i));
+}
+
+// Undo
+pUndoMgr->Undo();
+
+// No additional columns have been allocated for whole-row range
+CPPUNIT_ASSERT_EQUAL(SCCOL(100), pDoc->GetAllocatedColumnsCount(0));
+
+// Check that all the cells have restored the setting
+for (SCCOL i = 0; i <= pDoc->MaxCol(); ++i)
+{
+OString msg = "i=" + OString::number(i);
+CPPUNIT_ASSERT_EQUAL_MESSAGE(msg.getStr(), COL_AUTO, getBackColor(i));
+}
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/data/table2.cxx b/sc/source/core/data/table2.cxx
index dee5e9090ed8..3007aeed4a0b 100644
--- a/sc/source/core/data/table2.cxx
+++ b/sc/source/core/data/table2.cxx
@@ -1324,6 +1324,13 @@ void ScTable::CopyToTable(
 const bool bToUndoDoc = pDestTab->rDocument.IsUndo();
 const bool bFromUndoDoc = rDocument.IsUndo();
 
+if (bToUndoDoc && (nFlag

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

2024-01-12 Thread Szymon Kłos (via logerrit)
 svx/source/tbxctrls/PaletteManager.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 2164a6b67948e3878727f8cc510d92bdc38f3268
Author: Szymon Kłos 
AuthorDate: Fri Jan 12 09:03:59 2024 +0100
Commit: Tomaž Vajngerl 
CommitDate: Fri Jan 12 14:19:09 2024 +0100

PaletteManager::generateJSON sync with master

Solves possible use-after-free catched by master Jenkins:

In function ‘C* rtl::addDataHelper(C*, const C*, std::size_t) [with C = 
char16_t]’,
inlined from ‘C* rtl::ToStringHelper 
>::operator()(C*, std::basic_string_view) const [with C = char16_t]’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/include/rtl/stringconcat.hxx:365:27,
inlined from ‘C* rtl::StringConcat 
>::addData(C*) const [with C = char16_t; T1 = std::basic_string_view; 
T2 = rtl::StringNumber; typename 
std::enable_if<(allowStringConcat && allowStringConcat), 
int>::type  = 0]’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/include/rtl/stringconcat.hxx:195:86,
inlined from ‘rtl::OUString::OUString(rtl::OUStringConcat&&) 
[with T1 = std::basic_string_view; T2 = rtl::StringNumber]’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/include/rtl/ustring.hxx:499:41,
inlined from ‘static void 
PaletteManager::generateJSON(boost::property_tree::ptree&, const 
std::set&)’ at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/svx/source/tbxctrls/PaletteManager.cxx:487:74:

/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_gcc_release_64/include/rtl/stringconcat.hxx:80:15:
 error: pointer may be used after ‘void operator delete [](void*)’ 
[-Werror=use-after-free]

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

diff --git a/svx/source/tbxctrls/PaletteManager.cxx 
b/svx/source/tbxctrls/PaletteManager.cxx
index a807b6516789..0ba97a76ada4 100644
--- a/svx/source/tbxctrls/PaletteManager.cxx
+++ b/svx/source/tbxctrls/PaletteManager.cxx
@@ -471,6 +471,7 @@ void 
PaletteManager::generateJSON(boost::property_tree::ptree& aTree, const std:
 
 const StyleSettings& rStyleSettings = 
Application::GetSettings().GetStyleSettings();
 sal_uInt32 nColumnCount = rStyleSettings.GetColorValueSetColumnCount();
+const OUString 
aNamePrefix(Concat2View(SvxResId(RID_SVXSTR_DOC_COLOR_PREFIX) + " "));
 
 auto aColorIt = rColors.begin();
 while (aColorIt != rColors.end())
@@ -480,7 +481,6 @@ void 
PaletteManager::generateJSON(boost::property_tree::ptree& aTree, const std:
 for (sal_uInt32 nColumn = 0; nColumn < nColumnCount; nColumn++)
 {
 boost::property_tree::ptree aColorTree;
-std::u16string_view aNamePrefix = 
Concat2View(SvxResId(RID_SVXSTR_DOC_COLOR_PREFIX) + " ");
 OUString sName = aNamePrefix + OUString::number(nStartIndex++);
 aColorTree.put("Value", aColorIt->AsRGBHexString().toUtf8());
 aColorTree.put("Name", sName);


core.git: include/svx sc/source sd/source svx/source sw/source

2024-01-12 Thread Szymon Kłos (via logerrit)
 include/svx/PaletteManager.hxx |4 ++
 include/svx/theme/IThemeColorChanger.hxx   |2 -
 include/svx/theme/ThemeColorChangerCommon.hxx  |5 ++-
 include/svx/theme/ThemeColorPaletteManager.hxx |3 +-
 sc/source/ui/view/tabvwshc.cxx |4 ++
 sd/source/ui/view/ViewShellBase.cxx|4 ++
 svx/source/tbxctrls/PaletteManager.cxx |   36 -
 svx/source/theme/ThemeColorChangerCommon.cxx   |   16 +--
 svx/source/theme/ThemeColorPaletteManager.cxx  |9 --
 sw/source/uibase/uiview/view.cxx   |4 ++
 10 files changed, 70 insertions(+), 17 deletions(-)

New commits:
commit 39b5a39bdc6d7fc86db5be6058b9f9251f070739
Author: Szymon Kłos 
AuthorDate: Mon Jan 8 18:46:13 2024 +0100
Commit: Szymon Kłos 
CommitDate: Fri Jan 12 13:58:22 2024 +0100

Send document colors with lok callback

First step for publishing any palette for LOK.
Let's start with Document colors (colors used in the
document) which can be extracted similar to theme
colors from SfxViewShell.

Modify generateJSON function so it appends palette into
existing ptree/JSON.

In the next step we can make it more generic so it will
be able to send any palette managed by PaletteManager.

Change-Id: Ibb56690af6dfd59ee232e88b28e7a3d312d0e16c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161798
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Tomaž Vajngerl 
(cherry picked from commit 0460be8848b0ce02c07183e41dd7137ac3b94164)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161941
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 

diff --git a/include/svx/PaletteManager.hxx b/include/svx/PaletteManager.hxx
index 81f30ea7de76..90fa00de59fe 100644
--- a/include/svx/PaletteManager.hxx
+++ b/include/svx/PaletteManager.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::uno { class XComponentContext; }
 namespace svx { class ToolboxButtonColorUpdaterBase; }
@@ -86,6 +87,9 @@ public:
 bool GetLumModOff(sal_uInt16 nThemeIndex, sal_uInt16 nEffect, sal_Int16& 
rLumMod, sal_Int16& rLumOff);
 
 static void DispatchColorCommand(const OUString& aCommand, const 
NamedColor& rColor);
+
+/// Appends node for Document Colors into the ptree
+static void generateJSON(boost::property_tree::ptree& aTree, const 
std::set& rColors);
 };
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/include/svx/theme/IThemeColorChanger.hxx 
b/include/svx/theme/IThemeColorChanger.hxx
index 0b3b88d60afa..035494f12324 100644
--- a/include/svx/theme/IThemeColorChanger.hxx
+++ b/include/svx/theme/IThemeColorChanger.hxx
@@ -22,7 +22,7 @@ public:
 void apply(std::shared_ptr const& pColorSet)
 {
 doApply(pColorSet);
-svx::theme::notifyLOK(pColorSet);
+svx::theme::notifyLOK(pColorSet, std::set());
 }
 
 private:
diff --git a/include/svx/theme/ThemeColorChangerCommon.hxx 
b/include/svx/theme/ThemeColorChangerCommon.hxx
index 3a585236fbf8..9fa3f4376ddc 100644
--- a/include/svx/theme/ThemeColorChangerCommon.hxx
+++ b/include/svx/theme/ThemeColorChangerCommon.hxx
@@ -9,6 +9,7 @@
 
 #pragma once
 
+#include 
 #include 
 #include 
 #include 
@@ -22,7 +23,9 @@ namespace theme
 SVXCORE_DLLPUBLIC void updateSdrObject(model::ColorSet const& rColorSet, 
SdrObject* pObject,
SdrView* pView, SfxUndoManager* 
pUndoManager = nullptr);
 
-SVXCORE_DLLPUBLIC void notifyLOK(std::shared_ptr const& 
pColorSet);
+/// Sends to the LOK updated palettes
+SVXCORE_DLLPUBLIC void notifyLOK(std::shared_ptr const& 
pColorSet,
+ const std::set& rDocumentColors);
 }
 
 } // end svx namespace
diff --git a/include/svx/theme/ThemeColorPaletteManager.hxx 
b/include/svx/theme/ThemeColorPaletteManager.hxx
index 7bb8526a2409..8531021bbc84 100644
--- a/include/svx/theme/ThemeColorPaletteManager.hxx
+++ b/include/svx/theme/ThemeColorPaletteManager.hxx
@@ -14,6 +14,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace model
 {
@@ -60,7 +61,7 @@ class SVXCORE_DLLPUBLIC ThemeColorPaletteManager final
 public:
 ThemeColorPaletteManager(std::shared_ptr const& 
pColorSet);
 ThemePaletteCollection generate();
-OString generateJSON();
+void generateJSON(boost::property_tree::ptree& aTree);
 };
 
 } // end svx namespace
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 1012f1ceb249..b0c3aa54343c 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -483,7 +483,9 @@ void ScTabViewShell::afterCallbackRegistered()
 SfxObjectShell* pDocShell = GetObjectShell();
 if (pDocShell)
 {
-svx::theme::notifyLOK(pDocShell->GetThemeColors());
+std::shared_ptr pThemeColors = 
pDocShell->GetThemeColors();
+std::set aDocumentColors = pDocShell->GetDocColors();
+

core.git: Branch 'libreoffice-24-2' - solenv/flatpak-manifest.in

2024-01-12 Thread Stephan Bergmann (via logerrit)
 solenv/flatpak-manifest.in |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6ae9d6ea0497b5935678c826940b14893a6531d0
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 09:43:31 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 12 13:15:52 2024 +0100

Update solenv/flatpak-manifest.in

* Incorporate
  

  "Update gvfs-1.52.1.tar.xz to 1.52.2 (#272)"

Change-Id: I95bee83408caab8e27eae978068f8ec4e87a9c12
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161956
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 2a12e2e6593cdd7b8b9978a6aec6910a92600cf3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161943
Reviewed-by: Michael Stahl 

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 58e2ce8f46f2..e9fa79e8f55f 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -49,8 +49,8 @@
 "sources": [
 {
 "type": "archive",
-"url": 
"https://download.gnome.org/sources/gvfs/1.52/gvfs-1.52.1.tar.xz";,
-"sha256": 
"cdbd4440f6d08792a6e7521244c17386e20bd537d375117099fc8fb68fe91741",
+"url": 
"https://download.gnome.org/sources/gvfs/1.52/gvfs-1.52.2.tar.xz";,
+"sha256": 
"a643aceaa053caac0d8eff9a015f636e4bd1bb09cfe27864e347db67460e7b91",
 "x-checker-data": {
 "type": "gnome",
 "name": "gvfs",


core.git: Branch 'libreoffice-24-2' - cui/uiconfig

2024-01-12 Thread Caolán McNamara (via logerrit)
 cui/uiconfig/ui/hyperlinkdocpage.ui |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit a25b8e353e3ac6383a63f3626b2d0cb88baaf872
Author: Caolán McNamara 
AuthorDate: Fri Jan 12 09:57:24 2024 +
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 12:30:12 2024 +0100

Resolves: tdf#159138 don't expand dialog to fit excessively long urls

this widget is the one that ends up controlling the insert hyperlink
dialog width

Change-Id: I09aaa32e96c4ddcc3e608cb24e67a669d376120f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161961
Reviewed-by: Xisco Fauli 
Reviewed-by: Michael Stahl 
Tested-by: Jenkins

diff --git a/cui/uiconfig/ui/hyperlinkdocpage.ui 
b/cui/uiconfig/ui/hyperlinkdocpage.ui
index 1e769d50862e..b27c7d8e07c7 100644
--- a/cui/uiconfig/ui/hyperlinkdocpage.ui
+++ b/cui/uiconfig/ui/hyperlinkdocpage.ui
@@ -198,13 +198,16 @@
   
 True
 False
-start
 True
 Test text
+middle
+20
+0
   
   
 1
 1
+2
   
 
 


core.git: compilerplugins/clang cui/source editeng/source include/svl sc/inc sc/source sd/source solenv/clang-format svl/CppunitTest_svl_itempool.mk svl/Module_svl.mk svl/qa svl/source svx/source sw/s

2024-01-12 Thread Armin Le Grand (allotropia) (via logerrit)
 compilerplugins/clang/store/staticvar.cxx|1 
 cui/source/tabpages/tabarea.cxx  |   10 
 editeng/source/editeng/impedit4.cxx  |8 
 include/svl/itempool.hxx |   82 +--
 include/svl/itemset.hxx  |9 
 include/svl/poolitem.hxx |9 
 sc/inc/fillinfo.hxx  |4 
 sc/source/core/data/documen9.cxx |7 
 sc/source/core/data/document.cxx |4 
 sc/source/core/data/document10.cxx   |4 
 sc/source/core/data/fillinfo.cxx |   15 
 sc/source/core/data/poolcach.cxx |2 
 sc/source/filter/xml/xmlexprt.cxx|4 
 sc/source/filter/xml/xmlfonte.cxx|8 
 sc/source/ui/view/cellsh1.cxx|   14 
 sc/source/ui/view/output.cxx |   12 
 sc/source/ui/view/tabvwshc.cxx   |7 
 sc/source/ui/view/viewfunc.cxx   |   12 
 sd/source/core/drawdoc2.cxx  |8 
 sd/source/ui/unoidl/unomodel.cxx |7 
 solenv/clang-format/excludelist  |2 
 svl/CppunitTest_svl_itempool.mk  |   34 -
 svl/Module_svl.mk|1 
 svl/qa/unit/items/test_itempool.cxx  |  108 ---
 svl/source/inc/poolio.hxx|   73 --
 svl/source/items/itempool.cxx|  734 +--
 svl/source/items/itemset.cxx |  276 ++
 svl/source/items/poolitem.cxx|1 
 svx/source/unodraw/UnoNameItemTable.cxx  |   24 
 svx/source/unodraw/UnoNamespaceMap.cxx   |   14 
 svx/source/unodraw/unomtabl.cxx  |   46 +
 svx/source/unodraw/unoshape.cxx  |4 
 svx/source/xoutdev/xattr.cxx |   50 +
 sw/source/core/crsr/crstrvl.cxx  |   14 
 sw/source/core/doc/DocumentFieldsManager.cxx |7 
 sw/source/core/doc/doc.cxx   |   16 
 sw/source/core/doc/docbasic.cxx  |4 
 sw/source/core/doc/docfld.cxx|   12 
 sw/source/core/doc/docfmt.cxx|8 
 sw/source/core/doc/doctxm.cxx|4 
 sw/source/core/doc/visiturl.cxx  |4 
 sw/source/core/docnode/node.cxx  |4 
 sw/source/core/edit/edfld.cxx|8 
 sw/source/core/fields/docufld.cxx|4 
 sw/source/core/layout/trvlfrm.cxx|4 
 sw/source/core/table/swnewtable.cxx  |4 
 sw/source/core/table/swtable.cxx |8 
 sw/source/core/undo/unattr.cxx   |5 
 sw/source/core/unocore/unostyle.cxx  |4 
 sw/source/core/view/vprint.cxx   |7 
 sw/source/filter/html/htmlflywriter.cxx  |7 
 sw/source/filter/writer/writer.cxx   |   31 -
 sw/source/filter/ww8/rtfexport.cxx   |   25 
 sw/source/filter/ww8/wrtw8sty.cxx|4 
 sw/source/filter/ww8/wrtww8.cxx  |7 
 sw/source/filter/xml/xmlexp.cxx  |4 
 sw/source/filter/xml/xmlfonte.cxx|4 
 sw/source/uibase/utlui/content.cxx   |   10 
 vcl/win/gdi/gdiimpl.cxx  |2 
 59 files changed, 806 insertions(+), 999 deletions(-)

New commits:
commit ae7807c889c19145f89cec40afac82eee191837c
Author: Armin Le Grand (allotropia) 
AuthorDate: Wed Jan 10 20:07:47 2024 +0100
Commit: Armin Le Grand 
CommitDate: Fri Jan 12 12:15:54 2024 +0100

ITEM: No longer register Items at Pool

The issue is that the flag RegisteredAtPool
at the SfxPoolItem is Pool-dependent: It marks that
the Item is registeres at *one* Pool/Model. This
makes it Pool-dependent. Due to this there is no way
to share Items that need to be registered globally/
in multiple Pools/Models what is one of the goals
for optimal sharing.

We can also not live without having access to all
Items associated with the Pool, due to mechanisms
in place like the Surrogate stuff.

This again is used for two purposes:

(1) Access all Items associated with one Pool/Model,
at least that is the assumption. This is not valid
since it gets corrupted with a single ItemSet/Holder
used that does not host model data, e.g. an open
Dialog or the Sidebar (or...). But works in
principle.

(2) Access extra-Items that are held nowhere and
are created using DirectPutItemInPool, e.g. infos
for a Dialog. These would need a instance/place to
host them, the Pool is (ab)used for that.

Both are 'compromizes' (to not use a more bad word)
and should not exist. (1) should iterate over the
Model and do actions. There are even places that
use (1) to *change* Items, by casting them to
non-const, even RefCounted ones, so having no control
over what all might be changed doing so. Since we
talk about ca. 100+ places there is no way to get
away 

core.git: Branch 'distro/collabora/co-23.05' - desktop/qa include/sfx2 include/test sc/qa sfx2/source test/source

2024-01-12 Thread Miklos Vajna (via logerrit)
 desktop/qa/desktop_lib/test_desktop_lib.cxx  |   29 ++
 include/sfx2/lokhelper.hxx   |   12 ++
 include/sfx2/sidebar/AsynchronousCall.hxx|4 ++-
 include/test/lokcallback.hxx |4 +++
 sc/qa/unit/tiledrendering/data/chart.ods |binary
 sc/qa/unit/tiledrendering/tiledrendering.cxx |   28 +
 sfx2/source/control/bindings.cxx |   24 +
 sfx2/source/sidebar/AsynchronousCall.cxx |   11 -
 sfx2/source/sidebar/SidebarController.cxx|   30 ++-
 sfx2/source/view/lokhelper.cxx   |   29 ++
 test/source/lokcallback.cxx  |   25 ++
 11 files changed, 140 insertions(+), 56 deletions(-)

New commits:
commit 59785bd8605f59860b24c40f04da04344c8df2c3
Author: Miklos Vajna 
AuthorDate: Fri Jan 12 08:35:23 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 12:12:50 2024 +0100

cool#7492 sfx2 lok: set language/locale on async sidebar update

Create two Calc views, set the first view language to English, second
view language to German. Type in the English view, double-click on a
chart in the German view. The sidebar in the German view will have
English strings in it. This doesn't happen if there is no typing right
after the chart activation in the English view.

What happens is that the sidebar update is async, and
sfx2::sidebar::SidebarController::notifyContextChangeEvent() gets
called, which registers an aync event when it calls
AsynchronousCall::RequestCall(). Then later this job gets scheduled, but
possibly by that time the active view is the English one, leading to
English strings when chart::ColumnChartDialogController::getName() calls
SchResId(), which works from the language of the current view.

Fix the problem similar to what commit
fb7b0b944741e4efae8d92a6e305036aff906c7a (cool#7492 sfx2 lok: just set
language/locale on async binding update, 2024-01-09), did: set the
language/locale from the current view before executing the async job and
restore the old value once we're done.

Extract the now duplicated code to a new SfxLokLanguageGuard, so in case
more places have a problem with incorrect l10n, then it's meant to be a
one-liner to fix further places.

(cherry picked from commit aaf6ce108e91b1504befe19afcee471e3316ae7a)

Conflicts:
desktop/qa/desktop_lib/test_desktop_lib.cxx
sc/qa/unit/tiledrendering/tiledrendering.cxx
sfx2/source/sidebar/SidebarController.cxx

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

diff --git a/desktop/qa/desktop_lib/test_desktop_lib.cxx 
b/desktop/qa/desktop_lib/test_desktop_lib.cxx
index ea572c8e8a41..1d035a1c4b8c 100644
--- a/desktop/qa/desktop_lib/test_desktop_lib.cxx
+++ b/desktop/qa/desktop_lib/test_desktop_lib.cxx
@@ -68,6 +68,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #if USE_TLS_NSS
 #include 
@@ -3296,35 +3297,11 @@ void DesktopLOKTest::testMultiDocuments()
 }
 }
 
-namespace
-{
-SfxChildWindow* lcl_initializeSidebar()
-{
-// in init.cxx we do setupSidebar which creates the controller, do it 
here
-
-SfxViewShell* pViewShell = SfxViewShell::Current();
-CPPUNIT_ASSERT(pViewShell);
-
-SfxViewFrame* pViewFrame = pViewShell->GetViewFrame();
-CPPUNIT_ASSERT(pViewFrame);
-
-SfxChildWindow* pSideBar = pViewFrame->GetChildWindow(SID_SIDEBAR);
-CPPUNIT_ASSERT(pSideBar);
-
-auto pDockingWin = dynamic_cast(pSideBar->GetWindow());
-CPPUNIT_ASSERT(pDockingWin);
-
-pDockingWin->GetOrCreateSidebarController(); // just to create the 
controller
-
-return pSideBar;
-}
-};
-
 void DesktopLOKTest::testControlState()
 {
 LibLODocument_Impl* pDocument = loadDoc("search.ods");
 pDocument->pClass->postUnoCommand(pDocument, ".uno:StarShapes", nullptr, 
false);
-lcl_initializeSidebar();
+TestLokCallbackWrapper::InitializeSidebar();
 Scheduler::ProcessEventsToIdle();
 
 boost::property_tree::ptree aState;
@@ -3338,7 +3315,7 @@ void DesktopLOKTest::testMetricField()
 {
 LibLODocument_Impl* pDocument = loadDoc("search.ods");
 pDocument->pClass->postUnoCommand(pDocument, ".uno:StarShapes", nullptr, 
false);
-SfxChildWindow* pSideBar = lcl_initializeSidebar();
+SfxChildWindow* pSideBar = TestLokCallbackWrapper::InitializeSidebar();
 Scheduler::ProcessEventsToIdle();
 
 vcl::Window* pWin = pSideBar->GetWindow();
diff --git a/include/sfx2/lokhelper.hxx b/include/sfx2/lokhelper.hxx
index e593002d0498..288cfc0e075c 100644
--- a/include/sfx2/lokhelper.hxx
+++ b/include/sfx2/lokhelper.hxx
@@ -252,6 +252,18 @

core.git: Branch 'libreoffice-24-2' - bin/update config_host.mk.in configure.ac distro-configs/Jenkins external/onlineupdate Makefile.gbuild

2024-01-12 Thread Stephan Bergmann (via logerrit)
 Makefile.gbuild   |2 
 bin/update/create_partial_update.py   |  185 --
 bin/update/path.py|   10 
 config_host.mk.in |1 
 configure.ac  |   16 -
 distro-configs/Jenkins/LibreOfficeLinuxUpdater.conf   |1 
 external/onlineupdate/UnpackedTarball_onlineupdate.mk |6 
 external/onlineupdate/cygpath.patch   |   11 +
 external/onlineupdate/lo.patch|   10 
 9 files changed, 74 insertions(+), 168 deletions(-)

New commits:
commit f7accbfdf3231bfa48f42533e2bcbb27b8a4af04
Author: Stephan Bergmann 
AuthorDate: Thu Jan 11 17:02:43 2024 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 12 11:55:17 2024 +0100

Fix `make create-partial-info` (for Windows, at least)

I got lost trying to figure out how the original
bin/update/create_partial_update.py code was meant to obtain old and new
installation trees to diff, so I simplified that down to the 
create-partial-info
make target now expecting an ONLINEUPDATE_MAR_OLDARCHIVE make variable that
points at the old archive install set.  (And the
--with-online-update-mar-serverurl configure option is gone for good again.)
The remaining changes are similar to what was needed in
28bad382face10be75af3875e44dde89fbc78108 "Fix `make create-update-info` (for
Windows, at least)".  (And the mbsdiff and mar tools expect Windows-style
pathnames, but mktemp returns a Unix-style pathname in cygwin shell 
scripts, so
this needed an additional Windows-only external/onlineupdate/cygpath.patch.)

Change-Id: I40690210d62e3f26fb2d574914a0dd4323e6cd62
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161924
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 
(cherry picked from commit 44ea2602e3ed8839012582a466775f10da86ee4b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161937
Reviewed-by: Michael Stahl 

diff --git a/Makefile.gbuild b/Makefile.gbuild
index 39eab31f95b2..211066becd37 100644
--- a/Makefile.gbuild
+++ b/Makefile.gbuild
@@ -60,7 +60,7 @@ create-partial-info:
$(eval VERSION := 
$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)$(LIBO_VERSION_SUFFIX)$(LIBO_VERSION_SUFFIX_SUFFIX))
$(eval PLATFORM := $(RTL_OS)_$(RTL_ARCH))
$(eval MAR_NAME_PREFIX := 
$(PRODUCTNAME)_$(VERSION)_$(PLATFORM)_$(BUILDID))
-   MBSDIFF=$(WORKDIR)/LinkTarget/Executable/mbsdiff 
MAR=$(INSTDIR)/program/mar $(SRCDIR)/bin/update/create_partial_update.py 
"$(WORKDIR)" "$(MAR_NAME_PREFIX)" "$(ONLINEUPDATE_MAR_SERVERURL)" 
LOOnlineUpdater "$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" 
"$(ONLINEUPDATE_MAR_CERTIFICATENAME)" "$(ONLINEUPDATE_MAR_BASEURL)" 
"$(PLATFORM)" "$(BUILDID)"
+   MBSDIFF=$(WORKDIR)/LinkTarget/Executable/mbsdiff 
MAR=$(INSTDIR)/program/mar $(if $(filter WNT,$(OS)),$(shell cygpath -u 
$(SRCDIR)/bin/update/create_partial_update.py),$(SRCDIR)/bin/update/create_partial_update.py)
 "$(WORKDIR)" "$(MAR_NAME_PREFIX)" LOOnlineUpdater 
"$(ONLINEUPDATE_MAR_CERTIFICATEPATH)" "$(ONLINEUPDATE_MAR_CERTIFICATENAME)" 
"$(ONLINEUPDATE_MAR_BASEURL)" "$(PRODUCTNAME)" 
'$(LIBO_VERSION_MAJOR).$(LIBO_VERSION_MINOR).$(LIBO_VERSION_MICRO).$(LIBO_VERSION_PATCH)'
 "$(ONLINEUPDATE_MAR_OLDARCHIVE)"
 
 # also possible to bypass the dependencies/the gbuild processing by just 
running
 # LD_LIBRARY_PATH=instdir/program make cmd cmd='ALL_LANGS="$(ALL_LANGS)" 
workdir/LinkTarget/Executable/pocheck'
diff --git a/bin/update/create_partial_update.py 
b/bin/update/create_partial_update.py
index 2730c4765f14..cc9bb745852b 100755
--- a/bin/update/create_partial_update.py
+++ b/bin/update/create_partial_update.py
@@ -1,90 +1,14 @@
 #!/usr/bin/env python3
+import glob
 import json
 import os
+import re
 import subprocess
 import sys
 
-import requests
-
-from path import UpdaterPath, mkdir_p, convert_to_unix, convert_to_native
+from path import UpdaterPath, convert_to_native
 from signing import sign_mar_file
-from tools import get_file_info, get_hash
-from uncompress_mar import extract_mar
-
-BUF_SIZE = 1024
-current_dir_path = os.path.dirname(os.path.realpath(convert_to_unix(__file__)))
-
-
-class InvalidFileException(Exception):
-
-def __init__(self, *args, **kwargs):
-super().__init__(self, *args, **kwargs)
-
-
-def download_file(filepath, url, hash_string):
-with open(filepath, "wb") as f:
-response = requests.get(url, stream=True)
-
-if not response.ok:
-return
-
-for block in response.iter_content(1024):
-f.write(block)
-
-file_hash = get_hash(filepath)
-
-if file_hash != hash_string:
-raise InvalidFileException(
-"file hash does not match for file %s: Expected %s, Got: %s" % 
(url, hash_string, file_hash))
-
-
-def handle_language(lang_entries, filedir):
-

core.git: include/svtools include/vcl

2024-01-12 Thread Julien Nabet (via logerrit)
 include/svtools/genericasyncunodialog.hxx |7 +++
 include/vcl/abstdlg.hxx   |6 ++
 2 files changed, 13 insertions(+)

New commits:
commit 8f215fab5593070556e903121cc195660e16105c
Author: Julien Nabet 
AuthorDate: Fri Jan 5 13:50:34 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 12 11:40:58 2024 +0100

Document a bit async methods

Retrieved from Miklos' feedback in
https://lists.freedesktop.org/archives/libreoffice/2024-January/091377.html
Thank you to him!

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

diff --git a/include/svtools/genericasyncunodialog.hxx 
b/include/svtools/genericasyncunodialog.hxx
index 058c37b00cdb..64fe80d5f9eb 100644
--- a/include/svtools/genericasyncunodialog.hxx
+++ b/include/svtools/genericasyncunodialog.hxx
@@ -32,6 +32,13 @@ typedef cppu::ImplInheritanceHelper<::svt::OGenericUnoDialog,
 OGenericUnoAsyncDialogBase;
 
 /** abstract base class for implementing UNO objects representing asynchronous 
dialogs
+
+Contrary to StartExecuteAsync in VclAbstractDialog from 
include/vcl/abstdlg.hxx,
+the different methods are used in a special case when an import or export 
action
+wants to show a dialog, as part of a synchronous filter() API call.
+
+In this case it's not possible to move the "rest of the code" to an async
+callback, so that needs special handling. Luckily these dialogs are rather 
rare.
 */
 template  class OGenericUnoAsyncDialog : public 
OGenericUnoAsyncDialogBase
 {
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 793d8cdd36a9..9fbe53529cff 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -65,6 +65,12 @@ public:
 bool isSet() const { return !!maEndDialogFn; }
 };
 
+/**
+* Usual codepath for modal dialogs. Some uno command decides to open a 
dialog,
+  we call StartExecuteAsync() with a callback to handle the dialog result
+  and that handler will be executed at some stage in the future,
+  instead of right now.
+*/
 bool StartExecuteAsync(const std::function &rEndDialogFn)
 {
 AsyncContext aCtx;


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

2024-01-12 Thread Armin Le Grand (allotropia) (via logerrit)
 sd/source/ui/slideshow/slideshowimpl.cxx |8 
 1 file changed, 8 insertions(+)

New commits:
commit f259a4636308fbdb8c5d8b9f430e3d53018f327b
Author: Armin Le Grand (allotropia) 
AuthorDate: Thu Jan 11 14:22:32 2024 +0100
Commit: Michael Stahl 
CommitDate: Fri Jan 12 11:33:17 2024 +0100

tdf#158664 Ignore Notifications when SlideShow is inactive

The impl SlideshowImpl gets notifications for changes from
the ObjectModel, but needs to ignore them when SlideShow
is not active/running. For discussion how to do this see
comments in task.

Change-Id: Ic251af4b82f0f4b48d8d9b0127dd2f6015966935
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161922
Tested-by: Jenkins
Reviewed-by: Armin Le Grand 
(cherry picked from commit 2184890a0eebc55aa24cbe61de5b8918d958c65f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161932
Reviewed-by: Michael Stahl 

diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx 
b/sd/source/ui/slideshow/slideshowimpl.cxx
index 1e739ab97f26..4bf43fc3bda5 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -3192,6 +3192,14 @@ void SlideshowImpl::Notify(SfxBroadcaster& /*rBC*/, 
const SfxHint& rHint)
 // better do nothing when no DrawModel (should not happen)
 return;
 
+// tdf#158664 I am surprised, but the 'this' instance keeps incarnated
+// when the slideshow was running once, so need to check for
+// SlideShow instance/running to be safe.
+// NOTE: isRunning() checks mxShow.is(), that is what we want
+if (!isRunning())
+// no SlideShow instance or not running, nothing to do
+return;
+
 const SdrHintKind eHintKind(static_cast(rHint).GetKind());
 
 if (SdrHintKind::ObjectChange == eHintKind)


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

2024-01-12 Thread Attila Szűcs (via logerrit)
 editeng/inc/editattr.hxx|2 ++
 editeng/inc/editdoc.hxx |1 +
 editeng/source/editeng/editdoc.cxx  |   13 +
 editeng/source/editeng/impedit3.cxx |6 +-
 4 files changed, 21 insertions(+), 1 deletion(-)

New commits:
commit 9dd58f32e2a3b327f2a82387783d71af09d526bd
Author: Attila Szűcs 
AuthorDate: Tue Jan 9 17:45:19 2024 +0100
Commit: Caolán McNamara 
CommitDate: Fri Jan 12 11:18:44 2024 +0100

tdf#154248 Impress: fix color of hyperlink

Added a new FindAttrib method that searches in the attribs
a bit different.
The original FindAttrib searches in attribs as if their position
intervals are closed from both side [Start,End].
However, the actual attribs array was created using PaMs as positions,
and these are right-opened intervals [Start,End)

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

diff --git a/editeng/inc/editattr.hxx b/editeng/inc/editattr.hxx
index 502a5b084605..62d0a0ab5a70 100644
--- a/editeng/inc/editattr.hxx
+++ b/editeng/inc/editattr.hxx
@@ -101,6 +101,8 @@ public:
 
 boolIsIn( sal_Int32 nIndex ) const
 { return ( ( nStart <= nIndex ) && ( nEnd >= nIndex ) ); }
+boolIsInLeftClosedRightOpen( sal_Int32 nIndex ) const
+{ return ( ( nStart <= nIndex ) && ( nEnd > nIndex ) ); }
 boolIsInside( sal_Int32 nIndex ) const
 { return ( ( nStart < nIndex ) && ( nEnd > nIndex ) ); }
 boolIsEmpty() const
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index e5c3abbef0cf..13969badac36 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -200,6 +200,7 @@ public:
 
 const EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_Int32 nPos ) 
const;
 EditCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_Int32 nPos );
+EditCharAttrib* FindAttribRightOpen( sal_uInt16 nWhich, sal_Int32 nPos );
 const EditCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_Int32 
nFromPos ) const;
 EditCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_Int32 nPos );
 const EditCharAttrib* FindFeature( sal_Int32 nPos ) const;
diff --git a/editeng/source/editeng/editdoc.cxx 
b/editeng/source/editeng/editdoc.cxx
index 9fff222d9368..38641b95efa4 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -2869,6 +2869,19 @@ EditCharAttrib* CharAttribList::FindAttrib( sal_uInt16 
nWhich, sal_Int32 nPos )
 return nullptr;
 }
 
+EditCharAttrib* CharAttribList::FindAttribRightOpen( sal_uInt16 nWhich, 
sal_Int32 nPos )
+{
+AttribsType::reverse_iterator it = std::find_if(aAttribs.rbegin(), 
aAttribs.rend(),
+[&nWhich, &nPos](AttribsType::value_type& rxAttr) {
+return rxAttr->Which() == nWhich && 
rxAttr->IsInLeftClosedRightOpen(nPos); });
+if (it != aAttribs.rend())
+{
+EditCharAttrib& rAttr = **it;
+return &rAttr;
+}
+return nullptr;
+}
+
 const EditCharAttrib* CharAttribList::FindNextAttrib( sal_uInt16 nWhich, 
sal_Int32 nFromPos ) const
 {
 assert(nWhich);
diff --git a/editeng/source/editeng/impedit3.cxx 
b/editeng/source/editeng/impedit3.cxx
index 8a6ff9d63e6e..0541dfbc91b9 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -2981,7 +2981,11 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, 
sal_Int32 nPos, SvxFont& rFo
 // #i1550# hard color attrib should win over text color 
from field
 if ( pAttrib->Which() == EE_FEATURE_FIELD )
 {
-EditCharAttrib* pColorAttr = 
pNode->GetCharAttribs().FindAttrib( EE_CHAR_COLOR, nPos );
+// These Attribs positions come from PaMs, so their 
interval is right-open and left-closed
+// when SeekCursor is called, nPos is incremented by 
1. I do not know why...
+// probably designed to be a nEndPos, and like in a 
PaM, it is the position after the actual character.
+sal_Int32 nPosActual = nPos > 0 ? nPos - 1 : 0;
+EditCharAttrib* pColorAttr = 
pNode->GetCharAttribs().FindAttribRightOpen( EE_CHAR_COLOR, nPosActual );
 if ( pColorAttr )
 pColorAttr->SetFont( rFont, pOut );
 }


core.git: solenv/flatpak-manifest.in

2024-01-12 Thread Stephan Bergmann (via logerrit)
 solenv/flatpak-manifest.in |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 43a7d21f99a08185ccbb3cc7b4cb9e9851c4d418
Author: Stephan Bergmann 
AuthorDate: Fri Jan 12 09:43:31 2024 +0100
Commit: Stephan Bergmann 
CommitDate: Fri Jan 12 11:13:14 2024 +0100

Update solenv/flatpak-manifest.in

* Incorporate
  

  "Update gvfs-1.52.1.tar.xz to 1.52.2 (#272)"

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

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 58e2ce8f46f2..e9fa79e8f55f 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -49,8 +49,8 @@
 "sources": [
 {
 "type": "archive",
-"url": 
"https://download.gnome.org/sources/gvfs/1.52/gvfs-1.52.1.tar.xz";,
-"sha256": 
"cdbd4440f6d08792a6e7521244c17386e20bd537d375117099fc8fb68fe91741",
+"url": 
"https://download.gnome.org/sources/gvfs/1.52/gvfs-1.52.2.tar.xz";,
+"sha256": 
"a643aceaa053caac0d8eff9a015f636e4bd1bb09cfe27864e347db67460e7b91",
 "x-checker-data": {
 "type": "gnome",
 "name": "gvfs",


core.git: Branch 'distro/collabora/co-23.05' - sw/source vcl/jsdialog

2024-01-12 Thread Méven Car (via logerrit)
 sw/source/ui/dialog/swdlgfact.cxx|5 +
 sw/source/ui/dialog/swdlgfact.hxx|1 +
 sw/source/ui/dialog/uiregionsw.cxx   |7 +--
 sw/source/uibase/dialog/regionsw.cxx |   16 +---
 vcl/jsdialog/enabled.cxx |1 +
 5 files changed, 21 insertions(+), 9 deletions(-)

New commits:
commit 803d572838d8075e79d001fe6548f45878ea466f
Author: Méven Car 
AuthorDate: Tue Jan 9 15:15:23 2024 +0100
Commit: Miklos Vajna 
CommitDate: Fri Jan 12 10:38:57 2024 +0100

cool#1770 sw: make Edit Sections dialog async and mark it a jsdialog

We want our dialogs to be async so they don't lock documents when opened
and to allow concurrent edition.

In SwEditRegionDlg, we need to make sure the reference to the SwWrtShell
isn't read from 'this' after `response()`, as it is now the dialog is 
disposed of earlier in the async case.

How to test: Create a new Writer document, insert a section, right-click 
inside the section, pick the 'edit section' menu item to trigger this dialog.

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

diff --git a/sw/source/ui/dialog/swdlgfact.cxx 
b/sw/source/ui/dialog/swdlgfact.cxx
index f9e05b3f0d35..8c6cabae64cc 100644
--- a/sw/source/ui/dialog/swdlgfact.cxx
+++ b/sw/source/ui/dialog/swdlgfact.cxx
@@ -302,6 +302,11 @@ short AbstractEditRegionDlg_Impl::Execute()
 return m_xDlg->run();
 }
 
+bool AbstractEditRegionDlg_Impl::StartExecuteAsync(AsyncContext &rCtx)
+{
+return weld::DialogController::runAsync(m_xDlg, rCtx.maEndDialogFn);
+}
+
 short AbstractInsertSectionTabDialog_Impl::Execute()
 {
 return m_xDlg->run();
diff --git a/sw/source/ui/dialog/swdlgfact.hxx 
b/sw/source/ui/dialog/swdlgfact.hxx
index 359af1bc2e31..e0f21d170b57 100644
--- a/sw/source/ui/dialog/swdlgfact.hxx
+++ b/sw/source/ui/dialog/swdlgfact.hxx
@@ -644,6 +644,7 @@ public:
 {
 }
 virtual short Execute() override;
+virtual bool StartExecuteAsync(AsyncContext &rCtx) override;
 virtual voidSelectSection(const OUString& rSectionName) override;
 };
 
diff --git a/sw/source/ui/dialog/uiregionsw.cxx 
b/sw/source/ui/dialog/uiregionsw.cxx
index 89248e7eed8d..b3dff074fdc1 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -818,12 +818,15 @@ IMPL_LINK_NOARG(SwEditRegionDlg, OkHdl, weld::Button&, 
void)
 
 aOrigArray.clear();
 
+SwWrtShell& rSh = m_rSh;
+
 // response must be called ahead of EndAction's end,
 // otherwise ScrollError can occur.
 m_xDialog->response(RET_OK);
 
-m_rSh.EndUndo();
-m_rSh.EndAllAction();
+// accessing 'this' after response isn't safe, as the callback might cause 
the dialog to be disposed
+rSh.EndUndo();
+rSh.EndAllAction();
 }
 
 // Toggle protect
diff --git a/sw/source/uibase/dialog/regionsw.cxx 
b/sw/source/uibase/dialog/regionsw.cxx
index 834f1b332bc5..ad020e28b92d 100644
--- a/sw/source/uibase/dialog/regionsw.cxx
+++ b/sw/source/uibase/dialog/regionsw.cxx
@@ -218,15 +218,17 @@ void SwBaseShell::EditRegionDialog(SfxRequest const & 
rReq)
 case FN_EDIT_CURRENT_REGION:
 {
 weld::Window* pParentWin = GetView().GetFrameWeld();
+
+SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
+VclPtr 
pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
+
+if(auto pStringItem = dynamic_cast< const SfxStringItem *>( pItem 
))
 {
-SwAbstractDialogFactory* pFact = 
SwAbstractDialogFactory::Create();
-ScopedVclPtr 
pEditRegionDlg(pFact->CreateEditRegionDlg(pParentWin, rWrtShell));
-if(auto pStringItem = dynamic_cast< const SfxStringItem *>( 
pItem ))
-{
-pEditRegionDlg->SelectSection(pStringItem->GetValue());
-}
-pEditRegionDlg->Execute();
+pEditRegionDlg->SelectSection(pStringItem->GetValue());
 }
+pEditRegionDlg->StartExecuteAsync([pEditRegionDlg](sal_Int32 
/*nResult */){
+pEditRegionDlg->disposeOnce();
+});
 }
 break;
 }
diff --git a/vcl/jsdialog/enabled.cxx b/vcl/jsdialog/enabled.cxx
index 058880a97835..c8ed0d73efad 100644
--- a/vcl/jsdialog/enabled.cxx
+++ b/vcl/jsdialog/enabled.cxx
@@ -178,6 +178,7 @@ bool isBuilderEnabled(std::u16string_view rUIFile, bool 
bMobile)
 || rUIFile == u"modules/swriter/ui/contentcontrollistitemdlg.ui"
 || rUIFile == u"modules/swriter/ui/dropcapspage.ui"
 || rUIFile == u"modules/swriter/ui/dropdownfielddialog.ui"
+|| rUIFile == u"modules/swriter/ui/editsectiondialog.ui"
 || rUIFile == u"modules/swriter/ui/endnotepage.ui"
 || rUIFile == u"modules/swriter/ui/footendnotedialog.ui"
 || rUIFile 

core.git: Branch 'libreoffice-24-2' - editeng/source sw/qa

2024-01-12 Thread Regina Henschel (via logerrit)
 editeng/source/editeng/impedit4.cxx |2 
 sw/qa/extras/uiwriter/data/tdf159049_LineBreakRTFClipboard.fodt |  300 
++
 sw/qa/extras/uiwriter/uiwriter9.cxx |   35 +
 3 files changed, 336 insertions(+), 1 deletion(-)

New commits:
commit f5431af083eb1cde85505dddf19600a7b8f52020
Author: Regina Henschel 
AuthorDate: Tue Jan 9 21:41:40 2024 +0100
Commit: Xisco Fauli 
CommitDate: Fri Jan 12 10:34:23 2024 +0100

tdf#159049 use RTF_LINE for EE_FEATURE_LINEBR for copy

Copy of simple text uses ImpEditEngine::WriteItemAsRTF() method.
Error was, that in case of a line break ('
') the string
OOO_STRING_SVTOOLS_RTF_SL was written, but it needs to be the string
OOO_STRING_SVTOOLS_RTF_LINE.

Change-Id: I1c2ff2087c563b26e26d8768dfcfd1645be91d2f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161842
Tested-by: Jenkins
Reviewed-by: Regina Henschel 
Signed-off-by: Xisco Fauli 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161954

diff --git a/editeng/source/editeng/impedit4.cxx 
b/editeng/source/editeng/impedit4.cxx
index 57b3d65c54b4..3bf44cdb9174 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -905,7 +905,7 @@ void ImpEditEngine::WriteItemAsRTF( const SfxPoolItem& 
rItem, SvStream& rOutput,
 break;
 case EE_FEATURE_LINEBR:
 {
-rOutput.WriteOString( OOO_STRING_SVTOOLS_RTF_SL );
+rOutput.WriteOString( OOO_STRING_SVTOOLS_RTF_LINE );
 }
 break;
 case EE_CHAR_KERNING:
diff --git a/sw/qa/extras/uiwriter/data/tdf159049_LineBreakRTFClipboard.fodt 
b/sw/qa/extras/uiwriter/data/tdf159049_LineBreakRTFClipboard.fodt
new file mode 100644
index ..22472c197053
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/tdf159049_LineBreakRTFClipboard.fodt
@@ -0,0 +1,300 @@
+
+
+http://openoffice.org/2004/office"; 
xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" 
xmlns:xlink="http://www.w3.org/1999/xlink"; 
xmlns:config="urn:oasis:names:tc:opendocument:xmlns:config:1.0" 
xmlns:dc="http://purl.org/dc/elements/1.1/"; 
xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta: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:rpt="http://openoffice.org/2005/report"; 
xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" 
xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d: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:table="urn:oasis:names:tc:opendocument:xmlns:table:1.0" 
xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" 
xmlns:ooow="http://openoffice.org/200
 4/writer" xmlns:oooc="http://openoffice.org/2004/calc"; 
xmlns:css3t="http://www.w3.org/TR/css3-text/"; 
xmlns:of="urn:oasis:names:tc:opendocument:xmlns:of:1.2" 
xmlns:math="http://www.w3.org/1998/Math/MathML"; 
xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" 
xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" 
xmlns:formx="urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:form:1.0"
 xmlns:dom="http://www.w3.org/2001/xml-events"; 
xmlns:xforms="http://www.w3.org/2002/xforms"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xmlns:xhtml="http://www.w3.org/1999/xhtml"; 
xmlns:grddl="http://www.w3.org/2003/g/data-view#"; office:version="1.3" 
office:mimetype="application/vnd.oasis.opendocument.text">
+ Regina 
Henschel2024-01-08T23:25:06.849002024-01-09T20:51:07.36300Regina
 
HenschelPT18M48S8LOmyBuild/24.8.0.0.alpha0$Windows_X86_64
 
LibreOffice_project/00eae23267bf64e07cf057f828cd85f3c38ac669
+ 
+  
+   0
+   0
+   21338
+   14543
+   true
+   false
+   
+
+ view2
+ 11003
+ 1000
+ 0
+ 0
+ 21336
+ 14542
+ 0
+ 1
+ false
+ 100
+ false
+ false
+ false
+ false
+ false
+ false
+
+   
+  
+  
+   true
+   
+   false
+   false
+   false
+   false
+   true
+   1
+   true
+   false
+   false
+   false
+   
+   false
+   
+   false
+   false
+   false
+   Person
+   0
+   false
+   true
+   true
+   false
+   false
+   false
+   IDAnredeVornameNachname
+   0
+   
+   true
+   high-resolution
+   false
+   false
+   true
+   true
+   true
+   false
+   false
+   true
+   true
+   false
+   true
+   true
+   false
+   false
+   false
+   true
+   false
+   true
+   false
+   false
+   true
+   false
+   false
+   false
+   false
+   false
+   false
+   757206
+   303919
+   false
+   false
+   true
+   true
+   false
+   true
+   true
+   false
+   true
+   true
+   true
+   false
+   false
+   false
+   false
+   true
+   false
+   true
+   false
+   false
+   false
+   false
+   false
+   true
+   0
+   true
+   false
+   true
+   true
+   false
+ 

core.git: android/source

2024-01-12 Thread Weblate (via logerrit)
 android/source/res/values-ab/strings.xml |2 +
 android/source/res/values-cs/strings.xml |6 +
 android/source/res/values-it/strings.xml |   34 +++
 3 files changed, 25 insertions(+), 17 deletions(-)

New commits:
commit 846a032ebd0859f4f52ca97741a2efa566fa9432
Author: Weblate 
AuthorDate: Thu Jan 11 09:18:48 2024 +0100
Commit: Michael Weghorn 
CommitDate: Fri Jan 12 09:39:43 2024 +0100

Added translation for android-viewer using Weblate (Abkhazian)

Change-Id: I773dd0a06ea44d9978cbb9b169545ef8bd456c6d

android-viewer translated using Weblate

Italian currently translated at 100.0% (118 of 118 strings)

Change-Id: I98f0567a3b5b2fa853b468dfb1aec21230527b42

android-viewer translated using Weblate

Italian currently translated at 100.0% (118 of 118 strings)

Change-Id: I87ee3f9f46342bc1a4c3c4062a74a7c7afb9b3f9

android-viewer translated using Weblate

Czech currently translated at 6.7% (8 of 118 strings)

Change-Id: I61735dcce61a859b45619b9b2742220f00ec94bc

android-viewer translated using Weblate

Italian currently translated at 99.1% (117 of 118 strings)

Change-Id: I867af2d187ff54c701d6ec3a2f6b7114acb55aba
Co-authored-by: Elisabetta Manuele 
Co-authored-by: Stanislav Horáček 
Co-authored-by: Valter Mura 
Co-authored-by: Weblate 
Co-authored-by: Андрей Абухба 
Translate-URL: 
https://translations.documentfoundation.org/projects/android-viewer/android-strings/cs/
Translate-URL: 
https://translations.documentfoundation.org/projects/android-viewer/android-strings/it/
Translation: android-viewer/android-strings
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161721
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 

diff --git a/android/source/res/values-ab/strings.xml 
b/android/source/res/values-ab/strings.xml
new file mode 100644
index ..a6b3daec9354
--- /dev/null
+++ b/android/source/res/values-ab/strings.xml
@@ -0,0 +1,2 @@
+
+
\ No newline at end of file
diff --git a/android/source/res/values-cs/strings.xml 
b/android/source/res/values-cs/strings.xml
index f508d4e9f63d..1cb7056b2d1a 100644
--- a/android/source/res/values-cs/strings.xml
+++ b/android/source/res/values-cs/strings.xml
@@ -2,4 +2,10 @@
 
 LibreOffice Viewer
 Nastavení LibreOffice Viewer
+LibreOffice Viewer je prohlížeč dokumentů 
založený na LibreOffice.
+https://www.libreoffice.org
+Toto vydání bylo dodáno společností 
$VENDOR.
+Verze: %1$s
ID sestavení: %2$s; +Zobrazit licenci +Tento soubor je pouze pro čtení. \ No newline at end of file diff --git a/android/source/res/values-it/strings.xml b/android/source/res/values-it/strings.xml index 0e7aa6bc0287..35dade166124 100644 --- a/android/source/res/values-it/strings.xml +++ b/android/source/res/values-it/strings.xml @@ -2,11 +2,11 @@ Impostazioni del Visualizzatore di LibreOffice https://it.libreoffice.org/ -Versione viene fornita da $VENDOR. +Versione fornita da $VENDOR. Questo file è di sola lettura. Mostra licenza Visualizzatore di LibreOffice -Il Visualizzatore di LibreOffice è un visualizzatore di documenti basato su LibreOffice. +Il Visualizzatore di LibreOffice è un\'app per visualizzare i documenti basata su LibreOffice. Mostra avviso Nuovo documento di testo Nuova presentazione @@ -47,28 +47,28 @@ Annulla Crea nuovo file Diapositiva -Il nome della parte è stato cambiato. +Il nome della parte è stato modificato. Massima qualità Nascondi -Scegli le opzioni di inserimento: +Scegli opzioni di inserimento: Tipo -Comando UNO corrente +Comando UNO attuale Indietro -Il file Bitmap è vuoto! +File Bitmap non valido. Incolla OK Regola la lunghezza Parte Impossibile esportare in PDF Salva con nome… -Colore tipo di carattere +Colore carattere Rinomina foglio di lavoro Lunghezza ottimale Inserisci un nome per la parte Automatico Elimina diapositiva Taglia -fileicon +iconafile Pagina Inserisci Inserisci lunghezza aggiuntiva in centesimi di millimetro @@ -84,19 +84,19 @@ Indietro Elimina La parte è stata eliminata. -Inserisci la password +Inserisci password OK Dimensione media -Imposta la lingua di visualizzazione predefinita -Scegli le opzioni di eliminazione: +Imposta lingua di visualizzazione predefinita +Scegli opzioni di eliminazione: Testo copiato negli appunti Esporta in PDF Rinomina diapositiva -Politica di riservatezza -Valore genitore -Dimensione più piccola +Informativa sulla riservatezza +Valore padre +Dimensione minima Seleziona foto -Non comprimere +Nessuna co

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

2024-01-12 Thread Jaume Pujantell (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |   29 ---
 sw/source/filter/ww8/docxattributeoutput.hxx |2 -
 2 files changed, 19 insertions(+), 12 deletions(-)

New commits:
commit 49c49d2b1687172216a37dfdbb8f7ed1583e6d75
Author: Jaume Pujantell 
AuthorDate: Wed Jan 3 19:32:25 2024 +0100
Commit: Jaume Pujantell 
CommitDate: Fri Jan 12 09:01:20 2024 +0100

sw: search for alternative weights when embeding on docx

Sometimes a docx document might come whith a font with niether normal
or bold weight embedded as regular, so when embedding a font in docx
search for alternative weights if neither a normal or bold matching
font has been found.

Change-Id: I95cf2634c392cec6e97e5dd12a90de6e50228ac1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161566
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index a70bee00967a..2d6ed05c3247 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7857,10 +7857,16 @@ void DocxAttributeOutput::EmbedFont( 
std::u16string_view name, FontFamily family
 {
 if( !m_rExport.m_rDoc.getIDocumentSettingAccess().get( 
DocumentSettingId::EMBED_FONTS ))
 return; // no font embedding with this document
-EmbedFontStyle( name, XML_embedRegular, family, ITALIC_NONE, 
WEIGHT_NORMAL, pitch );
-EmbedFontStyle( name, XML_embedBold, family, ITALIC_NONE, WEIGHT_BOLD, 
pitch );
-EmbedFontStyle( name, XML_embedItalic, family, ITALIC_NORMAL, 
WEIGHT_NORMAL, pitch );
-EmbedFontStyle( name, XML_embedBoldItalic, family, ITALIC_NORMAL, 
WEIGHT_BOLD, pitch );
+bool foundFont
+= EmbedFontStyle(name, XML_embedRegular, family, ITALIC_NONE, 
WEIGHT_NORMAL, pitch);
+foundFont
+= EmbedFontStyle(name, XML_embedBold, family, ITALIC_NONE, 
WEIGHT_BOLD, pitch) || foundFont;
+foundFont = EmbedFontStyle(name, XML_embedItalic, family, ITALIC_NORMAL, 
WEIGHT_NORMAL, pitch)
+|| foundFont;
+foundFont = EmbedFontStyle(name, XML_embedBoldItalic, family, 
ITALIC_NORMAL, WEIGHT_BOLD, pitch)
+|| foundFont;
+if (!foundFont)
+EmbedFontStyle(name, XML_embedRegular, family, ITALIC_NONE, 
WEIGHT_DONTKNOW, pitch);
 }
 
 static char toHexChar( int value )
@@ -7868,21 +7874,21 @@ static char toHexChar( int value )
 return value >= 10 ? value + 'A' - 10 : value + '0';
 }
 
-void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, 
FontFamily family, FontItalic italic,
-FontWeight weight, FontPitch pitch )
+bool DocxAttributeOutput::EmbedFontStyle(std::u16string_view name, int tag, 
FontFamily family,
+ FontItalic italic, FontWeight weight, 
FontPitch pitch)
 {
 // Embed font if at least viewing is allowed (in which case the opening 
app must check
 // the font license rights too and open either read-only or not use the 
font for editing).
 OUString fontUrl = EmbeddedFontsHelper::fontFileUrl( name, family, italic, 
weight, pitch,
 EmbeddedFontsHelper::FontRights::ViewingAllowed );
 if( fontUrl.isEmpty())
-return;
+return false;
 // TODO IDocumentSettingAccess::EMBED_SYSTEM_FONTS
 if( !fontFilesMap.count( fontUrl ))
 {
 osl::File file( fontUrl );
 if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None )
-return;
+return false;
 uno::Reference< css::io::XOutputStream > xOutStream = 
m_rExport.GetFilter().openFragmentStream(
 "word/fonts/font" + OUString::number(m_nextFontId) + ".odttf",
 "application/vnd.openxmlformats-officedocument.obfuscatedFont" );
@@ -7901,7 +7907,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string_view name, int tag, Fon
 {
 SAL_WARN( "sw.ww8", "Font file size too small (" << fontUrl << ")" 
);
 xOutStream->closeOutput();
-return;
+return false;
 }
 for( int i = 0;
  i < 16;
@@ -7918,7 +7924,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string_view name, int tag, Fon
 {
 SAL_WARN( "sw.ww8", "Error reading font file " << fontUrl );
 xOutStream->closeOutput();
-return;
+return false;
 }
 if( eof )
 break;
@@ -7926,7 +7932,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string_view name, int tag, Fon
 {
 SAL_WARN( "sw.ww8", "Error reading font file " << fontUrl );
 xOutStream->closeOutput();
-return;
+return false;
 }
 if( readSize == 0 )
 break;
@@ -7946,6 +7952,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string

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

2024-01-12 Thread Jaume Pujantell (via logerrit)
 sw/source/filter/ww8/docxattributeoutput.cxx |   29 ---
 sw/source/filter/ww8/docxattributeoutput.hxx |2 -
 2 files changed, 19 insertions(+), 12 deletions(-)

New commits:
commit 96d52b9e6879df3ab9697a7c0322cda5e08eb9af
Author: Jaume Pujantell 
AuthorDate: Wed Jan 3 19:32:25 2024 +0100
Commit: Jaume Pujantell 
CommitDate: Fri Jan 12 09:01:01 2024 +0100

sw: search for alternative weights when embeding on docx

Sometimes a docx document might come whith a font with niether normal
or bold weight embedded as regular, so when embedding a font in docx
search for alternative weights if neither a normal or bold matching
font has been found.

Change-Id: I95cf2634c392cec6e97e5dd12a90de6e50228ac1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161596
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Ashod Nakashian 

diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 3ae94d3c6e69..394d4a715e1a 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -7259,10 +7259,16 @@ void DocxAttributeOutput::EmbedFont( 
std::u16string_view name, FontFamily family
 {
 if( !m_rExport.m_rDoc.getIDocumentSettingAccess().get( 
DocumentSettingId::EMBED_FONTS ))
 return; // no font embedding with this document
-EmbedFontStyle( name, XML_embedRegular, family, ITALIC_NONE, 
WEIGHT_NORMAL, pitch );
-EmbedFontStyle( name, XML_embedBold, family, ITALIC_NONE, WEIGHT_BOLD, 
pitch );
-EmbedFontStyle( name, XML_embedItalic, family, ITALIC_NORMAL, 
WEIGHT_NORMAL, pitch );
-EmbedFontStyle( name, XML_embedBoldItalic, family, ITALIC_NORMAL, 
WEIGHT_BOLD, pitch );
+bool foundFont
+= EmbedFontStyle(name, XML_embedRegular, family, ITALIC_NONE, 
WEIGHT_NORMAL, pitch);
+foundFont
+= EmbedFontStyle(name, XML_embedBold, family, ITALIC_NONE, 
WEIGHT_BOLD, pitch) || foundFont;
+foundFont = EmbedFontStyle(name, XML_embedItalic, family, ITALIC_NORMAL, 
WEIGHT_NORMAL, pitch)
+|| foundFont;
+foundFont = EmbedFontStyle(name, XML_embedBoldItalic, family, 
ITALIC_NORMAL, WEIGHT_BOLD, pitch)
+|| foundFont;
+if (!foundFont)
+EmbedFontStyle(name, XML_embedRegular, family, ITALIC_NONE, 
WEIGHT_DONTKNOW, pitch);
 }
 
 static char toHexChar( int value )
@@ -7270,21 +7276,21 @@ static char toHexChar( int value )
 return value >= 10 ? value + 'A' - 10 : value + '0';
 }
 
-void DocxAttributeOutput::EmbedFontStyle( std::u16string_view name, int tag, 
FontFamily family, FontItalic italic,
-FontWeight weight, FontPitch pitch )
+bool DocxAttributeOutput::EmbedFontStyle(std::u16string_view name, int tag, 
FontFamily family,
+ FontItalic italic, FontWeight weight, 
FontPitch pitch)
 {
 // Embed font if at least viewing is allowed (in which case the opening 
app must check
 // the font license rights too and open either read-only or not use the 
font for editing).
 OUString fontUrl = EmbeddedFontsHelper::fontFileUrl( name, family, italic, 
weight, pitch,
 EmbeddedFontsHelper::FontRights::ViewingAllowed );
 if( fontUrl.isEmpty())
-return;
+return false;
 // TODO IDocumentSettingAccess::EMBED_SYSTEM_FONTS
 if( !m_FontFilesMap.count( fontUrl ))
 {
 osl::File file( fontUrl );
 if( file.open( osl_File_OpenFlag_Read ) != osl::File::E_None )
-return;
+return false;
 uno::Reference< css::io::XOutputStream > xOutStream = 
m_rExport.GetFilter().openFragmentStream(
 "word/fonts/font" + OUString::number(m_nextFontId) + ".odttf",
 "application/vnd.openxmlformats-officedocument.obfuscatedFont" );
@@ -7303,7 +7309,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string_view name, int tag, Fon
 {
 SAL_WARN( "sw.ww8", "Font file size too small (" << fontUrl << ")" 
);
 xOutStream->closeOutput();
-return;
+return false;
 }
 for( int i = 0;
  i < 16;
@@ -7320,7 +7326,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string_view name, int tag, Fon
 {
 SAL_WARN( "sw.ww8", "Error reading font file " << fontUrl );
 xOutStream->closeOutput();
-return;
+return false;
 }
 if( eof )
 break;
@@ -7328,7 +7334,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16string_view name, int tag, Fon
 {
 SAL_WARN( "sw.ww8", "Error reading font file " << fontUrl );
 xOutStream->closeOutput();
-return;
+return false;
 }
 if( readSize == 0 )
 break;
@@ -7348,6 +7354,7 @@ void DocxAttributeOutput::EmbedFontStyle( 
std::u16stri