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

2021-12-26 Thread Mike Kaganski (via logerrit)
 sfx2/source/appl/shutdowniconw32.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit da86317827b494affb12039b9b7c817652f7d598
Author: Mike Kaganski 
AuthorDate: Mon Dec 27 08:10:57 2021 +0100
Commit: Mike Kaganski 
CommitDate: Mon Dec 27 08:12:22 2021 +0100

Missing include

... after commit ad492932e9b64991001a0eb5e0aa1fa7801bb3fa
author  Noel Grandin 
dateSat Dec 25 19:04:05 2021 +0200
use comphelper::WeakComponentImplHelper in ShutdownIcon

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

diff --git a/sfx2/source/appl/shutdowniconw32.cxx 
b/sfx2/source/appl/shutdowniconw32.cxx
index 540cc76172bf..4cf339b3eece 100644
--- a/sfx2/source/appl/shutdowniconw32.cxx
+++ b/sfx2/source/appl/shutdowniconw32.cxx
@@ -30,6 +30,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sw/source/uibase/inc/unoatxt.hxx |8 +++-
 sw/source/uibase/uno/unoatxt.cxx |3 +--
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 36df4a8929149ef106a0cd844eefa01e17497250
Author: Noel Grandin 
AuthorDate: Sun Dec 26 09:56:19 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 08:01:20 2021 +0100

use comphelper::WeakComponentImplHelper in SwXAutoTextEntry

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

diff --git a/sw/source/uibase/inc/unoatxt.hxx b/sw/source/uibase/inc/unoatxt.hxx
index 633a0630a4b2..b28a986ef90a 100644
--- a/sw/source/uibase/inc/unoatxt.hxx
+++ b/sw/source/uibase/inc/unoatxt.hxx
@@ -30,8 +30,7 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -152,8 +151,7 @@ public:
 
 class SwXAutoTextEntry final
 :public SfxListener
-,public cppu::BaseMutex
-,public cppu::WeakComponentImplHelper
+,public comphelper::WeakComponentImplHelper
 <
 css::text::XAutoTextEntry,
 css::lang::XServiceInfo,
@@ -176,7 +174,7 @@ class SwXAutoTextEntry final
 }
 void GetBodyText ();
 
-void SAL_CALL disposing() override;
+void disposing(std::unique_lock&) override;
 
 /** ensure that the current content (which may only be in-memory so far) 
is flushed to the auto text group file
 
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index e045d21d6d6a..ea8bd2d880ce 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -668,7 +668,6 @@ sal_Int64 SAL_CALL SwXAutoTextEntry::getSomething( const 
uno::Sequence< sal_Int8
 
 SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const OUString& 
rGroupName,
 const OUString& rEntryName) :
-WeakComponentImplHelper(m_aMutex),
 pGlossaries(pGlss),
 sGroupName(rGroupName),
 sEntryName(rEntryName)
@@ -744,7 +743,7 @@ void SwXAutoTextEntry::GetBodyText ()
 mxBodyText = new SwXBodyText ( xDocSh->GetDoc() );
 }
 
-void SwXAutoTextEntry::disposing()
+void SwXAutoTextEntry::disposing(std::unique_lock&)
 {
 SolarMutexGuard g;
 implFlushDocument(true);


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sw/source/uibase/sidebar/SwPanelFactory.cxx |   10 +++---
 1 file changed, 3 insertions(+), 7 deletions(-)

New commits:
commit e0770936a792be422aeebbece1004018e51d1eaf
Author: Noel Grandin 
AuthorDate: Sun Dec 26 09:52:57 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 08:00:54 2021 +0100

use comphelper::WeakComponentImplHelper in SwPanelFactory

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

diff --git a/sw/source/uibase/sidebar/SwPanelFactory.cxx 
b/sw/source/uibase/sidebar/SwPanelFactory.cxx
index ff5c0e58d93e..9dd70c0f3227 100644
--- a/sw/source/uibase/sidebar/SwPanelFactory.cxx
+++ b/sw/source/uibase/sidebar/SwPanelFactory.cxx
@@ -36,8 +36,7 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 
 
@@ -46,13 +45,11 @@ using namespace css::uno;
 
 namespace {
 
-typedef ::cppu::WeakComponentImplHelper <
+typedef comphelper::WeakComponentImplHelper <
 css::ui::XUIElementFactory, css::lang::XServiceInfo
 > PanelFactoryInterfaceBase;
 
-class SwPanelFactory
-: private ::cppu::BaseMutex
-, public PanelFactoryInterfaceBase
+class SwPanelFactory final : public PanelFactoryInterfaceBase
 {
 private:
 SwPanelFactory(SwPanelFactory const&) = delete;
@@ -77,7 +74,6 @@ public:
 };
 
 SwPanelFactory::SwPanelFactory()
-: PanelFactoryInterfaceBase(m_aMutex)
 {
 }
 


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sc/source/ui/sidebar/ScPanelFactory.cxx |1 -
 sc/source/ui/sidebar/ScPanelFactory.hxx |9 +++--
 2 files changed, 3 insertions(+), 7 deletions(-)

New commits:
commit dfed2ae7f25fe30441205efc704fe39532e93798
Author: Noel Grandin 
AuthorDate: Sat Dec 25 21:13:02 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 08:00:27 2021 +0100

use comphelper::WeakComponentImplHelper in ScPanelFactory

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

diff --git a/sc/source/ui/sidebar/ScPanelFactory.cxx 
b/sc/source/ui/sidebar/ScPanelFactory.cxx
index 67c949475023..bbcff315c289 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.cxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.cxx
@@ -38,7 +38,6 @@ using namespace css::uno;
 namespace sc::sidebar {
 
 ScPanelFactory::ScPanelFactory()
-: PanelFactoryInterfaceBase(m_aMutex)
 {
 }
 
diff --git a/sc/source/ui/sidebar/ScPanelFactory.hxx 
b/sc/source/ui/sidebar/ScPanelFactory.hxx
index 2e6c7900ec3e..b2901e2abe6f 100644
--- a/sc/source/ui/sidebar/ScPanelFactory.hxx
+++ b/sc/source/ui/sidebar/ScPanelFactory.hxx
@@ -18,20 +18,17 @@
  */
 #pragma once
 
-#include 
-#include 
+#include 
 #include 
 #include 
 
 namespace sc::sidebar {
 
-typedef ::cppu::WeakComponentImplHelper <
+typedef comphelper::WeakComponentImplHelper <
 css::ui::XUIElementFactory, css::lang::XServiceInfo
 > PanelFactoryInterfaceBase;
 
-class ScPanelFactory
-: private ::cppu::BaseMutex,
-  public PanelFactoryInterfaceBase
+class ScPanelFactory final : public PanelFactoryInterfaceBase
 {
 public:
 // noncopyable


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sc/source/ui/inc/ChartRangeSelectionListener.hxx|8 +++-
 sc/source/ui/unoobj/ChartRangeSelectionListener.cxx |3 +--
 2 files changed, 4 insertions(+), 7 deletions(-)

New commits:
commit 60625112f53014b296fe3f26198408f9795ad935
Author: Noel Grandin 
AuthorDate: Sat Dec 25 21:10:40 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 08:00:06 2021 +0100

use comphelper::WeakComponentImplHelper in ScChartRangeSelectionListener

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

diff --git a/sc/source/ui/inc/ChartRangeSelectionListener.hxx 
b/sc/source/ui/inc/ChartRangeSelectionListener.hxx
index 5bfb80652393..b7033c413713 100644
--- a/sc/source/ui/inc/ChartRangeSelectionListener.hxx
+++ b/sc/source/ui/inc/ChartRangeSelectionListener.hxx
@@ -18,20 +18,18 @@
  */
 #pragma once
 
-#include 
-#include 
+#include 
 #include 
 #include 
 
 class ScTabViewShell;
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
 css::view::XSelectionChangeListener,
 css::lang::XServiceInfo >
 ScChartRangeSelectionListener_Base;
 
 class ScChartRangeSelectionListener :
-public cppu::BaseMutex,
 public ScChartRangeSelectionListener_Base
 {
 public:
@@ -49,7 +47,7 @@ protected:
 
 //  WeakComponentImplHelperBase 
 // is called when dispose() is called at this component
-virtual void SAL_CALL disposing() override;
+virtual void disposing(std::unique_lock&) override;
 
 //  XServiceInfo 
 virtual OUString SAL_CALL getImplementationName() override;
diff --git a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx 
b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
index 696258a8bcf0..eae58aee6f7a 100644
--- a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
+++ b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
@@ -34,7 +34,6 @@ SC_SIMPLE_SERVICE_INFO( ScChartRangeSelectionListener, 
"ScChartRangeSelectionLis
 SC_SERVICENAME_CHRANGEHILIGHT )
 
 ScChartRangeSelectionListener::ScChartRangeSelectionListener( ScTabViewShell * 
pViewShell ) :
-ScChartRangeSelectionListener_Base( m_aMutex ),
 m_pViewShell( pViewShell )
 {}
 
@@ -64,7 +63,7 @@ void SAL_CALL ScChartRangeSelectionListener::disposing( const 
lang::EventObject&
 }
 
 //  WeakComponentImplHelperBase 
-void SAL_CALL ScChartRangeSelectionListener::disposing()
+void ScChartRangeSelectionListener::disposing(std::unique_lock&)
 {
 m_pViewShell = nullptr;
 }


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sc/inc/fielduno.hxx  |7 +++
 sc/source/ui/unoobj/fielduno.cxx |1 -
 2 files changed, 3 insertions(+), 5 deletions(-)

New commits:
commit e056276600dc9a9e0ac649c995c3af7a42cbee4e
Author: Noel Grandin 
AuthorDate: Sat Dec 25 21:04:43 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:59:32 2021 +0100

use comphelper::WeakComponentImplHelper in ScEditFieldObj

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

diff --git a/sc/inc/fielduno.hxx b/sc/inc/fielduno.hxx
index 88f42f991869..f4cf3bac7520 100644
--- a/sc/inc/fielduno.hxx
+++ b/sc/inc/fielduno.hxx
@@ -32,12 +32,11 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -159,12 +158,12 @@ public:
  * Generic UNO wrapper for edit engine's field item in cells, headers, and
  * footers.
  */
-typedef cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
 css::text::XTextField,
 css::beans::XPropertySet,
 css::lang::XUnoTunnel,
 css::lang::XServiceInfo> ScEditFieldObj_Base;
-class ScEditFieldObj final : public cppu::BaseMutex, public ScEditFieldObj_Base
+class ScEditFieldObj final : public ScEditFieldObj_Base
 {
 ScEditFieldObj() = delete;
 ScEditFieldObj(const ScEditFieldObj&) = delete;
diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx
index 76a63a72a08c..d3b64cac7df3 100644
--- a/sc/source/ui/unoobj/fielduno.cxx
+++ b/sc/source/ui/unoobj/fielduno.cxx
@@ -1041,7 +1041,6 @@ void ScEditFieldObj::setPropertyValueSheet(const 
OUString& rName, const uno::Any
 ScEditFieldObj::ScEditFieldObj(
 const uno::Reference& rContent,
 std::unique_ptr pEditSrc, sal_Int32 eType, const ESelection& 
rSel) :
-ScEditFieldObj_Base(m_aMutex),
 pPropSet(nullptr),
 mpEditSource(std::move(pEditSrc)),
 aSelection(rSel),


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

2021-12-26 Thread Noel Grandin (via logerrit)
 ucb/source/ucp/image/ucpimage.cxx |   11 +--
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit ae80ee2d722ea8a0a0e133488f829b331ca2c195
Author: Noel Grandin 
AuthorDate: Sat Dec 25 18:49:13 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:58:58 2021 +0100

use comphelper::WeakComponentImplHelper in Provider

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

diff --git a/ucb/source/ucp/image/ucpimage.cxx 
b/ucb/source/ucp/image/ucpimage.cxx
index 75bc7404fc0d..478509a716a3 100644
--- a/ucb/source/ucp/image/ucpimage.cxx
+++ b/ucb/source/ucp/image/ucpimage.cxx
@@ -16,7 +16,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -36,14 +36,13 @@
 namespace {
 
 class Provider final:
-private osl::Mutex,
-public cppu::WeakComponentImplHelper<
+public comphelper::WeakComponentImplHelper<
 css::lang::XServiceInfo, css::ucb::XContentProvider>
 {
 public:
 explicit Provider(
 css::uno::Reference const & context):
-WeakComponentImplHelper(*static_cast(this)), context_(context)
+context_(context)
 {}
 
 private:
@@ -65,7 +64,7 @@ private:
 {
 css::uno::Reference context;
 {
-osl::MutexGuard g(*this);
+std::unique_lock g(m_aMutex);
 context = context_;
 }
 if (!context.is()) {
@@ -146,7 +145,7 @@ private:
 Id2->getContentIdentifier());
 }
 
-void SAL_CALL disposing() override {
+void disposing(std::unique_lock&) override {
 context_.clear();
 }
 


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sc/inc/TablePivotChart.hxx  |8 +++-
 sc/source/ui/unoobj/TablePivotChart.cxx |5 +
 2 files changed, 4 insertions(+), 9 deletions(-)

New commits:
commit 6c3b3832902157324af49bca5a16cebdf5ba3caf
Author: Noel Grandin 
AuthorDate: Sat Dec 25 21:07:32 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:38:23 2021 +0100

use comphelper::WeakComponentImplHelper in TablePivotChart

and remove some unnecessary use of SolarMutex

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

diff --git a/sc/inc/TablePivotChart.hxx b/sc/inc/TablePivotChart.hxx
index 2ba73530ad85..8dc61d2582f8 100644
--- a/sc/inc/TablePivotChart.hxx
+++ b/sc/inc/TablePivotChart.hxx
@@ -15,8 +15,7 @@
 #include 
 
 #include 
-#include 
-#include 
+#include 
 
 #include "types.hxx"
 
@@ -25,14 +24,13 @@ class ScDocShell;
 namespace sc
 {
 
-typedef cppu::WeakComponentImplHelper
 TablePivotChart_Base;
 
-class TablePivotChart final : public cppu::BaseMutex,
-public TablePivotChart_Base,
+class TablePivotChart final : public TablePivotChart_Base,
 public SfxListener
 {
 private:
diff --git a/sc/source/ui/unoobj/TablePivotChart.cxx 
b/sc/source/ui/unoobj/TablePivotChart.cxx
index 4ede28086fc5..ecc158002db7 100644
--- a/sc/source/ui/unoobj/TablePivotChart.cxx
+++ b/sc/source/ui/unoobj/TablePivotChart.cxx
@@ -28,8 +28,7 @@ namespace sc
 SC_SIMPLE_SERVICE_INFO(TablePivotChart, "TablePivotChart", 
"com.sun.star.table.TablePivotChart")
 
 TablePivotChart::TablePivotChart(ScDocShell* pDocShell, SCTAB nTab, const 
OUString& rName)
-: TablePivotChart_Base(m_aMutex)
-, m_pDocShell(pDocShell)
+: m_pDocShell(pDocShell)
 , m_nTab(nTab)
 , m_aChartName(rName)
 {
@@ -66,13 +65,11 @@ uno::Reference SAL_CALL 
TablePivotChart::getEmbeddedObject()
 
 OUString SAL_CALL TablePivotChart::getName()
 {
-SolarMutexGuard aGuard;
 return m_aChartName;
 }
 
 void SAL_CALL TablePivotChart::setName(OUString const & /* aName */)
 {
-SolarMutexGuard aGuard;
 throw uno::RuntimeException(); // name cannot be changed
 }
 


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sfx2/source/devtools/SelectionChangeHandler.hxx |   13 +
 ucb/Library_ucpexpand1.mk   |1 +
 ucb/source/ucp/expand/ucpexpand.cxx |   18 +-
 3 files changed, 11 insertions(+), 21 deletions(-)

New commits:
commit 260ea19fb5e9aaa43f3ba06fc9c295be8d6a
Author: Noel Grandin 
AuthorDate: Sat Dec 25 19:10:23 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:37:48 2021 +0100

use comphelper::WeakComponentImplHelper in SelectionChangeHandler

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

diff --git a/sfx2/source/devtools/SelectionChangeHandler.hxx 
b/sfx2/source/devtools/SelectionChangeHandler.hxx
index 523165f2f599..612f8e46ff33 100644
--- a/sfx2/source/devtools/SelectionChangeHandler.hxx
+++ b/sfx2/source/devtools/SelectionChangeHandler.hxx
@@ -17,10 +17,9 @@
 #include 
 #include 
 
-#include 
-#include 
+#include 
 
-typedef cppu::WeakComponentImplHelper
+typedef 
comphelper::WeakComponentImplHelper
 SelectionChangeHandlerInterfaceBase;
 
 /** Selection change handler to listen to document selection changes.
@@ -28,8 +27,7 @@ typedef 
cppu::WeakComponentImplHelper
  * Listens to the changes and notifies the docking window with a new
  * selected object, when a change happens.
  */
-class SelectionChangeHandler final : private ::cppu::BaseMutex,
- public SelectionChangeHandlerInterfaceBase
+class SelectionChangeHandler final : public SelectionChangeHandlerInterfaceBase
 {
 private:
 css::uno::Reference mxController;
@@ -38,8 +36,7 @@ private:
 public:
 SelectionChangeHandler(const css::uno::Reference& 
rxController,
DevelopmentToolDockingWindow* pDockingWindow)
-: SelectionChangeHandlerInterfaceBase(m_aMutex)
-, mxController(rxController)
+: mxController(rxController)
 , mpDockingWindow(pDockingWindow)
 {
 css::uno::Reference 
xSupplier(mxController,
@@ -69,7 +66,7 @@ public:
 }
 
 virtual void SAL_CALL disposing(const css::lang::EventObject& /*rEvent*/) 
override {}
-virtual void SAL_CALL disposing() override {}
+using comphelper::WeakComponentImplHelperBase::disposing;
 
 private:
 SelectionChangeHandler(const SelectionChangeHandler&) = delete;
commit d3ca7a50908b6a689129eafe45305f5a1663da30
Author: Noel Grandin 
AuthorDate: Sat Dec 25 18:51:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:37:39 2021 +0100

use comphelper::WeakComponentImplHelper in ExpandContentProviderImpl

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

diff --git a/ucb/Library_ucpexpand1.mk b/ucb/Library_ucpexpand1.mk
index f66277874963..085782a03113 100644
--- a/ucb/Library_ucpexpand1.mk
+++ b/ucb/Library_ucpexpand1.mk
@@ -15,6 +15,7 @@ $(eval $(call 
gb_Library_set_componentfile,ucpexpand1,ucb/source/ucp/expand/ucpe
 $(eval $(call gb_Library_use_sdk_api,ucpexpand1))
 
 $(eval $(call gb_Library_use_libraries,ucpexpand1,\
+   comphelper \
cppu \
cppuhelper \
sal \
diff --git a/ucb/source/ucp/expand/ucpexpand.cxx 
b/ucb/source/ucp/expand/ucpexpand.cxx
index 5b880a3d2a4d..2838c5cb728b 100644
--- a/ucb/source/ucp/expand/ucpexpand.cxx
+++ b/ucb/source/ucp/expand/ucpexpand.cxx
@@ -20,9 +20,8 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
-#include 
 #include 
 #include 
 #include 
@@ -42,11 +41,11 @@ using namespace ::com::sun::star;
 namespace
 {
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
 lang::XServiceInfo, ucb::XContentProvider > t_impl_helper;
 
 
-class ExpandContentProviderImpl : protected cppu::BaseMutex, public 
t_impl_helper
+class ExpandContentProviderImpl : public t_impl_helper
 {
 uno::Reference< uno::XComponentContext > m_xComponentContext;
 uno::Reference< util::XMacroExpander >   m_xMacroExpander;
@@ -55,13 +54,11 @@ class ExpandContentProviderImpl : protected 
cppu::BaseMutex, public t_impl_helpe
 
 protected:
 void check() const;
-virtual void SAL_CALL disposing() override;
 
 public:
 explicit ExpandContentProviderImpl(
 uno::Reference< uno::XComponentContext > const & xComponentContext )
-: t_impl_helper( m_aMutex ),
-  m_xComponentContext( xComponentContext ),
+: m_xComponentContext( xComponentContext ),
   m_xMacroExpander( util::theMacroExpander::get(xComponentContext) )
 {}
 
@@ -83,7 +80,7 @@ void ExpandContentProviderImpl::check() const
 {
 // xxx todo guard?
 // MutexGuard guard( m_mutex );
-if (rBHelper.bInDispose || rBHelper.bDisposed)
+if (m_bDisposed)
 {
 throw lang::DisposedException(
 "expand content provid

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

2021-12-26 Thread Noel Grandin (via logerrit)
 ucb/source/core/cmdenv.cxx |2 +-
 ucb/source/core/cmdenv.hxx |7 +++
 2 files changed, 4 insertions(+), 5 deletions(-)

New commits:
commit bde743f7455f1b714e3fb495ef45ee00361484cb
Author: Noel Grandin 
AuthorDate: Sat Dec 25 18:53:42 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:36:38 2021 +0100

use comphelper::WeakComponentImplHelper in UcbCommandEnvironment

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

diff --git a/ucb/source/core/cmdenv.cxx b/ucb/source/core/cmdenv.cxx
index 0ea51438c920..9189f0e0f0aa 100644
--- a/ucb/source/core/cmdenv.cxx
+++ b/ucb/source/core/cmdenv.cxx
@@ -36,7 +36,7 @@ using namespace ucb_cmdenv;
 // UcbCommandEnvironment Implementation.
 
 
-UcbCommandEnvironment::UcbCommandEnvironment() : 
UcbCommandEnvironment_Base(m_aMutex)
+UcbCommandEnvironment::UcbCommandEnvironment()
 {
 }
 
diff --git a/ucb/source/core/cmdenv.hxx b/ucb/source/core/cmdenv.hxx
index f70e71549429..8896cab85fe1 100644
--- a/ucb/source/core/cmdenv.hxx
+++ b/ucb/source/core/cmdenv.hxx
@@ -19,8 +19,7 @@
 
 #pragma once
 
-#include 
-#include 
+#include 
 
 #include 
 #include 
@@ -30,11 +29,11 @@
 
 namespace ucb_cmdenv {
 
-using UcbCommandEnvironment_Base = cppu::WeakComponentImplHelper< 
css::lang::XInitialization,
+using UcbCommandEnvironment_Base = comphelper::WeakComponentImplHelper< 
css::lang::XInitialization,
   css::lang::XServiceInfo,
   css::ucb::XCommandEnvironment >;
 
-class UcbCommandEnvironment : public cppu::BaseMutex, public 
UcbCommandEnvironment_Base
+class UcbCommandEnvironment : public UcbCommandEnvironment_Base
 {
 css::uno::Reference< css::task::XInteractionHandler > m_xIH;
 css::uno::Reference< css::ucb::XProgressHandler > m_xPH;


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

2021-12-26 Thread Noel Grandin (via logerrit)
 ucb/source/core/provprox.cxx |2 +-
 ucb/source/core/provprox.hxx |8 +++-
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 34cbc302e3899fbacea01e27c66d3fd0bed4ac0d
Author: Noel Grandin 
AuthorDate: Sat Dec 25 18:52:35 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:35:38 2021 +0100

use comphelper::WeakComponentImplHelper in UcbContentProviderProxyFactory

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

diff --git a/ucb/source/core/provprox.cxx b/ucb/source/core/provprox.cxx
index 0489123c8294..7af7ba28add2 100644
--- a/ucb/source/core/provprox.cxx
+++ b/ucb/source/core/provprox.cxx
@@ -37,7 +37,7 @@ using namespace com::sun::star::uno;
 
 UcbContentProviderProxyFactory::UcbContentProviderProxyFactory(
 const Reference< XComponentContext >& rxContext )
-: UcbContentProviderProxyFactory_Base(m_aMutex), m_xContext( rxContext )
+: m_xContext( rxContext )
 {
 }
 
diff --git a/ucb/source/core/provprox.hxx b/ucb/source/core/provprox.hxx
index ccab5781810e..b71fdfe7031c 100644
--- a/ucb/source/core/provprox.hxx
+++ b/ucb/source/core/provprox.hxx
@@ -28,17 +28,15 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
-#include 
-#include 
 
 
 
-using UcbContentProviderProxyFactory_Base = cppu::WeakComponentImplHelper <
+using UcbContentProviderProxyFactory_Base = 
comphelper::WeakComponentImplHelper <
 css::lang::XServiceInfo,
 
css::ucb::XContentProviderFactory >;
-class UcbContentProviderProxyFactory : public cppu::BaseMutex, public 
UcbContentProviderProxyFactory_Base
+class UcbContentProviderProxyFactory : public 
UcbContentProviderProxyFactory_Base
 {
 css::uno::Reference< css::uno::XComponentContext > m_xContext;
 


[Libreoffice-commits] core.git: 2 commits - cppcanvas/source sfx2/inc

2021-12-26 Thread Noel Grandin (via logerrit)
 cppcanvas/source/uno/uno_mtfrenderer.cxx |9 -
 sfx2/inc/preventduplicateinteraction.hxx |8 +++-
 2 files changed, 7 insertions(+), 10 deletions(-)

New commits:
commit 62a80ea77e950a4bfeb1c826856352274171e285
Author: Noel Grandin 
AuthorDate: Sat Dec 25 19:01:25 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:35:15 2021 +0100

use comphelper::WeakComponentImplHelper in WarningDialogsParent

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

diff --git a/sfx2/inc/preventduplicateinteraction.hxx 
b/sfx2/inc/preventduplicateinteraction.hxx
index f5a92ca7dd36..a5eb448eca60 100644
--- a/sfx2/inc/preventduplicateinteraction.hxx
+++ b/sfx2/inc/preventduplicateinteraction.hxx
@@ -28,7 +28,7 @@
 #include 
 #include 
 
-#include 
+#include 
 #include 
 
 #include 
@@ -56,10 +56,9 @@ inline void closedialogs(SystemWindow& rTopLevel, bool 
bCloseRoot)
 // If there are dialog children open on exit then veto termination,
 // close the topmost dialog and retry termination.
 class WarningDialogsParent final :
-public cppu::WeakComponentImplHelper
+public comphelper::WeakComponentImplHelper
 {
 private:
-osl::Mutex m_aLock;
 VclPtr m_xWin;
 css::uno::Reference m_xInterface;
 
@@ -77,7 +76,7 @@ private:
 
 public:
 
-using cppu::WeakComponentImplHelperBase::disposing;
+using comphelper::WeakComponentImplHelperBase::disposing;
 virtual void SAL_CALL disposing(const css::lang::EventObject&) override
 {
 }
@@ -96,7 +95,6 @@ public:
 
 public:
 WarningDialogsParent()
-: 
cppu::WeakComponentImplHelper(m_aLock)
 {
 SolarMutexGuard aSolarGuard;
 m_xWin = VclPtr::Create(nullptr, WB_STDWORK);
commit 0c50bf65eff7a2f7b788adb7c9afebb859a0f81b
Author: Noel Grandin 
AuthorDate: Sat Dec 25 18:55:33 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:35:06 2021 +0100

use comphelper::WeakComponentImplHelper in MtfRenderer

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

diff --git a/cppcanvas/source/uno/uno_mtfrenderer.cxx 
b/cppcanvas/source/uno/uno_mtfrenderer.cxx
index 76037892b4d0..a531e0938f9f 100644
--- a/cppcanvas/source/uno/uno_mtfrenderer.cxx
+++ b/cppcanvas/source/uno/uno_mtfrenderer.cxx
@@ -13,17 +13,16 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 
 using namespace ::com::sun::star;
 
-typedef cppu::WeakComponentImplHelper MtfRendererBase;
+typedef comphelper::WeakComponentImplHelper MtfRendererBase;
 
 namespace {
 
-class MtfRenderer : private cppu::BaseMutex, public MtfRendererBase
+class MtfRenderer : public MtfRendererBase
 {
 public:
 MtfRenderer (css::uno::Sequence const& args,
@@ -67,7 +66,7 @@ void MtfRenderer::setFastPropertyValue( sal_Int32 nHandle, 
const uno::Any& aAny)
 }
 }
 
-MtfRenderer::MtfRenderer (uno::Sequence const& aArgs, 
uno::Reference const&) : MtfRendererBase (m_aMutex), 
mpMetafile (nullptr)
+MtfRenderer::MtfRenderer (uno::Sequence const& aArgs, 
uno::Reference const&) : mpMetafile (nullptr)
 {
 if( aArgs.getLength() == 1 ) {
 aArgs[0] >>= mxCanvas;


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

2021-12-26 Thread Noel Grandin (via logerrit)
 sfx2/source/appl/shutdownicon.cxx|   13 ++---
 sfx2/source/appl/shutdownicon.hxx|8 +++-
 sfx2/source/appl/shutdowniconaqua.mm |1 +
 sfx2/source/control/thumbnailviewacc.cxx |   22 +-
 sfx2/source/control/thumbnailviewacc.hxx |9 +++--
 5 files changed, 26 insertions(+), 27 deletions(-)

New commits:
commit ad492932e9b64991001a0eb5e0aa1fa7801bb3fa
Author: Noel Grandin 
AuthorDate: Sat Dec 25 19:04:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:34:57 2021 +0100

use comphelper::WeakComponentImplHelper in ShutdownIcon

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

diff --git a/sfx2/source/appl/shutdownicon.cxx 
b/sfx2/source/appl/shutdownicon.cxx
index 8d221e07d90e..fd81eb41837b 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -140,7 +140,6 @@ void ShutdownIcon::deInitSystray()
 
 
 ShutdownIcon::ShutdownIcon( const css::uno::Reference< XComponentContext > & 
rxContext ) :
-ShutdownIconServiceBase( m_aMutex ),
 m_bVeto ( false ),
 m_bListenForTermination ( false ),
 m_bSystemDialogs( false ),
@@ -466,12 +465,12 @@ ShutdownIcon* ShutdownIcon::createInstance()
 void ShutdownIcon::init()
 {
 css::uno::Reference < XDesktop2 > xDesktop = Desktop::create( m_xContext );
-osl::MutexGuard aGuard(m_aMutex);
+std::unique_lock aGuard(m_aMutex);
 m_xDesktop = xDesktop;
 }
 
 
-void SAL_CALL ShutdownIcon::disposing()
+void ShutdownIcon::disposing(std::unique_lock&)
 {
 m_xContext.clear();
 m_xDesktop.clear();
@@ -490,7 +489,7 @@ void SAL_CALL ShutdownIcon::disposing( const 
css::lang::EventObject& )
 void SAL_CALL ShutdownIcon::queryTermination( const css::lang::EventObject& )
 {
 SAL_INFO("sfx.appl", "ShutdownIcon::queryTermination: veto is " << 
m_bVeto);
-osl::MutexGuard  aGuard( m_aMutex );
+std::unique_lock  aGuard( m_aMutex );
 
 if ( m_bVeto )
 throw css::frame::TerminationVetoException();
@@ -504,7 +503,7 @@ void SAL_CALL ShutdownIcon::notifyTermination( const 
css::lang::EventObject& )
 
 void SAL_CALL ShutdownIcon::initialize( const css::uno::Sequence< 
css::uno::Any>& aArguments )
 {
-::osl::ResettableMutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 // third argument only sets veto, everything else will be ignored!
 if (aArguments.getLength() > 2)
@@ -523,9 +522,9 @@ void SAL_CALL ShutdownIcon::initialize( const 
css::uno::Sequence< css::uno::Any>
 bool bQuickstart = ::cppu::any2bool( aArguments[0] );
 if( !bQuickstart && !GetAutostart() )
 return;
-aGuard.clear();
+aGuard.unlock();
 init ();
-aGuard.reset();
+aGuard.lock();
 if ( !m_xDesktop.is() )
 return;
 
diff --git a/sfx2/source/appl/shutdownicon.hxx 
b/sfx2/source/appl/shutdownicon.hxx
index 32113cbc1ee2..cb352e60b443 100644
--- a/sfx2/source/appl/shutdownicon.hxx
+++ b/sfx2/source/appl/shutdownicon.hxx
@@ -28,8 +28,7 @@
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 #include 
 #include 
 
@@ -45,7 +44,7 @@ namespace sfx2
 class FileDialogHelper;
 }
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
 css::lang::XInitialization,
 css::frame::XTerminateListener,
 css::lang::XServiceInfo,
@@ -62,7 +61,6 @@ typedef ::cppu::WeakComponentImplHelper<
 
 class ShutdownIcon : public ShutdownIconServiceBase
 {
-::osl::Mutexm_aMutex;
 boolm_bVeto;
 boolm_bListenForTermination;
 boolm_bSystemDialogs;
@@ -120,7 +118,7 @@ class ShutdownIcon : public ShutdownIconServiceBase
 static bool IsQuickstarterInstalled();
 
 // Component Helper - force override
-virtual void SAL_CALL disposing() override;
+virtual void disposing(std::unique_lock&) override;
 
 // XEventListener
 virtual void SAL_CALL disposing( const css::lang::EventObject& Source 
) override;
diff --git a/sfx2/source/appl/shutdowniconaqua.mm 
b/sfx2/source/appl/shutdowniconaqua.mm
index 7e8bf071c95f..74a9602e6ce1 100644
--- a/sfx2/source/appl/shutdowniconaqua.mm
+++ b/sfx2/source/appl/shutdowniconaqua.mm
@@ -24,6 +24,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
commit 26048e4f37cc0c595dc25dd07698aad82180fb3e
Author: Noel Grandin 
AuthorDate: Sat Dec 25 19:07:50 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:34:44 2021 +0100

use comphelper::WeakComponentImplHelper in ThumbnailViewAcc

Change-Id: I0a9aa7fac5efd8c91fdcca39882895171aeaf71f
Reviewed-on: https://gerrit.libreoffice.org/c/core

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

2021-12-26 Thread Noel Grandin (via logerrit)
 framework/source/uifactory/uielementfactorymanager.cxx |   95 -
 toolkit/source/controls/grid/gridcolumn.cxx|   51 -
 toolkit/source/controls/grid/gridcolumn.hxx|   19 +--
 3 files changed, 78 insertions(+), 87 deletions(-)

New commits:
commit 174b39754e45f4df0e0123336f3ed298bf81ebc4
Author: Noel Grandin 
AuthorDate: Fri Dec 24 20:37:14 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:34:29 2021 +0100

use comphelper::WeakComponentImplHelper in GridColumn

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

diff --git a/toolkit/source/controls/grid/gridcolumn.cxx 
b/toolkit/source/controls/grid/gridcolumn.cxx
index fa2119d434bc..6d94ecb9a72b 100644
--- a/toolkit/source/controls/grid/gridcolumn.cxx
+++ b/toolkit/source/controls/grid/gridcolumn.cxx
@@ -39,8 +39,7 @@ namespace toolkit
 
 
 GridColumn::GridColumn()
-:GridColumn_Base( m_aMutex )
-,m_nIndex(-1)
+:m_nIndex(-1)
 ,m_nDataColumnIndex(-1)
 ,m_nColumnWidth(4)
 ,m_nMaxWidth(0)
@@ -53,9 +52,7 @@ namespace toolkit
 
 
 GridColumn::GridColumn( GridColumn const & i_copySource )
-:cppu::BaseMutex()
-,GridColumn_Base( m_aMutex )
-,m_aIdentifier( i_copySource.m_aIdentifier )
+:m_aIdentifier( i_copySource.m_aIdentifier )
 ,m_nIndex( -1 )
 ,m_nDataColumnIndex( i_copySource.m_nDataColumnIndex )
 ,m_nColumnWidth( i_copySource.m_nColumnWidth )
@@ -76,7 +73,7 @@ namespace toolkit
 
 
 void GridColumn::broadcast_changed( char const * const 
i_asciiAttributeName, const Any& i_oldValue, const Any& i_newValue,
-::comphelper::ComponentGuard& i_Guard )
+std::unique_lock& i_Guard )
 {
 Reference< XInterface > const xSource( static_cast< 
::cppu::OWeakObject* >( this ) );
 GridColumnEvent const aEvent(
@@ -84,31 +81,28 @@ namespace toolkit
 i_oldValue, i_newValue, m_nIndex
 );
 
-::cppu::OInterfaceContainerHelper* pIter = rBHelper.getContainer( 
cppu::UnoType::get() );
-
-i_Guard.clear();
-if( pIter )
-pIter->notifyEach( &XGridColumnListener::columnChanged, aEvent );
+i_Guard.unlock();
+maGridColumnListeners.notifyEach( &XGridColumnListener::columnChanged, 
aEvent );
 }
 
 
 css::uno::Any SAL_CALL GridColumn::getIdentifier()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_aIdentifier;
 }
 
 
 void SAL_CALL GridColumn::setIdentifier(const css::uno::Any & value)
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 m_aIdentifier = value;
 }
 
 
 ::sal_Int32 SAL_CALL GridColumn::getColumnWidth()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_nColumnWidth;
 }
 
@@ -121,7 +115,7 @@ namespace toolkit
 
 ::sal_Int32 SAL_CALL GridColumn::getMaxWidth()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_nMaxWidth;
 }
 
@@ -134,7 +128,7 @@ namespace toolkit
 
 ::sal_Int32 SAL_CALL GridColumn::getMinWidth()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_nMinWidth;
 }
 
@@ -147,7 +141,7 @@ namespace toolkit
 
 OUString SAL_CALL GridColumn::getTitle()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_sTitle;
 }
 
@@ -160,7 +154,7 @@ namespace toolkit
 
 OUString SAL_CALL GridColumn::getHelpText()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_sHelpText;
 }
 
@@ -173,7 +167,7 @@ namespace toolkit
 
 sal_Bool SAL_CALL GridColumn::getResizeable()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_bResizeable;
 }
 
@@ -186,7 +180,7 @@ namespace toolkit
 
 ::sal_Int32 SAL_CALL GridColumn::getFlexibility()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_nFlexibility;
 }
 
@@ -201,7 +195,7 @@ namespace toolkit
 
 HorizontalAlignment SAL_CALL GridColumn::getHorizontalAlign()
 {
-::comphelper::ComponentGuard aGuard( *this, rBHelper );
+std::unique_lock aGuard( m_aMutex );
 return m_eHorizontalAlign;
 }
 
@@ -214,19 +208,20 @@ namespace toolkit
 
 void SAL_CALL GridColumn::addGridColumnListener( const Referenc

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

2021-12-26 Thread Noel Grandin (via logerrit)
 framework/source/uifactory/uicontrollerfactory.cxx |   29 +
 1 file changed, 13 insertions(+), 16 deletions(-)

New commits:
commit cfd257873a06f066b5c683bf564b3ccb3a24df5a
Author: Noel Grandin 
AuthorDate: Fri Dec 24 21:04:21 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 07:34:00 2021 +0100

use comphelper::WeakComponentImplHelper in UIControllerFactory

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

diff --git a/framework/source/uifactory/uicontrollerfactory.cxx 
b/framework/source/uifactory/uicontrollerfactory.cxx
index 61852fbf0b17..5f23900763de 100644
--- a/framework/source/uifactory/uicontrollerfactory.cxx
+++ b/framework/source/uifactory/uicontrollerfactory.cxx
@@ -28,8 +28,7 @@
 #include 
 
 #include 
-#include 
-#include 
+#include 
 #include 
 
 using namespace css::uno;
@@ -41,12 +40,11 @@ using namespace framework;
 
 namespace {
 
-typedef ::cppu::WeakComponentImplHelper<
+typedef comphelper::WeakComponentImplHelper<
 css::lang::XServiceInfo,
 css::frame::XUIControllerFactory > UIControllerFactory_BASE;
 
-class UIControllerFactory : private cppu::BaseMutex,
-public UIControllerFactory_BASE
+class UIControllerFactory : public UIControllerFactory_BASE
 {
 public:
 virtual ~UIControllerFactory() override;
@@ -68,14 +66,13 @@ protected:
 rtl::Referencem_pConfigAccess;
 
 private:
-virtual void SAL_CALL disposing() final override;
+virtual void disposing(std::unique_lock&) final override;
 };
 
 UIControllerFactory::UIControllerFactory(
 const Reference< XComponentContext >& xContext,
 std::u16string_view rConfigurationNode )
-: UIControllerFactory_BASE(m_aMutex)
-, m_bConfigRead( false )
+: m_bConfigRead( false )
 , m_xContext( xContext )
 {
 m_pConfigAccess = new ConfigurationAccess_ControllerFactory(m_xContext,
@@ -85,12 +82,12 @@ UIControllerFactory::UIControllerFactory(
 
 UIControllerFactory::~UIControllerFactory()
 {
-disposing();
+std::unique_lock g(m_aMutex);
+disposing(g);
 }
 
-void SAL_CALL UIControllerFactory::disposing()
+void UIControllerFactory::disposing(std::unique_lock&)
 {
-osl::MutexGuard g(rBHelper.rMutex);
 m_pConfigAccess.clear();
 }
 
@@ -100,7 +97,7 @@ Reference< XInterface > SAL_CALL 
UIControllerFactory::createInstanceWithContext(
 const Reference< XComponentContext >& )
 {
 // SAFE
-osl::MutexGuard g(rBHelper.rMutex);
+std::unique_lock g(m_aMutex);
 
 if ( !m_bConfigRead )
 {
@@ -160,7 +157,7 @@ Reference< XInterface > SAL_CALL 
UIControllerFactory::createInstanceWithArgument
 {
 OUString aServiceName;
 { // SAFE
-osl::MutexGuard g(rBHelper.rMutex);
+std::unique_lock g(m_aMutex);
 
 if ( !m_bConfigRead )
 {
@@ -188,7 +185,7 @@ sal_Bool SAL_CALL UIControllerFactory::hasController(
 const OUString& aCommandURL,
 const OUString& aModuleName )
 {
-osl::MutexGuard g(rBHelper.rMutex);
+std::unique_lock g(m_aMutex);
 
 if ( !m_bConfigRead )
 {
@@ -205,7 +202,7 @@ void SAL_CALL UIControllerFactory::registerController(
 const OUString& aControllerImplementationName )
 {
 // SAFE
-osl::MutexGuard g(rBHelper.rMutex);
+std::unique_lock g(m_aMutex);
 
 if ( !m_bConfigRead )
 {
@@ -222,7 +219,7 @@ void SAL_CALL UIControllerFactory::deregisterController(
 const OUString& aModuleName )
 {
 // SAFE
-osl::MutexGuard g(rBHelper.rMutex);
+std::unique_lock g(m_aMutex);
 
 if ( !m_bConfigRead )
 {


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

2021-12-26 Thread Chris Sherlock (via logerrit)
 include/vcl/gradient.hxx   |6 +--
 include/vcl/outdev.hxx |3 -
 vcl/source/outdev/gradient.cxx |   69 ++---
 3 files changed, 35 insertions(+), 43 deletions(-)

New commits:
commit 22dd44f479fe9b3c34b03ae55177c7b66170e41b
Author: Chris Sherlock 
AuthorDate: Sat Dec 18 12:34:55 2021 +1100
Commit: Tomaž Vajngerl 
CommitDate: Mon Dec 27 03:51:41 2021 +0100

vcl: change Get{Linear|Complex}GradientSteps()

No need to have split out the function, we can just check the gradient
style type. However, if we are checking the steps for a metafile we can
make this a static function.

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

diff --git a/include/vcl/gradient.hxx b/include/vcl/gradient.hxx
index 59956138033b..5a04616adda5 100644
--- a/include/vcl/gradient.hxx
+++ b/include/vcl/gradient.hxx
@@ -21,13 +21,13 @@
 #define INCLUDED_VCL_GRADIENT_HXX
 
 #include 
-#include 
 #include 
 #include 
-
-#include 
+#include 
 #include 
 
+#include 
+#include 
 
 namespace tools { class Rectangle; }
 
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index eec957e14973..9c86567865ba 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -815,8 +815,7 @@ private:
 SAL_DLLPRIVATE void DrawLinearGradientToMetafile( const 
tools::Rectangle& rRect, const Gradient& rGradient );
 SAL_DLLPRIVATE void DrawComplexGradientToMetafile( const 
tools::Rectangle& rRect, const Gradient& rGradient );
 
-SAL_DLLPRIVATE tools::Long  GetLinearGradientSteps( const Gradient& 
rGradient, const tools::Rectangle& rRect, bool bMtf);
-SAL_DLLPRIVATE tools::Long  GetComplexGradientSteps( const Gradient& 
rGradient, const tools::Rectangle& rRect, bool bMtf);
+SAL_DLLPRIVATE tools::Long  GetGradientSteps(Gradient const& rGradient, 
tools::Rectangle const& rRect);
 
 SAL_DLLPRIVATE ColorGetSingleColorGradientFill();
 ///@}
diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx
index f1ae13283f9d..9d8e6d8b1830 100644
--- a/vcl/source/outdev/gradient.cxx
+++ b/vcl/source/outdev/gradient.cxx
@@ -321,7 +321,7 @@ void OutputDevice::DrawLinearGradient( const 
tools::Rectangle& rRect,
 }
 
 // calculate step count
-tools::Long nStepCount = GetLinearGradientSteps(rGradient, aRect, 
false/*bMtf*/);
+tools::Long nStepCount = GetGradientSteps(rGradient, aRect);
 
 // minimal three steps and maximal as max color steps
 tools::Long   nAbsRedSteps   = std::abs( nEndRed   - nStartRed );
@@ -443,7 +443,7 @@ void OutputDevice::DrawComplexGradient( const 
tools::Rectangle& rRect,
 if ( UsePolyPolygonForComplexGradient() )
 xPolyPoly = tools::PolyPolygon( 2 );
 
-tools::Long nStepCount = GetComplexGradientSteps(rGradient, rRect, 
false/*bMtf*/);
+tools::Long nStepCount = GetGradientSteps(rGradient, rRect);
 
 // at least three steps and at most the number of colour differences
 tools::Long nSteps = std::max( nStepCount, tools::Long(2) );
@@ -581,6 +581,20 @@ void OutputDevice::DrawComplexGradient( const 
tools::Rectangle& rRect,
 ImplDrawPolygon( rPoly, pClixPolyPoly );
 }
 
+static tools::Long GetGradientMetafileSteps(Gradient const& rGradient, 
tools::Rectangle const& rRect)
+{
+// calculate step count
+tools::Long nStepCount = rGradient.GetSteps();
+
+if (nStepCount)
+return nStepCount;
+
+if (rGradient.GetStyle() == GradientStyle::Linear || rGradient.GetStyle() 
== GradientStyle::Axial)
+return rRect.GetHeight();
+else
+return std::min(rRect.GetWidth(), rRect.GetHeight());
+}
+
 void OutputDevice::DrawLinearGradientToMetafile( const tools::Rectangle& rRect,
  const Gradient& rGradient )
 {
@@ -679,7 +693,7 @@ void OutputDevice::DrawLinearGradientToMetafile( const 
tools::Rectangle& rRect,
 }
 }
 
-tools::LongnStepCount  = GetLinearGradientSteps( rGradient, aRect, 
true/*bMtf*/ );
+tools::Long nStepCount  = GetGradientMetafileSteps(rGradient, aRect);
 
 // minimal three steps and maximal as max color steps
 tools::Long   nAbsRedSteps   = std::abs( nEndRed   - nStartRed );
@@ -780,7 +794,7 @@ void OutputDevice::DrawComplexGradientToMetafile( const 
tools::Rectangle& rRect,
 xPolyPoly = tools::PolyPolygon( 2 );
 
 // last parameter - true if complex gradient, false if linear
-tools::Long nStepCount = GetComplexGradientSteps(rGradient, rRect, true);
+tools::Long nStepCount = GetGradientMetafileSteps(rGradient, rRect);
 
 // at least three steps and at most the number of colour differences
 tools::Long nSteps = std::max(nStepCount, tools::Long(2));
@@ -915,48 +929,27 @@ tools::Long OutputDevice::GetGradientStepCount( 
tools::Long nMinRect )
 return nInc;
 }
 
-too

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

2021-12-26 Thread Chris Sherlock (via logerrit)
 vcl/qa/cppunit/outdev.cxx  |  112 -
 vcl/source/outdev/gradient.cxx |   46 +---
 2 files changed, 106 insertions(+), 52 deletions(-)

New commits:
commit 1de7e1f4640bad725626b574b33eb2db9244f378
Author: Chris Sherlock 
AuthorDate: Tue Dec 14 19:09:39 2021 +1100
Commit: Tomaž Vajngerl 
CommitDate: Mon Dec 27 03:47:28 2021 +0100

vcl: remove unnecessary actions from DrawGradientToMetafile()

It turns out, we never actually needed to decompose the gradient into
seperate actions in DrawGradientToMetafile(). We still need this for
AddGradientActions() however.

Update tests and add new ones for AddGradientActions().

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

diff --git a/vcl/qa/cppunit/outdev.cxx b/vcl/qa/cppunit/outdev.cxx
index 469a24521643..dc2ea8ad2ed2 100644
--- a/vcl/qa/cppunit/outdev.cxx
+++ b/vcl/qa/cppunit/outdev.cxx
@@ -10,6 +10,7 @@
 #include 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -93,9 +94,12 @@ public:
 void testDrawGradient_drawmode();
 void testDrawGradient_rect_linear();
 void testDrawGradient_rect_axial();
+void testAddGradientActions_rect_linear();
+void testAddGradientActions_rect_axial();
 void testDrawGradient_polygon_linear();
 void testDrawGradient_polygon_axial();
 void testDrawGradient_rect_complex();
+void testAddGradientActions_rect_complex();
 
 CPPUNIT_TEST_SUITE(VclOutdevTest);
 CPPUNIT_TEST(testVirtualDevice);
@@ -152,9 +156,12 @@ public:
 CPPUNIT_TEST(testDrawGradient_drawmode);
 CPPUNIT_TEST(testDrawGradient_rect_linear);
 CPPUNIT_TEST(testDrawGradient_rect_axial);
+CPPUNIT_TEST(testAddGradientActions_rect_linear);
+CPPUNIT_TEST(testAddGradientActions_rect_axial);
 CPPUNIT_TEST(testDrawGradient_polygon_linear);
 CPPUNIT_TEST(testDrawGradient_polygon_axial);
 CPPUNIT_TEST(testDrawGradient_rect_complex);
+CPPUNIT_TEST(testAddGradientActions_rect_complex);
 CPPUNIT_TEST_SUITE_END();
 };
 
@@ -2135,12 +2142,12 @@ static size_t TestLinearStripes(GDIMetaFile& rMtf, 
size_t nTimes, size_t nIndex)
 {
 nIndex++;
 MetaAction* pAction = rMtf.GetAction(nIndex);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a fill color action", 
MetaActionType::FILLCOLOR,
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a fill color action (start)", 
MetaActionType::FILLCOLOR,
  pAction->GetType());
 
 nIndex++;
 pAction = rMtf.GetAction(nIndex);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a polygon action", 
MetaActionType::POLYGON,
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a polygon action (start)", 
MetaActionType::POLYGON,
  pAction->GetType());
 
 for (size_t i = 0; i < nTimes - 1; i++)
@@ -2158,12 +2165,12 @@ static size_t TestLinearStripes(GDIMetaFile& rMtf, 
size_t nTimes, size_t nIndex)
 
 nIndex++;
 pAction = rMtf.GetAction(nIndex);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a fill color action", 
MetaActionType::FILLCOLOR,
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a fill color action (end)", 
MetaActionType::FILLCOLOR,
  pAction->GetType());
 
 nIndex++;
 pAction = rMtf.GetAction(nIndex);
-CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a polygon action", 
MetaActionType::POLYGON,
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a polygon action (end)", 
MetaActionType::POLYGON,
  pAction->GetType());
 
 return nIndex;
@@ -2236,6 +2243,35 @@ void VclOutdevTest::testDrawGradient_rect_linear()
 MetaAction* pAction = aMtf.GetAction(nIndex);
 CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a gradient action (rectangle area)", 
MetaActionType::GRADIENT,
  pAction->GetType());
+}
+
+void VclOutdevTest::testAddGradientActions_rect_linear()
+{
+ScopedVclPtrInstance pVDev;
+GDIMetaFile aMtf;
+
+tools::Rectangle aRect(Point(10, 10), Size(40, 40));
+pVDev->SetOutputSizePixel(Size(100, 100));
+
+Gradient aGradient(GradientStyle::Linear, COL_RED, COL_WHITE);
+aGradient.SetBorder(100);
+
+pVDev->AddGradientActions(aRect, aGradient, aMtf);
+
+size_t nIndex = 0;
+
+MetaAction* pAction = aMtf.GetAction(nIndex);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a push action", MetaActionType::PUSH, 
pAction->GetType());
+
+nIndex++;
+pAction = aMtf.GetAction(nIndex);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a rectangular intersect clip action",
+ MetaActionType::ISECTRECTCLIPREGION, 
pAction->GetType());
+
+nIndex++;
+pAction = aMtf.GetAction(nIndex);
+CPPUNIT_ASSERT_EQUAL_MESSAGE("Not a line color action", 
MetaActionType::LINECOLOR,
+ pAction->GetType());
 
 TestLinearStripes(aMtf, 3, nIndex);
 }
@@ -2259,6 +2295,35 @@ void VclOutd

[Libreoffice-commits] core.git: configure.ac

2021-12-26 Thread Jan-Marek Glogowski (via logerrit)
 configure.ac |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 06230ac3a62c1cc4012e4d8d0a76f9db356911a9
Author: Jan-Marek Glogowski 
AuthorDate: Sun Dec 26 20:25:52 2021 +0100
Commit: Jan-Marek Glogowski 
CommitDate: Mon Dec 27 01:37:30 2021 +0100

oss-fuzz: also build libxml2 for the cross-toolset

Change-Id: I777975446d8f1901445100144baac79b7db2b1e1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127535
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski 

diff --git a/configure.ac b/configure.ac
index f85e0b1701f3..93b9759aaa13 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5511,6 +5511,7 @@ if test "$cross_compiling" = "yes"; then
 test "$enable_extensions" = yes || sub_conf_opts="$sub_conf_opts 
--disable-extensions"
 test "$enable_wasm_strip" = "yes" && sub_conf_opts="$sub_conf_opts 
--enable-wasm-strip"
 test "${with_system_lockfile+set}" = set && sub_conf_opts="$sub_conf_opts 
--with-system-lockfile=${with_system_lockfile}"
+test "${enable_fuzzers}" = yes && sub_conf_opts="$sub_conf_opts 
--without-system-libxml"
 
 # Don't bother having configure look for stuff not needed for the build 
platform anyway
 # WARNING: any option with an argument containing spaces must be handled 
separately (see --with-theme)


[Libreoffice-commits] core.git: comphelper/qa comphelper/source include/comphelper package/source xmlsecurity/inc xmlsecurity/source

2021-12-26 Thread Mike Kaganski (via logerrit)
 comphelper/qa/unit/base64_test.cxx   |6 +++---
 comphelper/qa/unit/test_hash.cxx |2 +-
 comphelper/source/misc/base64.cxx|   10 +-
 comphelper/source/misc/docpasswordhelper.cxx |6 +++---
 include/comphelper/base64.hxx|5 +++--
 include/comphelper/docpasswordhelper.hxx |4 ++--
 package/source/manifest/ManifestImport.cxx   |   12 ++--
 xmlsecurity/inc/xsecctl.hxx  |4 ++--
 xmlsecurity/source/helper/xsecverify.cxx |   10 +-
 9 files changed, 30 insertions(+), 29 deletions(-)

New commits:
commit 9c95415de877af1430ab5b7123e11dedd0ea622c
Author: Mike Kaganski 
AuthorDate: Sun Dec 26 10:40:24 2021 +0100
Commit: Mike Kaganski 
CommitDate: Sun Dec 26 23:09:20 2021 +0100

Let comphelper::Base64::decode* take std::u16string_view

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

diff --git a/comphelper/qa/unit/base64_test.cxx 
b/comphelper/qa/unit/base64_test.cxx
index 31e865a370a6..a1cd5d0006be 100644
--- a/comphelper/qa/unit/base64_test.cxx
+++ b/comphelper/qa/unit/base64_test.cxx
@@ -71,17 +71,17 @@ void Base64Test::testBase64Decode()
 uno::Sequence decodedSequence;
 
 uno::Sequence expectedSequence = { 0, 0, 0, 0, 0, 1, 2, 3 };
-comphelper::Base64::decode(decodedSequence, "AAABAgM=");
+comphelper::Base64::decode(decodedSequence, u"AAABAgM=");
 CPPUNIT_ASSERT(std::equal(std::cbegin(expectedSequence), 
std::cend(expectedSequence),
   std::cbegin(decodedSequence)));
 
 expectedSequence = { 5, 2, 3, 0, 0, 1, 2, 3 };
-comphelper::Base64::decode(decodedSequence, "BQIDAAABAgM=");
+comphelper::Base64::decode(decodedSequence, u"BQIDAAABAgM=");
 CPPUNIT_ASSERT(std::equal(std::cbegin(expectedSequence), 
std::cend(expectedSequence),
   std::cbegin(decodedSequence)));
 
 expectedSequence = { sal_Int8(sal_uInt8(200)), 31, 77, 111, 0, 1, 2, 3 };
-comphelper::Base64::decode(decodedSequence, "yB9NbwABAgM=");
+comphelper::Base64::decode(decodedSequence, u"yB9NbwABAgM=");
 CPPUNIT_ASSERT(std::equal(std::cbegin(expectedSequence), 
std::cend(expectedSequence),
   std::cbegin(decodedSequence)));
 }
diff --git a/comphelper/qa/unit/test_hash.cxx b/comphelper/qa/unit/test_hash.cxx
index 0bcc3f8ed56c..64815ee56dc8 100644
--- a/comphelper/qa/unit/test_hash.cxx
+++ b/comphelper/qa/unit/test_hash.cxx
@@ -120,7 +120,7 @@ void TestHash::testSHA512_NoSaltNoSpin()
 // tdf#104250 https://bugs.documentfoundation.org/attachment.cgi?id=129104
 void TestHash::testSHA512_saltspin()
 {
-const OUString aHash = comphelper::DocPasswordHelper::GetOoxHashAsBase64( 
"pwd", "876MLoKTq42+/DLp415iZQ==", 10,
+const OUString aHash = comphelper::DocPasswordHelper::GetOoxHashAsBase64( 
"pwd", u"876MLoKTq42+/DLp415iZQ==", 10,
 comphelper::Hash::IterCount::APPEND, u"SHA-512");
 
CPPUNIT_ASSERT_EQUAL(OUString("5l3mgNHXpWiFaBPv5Yso1Xd/UifWvQWmlDnl/hsCYbFT2sJCzorjRmBCQ/3qeDu6Q/4+GIE8a1DsdaTwYh1q2g=="),
 aHash);
 }
diff --git a/comphelper/source/misc/base64.cxx 
b/comphelper/source/misc/base64.cxx
index 75274f5a73cb..d73465601adb 100644
--- a/comphelper/source/misc/base64.cxx
+++ b/comphelper/source/misc/base64.cxx
@@ -136,20 +136,20 @@ void Base64::encode(OUStringBuffer& aStrBuffer, const 
uno::Sequence& a
 }
 }
 
-void Base64::decode(uno::Sequence& aBuffer, const OUString& sBuffer)
+void Base64::decode(uno::Sequence& aBuffer, std::u16string_view 
sBuffer)
 {
 sal_Int32 nCharsDecoded = decodeSomeChars( aBuffer, sBuffer );
-OSL_ENSURE( nCharsDecoded == sBuffer.getLength(), "some bytes left in 
base64 decoding!" );
+OSL_ENSURE( sal_uInt32(nCharsDecoded) == sBuffer.size(), "some bytes left 
in base64 decoding!" );
 }
 
-sal_Int32 Base64::decodeSomeChars(uno::Sequence& rOutBuffer, const 
OUString& rInBuffer)
+sal_Int32 Base64::decodeSomeChars(uno::Sequence& rOutBuffer, 
std::u16string_view rInBuffer)
 {
-sal_Int32 nInBufferLen = rInBuffer.getLength();
+sal_Int32 nInBufferLen = rInBuffer.size();
 sal_Int32 nMinOutBufferLen = (nInBufferLen / 4) * 3;
 if( rOutBuffer.getLength() < nMinOutBufferLen )
 rOutBuffer.realloc( nMinOutBufferLen );
 
-const sal_Unicode *pInBuffer = rInBuffer.getStr();
+const sal_Unicode *pInBuffer = rInBuffer.data();
 sal_Int8 *pOutBuffer = rOutBuffer.getArray();
 sal_Int8 *pOutBufferStart = pOutBuffer;
 sal_Int32 nCharsDecoded = 0;
diff --git a/comphelper/source/misc/docpasswordhelper.cxx 
b/comphelper/source/misc/docpasswordhelper.cxx
index a31f829ddfa9..f0f13ad74f1c 100644
--- a/comphelper/source/misc/docpasswordhelper.cxx
+++ b/comphelper/source/misc/docpasswordhelper.cxx
@@ -327,13 +327,13 @@ std::vector 
DocPasswordHelper::GetOoxHashAsVector(
 
 css::uno::S

[Libreoffice-commits] core.git: Branch 'libreoffice-7-3' - configure.ac

2021-12-26 Thread Rene Engelhard (via logerrit)
 configure.ac |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit be5e8e00ce08a7386b0c2ad223e4df16195313fe
Author: Rene Engelhard 
AuthorDate: Mon Dec 20 11:32:34 2021 +0100
Commit: René Engelhard 
CommitDate: Sun Dec 26 22:03:20 2021 +0100

bump liborcus dependency in pkg-config check to >= 0.17.2

since that is what is needed now since 
aadbac5467bb6ab768f87ed6ec003c55159d54aa
to make the tests pass.
(One could do a version-check like done with libmwaw etc, too, but
didn't follow that route)

Change-Id: Id70871104b5c12462db12f14b637c6884a98954c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127144
Tested-by: Jenkins
Reviewed-by: Kohei Yoshida 
(cherry picked from commit e31191d45c27965bb1a73577b9fcc99b5d88795a)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127374

diff --git a/configure.ac b/configure.ac
index ace149ccfc88..e1b75d2c10ad 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10696,7 +10696,7 @@ AC_SUBST(ENABLE_FUZZERS)
 dnl ===
 dnl Orcus
 dnl ===
-libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.17 >= 0.17.0])
+libo_CHECK_SYSTEM_MODULE([orcus],[ORCUS],[liborcus-0.17 >= 0.17.2])
 if test "$with_system_orcus" != "yes"; then
 if test "$SYSTEM_BOOST" = "TRUE"; then
 dnl Link with Boost.System


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

2021-12-26 Thread Jim Raykowski (via logerrit)
 sw/source/uibase/docvw/edtwin.cxx |   13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

New commits:
commit 5e019195ee3fdd577b0f333275a49390e010e669
Author: Jim Raykowski 
AuthorDate: Wed Dec 22 23:58:09 2021 -0900
Commit: Xisco Fauli 
CommitDate: Sun Dec 26 21:29:48 2021 +0100

Outline folding: check pointer before use

Change-Id: Ifa79ef5f286da77fdac9464b4e271021107bf34e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127348
Tested-by: Jenkins
Reviewed-by: Jim Raykowski 
(cherry picked from commit 1609bb6ab5e34fc8fff67240e3c49dde93f2d2d7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127378
Reviewed-by: Xisco Fauli 

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 45139e673912..b3bdb09dcff4 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3893,10 +3893,15 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
 SwContentFrame* pContentFrame = 
aSwContentAtPos.aFnd.pNode->GetTextNode()->getLayoutFrame(nullptr);
 if (pContentFrame != m_pSavedOutlineFrame)
 {
-if (m_pSavedOutlineFrame && 
!m_pSavedOutlineFrame->IsInDtor() &&
-
rNds.GetOutLineNds().Seek_Entry(static_cast(m_pSavedOutlineFrame)->GetTextNodeFirst(),
 &nPos) &&
-rSh.GetAttrOutlineContentVisible(nPos))
-
GetFrameControlsManager().RemoveControlsByType(FrameControlType::Outline, 
m_pSavedOutlineFrame);
+if (m_pSavedOutlineFrame && 
!m_pSavedOutlineFrame->IsInDtor())
+{
+SwTextNode* pTextNode =
+
static_cast(m_pSavedOutlineFrame)->GetTextNodeFirst();
+if (pTextNode && 
rNds.GetOutLineNds().Seek_Entry(pTextNode, &nPos) &&
+rSh.GetAttrOutlineContentVisible(nPos))
+GetFrameControlsManager().RemoveControlsByType(
+FrameControlType::Outline, 
m_pSavedOutlineFrame);
+}
 m_pSavedOutlineFrame = pContentFrame;
 }
 // show button


[Libreoffice-commits] core.git: basctl/source chart2/source comphelper/source dbaccess/source desktop/source filter/source i18npool/source i18nutil/source linguistic/source sc/source sfx2/source svl/s

2021-12-26 Thread Mike Kaganski (via logerrit)
 basctl/source/basicide/baside2b.cxx   |8 +--
 chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx  |2 
 chart2/source/tools/PolynomialRegressionCurveCalculator.cxx   |2 
 comphelper/source/misc/docpasswordhelper.cxx  |2 
 dbaccess/source/core/api/OptimisticSet.cxx|   14 +++---
 dbaccess/source/core/recovery/settingsimport.cxx  |4 -
 desktop/source/app/crashreport.cxx|2 
 desktop/source/migration/migration.cxx|2 
 filter/source/xsltfilter/OleHandler.cxx   |4 -
 i18npool/source/characterclassification/cclass_unicode_parser.cxx |2 
 i18nutil/source/utility/unicode.cxx   |2 
 linguistic/source/hyphdsp.cxx |   23 
+++---
 sc/source/core/tool/calcconfig.cxx|2 
 sc/source/filter/dif/difimp.cxx   |5 --
 sc/source/filter/html/htmlimp.cxx |7 +--
 sc/source/ui/docshell/docfunc.cxx |2 
 sc/source/ui/view/editsh.cxx  |5 +-
 sfx2/source/control/emojicontrol.cxx  |6 +-
 sfx2/source/control/emojiviewitem.cxx |6 +-
 svl/source/numbers/zforlist.cxx   |4 -
 svl/source/numbers/zformat.cxx|2 
 sw/source/core/crsr/crstrvl.cxx   |2 
 tools/source/fsys/urlobj.cxx  |4 -
 vcl/source/control/edit.cxx   |   10 ++--
 vcl/source/control/field2.cxx |   12 +++--
 xmloff/source/draw/ximpcustomshape.cxx|2 
 xmloff/source/style/xmlnumfi.cxx  |5 --
 27 files changed, 69 insertions(+), 72 deletions(-)

New commits:
commit a23a7eea5cfcdc50d09be248828cb1e6293e5ebb
Author: Mike Kaganski 
AuthorDate: Sun Dec 26 10:03:40 2021 +0100
Commit: Mike Kaganski 
CommitDate: Sun Dec 26 20:36:26 2021 +0100

Avoid OUStringBuffer::toString where possible

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

diff --git a/basctl/source/basicide/baside2b.cxx 
b/basctl/source/basicide/baside2b.cxx
index 54be8d956b64..9671d149ca2b 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -2591,7 +2591,7 @@ void CodeCompleteWindow::SetMatchingEntries()
 for (sal_Int32 i = 0, nEntryCount = m_xListBox->n_children(); i< 
nEntryCount; ++i)
 {
 OUString sEntry = m_xListBox->get_text(i);
-if (sEntry.startsWithIgnoreAsciiCase(aFuncBuffer.toString()))
+if (sEntry.startsWithIgnoreAsciiCase(aFuncBuffer))
 {
 m_xListBox->select(i);
 break;
@@ -2657,8 +2657,8 @@ bool CodeCompleteWindow::HandleKeyInput( const KeyEvent& 
rKeyEvt )
 for (sal_Int32 i = nInd; i != nEntryCount; ++i)
 {
 OUString sEntry = m_xListBox->get_text(i);
-if( sEntry.startsWithIgnoreAsciiCase( 
aFuncBuffer.toString() )
-&& (aFuncBuffer.toString() != sTypedText) && 
(i != nInd) )
+if( sEntry.startsWithIgnoreAsciiCase( aFuncBuffer )
+&& (std::u16string_view(aFuncBuffer) != 
sTypedText) && (i != nInd) )
 {
 m_xListBox->select(i);
 bFound = true;
@@ -2688,7 +2688,7 @@ bool CodeCompleteWindow::HandleKeyInput( const KeyEvent& 
rKeyEvt )
 OUString aTabInsertedStr( 
GetParentEditView()->GetSelected() );
 GetParentEditView()->SetSelection( aSel );
 
-if( !aTabInsertedStr.isEmpty() && aTabInsertedStr != 
aFuncBuffer.toString() )
+if( !aTabInsertedStr.isEmpty() && aTabInsertedStr != 
std::u16string_view(aFuncBuffer) )
 {
 aFuncBuffer = aTabInsertedStr;
 }
diff --git a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx 
b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
index 58b0a66da1d1..ffd1808dfd22 100644
--- a/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
+++ b/chart2/source/tools/LogarithmicRegressionCurveCalculator.cxx
@@ -175,7 +175,7 @@ OUString 
LogarithmicRegressionCurveCalculator::ImplGetRepresentation(
 addStringToEquation( aBuf, nLineLength, aTmpBuf, pFormulaMaxWidth );
 }
 
-  

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

2021-12-26 Thread Noel Grandin (via logerrit)
 comphelper/source/misc/compbase.cxx |  181 
 include/comphelper/compbase.hxx |   23 +++-
 2 files changed, 197 insertions(+), 7 deletions(-)

New commits:
commit cc517c687de7205487936d40b64481107656f239
Author: Noel Grandin 
AuthorDate: Sun Dec 26 14:04:51 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 26 20:18:15 2021 +0100

fix comphelper::WeakComponentImplHelper::query

Which was not hanling queries for sub-interfaces.

We need to copy the complicated query function from cppuhelper,
unfortunatly. It has a signature that includes the base class, so we
cant re-use it.

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

diff --git a/comphelper/source/misc/compbase.cxx 
b/comphelper/source/misc/compbase.cxx
index 6e2019a255ae..ff3c4778b2ba 100644
--- a/comphelper/source/misc/compbase.cxx
+++ b/comphelper/source/misc/compbase.cxx
@@ -8,6 +8,8 @@
  */
 
 #include 
+#include 
+#include 
 
 namespace comphelper
 {
@@ -45,6 +47,185 @@ void SAL_CALL 
WeakComponentImplHelperBase::removeEventListener(
 maEventListeners.removeInterface(rxListener);
 }
 
+css::uno::Any SAL_CALL 
WeakComponentImplHelperBase::queryInterface(css::uno::Type const& rType)
+{
+css::uno::Any aReturn = ::cppu::queryInterface(rType, 
static_cast(this),
+   
static_cast(this));
+if (aReturn.hasValue())
+return aReturn;
+return OWeakObject::queryInterface(rType);
+}
+
+static void checkInterface(css::uno::Type const& rType)
+{
+if (css::uno::TypeClass_INTERFACE != rType.getTypeClass())
+{
+OUString msg("querying for interface \"" + rType.getTypeName() + "\": 
no interface type!");
+SAL_WARN("cppuhelper", msg);
+throw css::uno::RuntimeException(msg);
+}
+}
+
+static bool isXInterface(rtl_uString* pStr)
+{
+return OUString::unacquired(&pStr) == "com.sun.star.uno.XInterface";
+}
+
+static bool td_equals(typelib_TypeDescriptionReference const* pTDR1,
+  typelib_TypeDescriptionReference const* pTDR2)
+{
+return ((pTDR1 == pTDR2)
+|| OUString::unacquired(&pTDR1->pTypeName) == 
OUString::unacquired(&pTDR2->pTypeName));
+}
+
+static cppu::type_entry* getTypeEntries(cppu::class_data* cd)
+{
+cppu::type_entry* pEntries = cd->m_typeEntries;
+if (!cd->m_storedTypeRefs) // not inited?
+{
+static std::mutex aMutex;
+std::scoped_lock guard(aMutex);
+if (!cd->m_storedTypeRefs) // not inited?
+{
+// get all types
+for (sal_Int32 n = cd->m_nTypes; n--;)
+{
+cppu::type_entry* pEntry = &pEntries[n];
+css::uno::Type const& rType = 
(*pEntry->m_type.getCppuType)(nullptr);
+OSL_ENSURE(rType.getTypeClass() == 
css::uno::TypeClass_INTERFACE,
+   "### wrong helper init: expected interface!");
+OSL_ENSURE(
+!isXInterface(rType.getTypeLibType()->pTypeName),
+"### want to implement XInterface: template argument is 
XInterface?!?!?!");
+if (rType.getTypeClass() != css::uno::TypeClass_INTERFACE)
+{
+OUString msg("type \"" + rType.getTypeName() + "\" is no 
interface type!");
+SAL_WARN("cppuhelper", msg);
+throw css::uno::RuntimeException(msg);
+}
+// ref is statically held by getCppuType()
+pEntry->m_type.typeRef = rType.getTypeLibType();
+}
+OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
+cd->m_storedTypeRefs = true;
+}
+}
+else
+{
+OSL_DOUBLE_CHECKED_LOCKING_MEMORY_BARRIER();
+}
+return pEntries;
+}
+
+static void* makeInterface(sal_IntPtr nOffset, void* that)
+{
+return (static_cast(that) + nOffset);
+}
+
+static bool recursivelyFindType(typelib_TypeDescriptionReference const* 
demandedType,
+typelib_InterfaceTypeDescription const* type, 
sal_IntPtr* offset)
+{
+// This code assumes that the vtables of a multiple-inheritance class (the
+// offset amount by which to adjust the this pointer) follow one another in
+// the object layout, and that they contain slots for the inherited classes
+// in a specific order.  In theory, that need not hold for any given
+// platform; in practice, it seems to work well on all supported platforms:
+next:
+for (sal_Int32 i = 0; i < type->nBaseTypes; ++i)
+{
+if (i > 0)
+{
+*offset += sizeof(void*);
+}
+typelib_InterfaceTypeDescription const* base = type->ppBaseTypes[i];
+// ignore XInterface:
+if (base->nBaseTypes > 0)
+{
+if (td_equal

Re: ConfigManager warning

2021-12-26 Thread Andrew Pitonyak
Not that it helps your problem, but this is how I do it in basic

https://www.pitonyak.org/AndrewFontMacro.odt


⁣Get BlueMail for Android ​

On Dec 26, 2021, 2:08 PM, at 2:08 PM, Chris Sherlock 
 wrote:
>Hi all,
>
>I'm writing a basic utility to list font details, but I'm getting the
>following warning when I invoke the program:
>
>warn:unotools.config:79699:79699:unotools/source/config/configmgr.cxx:147:
>ConfigManager not empty
>
>Gerrit change is here:
>
>https://gerrit.libreoffice.org/c/core/+/127365
>
>Anyone know why this warning occurs? And how would I prevent it?
>
>Chris


ConfigManager warning

2021-12-26 Thread Chris Sherlock
Hi all,

I'm writing a basic utility to list font details, but I'm getting the
following warning when I invoke the program:

warn:unotools.config:79699:79699:unotools/source/config/configmgr.cxx:147:
ConfigManager not empty

Gerrit change is here:

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

Anyone know why this warning occurs? And how would I prevent it?

Chris


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

2021-12-26 Thread Julien Nabet (via logerrit)
 dbaccess/source/ui/app/AppController.cxx|2 +-
 dbaccess/source/ui/app/AppController.hxx|2 +-
 dbaccess/source/ui/app/AppControllerDnD.cxx |2 +-
 dbaccess/source/ui/app/AppControllerGen.cxx |4 ++--
 dbaccess/source/ui/dlg/CollectionView.cxx   |2 +-
 dbaccess/source/ui/inc/UITools.hxx  |2 +-
 dbaccess/source/ui/misc/UITools.cxx |6 +++---
 7 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit de47e94bf8468d0da4b39c6dab1281e750e6c426
Author: Julien Nabet 
AuthorDate: Sun Dec 26 18:13:20 2021 +0100
Commit: Julien Nabet 
CommitDate: Sun Dec 26 19:07:11 2021 +0100

Typo: insertHierachyElement->insertHierarchyElement

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

diff --git a/dbaccess/source/ui/app/AppController.cxx 
b/dbaccess/source/ui/app/AppController.cxx
index f6837cfdbe65..96e23f041d6d 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1197,7 +1197,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, 
const Sequence< PropertyVa
 {
 ElementType eType = getContainer()->getElementType();
 OUString sName = getContainer()->getQualifiedName( nullptr 
);
-insertHierachyElement(eType,sName);
+insertHierarchyElement(eType,sName);
 }
 break;
 case ID_NEW_VIEW_DESIGN:
diff --git a/dbaccess/source/ui/app/AppController.hxx 
b/dbaccess/source/ui/app/AppController.hxx
index cf9306cdb3a2..b7579c0cf156 100644
--- a/dbaccess/source/ui/app/AppController.hxx
+++ b/dbaccess/source/ui/app/AppController.hxx
@@ -316,7 +316,7 @@ namespace dbaui
 @return
  if the insert operations was successful, otherwise 
.
 */
-bool insertHierachyElement(  ElementType _eType
+bool insertHierarchyElement(  ElementType _eType
 ,const OUString& _sParentFolder
 ,bool _bCollection = true
 ,const css::uno::Reference< 
css::ucb::XContent>& _xContent = css::uno::Reference< css::ucb::XContent>()
diff --git a/dbaccess/source/ui/app/AppControllerDnD.cxx 
b/dbaccess/source/ui/app/AppControllerDnD.cxx
index 09919dda7e61..4ba805904387 100644
--- a/dbaccess/source/ui/app/AppControllerDnD.cxx
+++ b/dbaccess/source/ui/app/AppControllerDnD.cxx
@@ -786,7 +786,7 @@ bool OApplicationController::paste( ElementType _eType, 
const svx::ODataAccessDe
 {
 Reference xContent;
 _rPasteData[DataAccessDescriptorProperty::Component] >>= xContent;
-return 
insertHierachyElement(_eType,_sParentFolder,Reference(xContent,UNO_QUERY).is(),xContent,_bMove);
+return 
insertHierarchyElement(_eType,_sParentFolder,Reference(xContent,UNO_QUERY).is(),xContent,_bMove);
 }
 }
 catch(const SQLException&) { showError( SQLExceptionInfo( 
::cppu::getCaughtException() ) ); }
diff --git a/dbaccess/source/ui/app/AppControllerGen.cxx 
b/dbaccess/source/ui/app/AppControllerGen.cxx
index 3ec1094eeb9e..44e1a3b9666e 100644
--- a/dbaccess/source/ui/app/AppControllerGen.cxx
+++ b/dbaccess/source/ui/app/AppControllerGen.cxx
@@ -580,10 +580,10 @@ void OApplicationController::onDocumentOpened( const 
OUString& _rName, const sal
 }
 }
 
-bool OApplicationController::insertHierachyElement(ElementType _eType, const 
OUString& _sParentFolder, bool _bCollection, const Reference& 
_xContent, bool _bMove)
+bool OApplicationController::insertHierarchyElement(ElementType _eType, const 
OUString& _sParentFolder, bool _bCollection, const Reference& 
_xContent, bool _bMove)
 {
 Reference xNames(getElements(_eType), 
UNO_QUERY);
-return dbaui::insertHierachyElement(getFrameWeld()
+return dbaui::insertHierarchyElement(getFrameWeld()
,getORB()
,xNames
,_sParentFolder
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx 
b/dbaccess/source/ui/dlg/CollectionView.cxx
index 75973ad1e780..0ca6502ca93e 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -177,7 +177,7 @@ IMPL_LINK_NOARG(OCollectionView, NewFolder_Click, 
weld::Button&, void)
 try
 {
 Reference 
xNameContainer(m_xContent,UNO_QUERY);
-if ( 
dbaui::insertHierachyElement(m_xDialog.get(),m_xContext,xNameContainer,OUString(),m_bCreateForm)
 )
+if ( 
dbaui::insertHierarchyElement(m_xDialog.get(),m_xContext,xNameContainer,OUString(),m_bCreateForm)
 )
 Initialize();
 }
 catch( const SQLException& )
diff --git a/dbaccess/source/ui/inc/UITools.hxx 
b/dbaccess/source/ui/inc/UITools.hxx
index 0a0918ab99b0..34249933f9b6 100644
--- a/dbacc

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

2021-12-26 Thread Kevin Suo (via logerrit)
 sc/inc/globstr.hrc |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 5d56a2301ca00b21dff110b0f11677cf80dff04e
Author: Kevin Suo 
AuthorDate: Sun Dec 26 20:27:06 2021 +0800
Commit: Eike Rathke 
CommitDate: Sun Dec 26 18:00:12 2021 +0100

sc-error-codes: STR_LONG_ERR_NO_VALUE should be "Error: No value"

rather than Error: Wrong data type.

STR_LONG_ERR_NO_VALUE was marked as "Error: Wrong data type" in
the source code. It was translated in the en_US UI as "Error:
No result", which seems to be intentionally. This causes confusion
for other languages.

This error code is used for case FormulaError::NoValue and this
FormulaError enum entry is used in various places, most of them
indicates that it is used because of no value is returned.

"Wrong data type" should be a reason why there was "no value"
returned, thus "Wrong data type" should be a subset of "No value",
but anyway STR_LONG_ERR_NO_VALUE != "Wrong data type".

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

diff --git a/sc/inc/globstr.hrc b/sc/inc/globstr.hrc
index 44776504b47e..793d3cb95d55 100644
--- a/sc/inc/globstr.hrc
+++ b/sc/inc/globstr.hrc
@@ -216,7 +216,7 @@
 /* ERROR.TYPE( #DIV/0! ) == 2 */
 #define STR_LONG_ERR_DIV_ZERO   NC_("STR_LONG_ERR_DIV_ZERO", 
"Error: Division by zero")
 /* ERROR.TYPE( #VALUE! ) == 3 */
-#define STR_LONG_ERR_NO_VALUE   NC_("STR_LONG_ERR_NO_VALUE", 
"Error: Wrong data type")
+#define STR_LONG_ERR_NO_VALUE   NC_("STR_LONG_ERR_NO_VALUE", 
"Error: No value")
 /* ERROR.TYPE( #REF! ) == 4 */
 #define STR_LONG_ERR_NO_REF NC_("STR_LONG_ERR_NO_REF", 
"Error: Not a valid reference")
 /* ERROR.TYPE( #NAME! ) == 5 */


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

2021-12-26 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/interpr1.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 439814c48b3194398e7abe97a855193dc3e28f12
Author: Eike Rathke 
AuthorDate: Sun Dec 26 15:18:46 2021 +0100
Commit: Eike Rathke 
CommitDate: Sun Dec 26 17:47:42 2021 +0100

Resolves: tdf#146377 Propagate condition error of IF(condition)

Previsouly a given ELSE-path was executed as the condition is never
TRUE on error, which wasn't significant unless the ELSE was an
error evaluating function like IFERROR() or ISERROR() or other
IS...() functions.

This changes behaviour of an undocumented side effect, so *might*
break existing expressions that (unwillingly?) relied on it.

Gnumeric, Excel and GoogleSheets all agree on propagating the
error value as implemented now.

Change-Id: I0905a363be7a3b02925f1c41b4e6c8d36f12df93
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127515
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 1c14b9efb0677dea65ff220222fbb8d5c2aa6973)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127481

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 345ab7115815..44672395903f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -187,7 +187,13 @@ void ScInterpreter::ScIfJump()
 break;
 default:
 {
-if ( GetBool() )
+const bool bCondition = GetBool();
+if (nGlobalError != FormulaError::NONE)
+{   // Propagate error, not THEN- or ELSE-path, jump behind.
+PushError(nGlobalError);
+aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
+}
+else if ( bCondition )
 {   // TRUE
 if( nJumpCount >= 2 )
 {   // THEN path


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

2021-12-26 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/interpr1.cxx |8 +++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit 1c14b9efb0677dea65ff220222fbb8d5c2aa6973
Author: Eike Rathke 
AuthorDate: Sun Dec 26 15:18:46 2021 +0100
Commit: Eike Rathke 
CommitDate: Sun Dec 26 16:21:28 2021 +0100

Resolves: tdf#146377 Propagate condition error of IF(condition)

Previsouly a given ELSE-path was executed as the condition is never
TRUE on error, which wasn't significant unless the ELSE was an
error evaluating function like IFERROR() or ISERROR() or other
IS...() functions.

This changes behaviour of an undocumented side effect, so *might*
break existing expressions that (unwillingly?) relied on it.

Gnumeric, Excel and GoogleSheets all agree on propagating the
error value as implemented now.

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

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 345ab7115815..44672395903f 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -187,7 +187,13 @@ void ScInterpreter::ScIfJump()
 break;
 default:
 {
-if ( GetBool() )
+const bool bCondition = GetBool();
+if (nGlobalError != FormulaError::NONE)
+{   // Propagate error, not THEN- or ELSE-path, jump behind.
+PushError(nGlobalError);
+aCode.Jump( pJump[ nJumpCount ], pJump[ nJumpCount ] );
+}
+else if ( bCondition )
 {   // TRUE
 if( nJumpCount >= 2 )
 {   // THEN path


[Libreoffice-commits] core.git: connectivity/source dbaccess/source stoc/source xmloff/source

2021-12-26 Thread Noel Grandin (via logerrit)
 connectivity/source/parse/sqlnode.cxx   |2 +-
 dbaccess/source/core/api/KeySet.cxx |4 ++--
 stoc/source/security/permissions.cxx|2 +-
 xmloff/source/core/xmlexp.cxx   |4 ++--
 xmloff/source/style/PageMasterImportContext.cxx |6 +++---
 xmloff/source/style/prstylei.cxx|8 
 6 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 16506994ecef4bd800575beb9f2b66eb16d902fa
Author: Noel Grandin 
AuthorDate: Sat Dec 25 08:52:18 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 26 11:43:15 2021 +0100

can use OUStringLiteral here

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

diff --git a/connectivity/source/parse/sqlnode.cxx 
b/connectivity/source/parse/sqlnode.cxx
index 424f016db9ca..3c3feed5db21 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2472,7 +2472,7 @@ void OSQLParseNode::parseLeaf(OUStringBuffer& rString, 
const SQLParseNodeParamet
 case SQLNodeType::ApproxNum:
 {
 OUString aTmp = m_aNodeValue;
-static OUString strPoint(".");
+static constexpr OUStringLiteral strPoint(u".");
 if (rParam.bInternational && rParam.bPredicate && 
rParam.sDecSep != strPoint)
 aTmp = aTmp.replaceAll(strPoint, rParam.sDecSep);
 
diff --git a/dbaccess/source/core/api/KeySet.cxx 
b/dbaccess/source/core/api/KeySet.cxx
index 86b397cbbff2..847a9c1a07cc 100644
--- a/dbaccess/source/core/api/KeySet.cxx
+++ b/dbaccess/source/core/api/KeySet.cxx
@@ -444,9 +444,9 @@ void OKeySet::updateRow(const ORowSetRow& _rInsertRow 
,const ORowSetRow& _rOrigi
 
 OUStringBuffer aSql = "UPDATE " + m_aComposedTableName + " SET ";
 // list all columns that should be set
-static OUString aPara(" = ?,");
+constexpr OUStringLiteral aPara(u" = ?,");
 OUString aQuote  = getIdentifierQuoteString();
-static OUString aAnd(" AND ");
+constexpr OUStringLiteral aAnd(u" AND ");
 OUString sIsNull(" IS NULL");
 OUString sParam(" = ?");
 
diff --git a/stoc/source/security/permissions.cxx 
b/stoc/source/security/permissions.cxx
index 987b07ed8997..1d7aca177344 100644
--- a/stoc/source/security/permissions.cxx
+++ b/stoc/source/security/permissions.cxx
@@ -329,7 +329,7 @@ FilePermission::FilePermission(
 // correct win drive letters
 if (9 < m_url.getLength() && '|' == m_url[ 9 ]) // file:///X|
 {
-static OUString s_colon = ":";
+constexpr OUStringLiteral s_colon = u":";
 // common case in API is a ':' (sal), so convert '|' to ':'
 m_url = m_url.replaceAt( 9, 1, s_colon );
 }
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index 7233d0d3dc3e..fc18a3de0370 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1084,8 +1084,8 @@ void SvXMLExport::ImplExportStyles()
 if( ( mnExportFlags & SvXMLExportFlags::CONTENT ) || !mxExportInfo.is() )
 return;
 
-static OUString sStyleNames( "StyleNames" );
-static OUString sStyleFamilies( "StyleFamilies" );
+static constexpr OUStringLiteral sStyleNames( u"StyleNames" );
+static constexpr OUStringLiteral sStyleFamilies( u"StyleFamilies" );
 uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = 
mxExportInfo->getPropertySetInfo();
 if ( xPropertySetInfo->hasPropertyByName( sStyleNames ) && 
xPropertySetInfo->hasPropertyByName( sStyleFamilies ) )
 {
diff --git a/xmloff/source/style/PageMasterImportContext.cxx 
b/xmloff/source/style/PageMasterImportContext.cxx
index 519b24ee696e..d07caf9fa852 100644
--- a/xmloff/source/style/PageMasterImportContext.cxx
+++ b/xmloff/source/style/PageMasterImportContext.cxx
@@ -166,9 +166,9 @@ void PageStyleContext::FillPropertySet_PageStyle(
 // ones are used when a FillStyle is defined
 if(!m_bIsFillStyleAlreadyConverted && !GetProperties().empty())
 {
-static OUString s_FillStyle("FillStyle");
-static OUString s_HeaderFillStyle("HeaderFillStyle");
-static OUString s_FooterFillStyle("FooterFillStyle");
+static constexpr OUStringLiteral s_FillStyle(u"FillStyle");
+static constexpr OUStringLiteral s_HeaderFillStyle(u"HeaderFillStyle");
+static constexpr OUStringLiteral s_FooterFillStyle(u"FooterFillStyle");
 
 // note: the function must only check by property name, not any 
id/flag!
 if (doNewDrawingLayerFillStyleDefinitionsExist(s_FillStyle)
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 016204277b54..9239f41b6837 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -624,10 +624,10 @@ void 
XMLPropStyleContext::translateNameBasedDrawingLayerFillStyleDefinitionsToSt
 

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

2021-12-26 Thread Noel Grandin (via logerrit)
 include/svx/xmleohlp.hxx|8 +++-
 svx/source/xml/xmleohlp.cxx |   16 
 sw/source/filter/xml/wrtxml.cxx |1 +
 sw/source/filter/xml/xmlexp.cxx |1 +
 4 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 7313b9ecf2285768563d82c19715d34b7c66d5ef
Author: Noel Grandin 
AuthorDate: Fri Dec 24 10:09:09 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Dec 26 10:25:12 2021 +0100

use comphelper::WeakComponentImplHelper in SvXMLEmbeddedObjectHelper

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

diff --git a/include/svx/xmleohlp.hxx b/include/svx/xmleohlp.hxx
index aa3c6764ebde..55682f16c51a 100644
--- a/include/svx/xmleohlp.hxx
+++ b/include/svx/xmleohlp.hxx
@@ -20,8 +20,7 @@
 #ifndef INCLUDED_SVX_XMLEOHLP_HXX
 #define INCLUDED_SVX_XMLEOHLP_HXX
 
-#include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -44,8 +43,7 @@ class OutputStorageWrapper_Impl;
 
 
 class SVXCORE_DLLPUBLIC SvXMLEmbeddedObjectHelper final :
-public cppu::BaseMutex,
-public cppu::WeakComponentImplHelper< 
css::document::XEmbeddedObjectResolver, css::container::XNameAccess >
+public comphelper::WeakComponentImplHelper< 
css::document::XEmbeddedObjectResolver, css::container::XNameAccess >
 {
 OUString maCurContainerStorageName;
 
@@ -88,7 +86,7 @@ class SVXCORE_DLLPUBLIC SvXMLEmbeddedObjectHelper final :
   ::comphelper::IEmbeddedHelper& 
rDocPersist,
   SvXMLEmbeddedObjectHelperMode 
eCreateMode );
 
-virtual void SAL_CALL   disposing() override;
+virtual voiddisposing(std::unique_lock&) 
override;
 
 public:
 SvXMLEmbeddedObjectHelper(
diff --git a/svx/source/xml/xmleohlp.cxx b/svx/source/xml/xmleohlp.cxx
index 0f33e96c03a1..fdb43fdd6fd2 100644
--- a/svx/source/xml/xmleohlp.cxx
+++ b/svx/source/xml/xmleohlp.cxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -120,14 +121,12 @@ void SAL_CALL OutputStorageWrapper_Impl::closeOutput()
 }
 
 SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper() :
-WeakComponentImplHelper< XEmbeddedObjectResolver, XNameAccess >( m_aMutex 
),
 mpDocPersist( nullptr ),
 meCreateMode( SvXMLEmbeddedObjectHelperMode::Read )
 {
 }
 
 SvXMLEmbeddedObjectHelper::SvXMLEmbeddedObjectHelper( 
::comphelper::IEmbeddedHelper& rDocPersist, SvXMLEmbeddedObjectHelperMode 
eCreateMode ) :
-WeakComponentImplHelper< XEmbeddedObjectResolver, XNameAccess >( m_aMutex 
),
 mpDocPersist( nullptr ),
 meCreateMode( SvXMLEmbeddedObjectHelperMode::Read )
 {
@@ -138,11 +137,12 @@ SvXMLEmbeddedObjectHelper::~SvXMLEmbeddedObjectHelper()
 {
 }
 
-void SAL_CALL SvXMLEmbeddedObjectHelper::disposing()
+void SvXMLEmbeddedObjectHelper::disposing(std::unique_lock&)
 {
 if( mxTempStorage.is() )
 {
 mxTempStorage->dispose();
+mxTempStorage.clear();
 }
 }
 
@@ -546,7 +546,7 @@ rtl::Reference 
SvXMLEmbeddedObjectHelper::Create(
 
 OUString SAL_CALL SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const 
OUString& rURL)
 {
-MutexGuard  aGuard( m_aMutex );
+std::unique_lock  aGuard( m_aMutex );
 
 OUString sRet;
 try
@@ -571,7 +571,7 @@ OUString SAL_CALL 
SvXMLEmbeddedObjectHelper::resolveEmbeddedObjectURL(const OUSt
 Any SAL_CALL SvXMLEmbeddedObjectHelper::getByName(
 const OUString& rURLStr )
 {
-MutexGuard  aGuard( m_aMutex );
+std::unique_lock  aGuard( m_aMutex );
 Any aRet;
 if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
 {
@@ -672,7 +672,7 @@ Sequence< OUString > SAL_CALL 
SvXMLEmbeddedObjectHelper::getElementNames()
 
 sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( const OUString& 
rURLStr )
 {
-MutexGuard  aGuard( m_aMutex );
+std::unique_lock  aGuard( m_aMutex );
 if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
 {
 return true;
@@ -694,7 +694,7 @@ sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasByName( 
const OUString& rURLStr
 // XNameAccess
 Type SAL_CALL SvXMLEmbeddedObjectHelper::getElementType()
 {
-MutexGuard  aGuard( m_aMutex );
+std::unique_lock  aGuard( m_aMutex );
 if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
 return cppu::UnoType::get();
 else
@@ -703,7 +703,7 @@ Type SAL_CALL SvXMLEmbeddedObjectHelper::getElementType()
 
 sal_Bool SAL_CALL SvXMLEmbeddedObjectHelper::hasElements()
 {
-MutexGuard  aGuard( m_aMutex );
+std::unique_lock  aGuard( m_aMutex );
 if( SvXMLEmbeddedObjectHelperMode::Read == meCreateMode )
 {
 return true;
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index a1f9625c6936..bd7c74

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

2021-12-26 Thread Eike Rathke (via logerrit)
 sc/source/core/tool/interpr1.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 07e58ea08758018906c08321591d264f85a24e66
Author: Eike Rathke 
AuthorDate: Sat Dec 25 19:38:14 2021 +0100
Commit: Adolfo Jayme Barrientos 
CommitDate: Sun Dec 26 09:01:39 2021 +0100

Related: tdf#146377 Let AND(), OR(), XOR() propagate the current error, if 
any

... instead of forcing Err:504

Change-Id: I7e91671ffc61bf82d9095378656b41981040f55e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127492
Reviewed-by: Eike Rathke 
Tested-by: Jenkins
(cherry picked from commit 4674ff347cd2e71445503efdc0c110d094daa80b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127477
Reviewed-by: Adolfo Jayme Barrientos 

diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 94923f75c255..cc710efc353e 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -1347,7 +1347,7 @@ void ScInterpreter::ScAnd()
 }
 break;
 default:
-Pop();
+PopError();
 SetError( FormulaError::IllegalParameter);
 }
 }
@@ -1446,7 +1446,7 @@ void ScInterpreter::ScOr()
 }
 break;
 default:
-Pop();
+PopError();
 SetError( FormulaError::IllegalParameter);
 }
 }
@@ -1548,7 +1548,7 @@ void ScInterpreter::ScXor()
 }
 break;
 default:
-Pop();
+PopError();
 SetError( FormulaError::IllegalParameter);
 }
 }