[Libreoffice-commits] core.git: writerfilter/inc writerfilter/source

2023-02-13 Thread Miklos Vajna (via logerrit)
 writerfilter/inc/dmapper/GraphicZOrderHelper.hxx |2 
 writerfilter/source/dmapper/DomainMapper.cxx |6 +-
 writerfilter/source/dmapper/DomainMapper.hxx |2 
 writerfilter/source/dmapper/GraphicHelpers.cxx   |8 +-
 writerfilter/source/dmapper/TagLogger.cxx|   62 +++
 writerfilter/source/dmapper/TagLogger.hxx|4 -
 writerfilter/source/rtftok/rtfsprm.cxx   |8 +-
 7 files changed, 46 insertions(+), 46 deletions(-)

New commits:
commit 24f0e121b06252b323e237d9e7f47fcb28bff41e
Author: Miklos Vajna 
AuthorDate: Mon Feb 13 08:37:14 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 13 08:20:15 2023 +

writerfilter: prefix members of DomainMapper, GraphicZOrderHelper, ...

... RTFSprms_compare and TagLogger

See tdf#94879 for motivation.

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

diff --git a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx 
b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
index a6458333b560..c6a308ddf819 100644
--- a/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
+++ b/writerfilter/inc/dmapper/GraphicZOrderHelper.hxx
@@ -22,7 +22,7 @@ public:
 
 private:
 using Items = std::map>;
-Items items;
+Items m_items;
 };
 
 } // namespace writerfilter::dmapper
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index 61b4d6d114d4..c2e84cf1534a 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -4511,9 +4511,9 @@ SettingsTablePtr const & DomainMapper::GetSettingsTable()
 
 GraphicZOrderHelper* DomainMapper::graphicZOrderHelper()
 {
-if (zOrderHelper == nullptr)
-zOrderHelper.reset( new GraphicZOrderHelper );
-return zOrderHelper.get();
+if (m_zOrderHelper == nullptr)
+m_zOrderHelper.reset( new GraphicZOrderHelper );
+return m_zOrderHelper.get();
 }
 
 uno::Reference DomainMapper::PopPendingShape()
diff --git a/writerfilter/source/dmapper/DomainMapper.hxx 
b/writerfilter/source/dmapper/DomainMapper.hxx
index cb68954c7929..b9771b8ad749 100644
--- a/writerfilter/source/dmapper/DomainMapper.hxx
+++ b/writerfilter/source/dmapper/DomainMapper.hxx
@@ -183,7 +183,7 @@ private:
 bool mbIsSplitPara;
 bool mbHasControls;
 bool mbWasShapeInPara;
-std::unique_ptr< GraphicZOrderHelper > zOrderHelper;
+std::unique_ptr< GraphicZOrderHelper > m_zOrderHelper;
 OUString m_sGlossaryEntryName;
 };
 
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx 
b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 44949e28e754..67739d4986e5 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -272,7 +272,7 @@ text::WrapTextMode WrapHandler::getWrapMode( ) const
 
 void GraphicZOrderHelper::addItem(uno::Reference const& 
props, sal_Int32 const relativeHeight)
 {
-items[ relativeHeight ] = props;
+m_items[ relativeHeight ] = props;
 }
 
 // The relativeHeight value in .docx is an arbitrary number, where only the 
relative ordering matters.
@@ -281,7 +281,7 @@ void 
GraphicZOrderHelper::addItem(uno::Reference const& pro
 sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 relativeHeight, bool 
bOldStyle )
 {
 // std::map is iterated sorted by key
-auto it = std::find_if(items.cbegin(), items.cend(),
+auto it = std::find_if(m_items.cbegin(), m_items.cend(),
 [relativeHeight, bOldStyle](const Items::value_type& rItem) {
 // Old-style ordering differs in what should happen when there is 
already an item with the same z-order:
 // we belong under it in case of new-style, but we belong above it 
in case of old-style.
@@ -289,9 +289,9 @@ sal_Int32 GraphicZOrderHelper::findZOrder( sal_Int32 
relativeHeight, bool bOldSt
 }
 );
 sal_Int32 itemZOrderOffset(0); // before the item
-if( it == items.end()) // we're topmost
+if( it == m_items.end()) // we're topmost
 {
-if( items.empty())
+if( m_items.empty())
 return 0;
 --it;
 itemZOrderOffset = 1; // after the topmost
diff --git a/writerfilter/source/dmapper/TagLogger.cxx 
b/writerfilter/source/dmapper/TagLogger.cxx
index 69ffbbc09f39..7116ef2a5e58 100644
--- a/writerfilter/source/dmapper/TagLogger.cxx
+++ b/writerfilter/source/dmapper/TagLogger.cxx
@@ -28,20 +28,20 @@ using namespace css;
 namespace writerfilter
 {
 TagLogger::TagLogger()
-: pWriter( nullptr ), pName( "DOMAINMAPPER" )
+: m_pWriter( nullptr ), m_pName( "DOMAINMAPPER" )
 {
 }
 
 TagLogger::~TagLogger()
 {
-pWriter = nullptr;
-pName = nullptr;
+m_pWriter = nullptr;
+m_pName = nullptr;
 }
 
 #ifdef DBG_UTIL
 void TagLogger::setFileName( const st

[Libreoffice-commits] core.git: static/README.wasm.md

2023-02-13 Thread Tor Lillqvist (via logerrit)
 static/README.wasm.md |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4277e37e65a9a788cd787df54c4788c99225846c
Author: Tor Lillqvist 
AuthorDate: Mon Feb 13 10:56:36 2023 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Feb 13 08:59:40 2023 +

Don't overload the word 'module' unnecessarily

Change-Id: I10fb7d16192ddfb0802c976419c00302d4688c4e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146856
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/static/README.wasm.md b/static/README.wasm.md
index e5869240f39f..eeb1d90de41a 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -1,6 +1,6 @@
 # Support for Emscripten Cross Build
 
-This module provides support for building LibreOffice as WASM, with the 
Emscripten toolchain.
+This subdirecctory provides support for building LibreOffice as WASM, with the 
Emscripten toolchain.
 
 You can build LibreOffice for WASM for two separate purposes: 1)
 Either to produce a WASM binary of LibreOffice as such, using Qt5 for


[Libreoffice-commits] core.git: static/README.wasm.md

2023-02-13 Thread Tor Lillqvist (via logerrit)
 static/README.wasm.md |4 
 1 file changed, 4 insertions(+)

New commits:
commit 297c71c82bf6766c7fdeec0ab90e693c4fe39675
Author: Tor Lillqvist 
AuthorDate: Mon Feb 13 11:04:30 2023 +0200
Commit: Tor Lillqvist 
CommitDate: Mon Feb 13 09:05:21 2023 +

Mention that Emscripten 3.1.30 is known to work for COWASM

Change-Id: Id01004121a306dea953b908c32acc7f2c0e6841c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146857
Tested-by: Tor Lillqvist 
Reviewed-by: Tor Lillqvist 

diff --git a/static/README.wasm.md b/static/README.wasm.md
index eeb1d90de41a..2a8727a1a5aa 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -359,6 +359,10 @@ For instance, this autogen.input works for me:
 `--disable-gui`
 `--with-main-module=writer`
 
+For building LO core for use in COWASM, it is known to work to use
+Emscripten 3.1.30 (and not just 2.0.31 which is what the LO+Qt5 work
+has been using).
+
 ### That's all
 
 After all, in this case you are building LO core headless for it to be used by 
other software.


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - chart2/qa chart2/source sc/qa sw/qa

2023-02-13 Thread Gülşah Köse (via logerrit)
 chart2/qa/extras/chart2import.cxx   |  
 92 ++
 chart2/qa/extras/chart2import2.cxx  |  
 14 -
 chart2/qa/extras/charttest.hxx  |  
 38 
 chart2/qa/extras/data/pptx/PieChartWithAutomaticLayout_SizeAndPosition.pptx 
|binary
 chart2/source/view/main/ChartView.cxx   |  
 20 +-
 sc/qa/uitest/chart/chartDataLabels.py   |  
  8 
 sw/qa/extras/layout/layout2.cxx |  
  4 
 7 files changed, 159 insertions(+), 17 deletions(-)

New commits:
commit a6dbb1c765eb5f268badd8727beedfe27786bd08
Author: Gülşah Köse 
AuthorDate: Wed Nov 23 17:05:28 2022 +0300
Commit: Gülşah Köse 
CommitDate: Mon Feb 13 09:12:32 2023 +

tdf#91265 Use same plot area distance as used in MSO

Changes the postion calculation for pie charts, where the margin
min distance is now constant for pie charts, but unchanged for
other chart types.

This changes the positions of various pie charts used in tests,
which have been changed to the new value after the cases have been
checked.

Added a new test with all 3 use cases (chart area width equals
height, width is greater than height, width is less than height).

Change-Id: I51f98f336a7c64a3e6762144fc7dc8d9df80f696
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143179
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146603
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Pedro Silva 

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index 6710c86aba90..91abc305ebd2 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -138,6 +138,7 @@ public:
 void testFixedSizeBarChartVeryLongLabel();
 void testAutomaticSizeBarChartVeryLongLabel();
 void testTotalsRowIgnored();
+void testPieChartPlotAreaMarginWithAutomaticLayout();
 
 CPPUNIT_TEST_SUITE(Chart2ImportTest);
 CPPUNIT_TEST(Fdo60083);
@@ -224,6 +225,7 @@ public:
 CPPUNIT_TEST(testFixedSizeBarChartVeryLongLabel);
 CPPUNIT_TEST(testAutomaticSizeBarChartVeryLongLabel);
 CPPUNIT_TEST(testTotalsRowIgnored);
+CPPUNIT_TEST(testPieChartPlotAreaMarginWithAutomaticLayout);
 
 CPPUNIT_TEST_SUITE_END();
 };
@@ -2283,6 +2285,96 @@ void Chart2ImportTest::testTotalsRowIgnored()
 }
 }
 
+void Chart2ImportTest::testPieChartPlotAreaMarginWithAutomaticLayout()
+{
+// tdf#91265
+// Checks the margin and calculation of the plot area for the pie chart 
inside the chart area.
+
+load(u"/chart2/qa/extras/data/pptx/", 
"PieChartWithAutomaticLayout_SizeAndPosition.pptx");
+
+OUString aCheckShapeName = "CID/D=0:CS=0:CT=0:Series=0";
+// Chart Wuse case Width == Height
+{
+// Load chart Chart_2_2 - 2cm x 2cm -
+auto xDocument = getChartDocFromDrawImpressNamed(0, u"Chart_2_2");
+CPPUNIT_ASSERT(xDocument.is());
+
+uno::ReferencexChartDocument(xDocument, 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xChartDocument.is());
+
+// Get the shape of the diagram / chart
+uno::Reference 
xDrawPageSupplier(xChartDocument, uno::UNO_QUERY);
+CPPUNIT_ASSERT(xDrawPageSupplier.is());
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xShapes(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xShapes.is());
+
+uno::Reference xChartDiagramShape = 
getShapeByName(xShapes, aCheckShapeName);
+CPPUNIT_ASSERT(xChartDiagramShape.is());
+
+// Size
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1300, 
xChartDiagramShape->getSize().Width, 5);  // calculated chart area size - 2 * 
margin
+CPPUNIT_ASSERT_DOUBLES_EQUAL(1300, 
xChartDiagramShape->getSize().Height, 5); // calculated chart area size - 2 * 
margin
+// Position
+CPPUNIT_ASSERT_DOUBLES_EQUAL(350, xChartDiagramShape->getPosition().X, 
5); // margin
+CPPUNIT_ASSERT_DOUBLES_EQUAL(350, xChartDiagramShape->getPosition().Y, 
5); // margin
+}
+
+// Chart use case - Width < Height
+{
+// Load chart Chart_3_4 - 3cm x 4cm
+auto xDocument = getChartDocFromDrawImpressNamed(0, u"Chart_3_4");
+CPPUNIT_ASSERT(xDocument.is());
+
+uno::ReferencexChartDocument(xDocument, 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xChartDocument.is());
+
+// Get the shape of the diagram / chart
+uno::Reference 
xDrawPageSupplier(xChartDocument, uno::UNO_QUERY);
+CPPUNIT_ASSERT(xDrawPageSupplier.is());
+uno::Reference xDrawPage = 
xDrawPageSupplier->getDrawPage();
+uno::Reference xShapes(xDrawPage->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT(xShapes.is());
+
+uno::Reference xChartDiagramShape = 
getSh

[Libreoffice-commits] core.git: sc/qa

2023-02-13 Thread Laurent Balland (via logerrit)
 sc/qa/uitest/calc_tests4/tdf152722_AddDecimalPlacesToNatNum.py |   39 
++
 1 file changed, 39 insertions(+)

New commits:
commit 69b9f50ee8c76fa6193165369ab8235cd125247e
Author: Laurent Balland 
AuthorDate: Fri Feb 3 22:10:09 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 09:20:59 2023 +

tdf#152722 tdf#153023 Add UITest

Test increment decimal places and negative in red for NatNum12 number
format
Test disable thousand separator and enable leading zeroes

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

diff --git a/sc/qa/uitest/calc_tests4/tdf152722_AddDecimalPlacesToNatNum.py 
b/sc/qa/uitest/calc_tests4/tdf152722_AddDecimalPlacesToNatNum.py
new file mode 100644
index ..e7fec74647fa
--- /dev/null
+++ b/sc/qa/uitest/calc_tests4/tdf152722_AddDecimalPlacesToNatNum.py
@@ -0,0 +1,39 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from uitest.uihelper.common import select_pos
+from uitest.uihelper.calc import enter_text_to_cell
+from libreoffice.uno.propertyvalue import mkPropertyValues
+#Bug 152722 - NatNum12 number format (spell out): add/delete decimal places is 
loosing format
+
+class tdf152722(UITestCase):
+def test_tdf152722_NatNum_modifier_decimal_value(self):
+#numberingformatpage.ui
+with self.ui_test.create_doc_in_start_center("calc"):
+#format - cell
+with 
self.ui_test.execute_dialog_through_command(".uno:FormatCellDialog") as xDialog:
+xTabs = xDialog.getChild("tabcontrol")
+select_pos(xTabs, "0")  #tab Numbers
+xdecimalsed  = xDialog.getChild( "decimalsed" )
+xleadzerosed = xDialog.getChild( "leadzerosed" )
+xnegnumred   = xDialog.getChild( "negnumred" )
+xthousands   = xDialog.getChild( "thousands" )
+xformatted   = xDialog.getChild( "formatted" )
+
+xformatted.executeAction( "CLEAR", tuple() )  #clear textbox
+xformatted.executeAction( "TYPE", 
mkPropertyValues({"TEXT":"[NatNum12 cardinal]0"}) )
+xdecimalsed.executeAction( "UP", tuple() )
+self.assertEqual( get_state_as_dict(xformatted)["Text"], 
"[NatNum12 cardinal]0.0" )
+xnegnumred.executeAction( "CLICK", tuple() )
+self.assertEqual( get_state_as_dict(xformatted)["Text"], 
"[NatNum12 cardinal]0.0;[RED][NatNum12 cardinal]-0.0" )
+#Bug 153023: disable Thousand separator for NatNum12 modifier
+self.assertEqual(get_state_as_dict(xthousands)["Enabled"], 
"false")
+#Leading zeroes can be 0 or 1
+self.assertEqual(get_state_as_dict(xleadzerosed)["Enabled"], 
"true")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: sw/source

2023-02-13 Thread buldi (via logerrit)
 sw/source/core/access/accframe.hxx |5 +
 sw/source/core/access/acctextframe.hxx |5 +
 2 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 4f6d506e79884b5febb50e61f58bfdba4deef323
Author: buldi 
AuthorDate: Thu Feb 9 22:35:59 2023 +0100
Commit: Ilmari Lauhakangas 
CommitDate: Mon Feb 13 09:25:42 2023 +

tdf#143148 Use pragma once instead of include guard in sw

Change-Id: I9b4d2ccb608ceaafb3ee71a34831ce9cb69db6f7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146729
Reviewed-by: Julien Nabet 
Tested-by: Ilmari Lauhakangas 
Reviewed-by: Ilmari Lauhakangas 

diff --git a/sw/source/core/access/accframe.hxx 
b/sw/source/core/access/accframe.hxx
index 6f2dff0ae555..c069292e11f3 100644
--- a/sw/source/core/access/accframe.hxx
+++ b/sw/source/core/access/accframe.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRAME_HXX
-#define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCFRAME_HXX
+#pragma once
 
 #include 
 
@@ -158,6 +157,4 @@ inline const SwFrame *SwAccessibleFrame::GetParent() const
 return GetParent( aFrameOrObj, IsInPagePreview()  );
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/access/acctextframe.hxx 
b/sw/source/core/access/acctextframe.hxx
index 50a58729f8b0..036e1e85d326 100644
--- a/sw/source/core/access/acctextframe.hxx
+++ b/sw/source/core/access/acctextframe.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_SW_SOURCE_CORE_ACCESS_ACCTEXTFRAME_HXX
-#define INCLUDED_SW_SOURCE_CORE_ACCESS_ACCTEXTFRAME_HXX
+#pragma once
 
 #include "accframebase.hxx"
 
@@ -111,6 +110,4 @@ public:
 virtual css::uno::Reference< css::accessibility::XAccessibleRelationSet> 
SAL_CALL getAccessibleRelationSet() override;
 };
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] help.git: AllLangHelp_sbasic.mk source/auxiliary source/text

2023-02-13 Thread Alain Romedenne (via logerrit)
 AllLangHelp_sbasic.mk  |1 
 source/auxiliary/sbasic.tree   |1 
 source/text/sbasic/shared/03170010.xhp |   19 +---
 source/text/sbasic/shared/03170020.xhp |   58 +
 source/text/sbasic/shared/special_vba_func.xhp |1 
 5 files changed, 73 insertions(+), 7 deletions(-)

New commits:
commit 5b8658e58d02f8f3ec6a613f7c4edd32ca2e5d76
Author: Alain Romedenne 
AuthorDate: Fri Feb 3 13:05:07 2023 +
Commit: Olivier Hallot 
CommitDate: Mon Feb 13 09:57:05 2023 +

FormatPercent New Basic function / VBA

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

diff --git a/AllLangHelp_sbasic.mk b/AllLangHelp_sbasic.mk
index c864e3d0b9..a41510f962 100644
--- a/AllLangHelp_sbasic.mk
+++ b/AllLangHelp_sbasic.mk
@@ -394,6 +394,7 @@ $(eval $(call gb_AllLangHelp_add_helpfiles,sbasic,\
 helpcontent2/source/text/sbasic/shared/0316 \
 helpcontent2/source/text/sbasic/shared/0317 \
 helpcontent2/source/text/sbasic/shared/03170010 \
+helpcontent2/source/text/sbasic/shared/03170020 \
 helpcontent2/source/text/sbasic/shared/05060700 \
 helpcontent2/source/text/sbasic/shared/is_keyword \
 helpcontent2/source/text/sbasic/shared/new_keyword \
diff --git a/source/auxiliary/sbasic.tree b/source/auxiliary/sbasic.tree
index 6a97572f6a..e97c93b658 100644
--- a/source/auxiliary/sbasic.tree
+++ b/source/auxiliary/sbasic.tree
@@ -165,6 +165,7 @@
   Format 
Function
   FormatDateTime 
Function [VBA]
   FormatNumber 
Function [VBA]
+  FormatPercent 
Function [VBA]
   Frac 
Function
   FreeFile 
Function
   FreeLibrary 
Function
diff --git a/source/text/sbasic/shared/03170010.xhp 
b/source/text/sbasic/shared/03170010.xhp
index c2e1a573c6..1f8767b040 100644
--- a/source/text/sbasic/shared/03170010.xhp
+++ b/source/text/sbasic/shared/03170010.xhp
@@ -21,18 +21,22 @@
 
 FormatNumber function
 
-FormatNumber 
[VBA]
+FormatNumber [VBA]
 Returns a string with a number formatting applied to a numeric 
expression.
 
 
 
-FormatNumber( expression, numDigitsAfterDecimal as Integer, 
includeLeadingDigit as Integer,  useParensForNegativeNumbers as Integer, 
groupDigits as Integer )
+
+FormatNumber( expression As Variant, [numDigitsAfterDecimal As 
Integer], [includeLeadingDigit As Integer], _
+ 
   [useParensForNegativeNumbers As Integer], [groupDigits As Integer] ) As 
String
+
+
 
-String
+String
 
 
 
-expression: Required. The numeric expression to 
be formatted.
+expression: Required. A numeric expression to be 
formatted. If expression is a string, then the decimal and 
thousands separator need to be localized.
 
 numDigitsAfterDecimal: Optional. A numeric value 
specifying the number of digits that should be displayed after the decimal. If 
omitted, it defaults to the value -1, meaning that the default settings for 
user interface locale should be used.
 
@@ -46,7 +50,7 @@
 vbFalse or 0: Do not display leading 
zeros.
 
 
-vbUseDefaults or -2: Use the user interface 
locale settings. This is the default when omitted.
+vbUseDefault or -2: Use the user interface locale 
settings. This is the default when omitted.
 
 
 useParensForNegativeNumbers: Optional. A vbTriState 
enumeration value specifying whether negative numbers should be encased in 
parenthesis.
@@ -58,7 +62,7 @@
 vbFalse or 0: Do not display 
parenthesis.
 
 
-vbUseDefaults or -2: Same as vbFalse. This is the 
default when omitted.
+vbUseDefault or -2: Same as vbFalse. This is the 
default when omitted.
 
 
 
@@ -72,9 +76,10 @@
 vbFalse or 0: Do not group digits.
 
 
-vbUseDefaults or -2: Same as vbFalse. This is the 
default when omitted.
+vbUseDefault or -2: Same as vbFalse. This is the 
default when omitted.
 
 
+  
 
 
 
diff --git a/source/text/sbasic/shared/03170020.xhp 
b/source/text/sbasic/shared/03170020.xhp
new file mode 100644
index 00..ea5d3972e5
--- /dev/null
+++ b/source/text/sbasic/shared/03170020.xhp
@@ -0,0 +1,58 @@
+
+
+
+
+
+FormatPercent Function 
[VBA]
+/text/sbasic/shared/03170020.xhp
+
+
+
+
+
+
+FormatPercent function
+
+FormatPercent [VBA]
+Returns a string with a number formatting applied to a numeric 
expression. A percent sign is appended to the returned string.
+
+
+
+
+  FormatPercent( expression, [numDigitsAfterDecimal As Integer], 
[includ

[Libreoffice-commits] core.git: helpcontent2

2023-02-13 Thread Alain Romedenne (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit e411eeffad98f2344b9796aa80ba8d3f054a3d3a
Author: Alain Romedenne 
AuthorDate: Mon Feb 13 09:57:34 2023 +
Commit: Gerrit Code Review 
CommitDate: Mon Feb 13 09:57:34 2023 +

Update git submodules

* Update helpcontent2 from branch 'master'
  to 5b8658e58d02f8f3ec6a613f7c4edd32ca2e5d76
  - FormatPercent New Basic function / VBA

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

diff --git a/helpcontent2 b/helpcontent2
index 12f4174031af..5b8658e58d02 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 12f4174031afc80e9d6ac387336e0185646f6977
+Subproject commit 5b8658e58d02f8f3ec6a613f7c4edd32ca2e5d76


[Libreoffice-commits] help.git: source/text

2023-02-13 Thread Olivier Hallot (via logerrit)
 source/text/shared/optionen/01010401.xhp |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit a295ef1fa2462d9a828341e7b947eae05ba14154
Author: Olivier Hallot 
AuthorDate: Sat Feb 11 14:45:44 2023 -0300
Commit: Olivier Hallot 
CommitDate: Mon Feb 13 09:58:48 2023 +

tdf#153417 Edit module options  Help page

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

diff --git a/source/text/shared/optionen/01010401.xhp 
b/source/text/shared/optionen/01010401.xhp
index bb06ae491a..a17d68a99f 100644
--- a/source/text/shared/optionen/01010401.xhp
+++ b/source/text/shared/optionen/01010401.xhp
@@ -27,7 +27,9 @@
 
 
 
-spellcheck; activating for a 
language
+
+
+spellcheck; activating for a language
 spelling; activating for a language
 hyphenation; activating for a language
 thesaurus; activating for a language


[Libreoffice-commits] core.git: helpcontent2

2023-02-13 Thread Olivier Hallot (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit ac746702df3762d76e20042199f6531acf59123b
Author: Olivier Hallot 
AuthorDate: Mon Feb 13 06:58:56 2023 -0300
Commit: Gerrit Code Review 
CommitDate: Mon Feb 13 09:58:56 2023 +

Update git submodules

* Update helpcontent2 from branch 'master'
  to a295ef1fa2462d9a828341e7b947eae05ba14154
  - tdf#153417 Edit module options  Help page

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

diff --git a/helpcontent2 b/helpcontent2
index 5b8658e58d02..a295ef1fa246 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit 5b8658e58d02f8f3ec6a613f7c4edd32ca2e5d76
+Subproject commit a295ef1fa2462d9a828341e7b947eae05ba14154


Re: Extended ODF schema

2023-02-13 Thread Michael Stahl

On 10.02.23 19:23, Laurent Balland wrote:


Then I get the following errors:

- /tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,9446]: Error: 
tag name "number:text" is not allowed. Possible tag names are: 
,,,
number:text loext:blank-width-char=")"> 

  ^
/tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,10964]: Error: 
tag name "number:text" is not allowed. Possible tag names are: 
,
number:text loext:blank-width-char=")"> 
<


i think the error is that there are 2 consecutive  elements 
in , which is not allowed by the schema.




[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - emfio/qa emfio/source

2023-02-13 Thread Bartosz Kosiorek (via logerrit)
 emfio/qa/cppunit/emf/EmfImportTest.cxx |   45 ++---
 emfio/source/reader/emfreader.cxx  |   25 +++---
 emfio/source/reader/mtftools.cxx   |4 +-
 3 files changed, 43 insertions(+), 31 deletions(-)

New commits:
commit 78ca5b0421562a6204a561d390ac8a8692411421
Author: Bartosz Kosiorek 
AuthorDate: Fri Feb 3 22:55:54 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 10:43:47 2023 +

tdf#142018 Properly create Pen width if style is COSMETIC

Change-Id: I6453058c4af352a3b0e14cbccbc1a67c73cd1426
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146551
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek 
(cherry picked from commit bbdbe8ea2ef176ef6f08b30b3c18876c2c4f0c22)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146808
Reviewed-by: Xisco Fauli 

diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx 
b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 75f2b9001a08..e858fd7afc4d 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -180,14 +180,19 @@ void Test::testPolyPolygon()
 assertXPath(pDocument, aXPathPrefix + 
"mask/polypolygoncolor[2]/polypolygon", "path",
 "m2574 13194v-12065h15303v12065z");
 
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke", 116);
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke", 44);
 assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstroke[1]/polygon",
-   "2574,13194 2574,1129 17877,1129 17877,13194");
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"color", "#ff");
-
+   "2574,13194 2574,1129");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"color", "#00");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"width", "0");
+assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstroke[2]/polygon",
+   "2574,1129 2574,1129");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[2]/line", 
"color", "#00");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[2]/line", 
"width", "0");
 assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstroke[10]/polygon",
-   "8674,13194 8674,1129");
+   "8674,1129 8674,1129");
 assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[10]/line", 
"color", "#00");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[10]/line", 
"width", "0");
 
 assertXPath(pDocument, aXPathPrefix + "mask/textsimpleportion", 28);
 assertXPath(pDocument, aXPathPrefix + "mask/textsimpleportion[6]", 
"width", "459");
@@ -1547,7 +1552,7 @@ void Test::TestRoundRect()
 void Test::TestCreatePen()
 {
 // Check import of EMF image with records: RESTOREDC, SAVEDC, MOVETOEX, 
LINETO, POLYLINE16, EXTTEXTOUTW with DxBuffer
-// The CREATEPEN record is used with PS_COSMETIC line style, which 
sometimes will be displayed as solid hairline
+// The CREATEPEN record is used with PS_COSMETIC line style, and in this 
case width must be set to 0
 Primitive2DSequence aSequence = 
parseEmf(u"/emfio/qa/cppunit/emf/data/TestCreatePen.emf");
 CPPUNIT_ASSERT_EQUAL(1, static_cast(aSequence.getLength()));
 drawinglayer::Primitive2dXmlDump dumper;
@@ -1556,29 +1561,29 @@ void Test::TestCreatePen()
 
 assertXPath(pDocument, aXPathPrefix + "mask/polypolygon", "path", "m0 
0h31250v18192h-31250z");
 
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke", 748);
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke", 3);
 assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstroke[1]/polygon",
-   "27875,16523 27875,1453");
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"color", "#ff");
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"width", "6");
+   "17898,5693 20172,5693");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"color", "#008000");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[1]/line", 
"width", "0");
 
 assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstroke[2]/polygon",
-   "27975,16453 27875,16453");
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[2]/line", 
"color", "#ff");
-assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[2]/line", 
"width", "6");
+   "17898,6959 20172,6959");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[2]/line", 
"color", "#80");
+assertXPath(pDocument, aXPathPrefix + "mask/polygonstroke[2]/line", 
"width", "0");
 
 assertXPathContent(pDocument, aXPathPrefix + 
"mask/polygonstroke[3]/polygon",
-   "27925,16078 27875,16078");
+   "17898,7381 20172,7381");
  

[Libreoffice-commits] core.git: external/openssl

2023-02-13 Thread Christian Lohmaier (via logerrit)
 external/openssl/UnpackedTarball_openssl.mk |1 
 external/openssl/openssl-no-_umul128-on-aarch64.patch.1 |   58 
 2 files changed, 59 insertions(+)

New commits:
commit 821f4d6f0987450233e4f63e01f89484ec737258
Author: Christian Lohmaier 
AuthorDate: Sun Feb 12 19:36:25 2023 +0100
Commit: Christian Lohmaier 
CommitDate: Mon Feb 13 11:05:18 2023 +

fix openssl build on aarch64  - _umul128 is not available on non x64

adding upstream patch that uses __umulh as a fallback

Change-Id: Ib95de30d3f7208c38421df0c63eb1ceafccd9354
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146839
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier 

diff --git a/external/openssl/UnpackedTarball_openssl.mk 
b/external/openssl/UnpackedTarball_openssl.mk
index 2a8f3bb3f905..58e3a93352e1 100644
--- a/external/openssl/UnpackedTarball_openssl.mk
+++ b/external/openssl/UnpackedTarball_openssl.mk
@@ -16,6 +16,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,openssl,\
external/openssl/configurable-z-option.patch.0 \
external/openssl/openssl-no-ipc-cmd.patch.0 \
external/openssl/system-cannot-find-path-for-move.patch.0 \
+   external/openssl/openssl-no-_umul128-on-aarch64.patch.1 \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/openssl/openssl-no-_umul128-on-aarch64.patch.1 
b/external/openssl/openssl-no-_umul128-on-aarch64.patch.1
new file mode 100644
index ..c7ca53bc574c
--- /dev/null
+++ b/external/openssl/openssl-no-_umul128-on-aarch64.patch.1
@@ -0,0 +1,58 @@
+From 98f9a401c3964c7ff0e6ca048685e28a2a6401d4 Mon Sep 17 00:00:00 2001
+From: Hubert Kario 
+Date: Wed, 8 Feb 2023 14:13:24 +0100
+Subject: [PATCH] rsa: add msvc intrinsic for non x64 platforms
+
+_umul128() is x86_64 (x64) only, while __umulh() works everywhere, but
+doesn't generate optimal code on x64
+
+Reviewed-by: Dmitry Belyavskiy 
+Reviewed-by: Paul Dale 
+Reviewed-by: Tomas Mraz 
+(Merged from https://github.com/openssl/openssl/pull/20244)
+
+(cherry picked from commit 075652f224479dad2e64b92e791b296177af8705)
+---
+ crypto/bn/rsa_sup_mul.c | 24 +++-
+ 1 file changed, 23 insertions(+), 1 deletion(-)
+
+diff --git a/crypto/bn/rsa_sup_mul.c b/crypto/bn/rsa_sup_mul.c
+index 0e0d02e1946e..3b57161b4589 100644
+--- a/crypto/bn/rsa_sup_mul.c
 b/crypto/bn/rsa_sup_mul.c
+@@ -110,12 +110,34 @@ static ossl_inline void _mul_limb(limb_t *hi, limb_t 
*lo, limb_t a, limb_t b)
+ *lo = (limb_t)t;
+ }
+ #elif (BN_BYTES == 8) && (defined _MSC_VER)
+-/* https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-170 */
++# if defined(_M_X64)
++/*
++ * on x86_64 (x64) we can use the _umul128 intrinsic to get one `mul`
++ * instruction to get both high and low 64 bits of the multiplication.
++ * https://learn.microsoft.com/en-us/cpp/intrinsics/umul128?view=msvc-140
++ */
++#include 
+ #pragma intrinsic(_umul128)
+ static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b)
+ {
+ *lo = _umul128(a, b, hi);
+ }
++# elif defined(_M_ARM64) || defined (_M_IA64)
++/*
++ * We can't use the __umulh() on x86_64 as then msvc generates two `mul`
++ * instructions; so use this more portable intrinsic on platforms that
++ * don't support _umul128 (like aarch64 (ARM64) or ia64)
++ * https://learn.microsoft.com/en-us/cpp/intrinsics/umulh?view=msvc-140
++ */
++#include 
++static ossl_inline void _mul_limb(limb_t *hi, limb_t *lo, limb_t a, limb_t b)
++{
++*lo = a * b;
++*hi = __umulh(a, b);
++}
++# else
++# error Only x64, ARM64 and IA64 supported.
++# endif /* defined(_M_X64) */
+ #else
+ /*
+  * if the compiler doesn't have either a 128bit data type nor a "return


[Libreoffice-commits] core.git: sc/source

2023-02-13 Thread Xisco Fauli (via logerrit)
 sc/source/filter/rtf/eeimpars.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit a047583f76cd5e9d6ba73ec1ed0ede6cfc3dd541
Author: Xisco Fauli 
AuthorDate: Fri Feb 10 10:50:24 2023 +0100
Commit: Caolán McNamara 
CommitDate: Mon Feb 13 11:05:43 2023 +

sc: avoid divide by zero in ScEEImport::GraphicSize

See 
https://crashreport.libreoffice.org/stats/signature/ScEEImport::GraphicSize(short,long,ScEEParseEntry%20*)

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

diff --git a/sc/source/filter/rtf/eeimpars.cxx 
b/sc/source/filter/rtf/eeimpars.cxx
index b9678e2fdd5f..e9ab9175ab8f 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -528,7 +528,13 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, 
ScEEParseEntry* pE )
 }
 // Distribute line height difference between all affected lines
 SCROW nRowSpan = pE->nRowOverlap;
+
+assert(nRowSpan != 0);
+if ( nRowSpan == 0 )
+return bHasGraphics;
+
 nHeight /= nRowSpan;
+
 if ( nHeight == 0 )
 nHeight = 1; // For definite comparison
 for ( SCROW nR = nRow; nR < nRow + nRowSpan; nR++ )


[Libreoffice-commits] core.git: pyuno/source registry/inc

2023-02-13 Thread buldi (via logerrit)
 pyuno/source/module/pyuno_impl.hxx |5 +
 registry/inc/regapi.hxx|5 +
 2 files changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 8ca611b2125a74cfdb273cfedfa3b94de14f628b
Author: buldi 
AuthorDate: Thu Feb 9 22:53:12 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Feb 13 11:26:27 2023 +

tdf#143148 Use pragma once instead of include guards

Change-Id: I5a88b699425a37b914a71400e918965a9f6116eb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146730
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/pyuno/source/module/pyuno_impl.hxx 
b/pyuno/source/module/pyuno_impl.hxx
index 90e94af07401..946991c3864b 100644
--- a/pyuno/source/module/pyuno_impl.hxx
+++ b/pyuno/source/module/pyuno_impl.hxx
@@ -16,8 +16,7 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef INCLUDED_PYUNO_SOURCE_MODULE_PYUNO_IMPL_HXX
-#define INCLUDED_PYUNO_SOURCE_MODULE_PYUNO_IMPL_HXX
+#pragma once
 
 #if defined(_MSC_VER)
 // Workaround for some horrible hypot() mess
@@ -300,6 +299,4 @@ void decreaseRefCount( PyInterpreterState *interpreter, 
PyObject *object );
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/registry/inc/regapi.hxx b/registry/inc/regapi.hxx
index ae5b7e119e48..6d1ed00f532a 100644
--- a/registry/inc/regapi.hxx
+++ b/registry/inc/regapi.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_REGISTRY_INC_REGAPI_HXX
-#define INCLUDED_REGISTRY_INC_REGAPI_HXX
+#pragma once
 
 #include 
 #include 
@@ -85,6 +84,4 @@ REG_DLLPUBLIC RegError REGISTRY_CALLTYPE 
reg_closeRegistry(RegHandle hRegistry);
 */
 REG_DLLPUBLIC RegError REGISTRY_CALLTYPE reg_dumpRegistry(RegKeyHandle hKey);
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: static/README.wasm.md

2023-02-13 Thread Andrea Gelmini (via logerrit)
 static/README.wasm.md |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit b926ba60d11cb78b4e042e2abb2d00dde128a1f8
Author: Andrea Gelmini 
AuthorDate: Mon Feb 13 12:23:32 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Feb 13 11:27:46 2023 +

Fix typo

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

diff --git a/static/README.wasm.md b/static/README.wasm.md
index 2a8727a1a5aa..6e74599eb3ae 100644
--- a/static/README.wasm.md
+++ b/static/README.wasm.md
@@ -1,6 +1,6 @@
 # Support for Emscripten Cross Build
 
-This subdirecctory provides support for building LibreOffice as WASM, with the 
Emscripten toolchain.
+This subdirectory provides support for building LibreOffice as WASM, with the 
Emscripten toolchain.
 
 You can build LibreOffice for WASM for two separate purposes: 1)
 Either to produce a WASM binary of LibreOffice as such, using Qt5 for


[Libreoffice-commits] core.git: desktop/source filter/source scripting/source sfx2/source ucb/source wizards/com

2023-02-13 Thread Mike Kaganski (via logerrit)
 desktop/source/deployment/misc/dp_misc.cxx  |8 ++--
 filter/source/xsltfilter/XSLTFilter.cxx |   13 +++--
 scripting/source/basprov/basprov.cxx|5 ++---
 sfx2/source/doc/DocumentMetadataAccess.cxx  |3 +--
 sfx2/source/doc/doctemplates.cxx|   12 
 ucb/source/ucp/expand/ucpexpand.cxx |   11 +++
 wizards/com/sun/star/wizards/common/FileAccess.java |   10 +++---
 7 files changed, 26 insertions(+), 36 deletions(-)

New commits:
commit 00f6c36b603416b73e1327ac4c862b1eaca2d277
Author: Mike Kaganski 
AuthorDate: Mon Feb 13 11:22:03 2023 +0300
Commit: Mike Kaganski 
CommitDate: Mon Feb 13 11:29:34 2023 +

Fix/simplify some vnd.sun.star.expand: handling

The vnd.sun.star.expand: payload must be URL-decoded prior to passing
it to expandMacros; the protocol must be checked case-insensitively.
Use startsWithIgnoreAsciiCase for that.

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

diff --git a/desktop/source/deployment/misc/dp_misc.cxx 
b/desktop/source/deployment/misc/dp_misc.cxx
index ea5c737c2d7b..ed394382bb5c 100644
--- a/desktop/source/deployment/misc/dp_misc.cxx
+++ b/desktop/source/deployment/misc/dp_misc.cxx
@@ -300,9 +300,7 @@ OUString expandUnoRcTerm( OUString const & term_ )
 OUString makeRcTerm( OUString const & url )
 {
 OSL_ASSERT( url.match( "vnd.sun.star.expand:" ));
-if (url.match( "vnd.sun.star.expand:" )) {
-// cut protocol:
-OUString rcterm( url.copy( sizeof ("vnd.sun.star.expand:") - 1 ) );
+if (OUString rcterm; url.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", 
&rcterm)) {
 // decode uric class chars:
 rcterm = ::rtl::Uri::decode(
 rcterm, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
@@ -315,9 +313,7 @@ OUString makeRcTerm( OUString const & url )
 
 OUString expandUnoRcUrl( OUString const & url )
 {
-if (url.match( "vnd.sun.star.expand:" )) {
-// cut protocol:
-OUString rcurl( url.copy( sizeof ("vnd.sun.star.expand:") - 1 ) );
+if (OUString rcurl; url.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", 
&rcurl)) {
 // decode uric class chars:
 rcurl = ::rtl::Uri::decode(
 rcurl, rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index 8ebbd874ed1e..f08933276055 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -31,6 +31,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -207,20 +208,20 @@ namespace XSLT
 OUString
 XSLTFilter::expandUrl(const OUString& sUrl)
 {
-OUString sExpandedUrl;
 try
 {
+OUString sPreparedURL(sUrl);
+if 
(sPreparedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", &sPreparedURL))
+sPreparedURL = rtl::Uri::decode(sPreparedURL, 
rtl_UriDecodeWithCharset,
+RTL_TEXTENCODING_UTF8);
 css::uno::Reference
 xMacroExpander = theMacroExpander::get(m_xContext);
-sExpandedUrl = xMacroExpander->expandMacros(sUrl);
-sal_Int32 nPos = sExpandedUrl.indexOf( "vnd.sun.star.expand:" 
);
-if (nPos != -1)
-sExpandedUrl = sExpandedUrl.copy(nPos + 20);
+return xMacroExpander->expandMacros(sPreparedURL);
 }
 catch (const Exception&)
 {
 }
-return sExpandedUrl;
+return {};
 }
 
 css::uno::Reference
diff --git a/scripting/source/basprov/basprov.cxx 
b/scripting/source/basprov/basprov.cxx
index d4afb41eaea3..cafd4daa76d0 100644
--- a/scripting/source/basprov/basprov.cxx
+++ b/scripting/source/basprov/basprov.cxx
@@ -103,10 +103,9 @@ namespace basprov
 }
 else if ( 
aScheme.equalsIgnoreAsciiCase("vnd.sun.star.pkg") )
 {
-OUString aAuthority = xUriRef->getAuthority();
-if ( aAuthority.matchIgnoreAsciiCase( 
"vnd.sun.star.expand:" ) )
+OUString aDecodedURL = xUriRef->getAuthority();
+if ( aDecodedURL.startsWithIgnoreAsciiCase( 
"vnd.sun.star.expand:", &aDecodedURL ) )
 {
-OUString aDecodedURL( aAuthority.copy( sizeof ( 
"vnd.sun.star.expand:" ) - 1 ) );
 aDecodedURL = ::rtl::Uri::decode( aDecodedURL, 
rtl_UriDecodeWithCharset, RTL_TEXTENCODING_UTF8 );
 Reference xMacroExpander =
 util::theMacroExpander::get(m_xContext);
di

[Libreoffice-commits] core.git: sc/qa

2023-02-13 Thread Xisco Fauli (via logerrit)
 sc/qa/uitest/calc_tests7/tdf150288.py |   51 ++
 1 file changed, 28 insertions(+), 23 deletions(-)

New commits:
commit 835f87280ab228f59801c28c288472f2941ea222
Author: Xisco Fauli 
AuthorDate: Mon Feb 13 11:42:56 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:39:50 2023 +

sc: use try/finally to reset the changes in OptionsTreeDialog

Otherwise it might affect other tests if it hits an assert

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

diff --git a/sc/qa/uitest/calc_tests7/tdf150288.py 
b/sc/qa/uitest/calc_tests7/tdf150288.py
index e6ec3ed69329..951cb7349a6e 100644
--- a/sc/qa/uitest/calc_tests7/tdf150288.py
+++ b/sc/qa/uitest/calc_tests7/tdf150288.py
@@ -16,38 +16,43 @@ from uitest.uihelper.common import select_by_text
 
 class tdf150288(UITestCase):
 
-def test_tdf150288(self):
+def change_date_pattern(self, pattern):
+with 
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as 
xDialog:
+xPages = xDialog.getChild("pages")
+xLanguageEntry = xPages.getChild('2')
+xLanguageEntry.executeAction("EXPAND", tuple())
+xxLanguageEntryGeneralEntry = xLanguageEntry.getChild('0')
+xxLanguageEntryGeneralEntry.executeAction("SELECT", tuple())
 
-with self.ui_test.create_doc_in_start_center("calc") as document:
+xDatePatterns = xDialog.getChild("datepatterns")
+xLocaleSetting = xDialog.getChild("localesetting")
 
-with 
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as 
xDialog:
-xPages = xDialog.getChild("pages")
-xLanguageEntry = xPages.getChild('2')
-xLanguageEntry.executeAction("EXPAND", tuple())
-xxLanguageEntryGeneralEntry = xLanguageEntry.getChild('0')
-xxLanguageEntryGeneralEntry.executeAction("SELECT", tuple())
+select_by_text(xLocaleSetting, "English (USA)")
 
-xDatePatterns = xDialog.getChild("datepatterns")
-xLocaleSetting = xDialog.getChild("localesetting")
+xDatePatterns.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
+xDatePatterns.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
+xDatePatterns.executeAction("TYPE", mkPropertyValues({"TEXT": 
pattern}))
 
-select_by_text(xLocaleSetting, "English (USA)")
+def test_tdf150288(self):
+with self.ui_test.create_doc_in_start_center("calc") as document:
 
-self.assertEqual("M/D/Y;M/D", 
get_state_as_dict(xDatePatterns)['Text'])
+try:
+self.change_date_pattern("D/M/Y;D/M")
 
-xDatePatterns.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"CTRL+A"}))
-xDatePatterns.executeAction("TYPE", 
mkPropertyValues({"KEYCODE":"BACKSPACE"}))
-xDatePatterns.executeAction("TYPE", 
mkPropertyValues({"TEXT":"D/M/Y;D/M"}))
+xCalcDoc = self.xUITest.getTopFocusWindow()
+xGridWin = xCalcDoc.getChild("grid_window")
 
-xCalcDoc = self.xUITest.getTopFocusWindow()
-xGridWin = xCalcDoc.getChild("grid_window")
+enter_text_to_cell(xGridWin, "A1", "31/8/22")
+enter_text_to_cell(xGridWin, "A2", "1/8/22")
 
-enter_text_to_cell(xGridWin, "A1", "31/8/22")
-enter_text_to_cell(xGridWin, "A2", "1/8/22")
+self.assertEqual("08/31/22", get_cell_by_position(document, 0, 
0, 0).getString())
 
-self.assertEqual("08/31/22", get_cell_by_position(document, 0, 0, 
0).getString())
+# Without the fix in place, this test would have failed with
+# AssertionError: '08/01/22' != '01/08/22'
+self.assertEqual("08/01/22", get_cell_by_position(document, 0, 
0, 1).getString())
 
-# Without the fix in place, this test would have failed with
-# AssertionError: '08/01/22' != '01/08/22'
-self.assertEqual("08/01/22", get_cell_by_position(document, 0, 0, 
1).getString())
+finally:
+# reset date pattern to default
+self.change_date_pattern("M/D/Y;M/D")
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/source

2023-02-13 Thread Mike Kaganski (via logerrit)
 sc/source/ui/docshell/autostyl.cxx |5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

New commits:
commit f6aa9d4f9f5e7b46a89bf409a40b552570cf4d5f
Author: Mike Kaganski 
AuthorDate: Thu Feb 9 16:06:04 2023 +0300
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:52:10 2023 +

Related: tdf#153510 Avoid modification of iterated container

A crash is seen when resizing a document locally; the problem is
range-based for loop, which indirectly modifies its range:

  sclo.dll!ScAutoStyleList::AddInitial(const ScRange & rRange, const 
rtl::OUString & rStyle1, unsigned __int64 nTimeout, const rtl::OUString & 
rStyle2) Line 81 C++
  sclo.dll!ScDocShell::Notify(SfxBroadcaster & __formal, const SfxHint & 
rHint) Line 685C++
  svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41C++
  sclo.dll!ScInterpreter::ScStyle() Line 2628   C++
  sclo.dll!ScInterpreter::Interpret() Line 4441 C++
  sclo.dll!ScFormulaCell::InterpretTail(ScInterpreterContext & rContext, 
ScFormulaCell::ScInterpretTailParameter eTailParam) Line 1947  C++
  sclo.dll!ScFormulaCell::Interpret(long nStartOffset, long nEndOffset) 
Line 1619   C++
  sclo.dll!ScFormulaCell::MaybeInterpret() Line 470 C++
  sclo.dll!ScFormulaCell::IsValue() Line 2763   C++
  sclo.dll!ScConditionEntry::Interpret(const ScAddress & rPos) Line 670 C++
  sclo.dll!ScConditionEntry::IsCellValid(ScRefCellValue & rCell, const 
ScAddress & rPos) Line 1238  C++
  sclo.dll!ScConditionalFormat::GetData(ScRefCellValue & rCell, const 
ScAddress & rPos) Line 1836   C++
  sclo.dll!`anonymous 
namespace'::handleConditionalFormat(ScConditionalFormatList & rCondFormList, 
const o3tl::sorted_vector,o3tl::find_unique,1> & rCondFormats, ScCellInfo * pInfo, ScTableInfo * 
pTableInfo, ScStyleSheetPool * pStlPool, const ScAddress & rAddr, bool & 
bHidden, bool & bHideFormula, bool bTabProtect) Line 297C++
  sclo.dll!ScDocument::FillInfo(ScTableInfo & rTabInfo, short nCol1, long 
nRow1, short nCol2, long nRow2, short nTab, double fColScale, double fRowScale, 
bool bPageMode, bool bFormulaMode, const ScMarkData * pMarkData) Line 569 
C++
  sclo.dll!ScGridWindow::Draw(short nX1, long nY1, short nX2, long nY2, 
ScUpdateMode eMode) Line 556C++
  sclo.dll!ScGridWindow::Paint(OutputDevice & __formal, const 
tools::Rectangle & rRect) Line 458C++
  vcllo.dll!PaintHelper::DoPaint(const vcl::Region * pRegion) Line 313  C++
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
ImplPaintFlags nPaintFlags) Line 617C++
  vcllo.dll!PaintHelper::~PaintHelper() Line 553C++
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
ImplPaintFlags nPaintFlags) Line 623C++
  vcllo.dll!PaintHelper::~PaintHelper() Line 553C++
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
ImplPaintFlags nPaintFlags) Line 623C++
  vcllo.dll!PaintHelper::~PaintHelper() Line 553C++
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
ImplPaintFlags nPaintFlags) Line 623C++
  vcllo.dll!PaintHelper::~PaintHelper() Line 553C++
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
ImplPaintFlags nPaintFlags) Line 623C++
  vcllo.dll!PaintHelper::~PaintHelper() Line 553C++
  vcllo.dll!vcl::Window::ImplCallPaint(const vcl::Region * pRegion, 
ImplPaintFlags nPaintFlags) Line 623C++
  vcllo.dll!vcl::Window::ImplCallOverlapPaint() Line 646C++
  vcllo.dll!vcl::Window::ImplHandlePaintHdl(Timer * __formal) Line 668  C++
  vcllo.dll!vcl::Window::LinkStubImplHandlePaintHdl(void * instance, Timer 
* data) Line 648 C++
  vcllo.dll!Link::Call(Timer * data) Line 111 C++
  vcllo.dll!Timer::Invoke(Timer * arg) Line 81  C++
  vcllo.dll!vcl::Window::ImplHandleResizeTimerHdl(Timer * __formal) Line 
684C++
  vcllo.dll!vcl::Window::LinkStubImplHandleResizeTimerHdl(void * instance, 
Timer * data) Line 674   C++
  vcllo.dll!Link::Call(Timer * data) Line 111 C++
  vcllo.dll!Timer::Invoke(Timer * arg) Line 81  C++
  vcllo.dll!vcl::Window::GetSizePixel() Line 2420   C++
  sclo.dll!ScTabView::GetGridWidth(ScHSplitPos eWhich) Line 3032C++
  sclo.dll!ScViewData::CellsAtX(short nPosX, short nDir, ScHSplitPos 
eWhichX, unsigned short nScrSizeX) Line 2634   C++
  sclo.dll!ScViewData::VisibleCellsX(ScHSplitPos eWhichX) Line 2710 C++
  sclo.dll!ScTabView::PaintArea(short nStartCol, long nStartRow, short 
nEndCol, long nEndRow, ScUpdateMode eMode) Line 2386 C++
  sclo.dll!ScTabViewShell::Notify(SfxBroadcaster & rBC, const SfxHint & 
rHint) Line 63  C++
  svllo.dll!SfxBroadcaster::Broadcast(const SfxHint & rHint) Line 41C++
  sclo.dll!ScDocShell::PostPaint(const ScRangeList & rRanges, 
Pa

[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/source

2023-02-13 Thread Eike Rathke (via logerrit)
 sc/source/filter/oox/stylesbuffer.cxx |   46 ++
 1 file changed, 36 insertions(+), 10 deletions(-)

New commits:
commit e53c02eac4b3d231fef7a6156321edfdea1fbb27
Author: Eike Rathke 
AuthorDate: Mon Feb 6 22:59:44 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:52:31 2023 +

Resolves: tdf#139934 always apply cellXfs xf explicits (tdf#123139 related)

Change-Id: Id1e12ee8677a25a645bfd53b4968a17c9a1eabe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146599
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 909a25d30b09ebd3a023105a9c3cc4d20add094a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146614
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index 2e594a39efd9..fd4401446685 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1971,38 +1971,64 @@ void Xf::importXf( const AttributeList& rAttribs, bool 
bCellXf )
 // as xfId attribute is always created during export to .xlsx
 // Not setting "0" value is causing wrong .xlsx import by LibreOffice,
 // for spreadsheets created by external applications (ex. SAP BI).
+bool bApplyDefault;
 if ( maModel.mbCellXf )
 {
-maModel.mnStyleXfId = rAttribs.getInteger( XML_xfId, 0 );
+const sal_Int32 xfId = rAttribs.getInteger( XML_xfId, -1 );
+// No xfId => no cellStyleXfs that could overwrite this on change, thus
+// has to be applied.
+bApplyDefault = (xfId < 0);
+maModel.mnStyleXfId = std::max(0, xfId);
 }
 else
 {
 maModel.mnStyleXfId = rAttribs.getInteger( XML_xfId, -1 );
+bApplyDefault = true;
 }
 maModel.mnFontId = rAttribs.getInteger( XML_fontId, -1 );
 maModel.mnNumFmtId = rAttribs.getInteger( XML_numFmtId, -1 );
 maModel.mnBorderId = rAttribs.getInteger( XML_borderId, -1 );
 maModel.mnFillId = rAttribs.getInteger( XML_fillId, -1 );
 
-
-maModel.mbAlignUsed = maModel.mbCellXf || 
rAttribs.getBool(XML_applyAlignment, true);
-maModel.mbProtUsed = maModel.mbCellXf || 
rAttribs.getBool(XML_applyProtection, true);
-/*  Default value of the apply*** attributes is dependent on context:
-true in cellStyleXfs element, false in cellXfs element... */
-maModel.mbFontUsed   = rAttribs.getBool( XML_applyFont, 
!maModel.mbCellXf );
-maModel.mbNumFmtUsed = rAttribs.getBool( XML_applyNumberFormat, 
!maModel.mbCellXf );
-maModel.mbBorderUsed = rAttribs.getBool( XML_applyBorder,   
!maModel.mbCellXf );
-maModel.mbAreaUsed   = rAttribs.getBool( XML_applyFill, 
!maModel.mbCellXf );
+// Default value of the apply*** attributes is dependent on context:
+// true in cellStyleXfs element, false in cellXfs element...
+// But it's not as easy as it sounds, for docs see
+// 
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/59922f8b-0edc-4e93-a822-9f22254aec46
+// and apparently in reality cellStyleXfs xf and cellXfs xf are not merged
+// at all, see
+// 
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/bcf98682-e8d3-44b8-b8f8-0bf696878ba1
+// "b. The standard states that both the cell style xf records and cell xf
+// records must be read to understand the full set of formatting applied to
+// a cell."
+// "In Office, only the cell xf record defines the formatting applied to a 
cell."
+
+// So for reading documents this is all crap and effectively xf records
+// apply their explicit properties by default unless denied.
+// bApplyDefault==false only for cellXf xf with xfId.
+
+// For cellXf xf, mbAlignUsed and mbProtUsed will be set when actually
+// importing the element.
+maModel.mbAlignUsed  = rAttribs.getBool( XML_applyAlignment,
bApplyDefault);
+maModel.mbProtUsed   = rAttribs.getBool( XML_applyProtection,   
bApplyDefault);
+
+maModel.mbFontUsed   = rAttribs.getBool( XML_applyFont, 
bApplyDefault || maModel.mnFontId > 0);
+maModel.mbNumFmtUsed = rAttribs.getBool( XML_applyNumberFormat, 
bApplyDefault || maModel.mnNumFmtId > 0);
+maModel.mbBorderUsed = rAttribs.getBool( XML_applyBorder,   
bApplyDefault || maModel.mnBorderId > 0);
+maModel.mbAreaUsed   = rAttribs.getBool( XML_applyFill, 
bApplyDefault || maModel.mnFillId > 0);
 }
 
 void Xf::importAlignment( const AttributeList& rAttribs )
 {
 maAlignment.importAlignment( rAttribs );
+if (maModel.mbCellXf)
+maModel.mbAlignUsed = true;
 }
 
 void Xf::importProtection( const AttributeList& rAttribs )
 {
 maProtection.importProtection( rAttribs );
+if (maModel.mbCellXf)
+maModel.mbProtUsed = true;
 }
 
 void Xf::importXf( SequenceInputStream& rStrm, bool bCellXf )


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sc/source

2023-02-13 Thread Eike Rathke (via logerrit)
 sc/source/filter/oox/stylesbuffer.cxx |   46 ++
 1 file changed, 36 insertions(+), 10 deletions(-)

New commits:
commit 321c1a6db442a6d2afee25d1d1256ff36bdb004e
Author: Eike Rathke 
AuthorDate: Mon Feb 6 22:59:44 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:52:37 2023 +

Resolves: tdf#139934 always apply cellXfs xf explicits (tdf#123139 related)

Change-Id: Id1e12ee8677a25a645bfd53b4968a17c9a1eabe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146599
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 909a25d30b09ebd3a023105a9c3cc4d20add094a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146533
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index 1819257383e1..1dbe7e658269 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1972,38 +1972,64 @@ void Xf::importXf( const AttributeList& rAttribs, bool 
bCellXf )
 // as xfId attribute is always created during export to .xlsx
 // Not setting "0" value is causing wrong .xlsx import by LibreOffice,
 // for spreadsheets created by external applications (ex. SAP BI).
+bool bApplyDefault;
 if ( maModel.mbCellXf )
 {
-maModel.mnStyleXfId = rAttribs.getInteger( XML_xfId, 0 );
+const sal_Int32 xfId = rAttribs.getInteger( XML_xfId, -1 );
+// No xfId => no cellStyleXfs that could overwrite this on change, thus
+// has to be applied.
+bApplyDefault = (xfId < 0);
+maModel.mnStyleXfId = std::max(0, xfId);
 }
 else
 {
 maModel.mnStyleXfId = rAttribs.getInteger( XML_xfId, -1 );
+bApplyDefault = true;
 }
 maModel.mnFontId = rAttribs.getInteger( XML_fontId, -1 );
 maModel.mnNumFmtId = rAttribs.getInteger( XML_numFmtId, -1 );
 maModel.mnBorderId = rAttribs.getInteger( XML_borderId, -1 );
 maModel.mnFillId = rAttribs.getInteger( XML_fillId, -1 );
 
-
-maModel.mbAlignUsed = maModel.mbCellXf || 
rAttribs.getBool(XML_applyAlignment, true);
-maModel.mbProtUsed = maModel.mbCellXf || 
rAttribs.getBool(XML_applyProtection, true);
-/*  Default value of the apply*** attributes is dependent on context:
-true in cellStyleXfs element, false in cellXfs element... */
-maModel.mbFontUsed   = rAttribs.getBool( XML_applyFont, 
!maModel.mbCellXf );
-maModel.mbNumFmtUsed = rAttribs.getBool( XML_applyNumberFormat, 
!maModel.mbCellXf );
-maModel.mbBorderUsed = rAttribs.getBool( XML_applyBorder,   
!maModel.mbCellXf );
-maModel.mbAreaUsed   = rAttribs.getBool( XML_applyFill, 
!maModel.mbCellXf );
+// Default value of the apply*** attributes is dependent on context:
+// true in cellStyleXfs element, false in cellXfs element...
+// But it's not as easy as it sounds, for docs see
+// 
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/59922f8b-0edc-4e93-a822-9f22254aec46
+// and apparently in reality cellStyleXfs xf and cellXfs xf are not merged
+// at all, see
+// 
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/bcf98682-e8d3-44b8-b8f8-0bf696878ba1
+// "b. The standard states that both the cell style xf records and cell xf
+// records must be read to understand the full set of formatting applied to
+// a cell."
+// "In Office, only the cell xf record defines the formatting applied to a 
cell."
+
+// So for reading documents this is all crap and effectively xf records
+// apply their explicit properties by default unless denied.
+// bApplyDefault==false only for cellXf xf with xfId.
+
+// For cellXf xf, mbAlignUsed and mbProtUsed will be set when actually
+// importing the element.
+maModel.mbAlignUsed  = rAttribs.getBool( XML_applyAlignment,
bApplyDefault);
+maModel.mbProtUsed   = rAttribs.getBool( XML_applyProtection,   
bApplyDefault);
+
+maModel.mbFontUsed   = rAttribs.getBool( XML_applyFont, 
bApplyDefault || maModel.mnFontId > 0);
+maModel.mbNumFmtUsed = rAttribs.getBool( XML_applyNumberFormat, 
bApplyDefault || maModel.mnNumFmtId > 0);
+maModel.mbBorderUsed = rAttribs.getBool( XML_applyBorder,   
bApplyDefault || maModel.mnBorderId > 0);
+maModel.mbAreaUsed   = rAttribs.getBool( XML_applyFill, 
bApplyDefault || maModel.mnFillId > 0);
 }
 
 void Xf::importAlignment( const AttributeList& rAttribs )
 {
 maAlignment.importAlignment( rAttribs );
+if (maModel.mbCellXf)
+maModel.mbAlignUsed = true;
 }
 
 void Xf::importProtection( const AttributeList& rAttribs )
 {
 maProtection.importProtection( rAttribs );
+if (maModel.mbCellXf)
+maModel.mbProtUsed = true;
 }
 
 void Xf::importXf( SequenceInputStream& rStrm, bool bCellXf )


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/source

2023-02-13 Thread Mike Kaganski (via logerrit)
 sc/source/core/data/stlpool.cxx |   10 --
 1 file changed, 8 insertions(+), 2 deletions(-)

New commits:
commit d2185f73be42c7fa3ccf3c21b2636c51f71f41be
Author: Mike Kaganski 
AuthorDate: Fri Feb 10 13:25:53 2023 +0300
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:53:40 2023 +

tdf#153514: try to find exact match, even when searching case-insensitively

Change-Id: Ib3bec382ef80a9078ffde8612c395cb0154fd476
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146747
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2a984c77ccb1aa77d9bbd02218d4dc76aaff4a9e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146766
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/core/data/stlpool.cxx b/sc/source/core/data/stlpool.cxx
index 5ca89c37a510..b08b6c2203c9 100644
--- a/sc/source/core/data/stlpool.cxx
+++ b/sc/source/core/data/stlpool.cxx
@@ -408,14 +408,20 @@ ScStyleSheet* ScStyleSheetPool::FindCaseIns( const 
OUString& rName, SfxStyleFami
 CaseInsensitiveNamePredicate aPredicate(rName, eFam);
 std::vector aFoundPositions = 
GetIndexedStyleSheets().FindPositionsByPredicate(aPredicate);
 
+ScStyleSheet* first = nullptr; // first case insensitive match found
 for (const auto& rPos : aFoundPositions)
 {
 SfxStyleSheetBase *pFound = GetStyleSheetByPositionInIndex(rPos);
 // we do not know what kind of sheets we have.
 if (pFound->isScStyleSheet())
-return static_cast(pFound);
+{
+if (pFound->GetName() == rName) // exact case sensitive match
+return static_cast(pFound);
+if (!first)
+first = static_cast(pFound);
+}
 }
-return nullptr;
+return first;
 }
 
 void ScStyleSheetPool::setAllParaStandard()


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/source

2023-02-13 Thread Mike Kaganski (via logerrit)
 sc/source/core/tool/interpr2.cxx |   64 ++-
 1 file changed, 31 insertions(+), 33 deletions(-)

New commits:
commit 8b4d64c8916364d96c03dd371fe802413861ba7d
Author: Mike Kaganski 
AuthorDate: Fri Feb 10 16:44:37 2023 +0300
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:54:02 2023 +

Flatten ScInterpreter::ScStyle

Change-Id: I64c622d2c2ca7eda02e8739657fe345f9be8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146777
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 
(cherry picked from commit 2844670d2a47c606cbebb99f73389f30154a3c5e)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146767
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index a417c9d4ba74..b1492bb1c77e 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -2596,48 +2596,46 @@ void ScInterpreter::ScCurrent()
 void ScInterpreter::ScStyle()
 {
 sal_uInt8 nParamCount = GetByte();
-if (nParamCount >= 1 && nParamCount <= 3)
-{
-OUString aStyle2;   // Template after timer
-if (nParamCount >= 3)
-aStyle2 = GetString().getString();
-tools::Long nTimeOut = 0;  // timeout
-if (nParamCount >= 2)
-nTimeOut = static_cast(GetDouble()*1000.0);
-OUString aStyle1 = GetString().getString(); // Template for immediate
+if (!MustHaveParamCount(nParamCount, 1, 3))
+return;
 
-if (nTimeOut < 0)
-nTimeOut = 0;
+OUString aStyle2;   // Template after timer
+if (nParamCount >= 3)
+aStyle2 = GetString().getString();
+tools::Long nTimeOut = 0;  // timeout
+if (nParamCount >= 2)
+nTimeOut = static_cast(GetDouble()*1000.0);
+OUString aStyle1 = GetString().getString(); // Template for immediate
 
-// Execute request to apply template
-if ( !mrDoc.IsClipOrUndo() )
+if (nTimeOut < 0)
+nTimeOut = 0;
+
+// Execute request to apply template
+if ( !mrDoc.IsClipOrUndo() )
+{
+SfxObjectShell* pShell = mrDoc.GetDocumentShell();
+if (pShell)
 {
-SfxObjectShell* pShell = mrDoc.GetDocumentShell();
-if (pShell)
+// notify object shell directly!
+bool bNotify = true;
+if (aStyle2.isEmpty())
 {
-// notify object shell directly!
-bool bNotify = true;
-if (aStyle2.isEmpty())
-{
-const ScStyleSheet* pStyle = mrDoc.GetStyle(aPos.Col(), 
aPos.Row(), aPos.Tab());
+const ScStyleSheet* pStyle = mrDoc.GetStyle(aPos.Col(), 
aPos.Row(), aPos.Tab());
 
-if (pStyle && pStyle->GetName() == aStyle1)
-bNotify = false;
-}
+if (pStyle && pStyle->GetName() == aStyle1)
+bNotify = false;
+}
 
-if (bNotify)
-{
-ScRange aRange(aPos);
-ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 
);
-pShell->Broadcast( aHint );
-}
+if (bNotify)
+{
+ScRange aRange(aPos);
+ScAutoStyleHint aHint( aRange, aStyle1, nTimeOut, aStyle2 );
+pShell->Broadcast( aHint );
 }
 }
-
-PushDouble(0.0);
 }
-else
-PushIllegalParameter();
+
+PushDouble(0.0);
 }
 
 static ScDdeLink* lcl_GetDdeLink( const sfx2::LinkManager* pLinkMgr,


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - vcl/source

2023-02-13 Thread Szymon Kłos (via logerrit)
 vcl/source/control/PriorityMergedHBox.cxx |9 +
 1 file changed, 9 insertions(+)

New commits:
commit e76c651af0e4b77bc05c53191263ec49fc012e4c
Author: Szymon Kłos 
AuthorDate: Mon Feb 6 14:39:56 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:59:14 2023 +

tdf#147740 fix disappearing icons in groupbar

Change-Id: Ia67b90d05bccbd4d2c2553109ea7372574ee21d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146584
Tested-by: Jenkins
Reviewed-by: Szymon Kłos 
(cherry picked from commit 1e23e26d48eabb829c39304a78fad26b10f76d7f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146629
Reviewed-by: Christian Lohmaier 
(cherry picked from commit db1c7c55fe0cd35ead3174b3eb7f0cdad1a475f3)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146712
Reviewed-by: Xisco Fauli 

diff --git a/vcl/source/control/PriorityMergedHBox.cxx 
b/vcl/source/control/PriorityMergedHBox.cxx
index 75a26daa52c1..65d51cce378c 100644
--- a/vcl/source/control/PriorityMergedHBox.cxx
+++ b/vcl/source/control/PriorityMergedHBox.cxx
@@ -155,6 +155,15 @@ Size PriorityMergedHBox::calculateRequisition() const
 accumulateMaxes(aChildSize, aSize);
 }
 
+// find max height
+for (vcl::Window* pChild = GetWindow(GetWindowType::FirstChild); pChild;
+ pChild = pChild->GetWindow(GetWindowType::Next))
+{
+Size aChildSize = getLayoutRequisition(*pChild);
+setPrimaryDimension(aChildSize, getPrimaryDimension(aSize));
+accumulateMaxes(aChildSize, aSize);
+}
+
 setPrimaryDimension(aSize, 200);
 return finalizeMaxes(aSize, nVisibleChildren);
 }


[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sw/qa sw/source

2023-02-13 Thread László Németh (via logerrit)
 sw/qa/uitest/writer_tests7/tdf152964.py |   50 
 sw/source/core/docnode/ndtbl1.cxx   |1 
 2 files changed, 51 insertions(+)

New commits:
commit eff6ea0c53cfb310413db24edcaeca59b86d4fe1
Author: László Németh 
AuthorDate: Wed Jan 18 12:26:11 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 11:59:46 2023 +

tdf#152964 sw: fix crash of Undo of tracked deletion of empty table rows

In Hide Changes mode, Undo of insertion of CH_TXT_TRACKED_DUMMY_CHAR
(workaround of the deletion of empty table rows), resulted a crash
because of inconsistency of table and redline nodes. As a workaround,
skip that insertion from the Undo.

Regression from commit a74c51025fa4519caaf461492e4ed8e68bd34885
"tdf#146962 sw: hide deleted row at deletion in Hide Changes".

Change-Id: I0666d7bcbbf08d84386cea64c1807f69f751479d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145737
Tested-by: Jenkins
Reviewed-by: László Németh 
(cherry picked from commit 4e72e646255624eda698da750383a5725e8f6c4c)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145718
Reviewed-by: Christian Lohmaier 
(cherry picked from commit 6d47b8a09f51357851cdfa752f231ed10328b8f2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146754
Reviewed-by: Xisco Fauli 

diff --git a/sw/qa/uitest/writer_tests7/tdf152964.py 
b/sw/qa/uitest/writer_tests7/tdf152964.py
new file mode 100644
index ..abbf25434668
--- /dev/null
+++ b/sw/qa/uitest/writer_tests7/tdf152964.py
@@ -0,0 +1,50 @@
+# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+from uitest.framework import UITestCase
+from uitest.uihelper.common import get_state_as_dict
+from libreoffice.uno.propertyvalue import mkPropertyValues
+from uitest.uihelper.common import select_pos
+
+# Bug 152964 - Undo of tracked deletion of an empty table row crashed Writer
+
+
+class tdf152964(UITestCase):
+def test_tdf152964(self):
+with self.ui_test.create_doc_in_start_center("writer"):
+
+# redlining should be on
+self.xUITest.executeCommand(".uno:TrackChanges")
+# hide changes
+self.xUITest.executeCommand(".uno:ShowTrackedChanges")
+
+# insert a table
+xWriterDoc = self.xUITest.getTopFocusWindow()
+xWriterEdit = xWriterDoc.getChild("writer_edit")
+xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
+with 
self.ui_test.execute_dialog_through_command(".uno:InsertTable") as xDialog:
+formatlbinstable = xDialog.getChild("formatlbinstable")
+entry = formatlbinstable.getChild("1")
+entry.executeAction("SELECT", tuple())
+
+# delete its second and first rows
+self.xUITest.executeCommand(".uno:GoDown")
+self.xUITest.executeCommand(".uno:DeleteRows")
+self.xUITest.executeCommand(".uno:DeleteRows")
+
+# This crashed Writer
+self.xUITest.executeCommand(".uno:Undo")
+
+# test other Undos and Redos
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Redo")
+self.xUITest.executeCommand(".uno:Redo")
+self.xUITest.executeCommand(".uno:Redo")
+
+# vim: set shiftwidth=4 softtabstop=4 expandtab:
diff --git a/sw/source/core/docnode/ndtbl1.cxx 
b/sw/source/core/docnode/ndtbl1.cxx
index 678861ca08e1..fb1b59a400a6 100644
--- a/sw/source/core/docnode/ndtbl1.cxx
+++ b/sw/source/core/docnode/ndtbl1.cxx
@@ -640,6 +640,7 @@ void SwDoc::SetRowNotTracked( const SwCursor& rCursor,
 // new redline can cause a problem)
 if ( bInsertDummy && (pLn->IsEmpty() || bDeletionOfOwnRowInsertion ) )
 {
+::sw::UndoGuard const undoGuard(GetIDocumentUndoRedo());
 SwNodeIndex aInsPos( *(pLn->GetTabBoxes()[0]->GetSttNd()), 1 );
 RedlineFlags eOld = getIDocumentRedlineAccess().GetRedlineFlags();
 
getIDocumentRedlineAccess().SetRedlineFlags_intern(RedlineFlags::NONE);


[Libreoffice-commits] core.git: sw/qa

2023-02-13 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests6/tdf144691.py |   29 +++--
 1 file changed, 15 insertions(+), 14 deletions(-)

New commits:
commit 22850e8d281d17575c01321cfff9e1ad2201ffb5
Author: Xisco Fauli 
AuthorDate: Mon Feb 13 12:18:48 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 12:42:34 2023 +

sw: use try/finally to reset the changes in OptionsTreeDialog

Otherwise it might affect other tests if it hits an assert

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

diff --git a/sw/qa/uitest/writer_tests6/tdf144691.py 
b/sw/qa/uitest/writer_tests6/tdf144691.py
index f2f980a598ae..14e8a62a4b5a 100644
--- a/sw/qa/uitest/writer_tests6/tdf144691.py
+++ b/sw/qa/uitest/writer_tests6/tdf144691.py
@@ -28,19 +28,20 @@ class tdf144691(UITestCase):
 
 defaultLanguage = 
get_state_as_dict(xWesternLanguage)['SelectEntryText']
 
-# Select another language
-select_by_text(xWesternLanguage, "Tajik")
-self.assertEqual("Tajik", 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
-
-xApply = xDialog.getChild("apply")
-xApply.executeAction("CLICK", tuple())
-
-# Without the fix in place, this test would have failed with
-# AssertionError: 'Tajik' != 'English (USA)'
-self.assertEqual("Tajik", 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
-
-# Select the default language
-select_by_text(xWesternLanguage, defaultLanguage)
-self.assertEqual(defaultLanguage, 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
+try:
+# Select another language
+select_by_text(xWesternLanguage, "Tajik")
+self.assertEqual("Tajik", 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
+
+xApply = xDialog.getChild("apply")
+xApply.executeAction("CLICK", tuple())
+
+# Without the fix in place, this test would have failed 
with
+# AssertionError: 'Tajik' != 'English (USA)'
+self.assertEqual("Tajik", 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
+finally:
+# Select the default language
+select_by_text(xWesternLanguage, defaultLanguage)
+self.assertEqual(defaultLanguage, 
get_state_as_dict(xWesternLanguage)['SelectEntryText'])
 
 # vim: set shiftwidth=4 softtabstop=4 expandtab:


[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - sc/source

2023-02-13 Thread Xisco Fauli (via logerrit)
 sc/source/filter/rtf/eeimpars.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 1e7ee035992a0b29f42eac56ad82e2a1b0fe8ccd
Author: Xisco Fauli 
AuthorDate: Fri Feb 10 10:50:24 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 12:44:38 2023 +

sc: avoid divide by zero in ScEEImport::GraphicSize

See 
https://crashreport.libreoffice.org/stats/signature/ScEEImport::GraphicSize(short,long,ScEEParseEntry%20*)

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

diff --git a/sc/source/filter/rtf/eeimpars.cxx 
b/sc/source/filter/rtf/eeimpars.cxx
index b9678e2fdd5f..e9ab9175ab8f 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -528,7 +528,13 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, 
ScEEParseEntry* pE )
 }
 // Distribute line height difference between all affected lines
 SCROW nRowSpan = pE->nRowOverlap;
+
+assert(nRowSpan != 0);
+if ( nRowSpan == 0 )
+return bHasGraphics;
+
 nHeight /= nRowSpan;
+
 if ( nHeight == 0 )
 nHeight = 1; // For definite comparison
 for ( SCROW nR = nRow; nR < nRow + nRowSpan; nR++ )


[Libreoffice-commits] core.git: sw/qa

2023-02-13 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests7/tdf133348.py |   77 +---
 1 file changed, 42 insertions(+), 35 deletions(-)

New commits:
commit 4beaa92bc2c91e7ff84b044469d376216efec2fe
Author: Xisco Fauli 
AuthorDate: Mon Feb 13 11:49:29 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 12:48:31 2023 +

sw: use try/finally to reset the changes in OptionsTreeDialog

Otherwise it might affect other tests if it hits an assert

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

diff --git a/sw/qa/uitest/writer_tests7/tdf133348.py 
b/sw/qa/uitest/writer_tests7/tdf133348.py
index 417dedeb6aa9..100f26cbd741 100644
--- a/sw/qa/uitest/writer_tests7/tdf133348.py
+++ b/sw/qa/uitest/writer_tests7/tdf133348.py
@@ -10,44 +10,51 @@ from uitest.framework import UITestCase
 from libreoffice.uno.propertyvalue import mkPropertyValues
 
 class tdf133348(UITestCase):
+
+def change_author_name(self, name):
+with 
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as 
xDialogOpt:
+xPages = xDialogOpt.getChild("pages")
+xEntry = xPages.getChild('0')
+xEntry.executeAction("EXPAND", tuple())
+xGeneralEntry = xEntry.getChild('0')
+xGeneralEntry.executeAction("SELECT", tuple())
+xFirstName = xDialogOpt.getChild("firstname")
+props = {"TEXT": name}
+actionProps = mkPropertyValues(props)
+xFirstName.executeAction("TYPE", actionProps)
+
 def test_tdf133348(self):
 
 with self.ui_test.create_doc_in_start_center("writer") as document:
 
-self.xUITest.executeCommand(".uno:SelectAll")
-xArgs = mkPropertyValues({"Text": "C1"})
-self.xUITest.executeCommandWithParameters(".uno:InsertAnnotation", 
xArgs)
-
-with 
self.ui_test.execute_dialog_through_command(".uno:OptionsTreeDialog") as 
xDialogOpt:
-xPages = xDialogOpt.getChild("pages")
-xEntry = xPages.getChild('0')
-xEntry.executeAction("EXPAND", tuple())
-xGeneralEntry = xEntry.getChild('0')
-xGeneralEntry.executeAction("SELECT", tuple())
-xFirstName = xDialogOpt.getChild("firstname")
-props = {"TEXT": "Known Author"}
-actionProps = mkPropertyValues(props)
-xFirstName.executeAction("TYPE", actionProps)
-
-xArgs = mkPropertyValues({"Text": "C2"})
-self.xUITest.executeCommandWithParameters(".uno:ReplyComment", 
xArgs)
-
-# Wait for async events to be processed
-xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
-xToolkit.processEventsToIdle()
-
-xEnum = document.TextFields.createEnumeration()
-self.assertEqual(xEnum.nextElement().Author.strip(), 'Unknown 
Author')
-self.assertEqual(xEnum.nextElement().Author.strip(), 'Known 
Author')
-
-self.xUITest.executeCommand(".uno:Undo")
-self.xUITest.executeCommand(".uno:Undo")
-
-# Without the fix in place, it would have crashed here
-self.xUITest.executeCommand(".uno:Undo")
-self.xUITest.executeCommand(".uno:Undo")
-
-# all comments have been deleted
-
self.assertFalse(document.TextFields.createEnumeration().hasMoreElements())
+try:
+self.xUITest.executeCommand(".uno:SelectAll")
+xArgs = mkPropertyValues({"Text": "C1"})
+
self.xUITest.executeCommandWithParameters(".uno:InsertAnnotation", xArgs)
+
+self.change_author_name("Known Author")
+
+xArgs = mkPropertyValues({"Text": "C2"})
+self.xUITest.executeCommandWithParameters(".uno:ReplyComment", 
xArgs)
+
+# Wait for async events to be processed
+xToolkit = 
self.xContext.ServiceManager.createInstance('com.sun.star.awt.Toolkit')
+xToolkit.processEventsToIdle()
+
+xEnum = document.TextFields.createEnumeration()
+self.assertEqual(xEnum.nextElement().Author.strip(), 'Unknown 
Author')
+self.assertEqual(xEnum.nextElement().Author.strip(), 'Known 
Author')
+
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Undo")
+
+# Without the fix in place, it would have crashed here
+self.xUITest.executeCommand(".uno:Undo")
+self.xUITest.executeCommand(".uno:Undo")
+
+# all comments have been deleted
+
self.assertFalse(document.TextFields.createEnumeration().hasMoreElements())
+finally:
+self.change_author_name("")
 
 # vim: set shiftwidth=4 softtabs

Re: Extended ODF schema

2023-02-13 Thread Laurent Balland

Hello Michael,

Le 13/02/2023 à 11:13, Michael Stahl a écrit :

On 10.02.23 19:23, Laurent Balland wrote:


Then I get the following errors:

- /tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,9446]: 
Error: tag name "number:text" is not allowed. Possible tag names are: 
,,,
number:text loext:blank-width-char=")"> 

  ^
/tmp/libtest_sc_sparkline_test.sorjp6.tmp/styles.xml[2,10964]: Error: 
tag name "number:text" is not allowed. Possible tag names are: 
,
number:text loext:blank-width-char=")"> 
<


i think the error is that there are 2 consecutive  
elements in , which is not allowed by the schema.


You are right. I modified number-text-with-fillchar to enable 
consecutive number:text and Jenkins is now happy


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

Best regards,

Laurent Balland





[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sfx2/source

2023-02-13 Thread Szymon Kłos (via logerrit)
 sfx2/source/view/lokhelper.cxx |6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit ba2d21197affa5678143dd3cb3a2003d57bb6e22
Author: Szymon Kłos 
AuthorDate: Mon Feb 13 13:05:26 2023 +0100
Commit: Henry Castro 
CommitDate: Mon Feb 13 13:01:13 2023 +

lok: escape notifyWindow message

File properties dialog contains problematic characters.
In lok case and nl language it was constructing incorrect
message so boost JSON parser was throwing an exception
and dialog was not created correctly.

Change-Id: I7e81c9407fcbf57355c0890c9540ce1f828904e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146900
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Henry Castro 

diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 9f34d31c5766..e61263acc8c6 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -578,8 +578,10 @@ void SfxLokHelper::notifyWindow(const SfxViewShell* 
pThisView,
 {
 if (!rItem.first.isEmpty() && !rItem.second.isEmpty())
 {
-aPayload.append(", \"" + rItem.first + "\": \"" +
-rItem.second).append('"');
+auto aFirst = rItem.first.replaceAll("\"", "\\\"");
+auto aSecond = rItem.second.replaceAll("\"", "\\\"");
+aPayload.append(", \"" + aFirst + "\": \"" +
+aSecond).append('"');
 }
 }
 aPayload.append('}');


[Libreoffice-commits] core.git: sw/qa

2023-02-13 Thread Xisco Fauli (via logerrit)
 sw/qa/uitest/writer_tests7/tdf90401.py |  238 +++--
 1 file changed, 111 insertions(+), 127 deletions(-)

New commits:
commit 32267c54d7430886e643b297b5e03f5fbf08cf19
Author: Xisco Fauli 
AuthorDate: Mon Feb 13 12:04:53 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 13:13:27 2023 +

sw: use try/finally to reset the changes in OptionsTreeDialog

Otherwise it might affect other tests if it hits an assert

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

diff --git a/sw/qa/uitest/writer_tests7/tdf90401.py 
b/sw/qa/uitest/writer_tests7/tdf90401.py
index 15c1f3c31c12..95cc966e1dc7 100644
--- a/sw/qa/uitest/writer_tests7/tdf90401.py
+++ b/sw/qa/uitest/writer_tests7/tdf90401.py
@@ -19,137 +19,121 @@ import os.path
 
 class tdf90401(UITestCase):
 
-   def test_tdf90401_remove_personal_info(self):
-
+def change_security_option(self, enabled):
+with 
self.ui_test.execute_dialog_through_command('.uno:OptionsTreeDialog') as 
xDialog:
+xPages = xDialog.getChild('pages')
+xGenEntry = xPages.getChild('0')
+xSecurityPage = xGenEntry.getChild('6')
+xSecurityPage.executeAction('SELECT', tuple())
+# Click Button Options...
+xOptions = xDialog.getChild('options')
+
+with self.ui_test.execute_blocking_action(xOptions.executeAction, 
args=('CLICK', ()), close_button="") as dialog:
+xRemovePersonal = dialog.getChild('removepersonal')
+if get_state_as_dict(xRemovePersonal)['Selected'] != enabled:
+xRemovePersonal.executeAction('CLICK', tuple())
+self.ui_test.wait_until_property_is_updated(xRemovePersonal, 
"Selected", enabled)
+
self.assertEqual(get_state_as_dict(xRemovePersonal)["Selected"], enabled)
+
+xOkBtn = dialog.getChild('ok')
+# FIXME: we can't use close_dialog_through_button here, the 
dialog doesn't emit the
+# event DialogClosed after closing
+xOkBtn.executeAction('CLICK', tuple())
+
+def test_tdf90401_remove_personal_info(self):
 # load a test document with a tracked change, and add a comment
 
 with TemporaryDirectory() as tempdir:
-xFilePath = os.path.join(tempdir, 'tdf90401-tmp.fodt')
-
-with 
self.ui_test.load_file(get_url_for_data_file('redline-autocorrect.fodt')):
-
-self.xUITest.executeCommand('.uno:SelectAll')
-self.xUITest.executeCommand('.uno:InsertAnnotation')
-
-# enable remove personal info security option
-
-with 
self.ui_test.execute_dialog_through_command('.uno:OptionsTreeDialog') as 
xDialog:
-xPages = xDialog.getChild('pages')
-xGenEntry = xPages.getChild('0')
-xSecurityPage = xGenEntry.getChild('6')
-xSecurityPage.executeAction('SELECT', tuple())
-# Click Button Options...
-xOptions = xDialog.getChild('options')
-
-with 
self.ui_test.execute_blocking_action(xOptions.executeAction, args=('CLICK', 
()), close_button="") as dialog:
-xRemovePersonal = dialog.getChild('removepersonal')
-if get_state_as_dict(xRemovePersonal)['Selected'] == 
"false":
-xRemovePersonal.executeAction('CLICK', tuple())
-
self.ui_test.wait_until_property_is_updated(xRemovePersonal, "Selected", "true")
-
self.assertEqual(get_state_as_dict(xRemovePersonal)["Selected"], "true")
-
-xOkBtn = dialog.getChild('ok')
-# FIXME: we can't use close_dialog_through_button 
here, the dialog doesn't emit the
-# event DialogClosed after closing
-xOkBtn.executeAction('CLICK', tuple())
-
-# Save Copy as
-with 
self.ui_test.execute_dialog_through_command('.uno:SaveAs', close_button="open") 
as xDialog:
-xFileName = xDialog.getChild('file_name')
-xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'CTRL+A'}))
-xFileName.executeAction('TYPE', 
mkPropertyValues({'KEYCODE':'BACKSPACE'}))
-xFileName.executeAction('TYPE', mkPropertyValues({'TEXT': 
xFilePath}))
-
-with self.ui_test.load_file(systemPathToFileUrl(xFilePath)) as 
writer_doc2:
-
-# check removed personal info on comments
-
-textfields = writer_doc2.getTextFields()
-author = ""
-year = -1
-for textfield in textfields:
-if 
textfield.supportsService("com.sun.star.text.TextField

[Libreoffice-commits] core.git: desktop/source desktop/uiconfig offapi/com officecfg/registry sysui/desktop

2023-02-13 Thread Samuel Mehrbrodt (via logerrit)
 desktop/source/pkgchk/unopkg/unopkg_app.cxx  |4 
++--
 desktop/uiconfig/ui/extensionmanager.ui  |2 +-
 desktop/uiconfig/ui/updateinstalldialog.ui   |2 +-
 offapi/com/sun/star/deployment/XPackageManager.idl   |2 +-
 officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu |2 +-
 officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs |4 
++--
 officecfg/registry/schema/org/openoffice/Office/OptionsDialog.xcs|3 +--
 sysui/desktop/man/unopkg.1   |2 +-
 8 files changed, 10 insertions(+), 11 deletions(-)

New commits:
commit ef3c81d0fca9c8f80fd0d4e4025c37a114528344
Author: Samuel Mehrbrodt 
AuthorDate: Thu Feb 9 14:52:58 2023 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Feb 13 13:17:12 2023 +

Rename: Extension Manager -> Extensions

simplify dialog title, should be clear what this is about.

Change-Id: I65d8ca89e32cc225a07483703cd27b0fdc630b42
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146715
Reviewed-by: Heiko Tietze 
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx 
b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index c235eba1f523..0ecb328b7c69 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -92,7 +92,7 @@ u"\n"
 " remove  remove extensions by identifier\n"
 " reinstall   expert feature: reinstall all deployed extensions\n"
 " listlist information about deployed extensions\n"
-" gui raise Extension Manager Graphical User Interface 
(GUI)\n"
+" gui raise Extensions dialog\n"
 "\n"
 "options:\n"
 " -h, --help  this help\n"
@@ -110,7 +110,7 @@ u"\n"
 " --deployment-contextexpert feature: explicit deployment context\n"
 " \n"
 "\n"
-"To learn more about the Extension Manager and extensions, see:\n"
+"To learn more about extensions, see:\n"
 "https://wiki.documentfoundation.org/Documentation/DevGuide/Extensions\n\n";;
 
 
diff --git a/desktop/uiconfig/ui/extensionmanager.ui 
b/desktop/uiconfig/ui/extensionmanager.ui
index f1eba95b038d..215536e179ab 100644
--- a/desktop/uiconfig/ui/extensionmanager.ui
+++ b/desktop/uiconfig/ui/extensionmanager.ui
@@ -5,7 +5,7 @@
   
 False
 6
-Extension Manager
+Extensions
 0
 0
 dialog
diff --git a/desktop/uiconfig/ui/updateinstalldialog.ui 
b/desktop/uiconfig/ui/updateinstalldialog.ui
index 6ef80d393df2..15e7bcc398f3 100644
--- a/desktop/uiconfig/ui/updateinstalldialog.ui
+++ b/desktop/uiconfig/ui/updateinstalldialog.ui
@@ -175,7 +175,7 @@
 
 
   
-Click the Check 
for Updates button in the Extension Manager to check for online updates for all 
installed extensions. To check for online updates for only the selected 
extension, right-click to open the context menu, then choose Update.
+Click the Check 
for Updates button in the Extensions dialog to check for online updates for all 
installed extensions. To check for online updates for only the selected 
extension, right-click to open the context menu, then choose Update.
   
 
   
diff --git a/offapi/com/sun/star/deployment/XPackageManager.idl 
b/offapi/com/sun/star/deployment/XPackageManager.idl
index 2fc1769a583a..4e163e6fba24 100644
--- a/offapi/com/sun/star/deployment/XPackageManager.idl
+++ b/offapi/com/sun/star/deployment/XPackageManager.idl
@@ -225,7 +225,7 @@ interface XPackageManager
 
 Normally one would call a method and handle the exception
 if writing failed. However, a GUI interface may need to know beforehand
-if writing is allowed. For example, the Extension Manager dialog
+if writing is allowed. For example, the Extensions dialog
 needs to enable / disable the Add button depending if the user has
 write permission. Only the XPackageManager implementation knows the
 location of the installed extensions. Therefore it is not possible
diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
index 250d641f3b25..07a772f54d72 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/GenericCommands.xcu
@@ -6328,7 +6328,7 @@ bit 3 (0x8): #define 
UICOMMANDDESCRIPTION_PROPERTIES_TOGGLEBUTTON 8
   
   
 
-  ~Extension Manager...
+  ~Extensions...
 
 
   1
diff --git 
a/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs 
b/officecfg/registry/schema/org/openoffice/Office/ExtensionManager.xcs
index eaf840cd90e4..1f6f0c4c35e8 100644
--- a/officecfg/registry/schema/org

[Libreoffice-commits] core.git: include/basic

2023-02-13 Thread buldi (via logerrit)
 include/basic/sbx.hxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 4e822d22e11e241113e392a1475a479e052df909
Author: buldi 
AuthorDate: Sat Feb 11 03:55:46 2023 +0100
Commit: Julien Nabet 
CommitDate: Mon Feb 13 13:18:18 2023 +

tdf#143148 Use pragma once instead of include guard

Change-Id: I6fa77335ced02442eec69b0dbb088505eb4b1aa0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146818
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/include/basic/sbx.hxx b/include/basic/sbx.hxx
index 7997f53ef422..53f9d1b0760d 100644
--- a/include/basic/sbx.hxx
+++ b/include/basic/sbx.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BASIC_SBX_HXX
-#define INCLUDED_BASIC_SBX_HXX
+#pragma once
 
 #include 
 #include 
@@ -208,6 +207,4 @@ typedef tools::SvRef SbxArrayRef;
 typedef tools::SvRef SbxInfoRef;
 typedef tools::SvRef SbxDimArrayRef;
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: sw/qa

2023-02-13 Thread Xisco Fauli (via logerrit)
 sw/qa/extras/uiwriter/uiwriter8.cxx |   54 
 sw/qa/uitest/writer_tests7/tdf152964.py |   50 -
 2 files changed, 54 insertions(+), 50 deletions(-)

New commits:
commit 6732191ebf8a559b272238c03af679263abf86ef
Author: Xisco Fauli 
AuthorDate: Mon Feb 13 13:39:29 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 14:26:19 2023 +

tdf#152964: sw: move UItest to CppUnittest

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

diff --git a/sw/qa/extras/uiwriter/uiwriter8.cxx 
b/sw/qa/extras/uiwriter/uiwriter8.cxx
index 18d390ef64ce..43d21e1bfb24 100644
--- a/sw/qa/extras/uiwriter/uiwriter8.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter8.cxx
@@ -842,6 +842,60 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf146248)
 CPPUNIT_ASSERT_EQUAL(true, getProperty(xPageStyle, "HeaderIsOn"));
 }
 
+CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf152964)
+{
+createSwDoc();
+
+dispatchCommand(mxComponent, ".uno:TrackChanges", {});
+Scheduler::ProcessEventsToIdle();
+dispatchCommand(mxComponent, ".uno:ShowTrackedChanges", {});
+Scheduler::ProcessEventsToIdle();
+
+uno::Sequence aArgs(comphelper::InitPropertySequence(
+{ { "Rows", uno::Any(sal_Int32(2)) }, { "Columns", 
uno::Any(sal_Int32(2)) } }));
+
+dispatchCommand(mxComponent, ".uno:InsertTable", aArgs);
+Scheduler::ProcessEventsToIdle();
+
+uno::Reference xTextTablesSupplier(mxComponent, 
uno::UNO_QUERY);
+uno::Reference 
xIndexAccess(xTextTablesSupplier->getTextTables(),
+ uno::UNO_QUERY);
+uno::Reference xTextTable(xIndexAccess->getByIndex(0), 
uno::UNO_QUERY);
+CPPUNIT_ASSERT_EQUAL(sal_Int32(1), xIndexAccess->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getRows()->getCount());
+CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTextTable->getColumns()->getCount());
+
+SwDoc* pDoc = getSwDoc();
+SwEditShell* const pEditShell(pDoc->GetEditShell());
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pEditShell->GetRedlineCount());
+dispatchCommand(mxComponent, ".uno:GoDown", {});
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+dispatchCommand(mxComponent, ".uno:DeleteRows", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pEditShell->GetRedlineCount());
+
+// Without the fix in place, this test would have crashed here
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pEditShell->GetRedlineCount());
+
+dispatchCommand(mxComponent, ".uno:Undo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(0), 
pEditShell->GetRedlineCount());
+
+dispatchCommand(mxComponent, ".uno:Redo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(1), 
pEditShell->GetRedlineCount());
+dispatchCommand(mxComponent, ".uno:Redo", {});
+Scheduler::ProcessEventsToIdle();
+
+CPPUNIT_ASSERT_EQUAL(static_cast(2), 
pEditShell->GetRedlineCount());
+}
+
 CPPUNIT_TEST_FIXTURE(SwUiWriterTest8, testTdf107427)
 {
 createSwDoc();
diff --git a/sw/qa/uitest/writer_tests7/tdf152964.py 
b/sw/qa/uitest/writer_tests7/tdf152964.py
deleted file mode 100644
index abbf25434668..
--- a/sw/qa/uitest/writer_tests7/tdf152964.py
+++ /dev/null
@@ -1,50 +0,0 @@
-# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
-#
-# This file is part of the LibreOffice project.
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-#
-from uitest.framework import UITestCase
-from uitest.uihelper.common import get_state_as_dict
-from libreoffice.uno.propertyvalue import mkPropertyValues
-from uitest.uihelper.common import select_pos
-
-# Bug 152964 - Undo of tracked deletion of an empty table row crashed Writer
-
-
-class tdf152964(UITestCase):
-def test_tdf152964(self):
-with self.ui_test.create_doc_in_start_center("writer"):
-
-# redlining should be on
-self.xUITest.executeCommand(".uno:TrackChanges")
-# hide changes
-self.xUITest.executeCommand(".uno:ShowTrackedChanges")
-
-# insert a table
-xWriterDoc = self.xUITest.getTopFocusWindow()
-xWriterEdit = xWriterDoc.getChild("writer_edit")
-xWriterEdit.executeAction("TYPE", mkPropertyValues({"KEYCODE": 
"RETURN"}))
-with 
self.ui_test.execute_dialog_through_command(".uno:InsertTable") as xDialog:
-formatlbinstable = xDialog.getChild("formatlbinstable")
-entry = formatlbinstable.getChild("1")
-entry.exe

[Libreoffice-commits] core.git: Branch 'libreoffice-7-4' - sc/source

2023-02-13 Thread Xisco Fauli (via logerrit)
 sc/source/filter/rtf/eeimpars.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit d246ade4ac56cc675de56fa92e7a6bb3b7e6b431
Author: Xisco Fauli 
AuthorDate: Fri Feb 10 10:50:24 2023 +0100
Commit: Xisco Fauli 
CommitDate: Mon Feb 13 14:31:23 2023 +

sc: avoid divide by zero in ScEEImport::GraphicSize

See 
https://crashreport.libreoffice.org/stats/signature/ScEEImport::GraphicSize(short,long,ScEEParseEntry%20*)

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

diff --git a/sc/source/filter/rtf/eeimpars.cxx 
b/sc/source/filter/rtf/eeimpars.cxx
index e3cdd25adee9..8d768efa5f9f 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -528,7 +528,13 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, 
ScEEParseEntry* pE )
 }
 // Distribute line height difference between all affected lines
 SCROW nRowSpan = pE->nRowOverlap;
+
+assert(nRowSpan != 0);
+if ( nRowSpan == 0 )
+return bHasGraphics;
+
 nHeight /= nRowSpan;
+
 if ( nHeight == 0 )
 nHeight = 1; // For definite comparison
 for ( SCROW nR = nRow; nR < nRow + nRowSpan; nR++ )


package / tmp file usage ...

2023-02-13 Thread Michael Meeks

Hi Attila & Noel,

Just moving this to the public dev list:

On 13/02/2023 07:43, Attila Szűcs wrote:

     I plan to make test for zip64 ...
     I plan to check if i could avoid temporal files creations during 
export/import.. to mke a unit test that have 4gb sized files, but not 
write 4gb to SSD in every test run.


	Noel might be interested in this. Noel, Attila suggests that every zip 
file we write we have to stream the full un-compressed data to /tmp 
files before compressing it. And these can be huge =)


	That is (I guess) necessary if we want to be able to seek backwards and 
edit eg. Excel binary streams or whatever - but for the vast majority of 
our one-pass, hyper-verbose XML generation it seems very silly - 
everything would be better if we could deflate compress that in another 
thread as we go I think ;-) perhaps then backed by a file but much 
smaller than the 4Gb+ of rather verbose ODS/ODF for a large spreadsheet 
that we need 64bit un-compressed stream sizes for.


	Noel - I wondered if you'd looked at this around saving performance - 
COOL at least does a lot more saving than loading - re: autosave =) I 
forget what we did in the past here.


	I imagine we could ask for a non-seekable zip stream somehow from the 
package code just for this case (?)


Just a thought,

Michael.

--
michael.me...@collabora.com <><, GM Collabora Productivity
Hangout: mejme...@gmail.com, Skype: mmeeks
(M) +44 7795 666 147 - timezone usually UK / Europe


[Libreoffice-commits] core.git: sw/CppunitTest_sw_core_layout_flycnt.mk sw/inc sw/Module_sw.mk sw/qa sw/source

2023-02-13 Thread Miklos Vajna (via logerrit)
 sw/CppunitTest_sw_core_layout_flycnt.mk |   82 +++
 sw/Module_sw.mk |1 
 sw/inc/formatflysplit.hxx   |4 +
 sw/qa/core/layout/data/floattable.docx  |binary
 sw/qa/core/layout/flycnt.cxx|   83 
 sw/source/core/attr/formatflysplit.cxx  |   18 ++
 sw/source/core/inc/flyfrms.hxx  |7 +-
 sw/source/core/inc/pagefrm.hxx  |3 -
 sw/source/core/inc/tabfrm.hxx   |4 +
 sw/source/core/layout/flycnt.cxx|   45 +++--
 sw/source/core/text/xmldump.cxx |   30 +++
 11 files changed, 266 insertions(+), 11 deletions(-)

New commits:
commit 995198bfff4ae8abaf2129fe99d9f8ef899a4f25
Author: Miklos Vajna 
AuthorDate: Mon Feb 13 12:55:32 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 13 15:04:12 2023 +

sw floattable: handle table-in-fly in SwFrame::GetNextFlyLeaf()

Trying to lay out a split fly that contains a table resulted in a stack
overflow.

The reason for this was that SwObjectFormatter::FormatObjsAtFrame_() has
a loop that will format all objects of the current fly frame, but we
managed to anchor the follow fly into itself.

Fix the problem by improving SwFrame::GetNextFlyLeaf(), somewhat based
on how SwFrame::GetNextSctLeaf() has special cases for tables. This way
once we split the fly frame, we'll try to move the follow anchor frame
to the next page's body frame, and not to a child of the follow fly
itself.

Also add a first floattable testcase, we can already assert that the
table is split correctly. Do this in a separate suite for now, since the
pool's default SwFormatFlySplit is only created once, so
SwFormatFlySplit::SetForce(false) doesn't have the wanted effect. The
anchor's text is still on both pages, should be on page 2 only.

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

diff --git a/sw/CppunitTest_sw_core_layout_flycnt.mk 
b/sw/CppunitTest_sw_core_layout_flycnt.mk
new file mode 100644
index ..c9668afbc9b8
--- /dev/null
+++ b/sw/CppunitTest_sw_core_layout_flycnt.mk
@@ -0,0 +1,82 @@
+# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
+#*
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+#*
+
+$(eval $(call gb_CppunitTest_CppunitTest,sw_core_layout_flycnt))
+
+$(eval $(call 
gb_CppunitTest_use_common_precompiled_header,sw_core_layout_flycnt))
+
+# TODO merge this with sw_core_layout once SwFormatFlySplit::SetForce() is 
gone.
+$(eval $(call gb_CppunitTest_add_exception_objects,sw_core_layout_flycnt, \
+sw/qa/core/layout/flycnt \
+))
+
+$(eval $(call gb_CppunitTest_use_libraries,sw_core_layout_flycnt, \
+editeng \
+comphelper \
+cppu \
+cppuhelper \
+sal \
+sfx \
+subsequenttest \
+sw \
+   swqahelper \
+test \
+unotest \
+utl \
+vcl \
+svt \
+tl \
+svl \
+svxcore \
+))
+
+$(eval $(call gb_CppunitTest_use_externals,sw_core_layout_flycnt,\
+boost_headers \
+libxml2 \
+))
+
+$(eval $(call gb_CppunitTest_set_include,sw_core_layout_flycnt,\
+-I$(SRCDIR)/sw/inc \
+-I$(SRCDIR)/sw/source/core/inc \
+-I$(SRCDIR)/sw/source/uibase/inc \
+-I$(SRCDIR)/sw/qa/inc \
+$$(INCLUDE) \
+))
+
+$(eval $(call gb_CppunitTest_use_api,sw_core_layout_flycnt,\
+   udkapi \
+   offapi \
+   oovbaapi \
+))
+
+$(eval $(call gb_CppunitTest_use_ure,sw_core_layout_flycnt))
+$(eval $(call gb_CppunitTest_use_vcl,sw_core_layout_flycnt))
+
+$(eval $(call gb_CppunitTest_use_rdb,sw_core_layout_flycnt,services))
+
+$(eval $(call gb_CppunitTest_use_custom_headers,sw_core_layout_flycnt,\
+officecfg/registry \
+))
+
+$(eval $(call gb_CppunitTest_use_configuration,sw_core_layout_flycnt))
+
+$(eval $(call gb_CppunitTest_use_uiconfigs,sw_core_layout_flycnt, \
+modules/swriter \
+svt \
+svx \
+))
+
+# assert if font/glyph fallback occurs
+$(eval $(call 
gb_CppunitTest_set_non_application_font_use,sw_core_layout_flycnt,abort))
+
+$(eval $(call gb_CppunitTest_use_more_fonts,sw_core_layout_flycnt))
+
+# vim: set noet sw=4 ts=4:
diff --git a/sw/Module_sw.mk b/sw/Module_sw.mk
index 2b99d0bff22a..45325bf3ea9a 100644
--- a/sw/Module_sw.mk
+++ b/sw/Module_sw.mk
@@ -138,6 +138,7 @@ $(eval $(call gb_Module_add_slowcheck_targets,sw,\
 CppunitTest_sw_uibase_wrtsh \
 CppunitTest_sw_core_accessibilitycheck \
 CppunitTest_sw_core_layout \
+Cppun

[Libreoffice-commits] core.git: external/cairo

2023-02-13 Thread Stephan Bergmann (via logerrit)
 external/cairo/ExternalPackage_cairo.mk |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 9eaa1325a014ff76acd3290752f842ed6bad89ac
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 15:52:53 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 15:49:21 2023 +

Only package the external/cairo library that is named the same as the SONAME

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

diff --git a/external/cairo/ExternalPackage_cairo.mk 
b/external/cairo/ExternalPackage_cairo.mk
index 74a46688406a..6bd0800d9f21 100644
--- a/external/cairo/ExternalPackage_cairo.mk
+++ b/external/cairo/ExternalPackage_cairo.mk
@@ -12,8 +12,7 @@ $(eval $(call gb_ExternalPackage_ExternalPackage,cairo,cairo))
 $(eval $(call gb_ExternalPackage_use_external_project,cairo,cairo))
 
 ifneq ($(DISABLE_DYNLOADING),TRUE)
-$(eval $(call 
gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo-lo.so.2.1170$(CAIRO_VERSION_MICRO).0,src/.libs/libcairo-lo.so.2.1170$(CAIRO_VERSION_MICRO).0))
-$(eval $(call 
gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo-lo.so.2,src/.libs/libcairo-lo.so.2))
+$(eval $(call 
gb_ExternalPackage_add_file,cairo,$(LIBO_LIB_FOLDER)/libcairo-lo.so.2,src/.libs/libcairo-lo.so.2.1170$(CAIRO_VERSION_MICRO).0))
 endif
 
 # vim: set noet sw=4 ts=4:


[Libreoffice-commits] core.git: vcl/unx

2023-02-13 Thread Stephan Bergmann (via logerrit)
 vcl/unx/gtk3/gtkinst.cxx |9 ++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 47b7e11fd7345fcaaf186706319636c135cdb5e8
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 15:58:09 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 15:54:51 2023 +

Preserve nullptr between gtk_assistant_get/set_page_title

...in case that might make any difference.  Even though
 and
 claim that 
this
must be "a NUL terminated UTF-8 string", it can apparently also be null.  
This
is a follow-up to 6ed7a3cc51e560c6b2a6894f6829c0ac9f991ef2 "tdf#153501 Fix
OString construction from nullptr", and at least the recipe in the comment 
at
 "Crash when
trying to do WollMux mail merge" still works with this change.

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

diff --git a/vcl/unx/gtk3/gtkinst.cxx b/vcl/unx/gtk3/gtkinst.cxx
index f0923cff2ccd..9e224392b37f 100644
--- a/vcl/unx/gtk3/gtkinst.cxx
+++ b/vcl/unx/gtk3/gtkinst.cxx
@@ -10,6 +10,7 @@
 #include 
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -7695,12 +7696,14 @@ public:
 GtkWidget* pPage = gtk_assistant_get_nth_page(m_pAssistant, nOldIndex);
 
 g_object_ref(pPage);
-auto const title = gtk_assistant_get_page_title(m_pAssistant, pPage);
-OString sTitle(title == nullptr ? "" : title);
+std::optional sTitle;
+if (auto const title = gtk_assistant_get_page_title(m_pAssistant, 
pPage)) {
+sTitle = title;
+}
 gtk_assistant_remove_page(m_pAssistant, nOldIndex);
 gtk_assistant_insert_page(m_pAssistant, pPage, nNewIndex);
 gtk_assistant_set_page_type(m_pAssistant, pPage, 
GTK_ASSISTANT_PAGE_CUSTOM);
-gtk_assistant_set_page_title(m_pAssistant, pPage, sTitle.getStr());
+gtk_assistant_set_page_title(m_pAssistant, pPage, sTitle ? 
sTitle->getStr() : nullptr);
 #if !GTK_CHECK_VERSION(4, 0, 0)
 gtk_container_forall(GTK_CONTAINER(m_pSidebar), wrap_sidebar_label, 
nullptr);
 #endif


[Libreoffice-commits] core.git: 2 commits - ucb/source

2023-02-13 Thread Noel Grandin (via logerrit)
 ucb/source/core/ucbstore.cxx |  392 ++-
 ucb/source/core/ucbstore.hxx |   28 +--
 2 files changed, 220 insertions(+), 200 deletions(-)

New commits:
commit bcd2650598dbe7c2c6bcaa693f5ba3880e08c4ad
Author: Noel Grandin 
AuthorDate: Mon Feb 13 09:37:27 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 13 16:07:36 2023 +

osl::Mutex->std::mutex in PropertySetRegistry

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

diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index 08fac6d0f7fe..b1b42730f249 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -240,122 +240,121 @@ css::uno::Sequence< OUString > SAL_CALL 
PropertySetRegistry::getSupportedService
 Reference< XPersistentPropertySet > SAL_CALL
 PropertySetRegistry::openPropertySet( const OUString& key, sal_Bool create )
 {
-if ( !key.isEmpty() )
-{
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+if ( key.isEmpty() )
+return Reference< XPersistentPropertySet >();
 
-PropertySetMap_Impl& rSets = m_aPropSets;
+std::unique_lock aGuard( m_aMutex );
 
-PropertySetMap_Impl::const_iterator it = rSets.find( key );
-if ( it != rSets.end() )
-{
-// Already instantiated.
-return Reference< XPersistentPropertySet >( (*it).second );
-}
-else
-{
-// Create new instance.
-Reference< XNameAccess > xRootNameAccess(
-getRootConfigReadAccess(), UNO_QUERY );
-if ( xRootNameAccess.is() )
-{
-// Propertyset in registry?
-if ( xRootNameAccess->hasByName( key ) )
-{
-// Yep!
-return Reference< XPersistentPropertySet >(
-new PersistentPropertySet(
-*this, key ) );
-}
-else if ( create )
-{
-// No. Create entry for propertyset.
+PropertySetMap_Impl& rSets = m_aPropSets;
 
-Reference< XSingleServiceFactory > xFac(
-getConfigWriteAccess( OUString() ), UNO_QUERY );
-Reference< XChangesBatch >  xBatch( xFac, UNO_QUERY );
-Reference< XNameContainer > xContainer( xFac, UNO_QUERY );
+PropertySetMap_Impl::const_iterator it = rSets.find( key );
+if ( it != rSets.end() )
+// Already instantiated.
+return Reference< XPersistentPropertySet >( (*it).second );
 
-OSL_ENSURE( xFac.is(),
-"PropertySetRegistry::openPropertySet - "
-"No factory!" );
+// Create new instance.
+Reference< XNameAccess > xRootNameAccess(
+getRootConfigReadAccessImpl(aGuard), UNO_QUERY );
+if ( !xRootNameAccess.is() )
+{
+SAL_WARN( "ucb", "no root access" );
+return Reference< XPersistentPropertySet >();
+}
 
-OSL_ENSURE( xBatch.is(),
-"PropertySetRegistry::openPropertySet - "
-"No batch!" );
+// Propertyset in registry?
+if ( xRootNameAccess->hasByName( key ) )
+{
+// Yep!
+return Reference< XPersistentPropertySet >(
+new PersistentPropertySet(
+aGuard, *this, key ) );
+}
+else if ( create )
+{
+// No. Create entry for propertyset.
 
-OSL_ENSURE( xContainer.is(),
-"PropertySetRegistry::openPropertySet - "
-"No container!" );
+Reference< XSingleServiceFactory > xFac(
+getConfigWriteAccessImpl( aGuard, OUString() ), UNO_QUERY );
+Reference< XChangesBatch >  xBatch( xFac, UNO_QUERY );
+Reference< XNameContainer > xContainer( xFac, UNO_QUERY );
 
-if ( xFac.is() && xBatch.is() && xContainer.is() )
-{
-try
-{
-// Create new "Properties" config item.
-Reference< XNameReplace > xNameReplace(
-xFac->createInstance(), UNO_QUERY );
+OSL_ENSURE( xFac.is(),
+"PropertySetRegistry::openPropertySet - "
+"No factory!" );
 
-if ( xNameReplace.is() )
-{
-// Fill new item...
-
-// Insert new item.
-xContainer-

[Libreoffice-commits] core.git: ucb/source

2023-02-13 Thread Noel Grandin (via logerrit)
 ucb/source/cacher/dynamicresultsetwrapper.cxx |6 +++---
 ucb/source/cacher/dynamicresultsetwrapper.hxx |4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 0fdee9f9864f7f119e0503e1d9e1b7ff7250025e
Author: Noel Grandin 
AuthorDate: Mon Feb 13 14:18:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 13 16:07:51 2023 +

osl::Mutex->std::mutex in DynamicResultSetWrapperListener

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

diff --git a/ucb/source/cacher/dynamicresultsetwrapper.cxx 
b/ucb/source/cacher/dynamicresultsetwrapper.cxx
index fb37a5fa6864..cf2b4fd9c3dd 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.cxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.cxx
@@ -459,7 +459,7 @@ css::uno::Any SAL_CALL 
DynamicResultSetWrapperListener::queryInterface( const cs
 //virtual
 void SAL_CALL DynamicResultSetWrapperListener::disposing( const EventObject& 
rEventObject )
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if( m_pOwner )
 m_pOwner->impl_disposing( rEventObject );
@@ -468,7 +468,7 @@ void SAL_CALL DynamicResultSetWrapperListener::disposing( 
const EventObject& rEv
 //virtual
 void SAL_CALL DynamicResultSetWrapperListener::notify( const ListEvent& 
Changes )
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if( m_pOwner )
 m_pOwner->impl_notify( Changes );
@@ -480,7 +480,7 @@ void SAL_CALL DynamicResultSetWrapperListener::notify( 
const ListEvent& Changes
 
 void DynamicResultSetWrapperListener::impl_OwnerDies()
 {
-osl::Guard< osl::Mutex > aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 m_pOwner = nullptr;
 }
diff --git a/ucb/source/cacher/dynamicresultsetwrapper.hxx 
b/ucb/source/cacher/dynamicresultsetwrapper.hxx
index c6a363cff796..66aec8194145 100644
--- a/ucb/source/cacher/dynamicresultsetwrapper.hxx
+++ b/ucb/source/cacher/dynamicresultsetwrapper.hxx
@@ -19,7 +19,7 @@
 
 #pragma once
 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -150,7 +150,7 @@ class DynamicResultSetWrapperListener
 , public css::ucb::XDynamicResultSetListener
 {
 DynamicResultSetWrapper*m_pOwner;
-osl::Mutex  m_aMutex;
+std::mutex  m_aMutex;
 
 public:
 DynamicResultSetWrapperListener( DynamicResultSetWrapper* pOwner );


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - desktop/source

2023-02-13 Thread Aron Budea (via logerrit)
 desktop/source/lib/init.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit f9039649522f7c3640f7f633f6e7f4b8632d4724
Author: Aron Budea 
AuthorDate: Mon Feb 13 14:59:04 2023 +0100
Commit: Aron Budea 
CommitDate: Mon Feb 13 16:24:25 2023 +

Fix build [-Werror=unused-parameter]

desktop/source/lib/init.cxx:5430:51: error: unused parameter ‘pThis’ 
[-Werror=unused-parameter]
 5430 | static char* getLanguages(LibreOfficeKitDocument* pThis, const 
char* pCommand)
  |   ^

After 7fb089be113f3f95d9a13e3aafafc64107301d1d.

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

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 8c3e82ff0896..ab8bc71d4780 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5427,7 +5427,7 @@ static void addLocale(boost::property_tree::ptree& 
rValues, css::lang::Locale co
 rValues.push_back(std::make_pair("", aChild));
 }
 
-static char* getLanguages(LibreOfficeKitDocument* pThis, const char* pCommand)
+static char* getLanguages(const char* pCommand)
 {
 css::uno::Sequence< css::lang::Locale > aLocales;
 css::uno::Sequence< css::lang::Locale > aGrammarLocales;
@@ -5798,7 +5798,7 @@ static char* doc_getCommandValues(LibreOfficeKitDocument* 
pThis, const char* pCo
 
 if (!strcmp(pCommand, ".uno:LanguageStatus"))
 {
-return getLanguages(pThis, pCommand);
+return getLanguages(pCommand);
 }
 else if (!strcmp(pCommand, ".uno:CharFontName"))
 {


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - distro-configs/CPAndroidBranding.conf distro-configs/CPiOSBranding.conf distro-configs/CPiOS.conf distro-configs/CPLinux.conf distr

2023-02-13 Thread Andras Timar (via logerrit)
 distro-configs/CPAndroidBranding.conf |2 -
 distro-configs/CPLinux-LOKit.conf |2 -
 distro-configs/CPLinux.conf   |2 -
 distro-configs/CPOSX.conf |2 -
 distro-configs/CPWin32-MPL.conf   |2 -
 distro-configs/CPWin32.conf   |2 -
 distro-configs/CPWin64.conf   |2 -
 distro-configs/CPiOS.conf |4 +++
 distro-configs/CPiOSBranding.conf |   36 ++
 9 files changed, 47 insertions(+), 7 deletions(-)

New commits:
commit ddf859feb971a4296f6b6befee9b4d7c62d7a336
Author: Andras Timar 
AuthorDate: Mon Feb 13 17:37:30 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Feb 13 17:37:42 2023 +0100

[cp] revamped list of supported languages

Change-Id: Id50d8cf3862bd0a42168cd8b2cad65e168086b86

diff --git a/distro-configs/CPAndroidBranding.conf 
b/distro-configs/CPAndroidBranding.conf
index 617ddb98fa9c..9f080db63aa3 100644
--- a/distro-configs/CPAndroidBranding.conf
+++ b/distro-configs/CPAndroidBranding.conf
@@ -7,7 +7,7 @@
 --with-vendor=Collabora
 --disable-scripting-beanshell
 --disable-scripting-javascript
---with-lang=ar cs da de el en-US es fr he hu is it ja ko nb nl nn pl pt pt-BR 
ru sk sl sv tr zh-CN zh-TW
+--with-lang=ar bg ca cs da de el en-US en-GB eo es eu fi fr gl he hr hu id is 
it ja ko lo nb nl oc pl pt pt-BR sq ru sk sl sv tr uk vi zh-CN zh-TW
 --with-myspell-dicts
 --enable-pdfimport
 --enable-release-build
diff --git a/distro-configs/CPLinux-LOKit.conf 
b/distro-configs/CPLinux-LOKit.conf
index 1385c073860e..792ad362d715 100644
--- a/distro-configs/CPLinux-LOKit.conf
+++ b/distro-configs/CPLinux-LOKit.conf
@@ -56,7 +56,7 @@
 --enable-mergelibs
 --with-package-format=deb rpm
 --enable-release-build
---with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
+--with-lang=ar bg ca cs da de el en-US en-GB eo es eu fi fr gl he hr hu id is 
it ja ko lo nb nl oc pl pt pt-BR sq ru sk sl sv tr uk vi zh-CN zh-TW
 --disable-lotuswordpro
 --disable-lpsolve
 --enable-symbols
diff --git a/distro-configs/CPLinux.conf b/distro-configs/CPLinux.conf
index 81de7f1a9bfb..25ec8dc87f68 100644
--- a/distro-configs/CPLinux.conf
+++ b/distro-configs/CPLinux.conf
@@ -42,6 +42,6 @@
 --enable-lto
 --with-package-format=deb rpm
 --enable-release-build
---with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
+--with-lang=ar ast bg br ca ca-valencia cy cs da de el en-US en-GB eo es et eu 
fi fr ga gd gl he hr hu id is it ja ko lo lt lv nb nl nn oc pl pt pt-BR sq ro 
ru sk sl sr sv tr uk vi zh-CN zh-TW
 --enable-symbols
 --disable-skia
diff --git a/distro-configs/CPOSX.conf b/distro-configs/CPOSX.conf
index fcd0c5d10180..9ea9c80315c1 100644
--- a/distro-configs/CPOSX.conf
+++ b/distro-configs/CPOSX.conf
@@ -16,4 +16,4 @@
 --without-system-postgresql
 --with-package-format=dmg
 --with-macosx-bundle-identifier=com.collaboraoffice
---with-lang=bg br ca ca-valencia cy cs da de el en-US en-GB es et eu fi fr ga 
gd gl hr hu id is it ja km lt lv nb nl nn pl pt pt-BR ro ru sk sl sv ta tr uk 
zh-CN zh-TW
+--with-lang=ar ast bg br ca ca-valencia cy cs da de el en-US en-GB eo es et eu 
fi fr ga gd gl he hr hu id is it ja ko lo lt lv nb nl nn oc pl pt pt-BR sq ro 
ru sk sl sr sv tr uk vi zh-CN zh-TW
diff --git a/distro-configs/CPWin32-MPL.conf b/distro-configs/CPWin32-MPL.conf
index 88fee8eafebb..055ce2154445 100644
--- a/distro-configs/CPWin32-MPL.conf
+++ b/distro-configs/CPWin32-MPL.conf
@@ -21,7 +21,7 @@
 --enable-release-build
 --with-package-format=msi
 --enable-mergelibs
---with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
+--with-lang=ar ast bg br ca ca-valencia cy cs da de el en-US en-GB eo es et eu 
fi fr ga gd gl he hr hu id is it ja ko lo lt lv nb nl nn oc pl pt pt-BR sq ro 
ru sk sl sr sv tr uk vi zh-CN zh-TW
 --enable-windows-build-signing
 --without-java
 --disable-pdfimport
diff --git a/distro-configs/CPWin32.conf b/distro-configs/CPWin32.conf
index 1f8c4488426e..f14ef8458e12 100644
--- a/distro-configs/CPWin32.conf
+++ b/distro-configs/CPWin32.conf
@@ -19,7 +19,7 @@
 --with-package-format=msi
 --enable-mergelibs
 --enable-lto
---with-lang=ar as ast bg bn-IN br ca ca-valencia cy cs da de el en-US en-GB es 
et eu fi fr ga gd gl gu he hi hr hu id is it ja km kn ko lt lv ml mr nb nl nn 
oc or pa-IN pl pt pt-BR ro ru sk sl sr sr-Latn sv ta te tr uk vi zh-CN zh-TW
+--with-lang=ar ast bg br ca ca-valencia cy cs da de el en-US en-GB eo es et eu 
fi fr ga gd gl he hr 

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/source

2023-02-13 Thread Miklos Vajna (via logerrit)
 sw/source/uibase/uiview/view.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit 25fb91ec9a4908fad631c890fe780b273f89a71e
Author: Miklos Vajna 
AuthorDate: Wed Feb 8 09:04:14 2023 +0100
Commit: Miklos Vajna 
CommitDate: Mon Feb 13 16:53:58 2023 +

sw: fix crash in SwView::AttrChangedNotify()

Crashreport signature:

program/../program/libswlo.so
SwView::AttrChangedNotify(LinkParamNone*)
sw/source/uibase/uiview/view.cxx:507
program/../program/libswlo.so
SwWrtShell::DrawSelChanged()
sw/source/uibase/wrtsh/wrtsh3.cxx:261
program/../program/libswlo.so
SwDrawView::MarkListHasChanged()
sw/source/core/draw/dview.cxx:767
program/libmergedlo.so
SdrMarkView::MarkObj(SdrObject*, SdrPageView*, bool, bool, 
std::vector >&&)
svx/source/svdraw/svdmrkv.cxx:2196
program/../program/libswlo.so
SwDrawContact::DisconnectFromLayout(bool)

/opt/rh/devtoolset-10/root/usr/include/c++/10/bits/stl_vector.h:336

This seems to happen when the SwDrawContent delete is in progress, so
we no longer have the shells at hand that are usually present.

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

diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index 675becb47e61..9b69515637d6 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -503,6 +503,11 @@ IMPL_LINK_NOARG(SwView, AttrChangedNotify, LinkParamNone*, 
void)
 if ( GetEditWin().IsChainMode() )
 GetEditWin().SetChainMode( false );
 
+if (!m_pWrtShell || !GetDocShell())
+{
+return;
+}
+
 //Opt: Not if PaintLocked. During unlock a notify will be once more 
triggered.
 if( !m_pWrtShell->IsPaintLocked() && !g_bNoInterrupt &&
 GetDocShell()->IsReadOnly() )


[Libreoffice-commits] core.git: sw/uiconfig

2023-02-13 Thread Seth Chaiklin (via logerrit)
 sw/uiconfig/swriter/ui/indexentry.ui |   10 +-
 1 file changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 39a956dcf5c40c95a97768346046366c93abc60f
Author: Seth Chaiklin 
AuthorDate: Mon Feb 13 13:18:48 2023 +
Commit: Seth Chaiklin 
CommitDate: Mon Feb 13 16:57:49 2023 +

tdf#153499 Add missing colons to labels with buddy controls

Change-Id: I1260503e12516b3b29d34a317ca3a58cc314b608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146920
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/sw/uiconfig/swriter/ui/indexentry.ui 
b/sw/uiconfig/swriter/ui/indexentry.ui
index 2dcb7f48db20..ad2a0f74d091 100644
--- a/sw/uiconfig/swriter/ui/indexentry.ui
+++ b/sw/uiconfig/swriter/ui/indexentry.ui
@@ -167,7 +167,7 @@
 True
 False
 6
-Index
+Index:
 True
 typecb
 0
@@ -212,7 +212,7 @@
 True
 False
 6
-Entry
+Entry:
 True
 entryed
 0
@@ -228,7 +228,7 @@
 False
 False
 6
-1st key
+1st key:
 True
 key1cb
 0
@@ -244,7 +244,7 @@
 False
 False
 6
-2nd key
+2nd key:
 True
 key2cb
 0
@@ -259,7 +259,7 @@
 True
 False
 6
-Level
+Level:
 True
 levelnf
 0


[Libreoffice-commits] core.git: comphelper/source include/comphelper sfx2/source ucbhelper/source

2023-02-13 Thread Noel Grandin (via logerrit)
 comphelper/source/property/genericpropertyset.cxx |2 +-
 include/comphelper/multiinterfacecontainer4.hxx   |   18 ++
 sfx2/source/control/unoctitm.cxx  |2 +-
 ucbhelper/source/provider/resultset.cxx   |4 ++--
 4 files changed, 14 insertions(+), 12 deletions(-)

New commits:
commit 0fbaff8f022a5d1a09a22dbfc6395c458bfc5bfd
Author: Noel Grandin 
AuthorDate: Mon Feb 13 18:07:00 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 13 17:01:04 2023 +

enforce proper locking when calling OInterfaceContainerHelper4

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

diff --git a/comphelper/source/property/genericpropertyset.cxx 
b/comphelper/source/property/genericpropertyset.cxx
index b459de64cc6e..a618d1f7c0e4 100644
--- a/comphelper/source/property/genericpropertyset.cxx
+++ b/comphelper/source/property/genericpropertyset.cxx
@@ -142,7 +142,7 @@ void GenericPropertySet::_setPropertyValues( const 
PropertyMapEntry** ppEntries,
 
 while( *ppEntries )
 {
-OInterfaceContainerHelper4 * pHelper = 
m_aListener.getContainer((*ppEntries)->maName);
+OInterfaceContainerHelper4 * pHelper = 
m_aListener.getContainer(aGuard, (*ppEntries)->maName);
 
 maAnyMap[ (*ppEntries)->maName ] = *pValues;
 
diff --git a/include/comphelper/multiinterfacecontainer4.hxx 
b/include/comphelper/multiinterfacecontainer4.hxx
index eeccd20920ca..1241951f5505 100644
--- a/include/comphelper/multiinterfacecontainer4.hxx
+++ b/include/comphelper/multiinterfacecontainer4.hxx
@@ -54,11 +54,11 @@ public:
 aInterfaceTypes.push_back(rPair.first);
 return aInterfaceTypes;
 }
-inline bool hasContainedTypes() const
+inline bool hasContainedTypes(std::unique_lock& rGuard) const
 {
 for (const auto& rPair : m_aMap)
 // are interfaces added to this container?
-if (rPair.second->getLength())
+if (rPair.second->getLength(rGuard))
 return true;
 return false;
 }
@@ -68,9 +68,10 @@ public:
   @return the container created under this key. If the container
  was not created, null was returned.
  */
-inline OInterfaceContainerHelper4* getContainer(const key& rKey) 
const
+inline OInterfaceContainerHelper4* 
getContainer(std::unique_lock& rGuard,
+  const key& rKey) 
const
 {
-auto iter = find(rKey);
+auto iter = find(rGuard, rKey);
 if (iter != m_aMap.end())
 return (*iter).second.get();
 return nullptr;
@@ -94,7 +95,7 @@ public:
 inline sal_Int32 addInterface(::std::unique_lock<::std::mutex>& rGuard, 
const key& rKey,
   const css::uno::Reference& 
rListener)
 {
-auto iter = find(rKey);
+auto iter = find(rGuard, rKey);
 if (iter == m_aMap.end())
 {
 auto pLC = new OInterfaceContainerHelper4();
@@ -117,7 +118,7 @@ public:
  const css::uno::Reference& 
rListener)
 {
 // search container with id nUik
-auto iter = find(rKey);
+auto iter = find(rGuard, rKey);
 // container found?
 if (iter != m_aMap.end())
 return (*iter).second->removeInterface(rGuard, rListener);
@@ -158,7 +159,7 @@ public:
 /**
   Remove all elements of all containers. Does not delete the container.
  */
-inline void clear()
+inline void clear(std::unique_lock& /*rGuard*/)
 {
 for (const auto& rPair : m_aMap)
 rPair.second->clear();
@@ -169,7 +170,8 @@ private:
 typedef ::std::vector>>>
 InterfaceMap;
 InterfaceMap m_aMap;
-typename InterfaceMap::const_iterator find(const key& rKey) const
+typename InterfaceMap::const_iterator find(std::unique_lock& 
/*rGuard*/,
+   const key& rKey) const
 {
 auto iter = m_aMap.begin();
 auto end = m_aMap.end();
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index bcee2360e268..50b238d7a5d3 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -123,7 +123,7 @@ void SfxStatusDispatcher::ReleaseAll()
 void SfxStatusDispatcher::sendStatusChanged(const OUString& rURL, const 
css::frame::FeatureStateEvent& rEvent)
 {
 std::unique_lock aGuard(maMutex);
-::comphelper::OInterfaceContainerHelper4* 
pContnr = maListeners.getContainer(rURL);
+::comphelper::OInterfaceContainerHelper4* 
pContnr = maListeners.getContainer(aGuard, rURL);
 if (!pContnr)
 return;
 pContnr->forEach(aGuard,
diff --git a/ucbhelper/source/provider/resultset.cxx 
b/ucbhelper/source/provider/resultset.cxx
index 6318f5082d20..1615c72ade3

[Libreoffice-commits] core.git: external/fontconfig

2023-02-13 Thread Caolán McNamara (via logerrit)
 external/fontconfig/ExternalPackage_fontconfig.mk |2 ++
 external/fontconfig/ExternalProject_fontconfig.mk |   13 -
 2 files changed, 10 insertions(+), 5 deletions(-)

New commits:
commit 0d2ef5bd553942b1307a0a69462ae980368b2076
Author: Caolán McNamara 
AuthorDate: Mon Feb 13 10:59:26 2023 +
Commit: Caolán McNamara 
CommitDate: Mon Feb 13 17:12:43 2023 +

ofz#55872 fix oss-fuzz build wrt fontconfig not getting built static

change from static to dynamic was hidden away in commit:

commit d552b4a549d614a03aa9328e017dec27bd3ff41e
Date:   Tue Sep 20 16:07:14 2022 +0300

Enable opening of downloaded fonts only in ForKit in Online

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

diff --git a/external/fontconfig/ExternalPackage_fontconfig.mk 
b/external/fontconfig/ExternalPackage_fontconfig.mk
index 7114f80d9507..b09931f5e807 100644
--- a/external/fontconfig/ExternalPackage_fontconfig.mk
+++ b/external/fontconfig/ExternalPackage_fontconfig.mk
@@ -11,6 +11,8 @@ $(eval $(call 
gb_ExternalPackage_ExternalPackage,fontconfig,fontconfig))
 
 $(eval $(call gb_ExternalPackage_use_external_project,fontconfig,fontconfig))
 
+ifeq ($(DISABLE_DYNLOADING),)
 $(eval $(call 
gb_ExternalPackage_add_file,fontconfig,$(LIBO_LIB_FOLDER)/libfontconfig-lo.so.1.12.0,src/.libs/libfontconfig-lo.so.1.12.0))
+endif
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/fontconfig/ExternalProject_fontconfig.mk 
b/external/fontconfig/ExternalProject_fontconfig.mk
index 3bbecf1d672a..efa812250db8 100644
--- a/external/fontconfig/ExternalProject_fontconfig.mk
+++ b/external/fontconfig/ExternalProject_fontconfig.mk
@@ -48,11 +48,14 @@ $(call 
gb_ExternalProject_get_state_target,fontconfig,build) :
--enable-libxml2 \
ac_cv_func_fstatfs=no ac_cv_func_fstatvfs=no \
) \
-   $(if $(filter LINUX,$(OS)), \
-   --disable-static \
-   --prefix=/ \
-   --with-add-fonts=$(fontconfig_add_fonts) \
-   --with-cache-dir=/usr/lib/fontconfig/cache \
+   $(if $(filter FUZZERS,$(BUILD_TYPE)), \
+   --disable-shared, \
+   $(if $(filter LINUX,$(OS)), \
+   --disable-static \
+   --prefix=/ \
+   
--with-add-fonts=$(fontconfig_add_fonts) \
+   
--with-cache-dir=/usr/lib/fontconfig/cache \
+   ) \
) \
&& $(MAKE) -C src && $(MAKE) fonts.conf \
)


[Libreoffice-commits] core.git: 2 commits - bin/check-elf-dynamic-objects filter/source

2023-02-13 Thread Stephan Bergmann (via logerrit)
 bin/check-elf-dynamic-objects   |6 ++
 filter/source/xsltfilter/XSLTFilter.cxx |   12 +---
 2 files changed, 7 insertions(+), 11 deletions(-)

New commits:
commit 304ebfad5193c857e4edf18cb05d61b6ccc1f7d0
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 16:59:14 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 17:40:42 2023 +

XSLT2Transformer::create should always succeed

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

diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index f08933276055..dd4b8551fce0 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -236,17 +236,7 @@ namespace XSLT
 // service name there)
 if (rTransformer.toBoolean() || rTransformer.startsWith("com.sun."))
 {
-try
-{
-xTransformer = xslt::XSLT2Transformer::create(m_xContext, 
rArgs);
-}
-catch (const Exception&)
-{
-// TODO: put a dialog telling about the need to install
-// xslt2-transformer extension here
-SAL_WARN("filter.xslt", "could not create XSLT 2.0 
transformer");
-throw;
-}
+xTransformer = xslt::XSLT2Transformer::create(m_xContext, rArgs);
 }
 
 // instantiation of XSLT 2.0 transformer service failed, or the
commit 6b2e8bb614ee4cc755766c8b7590df0c10f89a27
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 16:07:18 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 17:40:31 2023 +

Fix CustomTarget_postprocess/check_dynamic_objects for --enable-qt6

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

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 133f58d34dda..3cb4d564a7ae 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -98,6 +98,7 @@ gstreamerallowlist="libgsttag-1.0.so.0 libgstaudio-1.0.so.0 
libgstpbutils-1.0.so
 gtk3allowlist="libgtk-3.so.0 libgdk-3.so.0 libcairo-gobject.so.2 
libpangocairo-1.0.so.0 libfribidi.so.0 libatk-1.0.so.0 libcairo.so.2 
libpangoft2-1.0.so.0 libpango-1.0.so.0 libfontconfig.so.1 libfreetype.so.6 
libgdk_pixbuf-2.0.so.0 libharfbuzz.so.0 ${gioallowlist}"
 gtk4allowlist="libgtk-4.so.1 libcairo-gobject.so.2 libpangocairo-1.0.so.0 
libatk-1.0.so.0 libcairo.so.2 libpango-1.0.so.0 libgdk_pixbuf-2.0.so.0 
libharfbuzz.so.0 libgraphene-1.0.so.0 ${gioallowlist}"
 qt5allowlist="libQt5Core.so.5 libQt5Gui.so.5 libQt5Network.so.5 
libQt5Widgets.so.5 libQt5X11Extras.so.5 libcairo.so.2 libxcb.so.1 
libxcb-icccm.so.4 ${gobjectallowlist}"
+qt6allowlist="libQt6Core.so.6 libQt6Gui.so.6 libQt6Network.so.6 
libQt6Widgets.so.6 libxcb.so.1"
 kf5allowlist="libKF5ConfigCore.so.5 libKF5CoreAddons.so.5 libKF5I18n.so.5 
libKF5KIOCore.so.5 libKF5KIOFileWidgets.so.5 libKF5KIOWidgets.so.5 
libKF5WindowSystem.so.5"
 avahiallowlist="libavahi-common.so.3 libavahi-client.so.3 ${gdbusallowlist}"
 kerberosallowlist="libgssapi_krb5.so.2 libcom_err.so.2 libkrb5.so.3"
@@ -148,6 +149,11 @@ local file="$1"
 allowlist="${allowlist} ${qt5allowlist}"
 fi
 ;;
+*/libvclplug_qt6lo.so)
+if [ "$ENABLE_QT6" = TRUE ]; then
+allowlist="${allowlist} ${qt6allowlist}"
+fi
+;;
 */libvclplug_gtk3_kde5lo.so)
 if [ "$ENABLE_GTK3_KDE5" = TRUE ]; then
 allowlist="${allowlist} ${x11allowlist} ${gtk3allowlist} 
${qt5allowlist} ${kf5allowlist}"


[Libreoffice-commits] core.git: 2 commits - bin/check-elf-dynamic-objects filter/source

2023-02-13 Thread Stephan Bergmann (via logerrit)
 bin/check-elf-dynamic-objects   |2 +-
 filter/source/xsltfilter/XSLTFilter.cxx |7 +--
 2 files changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 63a320d9b42ae6729b144b4d1be376d1efe9e3c7
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 16:51:18 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 17:41:06 2023 +

Adapt to renamed libcairo-lo.so.2

...following up on d552b4a549d614a03aa9328e017dec27bd3ff41e "Enable opening 
of
downloaded fonts only in ForKit in Online" and
9eaa1325a014ff76acd3290752f842ed6bad89ac "Only package the external/cairo
library that is named the same as the SONAME"

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

diff --git a/bin/check-elf-dynamic-objects b/bin/check-elf-dynamic-objects
index 3cb4d564a7ae..415dea8f46ee 100755
--- a/bin/check-elf-dynamic-objects
+++ b/bin/check-elf-dynamic-objects
@@ -118,7 +118,7 @@ local file="$1"
 */_uuid.cpython-*.so)
 allowlist="${allowlist} libuuid.so.1"
 ;;
-*/libcairo.so.2)
+*/libcairo-lo.so.2)
 allowlist="${allowlist} ${x11allowlist} libxcb-shm.so.0 
libxcb.so.1 libxcb-render.so.0"
 ;;
 */libcairocanvaslo.so)
commit 8589cfab808935fbcade39866145074bdfeaae81
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 16:07:50 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 17:40:55 2023 +

Assume that only vnd.sun.star.expand URLs shall be macro-expanded here

...even though XSLTFilter::expandUrl did that unconditionally ever since the
function's introduction in 3218e6592694da70760c1a42b7c562c6864799b2
"INTEGRATION: CWS xsltfilter09".

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

diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index dd4b8551fce0..8fe3d767bd4b 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -212,11 +212,14 @@ namespace XSLT
 {
 OUString sPreparedURL(sUrl);
 if 
(sPreparedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", &sPreparedURL))
+{
 sPreparedURL = rtl::Uri::decode(sPreparedURL, 
rtl_UriDecodeWithCharset,
 RTL_TEXTENCODING_UTF8);
-css::uno::Reference
+css::uno::Reference
 xMacroExpander = theMacroExpander::get(m_xContext);
-return xMacroExpander->expandMacros(sPreparedURL);
+sPreparedURL = xMacroExpander->expandMacros(sPreparedURL);
+}
+return sPreparedURL;
 }
 catch (const Exception&)
 {


[Libreoffice-commits] core.git: ucb/source

2023-02-13 Thread Stephan Bergmann (via logerrit)
 ucb/source/core/ucbstore.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bc65001a161f898809248eb899c36341ad2d550b
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 19:52:14 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Feb 13 19:00:13 2023 +

Fix the build

...after 756185b5795c95180d32d02abfbd65951779b40e "osl::Mutex->std::mutex in
PersistentPropertySet" caused

> ucb/source/core/ucbstore.cxx:1913:75: error: too few arguments to 
function call, expected 2, have 1
> m_pPropertyChangeListeners->getContainer( rEvent.PropertyName 
);
>   
^
> include/comphelper/multiinterfacecontainer4.hxx:71:50: note: 
'getContainer' declared here
> inline OInterfaceContainerHelper4* 
getContainer(std::unique_lock& rGuard,
>  ^
> ucb/source/core/ucbstore.cxx:1921:66: error: too few arguments to 
function call, expected 2, have 1
> m_pPropertyChangeListeners->getContainer( OUString() );
>  ^
> include/comphelper/multiinterfacecontainer4.hxx:71:50: note: 
'getContainer' declared here
> inline OInterfaceContainerHelper4* 
getContainer(std::unique_lock& rGuard,
 ^

Change-Id: Ie13c7bf17d066607ec7095b3e45ab7d6ecea1cb6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146940
Tested-by: Stephan Bergmann 
Reviewed-by: Stephan Bergmann 

diff --git a/ucb/source/core/ucbstore.cxx b/ucb/source/core/ucbstore.cxx
index b1b42730f249..191605dd1f7f 100644
--- a/ucb/source/core/ucbstore.cxx
+++ b/ucb/source/core/ucbstore.cxx
@@ -1910,7 +1910,7 @@ void PersistentPropertySet::notifyPropertyChangeEvent(
 
 // Get "normal" listeners for the property.
 OInterfaceContainerHelper4* pContainer =
-m_pPropertyChangeListeners->getContainer( rEvent.PropertyName );
+m_pPropertyChangeListeners->getContainer( aGuard, 
rEvent.PropertyName );
 if ( pContainer && pContainer->getLength(aGuard) )
 {
 pContainer->notifyEach( aGuard, 
&XPropertyChangeListener::propertyChange, rEvent );
@@ -1918,7 +1918,7 @@ void PersistentPropertySet::notifyPropertyChangeEvent(
 
 // Get "normal" listeners for all properties.
 OInterfaceContainerHelper4* pNoNameContainer =
-m_pPropertyChangeListeners->getContainer( OUString() );
+m_pPropertyChangeListeners->getContainer( aGuard, OUString() );
 if ( pNoNameContainer && pNoNameContainer->getLength(aGuard) )
 {
 pNoNameContainer->notifyEach( aGuard, 
&XPropertyChangeListener::propertyChange, rEvent );


Matti Tyrväinen license statement

2023-02-13 Thread Matti Tyrväinen

All of my past & future contributions to LibreOffice may be
licensed under the MPLv2/LGPLv3+ dual license.


[Libreoffice-commits] core.git: sw/inc

2023-02-13 Thread Seth Chaiklin (via logerrit)
 sw/inc/AccessibilityCheckStrings.hrc |   18 +-
 1 file changed, 9 insertions(+), 9 deletions(-)

New commits:
commit 382e5a506e8c12e5c7af86d2fa018d00064f89d3
Author: Seth Chaiklin 
AuthorDate: Mon Feb 13 00:58:46 2023 +
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Feb 13 19:35:13 2023 +

tdf#152605 (tdf#137968) "heading level" -> "outline level"

  Reformulate error messages for headings whose outline levels
  are not in sequence.

  UX cleanup: Add missing periods to error messages.

Change-Id: I62b8f7af79460b644fae20dd521a160907605b76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146807
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/inc/AccessibilityCheckStrings.hrc 
b/sw/inc/AccessibilityCheckStrings.hrc
index baa61cbcb8ba..089aac470033 100644
--- a/sw/inc/AccessibilityCheckStrings.hrc
+++ b/sw/inc/AccessibilityCheckStrings.hrc
@@ -13,10 +13,10 @@
 
 #define NC_(Context, String) TranslateId(Context, reinterpret_cast(u8##String))
 
-#define STR_NO_ALT  NC_("STR_NO_ALT", "No alt text for 
graphic '%OBJECT_NAME%'")
-#define STR_TABLE_MERGE_SPLIT   NC_("STR_TABLE_MERGE_SPLIT", "Table 
'%OBJECT_NAME%' contains merges or splits")
-#define STR_FAKE_NUMBERING  NC_("STR_FAKE_NUMBERING", "Fake 
numbering '%NUMBERING%'")
-#define STR_HYPERLINK_TEXT_IS_LINK  NC_("STR_HYPERLINK_TEXT_IS_LINK", 
"Hyperlink text is the same as the link address '%LINK%'")
+#define STR_NO_ALT  NC_("STR_NO_ALT", "No alt text for 
graphic “%OBJECT_NAME%”.")
+#define STR_TABLE_MERGE_SPLIT   NC_("STR_TABLE_MERGE_SPLIT", "Table 
“%OBJECT_NAME%” contains merges or splits.")
+#define STR_FAKE_NUMBERING  NC_("STR_FAKE_NUMBERING", "Fake 
numbering “%NUMBERING%”.")
+#define STR_HYPERLINK_TEXT_IS_LINK  NC_("STR_HYPERLINK_TEXT_IS_LINK", 
"Hyperlink text is the same as the link address “%LINK%”.")
 #define STR_HYPERLINK_TEXT_IS_SHORT NC_("STR_HYPERLINK_TEXT_IS_SHORT", 
"Hyperlink text is too short.")
 #define STR_TEXT_CONTRAST   NC_("STR_TEXT_CONTRAST", "Text 
contrast is too low.")
 #define STR_TEXT_BLINKING   NC_("STR_TEXT_BLINKING", "Blinking 
text.")
@@ -28,18 +28,18 @@
 #define STR_AVOID_NEWLINES_SPACENC_("STR_AVOID_NEWLINES_SPACE", "Avoid 
newlines to create space.")
 #define STR_AVOID_SPACES_SPACE  NC_("STR_AVOID_SPACES_SPACE", "Avoid 
spaces to create space.")
 #define STR_AVOID_TABS_FORMATTING   NC_("STR_AVOID_TABS_FORMATTING", 
"Avoid using tabs for formatting.")
-#define STR_HEADINGS_NOT_IN_ORDER   NC_("STR_HEADINGS_NOT_IN_ORDER", 
"Headings not in order.")
+#define STR_HEADINGS_NOT_IN_ORDER   NC_("STR_HEADINGS_NOT_IN_ORDER", 
"Outline levels of headings not in sequential order.")
 #define STR_TEXT_FORMATTING_CONVEYS_MEANING 
NC_("STR_TEXT_FORMATTING_CONVEYS_MEANING", "The text formatting conveys 
additional meaning.")
 #define STR_NON_INTERACTIVE_FORMS   NC_("STR_NON_INTERACTIVE_FORMS", "An 
input form is not interactive.")
 #define STR_FLOATING_TEXT   NC_("STR_FLOATING_TEXT", "Avoid 
floating text.")
 #define STR_HEADING_IN_TABLENC_("STR_HEADING_IN_TABLE", "Tables 
must not contain headings.")
-#define STR_HEADING_ORDER   NC_("STR_HEADING_ORDER", "Keep 
headings' levels ordered. Heading level %LEVEL_CURRENT% must not go after 
%LEVEL_PREV%.")
+#define STR_HEADING_ORDER   NC_("STR_HEADING_ORDER", "A heading 
with outline level %LEVEL_CURRENT% must not follow a heading with outline level 
%LEVEL_PREV%.")
 #define STR_FONTWORKS   NC_("STR_FONTWORKS", "Avoid Fontwork 
objects in your documents. Make sure you use it for samples or other 
meaningless text.")
 #define STR_TABLE_FORMATTINGNC_("STR_TABLE_FORMATTING", "Avoid 
using empty table cells for formatting.")
 
-#define STR_DOCUMENT_DEFAULT_LANGUAGE   NC_("STR_DOCUMENT_DEFAULT_LANGUAGE", 
"Document default language is not set")
-#define STR_STYLE_NO_LANGUAGE   NC_("STR_STYLE_NO_LANGUAGE", "Style 
'%STYLE_NAME%' has no language set")
-#define STR_DOCUMENT_TITLE  NC_("STR_DOCUMENT_TITLE", "Document 
title is not set")
+#define STR_DOCUMENT_DEFAULT_LANGUAGE   NC_("STR_DOCUMENT_DEFAULT_LANGUAGE", 
"Document default language is not set.")
+#define STR_STYLE_NO_LANGUAGE   NC_("STR_STYLE_NO_LANGUAGE", "Style 
“%STYLE_NAME%” has no language set.")
+#define STR_DOCUMENT_TITLE  NC_("STR_DOCUMENT_TITLE", "Document 
title is not set.")
 
 #endif
 


[Libreoffice-commits] core.git: sw/source

2023-02-13 Thread Andrea Gelmini (via logerrit)
 sw/source/core/layout/flycnt.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit af63914153074b127fe3bc7aa90bebe5fbee23d6
Author: Andrea Gelmini 
AuthorDate: Mon Feb 13 16:12:36 2023 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Feb 13 19:40:10 2023 +

Fix typo

Change-Id: I587c742957da0bb40ff858180f27b62549ebadbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146912
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index b18cb6a21cb5..9e8d1a3ec13b 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -1588,7 +1588,7 @@ SwLayoutFrame *SwFrame::GetNextFlyLeaf( MakePageType 
eMakePage )
 if (eMakePage == MAKEPAGE_INSERT)
 {
 InsertPage(FindPageFrame(), false);
-// If we already had a cancidate, continue trying with that 
instead of starting from
+// If we already had a candidate, continue trying with that 
instead of starting from
 // scratch.
 pLayLeaf = pOldLayLeaf ? pOldLayLeaf : GetNextLayoutLeaf();
 continue;


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 4 commits - emfio/qa emfio/source sc/source vcl/win

2023-02-13 Thread Xisco Fauli (via logerrit)
 emfio/qa/cppunit/emf/EmfImportTest.cxx |   45 +++-
 emfio/source/reader/emfreader.cxx  |   25 +--
 emfio/source/reader/mtftools.cxx   |4 +-
 sc/source/filter/oox/stylesbuffer.cxx  |   46 ++--
 sc/source/filter/rtf/eeimpars.cxx  |6 +++
 vcl/win/window/salframe.cxx|   53 +
 6 files changed, 119 insertions(+), 60 deletions(-)

New commits:
commit 46c9c904af3b39b4a19169c9c5a48963f576facc
Author: Xisco Fauli 
AuthorDate: Fri Feb 10 10:50:24 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Feb 13 20:56:00 2023 +0100

sc: avoid divide by zero in ScEEImport::GraphicSize

See 
https://crashreport.libreoffice.org/stats/signature/ScEEImport::GraphicSize(short,long,ScEEParseEntry%20*)

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

diff --git a/sc/source/filter/rtf/eeimpars.cxx 
b/sc/source/filter/rtf/eeimpars.cxx
index b9678e2fdd5f..e9ab9175ab8f 100644
--- a/sc/source/filter/rtf/eeimpars.cxx
+++ b/sc/source/filter/rtf/eeimpars.cxx
@@ -528,7 +528,13 @@ bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, 
ScEEParseEntry* pE )
 }
 // Distribute line height difference between all affected lines
 SCROW nRowSpan = pE->nRowOverlap;
+
+assert(nRowSpan != 0);
+if ( nRowSpan == 0 )
+return bHasGraphics;
+
 nHeight /= nRowSpan;
+
 if ( nHeight == 0 )
 nHeight = 1; // For definite comparison
 for ( SCROW nR = nRow; nR < nRow + nRowSpan; nR++ )
commit d91caaf046912e082b986576801f9a4041cdb7d3
Author: Eike Rathke 
AuthorDate: Mon Feb 6 22:59:44 2023 +0100
Commit: Andras Timar 
CommitDate: Mon Feb 13 20:56:00 2023 +0100

Resolves: tdf#139934 always apply cellXfs xf explicits (tdf#123139 related)

Change-Id: Id1e12ee8677a25a645bfd53b4968a17c9a1eabe5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146599
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 909a25d30b09ebd3a023105a9c3cc4d20add094a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146533
Reviewed-by: Xisco Fauli 

diff --git a/sc/source/filter/oox/stylesbuffer.cxx 
b/sc/source/filter/oox/stylesbuffer.cxx
index 1819257383e1..1dbe7e658269 100644
--- a/sc/source/filter/oox/stylesbuffer.cxx
+++ b/sc/source/filter/oox/stylesbuffer.cxx
@@ -1972,38 +1972,64 @@ void Xf::importXf( const AttributeList& rAttribs, bool 
bCellXf )
 // as xfId attribute is always created during export to .xlsx
 // Not setting "0" value is causing wrong .xlsx import by LibreOffice,
 // for spreadsheets created by external applications (ex. SAP BI).
+bool bApplyDefault;
 if ( maModel.mbCellXf )
 {
-maModel.mnStyleXfId = rAttribs.getInteger( XML_xfId, 0 );
+const sal_Int32 xfId = rAttribs.getInteger( XML_xfId, -1 );
+// No xfId => no cellStyleXfs that could overwrite this on change, thus
+// has to be applied.
+bApplyDefault = (xfId < 0);
+maModel.mnStyleXfId = std::max(0, xfId);
 }
 else
 {
 maModel.mnStyleXfId = rAttribs.getInteger( XML_xfId, -1 );
+bApplyDefault = true;
 }
 maModel.mnFontId = rAttribs.getInteger( XML_fontId, -1 );
 maModel.mnNumFmtId = rAttribs.getInteger( XML_numFmtId, -1 );
 maModel.mnBorderId = rAttribs.getInteger( XML_borderId, -1 );
 maModel.mnFillId = rAttribs.getInteger( XML_fillId, -1 );
 
-
-maModel.mbAlignUsed = maModel.mbCellXf || 
rAttribs.getBool(XML_applyAlignment, true);
-maModel.mbProtUsed = maModel.mbCellXf || 
rAttribs.getBool(XML_applyProtection, true);
-/*  Default value of the apply*** attributes is dependent on context:
-true in cellStyleXfs element, false in cellXfs element... */
-maModel.mbFontUsed   = rAttribs.getBool( XML_applyFont, 
!maModel.mbCellXf );
-maModel.mbNumFmtUsed = rAttribs.getBool( XML_applyNumberFormat, 
!maModel.mbCellXf );
-maModel.mbBorderUsed = rAttribs.getBool( XML_applyBorder,   
!maModel.mbCellXf );
-maModel.mbAreaUsed   = rAttribs.getBool( XML_applyFill, 
!maModel.mbCellXf );
+// Default value of the apply*** attributes is dependent on context:
+// true in cellStyleXfs element, false in cellXfs element...
+// But it's not as easy as it sounds, for docs see
+// 
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/59922f8b-0edc-4e93-a822-9f22254aec46
+// and apparently in reality cellStyleXfs xf and cellXfs xf are not merged
+// at all, see
+// 
https://learn.microsoft.com/en-us/openspecs/office_standards/ms-oe376/bcf98682-e8d3-44b8-b8f8-0bf696878ba1
+// "b. The standard states that both the cell style xf records and cell xf
+// records must be read to understand the full set of formatting applied to
+// a cell."
+  

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - connectivity/source external/hsqldb

2023-02-13 Thread Caolán McNamara (via logerrit)
 connectivity/source/drivers/hsqldb/HDriver.cxx|   31 ++
 external/hsqldb/UnpackedTarball_hsqldb.mk |1 
 external/hsqldb/patches/disable-dump-script.patch |   36 ++
 3 files changed, 68 insertions(+)

New commits:
commit 4cfc31d2be169befdb72b8296bec0815d72d44c6
Author: Caolán McNamara 
AuthorDate: Mon Feb 13 13:56:10 2023 +
Commit: Andras Timar 
CommitDate: Mon Feb 13 21:02:32 2023 +0100

disable script dump

Change-Id: I04d740cc0fcf87daa192a0a6af34138278043a19

diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index 09686ef6dbdf..1d3f13e5718b 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -291,6 +291,37 @@ namespace connectivity
 } // if ( xStream.is() )
 ::comphelper::disposeComponent(xStream);
 }
+
+// disallow any database/script files that contain a 
"SCRIPT[.*]" entry (this is belt and braces
+// in that bundled hsqldb 1.8.0 is patched to also reject 
them)
+//
+// hsqldb 2.6.0 release notes have: added system role 
SCRIPT_OPS for export / import of database structure and data
+// which seems to provide a builtin way to do this with 
contemporary hsqldb
+static const OUStringLiteral sScript(u"script");
+if (!bIsNewDatabase && xStorage->isStreamElement(sScript))
+{
+Reference xStream = 
xStorage->openStreamElement(sScript, ElementModes::READ);
+if (xStream.is())
+{
+std::unique_ptr 
pStream(::utl::UcbStreamHelper::CreateStream(xStream));
+if (pStream)
+{
+OStringBuffer sLine;
+while (pStream->ReadLine(sLine))
+{
+OString sText = 
sLine.makeStringAndClear().trim();
+if 
(sText.startsWithIgnoreAsciiCase("SCRIPT"))
+{
+::connectivity::SharedResources 
aResources;
+sMessage = 
aResources.getResourceString(STR_COULD_NOT_LOAD_FILE).replaceFirst("$filename$",
 sSystemPath);
+break;
+}
+}
+}
+} // if ( xStream.is() )
+::comphelper::disposeComponent(xStream);
+}
+
 }
 catch(Exception&)
 {
diff --git a/external/hsqldb/UnpackedTarball_hsqldb.mk 
b/external/hsqldb/UnpackedTarball_hsqldb.mk
index 389572377fa6..0b05b45ba3c3 100644
--- a/external/hsqldb/UnpackedTarball_hsqldb.mk
+++ b/external/hsqldb/UnpackedTarball_hsqldb.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\
external/hsqldb/patches/hsqldb-runFinalizersOnExit.patch \
external/hsqldb/patches/jdbc-4.1.patch \
external/hsqldb/patches/multipleResultSets.patch \
+   external/hsqldb/patches/disable-dump-script.patch \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/hsqldb/patches/disable-dump-script.patch 
b/external/hsqldb/patches/disable-dump-script.patch
new file mode 100644
index ..13e0213f7e57
--- /dev/null
+++ b/external/hsqldb/patches/disable-dump-script.patch
@@ -0,0 +1,36 @@
+--- a/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java2023-02-13 
11:08:11.297243034 +
 b/hsqldb/src/org/hsqldb/DatabaseCommandInterpreter.java2023-02-13 
13:49:17.973089433 +
+@@ -392,31 +392,19 @@
+  */
+ private Result processScript() throws IOException, HsqlException {
+ 
+-String   token = tokenizer.getString();
+-ScriptWriterText dsw   = null;
++tokenizer.getString();
+ 
+ session.checkAdmin();
+ 
+ try {
+ if (tokenizer.wasValue()) {
+-if (tokenizer.getType() != Types.VARCHAR) {
+-throw Trace.error(Trace.INVALID_IDENTIFIER);
+-}
+-
+-dsw = new ScriptWriterText(database, token, true, true, true);
+-
+-dsw.writeAll();
+-
+-return new Result(ResultConstants.UPDATECOUNT);
++throw Trace.error(Trace.ACCESS_IS_DENIED);
+ } else {
+ tokenizer.back();
+ 
+ return DatabaseScript.getScript(database, false);
+ }
+ } finally {
+-if (dsw != null) {
+-dsw.close();
+-}
+ }
+ }
+ 


[Libreoffice-commits] core.git: 2 commits - ucb/source

2023-02-13 Thread Noel Grandin (via logerrit)
 ucb/source/cacher/cachedcontentresultset.cxx |  486 ++-
 ucb/source/cacher/cachedcontentresultset.hxx |   24 -
 ucb/source/cacher/cachedcontentresultsetstub.cxx |  110 ++---
 ucb/source/cacher/cachedcontentresultsetstub.hxx |   14 
 ucb/source/cacher/cacheddynamicresultset.cxx |4 
 ucb/source/cacher/cacheddynamicresultsetstub.cxx |4 
 ucb/source/cacher/contentresultsetwrapper.cxx|  432 +---
 ucb/source/cacher/contentresultsetwrapper.hxx|   47 +-
 ucb/source/cacher/dynamicresultsetwrapper.cxx|   57 +-
 ucb/source/cacher/dynamicresultsetwrapper.hxx|7 
 10 files changed, 552 insertions(+), 633 deletions(-)

New commits:
commit 155dd761e85600445e95f1f2a844d4456a64
Author: Noel Grandin 
AuthorDate: Mon Feb 13 19:00:27 2023 +0200
Commit: Noel Grandin 
CommitDate: Mon Feb 13 20:05:41 2023 +

osl::Mutex->std::mutex in ContentResultSetWrapper

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

diff --git a/ucb/source/cacher/cachedcontentresultset.cxx 
b/ucb/source/cacher/cachedcontentresultset.cxx
index c169a3734b58..7c1f316d1c65 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -54,14 +54,13 @@ using namespace cppu;
 template T CachedContentResultSet::rowOriginGet(
 T (SAL_CALL css::sdbc::XRow::* f)(sal_Int32), sal_Int32 columnIndex)
 {
-impl_EnsureNotDisposed();
-osl::ResettableMutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
+impl_EnsureNotDisposed(aGuard);
 sal_Int32 nRow = m_nRow;
 sal_Int32 nFetchSize = m_nFetchSize;
 sal_Int32 nFetchDirection = m_nFetchDirection;
 if( !m_aCache.hasRow( nRow ) )
 {
-bool isCleared = false;
 if( !m_aCache.hasCausedException( nRow ) )
 {
 if( !m_xFetchProvider.is() )
@@ -69,23 +68,17 @@ template T CachedContentResultSet::rowOriginGet(
 OSL_FAIL( "broadcaster was disposed already" );
 throw SQLException();
 }
-aGuard.clear();
-isCleared = true;
-if( impl_isForwardOnly() )
-applyPositionToOrigin( nRow );
+if( impl_isForwardOnly(aGuard) )
+applyPositionToOrigin( aGuard, nRow );
 
-impl_fetchData( nRow, nFetchSize, nFetchDirection );
-}
-if (isCleared)
-{
-aGuard.reset();
+impl_fetchData( aGuard, nRow, nFetchSize, nFetchDirection );
 }
 if( !m_aCache.hasRow( nRow ) )
 {
 m_bLastReadWasFromCache = false;
-aGuard.clear();
-applyPositionToOrigin( nRow );
-impl_init_xRowOrigin();
+applyPositionToOrigin( aGuard, nRow );
+impl_init_xRowOrigin(aGuard);
+aGuard.unlock();
 return (m_xRowOrigin.get()->*f)( columnIndex );
 }
 }
@@ -96,7 +89,7 @@ template T CachedContentResultSet::rowOriginGet(
 /* Last chance. Try type converter service... */
 if ( m_bLastCachedReadWasNull && rValue.hasValue() )
 {
-Reference< XTypeConverter > xConverter = getTypeConverter();
+Reference< XTypeConverter > xConverter = getTypeConverter(aGuard);
 if ( xConverter.is() )
 {
 try
@@ -665,9 +658,9 @@ CachedContentResultSet::~CachedContentResultSet()
 
 
 bool CachedContentResultSet
-::applyPositionToOrigin( sal_Int32 nRow )
+::applyPositionToOrigin( std::unique_lock& rGuard, sal_Int32 
nRow )
 {
-impl_EnsureNotDisposed();
+impl_EnsureNotDisposed(rGuard);
 
 /**
 @returns
@@ -675,7 +668,6 @@ bool CachedContentResultSet
 the result set.
 */
 
-osl::ResettableMutexGuard aGuard(m_aMutex);
 OSL_ENSURE( nRow >= 0, "only positive values supported" );
 if( !m_xResultSetOrigin.is() )
 {
@@ -689,7 +681,7 @@ bool CachedContentResultSet
 bool bAfterLast = m_bAfterLast;
 sal_Int32 nForwardOnly = m_nForwardOnly;
 
-aGuard.clear();
+rGuard.unlock();
 
 if( bAfterLastApplied || nLastAppliedPos != nRow )
 {
@@ -706,7 +698,7 @@ bool CachedContentResultSet
 break;
 }
 
-aGuard.reset();
+rGuard.lock();
 m_nLastAppliedPos += nM;
 m_bAfterLastApplied = nRow != m_nLastAppliedPos;
 return nRow == m_nLastAppliedPos;
@@ -716,7 +708,7 @@ bool CachedContentResultSet
 {
 m_xResultSetOrigin->beforeFirst();
 
-aGuard.reset();
+rGuard.lock();
 m_nLastAppliedPos = 0;
 m_bAfterLastApplied = false;
 return false;
@@ -729,7 +721,7 @@ bool CachedContentResultSet
 {
 bool bValid = m_xResultSetOrigin->absolute( nRow );
 
-aGuard.r

[Libreoffice-commits] help.git: source/text

2023-02-13 Thread Adolfo Jayme Barrientos (via logerrit)
 source/text/scalc/01/solver_options.xhp  |2 +-
 source/text/shared/00/0406.xhp   |4 ++--
 source/text/shared/01/packagemanager.xhp |2 +-
 source/text/shared/guide/language_select.xhp |2 +-
 source/text/swriter/guide/smarttags.xhp  |2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit cd49917023bc58662fa1c6be7294f66955f04525
Author: Adolfo Jayme Barrientos 
AuthorDate: Mon Feb 13 16:34:09 2023 -0600
Commit: Adolfo Jayme Barrientos 
CommitDate: Mon Feb 13 22:36:26 2023 +

Rename Extension Manager to Extensions

Follow-up to core commit ef3c81d0fca9c8f80fd0d4e4025c37a114528344

Change-Id: I904f88bd184fb4ea10eb050c21d40041494e2e33
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146952
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/source/text/scalc/01/solver_options.xhp 
b/source/text/scalc/01/solver_options.xhp
index f07a347f10..4898a0250b 100644
--- a/source/text/scalc/01/solver_options.xhp
+++ b/source/text/scalc/01/solver_options.xhp
@@ -44,7 +44,7 @@
 Solver engine
 
 Select a solver engine. The listbox is disabled if only one solver 
engine is installed.
-You can install more solver engines as 
extensions, if available. Open Tools - Extension Manager 
and browse to the Extensions web site to search for extensions.
+You can install more solver engines as 
extensions, if available. Open Tools - Extensions and 
browse to the Extensions web site to search for extensions.
 
 Settings
 Configure the 
current solver. In the Settings box, check all settings that you want to use 
for the current goal seeking operation. If the current option offers different 
values, the Edit button is enabled. Click Edit to open a dialog 
where you can change the value.
diff --git a/source/text/shared/00/0406.xhp 
b/source/text/shared/00/0406.xhp
index 01f8c735c2..f819148e17 100644
--- a/source/text/shared/00/0406.xhp
+++ b/source/text/shared/00/0406.xhp
@@ -97,8 +97,8 @@
 
 Choose Tools - Macros - Organize Macros - 
Basic,click the Organizer button,click the 
Libraries tab,and then click the Password 
button.
 Choose Tools - Macros - Organize Macros - 
Basic,click the Organizer 
button.
-Choose Tools - Extension 
Manager.
-Choose Tools - Extension Manager, click 
Check for Updates button.
+Choose Tools - 
Extensions.
+Choose Tools - Extensions, click 
Check for Updates button.
 Choose Tools - Macros - XML Filter 
Settings.
 Tools - Macros - XML Filter Settings, 
then click New or Edit.
 Tools - Macros - XML Filter Settings, 
then click Test XSLTs.
diff --git a/source/text/shared/01/packagemanager.xhp 
b/source/text/shared/01/packagemanager.xhp
index ac1deba270..190e516770 100644
--- a/source/text/shared/01/packagemanager.xhp
+++ b/source/text/shared/01/packagemanager.xhp
@@ -84,7 +84,7 @@
 On a web page, 
click a hyperlink to an *.oxt file (if your web 
browser can be configured to start the Extension Manager for this file 
type).
 
 
-Choose Tools - Extension Manager and click Add.
+Choose 
Tools - Extensions and click Add.
 
 
 To install a shared extension in text mode (for system 
administrators)
diff --git a/source/text/shared/guide/language_select.xhp 
b/source/text/shared/guide/language_select.xhp
index de98380b0f..2cbafed322 100644
--- a/source/text/shared/guide/language_select.xhp
+++ b/source/text/shared/guide/language_select.xhp
@@ -123,7 +123,7 @@
 In 
the next page, click the Get It icon to download the dictionary 
extension. Note the folder name to which your browser downloads the file. 
Download additional dictionaries as you like.
  
  
-In 
%PRODUCTNAME, choose Tools - Extension Manager and 
click Add to install the downloaded extensions.
+In 
%PRODUCTNAME, choose Tools - Extensions and click 
Add to install the downloaded extensions.
  
  
 After you installed the extensions, you should close 
%PRODUCTNAME (including the Quickstarter), and restart.
diff --git a/source/text/swriter/guide/smarttags.xhp 
b/source/text/swriter/guide/smarttags.xhp
index 26a5b0d502..d44bfb5f53 100644
--- a/source/text/swriter/guide/smarttags.xhp
+++ b/source/text/swriter/guide/smarttags.xhp
@@ -41,7 +41,7 @@
   To 
install a Smart Tag, do one of the following:
   
  
-Save the *.oxt extension file to your harddrive, then 
double-click the *.oxt file in your file manager. Alternatively, in 
%PRODUCTNAME choose Tools - Extension Manager to 
open the Extension Manager, click Add and browse to the file.
+Save the *.oxt-extension file to your hard drive, then 
double-click the *.oxt file in your file manager. Alternatively, in 
%PRODUCTNAME choose Tools - Extensions to open the 
Extensions dialog, click Add and browse to the file.
  
  
 Click a Smart Tag *.oxt file link on a web page and open the 
l

[Libreoffice-commits] core.git: helpcontent2

2023-02-13 Thread Adolfo Jayme Barrientos (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit befcb86946c049c1a430c95f93ab47ba6ffcdf4e
Author: Adolfo Jayme Barrientos 
AuthorDate: Mon Feb 13 16:36:26 2023 -0600
Commit: Gerrit Code Review 
CommitDate: Mon Feb 13 22:36:26 2023 +

Update git submodules

* Update helpcontent2 from branch 'master'
  to cd49917023bc58662fa1c6be7294f66955f04525
  - Rename Extension Manager to Extensions

Follow-up to core commit ef3c81d0fca9c8f80fd0d4e4025c37a114528344

Change-Id: I904f88bd184fb4ea10eb050c21d40041494e2e33
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/146952
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/helpcontent2 b/helpcontent2
index a295ef1fa246..cd49917023bc 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a295ef1fa2462d9a828341e7b947eae05ba14154
+Subproject commit cd49917023bc58662fa1c6be7294f66955f04525


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05-testflight' - desktop/source

2023-02-13 Thread Patrick Luby (via logerrit)
 desktop/source/lib/init.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 0e73a4d0117844792c8fcdfe46000c72b4c70d4e
Author: Patrick Luby 
AuthorDate: Mon Feb 13 23:18:49 2023 +
Commit: Patrick Luby 
CommitDate: Mon Feb 13 23:23:44 2023 +

Revert "Eliminate unused-parameter warning on iOS with Xcode 14.2"

This reverts commit 4b2b7c2183c7f46ac8929c61f4cbff7baeab13e1.

Reason for revert: This change duplicates the following change:

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

Change-Id: I1d5dc2cf30ce6d3b0fd75d603acae0cc9a9ba432
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146974
Reviewed-by: Patrick Luby 
Tested-by: Patrick Luby 

diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index 89205e9d45f3..ec7b82ef086f 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -5540,8 +5540,6 @@ static void doc_resetSelection(LibreOfficeKitDocument* 
pThis)
 
 static char* getLanguages(LibreOfficeKitDocument* pThis, const char* pCommand)
 {
-(void)pThis;
-
 css::uno::Sequence< css::lang::Locale > aLocales;
 
 if (xContext.is())


[Libreoffice-commits] core.git: sw/qa writerfilter/source

2023-02-13 Thread Justin Luth (via logerrit)
 sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx |binary
 sw/qa/extras/ooxmlexport/ooxmlexport18.cxx|9 +
 writerfilter/source/dmapper/DomainMapper.cxx  |6 +++---
 3 files changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 80f9ad23282e0d8c4ba3441797d4899b9555eee3
Author: Justin Luth 
AuthorDate: Mon Feb 13 13:35:47 2023 -0500
Commit: Justin Luth 
CommitDate: Tue Feb 14 02:06:28 2023 +

tdf#153592 writerfilter: don't defer breaks into shapes/comments

When starting a pargraph, we already had a clause to avoid
deferring page and column breaks when we were in a shape
or a comment. These clauses are also necessary
in the other sections of the code where we defer these breaks.

The provided test proves the two shape cases in lcl_utext.
I just took IsInComments along for the ride,
as it certainly would apply in that case as well.

make CppunitTest_sw_ooxmlexport18 
CPPUNIT_TEST_NAME=testTdf153592_columnBreaks

ooxmlexport4's testTdf81345_045Original proves that it is
also needed in lcl_text. However, it is such a complex document
that I wasn't confident that a unit test would be stable enough.

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

diff --git a/sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx 
b/sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx
new file mode 100644
index ..ea6acac29b5b
Binary files /dev/null and 
b/sw/qa/extras/ooxmlexport/data/tdf153592_columnBreaks.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
index 8de09d6d3c7c..8c2aa0c8a845 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport18.cxx
@@ -112,6 +112,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf153042_noTab, 
"tdf153042_noTab.docx")
 assertXPath(pLayout, "//SwFixPortion", "width", "10");
 }
 
+CPPUNIT_TEST_FIXTURE(Test, testTdf153592_columnBreaks)
+{
+loadAndSave("tdf153592_columnBreaks.docx");
+
+xmlDocUniquePtr pXmlDoc = parseExport("word/document.xml");
+// The two column breaks were lost on import. (I wouldn't complain if they 
were at 3,5)
+assertXPath(pXmlDoc, "//w:br", 2);
+}
+
 CPPUNIT_TEST_FIXTURE(Test, testTdf149551_mongolianVert)
 {
 // Given a docx document with a shape with vert="mongolianVert".
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx 
b/writerfilter/source/dmapper/DomainMapper.cxx
index c2e84cf1534a..c6fd96eb7407 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -3739,7 +3739,7 @@ void DomainMapper::lcl_text(const sal_uInt8 * data_, 
size_t len)
 m_pImpl->appendTextPortion("\n", pContext);
 }
 
-if (!m_pImpl->GetFootnoteContext())
+if (!m_pImpl->GetFootnoteContext() && !m_pImpl->IsInShape() && 
!m_pImpl->IsInComments())
 {
 if (m_pImpl->isBreakDeferred(PAGE_BREAK))
 m_pImpl->GetTopContext()->Insert(PROP_BREAK_TYPE, 
uno::Any(style::BreakType_PAGE_BEFORE));
@@ -4061,7 +4061,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 const bool bSingleParagraphAfterRedline = 
m_pImpl->GetIsFirstParagraphInSection(/*bAfterRedline=*/true) &&
 m_pImpl->GetIsLastParagraphInSection();
 PropertyMapPtr pContext = 
m_pImpl->GetTopContextOfType(CONTEXT_PARAGRAPH);
-if (!m_pImpl->GetFootnoteContext())
+if (!m_pImpl->GetFootnoteContext() && !m_pImpl->IsInShape() && 
!m_pImpl->IsInComments())
 {
 if (m_pImpl->isBreakDeferred(PAGE_BREAK))
 {
@@ -4137,7 +4137,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, 
size_t len)
 {
 // GetTopContext() is changed by inserted breaks, but we want to 
keep the current context
 PropertyMapPtr pContext = m_pImpl->GetTopContext();
-if (!m_pImpl->GetFootnoteContext())
+if (!m_pImpl->GetFootnoteContext() && !m_pImpl->IsInShape() && 
!m_pImpl->IsInComments())
 {
 if (m_pImpl->isBreakDeferred(PAGE_BREAK))
 {


[Libreoffice-commits] core.git: sc/source

2023-02-13 Thread Kohei Yoshida (via logerrit)
 sc/source/ui/xmlsource/xmlsourcedlg.cxx |   34 
 1 file changed, 18 insertions(+), 16 deletions(-)

New commits:
commit 4d9a8f07b77917b0756dc2d8d8082c6e63e560a2
Author: Kohei Yoshida 
AuthorDate: Mon Feb 13 22:12:59 2023 -0500
Commit: Kohei Yoshida 
CommitDate: Tue Feb 14 04:09:44 2023 +

tdf#153604: include the root element when traversing the tree

Change-Id: I35098e687eea832c075f68861e04be7b492ed25e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146966
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 

diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx 
b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 902c8c0a0bec..663db63475d8 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -448,31 +448,33 @@ void getFieldLinks(
 ScOrcusImportXMLParam::RangeLink& rRangeLink, std::vector& 
rNamespaces,
 const weld::TreeView& rTree, const weld::TreeIter& rEntry)
 {
+OUString aPath = getXPath(rTree, rEntry, rNamespaces);
+const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(rTree, rEntry);
+
+if (pUserData)
+{
+if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
+// nested repeat element automatically becomes a row-group node.
+rRangeLink.maRowGroups.push_back(
+OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
+
+if (pUserData->mbLeafNode && !aPath.isEmpty())
+// XPath should never be empty anyway, but it won't hurt to 
check...
+rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
+}
+
 std::unique_ptr xChild(rTree.make_iterator(&rEntry));
+
 if (!rTree.iter_children(*xChild))
 // No more children.  We're done.
 return;
 
 do
 {
-OUString aPath = getXPath(rTree, *xChild, rNamespaces);
-const ScOrcusXMLTreeParam::EntryData* pUserData = 
ScOrcusXMLTreeParam::getUserData(rTree, *xChild);
-
-if (pUserData)
-{
-if (pUserData->meType == ScOrcusXMLTreeParam::ElementRepeat)
-// nested repeat element automatically becomes a row-group 
node.
-rRangeLink.maRowGroups.push_back(
-OUStringToOString(aPath, RTL_TEXTENCODING_UTF8));
-
-if (pUserData->mbLeafNode && !aPath.isEmpty())
-// XPath should never be empty anyway, but it won't hurt to 
check...
-rRangeLink.maFieldPaths.push_back(OUStringToOString(aPath, 
RTL_TEXTENCODING_UTF8));
-}
-
 // Walk recursively.
 getFieldLinks(rRangeLink, rNamespaces, rTree, *xChild);
-} while (rTree.iter_next_sibling(*xChild));
+}
+while (rTree.iter_next_sibling(*xChild));
 }
 
 void removeDuplicates(std::vector& rArray)


[Libreoffice-commits] core.git: filter/source

2023-02-13 Thread Stephan Bergmann (via logerrit)
 filter/source/xsltfilter/XSLTFilter.cxx |   27 ++-
 1 file changed, 10 insertions(+), 17 deletions(-)

New commits:
commit a2db1a1a4a1655034c27a64c1d67751752575856
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 22:27:22 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 14 06:53:54 2023 +

Remove an unhelpful try/catch

The theMacroExpander operations should never throw, so better leave 
uncaught any
exceptions that would happen after all, rather than silently swallowing 
them.

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

diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index 8fe3d767bd4b..334f2dd4b905 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -208,23 +208,16 @@ namespace XSLT
 OUString
 XSLTFilter::expandUrl(const OUString& sUrl)
 {
-try
-{
-OUString sPreparedURL(sUrl);
-if 
(sPreparedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", &sPreparedURL))
-{
-sPreparedURL = rtl::Uri::decode(sPreparedURL, 
rtl_UriDecodeWithCharset,
-RTL_TEXTENCODING_UTF8);
-css::uno::Reference
-xMacroExpander = theMacroExpander::get(m_xContext);
-sPreparedURL = xMacroExpander->expandMacros(sPreparedURL);
-}
-return sPreparedURL;
-}
-catch (const Exception&)
-{
-}
-return {};
+OUString sPreparedURL(sUrl);
+if (sPreparedURL.startsWithIgnoreAsciiCase("vnd.sun.star.expand:", 
&sPreparedURL))
+{
+sPreparedURL = rtl::Uri::decode(sPreparedURL, 
rtl_UriDecodeWithCharset,
+RTL_TEXTENCODING_UTF8);
+css::uno::Reference
+xMacroExpander = theMacroExpander::get(m_xContext);
+sPreparedURL = xMacroExpander->expandMacros(sPreparedURL);
+}
+return sPreparedURL;
 }
 
 css::uno::Reference


[Libreoffice-commits] core.git: filter/source

2023-02-13 Thread Stephan Bergmann (via logerrit)
 filter/source/xsltfilter/XSLTFilter.cxx |5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

New commits:
commit 9a466b75e373396cf8e9d21481b79ef3fd97c066
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 22:25:18 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 14 06:54:10 2023 +

Simplify code a bit

("instantiation of XSLT 2.0 transformer service failed" would mean that it
throws an exception, not that xTransformer would be null)

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

diff --git a/filter/source/xsltfilter/XSLTFilter.cxx 
b/filter/source/xsltfilter/XSLTFilter.cxx
index 334f2dd4b905..a48edd6d30cb 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -234,10 +234,7 @@ namespace XSLT
 {
 xTransformer = xslt::XSLT2Transformer::create(m_xContext, rArgs);
 }
-
-// instantiation of XSLT 2.0 transformer service failed, or the
-// filter does not need it
-if (!xTransformer.is())
+else
 {
 xTransformer = xslt::XSLTTransformer::create(m_xContext, rArgs);
 }


[Libreoffice-commits] core.git: vcl/qt6

2023-02-13 Thread Stephan Bergmann (via logerrit)
 vcl/qt6/QtMenu.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 862eda5f187d77f8d1f6e2a45fa33f8dd1ad5d5b
Author: Stephan Bergmann 
AuthorDate: Mon Feb 13 22:20:56 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 14 06:54:45 2023 +

--enable-qt6 constexpr template point of instantiation issue

...with --with-latest-c++,

> In file included from vcl/qt6/QtMenu.cxx:10:
> In file included from vcl/qt6/../qt5/QtMenu.cxx:10:
> In file included from vcl/inc/qt6/QtMenu.hxx:10:
> In file included from vcl/inc/qt6/../qt5/QtMenu.hxx:12:
> In file included from vcl/inc/salmenu.hxx:24:
> In file included from include/vcl/menu.hxx:23:
> In file included from ~/llvm/inst/bin/../include/c++/v1/memory:898:
> In file included from 
~/llvm/inst/bin/../include/c++/v1/__memory/shared_ptr.h:31:
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:63:19: error: 
invalid application of 'sizeof' to an incomplete type 'QMenu'
> static_assert(sizeof(_Tp) >= 0, "cannot delete an incomplete type");
>   ^~~
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:297:7: note: in 
instantiation of member function 'std::default_delete::operator()' 
requested here
>   __ptr_.second()(__tmp);
>   ^
> ~/llvm/inst/bin/../include/c++/v1/__memory/unique_ptr.h:263:75: note: in 
instantiation of member function 'std::unique_ptr::reset' requested here
>   _LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_SINCE_CXX23 ~unique_ptr() { 
reset(); }
>   
^
> vcl/inc/qt6/../qt5/QtMenu.hxx:40:7: note: in instantiation of member 
function 'std::unique_ptr::~unique_ptr' requested here
> class QtMenu : public QObject, public SalMenu
>   ^
> /usr/include/qt6/QtCore/qmetatype.h:2331:47: note: in implicit destructor 
for 'QtMenu' first required here
> reinterpret_cast(addr)->~S();
>   ^
> /usr/include/qt6/QtCore/qmetatype.h:2370:41: note: in instantiation of 
member function 'QtPrivate::QMetaTypeForType::getDtor' requested here
> /*.dtor=*/ QMetaTypeForType::getDtor(),
> ^
> /usr/include/qt6/QtCore/qmetatype.h:2480:48: note: in instantiation of 
static data member 'QtPrivate::QMetaTypeInterfaceWrapper::metaType' 
requested here
> return &QMetaTypeInterfaceWrapper::metaType;
>^
> /usr/include/qt6/QtCore/qmetatype.h:2537:16: note: in instantiation of 
function template specialization 
'QtPrivate::qTryMetaTypeInterfaceForType<(anonymous 
namespace)::qt_meta_stringdata_QtMenu_t, 
QtPrivate::TypeAndForceComplete>>' 
requested here
> QtPrivate::qTryMetaTypeInterfaceForType()...
>^
> workdir/CustomTarget/vcl/qt6/QtMenu.moc:106:5: note: in instantiation of 
variable template specialization 'qt_incomplete_metaTypeArray<(anonymous 
namespace)::qt_meta_stringdata_QtMenu_t, 
QtPrivate::TypeAndForceComplete>, 
QtPrivate::TypeAndForceComplete>, 
QtPrivate::TypeAndForceComplete>, QtPrivate::TypeAndForceComplete>, QtPrivate::TypeAndForceComplete>, QtPrivate::TypeAndForceComplete>, 
QtPrivate::TypeAndForceComplete>, QtPrivate::TypeAndForceComplete>, QtPrivate::TypeAndForceComplete>, QtPrivate::TypeAndForceComplete>>' reques
 ted here
> qt_incomplete_metaTypeArray ^
> vcl/inc/qt6/../qt5/QtMenu.hxx:23:7: note: forward declaration of 'QMenu'
> class QMenu;
>   ^

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

diff --git a/vcl/qt6/QtMenu.cxx b/vcl/qt6/QtMenu.cxx
index dd85319745ae..18c2d4c4e551 100644
--- a/vcl/qt6/QtMenu.cxx
+++ b/vcl/qt6/QtMenu.cxx
@@ -7,6 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
+#include 
+
 #include "../qt5/QtMenu.cxx"
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


[Libreoffice-commits] core.git: 2 commits - framework/source

2023-02-13 Thread Noel Grandin (via logerrit)
 framework/source/loadenv/loadenv.cxx|   10 +-
 framework/source/uielement/uicommanddescription.cxx |   16 
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 89fa0a42ecd71ee9e4f80d127ced396c79d5e650
Author: Noel Grandin 
AuthorDate: Mon Feb 13 22:10:16 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 14 06:59:40 2023 +

osl::Mutex->std::mutex in LoadEnvListener

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

diff --git a/framework/source/loadenv/loadenv.cxx 
b/framework/source/loadenv/loadenv.cxx
index 89feaa25d0ab..a01bc50fe582 100644
--- a/framework/source/loadenv/loadenv.cxx
+++ b/framework/source/loadenv/loadenv.cxx
@@ -105,7 +105,7 @@ class LoadEnvListener : public ::cppu::WeakImplHelper< 
css::frame::XLoadEventLis
 
css::frame::XDispatchResultListener >
 {
 private:
-osl::Mutex m_mutex;
+std::mutex m_mutex;
 bool m_bWaitingResult;
 LoadEnv* m_pLoadEnv;
 
@@ -468,7 +468,7 @@ css::uno::Reference< css::lang::XComponent > 
LoadEnv::getTargetComponent() const
 
 void SAL_CALL LoadEnvListener::loadFinished(const css::uno::Reference< 
css::frame::XFrameLoader >&)
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 if (m_bWaitingResult)
 m_pLoadEnv->impl_setResult(true);
 m_bWaitingResult = false;
@@ -476,7 +476,7 @@ void SAL_CALL LoadEnvListener::loadFinished(const 
css::uno::Reference< css::fram
 
 void SAL_CALL LoadEnvListener::loadCancelled(const css::uno::Reference< 
css::frame::XFrameLoader >&)
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 if (m_bWaitingResult)
 m_pLoadEnv->impl_setResult(false);
 m_bWaitingResult = false;
@@ -484,7 +484,7 @@ void SAL_CALL LoadEnvListener::loadCancelled(const 
css::uno::Reference< css::fra
 
 void SAL_CALL LoadEnvListener::dispatchFinished(const 
css::frame::DispatchResultEvent& aEvent)
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 
 if (!m_bWaitingResult)
 return;
@@ -508,7 +508,7 @@ void SAL_CALL LoadEnvListener::dispatchFinished(const 
css::frame::DispatchResult
 
 void SAL_CALL LoadEnvListener::disposing(const css::lang::EventObject&)
 {
-osl::MutexGuard g(m_mutex);
+std::unique_lock g(m_mutex);
 if (m_bWaitingResult)
 m_pLoadEnv->impl_setResult(false);
 m_bWaitingResult = false;
commit 7da5639531303c7de34382c5030b67a489a6e3d5
Author: Noel Grandin 
AuthorDate: Mon Feb 13 22:06:51 2023 +0200
Commit: Noel Grandin 
CommitDate: Tue Feb 14 06:59:32 2023 +

osl::Mutex->std::mutex in ConfigurationAccess_UICommand

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

diff --git a/framework/source/uielement/uicommanddescription.cxx 
b/framework/source/uielement/uicommanddescription.cxx
index 8054cf4bff8d..f37663bc0e54 100644
--- a/framework/source/uielement/uicommanddescription.cxx
+++ b/framework/source/uielement/uicommanddescription.cxx
@@ -71,7 +71,7 @@ namespace {
 class ConfigurationAccess_UICommand : // Order is necessary for right 
initialization!
 public  
::cppu::WeakImplHelper
 {
-osl::Mutex m_aMutex;
+std::mutex m_aMutex;
 public:
   ConfigurationAccess_UICommand( 
std::u16string_view aModuleName, const Reference< XNameAccess >& 
xGenericUICommands, const Reference< XComponentContext >& rxContext );
 virtual   ~ConfigurationAccess_UICommand() override;
@@ -176,7 +176,7 @@ 
ConfigurationAccess_UICommand::ConfigurationAccess_UICommand( std::u16string_vie
 ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand()
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 Reference< XContainer > xContainer( m_xConfigAccess, UNO_QUERY );
 if ( xContainer.is() )
 xContainer->removeContainerListener(m_xConfigListener);
@@ -188,7 +188,7 @@ 
ConfigurationAccess_UICommand::~ConfigurationAccess_UICommand()
 // XNameAccess
 Any ConfigurationAccess_UICommand::getByNameImpl( const OUString& rCommandURL )
 {
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 if ( !m_bConfigAccessInitialized )
 {
 initializeConfigAccess();
@@ -432,7 +432,7 @@ Any ConfigurationAccess_UICommand::getInfoFromCommand( 
const OUString& rCommandU
 Sequence< OUString > ConfigurationAccess_UICommand::getAllCommands()
 {
 // SAFE
-osl::MutexGuard g(m_aMutex);
+std::unique_lock g(m_aMutex);
 
 if ( !m_bConfigAccessInitialized )
 {
@@ -523,21 +523,21 @@ void 
ConfigurationAccess_UICommand::initializeConfigAccess()
 // cont

[Libreoffice-commits] core.git: sw/inc

2023-02-13 Thread Miklos Vajna (via logerrit)
 sw/inc/authfld.hxx |5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 2771f01965d9a9542ecc645a2a708a17f541df07
Author: Miklos Vajna 
AuthorDate: Mon Feb 13 20:47:21 2023 +0100
Commit: Miklos Vajna 
CommitDate: Tue Feb 14 07:04:43 2023 +

sw: document SwAuthorityField

Its invariant was already documented, but it wasn't mentioned that the
UI's bibliography entry is called an authority field internally.

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

diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index 07144b3e43e2..764aa42190b6 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -143,7 +143,10 @@ public:
 
 };
 
-/** invariant for SwAuthorityField is that it is always registered at its
+/** Represents an inserted bibliography entry, created using Insert -> Table 
of Contents and Index
+-> Bibliography Entry.
+
+invariant for SwAuthorityField is that it is always registered at its
 SwAuthorityFieldType via AddField()/RemoveField() & therefore has m_nHandle
 set - but it's possible that multiple SwAuthorityField have the same
 m_nHandle & so the number of instances is an upper bound on


[Libreoffice-commits] core.git: Branch 'distro/collabora/co-22.05' - sw/uiconfig

2023-02-13 Thread Szymon Kłos (via logerrit)
 sw/uiconfig/swriter/ui/contentcontroldlg.ui |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 24bbb260ce1a6968d757f2fcf66d7ba9b4854dba
Author: Szymon Kłos 
AuthorDate: Mon Feb 13 14:55:43 2023 +0100
Commit: Szymon Kłos 
CommitDate: Tue Feb 14 07:33:13 2023 +

Content Control Properties dialog alignment

Make explicit that ok/cancel buttons should be the last row

Change-Id: If22da5222fc9dc1c1c5f94fd08c945364284daee
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146904
Reviewed-by: Henry Castro 
Tested-by: Jenkins CollaboraOffice 

diff --git a/sw/uiconfig/swriter/ui/contentcontroldlg.ui 
b/sw/uiconfig/swriter/ui/contentcontroldlg.ui
index caf30206c961..e0f829758855 100644
--- a/sw/uiconfig/swriter/ui/contentcontroldlg.ui
+++ b/sw/uiconfig/swriter/ui/contentcontroldlg.ui
@@ -87,7 +87,7 @@
   
 False
 False
-3
+5