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

2023-09-07 Thread Noel Grandin (via logerrit)
 toolkit/inc/controls/tabpagemodel.hxx|1 -
 toolkit/source/controls/tabpagemodel.cxx |9 -
 2 files changed, 10 deletions(-)

New commits:
commit c29d86fc92509bb9c853a07970963b7b3be09d52
Author: Noel Grandin 
AuthorDate: Thu Sep 7 10:47:14 2023 +0200
Commit: Noel Grandin 
CommitDate: Thu Sep 7 14:44:03 2023 +0200

no need to take a lock and do nothing

It has been this way since initial commit in

commit 5eb0040d0199f8c80d47ed912e055f27a193b81d
Author: Mihaela Kedikova 
Date:   Thu Aug 12 17:44:19 2010 +0200
tabcontrol: new source code for tabcontrol added

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

diff --git a/toolkit/inc/controls/tabpagemodel.hxx 
b/toolkit/inc/controls/tabpagemodel.hxx
index 48a84fe5a602..a1668e2d5d59 100644
--- a/toolkit/inc/controls/tabpagemodel.hxx
+++ b/toolkit/inc/controls/tabpagemodel.hxx
@@ -62,7 +62,6 @@ public:
 
 void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& 
Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) override;
 void SAL_CALL disposing( const css::lang::EventObject& Source ) override;
-void SAL_CALL dispose() override;
 
  // css::awt::XWindowListener
 virtual void SAL_CALL windowResized( const css::awt::WindowEvent& e ) 
override;
diff --git a/toolkit/source/controls/tabpagemodel.cxx 
b/toolkit/source/controls/tabpagemodel.cxx
index ac57abdc2da3..53a2c7335b27 100644
--- a/toolkit/source/controls/tabpagemodel.cxx
+++ b/toolkit/source/controls/tabpagemodel.cxx
@@ -186,15 +186,6 @@ css::uno::Sequence SAL_CALL 
UnoControlTabPage::getSupportedServiceName
 return { "com.sun.star.awt.tab.UnoControlTabPage" };
 }
 
-void UnoControlTabPage::dispose()
-{
-SolarMutexGuard aSolarGuard;
-
-lang::EventObject aEvt;
-aEvt.Source = static_cast< ::cppu::OWeakObject* >( this );
-ControlContainerBase::dispose();
-}
-
 void SAL_CALL UnoControlTabPage::disposing( const lang::EventObject& Source )
 {
  ControlContainerBase::disposing( Source );


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

2023-08-03 Thread Michael Weghorn (via logerrit)
 toolkit/inc/controls/table/tablecontrolinterface.hxx  |5 +
 toolkit/source/controls/table/defaultinputhandler.cxx |   12 
 2 files changed, 5 insertions(+), 12 deletions(-)

New commits:
commit 8c330cd741a55546ee7fdf416600d3f44dd2a40a
Author: Michael Weghorn 
AuthorDate: Wed Aug 2 13:10:44 2023 +0200
Commit: Michael Weghorn 
CommitDate: Thu Aug 3 16:54:23 2023 +0200

toolkit: Use range-based for, drop invalidTableControlAction

The `invalidTableControlAction` enum value was apparently
only used to detect when to stop the iteration and is
no longer, so drop it.

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

diff --git a/toolkit/inc/controls/table/tablecontrolinterface.hxx 
b/toolkit/inc/controls/table/tablecontrolinterface.hxx
index 008fe9b2b293..8f5dca676375 100644
--- a/toolkit/inc/controls/table/tablecontrolinterface.hxx
+++ b/toolkit/inc/controls/table/tablecontrolinterface.hxx
@@ -64,10 +64,7 @@ namespace svt::table
 /// selects the row, from the actual cursor till top
 cursorSelectRowAreaTop,
 /// selects the row, from the actual cursor till bottom
-cursorSelectRowAreaBottom,
-
-/// invalid and final enumeration value, not to be actually used
-invalidTableControlAction
+cursorSelectRowAreaBottom
 };
 
 
diff --git a/toolkit/source/controls/table/defaultinputhandler.cxx 
b/toolkit/source/controls/table/defaultinputhandler.cxx
index ef1ff3c51c60..171458ef7acf 100644
--- a/toolkit/source/controls/table/defaultinputhandler.cxx
+++ b/toolkit/source/controls/table/defaultinputhandler.cxx
@@ -145,17 +145,13 @@ namespace svt::table
 { KEY_UP,   KEY_SHIFT,  cursorSelectRowUp },
 { KEY_DOWN, KEY_SHIFT,  cursorSelectRowDown },
 { KEY_END,  KEY_SHIFT,  cursorSelectRowAreaBottom },
-{ KEY_HOME, KEY_SHIFT,  cursorSelectRowAreaTop },
-
-{ 0, 0, invalidTableControlAction }
+{ KEY_HOME, KEY_SHIFT,  cursorSelectRowAreaTop }
 };
-
-const ActionMapEntry* pActions = aKnownActions;
-for ( ; pActions->eAction != invalidTableControlAction; ++pActions )
+for (const ActionMapEntry& rAction : aKnownActions)
 {
-if ( ( pActions->nKeyCode == nKeyCode ) && ( 
pActions->nKeyModifier == rKeyCode.GetModifier() ) )
+if ( ( rAction.nKeyCode == nKeyCode ) && ( rAction.nKeyModifier == 
rKeyCode.GetModifier() ) )
 {
-bHandled = _rControl.dispatchAction( pActions->eAction );
+bHandled = _rControl.dispatchAction( rAction.eAction );
 break;
 }
 }


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

2023-01-25 Thread Stephan Bergmann (via logerrit)
 toolkit/inc/controls/accessiblecontrolcontext.hxx|   12 +++-
 toolkit/source/controls/accessiblecontrolcontext.cxx |   12 
 2 files changed, 3 insertions(+), 21 deletions(-)

New commits:
commit bbe70a7e3ddd0ebe92635afc842ec3c01294a5b7
Author: Stephan Bergmann 
AuthorDate: Mon Jan 23 19:21:03 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Jan 25 18:55:06 2023 +

Use ImplInheritanceHelper in OAccessibleControlContext

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

diff --git a/toolkit/inc/controls/accessiblecontrolcontext.hxx 
b/toolkit/inc/controls/accessiblecontrolcontext.hxx
index e0c2f1a11cc9..416984c3344c 100644
--- a/toolkit/inc/controls/accessiblecontrolcontext.hxx
+++ b/toolkit/inc/controls/accessiblecontrolcontext.hxx
@@ -20,9 +20,8 @@
 #pragma once
 
 #include 
-#include 
 #include 
-#include 
+#include 
 #include 
 
 namespace vcl { class Window; }
@@ -38,8 +37,6 @@ namespace toolkit
 
 
 typedef ::comphelper::OAccessibleComponentHelper
OAccessibleControlContext_Base;
-typedef ::cppu::ImplHelper1 <   css::lang::XEventListener
->   OAccessibleControlContext_IBase;
 
 /** class implementing the AccessibleContext for a UNO control - to be 
used in design mode of the control.
 life time control
@@ -48,8 +45,8 @@ namespace toolkit
 is being disposed.
 */
 class OAccessibleControlContext final
-:public OAccessibleControlContext_Base
-,public OAccessibleControlContext_IBase
+:public cppu::ImplInheritanceHelper<
+OAccessibleControlContext_Base, css::lang::XEventListener>
 {
 public:
 /** creates an accessible context for a uno control
@@ -61,9 +58,6 @@ namespace toolkit
 const css::uno::Reference< css::accessibility::XAccessible >& 
_rxCreator
 );
 
-// XInterface
-DECLARE_XINTERFACE( )
-DECLARE_XTYPEPROVIDER( )
 private:
 
 // XAccessibleContext
diff --git a/toolkit/source/controls/accessiblecontrolcontext.cxx 
b/toolkit/source/controls/accessiblecontrolcontext.cxx
index 345e486db04d..761821bce601 100644
--- a/toolkit/source/controls/accessiblecontrolcontext.cxx
+++ b/toolkit/source/controls/accessiblecontrolcontext.cxx
@@ -58,18 +58,6 @@ namespace toolkit
 }
 
 
-// (order matters: the first is the class name, the second is the class 
doing the ref counting)
-IMPLEMENT_FORWARD_XINTERFACE2( OAccessibleControlContext, 
OAccessibleControlContext_Base, OAccessibleControlContext_IBase )
-css::uno::Sequence< css::uno::Type > SAL_CALL 
OAccessibleControlContext::getTypes()
-{
-return ::comphelper::concatSequences(
-OAccessibleControlContext_Base::getTypes(),
-OAccessibleControlContext_IBase::getTypes()
-);
-}
-IMPLEMENT_GET_IMPLEMENTATION_ID( OAccessibleControlContext )
-
-
 void OAccessibleControlContext::Init( const Reference< XAccessible >& 
_rxCreator )
 {
 OContextEntryGuard aGuard( this );


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

2023-01-19 Thread Stephan Bergmann (via logerrit)
 toolkit/inc/controls/roadmapcontrol.hxx  |4 +++-
 toolkit/source/controls/grid/gridcontrol.hxx |4 ++--
 toolkit/source/controls/roadmapcontrol.cxx   |9 -
 toolkit/source/controls/tree/treecontrol.cxx |4 ++--
 4 files changed, 15 insertions(+), 6 deletions(-)

New commits:
commit 579d144290c1617fdb38d09b30900a6bbe390b8d
Author: Stephan Bergmann 
AuthorDate: Thu Jan 19 09:42:08 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Jan 19 09:53:24 2023 +

Fix some toolkit UnoControlBase derivates' queryAggregation

The base UnoControl uses WeakAggImplHelper9, so (for better or worse) 
derives
from XAggregation, but UnoGridControl, UnoRoadmapControl, and 
UnoTreeControl all
failed to properly implement the XAggregation protocol.

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

diff --git a/toolkit/inc/controls/roadmapcontrol.hxx 
b/toolkit/inc/controls/roadmapcontrol.hxx
index 2a4a1021e0ad..cfc7fbdb9c74 100644
--- a/toolkit/inc/controls/roadmapcontrol.hxx
+++ b/toolkit/inc/controls/roadmapcontrol.hxx
@@ -168,7 +168,9 @@ namespace toolkit
 
 // XTypeProvider
 DECLARE_XTYPEPROVIDER( )
-DECLARE_XINTERFACE()
+DECLARE_UNO3_AGG_DEFAULTS(UnoRoadmapControl, UnoControlRoadmap_Base)
+
+css::uno::Any SAL_CALL queryAggregation(css::uno::Type const & aType) 
override;
 
 // css::lang::XServiceInfo
 OUString SAL_CALL getImplementationName() override;
diff --git a/toolkit/source/controls/grid/gridcontrol.hxx 
b/toolkit/source/controls/grid/gridcontrol.hxx
index 6b4f8152bbd0..435ff2fab089 100644
--- a/toolkit/source/controls/grid/gridcontrol.hxx
+++ b/toolkit/source/controls/grid/gridcontrol.hxx
@@ -25,7 +25,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 #include 
@@ -78,7 +78,7 @@ public:
 
 // = UnoGridControl
 
-typedef ::cppu::ImplInheritanceHelper  <   UnoControlBase
+typedef ::cppu::AggImplInheritanceHelper2  <   UnoControlBase
 ,   css::awt::grid::XGridControl
 ,   css::awt::grid::XGridRowSelection
 >   UnoGridControl_Base;
diff --git a/toolkit/source/controls/roadmapcontrol.cxx 
b/toolkit/source/controls/roadmapcontrol.cxx
index 2640dc6b5b67..84d49a78f48b 100644
--- a/toolkit/source/controls/roadmapcontrol.cxx
+++ b/toolkit/source/controls/roadmapcontrol.cxx
@@ -362,7 +362,14 @@ static void lcl_throwIndexOutOfBoundsException( )
 }
 
 IMPLEMENT_FORWARD_XTYPEPROVIDER2( UnoRoadmapControl, UnoControlRoadmap_Base, 
UnoControlRoadmap_IBase )
-IMPLEMENT_FORWARD_XINTERFACE2( UnoRoadmapControl, UnoControlRoadmap_Base, 
UnoControlRoadmap_IBase )
+
+css::uno::Any UnoRoadmapControl::queryAggregation(css::uno::Type const & 
aType) {
+auto ret = UnoControlRoadmap_Base::queryAggregation(aType);
+if (!ret.hasValue()) {
+ret = UnoControlRoadmap_IBase::queryInterface(aType);
+}
+return ret;
+}
 
 
 sal_Bool SAL_CALL UnoRoadmapControl::setModel(const Reference< XControlModel 
>& _rModel)
diff --git a/toolkit/source/controls/tree/treecontrol.cxx 
b/toolkit/source/controls/tree/treecontrol.cxx
index d4439a4ff1e3..43d353079f43 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -27,7 +27,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -120,7 +120,7 @@ Reference< XPropertySetInfo > 
UnoTreeModel::getPropertySetInfo(  )
 
 namespace {
 
-typedef ::cppu::ImplInheritanceHelper< UnoControlBase, 
css::awt::tree::XTreeControl > UnoTreeControl_Base;
+typedef ::cppu::AggImplInheritanceHelper1< UnoControlBase, 
css::awt::tree::XTreeControl > UnoTreeControl_Base;
 class UnoTreeControl : public UnoTreeControl_Base
 {
 public:


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

2022-12-22 Thread Stephan Bergmann (via logerrit)
 toolkit/inc/awt/vclxwindows.hxx|3 +++
 toolkit/source/awt/vclxtoolkit.cxx |3 ++-
 toolkit/source/awt/vclxwindows.cxx |   11 +++
 3 files changed, 16 insertions(+), 1 deletion(-)

New commits:
commit feb8b833a6245d42400f42a0bc789dc84594ee6f
Author: Stephan Bergmann 
AuthorDate: Thu Dec 1 14:58:10 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 22 15:05:22 2022 +

loplugin:unocast (VCLXDialog)

(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

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

diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
index 821418638492..983bcff726b4 100644
--- a/toolkit/inc/awt/vclxwindows.hxx
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -121,6 +121,9 @@ public:
 VCLXDialog();
 virtual ~VCLXDialog() override;
 
+sal_Int64 SAL_CALL getSomething(css::uno::Sequence const & 
aIdentifier) override;
+static css::uno::Sequence const & getUnoTunnelId();
+
 // css::awt::XDialog2
 virtual void SAL_CALL endDialog( ::sal_Int32 Result ) override;
 virtual void SAL_CALL setHelpId( const OUString& Id ) override;
diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 7a3e3e7cfbcb..fd86d5e371b9 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -139,6 +139,7 @@
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -1545,7 +1546,7 @@ vcl::Window* VCLXToolkit::ImplCreateWindow( 
rtl::Reference* ppNewCom
 // which creates a component object.
 css::uno::Reference< css::awt::XWindowPeer > xWinPeer = 
pNewWindow->GetComponentInterface( false );
 if ( xWinPeer.is() )
-*ppNewComp = dynamic_cast< VCLXDialog* >( xWinPeer.get() );
+*ppNewComp = comphelper::getFromUnoTunnel< VCLXDialog >( 
xWinPeer );
 else
 *ppNewComp = new VCLXDialog;
 }
diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index d8b3c8109c8a..7cf80879148a 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -34,6 +34,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -2223,6 +2224,16 @@ VCLXDialog::~VCLXDialog()
 SAL_INFO("toolkit", __FUNCTION__);
 }
 
+sal_Int64 VCLXDialog::getSomething(css::uno::Sequence const & 
aIdentifier) {
+return comphelper::getSomethingImpl(
+aIdentifier, this, comphelper::FallbackToGetSomethingOf{});
+}
+
+css::uno::Sequence const & VCLXDialog::getUnoTunnelId() {
+static comphelper::UnoIdInit const id;
+return id.getSeq();
+}
+
 void SAL_CALL VCLXDialog::endDialog( ::sal_Int32 i_result )
 {
 SolarMutexGuard aGuard;


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

2022-12-22 Thread Stephan Bergmann (via logerrit)
 toolkit/inc/awt/vclxwindows.hxx   |3 +++
 toolkit/source/awt/vclxwindows.cxx|   11 +++
 toolkit/source/controls/dialogcontrol.cxx |2 +-
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 1fa58cc6cc9c3849753342a5d9a6ddfa461b5e66
Author: Stephan Bergmann 
AuthorDate: Thu Dec 1 15:08:19 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 22 14:21:44 2022 +

loplugin:unocast (VCLXMultiPage)

(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

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

diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
index 78c73c06fcba..821418638492 100644
--- a/toolkit/inc/awt/vclxwindows.hxx
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -177,6 +177,9 @@ public:
 VCLXMultiPage();
 virtual ~VCLXMultiPage() override;
 
+sal_Int64 SAL_CALL getSomething(css::uno::Sequence const & 
aIdentifier) override;
+static css::uno::Sequence const & getUnoTunnelId();
+
 // css::lang::XComponent
 void SAL_CALL dispose(  ) override;
 
diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index 036e57366a6a..d8b3c8109c8a 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2398,6 +2398,17 @@ void VCLXMultiPage::ImplGetPropertyIds( std::vector< 
sal_uInt16 >  )
 VCLXMultiPage::~VCLXMultiPage()
 {
 }
+
+sal_Int64 VCLXMultiPage::getSomething(css::uno::Sequence const & 
aIdentifier) {
+return comphelper::getSomethingImpl(
+aIdentifier, this, comphelper::FallbackToGetSomethingOf{});
+}
+
+css::uno::Sequence const & VCLXMultiPage::getUnoTunnelId() {
+static comphelper::UnoIdInit const id;
+return id.getSeq();
+}
+
 void SAL_CALL VCLXMultiPage::dispose()
 {
 SolarMutexGuard aGuard;
diff --git a/toolkit/source/controls/dialogcontrol.cxx 
b/toolkit/source/controls/dialogcontrol.cxx
index 92981a4f5fea..ba0054714c0c 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -792,7 +792,7 @@ void UnoMultiPageControl::bindPage( const uno::Reference< 
awt::XControl >& _rxCo
 TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
 if ( xTabCntrl.is() && pPage )
 {
-VCLXMultiPage* pXTab = dynamic_cast< VCLXMultiPage* >( xTabCntrl.get() 
);
+VCLXMultiPage* pXTab = comphelper::getFromUnoTunnel< VCLXMultiPage >( 
xTabCntrl );
 if ( pXTab )
 {
 OUString sTitle;


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

2022-12-22 Thread Stephan Bergmann (via logerrit)
 toolkit/inc/awt/vclxwindows.hxx   |3 +++
 toolkit/source/awt/vclxwindows.cxx|   10 ++
 toolkit/source/controls/dialogcontrol.cxx |3 ++-
 3 files changed, 15 insertions(+), 1 deletion(-)

New commits:
commit 9f3022ceb036f23b4b0994c3e2fbd1001bff225a
Author: Stephan Bergmann 
AuthorDate: Thu Dec 1 15:04:59 2022 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 22 12:51:25 2022 +

loplugin:unocast (VCLXTabPage)

(See the upcoming commit introducing that loplugin:unocast on why such
dynamic_casts from UNO types are dangerous.)

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

diff --git a/toolkit/inc/awt/vclxwindows.hxx b/toolkit/inc/awt/vclxwindows.hxx
index ce96248494ea..78c73c06fcba 100644
--- a/toolkit/inc/awt/vclxwindows.hxx
+++ b/toolkit/inc/awt/vclxwindows.hxx
@@ -151,6 +151,9 @@ public:
 VCLXTabPage();
 virtual ~VCLXTabPage() override;
 
+sal_Int64 SAL_CALL getSomething(css::uno::Sequence const & 
aIdentifier) override;
+static css::uno::Sequence const & getUnoTunnelId();
+
 // css::awt::XView
 void SAL_CALL draw( sal_Int32 nX, sal_Int32 nY ) override;
 
diff --git a/toolkit/source/awt/vclxwindows.cxx 
b/toolkit/source/awt/vclxwindows.cxx
index 8fc6dc0277db..036e57366a6a 100644
--- a/toolkit/source/awt/vclxwindows.cxx
+++ b/toolkit/source/awt/vclxwindows.cxx
@@ -2650,6 +2650,16 @@ VCLXTabPage::~VCLXTabPage()
 {
 }
 
+sal_Int64 VCLXTabPage::getSomething(css::uno::Sequence const & 
aIdentifier) {
+return comphelper::getSomethingImpl(
+aIdentifier, this, comphelper::FallbackToGetSomethingOf{});
+}
+
+css::uno::Sequence const & VCLXTabPage::getUnoTunnelId() {
+static comphelper::UnoIdInit const id;
+return id.getSeq();
+}
+
 // css::awt::XView
 void SAL_CALL VCLXTabPage::draw( sal_Int32 nX, sal_Int32 nY )
 {
diff --git a/toolkit/source/controls/dialogcontrol.cxx 
b/toolkit/source/controls/dialogcontrol.cxx
index 67ee3bcc6719..92981a4f5fea 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -36,6 +36,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 
 #include 
@@ -787,7 +788,7 @@ void UnoMultiPageControl::bindPage( const uno::Reference< 
awt::XControl >& _rxCo
 uno::Reference< awt::XSimpleTabController > xTabCntrl( getPeer(), 
uno::UNO_QUERY );
 uno::Reference< beans::XPropertySet > xProps( _rxControl->getModel(), 
uno::UNO_QUERY );
 
-VCLXTabPage* pXPage = dynamic_cast< VCLXTabPage* >( xPage.get() );
+VCLXTabPage* pXPage = comphelper::getFromUnoTunnel< VCLXTabPage >( xPage );
 TabPage* pPage = pXPage ? pXPage->getTabPage() : nullptr;
 if ( xTabCntrl.is() && pPage )
 {


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

2022-08-02 Thread Noel Grandin (via logerrit)
 toolkit/inc/controls/geometrycontrolmodel.hxx|2 +-
 toolkit/inc/helper/msgbox.hxx|2 +-
 toolkit/source/awt/asynccallback.cxx |5 +++--
 toolkit/source/awt/vclxtoolkit.cxx   |5 +++--
 toolkit/source/awt/vclxwindow.cxx|5 +++--
 toolkit/source/controls/geometrycontrolmodel.cxx |5 +++--
 toolkit/source/controls/tree/treedatamodel.cxx   |9 +
 toolkit/source/controls/unocontrolcontainer.cxx  |   11 ++-
 toolkit/source/controls/unocontrols.cxx  |5 +++--
 toolkit/source/hatchwindow/documentcloser.cxx|5 +++--
 toolkit/source/helper/property.cxx   |5 +++--
 11 files changed, 34 insertions(+), 25 deletions(-)

New commits:
commit 566d6accfc443915e6f741e5cb7b8cf244dd7c8b
Author: Noel Grandin 
AuthorDate: Tue Aug 2 13:09:01 2022 +0200
Commit: Noel Grandin 
CommitDate: Tue Aug 2 21:33:36 2022 +0200

clang-tidy modernize-pass-by-value in toolkit

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

diff --git a/toolkit/inc/controls/geometrycontrolmodel.hxx 
b/toolkit/inc/controls/geometrycontrolmodel.hxx
index d6b204b197fa..c2dc13b49f3f 100644
--- a/toolkit/inc/controls/geometrycontrolmodel.hxx
+++ b/toolkit/inc/controls/geometrycontrolmodel.hxx
@@ -221,7 +221,7 @@ namespace com::sun::star {
 */
 OCommonGeometryControlModel(
 css::uno::Reference< css::util::XCloneable >& _rxAgg,
-const   OUString& _rxServiceSpecifier
+OUString _aServiceSpecifier
 );
 
 // OIdPropertyArrayUsageHelper overridables
diff --git a/toolkit/inc/helper/msgbox.hxx b/toolkit/inc/helper/msgbox.hxx
index cef129cf4517..9259719ce3a2 100644
--- a/toolkit/inc/helper/msgbox.hxx
+++ b/toolkit/inc/helper/msgbox.hxx
@@ -62,7 +62,7 @@ protected:
 
 public:
 MessBox(vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits n, const 
OUString& rTitle,
-const OUString& rMessage);
+OUString rMessage);
 virtual ~MessBox() override;
 virtual void dispose() override;
 
diff --git a/toolkit/source/awt/asynccallback.cxx 
b/toolkit/source/awt/asynccallback.cxx
index 751647447092..f6804d9c2366 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -19,6 +19,7 @@
 
 #include 
 
+#include 
 #include 
 #include 
 #include 
@@ -51,8 +52,8 @@ private:
 
 struct CallbackData
 {
-CallbackData( const css::uno::Reference< css::awt::XCallback >& 
rCallback, const css::uno::Any& rAny ) :
-xCallback( rCallback ), aData( rAny ) {}
+CallbackData( css::uno::Reference< css::awt::XCallback > _xCallback, 
css::uno::Any aAny ) :
+xCallback(std::move( _xCallback )), aData(std::move( aAny )) {}
 
 css::uno::Reference< css::awt::XCallback > xCallback;
 css::uno::Any  aData;
diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index a2e98ff17202..67e33e8bc3db 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -69,6 +69,7 @@
 #include 
 #endif
 
+#include 
 #include 
 #include 
 #include 
@@ -227,11 +228,11 @@ void MessBox::ImplInitButtons()
 }
 
 MessBox::MessBox(vcl::Window* pParent, MessBoxStyle nMessBoxStyle, WinBits 
nWinBits,
- const OUString& rTitle, const OUString& rMessage) :
+ const OUString& rTitle, OUString aMessage) :
 ButtonDialog( WindowType::MESSBOX ),
 mbHelpBtn( false ),
 mnMessBoxStyle( nMessBoxStyle ),
-maMessText( rMessage )
+maMessText(std::move( aMessage ))
 {
 ImplLOKNotifier(pParent);
 ImplInitDialog(pParent, nWinBits | WB_MOVEABLE | WB_HORZ | WB_CENTER);
diff --git a/toolkit/source/awt/vclxwindow.cxx 
b/toolkit/source/awt/vclxwindow.cxx
index d3252dd7ad2c..6f34c7bdcc88 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -40,6 +40,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -404,10 +405,10 @@ namespace
 {
 struct CallWindow2Listener
 {
-CallWindow2Listener( 
::comphelper::OInterfaceContainerHelper3& 
i_rWindow2Listeners, const bool i_bEnabled, const EventObject& i_rEvent )
+CallWindow2Listener( 
::comphelper::OInterfaceContainerHelper3& 
i_rWindow2Listeners, const bool i_bEnabled, EventObject i_Event )
 :m_rWindow2Listeners( i_rWindow2Listeners )
 ,m_bEnabled( i_bEnabled )
-,m_aEvent( i_rEvent )
+,m_aEvent(std::move( i_Event ))
 {
 }
 
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx 
b/toolkit/source/controls/geometrycontrolmodel.cxx
index c201d9b15918..41dec5b57e14 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ 

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

2021-11-28 Thread Noel Grandin (via logerrit)
 toolkit/inc/controls/controlmodelcontainerbase.hxx  |3 +
 toolkit/source/awt/stylesettings.hxx|4 +-
 toolkit/source/awt/vclxtoolkit.cxx  |   25 ++--
 toolkit/source/awt/vclxwindow.cxx   |   21 +++--
 toolkit/source/controls/controlmodelcontainerbase.cxx   |7 +---
 toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |4 +-
 toolkit/source/hatchwindow/documentcloser.cxx   |6 +--
 7 files changed, 32 insertions(+), 38 deletions(-)

New commits:
commit 6762aff78bd346ebf816ead77e73b6fa9d8ea7d8
Author: Noel Grandin 
AuthorDate: Sun Nov 28 19:10:25 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Nov 28 20:25:20 2021 +0100

use more OInterfaceContainerHelper3 in toolkit

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

diff --git a/toolkit/inc/controls/controlmodelcontainerbase.hxx 
b/toolkit/inc/controls/controlmodelcontainerbase.hxx
index e84bb4267e42..768474ffd116 100644
--- a/toolkit/inc/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/controls/controlmodelcontainerbase.hxx
@@ -37,6 +37,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -78,7 +79,7 @@ public:
 
 protected:
 ContainerListenerMultiplexermaContainerListeners;
-::comphelper::OInterfaceContainerHelper2   maChangeListeners;
+::comphelper::OInterfaceContainerHelper3   
maChangeListeners;
 UnoControlModelHolderVector   maModels;
 
 AllGroups   maGroups;
diff --git a/toolkit/source/awt/stylesettings.hxx 
b/toolkit/source/awt/stylesettings.hxx
index ebd9bd2c6ee3..477a1f093be0 100644
--- a/toolkit/source/awt/stylesettings.hxx
+++ b/toolkit/source/awt/stylesettings.hxx
@@ -22,7 +22,7 @@
 
 #include 
 
-#include 
+#include 
 #include 
 #include 
 
@@ -171,7 +171,7 @@ namespace toolkit
 DECL_LINK( OnWindowEvent, VclWindowEvent&, void );
 
 VCLXWindow*pOwningWindow;
-::comphelper::OInterfaceContainerHelper2   aStyleChangeListeners;
+
::comphelper::OInterfaceContainerHelper3 
aStyleChangeListeners;
 };
 
 
diff --git a/toolkit/source/awt/vclxtoolkit.cxx 
b/toolkit/source/awt/vclxtoolkit.cxx
index 6c21a5b474f1..351166d713e3 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -132,6 +132,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 
@@ -444,9 +445,9 @@ class VCLXToolkit : public VCLXToolkitMutexHelper,
 oslModule   hSvToolsLib;
 FN_SvtCreateWindow  fnSvtCreateWindow;
 
-::comphelper::OInterfaceContainerHelper2 m_aTopWindowListeners;
-::comphelper::OInterfaceContainerHelper2 m_aKeyHandlers;
-::comphelper::OInterfaceContainerHelper2 m_aFocusListeners;
+::comphelper::OInterfaceContainerHelper3 
m_aTopWindowListeners;
+::comphelper::OInterfaceContainerHelper3 
m_aKeyHandlers;
+::comphelper::OInterfaceContainerHelper3 
m_aFocusListeners;
 ::Link m_aEventListenerLink;
 ::Link m_aKeyListenerLink;
 bool m_bEventListener;
@@ -2416,17 +2417,15 @@ void VCLXToolkit::callTopWindowListeners(
 if (!pWindow->IsTopWindow())
 return;
 
-std::vector< css::uno::Reference< css::uno::XInterface > >
+std::vector< css::uno::Reference< css::awt::XTopWindowListener > >
   aListeners(m_aTopWindowListeners.getElements());
 if (aListeners.empty())
 return;
 
 css::lang::EventObject aAwtEvent(
 static_cast< css::awt::XWindow * >(pWindow->GetWindowPeer()));
-for (const css::uno::Reference & i : aListeners)
+for (const css::uno::Reference & xListener : 
aListeners)
 {
-css::uno::Reference< css::awt::XTopWindowListener >
-  xListener(i, css::uno::UNO_QUERY);
 try
 {
 (xListener.get()->*pFn)(aAwtEvent);
@@ -2441,7 +2440,7 @@ void VCLXToolkit::callTopWindowListeners(
 bool VCLXToolkit::callKeyHandlers(::VclSimpleEvent const * pEvent,
   bool bPressed)
 {
-std::vector< css::uno::Reference< css::uno::XInterface > >
+std::vector< css::uno::Reference< css::awt::XKeyHandler > >
   aHandlers(m_aKeyHandlers.getElements());
 
 if (!aHandlers.empty())
@@ -2464,10 +2463,8 @@ bool VCLXToolkit::callKeyHandlers(::VclSimpleEvent const 
* pEvent,
 pKeyEvent->GetKeyCode().GetCode(), pKeyEvent->GetCharCode(),
 sal::static_int_cast< sal_Int16 >(
 pKeyEvent->GetKeyCode().GetFunction()));
-for (const css::uno::Reference & i : aHandlers)
+for (const css::uno::Reference & xHandler : 
aHandlers)
 {
-css::uno::Reference< css::awt::XKeyHandler > xHandler(
-i, css::uno::UNO_QUERY);
 try
 {
 if 

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

2021-08-04 Thread Noel Grandin (via logerrit)
 toolkit/inc/awt/vclxpointer.hxx|6 ++
 toolkit/source/awt/vclxpointer.cxx |4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 71b3d7392bd3d0871c7383748d49ae5d46c80e51
Author: Noel Grandin 
AuthorDate: Tue Aug 3 21:27:41 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 4 14:22:31 2021 +0200

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

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

diff --git a/toolkit/inc/awt/vclxpointer.hxx b/toolkit/inc/awt/vclxpointer.hxx
index e1dabd2abe54..3bfcceeabf0a 100644
--- a/toolkit/inc/awt/vclxpointer.hxx
+++ b/toolkit/inc/awt/vclxpointer.hxx
@@ -25,7 +25,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -35,11 +35,9 @@
 class VCLXPointer final : public cppu::WeakImplHelper<
 css::awt::XPointer, css::lang::XUnoTunnel, css::lang::XServiceInfo>
 {
-::osl::MutexmaMutex;
+std::mutexmaMutex;
 PointerStylemaPointer;
 
-::osl::Mutex&   GetMutex() { return maMutex; }
-
 public:
 VCLXPointer();
 virtual ~VCLXPointer() override;
diff --git a/toolkit/source/awt/vclxpointer.cxx 
b/toolkit/source/awt/vclxpointer.cxx
index 2d382f5c5350..89828e48a611 100644
--- a/toolkit/source/awt/vclxpointer.cxx
+++ b/toolkit/source/awt/vclxpointer.cxx
@@ -34,14 +34,14 @@ UNO3_GETIMPLEMENTATION_IMPL( VCLXPointer );
 
 void VCLXPointer::setType( sal_Int32 nType )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maPointer = static_cast(nType);
 }
 
 sal_Int32 VCLXPointer::getType()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 return static_cast(maPointer);
 }


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

2021-08-04 Thread Noel Grandin (via logerrit)
 toolkit/inc/awt/vclxregion.hxx|6 ++
 toolkit/source/awt/vclxregion.cxx |   24 
 2 files changed, 14 insertions(+), 16 deletions(-)

New commits:
commit 330ba10a212f007babb2f3d27de88197936291dd
Author: Noel Grandin 
AuthorDate: Tue Aug 3 21:26:45 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 4 10:06:06 2021 +0200

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

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

diff --git a/toolkit/inc/awt/vclxregion.hxx b/toolkit/inc/awt/vclxregion.hxx
index 4f59416ae77d..4ba3211cc2c7 100644
--- a/toolkit/inc/awt/vclxregion.hxx
+++ b/toolkit/inc/awt/vclxregion.hxx
@@ -25,7 +25,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 
 #include 
 
@@ -36,11 +36,9 @@ class VCLXRegion final : public cppu::WeakImplHelper<
 css::awt::XRegion,
 css::lang::XUnoTunnel>
 {
-::osl::MutexmaMutex;
+std::mutexmaMutex;
 vcl::Region  maRegion;
 
-::osl::Mutex&   GetMutex() { return maMutex; }
-
 public:
 VCLXRegion();
 virtual ~VCLXRegion() override;
diff --git a/toolkit/source/awt/vclxregion.cxx 
b/toolkit/source/awt/vclxregion.cxx
index f3356d300bfd..a3e6268d5991 100644
--- a/toolkit/source/awt/vclxregion.cxx
+++ b/toolkit/source/awt/vclxregion.cxx
@@ -38,56 +38,56 @@ UNO3_GETIMPLEMENTATION_IMPL( VCLXRegion );
 
 css::awt::Rectangle VCLXRegion::getBounds()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 return AWTRectangle( maRegion.GetBoundRect() );
 }
 
 void VCLXRegion::clear()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maRegion.SetEmpty();
 }
 
 void VCLXRegion::move( sal_Int32 nHorzMove, sal_Int32 nVertMove )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maRegion.Move( nHorzMove, nVertMove );
 }
 
 void VCLXRegion::unionRectangle( const css::awt::Rectangle& rRect )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maRegion.Union( VCLRectangle( rRect ) );
 }
 
 void VCLXRegion::intersectRectangle( const css::awt::Rectangle& rRect )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maRegion.Intersect( VCLRectangle( rRect ) );
 }
 
 void VCLXRegion::excludeRectangle( const css::awt::Rectangle& rRect )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maRegion.Exclude( VCLRectangle( rRect ) );
 }
 
 void VCLXRegion::xOrRectangle( const css::awt::Rectangle& rRect )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 maRegion.XOr( VCLRectangle( rRect ) );
 }
 
 void VCLXRegion::unionRegion( const css::uno::Reference< css::awt::XRegion >& 
rxRegion )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 if ( rxRegion.is() )
 maRegion.Union( VCLUnoHelper::GetRegion( rxRegion ) );
@@ -95,7 +95,7 @@ void VCLXRegion::unionRegion( const css::uno::Reference< 
css::awt::XRegion >& rx
 
 void VCLXRegion::intersectRegion( const css::uno::Reference< css::awt::XRegion 
>& rxRegion )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 if ( rxRegion.is() )
 maRegion.Intersect( VCLUnoHelper::GetRegion( rxRegion ) );
@@ -103,7 +103,7 @@ void VCLXRegion::intersectRegion( const 
css::uno::Reference< css::awt::XRegion >
 
 void VCLXRegion::excludeRegion( const css::uno::Reference< css::awt::XRegion 
>& rxRegion )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 if ( rxRegion.is() )
 maRegion.Exclude( VCLUnoHelper::GetRegion( rxRegion ) );
@@ -111,7 +111,7 @@ void VCLXRegion::excludeRegion( const css::uno::Reference< 
css::awt::XRegion >&
 
 void VCLXRegion::xOrRegion( const css::uno::Reference< css::awt::XRegion >& 
rxRegion )
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 if ( rxRegion.is() )
 maRegion.XOr( VCLUnoHelper::GetRegion( rxRegion ) );
@@ -119,7 +119,7 @@ void VCLXRegion::xOrRegion( const css::uno::Reference< 
css::awt::XRegion >& rxRe
 
 css::uno::Sequence< css::awt::Rectangle > VCLXRegion::getRectangles()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( maMutex );
 
 RectangleVector aRectangles;
 maRegion.GetRegionRectangles(aRectangles);


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

2021-08-04 Thread Noel Grandin (via logerrit)
 toolkit/inc/awt/vclxbitmap.hxx|6 +++---
 toolkit/source/awt/vclxbitmap.cxx |8 
 2 files changed, 7 insertions(+), 7 deletions(-)

New commits:
commit e643f8703b85668a396676e99ec7e9ee2133368c
Author: Noel Grandin 
AuthorDate: Tue Aug 3 20:25:50 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 4 08:42:17 2021 +0200

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

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

diff --git a/toolkit/inc/awt/vclxbitmap.hxx b/toolkit/inc/awt/vclxbitmap.hxx
index 61be1e4047ff..97475d7000c8 100644
--- a/toolkit/inc/awt/vclxbitmap.hxx
+++ b/toolkit/inc/awt/vclxbitmap.hxx
@@ -26,7 +26,7 @@
 #include 
 #include 
 #include 
-#include 
+#include 
 #include 
 
 
@@ -38,10 +38,10 @@ class VCLXBitmap final : public cppu::WeakImplHelper<
 css::lang::XUnoTunnel,
 css::util::XAccounting>
 {
-::osl::MutexmaMutex;
+std::mutexmaMutex;
 BitmapExmaBitmap;
 
-::osl::Mutex&   GetMutex() { return maMutex; }
+std::mutex&   GetMutex() { return maMutex; }
 
 
 public:
diff --git a/toolkit/source/awt/vclxbitmap.cxx 
b/toolkit/source/awt/vclxbitmap.cxx
index 4b08ebd40a7f..e094a28d29c0 100644
--- a/toolkit/source/awt/vclxbitmap.cxx
+++ b/toolkit/source/awt/vclxbitmap.cxx
@@ -33,7 +33,7 @@ UNO3_GETIMPLEMENTATION_IMPL( VCLXBitmap );
 // css::awt::XBitmap
 css::awt::Size VCLXBitmap::getSize()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( GetMutex() );
 
 css::awt::Size aSize( maBitmap.GetSizePixel().Width(), 
maBitmap.GetSizePixel().Height() );
 return aSize;
@@ -41,7 +41,7 @@ css::awt::Size VCLXBitmap::getSize()
 
 css::uno::Sequence< sal_Int8 > VCLXBitmap::getDIB()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( GetMutex() );
 
 SvMemoryStream aMem;
 WriteDIB(maBitmap.GetBitmap(), aMem, false, true);
@@ -50,14 +50,14 @@ css::uno::Sequence< sal_Int8 > VCLXBitmap::getDIB()
 
 css::uno::Sequence< sal_Int8 > VCLXBitmap::getMaskDIB()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( GetMutex() );
 
 return vcl::bitmap::GetMaskDIB(maBitmap);
 }
 
 sal_Int64 SAL_CALL VCLXBitmap::estimateUsage()
 {
-::osl::Guard< ::osl::Mutex > aGuard( GetMutex() );
+std::scoped_lock aGuard( GetMutex() );
 
 return maBitmap.GetSizeBytes();
 }


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

2021-07-22 Thread Noel Grandin (via logerrit)
 toolkit/inc/controls/animatedimages.hxx|3 --
 toolkit/source/controls/animatedimages.cxx |   32 +++--
 2 files changed, 14 insertions(+), 21 deletions(-)

New commits:
commit f8c6d90bc5b344e65cf0ae6cdd028956bb31dbe4
Author: Noel Grandin 
AuthorDate: Wed Jul 21 11:58:46 2021 +0200
Commit: Noel Grandin 
CommitDate: Thu Jul 22 08:58:31 2021 +0200

remove pimpl in AnimatedImagesControlModel

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

diff --git a/toolkit/inc/controls/animatedimages.hxx 
b/toolkit/inc/controls/animatedimages.hxx
index c1847b35f7b6..0afd921f478a 100644
--- a/toolkit/inc/controls/animatedimages.hxx
+++ b/toolkit/inc/controls/animatedimages.hxx
@@ -31,7 +31,6 @@ namespace toolkit
 {
 
 
-struct AnimatedImagesControlModel_Data;
 typedef ::cppu::AggImplInheritanceHelper1   <   UnoControlModel
 ,   css::awt::XAnimatedImages
 >   
AnimatedImagesControlModel_Base;
@@ -78,7 +77,7 @@ namespace toolkit
 void SAL_CALL   setFastPropertyValue_NoBroadcast( 
sal_Int32 nHandle, const css::uno::Any& rValue ) override;
 
 private:
-std::unique_ptr< AnimatedImagesControlModel_Data > m_xData;
+std::vector< css::uno::Sequence< OUString > >maImageSets;
 };
 
 
diff --git a/toolkit/source/controls/animatedimages.cxx 
b/toolkit/source/controls/animatedimages.cxx
index c304782e8d1f..9ef3506d122c 100644
--- a/toolkit/source/controls/animatedimages.cxx
+++ b/toolkit/source/controls/animatedimages.cxx
@@ -203,17 +203,12 @@ public:
 
 namespace toolkit {
 
-struct AnimatedImagesControlModel_Data
-{
-::std::vector< Sequence< OUString > >aImageSets;
-};
-
 namespace
 {
-void lcl_checkIndex( const AnimatedImagesControlModel_Data& i_data, 
const sal_Int32 i_index, const Reference< XInterface >& i_context,
+void lcl_checkIndex( std::vector< css::uno::Sequence< OUString > > & 
rImageSets, const sal_Int32 i_index, const Reference< XInterface >& i_context,
 const bool i_forInsert = false )
 {
-if ( ( i_index < 0 ) || ( o3tl::make_unsigned( i_index ) > 
i_data.aImageSets.size() + ( i_forInsert ? 1 : 0 ) ) )
+if ( ( i_index < 0 ) || ( o3tl::make_unsigned( i_index ) > 
rImageSets.size() + ( i_forInsert ? 1 : 0 ) ) )
 throw IndexOutOfBoundsException( OUString(), i_context );
 }
 
@@ -238,7 +233,6 @@ namespace toolkit {
 
 AnimatedImagesControlModel::AnimatedImagesControlModel( Reference< 
css::uno::XComponentContext > const & i_factory )
 :AnimatedImagesControlModel_Base( i_factory )
-,m_xData( new AnimatedImagesControlModel_Data )
 {
 ImplRegisterProperty( BASEPROPERTY_AUTO_REPEAT );
 ImplRegisterProperty( BASEPROPERTY_BORDER );
@@ -255,7 +249,7 @@ namespace toolkit {
 
 AnimatedImagesControlModel::AnimatedImagesControlModel( const 
AnimatedImagesControlModel& i_copySource )
 :AnimatedImagesControlModel_Base( i_copySource )
-,m_xData( new AnimatedImagesControlModel_Data( *i_copySource.m_xData ) 
)
+,maImageSets( i_copySource.maImageSets )
 {
 }
 
@@ -397,7 +391,7 @@ namespace toolkit {
 if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose 
)
 throw DisposedException();
 
-return m_xData->aImageSets.size();
+return maImageSets.size();
 }
 
 
@@ -407,9 +401,9 @@ namespace toolkit {
 if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose 
)
 throw DisposedException();
 
-lcl_checkIndex( *m_xData, i_index, *this );
+lcl_checkIndex( maImageSets, i_index, *this );
 
-return m_xData->aImageSets[ i_index ];
+return maImageSets[ i_index ];
 }
 
 
@@ -420,10 +414,10 @@ namespace toolkit {
 if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose 
)
 throw DisposedException();
 
-lcl_checkIndex( *m_xData, i_index, *this, true );
+lcl_checkIndex( maImageSets, i_index, *this, true );
 
 // actual insertion
-m_xData->aImageSets.insert( m_xData->aImageSets.begin() + i_index, 
i_imageURLs );
+maImageSets.insert( maImageSets.begin() + i_index, i_imageURLs );
 
 // listener notification
 lcl_notify( aGuard, BrdcstHelper, 
::elementInserted, i_index, i_imageURLs, *this );
@@ -437,10 +431,10 @@ namespace toolkit {
 if ( GetBroadcastHelper().bDisposed || GetBroadcastHelper().bInDispose 
)
 throw DisposedException();
 
-lcl_checkIndex( *m_xData, i_index, *this );
+lcl_checkIndex( maImageSets, i_index, *this );
 
 // actual insertion
-m_xData->aImageSets[ i_index ] = 

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

2021-07-21 Thread Noel Grandin (via logerrit)
 toolkit/inc/awt/animatedimagespeer.hxx|   13 +
 toolkit/source/awt/animatedimagespeer.cxx |  291 --
 2 files changed, 137 insertions(+), 167 deletions(-)

New commits:
commit 603552c209f8652aa23a688b36d4a2abac933717
Author: Noel Grandin 
AuthorDate: Wed Jul 21 11:55:05 2021 +0200
Commit: Noel Grandin 
CommitDate: Wed Jul 21 21:47:57 2021 +0200

remove pimpl in AnimatedImagesPeer

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

diff --git a/toolkit/inc/awt/animatedimagespeer.hxx 
b/toolkit/inc/awt/animatedimagespeer.hxx
index ff07c291c237..71861f8b3e38 100644
--- a/toolkit/inc/awt/animatedimagespeer.hxx
+++ b/toolkit/inc/awt/animatedimagespeer.hxx
@@ -22,7 +22,9 @@
 #include 
 #include 
 
+#include 
 #include 
+#include 
 #include 
 
 #include 
@@ -74,6 +76,12 @@ namespace toolkit
 // XComponent
 void SAL_CALL dispose(  ) override;
 
+struct CachedImage
+{
+OUString sImageURL;
+mutable css::uno::Reference< css::graphic::XGraphic >   xGraphic;
+};
+
 private:
 void ProcessWindowEvent( const VclWindowEvent& i_windowEvent ) 
override;
 
@@ -84,7 +92,10 @@ namespace toolkit
 AnimatedImagesPeer(const AnimatedImagesPeer&) = delete;
 AnimatedImagesPeer& operator=(const AnimatedImagesPeer&) = delete;
 
-std::unique_ptr< AnimatedImagesPeer_Data >   m_xData;
+void updateImageList_nothrow();
+void updateImageList_nothrow( const css::uno::Reference< 
css::awt::XAnimatedImages >& i_images );
+
+std::vector< std::vector< CachedImage > >   maCachedImageSets;
 };
 
 
diff --git a/toolkit/source/awt/animatedimagespeer.cxx 
b/toolkit/source/awt/animatedimagespeer.cxx
index bcbf42d62a72..919bca9ba5df 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -21,12 +21,10 @@
 #include 
 #include 
 
-#include 
 #include 
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
@@ -63,44 +61,6 @@ namespace toolkit
 
 namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode;
 
-
-//= AnimatedImagesPeer_Data
-
-namespace {
-
-struct CachedImage
-{
-OUString sImageURL;
-mutable Reference< XGraphic >   xGraphic;
-
-CachedImage()
-:sImageURL()
-,xGraphic()
-{
-}
-
-explicit CachedImage( OUString const& i_imageURL )
-:sImageURL( i_imageURL )
-,xGraphic()
-{
-}
-};
-
-}
-
-struct AnimatedImagesPeer_Data
-{
-AnimatedImagesPeer& rAntiImpl;
-::std::vector< ::std::vector< CachedImage > >   aCachedImageSets;
-
-explicit AnimatedImagesPeer_Data( AnimatedImagesPeer& i_antiImpl )
-:rAntiImpl( i_antiImpl )
-,aCachedImageSets()
-{
-}
-};
-
-
 //= helper
 
 namespace
@@ -125,7 +85,7 @@ namespace toolkit
 }
 
 
-bool lcl_ensureImage_throw( Reference< XGraphicProvider > const& 
i_graphicProvider, const bool i_isHighContrast, const CachedImage& 
i_cachedImage )
+bool lcl_ensureImage_throw( Reference< XGraphicProvider > const& 
i_graphicProvider, const bool i_isHighContrast, const 
AnimatedImagesPeer::CachedImage& i_cachedImage )
 {
 if ( !i_cachedImage.xGraphic.is() )
 {
@@ -165,125 +125,18 @@ namespace toolkit
 }
 
 
-void lcl_init( Sequence< OUString > const& i_imageURLs, ::std::vector< 
CachedImage >& o_images )
+void lcl_init( Sequence< OUString > const& i_imageURLs, ::std::vector< 
AnimatedImagesPeer::CachedImage >& o_images )
 {
 o_images.resize(0);
 size_t count = size_t( i_imageURLs.getLength() );
 o_images.reserve( count );
 for ( const auto& rImageURL : i_imageURLs )
 {
-o_images.emplace_back( rImageURL );
-}
-}
-
-
-void lcl_updateImageList_nothrow( AnimatedImagesPeer_Data& i_data )
-{
-VclPtr pThrobber = 
i_data.rAntiImpl.GetAsDynamic();
-if ( !pThrobber )
-return;
-
-try
-{
-// collect the image sizes of the different image sets
-const Reference< XComponentContext > xContext( 
::comphelper::getProcessComponentContext() );
-const Reference< XGraphicProvider > xGraphicProvider( 
css::graphic::GraphicProvider::create(xContext) );
-
-const bool isHighContrast = 
pThrobber->GetSettings().GetStyleSettings().GetHighContrastMode();
-
-sal_Int32 nPreferredSet = -1;
-const size_t nImageSetCount = i_data.aCachedImageSets.size();
-if ( 

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

2021-03-02 Thread Noel (via logerrit)
 toolkit/inc/controls/geometrycontrolmodel.hxx  |7 ---
 toolkit/inc/controls/geometrycontrolmodel_impl.hxx |2 +-
 toolkit/source/controls/geometrycontrolmodel.cxx   |   10 --
 3 files changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 81cacf8dea7ca2fb7b0d6e86b36b9f9568ff849d
Author: Noel 
AuthorDate: Mon Mar 1 20:37:24 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 2 20:45:51 2021 +0100

loplugin:refcounting in toolkit

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

diff --git a/toolkit/inc/controls/geometrycontrolmodel.hxx 
b/toolkit/inc/controls/geometrycontrolmodel.hxx
index 2d87f7cca2af..600e9592046f 100644
--- a/toolkit/inc/controls/geometrycontrolmodel.hxx
+++ b/toolkit/inc/controls/geometrycontrolmodel.hxx
@@ -27,6 +27,7 @@
 #include 
 #include 
 #include 
+#include 
 
 namespace com::sun::star::resource { class XStringResourceResolver; }
 
@@ -144,7 +145,7 @@ namespace com::sun::star {
 SAL_CALL getEvents(  ) override;
 
 // XCloneable implementation - to be overwritten
-virtual OGeometryControlModel_Base* createClone_Impl(
+virtual rtl::Reference createClone_Impl(
 css::uno::Reference< css::util::XCloneable >& 
_rxAggregateInstance) = 0;
 
 // XComponent
@@ -190,7 +191,7 @@ namespace com::sun::star {
 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() 
override;
 
 // OGeometryControlModel_Base
-virtual OGeometryControlModel_Base* createClone_Impl(
+virtual rtl::Reference createClone_Impl(
 css::uno::Reference< css::util::XCloneable >& 
_rxAggregateInstance) override;
 
 // XTypeProvider
@@ -230,7 +231,7 @@ namespace com::sun::star {
 virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper() 
override;
 
 // OGeometryControlModel_Base
-virtual OGeometryControlModel_Base* createClone_Impl(
+virtual rtl::Reference createClone_Impl(
 css::uno::Reference< css::util::XCloneable >& 
_rxAggregateInstance) override;
 
 // XTypeProvider
diff --git a/toolkit/inc/controls/geometrycontrolmodel_impl.hxx 
b/toolkit/inc/controls/geometrycontrolmodel_impl.hxx
index 37a3983f6888..2ec8595dddf1 100644
--- a/toolkit/inc/controls/geometrycontrolmodel_impl.hxx
+++ b/toolkit/inc/controls/geometrycontrolmodel_impl.hxx
@@ -60,7 +60,7 @@ css::uno::Sequence SAL_CALL 
OGeometryControlModel::getIm
 }
 
 template 
-OGeometryControlModel_Base* 
OGeometryControlModel::createClone_Impl(
+rtl::Reference 
OGeometryControlModel::createClone_Impl(
 css::uno::Reference& _rxAggregateInstance)
 {
 return new OGeometryControlModel(_rxAggregateInstance);
diff --git a/toolkit/source/controls/geometrycontrolmodel.cxx 
b/toolkit/source/controls/geometrycontrolmodel.cxx
index be4e4ffce065..eb21d49bc07f 100644
--- a/toolkit/source/controls/geometrycontrolmodel.cxx
+++ b/toolkit/source/controls/geometrycontrolmodel.cxx
@@ -372,7 +372,7 @@
 OSL_ENSURE(xAggregateClone.is(), 
"OGeometryControlModel_Base::createClone: suspicious return of the aggregate!");
 
 // create a new wrapper aggregating this return value
-OGeometryControlModel_Base* pOwnClone = 
createClone_Impl(xAggregateClone);
+rtl::Reference pOwnClone = 
createClone_Impl(xAggregateClone);
 OSL_ENSURE(pOwnClone, "OGeometryControlModel_Base::createClone: 
invalid derivee behaviour!");
 OSL_ENSURE(!xAggregateClone.is(), 
"OGeometryControlModel_Base::createClone: invalid ctor behaviour!");
 // should have been reset
@@ -391,13 +391,11 @@
 // Clone event container
 Reference< css::script::XScriptEventsSupplier > xEventsSupplier =
 static_cast< css::script::XScriptEventsSupplier* >( this );
-Reference< css::script::XScriptEventsSupplier > xCloneEventsSupplier =
-static_cast< css::script::XScriptEventsSupplier* >( pOwnClone );
 
-if( xEventsSupplier.is() && xCloneEventsSupplier.is() )
+if( xEventsSupplier.is() )
 {
 Reference< XNameContainer > xEventCont = 
xEventsSupplier->getEvents();
-Reference< XNameContainer > xCloneEventCont = 
xCloneEventsSupplier->getEvents();
+Reference< XNameContainer > xCloneEventCont = 
pOwnClone->getEvents();
 
 const css::uno::Sequence< OUString > aNames =
 xEventCont->getElementNames();
@@ -561,7 +559,7 @@
 }
 
 
-OGeometryControlModel_Base* OCommonGeometryControlModel::createClone_Impl( 
Reference< XCloneable >& _rxAggregateInstance )
+rtl::Reference 
OCommonGeometryControlModel::createClone_Impl( Reference< XCloneable >& 
_rxAggregateInstance )
 {
 return new OCommonGeometryControlModel( _rxAggregateInstance, 
m_sServiceSpecifier );
 }

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

2020-10-28 Thread Noel Grandin (via logerrit)
 toolkit/inc/helper/unopropertyarrayhelper.hxx |4 ++--
 toolkit/source/controls/unocontrolmodel.cxx   |4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 1977138acba04a7b91d73a3041606b2387e72e70
Author: Noel Grandin 
AuthorDate: Tue Oct 27 21:12:49 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed Oct 28 07:25:01 2020 +0100

std::set->o3tl::sorted_vector in toolkit

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

diff --git a/toolkit/inc/helper/unopropertyarrayhelper.hxx 
b/toolkit/inc/helper/unopropertyarrayhelper.hxx
index 6036901ac842..29c87099a83b 100644
--- a/toolkit/inc/helper/unopropertyarrayhelper.hxx
+++ b/toolkit/inc/helper/unopropertyarrayhelper.hxx
@@ -24,13 +24,13 @@
 #include 
 
 #include 
-#include 
+#include 
 
 
 
 class UnoPropertyArrayHelper final : public ::cppu::IPropertyArrayHelper
 {
-std::set   maIDs;
+o3tl::sorted_vector   maIDs;
 
 boolImplHasProperty( sal_uInt16 nPropId ) const;
 
diff --git a/toolkit/source/controls/unocontrolmodel.cxx 
b/toolkit/source/controls/unocontrolmodel.cxx
index 5725cd16501a..80ebb041299c 100644
--- a/toolkit/source/controls/unocontrolmodel.cxx
+++ b/toolkit/source/controls/unocontrolmodel.cxx
@@ -46,7 +46,7 @@
 #include 
 
 #include 
-#include 
+#include 
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
@@ -546,7 +546,7 @@ void UnoControlModel::write( const css::uno::Reference< 
css::io::XObjectOutputSt
 
 OutStream->writeShort( UNOCONTROL_STREAMVERSION );
 
-std::set aProps;
+o3tl::sorted_vector aProps;
 
 for (const auto& rData : maData)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-15 Thread Michael Weghorn (via logerrit)
 toolkit/inc/controls/controlmodelcontainerbase.hxx|1 -
 toolkit/source/controls/controlmodelcontainerbase.cxx |   13 +
 2 files changed, 9 insertions(+), 5 deletions(-)

New commits:
commit 25c692c2a94ab83c2c859ac5ab334b62ac8b825e
Author: Michael Weghorn 
AuthorDate: Fri May 15 15:28:14 2020 +0200
Commit: Michael Weghorn 
CommitDate: Fri May 15 20:48:12 2020 +0200

ControlModelContainerBase: Use property for enabled status

Use the property BASEPROPERTY_ENABLED for getting and setting
the status instead of handling it in a custom bool member
variable.

This way, property changes are also automatically propagated
and can be handled by the corresponding listeners.

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

diff --git a/toolkit/inc/controls/controlmodelcontainerbase.hxx 
b/toolkit/inc/controls/controlmodelcontainerbase.hxx
index 31ff2cdb9e73..c2d715dc3b61 100644
--- a/toolkit/inc/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/controls/controlmodelcontainerbase.hxx
@@ -83,7 +83,6 @@ protected:
 AllGroups   maGroups;
 boolmbGroupsUpToDate;
 
-bool m_bEnabled;
 OUString m_sImageURL;
 OUString m_sTooltip;
 sal_Int16m_nTabPageId;
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx 
b/toolkit/source/controls/controlmodelcontainerbase.cxx
index bff374628d49..fc5b0e374c1f 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -169,9 +169,9 @@ ControlModelContainerBase::ControlModelContainerBase( const 
Reference< XComponen
 ,maContainerListeners( *this )
 ,maChangeListeners ( GetMutex() )
 ,mbGroupsUpToDate( false )
-,m_bEnabled( true )
 ,m_nTabPageId(0)
 {
+ImplRegisterProperty(BASEPROPERTY_ENABLED);
 }
 
 ControlModelContainerBase::ControlModelContainerBase( const 
ControlModelContainerBase& rModel )
@@ -179,7 +179,6 @@ ControlModelContainerBase::ControlModelContainerBase( const 
ControlModelContaine
 , maContainerListeners( *this )
 , maChangeListeners ( GetMutex() )
 , mbGroupsUpToDate( false )
-, m_bEnabled( rModel.m_bEnabled )
 , m_nTabPageId( rModel.m_nTabPageId )
 {
 }
@@ -735,11 +734,17 @@ void SAL_CALL ControlModelContainerBase::initialize 
(const Sequence& rArgum
 }
 sal_Bool SAL_CALL ControlModelContainerBase::getEnabled()
 {
-return m_bEnabled;
+SolarMutexGuard aGuard;
+Reference xThis(*this, UNO_QUERY);
+bool bEnabled;
+xThis->getPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED)) >>= 
bEnabled;
+return bEnabled;
 }
 void SAL_CALL ControlModelContainerBase::setEnabled( sal_Bool _enabled )
 {
-m_bEnabled = _enabled;
+SolarMutexGuard aGuard;
+Reference xThis(*this, UNO_QUERY);
+xThis->setPropertyValue(GetPropertyName(BASEPROPERTY_ENABLED), 
makeAny(_enabled));
 }
 OUString SAL_CALL ControlModelContainerBase::getTitle()
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-14 Thread Michael Weghorn (via logerrit)
 toolkit/inc/controls/controlmodelcontainerbase.hxx|4 ++--
 toolkit/source/controls/controlmodelcontainerbase.cxx |2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 11079fa85c9698ac333f43303636c4fff31b0976
Author: Michael Weghorn 
AuthorDate: Wed May 13 16:05:50 2020 +0200
Commit: Michael Weghorn 
CommitDate: Thu May 14 09:57:07 2020 +0200

Rename ContainerControl_IBase -> ControlContainer_IBase

The only class inheriting from it is ControlContainerBase,
so make the naming more consistent, also to match the
naming pattern used elsewhere.

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

diff --git a/toolkit/inc/controls/controlmodelcontainerbase.hxx 
b/toolkit/inc/controls/controlmodelcontainerbase.hxx
index 3c5c3993ccc1..31ff2cdb9e73 100644
--- a/toolkit/inc/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/controls/controlmodelcontainerbase.hxx
@@ -213,9 +213,9 @@ typedef ::cppu::AggImplInheritanceHelper3   < 
UnoControlContainer
 ,   css::container::XContainerListener
 ,   css::util::XChangesListener
 ,   css::util::XModifyListener
->   ContainerControl_IBase;
+>   ControlContainer_IBase;
 
-class ControlContainerBase : public ContainerControl_IBase
+class ControlContainerBase : public ControlContainer_IBase
 {
 protected:
 css::uno::Reference< css::uno::XComponentContext >  m_xContext;
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx 
b/toolkit/source/controls/controlmodelcontainerbase.cxx
index ebf5cfdf63b6..bff374628d49 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -1251,7 +1251,7 @@ void SAL_CALL ResourceListener::disposing(
 
 
 ControlContainerBase::ControlContainerBase( const Reference< XComponentContext 
>& rxContext )
-:ContainerControl_IBase()
+:ControlContainer_IBase()
 ,m_xContext(rxContext)
 ,mbSizeModified(false)
 ,mbPosModified(false)
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-13 Thread Noel Grandin (via logerrit)
 toolkit/inc/controls/eventcontainer.hxx|1 -
 toolkit/source/controls/eventcontainer.cxx |6 ++
 2 files changed, 2 insertions(+), 5 deletions(-)

New commits:
commit 59a5fdd32727447239ee91cea00f943609540507
Author: Noel Grandin 
AuthorDate: Wed May 13 15:53:27 2020 +0200
Commit: Noel Grandin 
CommitDate: Wed May 13 18:58:38 2020 +0200

fix ScriptEventContainer::isEmpty

which was relying on the nElementCount field, which was not being
updated. Just delete it and check the map.

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

diff --git a/toolkit/inc/controls/eventcontainer.hxx 
b/toolkit/inc/controls/eventcontainer.hxx
index beca65e3e38f..79a434a39849 100644
--- a/toolkit/inc/controls/eventcontainer.hxx
+++ b/toolkit/inc/controls/eventcontainer.hxx
@@ -49,7 +49,6 @@ class ScriptEventContainer final : public 
::cppu::WeakImplHelper<
 NameContainerNameMap mHashMap;
 css::uno::Sequence< OUString > mNames;
 std::vector< css::uno::Any > mValues;
-sal_Int32 mnElementCount;
 css::uno::Type mType;
 
 ContainerListenerMultiplexer maContainerListeners;
diff --git a/toolkit/source/controls/eventcontainer.cxx 
b/toolkit/source/controls/eventcontainer.cxx
index 165c91296cb9..04aeaf2bfc42 100644
--- a/toolkit/source/controls/eventcontainer.cxx
+++ b/toolkit/source/controls/eventcontainer.cxx
@@ -43,8 +43,7 @@ Type ScriptEventContainer::getElementType()
 
 sal_Bool ScriptEventContainer::hasElements()
 {
-bool bRet = (mnElementCount > 0);
-return bRet;
+return !mHashMap.empty();
 }
 
 // Methods XNameAccess
@@ -171,8 +170,7 @@ void ScriptEventContainer::removeContainerListener( const 
css::uno::Reference< c
 
 
 ScriptEventContainer::ScriptEventContainer()
-: mnElementCount( 0 ),
-  mType( cppu::UnoType::get() ),
+: mType( cppu::UnoType::get() ),
   maContainerListeners( *this )
 {
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-08 Thread Michael Weghorn (via logerrit)
 toolkit/inc/controls/controlmodelcontainerbase.hxx|1 -
 toolkit/source/controls/controlmodelcontainerbase.cxx |   17 +
 2 files changed, 1 insertion(+), 17 deletions(-)

New commits:
commit ffa08644b92988e21669edc612dd731f985c341a
Author: Michael Weghorn 
AuthorDate: Fri May 8 16:05:51 2020 +0200
Commit: Michael Weghorn 
CommitDate: Sat May 9 01:41:29 2020 +0200

toolkit: Use lambda instead of FindControlModel functor

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

diff --git a/toolkit/inc/controls/controlmodelcontainerbase.hxx 
b/toolkit/inc/controls/controlmodelcontainerbase.hxx
index 6ce71a45c881..747795bd488d 100644
--- a/toolkit/inc/controls/controlmodelcontainerbase.hxx
+++ b/toolkit/inc/controls/controlmodelcontainerbase.hxx
@@ -73,7 +73,6 @@ public:
 typedef ::std::vector< ModelGroup > AllGroups;
 
 friend struct CloneControlModel;
-friend struct FindControlModel;
 friend struct CompareControlModel;
 
 protected:
diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx 
b/toolkit/source/controls/controlmodelcontainerbase.cxx
index eb39c1ba1b95..cc92f9fb7345 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -94,21 +94,6 @@ struct DisposeControlModel
 
 }
 
-// functor for searching control model by name
-struct FindControlModel
-{
-private:
-const OUString& m_rName;
-
-public:
-explicit FindControlModel( const OUString& _rName ) : m_rName( _rName ) { }
-
-bool operator()( const ControlModelContainerBase::UnoControlModelHolder& 
_rCompare )
-{
-return _rCompare.second == m_rName;
-}
-};
-
 
 // functor for cloning a control model, and insertion into a target list
 struct CloneControlModel
@@ -289,7 +274,7 @@ rtl::Reference 
ControlModelContainerBase::Clone() const
 
 ControlModelContainerBase::UnoControlModelHolderVector::iterator 
ControlModelContainerBase::ImplFindElement( const OUString& rName )
 {
-return ::std::find_if( maModels.begin(), maModels.end(), FindControlModel( 
rName ) );
+return ::std::find_if( maModels.begin(), maModels.end(), [&](const 
UnoControlModelHolder& elem) { return elem.second == rName; });
 }
 
 // ::XMultiServiceFactory
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-05-07 Thread Samuel Mehrbrodt (via logerrit)
 toolkit/inc/controls/eventcontainer.hxx|   15 ++-
 toolkit/source/controls/eventcontainer.cxx |   56 +++--
 2 files changed, 51 insertions(+), 20 deletions(-)

New commits:
commit 74459c7d62ebe93bdfdf65b665b9253ac8f09d79
Author: Samuel Mehrbrodt 
AuthorDate: Wed May 6 14:11:00 2020 +0200
Commit: Samuel Mehrbrodt 
CommitDate: Thu May 7 08:41:43 2020 +0200

Revert "remove some "optimisation" insanity in ScriptEventContainer"

This broke the event order in basic dialog xml,
which in turn broke macro signatures.

This reverts commit 85f08e3e34bea01456eaf8989ac4f77d3900d5c5.

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

diff --git a/toolkit/inc/controls/eventcontainer.hxx 
b/toolkit/inc/controls/eventcontainer.hxx
index 4961c16344ee..396578432fd1 100644
--- a/toolkit/inc/controls/eventcontainer.hxx
+++ b/toolkit/inc/controls/eventcontainer.hxx
@@ -30,12 +30,23 @@
 namespace toolkit
 {
 
+// Hashtable to optimize
+typedef std::unordered_map
+<
+OUString,
+sal_Int32,
+OUStringHash
+>
+NameContainerNameMap;
+
 class ScriptEventContainer final : public ::cppu::WeakImplHelper<
 css::container::XNameContainer,
 css::container::XContainer >
 {
-std::unordered_map< OUString, css::uno::Any>
-   mHashMap;
+NameContainerNameMap mHashMap;
+css::uno::Sequence< OUString > mNames;
+std::vector< css::uno::Any > mValues;
+sal_Int32 mnElementCount;
 css::uno::Type mType;
 
 ContainerListenerMultiplexer maContainerListeners;
diff --git a/toolkit/source/controls/eventcontainer.cxx 
b/toolkit/source/controls/eventcontainer.cxx
index 73701446384c..165c91296cb9 100644
--- a/toolkit/source/controls/eventcontainer.cxx
+++ b/toolkit/source/controls/eventcontainer.cxx
@@ -43,33 +43,33 @@ Type ScriptEventContainer::getElementType()
 
 sal_Bool ScriptEventContainer::hasElements()
 {
-return !mHashMap.empty();
+bool bRet = (mnElementCount > 0);
+return bRet;
 }
 
 // Methods XNameAccess
 Any ScriptEventContainer::getByName( const OUString& aName )
 {
-auto aIt = mHashMap.find( aName );
+NameContainerNameMap::iterator aIt = mHashMap.find( aName );
 if( aIt == mHashMap.end() )
 {
 throw NoSuchElementException();
 }
-return aIt->second;
+sal_Int32 iHashResult = (*aIt).second;
+Any aRetAny = mValues[ iHashResult ];
+return aRetAny;
 }
 
 Sequence< OUString > ScriptEventContainer::getElementNames()
 {
-Sequence aRet(mHashMap.size());
-int i = 0;
-for (auto const & pair : mHashMap)
-aRet[i++] = pair.first;
-return aRet;
+return mNames;
 }
 
 sal_Bool ScriptEventContainer::hasByName( const OUString& aName )
 {
-auto aIt = mHashMap.find( aName );
-return aIt != mHashMap.end();
+NameContainerNameMap::iterator aIt = mHashMap.find( aName );
+bool bRet = ( aIt != mHashMap.end() );
+return bRet;
 }
 
 
@@ -80,13 +80,14 @@ void ScriptEventContainer::replaceByName( const OUString& 
aName, const Any& aEle
 if( mType != aAnyType )
 throw IllegalArgumentException();
 
-auto aIt = mHashMap.find( aName );
+NameContainerNameMap::iterator aIt = mHashMap.find( aName );
 if( aIt == mHashMap.end() )
 {
 throw NoSuchElementException();
 }
-Any aOldElement = aIt->second;
-aIt->second = aElement;
+sal_Int32 iHashResult = (*aIt).second;
+Any aOldElement = mValues[ iHashResult ];
+mValues[ iHashResult ] = aElement;
 
 // Fire event
 ContainerEvent aEvent;
@@ -105,13 +106,18 @@ void ScriptEventContainer::insertByName( const OUString& 
aName, const Any& aElem
 if( mType != aAnyType )
 throw IllegalArgumentException();
 
-auto aIt = mHashMap.find( aName );
+NameContainerNameMap::iterator aIt = mHashMap.find( aName );
 if( aIt != mHashMap.end() )
 {
 throw ElementExistException();
 }
 
-mHashMap[ aName ] = aElement;
+sal_Int32 nCount = mNames.getLength();
+mNames.realloc( nCount + 1 );
+mValues.resize( nCount + 1 );
+mNames.getArray()[ nCount ] = aName;
+mValues[ nCount ] = aElement;
+mHashMap[ aName ] = nCount;
 
 // Fire event
 ContainerEvent aEvent;
@@ -123,20 +129,33 @@ void ScriptEventContainer::insertByName( const OUString& 
aName, const Any& aElem
 
 void ScriptEventContainer::removeByName( const OUString& Name )
 {
-auto aIt = mHashMap.find( Name );
+NameContainerNameMap::iterator aIt = mHashMap.find( Name );
 if( aIt == mHashMap.end() )
 {
 throw NoSuchElementException();
 }
 
+sal_Int32 iHashResult = (*aIt).second;
+Any aOldElement = mValues[ iHashResult ];
+
 // Fire event
 ContainerEvent aEvent;
 aEvent.Source = *this;
-aEvent.Element 

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

2020-03-03 Thread Noel Grandin (via logerrit)
 toolkit/inc/helper/servicenames.hxx  |   80 ---
 toolkit/source/awt/vclxmenu.cxx  |4 
 toolkit/source/controls/dialogcontrol.cxx|2 
 toolkit/source/controls/formattedcontrol.cxx |4 
 toolkit/source/controls/roadmapcontrol.cxx   |4 
 toolkit/source/controls/stdtabcontroller.cxx |2 
 toolkit/source/controls/stdtabcontrollermodel.cxx|4 
 toolkit/source/controls/tkscrollbar.cxx  |4 
 toolkit/source/controls/unocontrolcontainermodel.cxx |2 
 toolkit/source/controls/unocontrols.cxx  |   69 
 toolkit/source/helper/servicenames.cxx   |   72 -
 11 files changed, 49 insertions(+), 198 deletions(-)

New commits:
commit f7dddbd7f2d93f3b6c1a85917b4434e388dfe1c9
Author: Noel Grandin 
AuthorDate: Tue Mar 3 15:09:36 2020 +0200
Commit: Noel Grandin 
CommitDate: Tue Mar 3 19:33:14 2020 +0100

inline some use-once constants

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

diff --git a/toolkit/inc/helper/servicenames.hxx 
b/toolkit/inc/helper/servicenames.hxx
index 73e0a3260f51..cd888c94d2eb 100644
--- a/toolkit/inc/helper/servicenames.hxx
+++ b/toolkit/inc/helper/servicenames.hxx
@@ -21,84 +21,6 @@
 
 #include 
 
-extern const char szServiceName_Toolkit[], szServiceName2_Toolkit[];
-extern const char szServiceName_MVCIntrospection[], 
szServiceName2_MVCIntrospection[];
-extern const char szServiceName_PopupMenu[], szServiceName2_PopupMenu[];
-extern const char szServiceName_MenuBar[], szServiceName2_MenuBar[];
-extern const char szServiceName_Pointer[], szServiceName2_Pointer[];
-extern const char szServiceName_UnoControlContainer[];
-extern const char szServiceName_UnoControlContainerModel[];
-extern const char szServiceName2_UnoMultiPageControl[];
-extern const char szServiceName2_UnoMultiPageModel[];
-extern const char szServiceName2_UnoPageControl[];
-extern const char szServiceName2_UnoPageModel[];
-extern const char szServiceName2_UnoFrameControl[];
-extern const char szServiceName2_UnoFrameModel[];
-extern const char szServiceName_TabController[], 
szServiceName2_TabController[];
-extern const char szServiceName_TabControllerModel[], 
szServiceName2_TabControllerModel[];
-extern const char szServiceName_UnoControlDialog[], 
szServiceName2_UnoControlDialog[];
-extern const char szServiceName_UnoControlDialogModel[], 
szServiceName2_UnoControlDialogModel[];
-extern const char szServiceName_UnoControlEdit[], 
szServiceName2_UnoControlEdit[];
-extern const char szServiceName_UnoControlEditModel[];
-extern const char szServiceName_UnoControlFileControl[];
-extern const char szServiceName_UnoControlFileControlModel[];
-extern const char szServiceName_UnoControlButton[];
-extern const char szServiceName_UnoControlButtonModel[];
-extern const char szServiceName_UnoControlImageButton[], 
szServiceName2_UnoControlImageButton[];
-extern const char szServiceName_UnoControlImageButtonModel[], 
szServiceName2_UnoControlImageButtonModel[];
-extern const char szServiceName_UnoControlImageControl[];
-extern const char szServiceName_UnoControlImageControlModel[];
-extern const char szServiceName_UnoControlRadioButton[];
-extern const char szServiceName_UnoControlRadioButtonModel[];
-extern const char szServiceName_UnoControlCheckBox[];
-extern const char szServiceName_UnoControlCheckBoxModel[];
-extern const char szServiceName_UnoControlListBox[];
-extern const char szServiceName_UnoControlListBoxModel[];
-extern const char szServiceName_UnoControlComboBox[];
-extern const char szServiceName_UnoControlComboBoxModel[];
-extern const char szServiceName_UnoControlFixedText[];
-extern const char szServiceName_UnoControlGroupBox[];
-extern const char szServiceName_UnoControlGroupBoxModel[];
-extern const char szServiceName_UnoControlDateField[];
-extern const char szServiceName_UnoControlDateFieldModel[];
-extern const char szServiceName_UnoControlTimeField[];
-extern const char szServiceName_UnoControlTimeFieldModel[];
-extern const char szServiceName_UnoControlNumericField[];
-extern const char szServiceName_UnoControlNumericFieldModel[];
-extern const char szServiceName_UnoControlCurrencyField[];
-extern const char szServiceName_UnoControlCurrencyFieldModel[];
-extern const char szServiceName_UnoControlPatternField[];
-extern const char szServiceName_UnoControlPatternFieldModel[];
-extern const char szServiceName_UnoControlFormattedField[];
-extern const char szServiceName_UnoControlFormattedFieldModel[];
-extern const char szServiceName_UnoControlProgressBar[];
-extern const char szServiceName_UnoControlProgressBarModel[];
-extern const char szServiceName_UnoControlScrollBar[];
-extern const char szServiceName_UnoControlScrollBarModel[];
-extern const char szServiceName_UnoControlFixedLine[];
-extern const 

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

2019-11-07 Thread Caolán McNamara (via logerrit)
 toolkit/inc/helper/btndlg.hxx|1 -
 toolkit/source/helper/btndlg.cxx |7 ---
 2 files changed, 8 deletions(-)

New commits:
commit c379aeec499af0c4960e8415fe91002b713c7a15
Author: Caolán McNamara 
AuthorDate: Thu Nov 7 09:44:31 2019 +
Commit: Caolán McNamara 
CommitDate: Thu Nov 7 13:09:12 2019 +0100

ButtonDialog is only inherited from

Change-Id: Icc827ba76432e6ed454acf12dc18c83c6908487b
Reviewed-on: https://gerrit.libreoffice.org/82197
Reviewed-by: Caolán McNamara 
Tested-by: Caolán McNamara 

diff --git a/toolkit/inc/helper/btndlg.hxx b/toolkit/inc/helper/btndlg.hxx
index 011f8761abb1..46e6e9197004 100644
--- a/toolkit/inc/helper/btndlg.hxx
+++ b/toolkit/inc/helper/btndlg.hxx
@@ -49,7 +49,6 @@ namespace o3tl
 class ButtonDialog : public Dialog
 {
 public:
-ButtonDialog( vcl::Window* pParent, WinBits nStyle );
 virtual ~ButtonDialog() override;
 virtual voiddispose() override;
 
diff --git a/toolkit/source/helper/btndlg.cxx b/toolkit/source/helper/btndlg.cxx
index 90d1dd174676..7b8884b4ee62 100644
--- a/toolkit/source/helper/btndlg.cxx
+++ b/toolkit/source/helper/btndlg.cxx
@@ -49,13 +49,6 @@ ButtonDialog::ButtonDialog( WindowType nType ) :
 ImplInitButtonDialogData();
 }
 
-ButtonDialog::ButtonDialog( vcl::Window* pParent, WinBits nStyle ) :
-Dialog( WindowType::BUTTONDIALOG )
-{
-ImplInitButtonDialogData();
-ImplInit( pParent, nStyle );
-}
-
 ButtonDialog::~ButtonDialog()
 {
 disposeOnce();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2015-11-09 Thread Noel Grandin
 toolkit/inc/helper/unopropertyarrayhelper.hxx  |8 
 toolkit/inc/helper/unowrapper.hxx  |   18 
 toolkit/source/awt/animatedimagespeer.cxx  |2 
 toolkit/source/awt/asynccallback.cxx   |   10 
 toolkit/source/awt/scrollabledialog.cxx|4 
 toolkit/source/awt/stylesettings.hxx   |  222 +-
 toolkit/source/awt/vclxbitmap.cxx  |   36 
 toolkit/source/awt/vclxcontainer.cxx   |   58 
 toolkit/source/awt/vclxdevice.cxx  |   96 
 toolkit/source/awt/vclxfont.cxx|   48 
 toolkit/source/awt/vclxgraphics.cxx|6 
 toolkit/source/awt/vclxpointer.cxx |6 
 toolkit/source/awt/vclxprinter.cxx |   72 
 toolkit/source/awt/vclxregion.cxx  |   44 
 toolkit/source/awt/vclxsystemdependentwindow.cxx   |   24 
 toolkit/source/awt/vclxtabpagecontainer.cxx|   30 
 toolkit/source/awt/vclxtoolkit.cxx |  190 -
 toolkit/source/awt/vclxtopwindow.cxx   |   34 
 toolkit/source/awt/vclxwindow.cxx  |  258 +-
 toolkit/source/awt/vclxwindow1.cxx |   10 
 toolkit/source/awt/vclxwindows.cxx | 1072 
+-
 toolkit/source/awt/vclxwindows_internal.hxx|4 
 toolkit/source/controls/accessiblecontrolcontext.cxx   |4 
 toolkit/source/controls/animatedimages.cxx |2 
 toolkit/source/controls/controlmodelcontainerbase.cxx  |   24 
 toolkit/source/controls/controlmodelcontainerbase_internal.hxx |2 
 toolkit/source/controls/dialogcontrol.cxx  |   28 
 toolkit/source/controls/eventcontainer.cxx |4 
 toolkit/source/controls/geometrycontrolmodel.cxx   |   36 
 toolkit/source/controls/grid/defaultgriddatamodel.cxx  |6 
 toolkit/source/controls/grid/gridcolumn.cxx|   30 
 toolkit/source/controls/grid/gridcolumn.hxx|   92 
 toolkit/source/controls/grid/gridcontrol.cxx   |   20 
 toolkit/source/controls/grid/gridcontrol.hxx   |   74 
 toolkit/source/controls/grid/grideventforwarder.hxx|   20 
 toolkit/source/controls/grid/initguard.hxx |2 
 toolkit/source/controls/roadmapcontrol.cxx |8 
 toolkit/source/controls/roadmapentry.cxx   |   32 
 toolkit/source/controls/stdtabcontrollermodel.cxx  |   94 
 toolkit/source/controls/tabpagecontainer.cxx   |   22 
 toolkit/source/controls/tabpagemodel.cxx   |   20 
 toolkit/source/controls/tkscrollbar.cxx|   48 
 toolkit/source/controls/tkspinbutton.cxx   |2 
 toolkit/source/controls/tree/treecontrol.cxx   |8 
 toolkit/source/controls/tree/treecontrol.hxx   |   10 
 toolkit/source/controls/tree/treedatamodel.cxx |   50 
 toolkit/source/controls/unocontrolbase.cxx |   62 
 toolkit/source/controls/unocontrolcontainer.cxx|   20 
 toolkit/source/controls/unocontrolcontainermodel.cxx   |   14 
 toolkit/source/controls/unocontrolmodel.cxx|  198 -
 toolkit/source/controls/unocontrols.cxx|   78 
 toolkit/source/helper/accessibilityclient.cxx  |   24 
 toolkit/source/helper/listenermultiplexer.cxx  |  182 -
 toolkit/source/helper/property.cxx |   40 
 toolkit/source/helper/unopropertyarrayhelper.cxx   |   14 
 toolkit/source/helper/unowrapper.cxx   |   26 
 toolkit/source/helper/vclunohelper.cxx |  265 +-
 57 files changed, 1896 insertions(+), 1917 deletions(-)

New commits:
commit 4a00be7ade3235e18cab7706bcfe9a1adccb2462
Author: Noel Grandin 
Date:   Mon Nov 9 09:05:08 2015 +0200

com::sun::star->css in toolkit/

Change-Id: Ia8feca46fa64a300235730e1248fa5fda0783ba2
Reviewed-on: https://gerrit.libreoffice.org/19853
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/toolkit/inc/helper/unopropertyarrayhelper.hxx 
b/toolkit/inc/helper/unopropertyarrayhelper.hxx
index 3632da5..bbe53a4 100644
--- a/toolkit/inc/helper/unopropertyarrayhelper.hxx
+++ b/toolkit/inc/helper/unopropertyarrayhelper.hxx
@@ -38,16 +38,16 @@ protected:
 boolImplHasProperty( sal_uInt16 nPropId ) const;
 
 public:
-UnoPropertyArrayHelper( const 
::com::sun::star::uno::Sequence& 

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

2013-03-16 Thread Chr . Rossmanith
 toolkit/inc/toolkit/helper/macros.hxx |   10 +-
 toolkit/source/awt/animatedimagespeer.cxx |4 ++--
 toolkit/source/awt/asynccallback.cxx  |   12 +---
 toolkit/source/awt/vclxmenu.cxx   |   22 +++---
 4 files changed, 23 insertions(+), 25 deletions(-)

New commits:
commit d1075aab19737bc168439ba64b60cd8fae8fd3bb
Author: Chr. Rossmanith chrrossman...@gmx.de
Date:   Fri Mar 15 22:10:37 2013 +0100

Remove RTL_CONSTASCII_(U)STRING in toolkit

Change-Id: I62c89716d93c4dfb51a38b78f795a532e2b1d0b7
Reviewed-on: https://gerrit.libreoffice.org/2770
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/toolkit/inc/toolkit/helper/macros.hxx 
b/toolkit/inc/toolkit/helper/macros.hxx
index 7f56227..184678e 100644
--- a/toolkit/inc/toolkit/helper/macros.hxx
+++ b/toolkit/inc/toolkit/helper/macros.hxx
@@ -274,23 +274,23 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, 
InterfaceName, MethodNa
 // 
-
 
 #define DECLIMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \
-::rtl::OUString SAL_CALL getImplementationName(  ) 
throw(::com::sun::star::uno::RuntimeException) { return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( stardiv.Toolkit. #ImplName )); } 
\
-::com::sun::star::uno::Sequence ::rtl::OUString  SAL_CALL 
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)   \
+OUString SAL_CALL getImplementationName(  ) 
throw(::com::sun::star::uno::RuntimeException) { return 
OUString(stardiv.Toolkit. #ImplName ); } \
+::com::sun::star::uno::Sequence OUString  SAL_CALL 
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)   \
 { \
 ::com::sun::star::uno::Sequence 
::rtl::OUString  aNames = BaseClass::getSupportedServiceNames( ); \
 aNames.realloc( aNames.getLength() + 1 ); \
-aNames[ aNames.getLength() - 1 ] = 
::rtl::OUString::createFromAscii( ServiceName ); \
+aNames[ aNames.getLength() - 1 ] = 
OUString::createFromAscii( ServiceName ); \
 return aNames; \
 } \
 
 // 
-
 
 #define DECLIMPL_SERVICEINFO( ImplName, ServiceName ) \
-::rtl::OUString SAL_CALL getImplementationName(  ) 
throw(::com::sun::star::uno::RuntimeException) { return 
::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( stardiv.Toolkit. #ImplName )); } 
\
+OUString SAL_CALL getImplementationName(  ) 
throw(::com::sun::star::uno::RuntimeException) { return 
OUString(stardiv.Toolkit. #ImplName ); } \
 ::com::sun::star::uno::Sequence ::rtl::OUString  SAL_CALL 
getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException)   \
 { \
 ::com::sun::star::uno::Sequence 
::rtl::OUString  aNames( 1 ); \
-aNames[ 0 ] = 
::rtl::OUString::createFromAscii( ServiceName ); \
+aNames[ 0 ] = OUString::createFromAscii( 
ServiceName ); \
 return aNames; \
 } \
 DECLIMPL_SUPPORTS_SERVICE( )
diff --git a/toolkit/source/awt/animatedimagespeer.cxx 
b/toolkit/source/awt/animatedimagespeer.cxx
index ae41fad..46fa9db 100644
--- a/toolkit/source/awt/animatedimagespeer.cxx
+++ b/toolkit/source/awt/animatedimagespeer.cxx
@@ -113,7 +113,7 @@ namespace toolkit
 INetURLObject aURL( i_imageURL );
 if ( aURL.GetProtocol() != INET_PROT_PRIV_SOFFICE )
 {
-OSL_VERIFY( aURL.insertName( ::rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( hicontrast ) ), false, 0 ) );
+OSL_VERIFY( aURL.insertName( OUString( hicontrast ), false, 
0 ) );
 return aURL.GetMainURL( INetURLObject::NO_DECODE );
 }
 // the private: scheme is not considered to be hierarchical by 
INetURLObject, so manually insert the
@@ -158,7 +158,7 @@ namespace toolkit
 if ( i_graphic.is() )
 {
 const Reference XPropertySet  xGraphicProps( i_graphic, 
UNO_QUERY_THROW );
-OSL_VERIFY( xGraphicProps-getPropertyValue( 
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( SizePixel ) ) ) = aSizePixel 
);
+OSL_VERIFY( xGraphicProps-getPropertyValue( OUString( 
SizePixel ) ) = aSizePixel );
 }
 }
 catch( const Exception )
diff --git a/toolkit/source/awt/asynccallback.cxx 
b/toolkit/source/awt/asynccallback.cxx
index 4c5a981..939757f 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ 

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

2013-03-16 Thread Chr . Rossmanith
 toolkit/inc/toolkit/awt/vclxprinter.hxx |6 +++---
 toolkit/source/awt/vclxprinter.cxx  |   22 +++---
 2 files changed, 14 insertions(+), 14 deletions(-)

New commits:
commit c6f914041996d9b0e2431d29e63657ff02bc18d3
Author: Chr. Rossmanith chrrossman...@gmx.de
Date:   Fri Mar 15 22:24:29 2013 +0100

Replace String with OUString in toolkit(vclxprinter.cxx)

Change-Id: I265b413923837aaba47abf242803fae7359f8ea8
Reviewed-on: https://gerrit.libreoffice.org/2771
Reviewed-by: Fridrich Strba fridr...@documentfoundation.org
Tested-by: Fridrich Strba fridr...@documentfoundation.org

diff --git a/toolkit/inc/toolkit/awt/vclxprinter.hxx 
b/toolkit/inc/toolkit/awt/vclxprinter.hxx
index 03eed25..87b5bc7 100644
--- a/toolkit/inc/toolkit/awt/vclxprinter.hxx
+++ b/toolkit/inc/toolkit/awt/vclxprinter.hxx
@@ -59,7 +59,7 @@ protected:
 sal_Int16   mnOrientation;
 sal_BoolmbHorizontal;
 public:
-VCLXPrinterPropertySet( const String rPrinterName );
+VCLXPrinterPropertySet( const OUString rPrinterName );
 virtual ~VCLXPrinterPropertySet();
 
 Printer*GetPrinter() const { return mpPrinter.get(); }
@@ -107,7 +107,7 @@ class VCLXPrinter:  public ::com::sun::star::awt::XPrinter,
 boost::shared_ptrvcl::OldStylePrintAdaptormpListener;
 JobSetupmaInitJobSetup;
 public:
-VCLXPrinter( const String rPrinterName );
+VCLXPrinter( const OUString rPrinterName );
 ~VCLXPrinter();
 
 // ::com::sun::star::uno::XInterface
@@ -153,7 +153,7 @@ class VCLXInfoPrinter:  public 
::com::sun::star::awt::XInfoPrinter,
 public ::cppu::OWeakObject
 {
 public:
-VCLXInfoPrinter( const String rPrinterName );
+VCLXInfoPrinter( const OUString rPrinterName );
 ~VCLXInfoPrinter();
 
 // ::com::sun::star::uno::XInterface
diff --git a/toolkit/source/awt/vclxprinter.cxx 
b/toolkit/source/awt/vclxprinter.cxx
index 56e5e83..af673d4 100644
--- a/toolkit/source/awt/vclxprinter.cxx
+++ b/toolkit/source/awt/vclxprinter.cxx
@@ -84,7 +84,7 @@ IMPL_XTYPEPROVIDER_START( VCLXPrinterPropertySet )
 getCppuType( ( ::com::sun::star::uno::Reference 
::com::sun::star::awt::XPrinterPropertySet* ) NULL )
 IMPL_XTYPEPROVIDER_END
 
-VCLXPrinterPropertySet::VCLXPrinterPropertySet( const String rPrinterName )
+VCLXPrinterPropertySet::VCLXPrinterPropertySet( const OUString rPrinterName )
 : OPropertySetHelper( BrdcstHelper )
 , mpPrinter( new Printer( rPrinterName ) )
 {
@@ -222,22 +222,22 @@ void VCLXPrinterPropertySet::setHorizontal( sal_Bool 
bHorizontal ) throw(::com::
 setFastPropertyValue( PROPERTY_Horizontal, aValue );
 }
 
-::com::sun::star::uno::Sequence ::rtl::OUString  
VCLXPrinterPropertySet::getFormDescriptions(  ) 
throw(::com::sun::star::uno::RuntimeException)
+::com::sun::star::uno::Sequence OUString  
VCLXPrinterPropertySet::getFormDescriptions(  ) 
throw(::com::sun::star::uno::RuntimeException)
 {
 ::osl::MutexGuard aGuard( Mutex );
 
 sal_uInt16 nPaperBinCount = GetPrinter()-GetPaperBinCount();
-::com::sun::star::uno::Sequence ::rtl::OUString   aDescriptions( 
nPaperBinCount );
+::com::sun::star::uno::Sequence OUString   aDescriptions( nPaperBinCount 
);
 for ( sal_uInt16 n = 0; n  nPaperBinCount; n++ )
 {
 // Format: 
DisplayFormName;FormNameId;DisplayPaperBinName;PaperBinNameId;DisplayPaperName;PaperNameId
-String aDescr( RTL_CONSTASCII_USTRINGPARAM( *;*; ) );
-aDescr += GetPrinter()-GetPaperBinName( n );
-aDescr += ';';
-aDescr += n;
-aDescr.AppendAscii( ;*;*, 4 );
+OUStringBuffer aDescr( *;*; );
+aDescr.append(GetPrinter()-GetPaperBinName( n ));
+aDescr.append(';');
+aDescr.append(OUString::number(n));
+aDescr.append(;*;*);
 
-aDescriptions.getArray()[n] = aDescr;
+aDescriptions.getArray()[n] = aDescr.makeStringAndClear();
 }
 return aDescriptions;
 }
@@ -282,7 +282,7 @@ void VCLXPrinterPropertySet::setBinarySetup( const 
::com::sun::star::uno::Sequen
 //  
 //  class VCLXPrinter
 //  
-VCLXPrinter::VCLXPrinter( const String rPrinterName )
+VCLXPrinter::VCLXPrinter( const OUString rPrinterName )
 : VCLXPrinterPropertySet( rPrinterName )
 {
 }
@@ -367,7 +367,7 @@ void VCLXPrinter::endPage(  ) 
throw(::com::sun::star::awt::PrinterException, ::c
 //  class VCLXInfoPrinter
 //  
 
-VCLXInfoPrinter::VCLXInfoPrinter( const String rPrinterName )
+VCLXInfoPrinter::VCLXInfoPrinter( const OUString rPrinterName )
 : VCLXPrinterPropertySet( rPrinterName )
 {
 }
___
Libreoffice-commits