[Libreoffice-commits] core.git: officecfg/registry

2023-02-24 Thread Heiko Tietze (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 895527e3a5af6b57ff8d4ef2a0198d9dd6707746
Author: Heiko Tietze 
AuthorDate: Thu Feb 23 10:28:19 2023 +0100
Commit: Heiko Tietze 
CommitDate: Sat Feb 25 05:44:00 2023 +

Resolves tdf#153578 - Duplicate mnemonics

Removed the hard-coded accelerators

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

diff --git a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
index d79914600953..af796b0d2ed1 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/CalcCommands.xcu
@@ -441,7 +441,7 @@
   
   
 
-  Te~xt to Columns...
+  Text to Columns...
 
 
   1
@@ -1946,7 +1946,7 @@
   
   
 
-  ~XML Source...
+  XML Source...
 
 
   1


[Libreoffice-commits] core.git: officecfg/registry

2023-02-24 Thread Bogdan B (via logerrit)
 officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu |   45 
++
 1 file changed, 45 insertions(+)

New commits:
commit 8bea9073303add3a554377eadc5f72ac5e48e734
Author: Bogdan B 
AuthorDate: Wed Jan 4 19:03:30 2023 +
Commit: Heiko Tietze 
CommitDate: Sat Feb 25 05:43:11 2023 +

tdf#152880 Remove repeated terms from Content Controls

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

diff --git 
a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu 
b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
index ed1d92c685c9..47b9b955ff53 100644
--- a/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/UI/WriterCommands.xcu
@@ -524,6 +524,9 @@
 
   Content Control Properties
 
+
+  Properties
+
 
   1
 
@@ -637,6 +640,12 @@
   
   
 
+  Rich Text Content Control
+
+
+  Rich Text
+
+
   Insert Rich Text Content Control
 
 
@@ -645,6 +654,12 @@
   
   
 
+  Check Box Content Control
+
+
+  Check Box
+
+
   Insert Check Box Content Control
 
 
@@ -653,6 +668,12 @@
   
   
 
+  Drop-Down List Content Control
+
+
+  Drop-Down List
+
+
   Insert Drop-Down List Content Control
 
 
@@ -661,6 +682,12 @@
   
   
 
+  Picture Content Control
+
+
+  Picture
+
+
   Insert Picture Content Control
 
 
@@ -669,6 +696,12 @@
   
   
 
+  Date Content Control
+
+
+  Date Control
+
+
   Insert Date Content Control
 
 
@@ -677,6 +710,12 @@
   
   
 
+  Plain Text Content Control
+
+
+  Plain Text
+
+
   Insert Plain Text Content Control
 
 
@@ -685,6 +724,12 @@
   
   
 
+  Combo Box Content Control
+
+
+  Combo Box
+
+
   Insert Combo Box Content Control
 
 


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

2023-02-24 Thread Hossein (via logerrit)
 chart2/qa/extras/chart2import.cxx |   12 
 1 file changed, 4 insertions(+), 8 deletions(-)

New commits:
commit 573863d78ae55cdb8dfc9747aee47804a0b6f84c
Author: Hossein 
AuthorDate: Fri Feb 10 23:20:50 2023 +
Commit: Hossein 
CommitDate: Fri Feb 24 22:58:08 2023 +

tdf#153533 Fix chart2_import test failure on HiDPI display

The test checks that the text shape width is smaller than the chart
wall. This test fails on HiDPI displays. For example:


lode/dev/core/chart2/qa/extras/chart2import.cxx(2207) : error : Assertion
Test name: Chart2ImportTest::testFixedSizeBarChartVeryLongLabel
double equality assertion failed
- Expected: 4800
- Actual  : 4632
- Delta   : 100

Failures !!!
Run: 85   Failure total: 1   Failures: 1   Errors: 0


Now, instead of testing the
exact value of the text shape width, I have used CPPUNIT_ASSERT_LESS()
to make sure that the above condition holds:

 CPPUNIT_ASSERT_LESS(xChartWall->getSize().Width, xXAxis->getSize().Width)

This is done in two different tests:

* Chart2ImportTest::testFixedSizeBarChartVeryLongLabel()
* Chart2ImportTest::testAutomaticSizeBarChartVeryLongLabel()

Both tests are among those that can be invoked with:

  cd chart2 && make CppunitTest_chart2_import

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

diff --git a/chart2/qa/extras/chart2import.cxx 
b/chart2/qa/extras/chart2import.cxx
index b02f52c68411..3f156cb79266 100644
--- a/chart2/qa/extras/chart2import.cxx
+++ b/chart2/qa/extras/chart2import.cxx
@@ -2200,11 +2200,9 @@ void 
Chart2ImportTest::testFixedSizeBarChartVeryLongLabel()
 CPPUNIT_ASSERT(xChartWall.is());
 
 // The text shape width should be smaller than the chart wall
-// The specific numbers unfortunately vary depending on DPI - allow 1 mm
-CPPUNIT_ASSERT_DOUBLES_EQUAL(5085, xChartWall->getSize().Width, 100);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(7113, xChartWall->getSize().Height, 100);
+CPPUNIT_ASSERT_LESS(xChartWall->getSize().Width, xXAxis->getSize().Width);
 
-CPPUNIT_ASSERT_DOUBLES_EQUAL(4800, xXAxis->getSize().Width, 100);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(7113, xChartWall->getSize().Height, 100);
 CPPUNIT_ASSERT_DOUBLES_EQUAL(398, xXAxis->getSize().Height, 100);
 }
 
@@ -2270,11 +2268,9 @@ void 
Chart2ImportTest::testAutomaticSizeBarChartVeryLongLabel()
 CPPUNIT_ASSERT(xChartWall.is());
 
 // The text shape width should be smaller than the chart wall
-// The specific numbers unfortunately vary depending on DPI - allow 1 mm
-CPPUNIT_ASSERT_DOUBLES_EQUAL(5761, xChartWall->getSize().Width, 100);
-CPPUNIT_ASSERT_DOUBLES_EQUAL(7200, xChartWall->getSize().Height, 100);
+CPPUNIT_ASSERT_LESS(xChartWall->getSize().Width, xXAxis->getSize().Width);
 
-CPPUNIT_ASSERT_DOUBLES_EQUAL(5320, xXAxis->getSize().Width, 100);
+CPPUNIT_ASSERT_DOUBLES_EQUAL(7200, xChartWall->getSize().Height, 100);
 CPPUNIT_ASSERT_DOUBLES_EQUAL(1192, xXAxis->getSize().Height, 100);
 }
 


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

2023-02-24 Thread Justin Luth (via logerrit)
 oovbaapi/ooo/vba/word/XView.idl   |3 +++
 sw/qa/core/data/docm/testVBA.docm |binary
 sw/source/ui/vba/vbaview.cxx  |   12 
 sw/source/ui/vba/vbaview.hxx  |2 ++
 4 files changed, 17 insertions(+)

New commits:
commit ffa403e539bea44ce46fe7d976e7a00b319808f5
Author: Justin Luth 
AuthorDate: Fri Feb 24 14:00:00 2023 -0500
Commit: Justin Luth 
CommitDate: Fri Feb 24 22:45:40 2023 +

word vba: add ShowAll to XView

This allows ActiveDocument.ActiveWindow.View.ShowAll = true

ShowAll affects "View -> Formatting Marks"

make CppunitTest_sw_macros_test

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

diff --git a/oovbaapi/ooo/vba/word/XView.idl b/oovbaapi/ooo/vba/word/XView.idl
index 985e5611fbf4..780d65fd3a79 100644
--- a/oovbaapi/ooo/vba/word/XView.idl
+++ b/oovbaapi/ooo/vba/word/XView.idl
@@ -28,6 +28,9 @@ interface XView
 set raises ( com::sun::star::script::BasicErrorException );
 };
 
+//Show all nonprinting characters (such as hidden text, spaces, carriage 
returns, etc.).
+[attribute] boolean ShowAll;
+
 [attribute] long SplitSpecial;
 [attribute] boolean TableGridLines;
 [attribute] long Type;
diff --git a/sw/qa/core/data/docm/testVBA.docm 
b/sw/qa/core/data/docm/testVBA.docm
index 44e59f03a753..9b97fbd9dccd 100644
Binary files a/sw/qa/core/data/docm/testVBA.docm and 
b/sw/qa/core/data/docm/testVBA.docm differ
diff --git a/sw/source/ui/vba/vbaview.cxx b/sw/source/ui/vba/vbaview.cxx
index 1e620cc5c56a..822c4f93e501 100644
--- a/sw/source/ui/vba/vbaview.cxx
+++ b/sw/source/ui/vba/vbaview.cxx
@@ -61,6 +61,18 @@ SwVbaView::~SwVbaView()
 {
 }
 
+sal_Bool SwVbaView::getShowAll()
+{
+bool bShowFormattingMarks = false;
+mxViewSettings->getPropertyValue("ShowNonprintingCharacters") >>= 
bShowFormattingMarks;
+return bShowFormattingMarks;
+}
+
+void SwVbaView::setShowAll(sal_Bool bSet)
+{
+mxViewSettings->setPropertyValue("ShowNonprintingCharacters", 
uno::Any(bSet));
+}
+
 ::sal_Int32 SAL_CALL
 SwVbaView::getSeekView()
 {
diff --git a/sw/source/ui/vba/vbaview.hxx b/sw/source/ui/vba/vbaview.hxx
index 66d59e61b739..66cd0db612ef 100644
--- a/sw/source/ui/vba/vbaview.hxx
+++ b/sw/source/ui/vba/vbaview.hxx
@@ -44,6 +44,8 @@ public:
 virtual ~SwVbaView() override;
 
// XView
+sal_Bool SAL_CALL getShowAll() override;
+void SAL_CALL setShowAll(sal_Bool bSet) override;
 virtual ::sal_Int32 SAL_CALL getSeekView() override;
 virtual void SAL_CALL setSeekView( ::sal_Int32 _seekview ) override;
 virtual ::sal_Int32 SAL_CALL getSplitSpecial() override;


Quebec standards are not European French standards

2023-02-24 Thread i neuw
In English

LibreOffice, is applying European standards on documents created in Quebec
because it is also French.

Quebec technical standards are the same as everywhere else in North
America. This includes paper sizes, and the hybrid Qwerty keyboard.
Currently the French language download defaults to A4 paper and users have
no idea why. Please implement a better regional package identification.

In French

LibreOffice, applique les normes européennes sur les documents créés au
Québec car il est aussi français.

Les normes techniques québécoises sont les mêmes que partout ailleurs en
Amérique du Nord. Cela inclut les formats de papier et le clavier Qwerty
hybride. Actuellement, le téléchargement en français est par défaut sur du
papier A4 et les utilisateurs ne savent pas pourquoi. Veuillez implémenter
une meilleure identification régionale des paquets.


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

2023-02-24 Thread Justin Luth (via logerrit)
 sw/source/ui/vba/vbadocument.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 0d1d6ca553992fa53e98f749c325d8de39847f17
Author: Justin Luth 
AuthorDate: Fri Feb 24 13:10:22 2023 -0500
Commit: Justin Luth 
CommitDate: Fri Feb 24 22:36:30 2023 +

vba content controls: cleanup unnecessary SAL_CALL in cxx

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

diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index caf520c3433a..a622616c9d81 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -220,7 +220,7 @@ SwVbaDocument::Bookmarks( const uno::Any& rIndex )
 return xBookmarksVba->Item( rIndex, uno::Any() );
 }
 
-uno::Any SAL_CALL SwVbaDocument::ContentControls(const uno::Any& index)
+uno::Any SwVbaDocument::ContentControls(const uno::Any& index)
 {
 uno::Reference xContentControls(
 new SwVbaContentControls(this, mxContext, mxTextDocument, "", ""));
@@ -230,7 +230,7 @@ uno::Any SAL_CALL SwVbaDocument::ContentControls(const 
uno::Any& index)
 return uno::Any(xContentControls);
 }
 
-uno::Any SAL_CALL SwVbaDocument::SelectContentControlsByTag(const uno::Any& 
index)
+uno::Any SwVbaDocument::SelectContentControlsByTag(const uno::Any& index)
 {
 OUString sTag;
 index >>= sTag;
@@ -238,7 +238,7 @@ uno::Any SAL_CALL 
SwVbaDocument::SelectContentControlsByTag(const uno::Any& inde
 new SwVbaContentControls(this, mxContext, 
mxTextDocument, sTag, "")));
 }
 
-uno::Any SAL_CALL SwVbaDocument::SelectContentControlsByTitle(const uno::Any& 
index)
+uno::Any SwVbaDocument::SelectContentControlsByTitle(const uno::Any& index)
 {
 OUString sTitle;
 index >>= sTitle;


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

2023-02-24 Thread Michael Weghorn (via logerrit)
 svx/source/accessibility/charmapacc.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 790730a9b7651a1883d887f5b628f8f2b1e5e3a0
Author: Michael Weghorn 
AuthorDate: Fri Feb 24 15:54:51 2023 +0100
Commit: Michael Weghorn 
CommitDate: Fri Feb 24 22:29:27 2023 +

a11y: Fix focused state for special char dialog item

As mentioned/worked around in Colomban's pending Gerrit change
to implement an a11y test for the "Special Characters" dialog [1],
the selected item in the character table was incorrectly still
reporting the "focused" state even if keyboard focus already
moved on from the parent widget to another one.

Fix this by checking the item is not only selected, but its
parent also has child focus.

Tested by running this pyatspi script after a sleep and using
the time before the script actually runs to interact with the
dialog to test the different scenarios for the focused state,
using the "!" character in the dialog):

#!/usr/bin/python3
import pyatspi
def get_soffice_app():
registry = pyatspi.registry.Registry()
apps = list(registry.getDesktop(0))
for app in apps:
if app.name == 'soffice' or app.name == 'soffice.bin':
return app
print("soffice app not found")
exit(1)
def get_exclamation_mark_button(acc):
i = 0
while i < acc.get_child_count():
child = acc.get_child_at_index(i)
try:
if child.name == '!':
return child
except NotImplementedError:
pass
recursive_child = get_exclamation_mark_button(child)
if recursive_child:
return recursive_child
i = i + 1
return None
app = get_soffice_app()
obj = get_exclamation_mark_button(app)
assert obj
states = obj.get_state_set().get_states()
print("states:")
print(states)

[1] 
https://gerrit.libreoffice.org/c/core/+/142260/22/sw/qa/extras/accessibility/dialogs.cxx

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

diff --git a/svx/source/accessibility/charmapacc.cxx 
b/svx/source/accessibility/charmapacc.cxx
index d6c8b4b49216..61cf9ca853e1 100644
--- a/svx/source/accessibility/charmapacc.cxx
+++ b/svx/source/accessibility/charmapacc.cxx
@@ -483,7 +483,8 @@ sal_Int64 SAL_CALL 
SvxShowCharSetItemAcc::getAccessibleStateSet()
 if( mpParent->mrParent.GetSelectIndexId() == mpParent->mnId )
 {
 nStateSet |= css::accessibility::AccessibleStateType::SELECTED;
-nStateSet |= css::accessibility::AccessibleStateType::FOCUSED;
+if (mpParent->mrParent.HasChildFocus())
+nStateSet |= css::accessibility::AccessibleStateType::FOCUSED;
 }
 if ( mpParent->mnId >= mpParent->mrParent.FirstInView() && 
mpParent->mnId <= mpParent->mrParent.LastInView() )
 {


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

2023-02-24 Thread Justin Luth (via logerrit)
 oovbaapi/ooo/vba/word/XDocument.idl |1 +
 sw/source/ui/vba/vbadocument.cxx|8 
 sw/source/ui/vba/vbadocument.hxx|1 +
 3 files changed, 10 insertions(+)

New commits:
commit d6f3715190494b55e2ecc105cbd6e5ddeff47f0c
Author: Justin Luth 
AuthorDate: Fri Feb 24 12:45:35 2023 -0500
Commit: Justin Luth 
CommitDate: Fri Feb 24 21:55:40 2023 +

word vba: Add activeWindow to XDocument

This allows ActiveDocument.ActiveWindow.*

It already works as a global, and as Aplication.ActiveWindow

Unit test will follow when some of the * items are added.

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

diff --git a/oovbaapi/ooo/vba/word/XDocument.idl 
b/oovbaapi/ooo/vba/word/XDocument.idl
index 354cac11b2ed..99bdd5249a6a 100644
--- a/oovbaapi/ooo/vba/word/XDocument.idl
+++ b/oovbaapi/ooo/vba/word/XDocument.idl
@@ -25,6 +25,7 @@ interface XDocument
 interface XConnectable;
 
 [attribute, readonly] XRange Content;
+[attribute, readonly] XWindow ActiveWindow;
 [attribute] any AttachedTemplate;
 [attribute] long ProtectionType;
 [attribute] boolean UpdateStylesOnOpen;
diff --git a/sw/source/ui/vba/vbadocument.cxx b/sw/source/ui/vba/vbadocument.cxx
index 52907477dcff..caf520c3433a 100644
--- a/sw/source/ui/vba/vbadocument.cxx
+++ b/sw/source/ui/vba/vbadocument.cxx
@@ -30,6 +30,7 @@
 #include "vbabookmarks.hxx"
 #include "vbamailmerge.hxx"
 #include "vbavariables.hxx"
+#include "vbawindow.hxx"
 #include 
 #include 
 #include 
@@ -245,6 +246,13 @@ uno::Any SAL_CALL 
SwVbaDocument::SelectContentControlsByTitle(const uno::Any& in
 new SwVbaContentControls(this, mxContext, 
mxTextDocument, "", sTitle)));
 }
 
+uno::Reference SwVbaDocument::getActiveWindow()
+{
+// copied from vbaappliction which has a #FIXME so far can't determine 
Parent
+return new SwVbaWindow(uno::Reference< XHelperInterface >(), mxContext, 
mxModel,
+   mxModel->getCurrentController());
+}
+
 uno::Any SAL_CALL
 SwVbaDocument::Variables( const uno::Any& rIndex )
 {
diff --git a/sw/source/ui/vba/vbadocument.hxx b/sw/source/ui/vba/vbadocument.hxx
index 31ca3751686a..069215513cc5 100644
--- a/sw/source/ui/vba/vbadocument.hxx
+++ b/sw/source/ui/vba/vbadocument.hxx
@@ -58,6 +58,7 @@ public:
 css::uno::Any SAL_CALL ContentControls(const css::uno::Any& index) 
override;
 css::uno::Any SAL_CALL SelectContentControlsByTag(const css::uno::Any& 
index) override;
 css::uno::Any SAL_CALL SelectContentControlsByTitle(const css::uno::Any& 
index) override;
+css::uno::Reference SAL_CALL getActiveWindow() override;
 virtual css::uno::Any SAL_CALL Variables( const css::uno::Any& rIndex ) 
override;
 virtual css::uno::Any SAL_CALL getAttachedTemplate() override;
 virtual void SAL_CALL setAttachedTemplate( const css::uno::Any& 
_attachedtemplate ) override;


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

2023-02-24 Thread Noel Grandin (via logerrit)
 sd/inc/stlsheet.hxx |   13 
 sd/source/core/stlsheet.cxx |   71 +++-
 2 files changed, 40 insertions(+), 44 deletions(-)

New commits:
commit a39f5da6f621fc60df0dbdd6c5a08cae5a18763f
Author: Noel Grandin 
AuthorDate: Thu Feb 23 15:27:49 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 20:30:29 2023 +

BaseMutex->std::mutex in SdStyleSheet

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

diff --git a/sd/inc/stlsheet.hxx b/sd/inc/stlsheet.hxx
index e830c097e990..fe1079ffd616 100644
--- a/sd/inc/stlsheet.hxx
+++ b/sd/inc/stlsheet.hxx
@@ -29,13 +29,14 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
-#include 
 
 #include 
 
 #include 
+#include 
 
 #include "prlayout.hxx"
 
@@ -50,7 +51,7 @@ typedef cppu::ImplInheritanceHelper< SfxUnoStyleSheet,
 css::util::XModifyBroadcaster,
 css::lang::XComponent > SdStyleSheetBase ;
 
-class SdStyleSheet final : public SdStyleSheetBase, private ::cppu::BaseMutex
+class SdStyleSheet final : public SdStyleSheetBase
 {
 public:
 SdStyleSheet( const OUString& rDisplayName, SfxStyleSheetBasePool& rPool, 
SfxStyleFamily eFamily, SfxStyleSearchBits nMask );
@@ -152,12 +153,14 @@ private:
 
 void disposing();
 
+mutable std::mutex m_aMutex;
+bool m_bDisposed = false;
+bool m_bInDispose = false;
+comphelper::OInterfaceContainerHelper4 
maModifyListeners;
+comphelper::OInterfaceContainerHelper4 
maEventListeners;
 OUString   msApiName;
 rtl::Reference< SfxStyleSheetBasePool > mxPool;
 
-/** broadcast helper for events */
-::cppu::OBroadcastHelper mrBHelper;
-
 std::unique_ptr< ModifyListenerForwarder > mpModifyListenerForwarder;
 
 SdStyleSheet( const SdStyleSheet& ) = delete;
diff --git a/sd/source/core/stlsheet.cxx b/sd/source/core/stlsheet.cxx
index 96850f5b107e..71b08db448f0 100644
--- a/sd/source/core/stlsheet.cxx
+++ b/sd/source/core/stlsheet.cxx
@@ -142,10 +142,8 @@ void ModifyListenerForwarder::Notify(SfxBroadcaster& 
/*rBC*/, const SfxHint& /*r
 
 SdStyleSheet::SdStyleSheet(const OUString& rDisplayName, 
SfxStyleSheetBasePool& _rPool, SfxStyleFamily eFamily, SfxStyleSearchBits 
_nMask)
 : SdStyleSheetBase( rDisplayName, _rPool, eFamily, _nMask)
-, ::cppu::BaseMutex()
 , msApiName( rDisplayName )
 , mxPool( &_rPool )
-, mrBHelper( m_aMutex )
 {
 }
 
@@ -301,12 +299,11 @@ bool SdStyleSheet::IsUsed() const
 
 if( !bResult )
 {
-MutexGuard aGuard( mrBHelper.rMutex );
+std::unique_lock aGuard( m_aMutex );
 
-cppu::OInterfaceContainerHelper * pContainer = mrBHelper.getContainer( 
cppu::UnoType::get() );
-if( pContainer )
+if( maModifyListeners.getLength(aGuard) )
 {
-const Sequence< Reference< XInterface > > aModifyListeners( 
pContainer->getElements() );
+std::vector> 
aModifyListeners( maModifyListeners.getElements(aGuard) );
 bResult = std::any_of(aModifyListeners.begin(), 
aModifyListeners.end(),
 [](const Reference& rListener) {
 Reference< XStyle > xStyle( rListener, UNO_QUERY );
@@ -349,10 +346,8 @@ bool SdStyleSheet::IsEditable()
 return false;
 }
 
-MutexGuard aGuard(mrBHelper.rMutex);
-
-auto pContainer = 
mrBHelper.getContainer(cppu::UnoType::get());
-return !pContainer || pContainer->getLength() <= 1;
+std::unique_lock aGuard(m_aMutex);
+return maModifyListeners.getLength(aGuard) <= 1;
 }
 
 /**
@@ -736,7 +731,7 @@ void SAL_CALL SdStyleSheet::release(  ) noexcept
 
 // restore reference count:
 osl_atomic_increment( &m_refCount );
-if (! mrBHelper.bDisposed) try
+if (! m_bDisposed) try
 {
 dispose();
 }
@@ -745,7 +740,7 @@ void SAL_CALL SdStyleSheet::release(  ) noexcept
 // don't break throw ()
 TOOLS_WARN_EXCEPTION( "sd", "" );
 }
-OSL_ASSERT( mrBHelper.bDisposed );
+OSL_ASSERT( m_bDisposed );
 SdStyleSheetBase::release();
 }
 
@@ -754,33 +749,33 @@ void SAL_CALL SdStyleSheet::release(  ) noexcept
 void SAL_CALL SdStyleSheet::dispose(  )
 {
 {
-MutexGuard aGuard(mrBHelper.rMutex);
-if (mrBHelper.bDisposed || mrBHelper.bInDispose)
+std::unique_lock aGuard(m_aMutex);
+if (m_bDisposed || m_bInDispose)
 return;
 
-mrBHelper.bInDispose = true;
+m_bInDispose = true;
 }
 try
 {
+std::unique_lock aGuard(m_aMutex);
 // side effect: keeping a reference to this
 EventObject aEvt( static_cast< OWeakObject * >( this ) );
 try
 {
-mrBHelper.aLC.disposeAndClear( aEvt );
+maModifyListeners.disposeAndClear( aGuard, aEvt );
+maEventListeners.disposeAndClear( aGuard, aEv

[Libreoffice-commits] core.git: download.lst external/zxing

2023-02-24 Thread Caolán McNamara (via logerrit)
 download.lst|4 +--
 external/zxing/StaticLibrary_zxing.mk   |   19 ---
 external/zxing/UnpackedTarball_zxing.mk |   13 +-
 external/zxing/android_include.patch.0  |   10 
 external/zxing/assume.__cpp_lib_string_view.patch.0 |   25 
 external/zxing/coroutine.patch.0|   11 
 external/zxing/inc/pch/precompiled_zxing.hxx|   14 +--
 external/zxing/missing-include.patch.0  |   12 -
 external/zxing/msvc-lambdacapture.patch.0   |   11 
 external/zxing/no_sanitize_ignored.patch.0  |   24 +++
 external/zxing/undeprecate-warning.patch.0  |   14 +++
 11 files changed, 50 insertions(+), 107 deletions(-)

New commits:
commit b16f5e374eb7e7199d4506eb04a3c3223dd52257
Author: Caolán McNamara 
AuthorDate: Fri Feb 24 10:59:17 2023 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 24 20:09:12 2023 +

upgrade zxing-cpp to 2.0.0

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

diff --git a/download.lst b/download.lst
index 49f98fae9188..7a5030a05adf 100644
--- a/download.lst
+++ b/download.lst
@@ -560,8 +560,8 @@ ZMF_TARBALL := libzmf-0.0.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-ZXING_SHA256SUM := 
126767bb56f8a1f25ae84d233db2e9b9be50d71f5776092d0e170ca0f0ed1862
-ZXING_TARBALL := zxing-cpp-1.4.0.tar.gz
+ZXING_SHA256SUM := 
12b76b7005c30d34265fc20356d340da179b0b4d43d2c1b35bcca86776069f76
+ZXING_TARBALL := zxing-cpp-2.0.0.tar.gz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/zxing/StaticLibrary_zxing.mk 
b/external/zxing/StaticLibrary_zxing.mk
index debc137abb98..431d523a49b3 100644
--- a/external/zxing/StaticLibrary_zxing.mk
+++ b/external/zxing/StaticLibrary_zxing.mk
@@ -33,9 +33,6 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/aztec/AZToken \
UnpackedTarball/zxing/core/src/aztec/AZWriter \
UnpackedTarball/zxing/core/src/BarcodeFormat \
-   UnpackedTarball/zxing/core/src/textcodec/Big5MapTable \
-   UnpackedTarball/zxing/core/src/textcodec/Big5TextDecoder \
-   UnpackedTarball/zxing/core/src/textcodec/Big5TextEncoder \
UnpackedTarball/zxing/core/src/BinaryBitmap \
UnpackedTarball/zxing/core/src/BitArray \
UnpackedTarball/zxing/core/src/BitMatrix \
@@ -45,7 +42,6 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/ConcentricFinder \
UnpackedTarball/zxing/core/src/Content \
UnpackedTarball/zxing/core/src/DecodeHints \
-   UnpackedTarball/zxing/core/src/DecodeStatus \
UnpackedTarball/zxing/core/src/datamatrix/DMBitLayout \
UnpackedTarball/zxing/core/src/datamatrix/DMDataBlock \
UnpackedTarball/zxing/core/src/datamatrix/DMDecoder \
@@ -57,20 +53,12 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/datamatrix/DMVersion \
UnpackedTarball/zxing/core/src/datamatrix/DMWriter \
UnpackedTarball/zxing/core/src/ECI \
-   UnpackedTarball/zxing/core/src/textcodec/GBTextEncoder \
-   UnpackedTarball/zxing/core/src/textcodec/GBTextDecoder \
UnpackedTarball/zxing/core/src/GenericGF \
UnpackedTarball/zxing/core/src/GenericGFPoly \
UnpackedTarball/zxing/core/src/GlobalHistogramBinarizer \
UnpackedTarball/zxing/core/src/GridSampler \
-   UnpackedTarball/zxing/core/src/GS1 \
UnpackedTarball/zxing/core/src/GTIN \
UnpackedTarball/zxing/core/src/HybridBinarizer \
-   UnpackedTarball/zxing/core/src/textcodec/JPTextDecoder \
-   UnpackedTarball/zxing/core/src/textcodec/JPTextEncoder \
-   UnpackedTarball/zxing/core/src/textcodec/KRHangulMapping \
-   UnpackedTarball/zxing/core/src/textcodec/KRTextDecoder \
-   UnpackedTarball/zxing/core/src/textcodec/KRTextEncoder \
UnpackedTarball/zxing/core/src/maxicode/MCBitMatrixParser \
UnpackedTarball/zxing/core/src/maxicode/MCDecoder \
UnpackedTarball/zxing/core/src/maxicode/MCReader \
@@ -136,8 +124,13 @@ $(eval $(call 
gb_StaticLibrary_add_generated_exception_objects,zxing,\
UnpackedTarball/zxing/core/src/TextDecoder \
UnpackedTarball/zxing/core/src/TextEncoder \
UnpackedTarball/zxing/core/src/TextUtfEncoding \
+   UnpackedTarball/zxing/core/src/Utf \
UnpackedTarball/zxing/core/src/WhiteRectDetector \
UnpackedTarball/zxing/core/src/ZXBigInteger \
 ))
 
-# vim: set noet sw=4 ts=4:
\ No newline at end of file
+$(eval $(call gb_StaticLibrary_add_generated_cobjects,zxing,\
+  

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

2023-02-24 Thread Noel Grandin (via logerrit)
 basic/source/inc/namecont.hxx|4 ++--
 basic/source/uno/namecont.cxx|6 ++
 canvas/source/vcl/textlayout.cxx |   16 +---
 canvas/source/vcl/textlayout.hxx |   10 --
 4 files changed, 17 insertions(+), 19 deletions(-)

New commits:
commit ce472616b93a3fe1945c6f3ecd058af92782b215
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:06:34 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 19:40:10 2023 +

BaseMutex->std::mutex in SfxLibrary

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

diff --git a/basic/source/inc/namecont.hxx b/basic/source/inc/namecont.hxx
index b5a261c2dde1..6a26b0c9ead2 100644
--- a/basic/source/inc/namecont.hxx
+++ b/basic/source/inc/namecont.hxx
@@ -44,6 +44,7 @@
 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -468,8 +469,7 @@ class SfxLibrary
 : public css::container::XNameContainer
 , public css::container::XContainer
 , public css::util::XChangesNotifier
-, public ::cppu::BaseMutex
-, public ::cppu::WeakComponentImplHelper<>
+, public ::comphelper::WeakComponentImplHelper<>
 {
 friend class SfxLibraryContainer;
 friend class SfxDialogLibraryContainer;
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 24bcddbded53..7716649ee5fa 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -2930,8 +2930,7 @@ sal_Bool SAL_CALL SfxLibraryContainer::supportsService( 
const OUString& _rServic
 // Ctor
 SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
 const Reference< XSimpleFileAccess3 >& xSFI )
-: WeakComponentImplHelper( m_aMutex )
-, mxSFI( xSFI )
+: mxSFI( xSFI )
 , mrModifiable( _rModifiable )
 , maNameContainer( new NameContainer(aType) )
 , mbLoaded( true )
@@ -2952,8 +2951,7 @@ SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, 
const Type& aType,
 SfxLibrary::SfxLibrary( ModifiableHelper& _rModifiable, const Type& aType,
 const Reference< XSimpleFileAccess3 >& xSFI,
 OUString aLibInfoFileURL, OUString aStorageURL, bool ReadOnly )
-: WeakComponentImplHelper( m_aMutex )
-, mxSFI( xSFI )
+: mxSFI( xSFI )
 , mrModifiable( _rModifiable )
 , maNameContainer( new NameContainer(aType) )
 , mbLoaded( false )
commit 3470c58be9c0361f9656ccdf36f7855ea46e5c69
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:04:33 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 19:39:59 2023 +

BaseMutex->std::mutex in vclcanvas::TextLayout

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

diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx
index 689720e4570a..34c154257f31 100644
--- a/canvas/source/vcl/textlayout.cxx
+++ b/canvas/source/vcl/textlayout.cxx
@@ -80,7 +80,6 @@ namespace vclcanvas
 CanvasFont::Reference  rFont,
 uno::Reference  xDevice,
 OutDevProviderSharedPtrxOutDev 
) :
-TextLayout_Base( m_aMutex ),
 maText(std::move( aText )),
 mpFont(std::move( rFont )),
 mxDevice(std::move( xDevice )),
@@ -88,13 +87,16 @@ namespace vclcanvas
 mnTextDirection( nDirection )
 {}
 
-void SAL_CALL TextLayout::disposing()
+void TextLayout::disposing(std::unique_lock& rGuard)
 {
-SolarMutexGuard aGuard;
-
-mpOutDevProvider.reset();
-mxDevice.clear();
-mpFont.clear();
+rGuard.unlock();
+{
+SolarMutexGuard aGuard;
+mpOutDevProvider.reset();
+mxDevice.clear();
+mpFont.clear();
+}
+rGuard.lock();
 }
 
 // XTextLayout
diff --git a/canvas/source/vcl/textlayout.hxx b/canvas/source/vcl/textlayout.hxx
index be8603d812f1..84f5fe6cab91 100644
--- a/canvas/source/vcl/textlayout.hxx
+++ b/canvas/source/vcl/textlayout.hxx
@@ -19,8 +19,7 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -33,11 +32,10 @@
 
 namespace vclcanvas
 {
-typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
+typedef ::comphelper::WeakComponentImplHelper< css::rendering::XTextLayout,
  css::lang::XServiceInfo > 
TextLayout_Base;
 
-class TextLayout : public ::cppu::BaseMutex,
-   public TextLayout_Base
+class TextLayout : public TextLayout_Base
 {
 public:
 /// make noncopyable
@@ -52,7 +50,7 @@ namespace vclcanvas
 OutDevProviderSharedPtr   xOutDev );
 
 /// Dispose

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

2023-02-24 Thread Noel Grandin (via logerrit)
 canvas/source/cairo/cairo_canvasfont.cxx |   12 +++-
 canvas/source/cairo/cairo_canvasfont.hxx |   10 --
 canvas/source/opengl/ogl_canvasfont.cxx  |5 ++---
 canvas/source/opengl/ogl_canvasfont.hxx  |8 +++-
 4 files changed, 16 insertions(+), 19 deletions(-)

New commits:
commit c55d7540efdd33618950c93cabcb680e8e26c894
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:03:15 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 19:39:49 2023 +

BaseMutex->std::mutex in oglcanvas::CanvasFont

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

diff --git a/canvas/source/opengl/ogl_canvasfont.cxx 
b/canvas/source/opengl/ogl_canvasfont.cxx
index 7309b9acd279..213dbe92b0e5 100644
--- a/canvas/source/opengl/ogl_canvasfont.cxx
+++ b/canvas/source/opengl/ogl_canvasfont.cxx
@@ -23,7 +23,6 @@ namespace oglcanvas
 CanvasFont::CanvasFont( rendering::FontRequest  
aFontRequest,
 const uno::Sequence< beans::PropertyValue >&
extraFontProperties,
 const geometry::Matrix2D&   
fontMatrix ) :
-CanvasFontBaseT( m_aMutex ),
 maFontRequest(std::move( aFontRequest )),
 mnEmphasisMark(0),
 maFontMatrix( fontMatrix )
@@ -35,7 +34,7 @@ namespace oglcanvas

 sal_Int8nDirection,

 sal_Int64   nRandomSeed )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 return new TextLayout( aText, nDirection, nRandomSeed, ImplRef( this ) 
);
 }
@@ -54,7 +53,7 @@ namespace oglcanvas
 
 rendering::FontRequest SAL_CALL CanvasFont::getFontRequest(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 return maFontRequest;
 }
diff --git a/canvas/source/opengl/ogl_canvasfont.hxx 
b/canvas/source/opengl/ogl_canvasfont.hxx
index 13b0f78a9d68..92e9d337b7a2 100644
--- a/canvas/source/opengl/ogl_canvasfont.hxx
+++ b/canvas/source/opengl/ogl_canvasfont.hxx
@@ -9,8 +9,7 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -24,10 +23,9 @@ namespace oglcanvas
 {
 class SpriteCanvas;
 
-typedef ::cppu::WeakComponentImplHelper< css::rendering::XCanvasFont > 
CanvasFontBaseT;
+typedef ::comphelper::WeakComponentImplHelper< css::rendering::XCanvasFont 
> CanvasFontBaseT;
 
-class CanvasFont : public ::cppu::BaseMutex,
-   public CanvasFontBaseT
+class CanvasFont : public CanvasFontBaseT
 {
 public:
 typedef rtl::Reference ImplRef;
commit db295ca04a6a7ffa9525c43af80609801d22fb62
Author: Noel Grandin 
AuthorDate: Fri Feb 24 14:02:13 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 19:39:39 2023 +

BaseMutex->std::mutex in CanvasFont

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

diff --git a/canvas/source/cairo/cairo_canvasfont.cxx 
b/canvas/source/cairo/cairo_canvasfont.cxx
index 36c1733ef62a..16af11838a91 100644
--- a/canvas/source/cairo/cairo_canvasfont.cxx
+++ b/canvas/source/cairo/cairo_canvasfont.cxx
@@ -39,7 +39,6 @@ namespace cairocanvas
 const uno::Sequence< beans::PropertyValue >&
/*rExtraFontProperties*/,
 const geometry::Matrix2D&   
rFontMatrix,
 SurfaceProviderRef  
rDevice ) :
-CanvasFont_Base( m_aMutex ),
 maFont( vcl::Font( rFontRequest.FontDescription.FamilyName,
   rFontRequest.FontDescription.StyleName,
   Size( 0, ::basegfx::fround(rFontRequest.CellSize) ) ) ),
@@ -86,11 +85,14 @@ namespace cairocanvas
 pOutDev->EnableMapMode(bOldMapState);
 }
 
-void SAL_CALL CanvasFont::disposing()
+void CanvasFont::disposing(std::unique_lock& rGuard)
 {
-SolarMutexGuard aGuard;
-
-mpRefDevice.clear();
+rGuard.unlock();
+{
+SolarMutexGuard aGuard;
+mpRefDevice.clear();
+}
+rGuard.lock();
 }
 
 uno::Reference< rendering::XTextLayout > SAL_CALL  
CanvasFont::createTextLayout( const rendering::StringContext& aText, sal_Int8 
nDirection, sal_Int64 nRandomSeed )
diff --git a/canvas/source/cairo/cairo_canvasfont.hxx 
b/canvas/source/cairo/cairo_canvasfont.hxx
index 0ebe9acd81ce..e510f420c437 100644
--- a/canvas/source/cairo/cairo_canvasfont.hxx
+++ b/canvas/source/cairo/cairo_canvasfont.hxx
@@ -

[Libreoffice-commits] core.git: sal/inc sal/Library_sal.mk sal/osl

2023-02-24 Thread Mike Kaganski (via logerrit)
 sal/Library_sal.mk   |1 
 sal/inc/thread_internal.hxx  |   18 +
 sal/osl/all/threadshared.cxx |   45 +++
 sal/osl/unx/thread.cxx   |   82 ++-
 sal/osl/w32/thread.cxx   |   18 +
 5 files changed, 79 insertions(+), 85 deletions(-)

New commits:
commit e7bad15bc13292defd99cb561f867d8b77692e97
Author: Mike Kaganski 
AuthorDate: Tue Feb 21 12:58:11 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Feb 24 18:27:25 2023 +

Unify osl_{g,s}etThreadTextEncoding implementation across platforms

... using a static thread_local variable, as already was used on Windows;
this replaces the non-Windows implementation based on pthread_setspecific
and friends.

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

diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index decfa39ce304..e0bf325e38cd 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -94,6 +94,7 @@ $(eval $(call gb_Library_add_exception_objects,sal,\
sal/osl/all/log  \
sal/osl/all/mutexshared \
sal/osl/all/signalshared  \
+   sal/osl/all/threadshared \
sal/osl/all/utility \
sal/rtl/alloc_arena \
sal/rtl/alloc_cache \
diff --git a/sal/inc/thread_internal.hxx b/sal/inc/thread_internal.hxx
new file mode 100644
index ..09c60a5d3ed8
--- /dev/null
+++ b/sal/inc/thread_internal.hxx
@@ -0,0 +1,18 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#pragma once
+
+#include 
+
+#include 
+
+rtl_TextEncoding getThreadTextEncodingForInitialization();
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sal/osl/all/threadshared.cxx b/sal/osl/all/threadshared.cxx
new file mode 100644
index ..136369435235
--- /dev/null
+++ b/sal/osl/all/threadshared.cxx
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; 
fill-column: 100 -*- */
+/*
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include 
+
+#include 
+
+#include 
+
+#include 
+
+namespace
+{
+rtl_TextEncoding& getThreadTextEncodingImpl()
+{
+// Use OS-specific initial value
+static thread_local rtl_TextEncoding s_enc = 
getThreadTextEncodingForInitialization();
+return s_enc;
+}
+}
+
+rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding() { return 
getThreadTextEncodingImpl(); }
+
+rtl_TextEncoding SAL_CALL osl_setThreadTextEncoding(rtl_TextEncoding Encoding)
+{
+return std::exchange(getThreadTextEncodingImpl(), Encoding);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s 
cinkeys+=0=break: */
diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx
index b122c5f31f3f..ee34731a4456 100644
--- a/sal/osl/unx/thread.cxx
+++ b/sal/osl/unx/thread.cxx
@@ -27,6 +27,8 @@
 
 #include "system.hxx"
 #include "unixerrnostring.hxx"
+#include 
+
 #include 
 #if defined(OPENBSD)
 #include 
@@ -106,38 +108,19 @@ struct osl_thread_priority_st
 int m_Below_Normal;
 int m_Lowest;
 };
-#endif
-
-}
-
-#if !defined NO_PTHREAD_PRIORITY
 #define OSL_THREAD_PRIORITY_INITIALIZER { 127, 96, 64, 32, 0 }
 #endif
 
-static void osl_thread_priority_init_Impl();
-
-namespace {
-
-struct osl_thread_textencoding_st
-{
-pthread_key_tm_key; /* key to store thread local text encoding */
-rtl_TextEncoding m_default; /* the default text encoding */
-};
-
 }
 
-#define OSL_THREAD_TEXTENCODING_INITIALIZER { 0, RTL_TEXTENCODING_DONTKNOW }
-static void osl_thread_textencoding_init_Impl();
+#if !defined NO_PTHREAD_PRIORITY
 
 namespace {
 
 struct osl_thread_global_st
 {
 pthread_once_tm_once;
-#if !defined NO_PTHREAD_PRIORITY
 struct osl_thread_priority_st   

[Libreoffice-commits] core.git: sal/osl

2023-02-24 Thread Mike Kaganski (via logerrit)
 sal/osl/w32/nlsupport.cxx |  162 +-
 1 file changed, 33 insertions(+), 129 deletions(-)

New commits:
commit d7fd46b5155bda021b09faecdefba26f6a59e997
Author: Mike Kaganski 
AuthorDate: Tue Feb 21 17:55:26 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Feb 24 17:50:14 2023 +

Simplify osl_getTextEncodingFromLocale on Windows

Drop all the complexity of thread-local storage used only to make
EnumSystemLocalesW thread-safe. Just create a BCP47 tag, and use
GetLocaleInfoEx to get the codepage.

Also use locale name API in imp_getProcessLocale, and avoid the
deprecated LCID API.

Change-Id: I223564cc6d2cc919b0e5aadda1c12beee21e49f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147625
Tested-by: Mike Kaganski 
Reviewed-by: Mike Kaganski 

diff --git a/sal/osl/w32/nlsupport.cxx b/sal/osl/w32/nlsupport.cxx
index f27b97aa7101..1c3648d5a09c 100644
--- a/sal/osl/w32/nlsupport.cxx
+++ b/sal/osl/w32/nlsupport.cxx
@@ -24,11 +24,11 @@
 
 #include "nlsupport.hxx"
 
-#include 
 #include 
 #include 
 #include 
 #include 
+#include 
 #include 
 
 /* XXX NOTE:
@@ -38,158 +38,62 @@
  * nine, including a terminating null character." NINE?!? In ISO 639 and ISO
  * 3166?
  */
-#define ELP_LANGUAGE_FIELD_LENGTH 4
-#define ELP_COUNTRY_FIELD_LENGTH  3
+constexpr int ELP_LANGUAGE_FIELD_LENGTH = 4;
+constexpr int ELP_COUNTRY_FIELD_LENGTH = 3;
 
-namespace {
-
-/** Struct used in EnumLocalesProcW() called via EnumSystemLocalesW() to obtain
-available locales.
-*/
-struct EnumLocalesParams
-{
-WCHAR Language[ELP_LANGUAGE_FIELD_LENGTH];
-WCHAR Country[ELP_COUNTRY_FIELD_LENGTH];
-LCID  Locale;
-};
-
-}
-
-static DWORD g_dwTLSLocaleEncId = DWORD(-1);
-
-/*
- * callback function test
- */
-
-static BOOL CALLBACK EnumLocalesProcW( LPWSTR lpLocaleStringW )
-{
-/* check params received via TLS */
-EnumLocalesParams * params = static_cast(TlsGetValue( 
g_dwTLSLocaleEncId ));
-if( nullptr == params || '\0' == params->Language[0] )
-return FALSE;
-
-LPWSTR pszEnd;
-WCHAR langCode[ELP_LANGUAGE_FIELD_LENGTH];
-
-/* convert hex-string to LCID */
-LCID localeId = wcstol(lpLocaleStringW, &pszEnd, 16);
-
-/*
-get the ISO language code for this locale
-*/
-if( !GetLocaleInfoW( localeId, LOCALE_SISO639LANGNAME , langCode, 
ELP_LANGUAGE_FIELD_LENGTH ) )
-/* retry by going on */
-return TRUE;
-
-WCHAR ctryCode[ELP_COUNTRY_FIELD_LENGTH];
-
-/* continue if language code does not match */
-if( 0 != wcscmp( langCode, params->Language ) )
-return TRUE;
-
-/* check if country code is set and equals the current locale */
-if( '\0' != params->Country[0] && GetLocaleInfoW( localeId,
-LOCALE_SISO3166CTRYNAME , ctryCode, ELP_COUNTRY_FIELD_LENGTH ) 
)
-{
-/* save return value in TLS and break if found desired locale */
-if( 0 == wcscmp( ctryCode, params->Country ) )
-{
-params->Locale = localeId;
-return FALSE;
-}
-}
-else
-{
-/* fill with default values for that language */
-LANGID langId = LANGIDFROMLCID( localeId );
-
-/* exchange sublanguage with SUBLANG_NEUTRAL */
-langId = MAKELANGID( PRIMARYLANGID( langId ), SUBLANG_NEUTRAL );
-
-/* and use default sorting order */
-params->Locale = MAKELCID( langId, SORT_DEFAULT );
-
-return FALSE;
-}
-
-/* retry by going on */
-return TRUE;
-}
-
-static rtl_TextEncoding GetTextEncodingFromLCID( LCID localeId )
+static int GetLocaleInfoN(LPCWSTR l, LCTYPE t, DWORD& n)
 {
-/* query ansi codepage for given locale */
-WCHAR ansiCP[6];
-if( !localeId || !GetLocaleInfoW( localeId, LOCALE_IDEFAULTANSICODEPAGE, 
ansiCP, 6 ) )
-return RTL_TEXTENCODING_DONTKNOW;
-
-/* if GetLocaleInfo returns "0", it is a UNICODE only locale */
-if( 0 == wcscmp( ansiCP, L"0" ) )
-return RTL_TEXTENCODING_UNICODE;
-
-/* values returned from GetLocaleInfo are decimal based */
-WCHAR *pwcEnd;
-UINT codepage = wcstol( ansiCP, &pwcEnd, 10 );
-
-/* find matching rtl encoding */
-return rtl_getTextEncodingFromWindowsCodePage( codepage );
+return GetLocaleInfoEx(l, t | LOCALE_RETURN_NUMBER, 
reinterpret_cast(&n),
+   sizeof(n) / sizeof(WCHAR));
 }
 
 rtl_TextEncoding SAL_CALL osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
 {
-struct EnumLocalesParams params = { L"", L"", 0 };
-
-/* initialise global TLS id */
-if( DWORD(-1) == g_dwTLSLocaleEncId )
-{
-oslMutex globalMutex = * osl_getGlobalMutex();
-
-/* initializing must be thread save */
-osl_acquireMutex( globalMutex );
-
-if( DWORD(-1) == 

[Libreoffice-commits] core.git: 3 commits - basic/CppunitTest_basic_macros.mk basic/qa dbaccess/Executable_odbcconfig.mk dbaccess/win32 include/systools solenv/gbuild

2023-02-24 Thread Mike Kaganski (via logerrit)
 basic/CppunitTest_basic_macros.mk   |2 
 basic/qa/cppunit/test_vba.cxx   |9 +---
 dbaccess/Executable_odbcconfig.mk   |5 --
 dbaccess/win32/source/odbcconfig/odbcconfig.cxx |   12 ++---
 include/systools/win32/odbccp32.hxx |   54 
 solenv/gbuild/platform/com_MSC_class.mk |7 +--
 6 files changed, 67 insertions(+), 22 deletions(-)

New commits:
commit e403bf00af7767060f624077840921ceab04895d
Author: Mike Kaganski 
AuthorDate: Fri Feb 24 15:13:39 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Feb 24 17:05:53 2023 +

Fix build in a specific VS2022 environment

Building libraries in setup_native using VS2022 failed for me reproducibly
for some time, with

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/reg_dlls.dll". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_reg_dlls.mk:10: 
C:/lo/src/build/instdir/program/reg_dlls.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/reg4allmsdoc.dll". The 
file or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_reg4allmsdoc.mk:10: 
C:/lo/src/build/instdir/program/reg4allmsdoc.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/regactivex.dll". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_regactivex.mk:10: 
C:/lo/src/build/instdir/program/regactivex.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/sdqsmsi.dll". The file or 
directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_sdqsmsi.mk:10: 
C:/lo/src/build/instdir/program/sdqsmsi.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/sellangmsi.dll". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_sellangmsi.mk:10: 
C:/lo/src/build/instdir/program/sellangmsi.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/shlxtmsi.dll". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_shlxtmsi.mk:10: 
C:/lo/src/build/instdir/program/shlxtmsi.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/sn_tools.dll". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_sn_tools.mk:10: 
C:/lo/src/build/instdir/program/sn_tools.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/odbcconfig.exe". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/dbaccess/Executable_odbcconfig.mk:10: 
C:/lo/src/build/instdir/program/odbcconfig.exe] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/instooofiltmsi.dll". The 
file or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_instooofiltmsi.mk:10: 
C:/lo/src/build/instdir/program/instooofiltmsi.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/qslnkmsi.dll". The file 
or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_qslnkmsi.mk:10: 
C:/lo/src/build/instdir/program/qslnkmsi.dll] Error 139

  mt.exe : general error c101008d: Failed to write the updated manifest to 
the resource of file "C:/lo/src/build/instdir/program/inst_msu_msi.dll". The 
file or directory is corrupted and unreadable.
  make[1]: *** [C:/lo/src/core/setup_native/Library_inst_msu_msi.mk:10: 
C:/lo/src/build/instdir/program/inst_msu_msi.dll] Error 139

It is caused by the -U_DLL and the first entries in 
gb_Library_use_system_win32_libs:
libcmt, libcpmt, libucrt, libvcruntime. They are needed to make the 
denerated DLLs
standalone, not dependent on presence of VCRT on the target system (they 
are called
from installer, when VCRT may not yet be present).

It seems to work OK for others, but somehow, this conflicts with the 
fastlink option
on my system, so just avoid it selectivel

[Libreoffice-commits] core.git: basegfx/source drawinglayer/source

2023-02-24 Thread Armin Le Grand (allotropia) (via logerrit)
 basegfx/source/tools/gradienttools.cxx  |   10 
 drawinglayer/source/texture/texture.cxx |   67 +---
 2 files changed, 46 insertions(+), 31 deletions(-)

New commits:
commit ae51dfb2379a9e9183afa9a1e5ee4fe4f4f0f7ef
Author: Armin Le Grand (allotropia) 
AuthorDate: Fri Feb 24 10:56:43 2023 +0100
Commit: Armin Le Grand 
CommitDate: Fri Feb 24 16:22:36 2023 +

MCGR: Adapted GradientRadial to make use of MCGR

Added to make GradientRadial work using the MCGR.
It is still 100% backward-compatible, so as long
as there is no source using this it will stay
invisible - by purpose.

Tests look good with this one, see the static
variable nUseGradientSteps.

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

diff --git a/basegfx/source/tools/gradienttools.cxx 
b/basegfx/source/tools/gradienttools.cxx
index b27443898f4e..37671374262c 100644
--- a/basegfx/source/tools/gradienttools.cxx
+++ b/basegfx/source/tools/gradienttools.cxx
@@ -515,15 +515,7 @@ namespace basegfx
 return 0.0;
 }
 
-const double t(1.0 - std::hypot(aCoor.getX(), aCoor.getY()));
-const sal_uInt32 nSteps(rGradInfo.getRequestedSteps());
-
-if(nSteps && t < 1.0)
-{
-return floor(t * nSteps) / double(nSteps - 1);
-}
-
-return t;
+return 1.0 - std::hypot(aCoor.getX(), aCoor.getY());
 }
 
 double getEllipticalGradientAlpha(const B2DPoint& rUV, const 
ODFGradientInfo& rGradInfo)
diff --git a/drawinglayer/source/texture/texture.cxx 
b/drawinglayer/source/texture/texture.cxx
index 73110fc8b8fd..44ce9336ac89 100644
--- a/drawinglayer/source/texture/texture.cxx
+++ b/drawinglayer/source/texture/texture.cxx
@@ -367,42 +367,65 @@ namespace drawinglayer::texture
 std::vector< B2DHomMatrixAndBColor >& rEntries,
 basegfx::BColor& rOuterColor)
 {
-if(mnColorSteps.size() <= 1)
+// no color at all, done
+if (mnColorSteps.empty())
 return;
 
-const basegfx::BColor maStart(mnColorSteps.front().getColor());
-const basegfx::BColor maEnd(mnColorSteps.back().getColor());
-const sal_uInt32 nSteps(basegfx::utils::calculateNumberOfSteps(
-maGradientInfo.getRequestedSteps(), maStart, maEnd));
+// fill in return parameter rOuterColor before returning
+rOuterColor = mnColorSteps.front().getColor();
 
-rOuterColor = maStart;
-const double fStepSize(1.0 / nSteps);
-B2DHomMatrixAndBColor aB2DHomMatrixAndBColor;
+// only one color, done
+if (mnColorSteps.size() < 2)
+return;
 
-for(sal_uInt32 a(1); a < nSteps; a++)
+// outer loop over ColorSteps, each is from cs_l to cs_r
+for (auto cs_l(mnColorSteps.begin()), cs_r(cs_l + 1); cs_r != 
mnColorSteps.end(); cs_l++, cs_r++)
 {
-const double fSize(1.0 - (fStepSize * a));
-aB2DHomMatrixAndBColor.maB2DHomMatrix = 
maGradientInfo.getTextureTransform() * 
basegfx::utils::createScaleB2DHomMatrix(fSize, fSize);
-aB2DHomMatrixAndBColor.maBColor = interpolate(maStart, maEnd, 
double(a) / double(nSteps - 1));
-rEntries.push_back(aB2DHomMatrixAndBColor);
+// get colors & calculate steps
+const basegfx::BColor aCStart(cs_l->getColor());
+const basegfx::BColor aCEnd(cs_r->getColor());
+const sal_uInt32 nSteps(basegfx::utils::calculateNumberOfSteps(
+maGradientInfo.getRequestedSteps(), aCStart, aCEnd));
+
+// get offsets & calculate StripeWidth
+const double fOffsetStart(cs_l->getOffset());
+const double fOffsetEnd(cs_r->getOffset());
+const double fStripeWidth((fOffsetEnd - fOffsetStart) / 
nSteps);
+
+// get correct start for innner loop (see above)
+const sal_uInt32 nStartInnerLoop(cs_l == mnColorSteps.begin() 
? 1 : 0);
+
+for (sal_uInt32 innerLoop(nStartInnerLoop); innerLoop < 
nSteps; innerLoop++)
+{
+// calculate size/radius
+const double fSize(1.0 - (fOffsetStart + (fStripeWidth * 
innerLoop)));
+
+// set and add at target
+B2DHomMatrixAndBColor aB2DHomMatrixAndBColor;
+
+aB2DHomMatrixAndBColor.maB2DHomMatrix = 
maGradientInfo.getTextureTransform() * 
basegfx::utils::createScaleB2DHomMatrix(fSize, fSize);
+aB2DHomMatrixAndBColor.maBColor = interpolate(aCStart, 
aCEnd, double(innerLoop) / double(nSteps - 1));
+r

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

2023-02-24 Thread Patrick Luby (via logerrit)
 svtools/source/misc/acceleratorexecute.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 99e6cbab7bb5954f0ee5792d07e1ba543260f434
Author: Patrick Luby 
AuthorDate: Wed Feb 22 16:22:00 2023 -0500
Commit: Andras Timar 
CommitDate: Fri Feb 24 16:15:21 2023 +

Fix build error when compiling on iOS or macOS with Xcode 14.2

Commit 67fcd647341118747a4e7cd404d907d29613778c was missing a return value

Signed-off-by: Patrick Luby 
Change-Id: I1e6a0bf2ec65d3bb03eced6518611a7567a34a6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147492
Tested-by: Jenkins CollaboraOffice 
Reviewed-by: Patrick Luby 

diff --git a/svtools/source/misc/acceleratorexecute.cxx 
b/svtools/source/misc/acceleratorexecute.cxx
index 819c0daf5e43..bc25a45661bd 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -421,6 +421,8 @@ css::uno::Reference 
AcceleratorExecute::lok_
 }
 catch(const css::container::NoSuchElementException&)
 {}
+
+return css::uno::Reference();
 }
 
 void 
AcceleratorExecute::lok_setModuleConfig(css::uno::Reference
 acceleratorConfig)


[Libreoffice-commits] core.git: include/test test/CppunitTest_test_a11y.mk test/Module_test.mk test/qa test/source

2023-02-24 Thread Colomban Wendling (via logerrit)
 include/test/a11y/accessibletestbase.hxx |   99 +++
 test/CppunitTest_test_a11y.mk|   31 ++
 test/Module_test.mk  |1 
 test/qa/cppunit/dialog.cxx   |   66 +
 test/source/a11y/accessibletestbase.cxx  |  156 +++
 5 files changed, 353 insertions(+)

New commits:
commit 0ccea0dd6e50199af4a7aae75d691b32c853b177
Author: Colomban Wendling 
AuthorDate: Thu Oct 27 19:07:44 2022 +0200
Commit: Michael Weghorn 
CommitDate: Fri Feb 24 15:13:39 2023 +

test: Add accessibility test dialog infrastructure

Interacting with dialogues in tests is non-trivial, so introduce
helpers to make it simpler and less error-prone.

Add tests for the infrastructure itself as well.

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

diff --git a/include/test/a11y/accessibletestbase.hxx 
b/include/test/a11y/accessibletestbase.hxx
index 50a39f63a7dd..913e24221353 100644
--- a/include/test/a11y/accessibletestbase.hxx
+++ b/include/test/a11y/accessibletestbase.hxx
@@ -24,6 +24,7 @@
 #include 
 
 #include 
+#include 
 
 #include 
 #include 
@@ -129,6 +130,104 @@ protected:
 return activateMenuItem(menuBar, names...);
 }
 
+/* Dialog handling */
+class Dialog
+{
+friend class AccessibleTestBase;
+
+private:
+VclPtr mxWindow;
+bool mbAutoClose;
+
+Dialog(vcl::Window* pWindow, bool bAutoClose = true);
+
+public:
+virtual ~Dialog();
+
+explicit operator bool() const { return mxWindow && 
!mxWindow->isDisposed(); }
+bool operator!() const { return !bool(*this); }
+
+void setAutoClose(bool bAutoClose) { mbAutoClose = bAutoClose; }
+
+css::uno::Reference getAccessible() 
const
+{
+return mxWindow ? mxWindow->GetAccessible() : nullptr;
+}
+
+bool close(sal_Int32 result = VclResponseType::RET_CANCEL);
+};
+
+class DialogWaiter
+{
+public:
+virtual ~DialogWaiter() {}
+
+/**
+ * @brief Waits for the associated dialog to close
+ * @param nTimeoutMs Maximum delay to wait the dialog for
+ * @returns @c true if the dialog closed, @c false if timeout was 
reached
+ *
+ * @throws css::uno::RuntimeException if an unexpected dialog poped up 
instead of the
+ * expected one.
+ * @throws Any exception that the user callback supplied to 
awaitDialog() might have thrown.
+ */
+virtual bool waitEndDialog(sal_uInt64 nTimeoutMs = 3000) = 0;
+};
+
+/**
+ * @brief Helper to call user code when a given dialog opens
+ * @param name The title of the dialog window to wait for
+ * @param callback The user code to run when the given dialog opens
+ * @param bAutoClose Whether to automatically cancel the dialog after the 
user code finished, if
+ *   the dialog is still there.  You should leave this to 
@c true unless you
+ *   know exactly what you are doing, see below.
+ * @returns A @c DialogWaiter wrapper on which call waitEndDialog() after 
having triggered the
+ *  dialog in some way.
+ *
+ * This function makes it fairly easy and safe to execute code once a 
dialog pops up:
+ * @code
+ * auto waiter = awaitDialog(u"Special Characters", [this](Dialog &dialog) 
{
+ * // for example, something like this:
+ * // something();
+ * // CPPUNIT_ASSERT(somethingElse);
+ * });
+ * CPPUNIT_ASSERT(activateMenuItem(u"Some menu", u"Some Item Triggering a 
Dialog..."));
+ * CPPUNIT_ASSERT(waiter->waitEndDialog());
+ * @endcode
+ *
+ * @note The user code might actually be executed before 
DialogWaiter::waitEndDialog() is
+ *   called.  It is actually likely to be called at the time the call 
that triggers the
+ *   dialog happens.  However, as letting an exception slip in a event 
handler is likely to
+ *   cause problems, exceptions are forwarded to the 
DialogWaiter::waitEndDialog() call.
+ *   However, note that you cannot rely on something like this:
+ *   @code
+ *   int foo = 0;
+ *   auto waiter = awaitDialog(u"Some Dialog", [&foo](Dialog&) {
+ *   CPPUNIT_ASSERT_EQUAL(1, foo);
+ *   });
+ *   CPPUNIT_ASSERT(activateMenuItem(u"Some menu", u"Some Item 
Triggering a Dialog..."));
+ *   foo = 1; // here, the callback likely already ran as a result of 
the
+ *// Scheduler::ProcessEventsToIdle() call that 
activateMenuItem() did.
+ *   CPPUNIT_ASSERT(waiter->waitEndDialog());
+ *   @endcode
+ *
+ * @warning You should almost certainly always leave @p bAutoClose to @c 
true. If it is set to
+

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

2023-02-24 Thread Mike Kaganski (via logerrit)
 oox/source/shape/WpsContext.cxx|   86 
--
 sw/qa/extras/ooxmlimport/data/tdf153791-shd_overrides_fontRef.docx |binary
 sw/qa/extras/ooxmlimport/ooxmlimport2.cxx  |   74 

 3 files changed, 114 insertions(+), 46 deletions(-)

New commits:
commit c15412eb96bda1037c12811f5818ed8ce1e603bd
Author: Mike Kaganski 
AuthorDate: Fri Feb 24 15:27:07 2023 +0300
Commit: Mike Kaganski 
CommitDate: Fri Feb 24 15:00:08 2023 +

tdf#153791: paragraph's/character's shd overrides shape style's fontRef

I couldn't find any references to this in documentation (ECMA-376, MS-OE376)
regarding this, but Word ignores the font properties (including color) 
defined
in the shape style's fontRef for txbxContent's paragraphs / runs that have 
shd
elements with non-auto fill color.

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

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 9fb3812923b2..ca87085165d8 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -677,62 +677,56 @@ oox::core::ContextHandlerRef 
WpsContext::onCreateContext(sal_Int32 nElementToken
 
 // Apply character color of the shape to the shape's textbox.
 uno::Reference xText(mxShape, uno::UNO_QUERY);
-uno::Reference xTextCursor = 
xText->createTextCursor();
-xTextCursor->gotoStart(false);
-xTextCursor->gotoEnd(true);
-uno::Reference 
xTextBoxPropertySet(xTextCursor,
-
uno::UNO_QUERY);
 uno::Any xCharColor = 
xPropertySet->getPropertyValue("CharColor");
 Color aColor = COL_AUTO;
 if ((xCharColor >>= aColor) && aColor != COL_AUTO)
 {
-const uno::Reference 
xPropertyState(xTextCursor,
-   
uno::UNO_QUERY);
-const beans::PropertyState ePropertyState
-= xPropertyState->getPropertyState("CharColor");
-if (ePropertyState == beans::PropertyState_DEFAULT_VALUE)
-{
-xTextBoxPropertySet->setPropertyValue("CharColor", 
xCharColor);
-}
-else
+// tdf#135923 Apply character color of the shape to the 
textrun
+//when the character color of the textrun is 
default.
+// tdf#153791 But only if the run has no background color 
(shd element in OOXML)
+if (uno::Reference 
paraEnumAccess{
+xText, uno::UNO_QUERY })
 {
-// tdf#135923 Apply character color of the shape to 
the textrun
-//when the character color of the textrun 
is default.
-uno::Reference 
paraEnumAccess(
-xText, uno::UNO_QUERY);
-if (paraEnumAccess.is())
-{
-uno::Reference paraEnum(
-paraEnumAccess->createEnumeration());
+uno::Reference paraEnum(
+paraEnumAccess->createEnumeration());
 
-while (paraEnum->hasMoreElements())
-{
-uno::Reference 
xParagraph(paraEnum->nextElement(),
-
uno::UNO_QUERY);
-uno::Reference 
runEnumAccess(
-xParagraph, uno::UNO_QUERY);
-if (!runEnumAccess.is())
+while (paraEnum->hasMoreElements())
+{
+uno::Reference 
xParagraph(paraEnum->nextElement(),
+
uno::UNO_QUERY);
+uno::Reference 
runEnumAccess(
+xParagraph, uno::UNO_QUERY);
+if (!runEnumAccess.is())
+continue;
+if (uno::Reference 
xParaPropSet{ xParagraph,
+   
   uno::UNO_QUERY })
+if 
((xParaPropSet->getPropertyValue("ParaBackColor") >>= aColor)
+&& aColor != COL_AUTO)
 continue;
 
-uno::Reference runEnum
-  

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

2023-02-24 Thread Andrea Gelmini (via logerrit)
 sw/source/filter/html/svxcss1.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 78ae57d02c2a7e39c452b44855874bb8ad1dbc35
Author: Andrea Gelmini 
AuthorDate: Fri Feb 24 15:27:42 2023 +0100
Commit: Julien Nabet 
CommitDate: Fri Feb 24 14:59:50 2023 +

Fix typo

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

diff --git a/sw/source/filter/html/svxcss1.cxx 
b/sw/source/filter/html/svxcss1.cxx
index 076871c0ac71..1e63389f592c 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -286,7 +286,7 @@ struct SvxCSS1ItemIds
 sal_uInt16 nOrphans;
 sal_uInt16 nFormatSplit;
 
-// this looks a bit superflous? TypedWhichId nLRSpace{0};
+// this looks a bit superfluous? TypedWhichId nLRSpace{0};
 TypedWhichId nULSpace{0};
 sal_uInt16 nBox;
 sal_uInt16 nBrush;


[Libreoffice-commits] core.git: Changes to 'refs/tags/cp-22.05.10-7'

2023-02-24 Thread Andras Timar (via logerrit)
Tag 'cp-22.05.10-7' created by Andras Timar  at 
2023-02-24 14:35 +

cp-22.05.10-7

Changes since cp-22.05.10-6-1:
---
 0 files changed
---


[Libreoffice-commits] core.git: helpcontent2

2023-02-24 Thread Seth Chaiklin (via logerrit)
 helpcontent2 |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit c7c7e6333983f62cb115113d25946b7c064db197
Author: Seth Chaiklin 
AuthorDate: Fri Feb 24 14:20:05 2023 +
Commit: Gerrit Code Review 
CommitDate: Fri Feb 24 14:20:05 2023 +

Update git submodules

* Update helpcontent2 from branch 'master'
  to 85516b6afb26f8f214184fc5ce223bc9e2064448
  - tdf#153552 corrections to "Options" description

Change-Id: I73c71557766cde26d3c01898eb8327b9785d3218
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/147636
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/helpcontent2 b/helpcontent2
index a7c1500a74c7..85516b6afb26 16
--- a/helpcontent2
+++ b/helpcontent2
@@ -1 +1 @@
-Subproject commit a7c1500a74c7f5e136da4a70656d19c54f758092
+Subproject commit 85516b6afb26f8f214184fc5ce223bc9e2064448


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

2023-02-24 Thread Seth Chaiklin (via logerrit)
 source/text/swriter/01/0406.xhp |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 85516b6afb26f8f214184fc5ce223bc9e2064448
Author: Seth Chaiklin 
AuthorDate: Fri Feb 24 14:00:30 2023 +
Commit: Seth Chaiklin 
CommitDate: Fri Feb 24 14:20:04 2023 +

tdf#153552 corrections to "Options" description

Change-Id: I73c71557766cde26d3c01898eb8327b9785d3218
Reviewed-on: https://gerrit.libreoffice.org/c/help/+/147636
Reviewed-by: Seth Chaiklin 
Tested-by: Jenkins

diff --git a/source/text/swriter/01/0406.xhp 
b/source/text/swriter/01/0406.xhp
index 9131fb75ef..46d612fc10 100644
--- a/source/text/swriter/01/0406.xhp
+++ b/source/text/swriter/01/0406.xhp
@@ -67,7 +67,7 @@
 Adds the caption above or below 
the selected item. This option is only available for some 
objects.
 
 Options
-
+Opens the Options 
dialog, where it is possible to customize the appearance of the caption label. 

 
 
 AutoCaption


sc: test failure depending on order of execution

2023-02-24 Thread Xisco Fauli

Hello,

it seems there is a test in sc/qa/unit/subsequent_export_test2.cxx that 
fails depending on the order of execution.


If testTdf121260 is executed before testTdf107586, then it passes, 
otherwise, it fails with


##Failure Location unknown## : Error
Test name: ScExportTest2::testTdf121260
An uncaught exception of type com.sun.star.container.NoSuchElementException
- 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/package/source/zippackage/zipfileaccess.cxx:263: 
at 
/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/package/source/zippackage/zipfileaccess.cxx:263


which means the file 'xl/charts/chart1.xml' doesn't exist in the zip 
file and parseExport fails. See 
https://gerrit.libreoffice.org/c/core/+/147622


Anyone has any idea why the file is not created if testTdf107586 is 
executed first ?


Regards

--
Xisco Faulí
LibreOffice QA Team
IRC: x1sc0



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

2023-02-24 Thread Xisco Fauli (via logerrit)
 sd/qa/unit/import-tests.cxx |  300 ++--
 1 file changed, 71 insertions(+), 229 deletions(-)

New commits:
commit d31442848197678939144779e04d2510f049874a
Author: Xisco Fauli 
AuthorDate: Fri Feb 24 13:24:00 2023 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 24 13:20:20 2023 +

CppunitTest_sd_import_tests: use CPPUNIT_TEST_FIXTURE()

These suites are large enough so that avoiding the
declaration/registration/definition of each test manually saves a lot of
space.

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

diff --git a/sd/qa/unit/import-tests.cxx b/sd/qa/unit/import-tests.cxx
index 3ab567c43877..a52947493de8 100644
--- a/sd/qa/unit/import-tests.cxx
+++ b/sd/qa/unit/import-tests.cxx
@@ -81,162 +81,6 @@ public:
 : SdModelTestBase("/sd/qa/unit/data/")
 {
 }
-
-void testDocumentLayout();
-void testTdf152434();
-void testStandardConnectors();
-void testConnectors();
-void testTdf153036_resizedConnectorL();
-void testTdf150719();
-void testTdf149314();
-void testTdf149124();
-void testTdf148965();
-void testTdf89449();
-void testTdf147459();
-void testTdf146223();
-void testTdf144918();
-void testTdf144917();
-void testHyperlinkOnImage();
-void testTdf142645();
-void testTdf141704();
-void testTdf142915();
-void testTdf142913();
-void testTdf142590();
-void testCustomSlideShow();
-void testInternalHyperlink();
-void testHyperlinkColor();
-void testSmoketest();
-void testTdf131269();
-void testN759180();
-void testN778859();
-void testMasterPageStyleParent();
-void testGradientAngle();
-void testTdf97808();
-void testFillStyleNone();
-void testFdo64512();
-void testFdo71075();
-void testN828390_2();
-void testN828390_3();
-void testFdo68594();
-void testPlaceholderPriority();
-void testFdo72998();
-void testFdo77027();
-void testStrictOOXML();
-void testN862510_1();
-void testN862510_2();
-void testN862510_4();
-void testBnc870237();
-void testBnc887225();
-void testPredefinedTableStyle();
-void testBnc591147();
-void testCreationDate();
-void testMultiColTexts();
-void testBnc584721_1();
-void testBnc584721_2();
-void testBnc584721_4();
-void testBnc904423();
-void testShapeLineStyle();
-void testTableBorderLineStyle();
-void testBnc862510_6();
-void testBnc862510_7();
-#if ENABLE_PDFIMPORT
-void testPDFImportShared();
-#if defined(IMPORT_PDF_ELEMENTS)
-void testPDFImport();
-void testPDFImportSkipImages();
-#endif
-#endif
-void testBulletSuffix();
-void testBnc910045();
-void testRowHeight();
-void testTdf93830();
-void testTdf127129();
-void testTdf93097();
-void testTdf62255();
-void testTdf89927();
-void testTdf103800();
-void testTdf151767();
-void testTdf152070();
-
-CPPUNIT_TEST_SUITE(SdImportTest);
-
-CPPUNIT_TEST(testDocumentLayout);
-CPPUNIT_TEST(testTdf152434);
-CPPUNIT_TEST(testStandardConnectors);
-CPPUNIT_TEST(testConnectors);
-CPPUNIT_TEST(testTdf153036_resizedConnectorL);
-CPPUNIT_TEST(testTdf150719);
-CPPUNIT_TEST(testTdf149314);
-CPPUNIT_TEST(testTdf149124);
-CPPUNIT_TEST(testTdf148965);
-CPPUNIT_TEST(testTdf89449);
-CPPUNIT_TEST(testTdf147459);
-CPPUNIT_TEST(testTdf146223);
-CPPUNIT_TEST(testTdf144918);
-CPPUNIT_TEST(testTdf144917);
-CPPUNIT_TEST(testHyperlinkOnImage);
-CPPUNIT_TEST(testTdf142645);
-CPPUNIT_TEST(testTdf141704);
-CPPUNIT_TEST(testTdf142915);
-CPPUNIT_TEST(testTdf142913);
-CPPUNIT_TEST(testTdf142590);
-CPPUNIT_TEST(testCustomSlideShow);
-CPPUNIT_TEST(testInternalHyperlink);
-CPPUNIT_TEST(testHyperlinkColor);
-CPPUNIT_TEST(testSmoketest);
-CPPUNIT_TEST(testTdf131269);
-CPPUNIT_TEST(testN759180);
-CPPUNIT_TEST(testN778859);
-CPPUNIT_TEST(testMasterPageStyleParent);
-CPPUNIT_TEST(testGradientAngle);
-CPPUNIT_TEST(testTdf97808);
-CPPUNIT_TEST(testFillStyleNone);
-CPPUNIT_TEST(testFdo64512);
-CPPUNIT_TEST(testFdo71075);
-CPPUNIT_TEST(testN828390_2);
-CPPUNIT_TEST(testN828390_3);
-CPPUNIT_TEST(testFdo68594);
-CPPUNIT_TEST(testPlaceholderPriority);
-CPPUNIT_TEST(testFdo72998);
-CPPUNIT_TEST(testFdo77027);
-CPPUNIT_TEST(testStrictOOXML);
-CPPUNIT_TEST(testN862510_1);
-CPPUNIT_TEST(testN862510_2);
-CPPUNIT_TEST(testN862510_4);
-CPPUNIT_TEST(testBnc870237);
-CPPUNIT_TEST(testBnc887225);
-CPPUNIT_TEST(testPredefinedTableStyle);
-CPPUNIT_TEST(testBnc591147);
-CPPUNIT_TEST(testCreationDate);
-CPPUNIT_TEST(testMultiColTexts);
-CPPUNIT_TEST(testBnc584721_1);
-CPPUNIT_TEST(testBnc584721_2);
-

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

2023-02-24 Thread Noel Grandin (via logerrit)
 vcl/source/uitest/uno/uiobject_uno.cxx |1 -
 vcl/source/uitest/uno/uiobject_uno.hxx |8 +++-
 2 files changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 89f98a2a9ae48ac79d65db5956522e754930f5b6
Author: Noel Grandin 
AuthorDate: Thu Feb 23 15:11:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 13:06:37 2023 +

use comphelper::WeakComponentImplHelper for UIObjectUnoObj

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

diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx 
b/vcl/source/uitest/uno/uiobject_uno.cxx
index 06ec96a45ab6..a0a718096391 100644
--- a/vcl/source/uitest/uno/uiobject_uno.cxx
+++ b/vcl/source/uitest/uno/uiobject_uno.cxx
@@ -41,7 +41,6 @@ struct Notifier {
 }
 
 UIObjectUnoObj::UIObjectUnoObj(std::unique_ptr pObj):
-UIObjectBase(m_aMutex),
 mpObj(std::move(pObj))
 {
 }
diff --git a/vcl/source/uitest/uno/uiobject_uno.hxx 
b/vcl/source/uitest/uno/uiobject_uno.hxx
index 47fc54696832..e86ce1bfd289 100644
--- a/vcl/source/uitest/uno/uiobject_uno.hxx
+++ b/vcl/source/uitest/uno/uiobject_uno.hxx
@@ -9,8 +9,7 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 #include 
 #include 
 
@@ -18,12 +17,11 @@
 
 #include 
 
-typedef ::cppu::WeakComponentImplHelper <
+typedef ::comphelper::WeakComponentImplHelper <
 css::ui::test::XUIObject, css::lang::XServiceInfo
 > UIObjectBase;
 
-class UIObjectUnoObj : public cppu::BaseMutex,
-public UIObjectBase
+class UIObjectUnoObj : public UIObjectBase
 {
 private:
 std::unique_ptr mpObj;


[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - 40 commits - bin/check-elf-dynamic-objects configure.ac download.lst external/libffi external/Module_external.mk external/openssl

2023-02-24 Thread Michael Stahl (via logerrit)
 Makefile.fetch 
|1 
 RepositoryExternal.mk  
|   13 
 bin/check-elf-dynamic-objects  
|3 
 configure.ac   
|   11 
 download.lst   
|  838 ++
 external/Module_external.mk
|1 
 external/libffi/ExternalPackage_libffi.mk  
|   20 
 external/libffi/ExternalProject_libffi.mk  
|   50 
 external/libffi/Makefile   
|7 
 external/libffi/Module_libffi.mk   
|   18 
 external/libffi/README 
|3 
 external/libffi/UnpackedTarball_libffi.mk  
|   14 
 external/openssl/ExternalPackage_openssl.mk
|   12 
 external/openssl/ExternalProject_openssl.mk
|   18 
 external/openssl/UnpackedTarball_openssl.mk
|   12 
 external/openssl/ccb0a11145ee72b042d10593a64eaf9e8a55ec12.patch.1  
|   56 
 external/openssl/openssl-1.0.1h-win64.patch.1  
|   47 
 external/openssl/openssl-1.0.2k-cve-2020-1971.patch.1  
|  578 --
 external/openssl/openssl-3650-masm.patch.1 
|   35 
 external/openssl/openssl-fixbuild.patch.1  
|   23 
 external/openssl/openssl-no-multilib.patch.0   
|   38 
 external/openssl/openssllnx.patch  
|   23 
 external/openssl/opensslsol.patch  
|   20 
 external/openssl/opensslwnt.patch  
|  167 -
 external/openssl/opensslwnt_safeseh.patch  
|   23 
 external/postgresql/ExternalProject_postgresql.mk  
|2 
 external/postgresql/postgres-msvc-build.patch.1
|6 
 
external/python3/0001-3.6-bpo-17239-Disable-external-entities-in-SAX-parse.patch.1
 |   59 
 
external/python3/0001-3.6-closes-bpo-42938-Replace-snprintf-with-Python-un.patch.1
 |  175 --
 external/python3/0001-remove-long-double-from-ctypes-value-union.patch.1   
|   12 
 external/python3/ExternalPackage_python3.mk
|  335 ++-
 external/python3/ExternalProject_python3.mk
|   49 
 external/python3/UnpackedTarball_python3.mk
|   15 
 external/python3/i100492-freebsd.patch.1   
|   49 
 external/python3/internal-zlib.patch.0 
|   22 
 external/python3/python-3.3.0-clang.patch.1
|   13 
 external/python3/python-3.3.0-darwin.patch.1   
|   22 
 external/python3/python-3.3.0-pythreadstate.patch.1
|   15 
 external/python3/python-3.3.3-aix.patch.1  
|  146 -
 external/python3/python-3.3.3-disable-obmalloc.patch.0 
|   23 
 external/python3/python-3.3.3-elf-rpath.patch.1
|   15 
 external/python3/python-3.5.4-msvc-disable.patch.1 
|   21 
 external/python3/python-3.5.4-ssl.patch.1  
|   94 -
 external/python3/python-3.5.tweak.strip.soabi.patch
|2 
 external/python3/python-3.7.6-msvc-ssl.patch.1 
|   25 
 external/python3/python3-osx-avoid-new-10.13.patch.1   
|   61 
 external/python3/ubsan.patch.0 
|   45 
 pyuno/inc/pyuno.hxx
|1 
 pyuno/source/loader/pythonloader.py
|4 
 pyuno/source/loader/pyuno_loader.cxx   
|   14 
 pyuno/source/module/pyuno.cxx  
|   28 
 pyuno/source/module/pyuno_callable.cxx 
|   19 
 pyuno/source/module/pyuno_iterator.cxx 
|   40 
 pyuno/source/module/pyuno_runtime.cxx  

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

2023-02-24 Thread Noel Grandin (via logerrit)
 sc/inc/docpool.hxx  |4 
 sc/source/core/data/column.cxx  |2 --
 sc/source/core/data/column3.cxx |2 ++
 3 files changed, 2 insertions(+), 6 deletions(-)

New commits:
commit 3900f16e6939ba40f41b3ccd56a28f8275de318d
Author: Noel Grandin 
AuthorDate: Fri Feb 24 09:20:29 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 12:37:38 2023 +

improved fix for CppunitTest_sc_uicalc

Revert the previous fix
(commit 0714dfe7fdb0cd3a49d4eb0e771da8eb4aa84d7a)
and implement a better fix, was just a stale pointer

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

diff --git a/sc/inc/docpool.hxx b/sc/inc/docpool.hxx
index 9a2e24796e80..9280fb3602b0 100644
--- a/sc/inc/docpool.hxx
+++ b/sc/inc/docpool.hxx
@@ -22,7 +22,6 @@
 #include 
 #include 
 #include "scdllapi.h"
-#include 
 
 class ScStyleSheet;
 class ScDocument;
@@ -33,9 +32,6 @@ class SC_DLLPUBLIC ScDocumentPool final : public SfxItemPool
 sal_uInt64 mnCurrentMaxKey;
 
 public:
-// used when doing loading in parallel to prevent concurrent mutation of 
the pool
-std::mutex maPoolMutex;
-
 ScDocumentPool();
 private:
 virtual ~ScDocumentPool() override;
diff --git a/sc/source/core/data/column.cxx b/sc/source/core/data/column.cxx
index d2506074070b..fea2f84e5be0 100644
--- a/sc/source/core/data/column.cxx
+++ b/sc/source/core/data/column.cxx
@@ -624,8 +624,6 @@ void ScColumn::ApplyAttr( SCROW nRow, const SfxPoolItem& 
rAttr )
 
 ScDocumentPool* pDocPool = GetDoc().GetPool();
 
-std::unique_lock aGuard(pDocPool->maPoolMutex);
-
 const ScPatternAttr* pOldPattern = pAttrArray->GetPattern( nRow );
 ScPatternAttr aTemp(*pOldPattern);
 aTemp.GetItemSet().Put(rAttr);
diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx
index d92318134098..b0e22f98b3d1 100644
--- a/sc/source/core/data/column3.cxx
+++ b/sc/source/core/data/column3.cxx
@@ -867,6 +867,8 @@ bool ScColumn::UpdateScriptType( sc::CellTextAttr& rAttr, 
SCROW nRow, sc::CellSt
 
 SvNumberFormatter* pFormatter = rDocument.GetFormatTable();
 
+// fetch the pattern again, it might have changed under us
+pPattern = GetPattern(nRow);
 const Color* pColor;
 sal_uInt32 nFormat = pPattern->GetNumberFormat(pFormatter, pCondSet);
 OUString aStr = ScCellFormat::GetString(aCell, nFormat, &pColor, 
*pFormatter, rDocument);


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

2023-02-24 Thread Adoche Onaji (via logerrit)
 idl/inc/hash.hxx  |6 +++---
 idl/inc/object.hxx|2 +-
 idl/inc/slot.hxx  |6 +++---
 idl/source/objects/object.cxx |   10 +-
 idl/source/objects/slot.cxx   |2 +-
 idl/source/prj/svidl.cxx  |4 ++--
 6 files changed, 15 insertions(+), 15 deletions(-)

New commits:
commit 8429f5ca376196f1f26c6729cd2559a8a246b9da
Author: Adoche Onaji 
AuthorDate: Fri Feb 17 15:12:15 2023 +0100
Commit: Hossein 
CommitDate: Fri Feb 24 12:29:38 2023 +

tdf#114441 Convert sal_uLong to a better type

In slot.cxx, GetAttrCount() return a size_t type and same type can
be assigned directly to nSCount. In hash.hxx, sal_uLong was declared
in SvStringHashEntry, the only default parameter it the class takes
is aName (type OString) while nValue was directly initialized as 0
in the constructor. The interface to change nValue is through a method
setValue of same type.Also In idl/inc/hash.hxx SetValue() and GetValue 
functionsb are used in idl/source/prj/database.cxx with sal_uInt32 parameter 
and return type and thus, sal_uInt32  is suitable here.The instances of 
sal_uLong in source/objects/object.cxx are replaced with sal_uInt32. In 
object.cxx an iterator was declared using std::find
to find nId in rSuperList (originally declared as std::vector),
therefore if nId is sal_uInt32, the parent vector, rSuperList
should be sal_uInt32. This change is now applicable to the void method
InsertSlot's parameter rSuperList in object.hxx and also variables n,
nId, iter, rSuperList in InsertSlot definition block in the file
object.cxx. Variable aSuperList in obect.cxx is also changed to
sal_uInt32 because its an argument for rSuperList parameter.
nC1 and nC2 in idl/source/prj/svidl.cxx are chnaged from sal_uLong to 
size_t as this is suitable here.

Change-Id: Ie075875229a676ea32dbf9e3049881a479773703
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147220
Reviewed-by: Hossein 
Tested-by: Hossein 

diff --git a/idl/inc/hash.hxx b/idl/inc/hash.hxx
index 6bc904133f61..86b2af448133 100644
--- a/idl/inc/hash.hxx
+++ b/idl/inc/hash.hxx
@@ -29,7 +29,7 @@
 class SvStringHashEntry
 {
 OString aName;
-sal_uLong   nValue;
+sal_uInt32   nValue;
 public:
 SvStringHashEntry( OString aName_ )
 : aName(std::move(aName_))
@@ -39,8 +39,8 @@ public:
 
 const OString&  GetName() const { return aName; }
 
-voidSetValue( sal_uLong n ) { nValue = n; }
-sal_uLong   GetValue() const { return nValue; }
+voidSetValue( sal_uInt32 n ) { nValue = n; }
+sal_uInt32   GetValue() const { return nValue; }
 };
 
 class SvStringHashTable
diff --git a/idl/inc/object.hxx b/idl/inc/object.hxx
index 8d16ca563c74..b5c30c9e0247 100644
--- a/idl/inc/object.hxx
+++ b/idl/inc/object.hxx
@@ -71,7 +71,7 @@ private:
 SvIdlDataBase & rBase,
 SvStream & rOutStm );
 
-voidInsertSlots( SvSlotElementList& rList, 
std::vector& rSuperList,
+voidInsertSlots( SvSlotElementList& rList, 
std::vector& rSuperList,
 SvMetaClassList & rClassList,
 const OString& rPrefix, SvIdlDataBase& 
rBase );
 
diff --git a/idl/inc/slot.hxx b/idl/inc/slot.hxx
index f8ba61d98fa3..fd8e9c0ad5ce 100644
--- a/idl/inc/slot.hxx
+++ b/idl/inc/slot.hxx
@@ -48,7 +48,7 @@ public:
 SvBOOL   aContainer;
 OString  aDisableFlags;
 SvMetaSlot*  pNextSlot;
-sal_uLongnListPos;
+sal_uInt32   nListPos;
 SvBOOL   aReadOnlyDoc;
 
 voidWriteSlot( std::string_view rShellName,
@@ -104,9 +104,9 @@ public:
 boolGetContainer() const;
 boolGetReadOnlyDoc() const;
 
-sal_uLong   GetListPos() const
+sal_uInt32   GetListPos() const
 { return nListPos; }
-voidSetListPos(sal_uLong n)
+voidSetListPos(sal_uInt32 n)
 { nListPos = n; }
 voidResetSlotPointer()
 { pNextSlot = nullptr; }
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 510d3a8a791d..8c3cfb7b28ba 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -165,7 +165,7 @@ sal_uInt16 SvMetaClass::WriteSlots( std::string_view 
rShellName,
 return nSCount;
 }
 
-void SvMetaClass::InsertSlots( SvSlotElementList& rList, 
std::vector& rSuperList,
+void SvMetaClass::InsertSlots( SvSlotElementList& rList, 
std::vector& rSuperList,
 SvMetaClassList &rClassList,
 const OString& rPrefix, SvIdlDataBase& rBase)
 {
@@ -177,14 +177,14 @@ void SvMetaClass::InsertSlots( SvSlotElementList& rList, 
std::vecto

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

2023-02-24 Thread Xisco Fauli (via logerrit)
 chart2/qa/extras/chart2export.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 0629ebb23e8848b7b99913cac9ad07ac9e3fe670
Author: Xisco Fauli 
AuthorDate: Fri Feb 24 10:20:01 2023 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 24 12:24:15 2023 +

CppunitTest_chart2_export: re-enable test

It passes for me
Disabled in b4668f2c48db7 "disable the test" without giving
any reason why

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

diff --git a/chart2/qa/extras/chart2export.cxx 
b/chart2/qa/extras/chart2export.cxx
index f287577fb63a..cb205e1e1671 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -49,7 +49,7 @@ public:
 void testUpDownBars();
 void testDoughnutChart();
 void testDisplayUnits();
-// void testFdo74115WallGradientFill();
+void testFdo74115WallGradientFill();
 void testFdo74115WallBitmapFill();
 void testPieChartWallLineStyle();
 void testBarChartRotation();
@@ -100,7 +100,7 @@ public:
 CPPUNIT_TEST(testUpDownBars);
 CPPUNIT_TEST(testDoughnutChart);
 CPPUNIT_TEST(testDisplayUnits);
-// CPPUNIT_TEST(testFdo74115WallGradientFill);
+CPPUNIT_TEST(testFdo74115WallGradientFill);
 CPPUNIT_TEST(testFdo74115WallBitmapFill);
 CPPUNIT_TEST(testPieChartWallLineStyle);
 CPPUNIT_TEST(testBarChartRotation);
@@ -630,14 +630,14 @@ void Chart2ExportTest::testDisplayUnits()
 assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:valAx/c:dispUnits/c:builtInUnit", "val", 
"billions");
 }
 
-// void Chart2ExportTest::testFdo74115WallGradientFill()
-// {
-// load("/chart2/qa/extras/data/docx/", "fdo74115_WallGradientFill.docx");
-// xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open 
XML Text");
-// CPPUNIT_ASSERT(pXmlDoc);
-//
-// assertXPath(pXmlDoc, 
"/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill");
-// }
+void Chart2ExportTest::testFdo74115WallGradientFill()
+{
+loadFromURL(u"docx/fdo74115_WallGradientFill.docx");
+xmlDocUniquePtr pXmlDoc = parseExport("word/charts/chart", "Office Open 
XML Text");
+CPPUNIT_ASSERT(pXmlDoc);
+
+assertXPath(pXmlDoc, "/c:chartSpace/c:chart/c:plotArea/c:spPr/a:gradFill");
+}
 
 void Chart2ExportTest::testFdo74115WallBitmapFill()
 {


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

2023-02-24 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_filters_test.cxx |  495 +++--
 1 file changed, 119 insertions(+), 376 deletions(-)

New commits:
commit f12e547c42103a3b934b393b6b63c2b096bbd06e
Author: Xisco Fauli 
AuthorDate: Fri Feb 24 10:03:37 2023 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 24 12:12:47 2023 +

CppunitTest_sc_subsequent_filters_test: use CPPUNIT_TEST_FIXTURE()

These suites are large enough so that avoiding the
declaration/registration/definition of each test manually saves a lot of
space.

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

diff --git a/sc/qa/unit/subsequent_filters_test.cxx 
b/sc/qa/unit/subsequent_filters_test.cxx
index 52b0a1bf527e..e70d8885191d 100644
--- a/sc/qa/unit/subsequent_filters_test.cxx
+++ b/sc/qa/unit/subsequent_filters_test.cxx
@@ -79,270 +79,7 @@ class ScFiltersTest : public ScModelTestBase
 public:
 ScFiltersTest();
 
-//ods, xls, xlsx filter tests
-void testTdf138601_CondFormatXLSX();
-void testContentODS();
-void testContentXLS();
-void testContentXLSX();
-void testContentXLSXStrict(); // strict OOXML
-void testContentLotus123();
-void testContentDIF();
-void testContentXLSB();
-void testContentXLS_XML();
-void testContentGnumeric();
-void testCondFormatOperatorsSameRangeXLSX();
-void testTdf139934();
-void testTdf150452();
-void testTdf119292();
-void testTdf48731();
-void testCondFormatFormulaIsXLSX();
-void testCondFormatBeginsAndEndsWithXLSX();
-void testExtCondFormatXLSX();
-void testUpdateCircleInMergedCellODS();
-void testDeleteCircleInMergedCellODS();
-void testBooleanFormatXLSX();
-void testTdf143809();
-void testTdf76310();
-void testBasicCellContentODS();
-void testRangeNameXLS();
-void testRangeNameLocalXLS();
-void testRangeNameXLSX();
-void testRangeNameODS();
-void testHyperlinksXLSX();
-void testHardRecalcODS();
-void testFunctionsODS();
-void testFunctionsExcel2010();
-void testCeilingFloorXLSX();
-void testCachedFormulaResultsODS();
-void testCachedMatrixFormulaResultsODS();
-void testFormulaDepAcrossSheetsODS();
-void testFormulaDepDeleteContentsODS();
-void testDatabaseRangesODS();
-void testDatabaseRangesXLS();
-void testDatabaseRangesXLSX();
-void testFormatsODS();
-// void testFormatsXLS();
-// void testFormatsXLSX();
-void testMatrixODS();
-void testMatrixXLS();
-void testDoubleThinBorder();
-void testBorderODS();
-void testBordersOoo33();
-void testBugFixesODS();
-void testBugFixesXLS();
-void testBugFixesXLSX();
-void testBrokenQuotesCSV();
-void testMergedCellsODS();
-void testRepeatedColumnsODS();
-void testDataValidityODS();
-void testDataValidityXLSX();
-void testDataTableMortgageXLS();
-void testDataTableOneVarXLSX();
-void testDataTableMultiTableXLSX();
-
-void testDataBarODS();
-void testDataBarXLSX();
-void testColorScaleODS();
-void testColorScaleXLSX();
-void testNewCondFormatODS();
-void testNewCondFormatXLSX();
-void testCondFormatThemeColorXLSX();
-void testCondFormatImportCellIs();
-void testCondFormatThemeColor2XLSX(); // negative bar color and axis color
-void testCondFormatThemeColor3XLSX(); // theme index 2 and 3 are switched
-void testComplexIconSetsXLSX();
-void testTdf101104();
-void testTdf64401();
-void testCondFormatParentXLSX();
-void testColorScaleNumWithRefXLSX();
-
-void testOrcusODSStyleInterface();
-
-void testLiteralInFormulaXLS();
-
-//change this test file only in excel and not in calc
-void testCellValueXLSX();
-
-/**
- * Test importing of xlsx document that previously had its row index off
- * by one. (fdo#76032)
- */
-void testRowIndex1BasedXLSX();
-
-//misc tests unrelated to the import filters
-void testPasswordNew();
-void testPasswordOld();
-void testPasswordWrongSHA();
-
-//test shape import
-void testControlImport();
-void testActiveXOptionButtonGroup();
-void testChartImportODS();
-#if HAVE_MORE_FONTS
-void testChartImportXLS();
-#endif
-
-void testNumberFormatHTML();
-void testNumberFormatCSV();
-
-void testCellAnchoredShapesODS();
-void testCellAnchoredHiddenShapesXLSX();
-
-void testFormulaDependency();
-void testTdf153444();
-void testTdf151046();
-
-void testRowHeightODS();
-void testRichTextContentODS();
-
-void testImportCrashes();
-void testTdf129681();
-void testTdf149484();
-void testTdf82254_csv_bom();
-void testEscapedUnicodeXLSX();
-void testTdf144758_DBDataDefaultOrientation();
-void testSharedFormulaXLS();
-void testSharedFormulaXLSX();
-void testSharedFormulaRefUpda

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

2023-02-24 Thread Noel Grandin (via logerrit)
 filter/source/pdf/pdfexport.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit c3178e3ad6a6faf1ea66898672e173b0008bce5c
Author: Noel Grandin 
AuthorDate: Thu Feb 23 15:46:48 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 12:00:34 2023 +

BaseMutex->std::mutex in PDFErrorRequest

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

diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx
index 9d97f2134f41..9d0971074dcd 100644
--- a/filter/source/pdf/pdfexport.cxx
+++ b/filter/source/pdf/pdfexport.cxx
@@ -37,8 +37,7 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 
 #include "pdfexport.hxx"
@@ -1090,10 +1089,9 @@ bool PDFExport::Export( const OUString& rFile, const 
Sequence< PropertyValue >&
 namespace
 {
 
-typedef cppu::WeakComponentImplHelper< task::XInteractionRequest > 
PDFErrorRequestBase;
+typedef comphelper::WeakComponentImplHelper< task::XInteractionRequest > 
PDFErrorRequestBase;
 
-class PDFErrorRequest : private cppu::BaseMutex,
-public PDFErrorRequestBase
+class PDFErrorRequest : public PDFErrorRequestBase
 {
 task::PDFExportException maExc;
 public:
@@ -1106,7 +1104,6 @@ public:
 
 
 PDFErrorRequest::PDFErrorRequest( task::PDFExportException aExc ) :
-PDFErrorRequestBase( m_aMutex ),
 maExc(std::move( aExc ))
 {
 }
@@ -1114,7 +,7 @@ PDFErrorRequest::PDFErrorRequest( 
task::PDFExportException aExc ) :
 
 uno::Any SAL_CALL PDFErrorRequest::getRequest()
 {
-osl::MutexGuard const guard( m_aMutex );
+std::unique_lock guard( m_aMutex );
 
 uno::Any aRet;
 aRet <<= maExc;


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

2023-02-24 Thread Rasenkai (via logerrit)
 vcl/source/app/settings.cxx |   11 ---
 1 file changed, 4 insertions(+), 7 deletions(-)

New commits:
commit e66940a8d147c1dff14e34c8e9421dcf2429cb4f
Author: Rasenkai 
AuthorDate: Fri Feb 10 19:25:48 2023 +0530
Commit: Hossein 
CommitDate: Fri Feb 24 11:49:57 2023 +

tdf#114441 vcl: source: Convert sal_uLong to a better type

* GetRed() , GetGreen()  and GetBlue() member functions return sal_uInt8,
  so the static_cast s are redundant, thus remove them and use sal_uInt8 
instead of sal_uLong.

* Simplified the code and made it more readable

Change-Id: Ia6ac34762f16400c3db6681d6a0cc0469116bb9b
Signed-off-by: Rasenkai 
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146778
Tested-by: Jenkins
Reviewed-by: Hossein 

diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 71d58a4aa5a8..4803fab81ce4 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2274,13 +2274,10 @@ void StyleSettings::Set3DColors( const Color& rColor )
 mxData->maDarkShadowColor.IncreaseLuminance(100);
 }
 
-sal_uLong   nRed= mxData->maLightColor.GetRed();
-sal_uLong   nGreen  = mxData->maLightColor.GetGreen();
-sal_uLong   nBlue   = mxData->maLightColor.GetBlue();
-nRed   += static_cast(mxData->maShadowColor.GetRed());
-nGreen += static_cast(mxData->maShadowColor.GetGreen());
-nBlue  += static_cast(mxData->maShadowColor.GetBlue());
-mxData->maCheckedColor = Color( static_cast(nRed/2), 
static_cast(nGreen/2), static_cast(nBlue/2) );
+sal_uInt8 nRed = (mxData->maLightColor.GetRed() + 
mxData->maShadowColor.GetRed()) / 2;
+sal_uInt8 nGreen = (mxData->maLightColor.GetGreen() + 
mxData->maShadowColor.GetGreen()) / 2;
+sal_uInt8 nBlue = (mxData->maLightColor.GetBlue() + 
mxData->maShadowColor.GetBlue()) / 2;
+mxData->maCheckedColor = Color(nRed, nGreen, nBlue);
 }
 else
 {


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

2023-02-24 Thread Noel Grandin (via logerrit)
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx |   10 ++
 chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx |8 
 2 files changed, 10 insertions(+), 8 deletions(-)

New commits:
commit bd70713132fa92abcf7255ff151ffe8666948b40
Author: Noel Grandin 
AuthorDate: Thu Feb 23 11:04:22 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 11:06:11 2023 +

BaseMutex->std::mutex in UpDownBarWrapper

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

diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx 
b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
index 6206878b2dbb..febfa344870b 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.cxx
@@ -126,7 +126,6 @@ namespace chart::wrapper
 UpDownBarWrapper::UpDownBarWrapper(
 bool bUp, std::shared_ptr spChart2ModelContact)
 : m_spChart2ModelContact(std::move( spChart2ModelContact ))
-, m_aEventListenerContainer( m_aMutex )
 , m_aPropertySetName( bUp ? OUString( "WhiteDay" ) : OUString( 
"BlackDay" ))
 {
 }
@@ -138,20 +137,23 @@ UpDownBarWrapper::~UpDownBarWrapper()
 //  XComponent 
 void SAL_CALL UpDownBarWrapper::dispose()
 {
+std::unique_lock g(m_aMutex);
 Reference< uno::XInterface > xSource( static_cast< ::cppu::OWeakObject* >( 
this ) );
-m_aEventListenerContainer.disposeAndClear( lang::EventObject( xSource ) );
+m_aEventListenerContainer.disposeAndClear( g, lang::EventObject( xSource ) 
);
 }
 
 void SAL_CALL UpDownBarWrapper::addEventListener(
 const Reference< lang::XEventListener >& xListener )
 {
-m_aEventListenerContainer.addInterface( xListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.addInterface( g, xListener );
 }
 
 void SAL_CALL UpDownBarWrapper::removeEventListener(
 const Reference< lang::XEventListener >& aListener )
 {
-m_aEventListenerContainer.removeInterface( aListener );
+std::unique_lock g(m_aMutex);
+m_aEventListenerContainer.removeInterface( g, aListener );
 }
 
 //XPropertySet
diff --git a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx 
b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
index b1605a0f7282..740097fc3051 100644
--- a/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
+++ b/chart2/source/controller/chartapiwrapper/UpDownBarWrapper.hxx
@@ -18,7 +18,7 @@
  */
 #pragma once
 
-#include 
+#include 
 
 #include 
 #include 
@@ -36,8 +36,7 @@ namespace chart::wrapper
 
 class Chart2ModelContact;
 
-class UpDownBarWrapper : public cppu::BaseMutex
-   , public ::cppu::WeakImplHelper
+class UpDownBarWrapper : public ::cppu::WeakImplHelper
 < css::lang::XComponent
 , css::lang::XServiceInfo
 , css::beans::XPropertySet
@@ -94,8 +93,9 @@ public:
 virtual css::uno::Sequence< css::uno::Any > SAL_CALL getPropertyDefaults( 
const css::uno::Sequence< OUString >& aPropertyNames ) override;
 
 private: //member
+std::mutex m_aMutex;
 std::shared_ptr< Chart2ModelContact >   m_spChart2ModelContact;
-::comphelper::OInterfaceContainerHelper3 
m_aEventListenerContainer;
+::comphelper::OInterfaceContainerHelper4 
m_aEventListenerContainer;
 
 OUString   m_aPropertySetName;
 };


[Libreoffice-commits] core.git: download.lst external/freetype

2023-02-24 Thread Taichi Haradaguchi (via logerrit)
 download.lst   |4 +--
 external/freetype/freetype-2.6.5.patch.1   |   36 ++---
 external/freetype/freetype-fd-hack.patch.0 |7 ++---
 external/freetype/ubsan.patch  |   17 ++---
 4 files changed, 26 insertions(+), 38 deletions(-)

New commits:
commit 803e3a63d879d8095b53b020cb648522fcb2af99
Author: Taichi Haradaguchi <20001...@ymail.ne.jp>
AuthorDate: Tue Feb 21 20:14:33 2023 +0900
Commit: Caolán McNamara 
CommitDate: Fri Feb 24 10:44:05 2023 +

freetype: upgrade to release 2.13.0

As the issue has been fixed upstream[1], removed some codes from 
"external/freetype/ubsan.patch".

[1]"[truetype] Fix undefined pointer arithmetic."



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

diff --git a/download.lst b/download.lst
index 0ba8412a5ca6..49f98fae9188 100644
--- a/download.lst
+++ b/download.lst
@@ -197,8 +197,8 @@ FREEHAND_TARBALL := libfreehand-0.1.2.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
-FREETYPE_SHA256SUM := 
ef5c336aacc1a079ff9262d6308d6c2a066dd4d2a905301c4adda9b354399033
-FREETYPE_TARBALL := freetype-2.12.0.tar.xz
+FREETYPE_SHA256SUM := 
5ee23abd047636c24b2d43c6625dcafc1d1aca64dec9e0d05df29592624c
+FREETYPE_TARBALL := freetype-2.13.0.tar.xz
 # three static lines
 # so that git cherry-pick
 # will not run into conflicts
diff --git a/external/freetype/freetype-2.6.5.patch.1 
b/external/freetype/freetype-2.6.5.patch.1
index c10c0bb38ea8..544e4fa496a6 100644
--- a/external/freetype/freetype-2.6.5.patch.1
+++ b/external/freetype/freetype-2.6.5.patch.1
@@ -1,7 +1,7 @@
 diff -up freetype/builds/unix/configure.dt freetype/builds/unix/configure
 freetype/builds/unix/configure.dt  2017-02-01 22:14:45.206257952 +0100
-+++ freetype/builds/unix/configure 2017-02-01 22:16:31.076183707 +0100
-@@ -9386,7 +9386,7 @@
+--- freetype/builds/unix/configure.dt  2023-02-09 15:33:17.0 +0900
 freetype/builds/unix/configure 2023-02-22 16:53:49.547740397 +0900
+@@ -9523,7 +9523,7 @@ _LT_EOF
case $host_cpu in
powerpc)
  # see comment about AmigaOS4 .so support
@@ -10,7 +10,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
  archive_expsym_cmds=''
  ;;
m68k)
-@@ -9402,7 +9402,7 @@
+@@ -9539,7 +9539,7 @@ _LT_EOF
allow_undefined_flag=unsupported
# Joseph Beckenbach  says some releases of gcc
# support --undefined.  This deserves some investigation.  FIXME
@@ -19,7 +19,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
else
ld_shlibs=no
fi
-@@ -9436,7 +9436,7 @@
+@@ -9573,7 +9573,7 @@ _LT_EOF
;;
  
  haiku*)
@@ -28,7 +28,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
link_all_deplibs=yes
;;
  
-@@ -9531,13 +9531,13 @@
+@@ -9669,13 +9669,13 @@ _LT_EOF
*Sun\ F*)   # Sun Fortran 8.3
  tmp_sharedflag='-G' ;;
esac
@@ -37,14 +37,14 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
  
  if test yes = "$supports_anon_versioning"; then
archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
- cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
+ cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> 
$output_objdir/$libname.ver~
  echo "local: *; };" >> $output_objdir/$libname.ver~
 -$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs 
$compiler_flags $wl-soname $wl$soname $wl-version-script 
$wl$output_objdir/$libname.ver -o $lib'
 +$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs 
$compiler_flags $wl-version-script $wl$output_objdir/$libname.ver -o $lib'
  fi
  
case $cc_basename in
-@@ -9567,8 +9567,8 @@
+@@ -9705,8 +9705,8 @@ _LT_EOF
archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
wlarc=
else
@@ -55,7 +55,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
fi
;;
  
-@@ -9586,8 +9586,8 @@
+@@ -9724,8 +9724,8 @@ _LT_EOF
  
  _LT_EOF
elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 
then
@@ -66,7 +66,7 @@ diff -up freetype/builds/unix/configure.dt 
freetype/builds/unix/configure
else
ld_shlibs=no
fi
-@@ -9615,8 +9615,8 @@
+@@ -9753,8 +9753,8 @@ _LT_EOF
  # requires that you compile everything twice, which is a pain.
  if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; 
then
hardcode_libdir_flag_sp

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

2023-02-24 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/subsequent_export_test.cxx |  450 --
 1 file changed, 114 insertions(+), 336 deletions(-)

New commits:
commit 6acf3ded0ee17e4cb2c839b5f11f4bbeee2e13b6
Author: Xisco Fauli 
AuthorDate: Fri Feb 24 08:59:08 2023 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 24 10:11:35 2023 +

CppunitTest_sc_subsequent_export_test: use CPPUNIT_TEST_FIXTURE()

These suites are large enough so that avoiding the
declaration/registration/definition of each test manually saves a lot of
space.

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

diff --git a/sc/qa/unit/subsequent_export_test.cxx 
b/sc/qa/unit/subsequent_export_test.cxx
index d5bade09b9fa..0a5e0eddf970 100644
--- a/sc/qa/unit/subsequent_export_test.cxx
+++ b/sc/qa/unit/subsequent_export_test.cxx
@@ -60,244 +60,15 @@ class ScExportTest : public ScModelTestBase
 protected:
 virtual void registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx) override;
 
+void testFunctionsExcel2010(const OUString& sFormatType);
+void testCeilingFloor(const OUString& sFormatType);
+void testExcelCellBorders(const OUString& sFormatType);
+
 public:
 ScExportTest()
 : ScModelTestBase("sc/qa/unit/data")
 {
 }
-
-void test();
-void testDefaultFontHeight();
-void testTdf139167();
-void testTdf113271();
-void testTdf139394();
-void testExtCondFormatXLSX();
-void testTdf90104();
-void testTdf111876();
-void testPasswordExport();
-void testTdf134332();
-void testConditionalFormatExportODS();
-void testConditionalFormatExportXLSX();
-void testCondFormatExportCellIs();
-void testTdf99856_dataValidationTest();
-void testProtectionKeyODS_UTF16LErtlSHA1();
-void testProtectionKeyODS_UTF8SHA1();
-void testProtectionKeyODS_UTF8SHA256ODF12();
-void testProtectionKeyODS_UTF8SHA256W3C();
-void testProtectionKeyODS_XL_SHA1();
-void testColorScaleExportODS();
-void testColorScaleExportXLSX();
-void testDataBarExportODS();
-void testDataBarExportXLSX();
-void testConditionalFormatRangeListXLSX();
-void testConditionalFormatContainsTextXLSX();
-void testConditionalFormatPriorityCheckXLSX();
-void testConditionalFormatOriginXLSX();
-void testTdf79998();
-void testLegacyCellAnchoredRotatedShape();
-void testMiscRowHeightExport();
-void testNamedRangeBugfdo62729();
-void testBuiltinRangesXLSX();
-void testRichTextExportODS();
-void testRichTextCellFormatXLSX();
-void testFormulaRefSheetNameODS();
-
-void testCellValuesExportODS();
-void testCellNoteExportODS();
-void testCellNoteExportXLS();
-void testFormatExportODS();
-
-void testCommentExportXLSX();
-void testCommentExportXLSX_2_XLSX();
-#if HAVE_MORE_FONTS
-void testCustomColumnWidthExportXLSX();
-#endif
-void testXfDefaultValuesXLSX();
-void testODF13();
-void testColumnWidthResaveXLSX();
-#if HAVE_MORE_FONTS
-void testColumnWidthExportFromODStoXLSX();
-#endif
-void testOutlineExportXLSX();
-void testHiddenEmptyRowsXLSX();
-void testHiddenEmptyColsODS();
-void testAllRowsHiddenXLSX();
-void testLandscapeOrientationXLSX();
-
-void testInlineArrayXLS();
-void testEmbeddedChartODS();
-void testEmbeddedChartXLS();
-void testCellAnchoredGroupXLS();
-
-void testFormulaReferenceXLS();
-void testSheetProtectionXLSX();
-void testSheetProtectionXLSB();
-
-void testCellBordersXLS();
-void testCellBordersXLSX();
-void testBordersExchangeXLSX();
-void testTrackChangesSimpleXLSX();
-void testSheetTabColorsXLSX();
-
-void testTdf133487();
-
-void testSharedFormulaExportXLS();
-void testSharedFormulaExportXLSX();
-void testSharedFormulaStringResultExportXLSX();
-
-void testFunctionsExcel2010(const OUString& sFormatType);
-void testFunctionsExcel2010XLSX();
-void testFunctionsExcel2010XLS();
-void testFunctionsExcel2010ODS();
-
-void testCeilingFloor(const OUString& sFormatType);
-void testCeilingFloorXLSX();
-void testCeilingFloorODSToXLSX();
-void testCeilingFloorXLS();
-void testCeilingFloorODS();
-
-void testCustomXml();
-
-void testRelativePathsODS();
-void testSheetProtectionODS();
-
-void testSwappedOutImageExport();
-void testLinkedGraphicRT();
-void testImageWithSpecialID();
-
-void testSupBookVirtualPathXLS();
-void testAbsNamedRangeHTML();
-void testTdf80149();
-void testSheetLocalRangeNameXLS();
-void testRelativeNamedExpressionsXLS();
-void testSheetTextBoxHyperlinkXLSX();
-void testFontSizeXLSX();
-void testSheetCharacterKerningSpaceXLSX();
-void testSheetCondensedCharacterSpaceXLSX();
-void testTextUnderlineColorXLSX();
-void testSheetRunParagraphPropertyXLSX

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

2023-02-24 Thread Noel Grandin (via logerrit)
 sot/source/unoolestorage/xolesimplestorage.cxx |   47 +
 sot/source/unoolestorage/xolesimplestorage.hxx |8 ++--
 2 files changed, 22 insertions(+), 33 deletions(-)

New commits:
commit 2f72de90f8a27b06aae0bf9ede93ed640764498b
Author: Noel Grandin 
AuthorDate: Wed Feb 22 15:03:49 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 10:07:39 2023 +

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

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

diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx 
b/sot/source/unoolestorage/xolesimplestorage.cxx
index 49a785ed5ff9..d64937d9b4e0 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -46,7 +46,6 @@ OLESimpleStorage::OLESimpleStorage(
 css::uno::Reference xContext,
 css::uno::Sequence const &aArguments)
 : m_bDisposed( false )
-, m_pListenersContainer( nullptr )
 , m_xContext(std::move( xContext ))
 , m_bNoTemporaryCopy( false )
 {
@@ -145,12 +144,6 @@ OLESimpleStorage::~OLESimpleStorage()
 dispose();
 } catch( uno::Exception& )
 {}
-
-if ( m_pListenersContainer )
-{
-delete m_pListenersContainer;
-m_pListenersContainer = nullptr;
-}
 }
 
 void OLESimpleStorage::UpdateOriginal_Impl()
@@ -263,7 +256,7 @@ void OLESimpleStorage::InsertNameAccessToStorage_Impl( 
BaseStorage* pStorage, co
 
 void SAL_CALL OLESimpleStorage::insertByName( const OUString& aName, const 
uno::Any& aElement )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -312,7 +305,7 @@ void SAL_CALL OLESimpleStorage::insertByName( const 
OUString& aName, const uno::
 
 void SAL_CALL OLESimpleStorage::removeByName( const OUString& aName )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -338,7 +331,7 @@ void SAL_CALL OLESimpleStorage::removeByName( const 
OUString& aName )
 
 void SAL_CALL OLESimpleStorage::replaceByName( const OUString& aName, const 
uno::Any& aElement )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -362,7 +355,7 @@ void SAL_CALL OLESimpleStorage::replaceByName( const 
OUString& aName, const uno:
 
 uno::Any SAL_CALL OLESimpleStorage::getByName( const OUString& aName )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -463,7 +456,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const 
OUString& aName )
 
 uno::Sequence< OUString > SAL_CALL OLESimpleStorage::getElementNames()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -491,7 +484,7 @@ uno::Sequence< OUString > SAL_CALL 
OLESimpleStorage::getElementNames()
 
 sal_Bool SAL_CALL OLESimpleStorage::hasByName( const OUString& aName )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -513,7 +506,7 @@ sal_Bool SAL_CALL OLESimpleStorage::hasByName( const 
OUString& aName )
 
 uno::Type SAL_CALL OLESimpleStorage::getElementType()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -524,7 +517,7 @@ uno::Type SAL_CALL OLESimpleStorage::getElementType()
 
 sal_Bool SAL_CALL OLESimpleStorage::hasElements()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
@@ -550,15 +543,15 @@ sal_Bool SAL_CALL OLESimpleStorage::hasElements()
 
 void SAL_CALL OLESimpleStorage::dispose()
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException();
 
-if ( m_pListenersContainer )
+if ( m_aListenersContainer.getLength(aGuard) )
 {
 lang::EventObject aSource( static_cast< ::cppu::OWeakObject* >(this) );
-m_pListenersContainer->disposeAndClear( aSource );
+m_aListenersContainer.disposeAndClear( aGuard, aSource );
 }
 
 m_pStorage.reset();
@@ -574,28 +567,24 @@ void SAL_CALL OLESimpleStorage::dispose()
 void SAL_CALL OLESimpleStorage::addEventListener(
 const uno::Reference< lang::XEventListener >& xListener )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if ( m_bDisposed )
 throw lang::DisposedException

[Libreoffice-commits] core.git: Branch 'distro/collabora/co-23.05' - 4 commits - offapi/com sw/inc sw/Library_sw.mk sw/qa sw/source

2023-02-24 Thread Miklos Vajna (via logerrit)
 offapi/com/sun/star/text/BaseFrameProperties.idl |6 ++
 sw/Library_sw.mk |1 
 sw/inc/format.hxx|1 
 sw/inc/formatflysplit.hxx|   52 ++
 sw/inc/hintids.hxx   |   53 +++
 sw/inc/swatrset.hxx  |2 
 sw/qa/core/attr/attr.cxx |   23 +
 sw/qa/core/unocore/unocore.cxx   |   28 
 sw/source/core/attr/formatflysplit.cxx   |   39 
 sw/source/core/bastyp/init.cxx   |5 +-
 sw/source/core/inc/flyfrms.hxx   |5 +-
 sw/source/core/layout/flycnt.cxx |   16 ++
 sw/source/core/unocore/unomap1.cxx   |1 
 13 files changed, 202 insertions(+), 30 deletions(-)

New commits:
commit 1bf5650dfcc8ee2e653a5d4e0f2c0f956f7f2051
Author: Miklos Vajna 
AuthorDate: Fri Jan 27 09:25:44 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 24 11:05:48 2023 +0100

sw: add an SwFlyAtContentFrame ctor that creates a follow fly frame

This is meant to be a called by a future SwFrame::GetNextFlyLeaf()
(similar to the existing SwFrame::GetNextSctLeaf()), which still has to
be added.

What an anchor should be for a follow fly frame is a bit unclear to me,
let's go with an explicit nullptr for now and we can clarify that later.

Towards an initial layout for multi-page fly frames.

(cherry picked from commit a6b64d02843d186485ff5c82106e6f9268a539c7)

Change-Id: I2429f47aef90dfe61340bfe244353dcefeb4ef1f

diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index 063ce72610c7..4f6bc91922f2 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -178,6 +178,7 @@ public:
 // #i28701#
 
 SwFlyAtContentFrame( SwFlyFrameFormat*, SwFrame*, SwFrame *pAnchor );
+SwFlyAtContentFrame(SwFlyAtContentFrame& rPrecede);
 
 void SetAbsPos( const Point &rNew );
 
diff --git a/sw/source/core/layout/flycnt.cxx b/sw/source/core/layout/flycnt.cxx
index c24a3a1e908a..afe01a91897f 100644
--- a/sw/source/core/layout/flycnt.cxx
+++ b/sw/source/core/layout/flycnt.cxx
@@ -50,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 
 
 using namespace ::com::sun::star;
 
@@ -81,6 +82,13 @@ SwFlyAtContentFrame::SwFlyAtContentFrame( SwFlyFrameFormat 
*pFormat, SwFrame* pS
 m_bAutoPosition = (RndStdIds::FLY_AT_CHAR == 
pFormat->GetAnchor().GetAnchorId());
 }
 
+SwFlyAtContentFrame::SwFlyAtContentFrame(SwFlyAtContentFrame& rPrecede)
+: SwFlyAtContentFrame(rPrecede.GetFormat(), rPrecede.getRootFrame(), 
/*pAnchor=*/nullptr)
+{
+SetFollow(rPrecede.GetFollow());
+rPrecede.SetFollow(this);
+}
+
 // #i28701#
 
 void SwFlyAtContentFrame::SwClientNotify(const SwModify& rMod, const SfxHint& 
rHint)
commit fe5bdabefca7aafa31374c27e2eb667f970e87c9
Author: Miklos Vajna 
AuthorDate: Thu Jan 26 11:10:25 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 24 11:05:48 2023 +0100

sw: inherit SwFlyAtContentFrame from SwFlowFrame

Checking how e.g. section frames are split in SwFrame::GetNextLeaf(), we
call into SwFrame::GetNextSctLeaf() which then calls a dedicated
SwSectionFrame ctor that connects the master with its follow.

Add infrastructure to be able to do the same for fly at-content frames.
(At-fly anchored and as-char anchored frames are not relevant for the
broader multi-page floating table picture. Also, SwFrame::GetLeaf()
wants to work with a non-abstract type, so allocating SwFlyFrame there
would make no sense, so inherit SwFlyAtContentFrame and not SwFlyFrame
from SwFlowFrame.)

This is meant to be a minimal change, that can be unconditional, seeing
that the only dynamic_cast to SwFlowFrame in RestoreContent() only does
something if the frame has a follow, which is never the case at the
moment.

Towards an initial layout for multi-page fly frames.

(cherry picked from commit bef6c5ca4edf55e64284d9dd264ba9a76476adab)

Change-Id: I8ea930bed4bbddb96b181796ab893e810ba9dcd4

diff --git a/sw/source/core/inc/flyfrms.hxx b/sw/source/core/inc/flyfrms.hxx
index cf79bf2fe92b..063ce72610c7 100644
--- a/sw/source/core/inc/flyfrms.hxx
+++ b/sw/source/core/inc/flyfrms.hxx
@@ -22,6 +22,7 @@
 #include 
 
 #include "flyfrm.hxx"
+#include "flowfrm.hxx"
 
 class SwNoTextFrame;
 
@@ -156,7 +157,7 @@ public:
 };
 
 // Flys that are bound to Content but not in Content
-class SwFlyAtContentFrame final: public SwFlyFreeFrame
+class SwFlyAtContentFrame final: public SwFlyFreeFrame, public SwFlowFrame
 {
 virtual void MakeAll(vcl::RenderContext* pRenderContext) override;
 
@@ -171,6 +172,7 @@ class SwFlyAtContentFrame final: public SwFlyFreeFrame
 virtual void RegisterAtCorrectPage() override;
 virtual void R

[Libreoffice-commits] dev-tools.git: scripts/git-cherry-gerrit.py

2023-02-24 Thread Miklos Vajna (via logerrit)
 scripts/git-cherry-gerrit.py |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 3ce714de3b5319efeee3f713c82d58649b3e0098
Author: Miklos Vajna 
AuthorDate: Fri Feb 24 10:59:18 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 24 10:00:57 2023 +

git-cherry-gerrit.py: fix crash when the rev-list output is empty

Traceback (most recent call last):
  File "git-cherry-gerrit.py", line 103, in 
main()
  File "git-cherry-gerrit.py", line 83, in main
changeid = get_change_id(git_cat_file, from_hash)
  File "git-cherry-gerrit.py", line 29, in get_change_id
size = first_line.strip().split(" ")[2]
IndexError: list index out of range

Change-Id: Icc53d038ceebc690998dc14da15f7b1b9ac4f341
Reviewed-on: https://gerrit.libreoffice.org/c/dev-tools/+/147618
Tested-by: Miklos Vajna 
Reviewed-by: Miklos Vajna 

diff --git a/scripts/git-cherry-gerrit.py b/scripts/git-cherry-gerrit.py
index bb8235fa..9ee285b2 100755
--- a/scripts/git-cherry-gerrit.py
+++ b/scripts/git-cherry-gerrit.py
@@ -74,7 +74,11 @@ def main() -> None:
 for to_hash in to_hashes:
 to_change_ids.append(get_change_id(git_cat_file, to_hash))
 
-from_hashes = from_pipe(["git", "rev-list", branch_point + ".." + 
cherry_from]).split("\n")
+from_hashes = []
+buffer = from_pipe(["git", "rev-list", branch_point + ".." + cherry_from])
+# If there are no commits, we want an empty list, not a list with one 
empty item.
+if buffer:
+from_hashes = buffer.split("\n")
 whitelist: List[str] = []
 if whitelist_file:
 with open(whitelist_file, "r") as stream:


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

2023-02-24 Thread László Németh (via logerrit)
 ucb/source/ucp/webdav-curl/DAVTypes.cxx |5 +
 1 file changed, 5 insertions(+)

New commits:
commit d6182cb6704c06f33d284874b9fe96c85cce5bf5
Author: László Németh 
AuthorDate: Thu Feb 23 15:50:49 2023 +0100
Commit: László Németh 
CommitDate: Fri Feb 24 09:43:55 2023 +

tdf#153642 ucb: fix broken save with cached DAVOptions

Trying to save a document within the lifetime of the
cached connection, e.g. re-save within a few seconds after
the first and successful save failed with an error message
in the case of Vibe 4.0.6 WebDAV server. Waiting 5-10 seconds
after the last try was the only workaround to re-save the
document.

Details: aDAVOptionsException in Content::getPropertyValues()
removed the isClass1 bit of the cached DAVOptions of the
same TargetURL (note: of the folder of the WebDAV document).
This disabled the DAV detection part of Content::getResourceType(),
and later the correct HTTP redirect for the DAV connection.
Fix this by keeping the cached bit in that case, too, when the
added connection has a different lifetime, than the cached one.

Follow-up to commit 30ca48f4dc0e65a3798e6b21574bc80f6d4953fa
"tdf#152493 ucb WebDAV: fix upload using HTTP 1.0 fallback".

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

diff --git a/ucb/source/ucp/webdav-curl/DAVTypes.cxx 
b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
index 972f70cbc17a..d5b255c175cd 100644
--- a/ucb/source/ucp/webdav-curl/DAVTypes.cxx
+++ b/ucb/source/ucp/webdav-curl/DAVTypes.cxx
@@ -164,6 +164,11 @@ void DAVOptionsCache::addDAVOptions( DAVOptions & 
rDAVOptions, const sal_uInt32
 { // already in cache, check LifeTime
 if ( (*it).second.getRequestedTimeLife() == nLifeTime )
 return; // same lifetime, do nothing
+
+// tdf#153642 keep cached Class1 bit at aDAVOptionsException to avoid 
of
+// losing the ability to resave the document within the lifetime 
because
+// of disabled DAV detection in getResourceType()
+rDAVOptions.setClass1( (*it).second.isClass1() );
 }
 // not in cache, add it
 TimeValue t1;


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

2023-02-24 Thread Henry Castro (via logerrit)
 extras/source/templates/presnt/Candy/styles.xml|2 +-
 extras/source/templates/presnt/Freshes/styles.xml  |2 +-
 extras/source/templates/presnt/Grey_Elegant/styles.xml |2 +-
 extras/source/templates/presnt/Portfolio/styles.xml|2 +-
 extras/source/templates/presnt/Yellow_Idea/styles.xml  |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit 978a4d7ca3229d00ee695bde56bd36586c37ad7d
Author: Henry Castro 
AuthorDate: Mon Feb 20 15:44:53 2023 -0400
Commit: Andras Timar 
CommitDate: Fri Feb 24 09:41:01 2023 +

sd: templates: fix missing attribute "style:display-name"

The function GetSelectedMasterPage() search by name, the
missing attributes and it defaults name to "Title", it
contains duplicates and it selects wrong Master Page.

Signed-off-by: Henry Castro 
Change-Id: Ia02d66693f33a96cb46fb45b6f435e5cd040ed76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147350
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 
(cherry picked from commit e9231535570da032b80cba355cd93c68911b2dbd)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147601

diff --git a/extras/source/templates/presnt/Candy/styles.xml 
b/extras/source/templates/presnt/Candy/styles.xml
index 54250269d89e..d9ae11fac954 100644
--- a/extras/source/templates/presnt/Candy/styles.xml
+++ b/extras/source/templates/presnt/Candy/styles.xml
@@ -2872,7 +2872,7 @@
 
   
 
-
+
   
 
   
diff --git a/extras/source/templates/presnt/Freshes/styles.xml 
b/extras/source/templates/presnt/Freshes/styles.xml
index 451cf6ad57a1..4672913a991d 100644
--- a/extras/source/templates/presnt/Freshes/styles.xml
+++ b/extras/source/templates/presnt/Freshes/styles.xml
@@ -2741,7 +2741,7 @@
   
   
 
-
+
   
   
 
diff --git a/extras/source/templates/presnt/Grey_Elegant/styles.xml 
b/extras/source/templates/presnt/Grey_Elegant/styles.xml
index a0bc94d63250..c7be043682a9 100644
--- a/extras/source/templates/presnt/Grey_Elegant/styles.xml
+++ b/extras/source/templates/presnt/Grey_Elegant/styles.xml
@@ -2917,7 +2917,7 @@
   
   
 
-
+
   
   
 
diff --git a/extras/source/templates/presnt/Portfolio/styles.xml 
b/extras/source/templates/presnt/Portfolio/styles.xml
index c3a9c3a462e5..acfad183144c 100644
--- a/extras/source/templates/presnt/Portfolio/styles.xml
+++ b/extras/source/templates/presnt/Portfolio/styles.xml
@@ -1075,7 +1075,7 @@
 
   
 
-
+
   
 
   
diff --git a/extras/source/templates/presnt/Yellow_Idea/styles.xml 
b/extras/source/templates/presnt/Yellow_Idea/styles.xml
index 7585928192cc..00ea6d65ce0b 100644
--- a/extras/source/templates/presnt/Yellow_Idea/styles.xml
+++ b/extras/source/templates/presnt/Yellow_Idea/styles.xml
@@ -2484,7 +2484,7 @@
 
   
 
-
+
   
 
   


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

2023-02-24 Thread Henry Castro (via logerrit)
 extras/source/templates/presnt/Candy/styles.xml|2 +-
 extras/source/templates/presnt/Freshes/styles.xml  |2 +-
 extras/source/templates/presnt/Grey_Elegant/styles.xml |2 +-
 extras/source/templates/presnt/Portfolio/styles.xml|2 +-
 extras/source/templates/presnt/Yellow_Idea/styles.xml  |2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

New commits:
commit e9231535570da032b80cba355cd93c68911b2dbd
Author: Henry Castro 
AuthorDate: Mon Feb 20 15:44:53 2023 -0400
Commit: Andras Timar 
CommitDate: Fri Feb 24 09:35:04 2023 +

sd: templates: fix missing attribute "style:display-name"

The function GetSelectedMasterPage() search by name, the
missing attributes and it defaults name to "Title", it
contains duplicates and it selects wrong Master Page.

Signed-off-by: Henry Castro 
Change-Id: Ia02d66693f33a96cb46fb45b6f435e5cd040ed76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147350
Tested-by: Andras Timar 
Reviewed-by: Andras Timar 

diff --git a/extras/source/templates/presnt/Candy/styles.xml 
b/extras/source/templates/presnt/Candy/styles.xml
index 54250269d89e..d9ae11fac954 100644
--- a/extras/source/templates/presnt/Candy/styles.xml
+++ b/extras/source/templates/presnt/Candy/styles.xml
@@ -2872,7 +2872,7 @@
 
   
 
-
+
   
 
   
diff --git a/extras/source/templates/presnt/Freshes/styles.xml 
b/extras/source/templates/presnt/Freshes/styles.xml
index 451cf6ad57a1..4672913a991d 100644
--- a/extras/source/templates/presnt/Freshes/styles.xml
+++ b/extras/source/templates/presnt/Freshes/styles.xml
@@ -2741,7 +2741,7 @@
   
   
 
-
+
   
   
 
diff --git a/extras/source/templates/presnt/Grey_Elegant/styles.xml 
b/extras/source/templates/presnt/Grey_Elegant/styles.xml
index a0bc94d63250..c7be043682a9 100644
--- a/extras/source/templates/presnt/Grey_Elegant/styles.xml
+++ b/extras/source/templates/presnt/Grey_Elegant/styles.xml
@@ -2917,7 +2917,7 @@
   
   
 
-
+
   
   
 
diff --git a/extras/source/templates/presnt/Portfolio/styles.xml 
b/extras/source/templates/presnt/Portfolio/styles.xml
index c3a9c3a462e5..acfad183144c 100644
--- a/extras/source/templates/presnt/Portfolio/styles.xml
+++ b/extras/source/templates/presnt/Portfolio/styles.xml
@@ -1075,7 +1075,7 @@
 
   
 
-
+
   
 
   
diff --git a/extras/source/templates/presnt/Yellow_Idea/styles.xml 
b/extras/source/templates/presnt/Yellow_Idea/styles.xml
index 7585928192cc..00ea6d65ce0b 100644
--- a/extras/source/templates/presnt/Yellow_Idea/styles.xml
+++ b/extras/source/templates/presnt/Yellow_Idea/styles.xml
@@ -2484,7 +2484,7 @@
 
   
 
-
+
   
 
   


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

2023-02-24 Thread Miklos Vajna (via logerrit)
 sw/source/core/layout/fly.cxx |   24 
 1 file changed, 24 insertions(+)

New commits:
commit 6068ae5df9da179e1d187e27117a9d761116f968
Author: Miklos Vajna 
AuthorDate: Fri Feb 24 08:21:22 2023 +0100
Commit: Miklos Vajna 
CommitDate: Fri Feb 24 09:24:56 2023 +

sw floattable: don't promise infinite growth in SwFlyFrame::Grow_()

In case the document has a single cell in the floating table with
multiple lines, we may need to split the cell, but currently we don't.

One problem is that SwTabFrame::MakeAll() for the master table gets an
error from Split(). Digging deeper, SwTextFrame::SplitFrame() is not
called at all, because SwTextFrame::FormatAdjust() thinks that the
content will fit, because SwTextFrameBreak::IsInside() says so. This
happens because it tries to do a test grow on the fly frame, and
that promises to grow as much as wanted.

Infinite grow for fly frames is reasonable by default, but we want to
limit the size for split flys, so a follow fly will be created. Fix the
problem by improving SwFlyFrame::Grow_() to handle the
IsFlySplitAllowed() case explicitly. Now we split the text frame, which
is needed but not enough to split the entire fly -> table -> row -> cell
-> text frame hierarchy.

SwSectionFrame::Grow_() has a similar limit in place already.

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

diff --git a/sw/source/core/layout/fly.cxx b/sw/source/core/layout/fly.cxx
index 398452d603be..994d3965ce2d 100644
--- a/sw/source/core/layout/fly.cxx
+++ b/sw/source/core/layout/fly.cxx
@@ -2059,6 +2059,30 @@ SwTwips SwFlyFrame::Grow_( SwTwips nDist, bool bTst )
 ::Notify( this, FindPageFrame(), aOld );
 return aRectFnSet.GetHeight(aNew)-aRectFnSet.GetHeight(aOld);
 }
+else
+{
+// We're in test mode. Don't promise infinite growth for split 
flys, rather limit the
+// max size to the bottom of the upper.
+const SwFrame* pAnchor = GetAnchorFrame();
+if (SwFrame* pAnchorChar = FindAnchorCharFrame())
+{
+pAnchor = pAnchorChar;
+}
+const SwFrame* pAnchorUpper = pAnchor ? pAnchor->GetUpper() : 
nullptr;
+if (pAnchorUpper && IsFlySplitAllowed())
+{
+SwTwips nDeadline = aRectFnSet.GetPrtBottom(*pAnchorUpper);
+SwTwips nTop = aRectFnSet.GetTop(getFrameArea());
+SwTwips nBottom = nTop + aRectFnSet.GetHeight(getFrameArea());
+// Calculate max grow and compare to the requested growth, 
adding to nDist may
+// overflow when it's LONG_MAX.
+SwTwips nMaxGrow = nDeadline - nBottom;
+if (nDist > nMaxGrow)
+{
+nDist = nMaxGrow;
+}
+}
+}
 return nDist;
 }
 return 0;


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

2023-02-24 Thread Xisco Fauli (via logerrit)
 sc/qa/unit/ucalc.cxx|  473 ---
 sc/qa/unit/ucalc_condformat.cxx |  157 ++
 sc/qa/unit/ucalc_copypaste.cxx  |  411 ++-
 sc/qa/unit/ucalc_datatransformation.cxx |  175 ++-
 sc/qa/unit/ucalc_formula.cxx|  483 +++-
 sc/qa/unit/ucalc_parallelism.cxx|   78 +
 sc/qa/unit/ucalc_pivottable.cxx |  209 -
 sc/qa/unit/ucalc_range.cxx  |   50 ---
 sc/qa/unit/ucalc_rangelst.cxx   |  116 +--
 sc/qa/unit/ucalc_sharedformula.cxx  |  116 +--
 sc/qa/unit/ucalc_sort.cxx   |   91 +-
 sc/qa/unit/ucalc_sparkline.cxx  |   58 ---
 12 files changed, 618 insertions(+), 1799 deletions(-)

New commits:
commit 818e98eed2ecf76b5ddcd17667d80fa935b7a91a
Author: Xisco Fauli 
AuthorDate: Thu Feb 23 21:08:54 2023 +0100
Commit: Xisco Fauli 
CommitDate: Fri Feb 24 09:24:02 2023 +

CppunitTest_sc_ucalc*: use CPPUNIT_TEST_FIXTURE()

These suites are large enough so that avoiding the
declaration/registration/definition of each test manually saves a lot of
space.

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

diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index 8b78c55ae005..e3f257825e97 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -81,261 +81,12 @@ struct HoriIterCheck
 
 class Test : public ScUcalcTestBase
 {
-public:
+protected:
 void checkPrecisionAsShown(OUString& rCode, double fValue, double 
fExpectedRoundVal);
 
 /** Get a separate new ScDocShell with ScDocument that suits unit test 
needs. */
 void getNewDocShell(ScDocShellRef& rDocShellRef);
 
-void testCollator();
-void testSharedStringPool();
-void testSharedStringPoolUndoDoc();
-void testRangeList();
-void testMarkData();
-void testInput();
-void testColumnIterator();
-void testTdf90698();
-void testTdf114406();
-void testTdf93951();
-void testTdf134490();
-void testTdf135249();
-void testDocStatistics();
-void testRowForHeight();
-
-/**
- * The 'data entries' data is a list of strings used for suggestions as
- * the user types in new cell value.
- */
-void testDataEntries();
-
-/**
- * Selection function is responsible for displaying quick calculation
- * results in the status bar.
- */
-void testSelectionFunction();
-
-void testMarkedCellIteration();
-
-void testCopyToDocument();
-
-void testHorizontalIterator();
-void testValueIterator();
-void testHorizontalAttrIterator();
-void testIteratorsUnallocatedColumnsAttributes();
-void testIteratorsDefPattern();
-void testLastChangedColFlagsWidth();
-
-/**
- * More direct test for cell broadcaster management, used to track formula
- * dependencies.
- */
-void testCellBroadcaster();
-
-void testFuncParam();
-void testNamedRange();
-void testInsertNameList();
-void testCSV();
-void testMatrix();
-void testMatrixComparisonWithErrors();
-void testMatrixConditionalBooleanResult();
-void testEnterMixedMatrix();
-void testMatrixEditable();
-
-void testCellCopy();
-void testSheetCopy();
-void testSheetMove();
-void testDataArea();
-void testAutofilter();
-void testAutoFilterTimeValue();
-void testAutofilterOptimizations();
-void testTdf76836();
-void testTdf76441();
-void testTdf142186();
-void testTdf137063();
-void testTdf126342();
-void testAdvancedFilter();
-void testDateFilterContains();
-void testTdf98642();
-void testMergedCells();
-void testUpdateReference();
-void testSearchCells();
-void testFormulaPosition();
-void testFormulaWizardSubformula();
-void testDiagonalBorders();
-void testWholeDocBorders();
-
-/**
- * Make sure the sheet streams are invalidated properly.
- */
-void testStreamValid();
-
-/**
- * Test built-in cell functions to make sure their categories and order
- * are correct.
- */
-void testFunctionLists();
-
-void testGraphicsInGroup();
-void testGraphicsOnSheetMove();
-
-/**
- * Test toggling relative/absolute flag of cell and cell range references.
- * This corresponds with hitting Shift-F4 while the cursor is on a formula
- * cell.
- */
-void testToggleRefFlag();
-
-/**
- * Test to make sure correct precedent / dependent cells are obtained when
- * preparing to jump to them.
- */
-void testJumpToPrecedentsDependents();
-
-void testSetBackgroundColor();
-void testRenameTable();
-
-void testTdf149665();
-void testTdf64001();
-void testAutoFill();
-void testAutoFillSimple();
-
-void testFindAreaPosVertical();

[Libreoffice-commits] core.git: Branch 'libreoffice-7-5' - vcl/qt5

2023-02-24 Thread Michael Weghorn (via logerrit)
 vcl/qt5/QtData.cxx |  293 -
 1 file changed, 92 insertions(+), 201 deletions(-)

New commits:
commit 091f56e50748e3fd807b9bae88652b68834aac3a
Author: Michael Weghorn 
AuthorDate: Tue Feb 21 08:23:10 2023 +0100
Commit: Michael Stahl 
CommitDate: Fri Feb 24 09:14:21 2023 +

tdf#144302 tdf#15 qt: Load cursor from icon theme

Load cursor from the icon theme similar to how the
gtk VCL plugins do it.

This not only allows using the themed cursor icons,
but also helps avoid QTBUG-95434 [1]
("Bitmap cursors not supported on QtWayland")
that would result in no cursor being shown on Wayland at all
when our custom bitmap cursors are used.

[1] https://bugreports.qt.io/browse/QTBUG-95434

Change-Id: Id65db4e7d71b8cee8a514c06c21c59dcc2afa889
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147379
Tested-by: Jenkins
Reviewed-by: Michael Weghorn 
(cherry picked from commit db6ed07f4c1a086e4962ff16d3ede9aea9e60952)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147357
Reviewed-by: Michael Stahl 

diff --git a/vcl/qt5/QtData.cxx b/vcl/qt5/QtData.cxx
index 7d2d0418e80e..cc2883ae80ca 100644
--- a/vcl/qt5/QtData.cxx
+++ b/vcl/qt5/QtData.cxx
@@ -24,135 +24,13 @@
 #include 
 #include 
 
+#include 
 #include 
+#include 
+#include 
 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-#include 
-
+#include 
+#include 
 #include 
 
 QtData::QtData()
@@ -176,17 +54,29 @@ QtData::QtData()
 // outline dtor b/c of FreetypeManager incomplete type
 QtData::~QtData() {}
 
-static QCursor* getQCursorFromXBM(const unsigned char* pBitmap, const unsigned 
char* pMask,
-  int nWidth, int nHeight, int nXHot, int 
nYHot)
+static QCursor* getQCursorFromIconTheme(const OUString& rIconName, int nXHot, 
int nYHot)
 {
-QBitmap aPixmap = QBitmap::fromData(QSize(nWidth, nHeight), pBitmap);
-QBitmap aMask = QBitmap::fromData(QSize(nWidth, nHeight), pMask);
-return new QCursor(aPixmap, aMask, nXHot, nYHot);
+const OUString sIconTheme = 
Application::GetSettings().GetStyleSettings().DetermineIconTheme();
+const OUString sUILang = 
Application::GetSettings().GetUILanguageTag().getBcp47();
+auto xMemStream = ImageTree::get().getImageStream(rIconName, sIconTheme, 
sUILang);
+if (!xMemStream)
+return nullptr;
+auto nLength = xMemStream->TellEnd();
+if (!nLength)
+{
+SAL_WARN("vcl.qt", "Cannot load cursor pixmap from empty stream.");
+return nullptr;
+}
+
+const unsigned char* pData = static_cast(xMemStream->GetData());
+QPixmap aPixmap;
+aPixmap.loadFromData(pData, nLength);
+return new QCursor(aPixmap, nXHot, nYHot);
 }
-#define MAKE_CURSOR(vcl_name, name)
\
+
+#define MAKE_CURSOR(vcl_name, name, icon_name) 
\
 case vcl_name: 
\
-pCursor = getQCursorFromXBM(name##curs##_bits, name##mask##_bits, 
name##curs_width,\
-name##curs_height, name##curs_x_hot, 
name##curs_y_hot);\
+pCursor = getQCursorFromIconTheme(icon_name, name##curs_x_hot, 
name##curs_y_hot);  \
 break
 
 #define MAP_BUILTIN(vcl_name, qt_enum) 
\
@@ -239,72 +129,73 @@ QCursor& QtData::getCursor(PointerStyle ePointerStyle)
 MAP_BUILTIN(PointerStyle::Move, Qt::SizeAllCursor);
 
  

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

2023-02-24 Thread Khaled Hosny (via logerrit)
 include/vcl/outdev.hxx |2 +-
 vcl/source/outdev/textline.cxx |   21 +++--
 2 files changed, 12 insertions(+), 11 deletions(-)

New commits:
commit 6327fdc149edab1eedabe5b0d4dde6bcf08a113e
Author: Khaled Hosny 
AuthorDate: Wed Feb 22 19:45:51 2023 +0200
Commit: Michael Stahl 
CommitDate: Fri Feb 24 09:12:15 2023 +

tdf#151968: Fix vertical position of RTL spelling wavy line

The code was guessing orientation based on the start and end points and
mistakenly considered Arabic text to be 180° rotated which ended up
raising the wavy line above baseline and covering the RTL text.

Use font orientation instead of guessing it. Caching wavy line seems
broken with RTL text as well (it was skipped for RTL before because of
the wrong guessed orientation, so probably never worked), so we skip it
explicitly as well for now.

Change-Id: I4b0f5c4d6be2c6e3d33ea79b917b14927374acfa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147488
Tested-by: Jenkins
Reviewed-by: خالد حسني 
(cherry picked from commit 5899b27e71430e490c2d3a6b87ae52c10f383ba7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147441
Reviewed-by: Michael Stahl 

diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index b2053f412b49..d4ff7a457a9a 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -758,7 +758,7 @@ private:
 SAL_DLLPRIVATE void ImplDrawPolyPolygonWithB2DPolyPolygon(const 
basegfx::B2DPolyPolygon& rB2DPolyPoly);
 ///@}
 
-SAL_DLLPRIVATE void ImplDrawWaveLineBezier(tools::Long nStartX, 
tools::Long nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long 
nWaveHeight, double fOrientation, tools::Long nLineWidth);
+SAL_DLLPRIVATE void ImplDrawWaveLineBezier(tools::Long nStartX, 
tools::Long nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long 
nWaveHeight, Degree10 nOrientation, tools::Long nLineWidth);
 
 
 /** @name Curved shape functions
diff --git a/vcl/source/outdev/textline.cxx b/vcl/source/outdev/textline.cxx
index 7c0f2f55d7ce..f88861d4c2f9 100644
--- a/vcl/source/outdev/textline.cxx
+++ b/vcl/source/outdev/textline.cxx
@@ -996,14 +996,13 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 tools::Long nStartY = aStartPt.Y();
 tools::Long nEndX = aEndPt.X();
 tools::Long nEndY = aEndPt.Y();
-double fOrientation = 0.0;
+auto nOrientation = mpFontInstance->mnOrientation;
 
 // handle rotation
-if (nStartY != nEndY || nStartX > nEndX)
+if (nOrientation)
 {
-fOrientation = basegfx::rad2deg(std::atan2(nStartY - nEndY, nEndX - 
nStartX));
 // un-rotate the end point
-aStartPt.RotateAround(nEndX, nEndY, 
Degree10(static_cast(-fOrientation * 10.0)));
+aStartPt.RotateAround(nEndX, nEndY, nOrientation);
 }
 
 // Handle HiDPI
@@ -1030,7 +1029,9 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 nLineWidth = 0;
 }
 
-if ( fOrientation == 0.0 )
+// The code below does not work for RTL text, that is what nEndX > nStartX
+// check is for.
+if ( nOrientation == 0_deg10 && nEndX > nStartX )
 {
 static vcl::DeleteOnDeinit< WavyLineCache > snLineCache {};
 if ( !snLineCache.get() )
@@ -1049,7 +1050,7 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 pVirtDev->SetBackground( Wallpaper( COL_TRANSPARENT ) );
 pVirtDev->Erase();
 pVirtDev->SetAntialiasing( AntialiasingFlags::Enable );
-pVirtDev->ImplDrawWaveLineBezier( 0, 0, nWordLength, 0, 
nWaveHeight, fOrientation, nLineWidth );
+pVirtDev->ImplDrawWaveLineBezier( 0, 0, nWordLength, 0, 
nWaveHeight, nOrientation, nLineWidth );
 BitmapEx aBitmapEx(pVirtDev->GetBitmapEx(Point(0, 0), 
pVirtDev->GetOutputSize()));
 
 // Ideally we don't need this block, but in the split rgb surface 
+ separate alpha surface
@@ -1070,10 +1071,10 @@ void OutputDevice::DrawWaveLine(const Point& rStartPos, 
const Point& rEndPos, to
 return;
 }
 
-ImplDrawWaveLineBezier( nStartX, nStartY, nEndX, nEndY, nWaveHeight, 
fOrientation, nLineWidth );
+ImplDrawWaveLineBezier( nStartX, nStartY, nEndX, nEndY, nWaveHeight, 
nOrientation, nLineWidth );
 }
 
-void OutputDevice::ImplDrawWaveLineBezier(tools::Long nStartX, tools::Long 
nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long nWaveHeight, double 
fOrientation, tools::Long nLineWidth)
+void OutputDevice::ImplDrawWaveLineBezier(tools::Long nStartX, tools::Long 
nStartY, tools::Long nEndX, tools::Long nEndY, tools::Long nWaveHeight, 
Degree10 nOrientation, tools::Long nLineWidth)
 {
 // we need a graphics
 if( !mpGraphics && !AcquireGraphics() )
@@ -1091,7 +1092,7 @@ void OutputDevice::ImplDrawWaveLineBezier(tools::Long 
nStartX, tools::Long nStar
 
 c

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

2023-02-24 Thread Caolán McNamara (via logerrit)
 sc/source/filter/oox/condformatbuffer.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 9ac308b99e37c228f2ef1cfa3e2b847ff7361f9a
Author: Caolán McNamara 
AuthorDate: Thu Feb 23 21:12:41 2023 +
Commit: Caolán McNamara 
CommitDate: Fri Feb 24 09:04:39 2023 +

crashtesting: null-deref seen on loading forum-mso-en4-399427.xlsx

and others. A problem since:

commit 8c9a6abf30e9ff1ebd5647f7c271e0d64643860a
Date:   Thu Feb 2 20:16:04 2023 +0100

tdf#138601 XLSX import: fix priority of conditional formatting rules

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

diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 1abb3bf91938..ac5c2738aa47 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1172,11 +1172,12 @@ void CondFormatBuffer::finalizeImport()
 minIndex = i;
 for (size_t j = i + 1; j < maCondFormats.size(); ++j)
 {
-if (maCondFormats[j]->maRules.begin()->first
-< maCondFormats[minIndex]->maRules.begin()->first)
-{
+const CondFormat::CondFormatRuleMap& rNextRules = 
maCondFormats[j]->maRules;
+const CondFormat::CondFormatRuleMap& rMinRules = 
maCondFormats[minIndex]->maRules;
+if (rNextRules.empty() || rMinRules.empty())
+continue;
+if (rNextRules.begin()->first < rMinRules.begin()->first)
 minIndex = j;
-}
 }
 if (i != minIndex)
 std::swap(maCondFormats[i], maCondFormats[minIndex]);


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

2023-02-24 Thread Noel Grandin (via logerrit)
 vcl/source/uitest/uno/uitest_uno.cxx |9 +++--
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 4b9cc680162d441d6d99d726792d5f902f46e879
Author: Noel Grandin 
AuthorDate: Thu Feb 23 15:10:38 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 09:03:52 2023 +

use comphelper::WeakComponentImplHelper for UITestUnoObj

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

diff --git a/vcl/source/uitest/uno/uitest_uno.cxx 
b/vcl/source/uitest/uno/uitest_uno.cxx
index 4e5a6e0e0391..9efbd3c3772d 100644
--- a/vcl/source/uitest/uno/uitest_uno.cxx
+++ b/vcl/source/uitest/uno/uitest_uno.cxx
@@ -7,8 +7,7 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -24,12 +23,11 @@
 
 namespace
 {
-typedef ::cppu::WeakComponentImplHelper <
+typedef ::comphelper::WeakComponentImplHelper <
 css::ui::test::XUITest, css::lang::XServiceInfo
 > UITestBase;
 
-class UITestUnoObj : public cppu::BaseMutex,
-public UITestBase
+class UITestUnoObj : public UITestBase
 {
 private:
 std::unique_ptr mpUITest;
@@ -59,7 +57,6 @@ public:
 }
 
 UITestUnoObj::UITestUnoObj():
-UITestBase(m_aMutex),
 mpUITest(new UITest)
 {
 }


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

2023-02-24 Thread Caolán McNamara (via logerrit)
 sc/source/filter/oox/condformatbuffer.cxx |9 +
 1 file changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 09d6e6c81633eef6eaecf011dc766cdc68e52fd7
Author: Caolán McNamara 
AuthorDate: Thu Feb 23 21:12:41 2023 +
Commit: Michael Stahl 
CommitDate: Fri Feb 24 08:57:11 2023 +

crashtesting: null-deref seen on loading forum-mso-en4-399427.xlsx

and others. A problem since:

commit 8c9a6abf30e9ff1ebd5647f7c271e0d64643860a
Date:   Thu Feb 2 20:16:04 2023 +0100

tdf#138601 XLSX import: fix priority of conditional formatting rules

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

diff --git a/sc/source/filter/oox/condformatbuffer.cxx 
b/sc/source/filter/oox/condformatbuffer.cxx
index 1abb3bf91938..ac5c2738aa47 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1172,11 +1172,12 @@ void CondFormatBuffer::finalizeImport()
 minIndex = i;
 for (size_t j = i + 1; j < maCondFormats.size(); ++j)
 {
-if (maCondFormats[j]->maRules.begin()->first
-< maCondFormats[minIndex]->maRules.begin()->first)
-{
+const CondFormat::CondFormatRuleMap& rNextRules = 
maCondFormats[j]->maRules;
+const CondFormat::CondFormatRuleMap& rMinRules = 
maCondFormats[minIndex]->maRules;
+if (rNextRules.empty() || rMinRules.empty())
+continue;
+if (rNextRules.begin()->first < rMinRules.begin()->first)
 minIndex = j;
-}
 }
 if (i != minIndex)
 std::swap(maCondFormats[i], maCondFormats[minIndex]);


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

2023-02-24 Thread Noel Grandin (via logerrit)
 canvas/source/cairo/cairo_textlayout.cxx |   19 ---
 canvas/source/cairo/cairo_textlayout.hxx |   10 --
 2 files changed, 12 insertions(+), 17 deletions(-)

New commits:
commit 1909c23d669676e8411143eb2cc0bf0c2b22f7ca
Author: Noel Grandin 
AuthorDate: Thu Feb 23 11:01:51 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 08:11:17 2023 +

BaseMutex->std::mutex in cairocanvas::TextLayout

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

diff --git a/canvas/source/cairo/cairo_textlayout.cxx 
b/canvas/source/cairo/cairo_textlayout.cxx
index 1a6f0143a60a..00a1d19d5577 100644
--- a/canvas/source/cairo/cairo_textlayout.cxx
+++ b/canvas/source/cairo/cairo_textlayout.cxx
@@ -75,7 +75,6 @@ namespace cairocanvas
 sal_Int64 /*nRandomSeed*/,
 CanvasFont::Reference rFont,
 SurfaceProviderRefrRefDevice ) :
-TextLayout_Base( m_aMutex ),
 maText(std::move( aText )),
 mpFont(std::move( rFont )),
 mpRefDevice(std::move( rRefDevice )),
@@ -87,10 +86,8 @@ namespace cairocanvas
 {
 }
 
-void SAL_CALL TextLayout::disposing()
+void TextLayout::disposing(std::unique_lock& /*rGuard*/)
 {
-::osl::MutexGuard aGuard( m_aMutex );
-
 mpFont.clear();
 mpRefDevice.clear();
 }
@@ -116,14 +113,14 @@ namespace cairocanvas
 
 uno::Sequence< double > SAL_CALL TextLayout::queryLogicalAdvancements(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 return maLogicalAdvancements;
 }
 
 void SAL_CALL TextLayout::applyLogicalAdvancements( const uno::Sequence< 
double >& aAdvancements )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 if( aAdvancements.getLength() != maText.Length )
 {
@@ -136,7 +133,7 @@ namespace cairocanvas
 
 geometry::RealRectangle2D SAL_CALL TextLayout::queryTextBounds(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 OutputDevice* pOutDev = mpRefDevice->getOutputDevice();
 if( !pOutDev )
@@ -227,21 +224,21 @@ namespace cairocanvas
 
 sal_Int8 SAL_CALL TextLayout::getMainTextDirection(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 return mnTextDirection;
 }
 
 uno::Reference< rendering::XCanvasFont > SAL_CALL TextLayout::getFont(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 return mpFont;
 }
 
 rendering::StringContext SAL_CALL TextLayout::getText(  )
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 return maText;
 }
@@ -260,7 +257,7 @@ namespace cairocanvas
const rendering::ViewState&   viewState,
const rendering::RenderState& renderState ) const
 {
-::osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 setupLayoutMode( rOutDev, mnTextDirection );
 
 if (maLogicalAdvancements.hasElements())
diff --git a/canvas/source/cairo/cairo_textlayout.hxx 
b/canvas/source/cairo/cairo_textlayout.hxx
index bec692e75707..ad9f3466081a 100644
--- a/canvas/source/cairo/cairo_textlayout.hxx
+++ b/canvas/source/cairo/cairo_textlayout.hxx
@@ -19,8 +19,7 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -36,11 +35,10 @@
 
 namespace cairocanvas
 {
-typedef ::cppu::WeakComponentImplHelper< css::rendering::XTextLayout,
+typedef ::comphelper::WeakComponentImplHelper< css::rendering::XTextLayout,
  css::lang::XServiceInfo > 
TextLayout_Base;
 
-class TextLayout : public ::cppu::BaseMutex,
-   public TextLayout_Base
+class TextLayout : public TextLayout_Base
 {
 public:
 /// make noncopyable
@@ -54,7 +52,7 @@ namespace cairocanvas
 SurfaceProviderRef  rRefDevice );
 
 /// Dispose all internal references
-virtual void SAL_CALL disposing() override;
+virtual void disposing(std::unique_lock& rGuard) override;
 
 // XTextLayout
 virtual css::uno::Sequence< css::uno::Reference< 
css::rendering::XPolyPolygon2D > > SAL_CALL queryTextShapes(  ) override;


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

2023-02-24 Thread Noel Grandin (via logerrit)
 sd/source/ui/inc/tools/PropertySet.hxx |   11 +++
 sd/source/ui/tools/PropertySet.cxx |   11 +++
 2 files changed, 6 insertions(+), 16 deletions(-)

New commits:
commit e0f05df76177174fce1d662b211b3047237debae
Author: Noel Grandin 
AuthorDate: Thu Feb 23 15:31:34 2023 +0200
Commit: Noel Grandin 
CommitDate: Fri Feb 24 08:10:25 2023 +

BaseMutex->std::mutex in sd::tools::PropertySet

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

diff --git a/sd/source/ui/inc/tools/PropertySet.hxx 
b/sd/source/ui/inc/tools/PropertySet.hxx
index c432783da394..04727be0dbe4 100644
--- a/sd/source/ui/inc/tools/PropertySet.hxx
+++ b/sd/source/ui/inc/tools/PropertySet.hxx
@@ -19,15 +19,14 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
 
 namespace sd::tools {
 
-typedef ::cppu::WeakComponentImplHelper <
+typedef ::comphelper::WeakComponentImplHelper <
 css::beans::XPropertySet
 > PropertySetInterfaceBase;
 
@@ -38,16 +37,12 @@ typedef ::cppu::WeakComponentImplHelper <
 In order to use it you have to derive from this class and implement the
 GetPropertyValue() and SetPropertyValue() methods.
 */
-class PropertySet
-: protected ::cppu::BaseMutex,
-  public PropertySetInterfaceBase
+class PropertySet : public PropertySetInterfaceBase
 {
 public:
 explicit PropertySet();
 virtual ~PropertySet() override;
 
-virtual void SAL_CALL disposing() override;
-
 // XPropertySet
 
 virtual css::uno::Reference
diff --git a/sd/source/ui/tools/PropertySet.cxx 
b/sd/source/ui/tools/PropertySet.cxx
index 057b7dd96ce3..c50a617de1b0 100644
--- a/sd/source/ui/tools/PropertySet.cxx
+++ b/sd/source/ui/tools/PropertySet.cxx
@@ -26,8 +26,7 @@ using namespace ::com::sun::star::uno;
 namespace sd::tools {
 
 PropertySet::PropertySet()
-: PropertySetInterfaceBase(m_aMutex),
-  mpChangeListeners(new ChangeListenerContainer)
+: mpChangeListeners(new ChangeListenerContainer)
 {
 }
 
@@ -35,10 +34,6 @@ PropertySet::~PropertySet()
 {
 }
 
-void SAL_CALL PropertySet::disposing()
-{
-}
-
 //- XPropertySet --
 
 Reference SAL_CALL PropertySet::getPropertySetInfo()
@@ -83,7 +78,7 @@ void SAL_CALL PropertySet::addPropertyChangeListener (
 if ( ! rxListener.is())
 throw lang::IllegalArgumentException();
 
-if (rBHelper.bDisposed || rBHelper.bInDispose)
+if (m_bDisposed)
 return;
 
 mpChangeListeners->emplace(rsPropertyName, rxListener);
@@ -145,7 +140,7 @@ void PropertySet::CallListeners (
 
 void PropertySet::ThrowIfDisposed()
 {
-if (rBHelper.bDisposed || rBHelper.bInDispose)
+if (m_bDisposed)
 {
 throw lang::DisposedException (
 "PropertySet object has already been disposed",


Re: request of uploading packages

2023-02-24 Thread Miklos Vajna
Hi,

On Thu, Feb 23, 2023 at 11:46:09PM +0900, taichi <20001...@ymail.ne.jp> wrote:
> https://curl.se/download/curl-7.88.1.tar.xz
> 
> https://ftp.postgresql.org/pub/source/v13.10/postgresql-13.10.tar.bz2

Done.

> https://github.com/zxing-cpp/zxing-cpp/archive/refs/tags/v2.0.0.zip

Got
https://github.com/zxing-cpp/zxing-cpp/archive/refs/tags/v2.0.0.tar.gz
instead, I guess that's what you meant.

And perhaps it would make sense to mail
hostmas...@documentfoundation.org to gain access to do this yourself
next time?

Regards,

Miklos