[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - 2 commits - accessibility/source chart2/source dbaccess/source forms/source framework/source sd/source svtools/source svx/source toolkit/source
Tor Lillqvist
tml at collabora.com
Thu Jun 18 04:17:23 PDT 2015
accessibility/source/extended/listboxaccessible.cxx | 2
chart2/source/view/main/ChartView.cxx | 2
dbaccess/source/ui/browser/genericcontroller.cxx | 1
dbaccess/source/ui/browser/unodatbr.cxx | 3 +
forms/source/richtext/richtextcontrol.cxx | 2
forms/source/richtext/richtextmodel.cxx | 5 +-
forms/source/solar/component/navbarcontrol.cxx | 11 ++--
framework/source/dispatch/closedispatcher.cxx | 1
framework/source/layoutmanager/layoutmanager.cxx | 1
sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx | 3 +
svtools/source/uno/unoiface.cxx | 1
svx/source/accessibility/AccessibleShapeTreeInfo.cxx | 4 +
svx/source/fmcomp/fmgridif.cxx | 2
svx/source/form/fmdmod.cxx | 34 +++++++-------
toolkit/source/awt/vclxdevice.cxx | 3 +
toolkit/source/awt/vclxgraphics.cxx | 3 +
toolkit/source/awt/vclxtoolkit.cxx | 2
toolkit/source/controls/unocontrol.cxx | 8 ++-
18 files changed, 62 insertions(+), 26 deletions(-)
New commits:
commit 9284ea261eb7339733202c56e90ef881a1775afb
Author: Tor Lillqvist <tml at collabora.com>
Date: Fri Jun 5 16:45:45 2015 +0300
Fix: could not convert [...] ‘const char*’ to ‘const rtl::OUString’
Change-Id: Ib94c9f5eed0da67e846705f5c2c233c10583c791
(cherry picked from commit a44b770b59d322083cac6ac22cef20ce17a89e6d)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/svx/source/form/fmdmod.cxx b/svx/source/form/fmdmod.cxx
index 447ad5a..bb63fed 100644
--- a/svx/source/form/fmdmod.cxx
+++ b/svx/source/form/fmdmod.cxx
@@ -65,25 +65,25 @@ SAL_WNOUNREACHABLE_CODE_POP
{
static const OUString aSvxComponentServiceNameList[] =
{
- FM_SUN_COMPONENT_TEXTFIELD,
- FM_SUN_COMPONENT_FORM,
- FM_SUN_COMPONENT_LISTBOX,
- FM_SUN_COMPONENT_COMBOBOX,
- FM_SUN_COMPONENT_RADIOBUTTON,
- FM_SUN_COMPONENT_GROUPBOX,
- FM_SUN_COMPONENT_FIXEDTEXT,
- FM_SUN_COMPONENT_COMMANDBUTTON,
+ OUString(FM_SUN_COMPONENT_TEXTFIELD),
+ OUString(FM_SUN_COMPONENT_FORM),
+ OUString(FM_SUN_COMPONENT_LISTBOX),
+ OUString(FM_SUN_COMPONENT_COMBOBOX),
+ OUString(FM_SUN_COMPONENT_RADIOBUTTON),
+ OUString(FM_SUN_COMPONENT_GROUPBOX),
+ OUString(FM_SUN_COMPONENT_FIXEDTEXT),
+ OUString(FM_SUN_COMPONENT_COMMANDBUTTON),
OUString(FM_SUN_COMPONENT_CHECKBOX),
- FM_SUN_COMPONENT_GRIDCONTROL,
- FM_SUN_COMPONENT_IMAGEBUTTON,
- FM_SUN_COMPONENT_FILECONTROL,
- FM_SUN_COMPONENT_TIMEFIELD,
- FM_SUN_COMPONENT_DATEFIELD,
+ OUString(FM_SUN_COMPONENT_GRIDCONTROL),
+ OUString(FM_SUN_COMPONENT_IMAGEBUTTON),
+ OUString(FM_SUN_COMPONENT_FILECONTROL),
+ OUString(FM_SUN_COMPONENT_TIMEFIELD),
+ OUString(FM_SUN_COMPONENT_DATEFIELD),
OUString(FM_SUN_COMPONENT_NUMERICFIELD),
- FM_SUN_COMPONENT_CURRENCYFIELD,
- FM_SUN_COMPONENT_PATTERNFIELD,
- FM_SUN_COMPONENT_HIDDENCONTROL,
- FM_SUN_COMPONENT_IMAGECONTROL
+ OUString(FM_SUN_COMPONENT_CURRENCYFIELD),
+ OUString(FM_SUN_COMPONENT_PATTERNFIELD),
+ OUString(FM_SUN_COMPONENT_HIDDENCONTROL),
+ OUString(FM_SUN_COMPONENT_IMAGECONTROL)
};
static const sal_uInt16 nSvxComponentServiceNameListCount = sizeof(aSvxComponentServiceNameList) / sizeof ( aSvxComponentServiceNameList[0] );
commit 8aac888a3bd933a2c67d0104077c5ec9fee448c5
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jun 17 15:18:10 2015 +0200
Some missing SolarMutexGuard around VclPtr acquire/release
At least OutputDevice::acquire/release use a plain unguarded int and ++, --, so
apparently rely on the SolarMutex being locked whenever they are called. Fixed
those places that caused "make check" to fail for me when temporarily adding
DBG_TESTSOLARMUTEX() to OutputDevice::acquire/release. (A recurring pattern is
that a class fails to ensure the SolarMutex is locked around the destruction of
non-null VclPtr members.)
Change-Id: I77cba6f3908f2de1b516ce28f1c3c43b3f57a9c5
(cherry picked from commit 8e1ad966262932516b3368d9b5c44becb29524d4)
Signed-off-by: Michael Stahl <mstahl at redhat.com>
diff --git a/accessibility/source/extended/listboxaccessible.cxx b/accessibility/source/extended/listboxaccessible.cxx
index e02a1d6..e7e428c 100644
--- a/accessibility/source/extended/listboxaccessible.cxx
+++ b/accessibility/source/extended/listboxaccessible.cxx
@@ -19,6 +19,7 @@
#include <accessibility/extended/listboxaccessible.hxx>
#include <svtools/treelistbox.hxx>
+#include <vcl/svapp.hxx>
namespace accessibility
{
@@ -55,6 +56,7 @@ namespace accessibility
void ListBoxAccessibleBase::disposing()
{
+ SolarMutexGuard g;
if ( m_pWindow )
m_pWindow->RemoveEventListener( LINK( this, ListBoxAccessibleBase, WindowEventListener ) );
m_pWindow = NULL;
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index b95b5ab..3510549 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1103,8 +1103,10 @@ GL2DRenderer::GL2DRenderer(ChartView* pView):
GL2DRenderer::~GL2DRenderer()
{
+ SolarMutexGuard g;
if(!mbContextDestroyed && mpWindow)
mpWindow->setRenderer(NULL);
+ mpWindow.reset();
}
void GL2DRenderer::update()
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index 971e59d..4d2bf15 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -363,6 +363,7 @@ void OGenericUnoController::modified(const EventObject& aEvent) throw( RuntimeEx
Reference< XWindow > SAL_CALL OGenericUnoController::getComponentWindow() throw (RuntimeException, std::exception)
{
+ SolarMutexGuard g;
return VCLUnoHelper::GetInterface( getView() );
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 4514ea3..369fb06 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -235,6 +235,9 @@ SbaTableQueryBrowser::~SbaTableQueryBrowser()
osl_atomic_increment( &m_refCount );
dispose();
}
+ SolarMutexGuard g;
+ m_pTreeView.reset();
+ m_pSplitter.reset();
}
Any SAL_CALL SbaTableQueryBrowser::queryInterface(const Type& _rType) throw (RuntimeException, std::exception)
diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx
index 03d7087..ca8deb59 100644
--- a/forms/source/richtext/richtextcontrol.cxx
+++ b/forms/source/richtext/richtextcontrol.cxx
@@ -367,6 +367,8 @@ namespace frm
throw (RuntimeException,
std::exception)
{
+ SolarMutexGuard g;
+
if ( !GetWindow() )
{
VCLXWindow::setProperty( _rPropertyName, _rValue );
diff --git a/forms/source/richtext/richtextmodel.cxx b/forms/source/richtext/richtextmodel.cxx
index 417ac6d..2bbe7f7 100644
--- a/forms/source/richtext/richtextmodel.cxx
+++ b/forms/source/richtext/richtextmodel.cxx
@@ -131,7 +131,10 @@ namespace frm
m_pEngine->SetControlWord( nEngineControlWord );
VCLXDevice* pUnoRefDevice = new VCLXDevice;
- pUnoRefDevice->SetOutputDevice( m_pEngine->GetRefDevice() );
+ {
+ SolarMutexGuard g;
+ pUnoRefDevice->SetOutputDevice( m_pEngine->GetRefDevice() );
+ }
m_xReferenceDevice = pUnoRefDevice;
}
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index 6d335d9..e7c8624 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -435,10 +435,13 @@ namespace frm
void ONavigationBarPeer::allFeatureStatesChanged( )
{
- // force the control to update it's states
- VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
- if ( pNavBar )
- pNavBar->setDispatcher( this );
+ {
+ // force the control to update it's states
+ SolarMutexGuard g;
+ VclPtr< NavigationToolBar > pNavBar = GetAs< NavigationToolBar >();
+ if ( pNavBar )
+ pNavBar->setDispatcher( this );
+ }
// base class
OFormNavigationHelper::allFeatureStatesChanged( );
diff --git a/framework/source/dispatch/closedispatcher.cxx b/framework/source/dispatch/closedispatcher.cxx
index 9548861..9bfd558 100644
--- a/framework/source/dispatch/closedispatcher.cxx
+++ b/framework/source/dispatch/closedispatcher.cxx
@@ -80,6 +80,7 @@ CloseDispatcher::~CloseDispatcher()
{
SolarMutexGuard g;
m_aAsyncCallback.reset();
+ m_pSysWindow.reset();
}
void SAL_CALL CloseDispatcher::dispatch(const css::util::URL& aURL ,
diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx
index 9f0b811..d0c3e24 100644
--- a/framework/source/layoutmanager/layoutmanager.cxx
+++ b/framework/source/layoutmanager/layoutmanager.cxx
@@ -2118,6 +2118,7 @@ throw (RuntimeException, std::exception)
Reference< awt::XWindow > xWindow( m_aStatusBarElement.m_xUIElement->getRealInterface(), UNO_QUERY );
if ( xWindow.is() )
{
+ SolarMutexGuard g;
vcl::Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( pWindow && pWindow->IsVisible() )
return sal_True;
diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
index a1f7fca..973ac3e 100644
--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
+++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx
@@ -93,6 +93,9 @@ AccessibleDocumentViewBase::~AccessibleDocumentViewBase()
{
// At this place we should be disposed. You may want to add a
// corresponding assertion into the destructor of a derived class.
+
+ SolarMutexGuard g;
+ mpWindow.reset();
}
void AccessibleDocumentViewBase::Init()
diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx
index 43a6ad6..a768bcf 100644
--- a/svtools/source/uno/unoiface.cxx
+++ b/svtools/source/uno/unoiface.cxx
@@ -2320,6 +2320,7 @@ void SAL_CALL SVTXDateField::setProperty( const OUString& PropertyName, const ::
VCLXDateField::setProperty( PropertyName, Value );
// some properties need to be forwarded to the sub edit, too
+ SolarMutexGuard g;
VclPtr< Edit > pSubEdit = GetWindow() ? static_cast< Edit* >( GetWindow().get() )->GetSubEdit() : NULL;
if ( !pSubEdit )
return;
diff --git a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
index 416dfa6..b141ce8 100644
--- a/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
+++ b/svx/source/accessibility/AccessibleShapeTreeInfo.cxx
@@ -19,6 +19,7 @@
#include <svx/AccessibleShapeTreeInfo.hxx>
+#include <vcl/svapp.hxx>
#include <vcl/window.hxx>
using namespace ::com::sun::star;
@@ -71,7 +72,8 @@ AccessibleShapeTreeInfo& AccessibleShapeTreeInfo::operator= (const AccessibleSha
AccessibleShapeTreeInfo::~AccessibleShapeTreeInfo()
{
- //empty
+ SolarMutexGuard g;
+ mpWindow.reset();
}
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index e78f3a8..85f8513 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -2633,10 +2633,10 @@ void FmXGridPeer::resetted(const EventObject& rEvent) throw( RuntimeException, s
{
if (m_xColumns == rEvent.Source)
{ // my model was reset -> refresh the grid content
+ SolarMutexGuard aGuard;
VclPtr< FmGridControl > pGrid = GetAs< FmGridControl >();
if (!pGrid)
return;
- SolarMutexGuard aGuard;
pGrid->resetCurrentRow();
}
// if the cursor fired a reset event we seem to be on the insert row
diff --git a/toolkit/source/awt/vclxdevice.cxx b/toolkit/source/awt/vclxdevice.cxx
index da7ad04..aff2261 100644
--- a/toolkit/source/awt/vclxdevice.cxx
+++ b/toolkit/source/awt/vclxdevice.cxx
@@ -50,6 +50,9 @@ VCLXDevice::VCLXDevice()
VCLXDevice::~VCLXDevice()
{
+ //TODO: why was this empty, and everything done in ~VCLXVirtualDevice?
+ SolarMutexGuard g;
+ mpOutputDevice.reset();
}
void VCLXDevice::SetCreatedWithToolkit( bool bCreatedWithToolkit )
diff --git a/toolkit/source/awt/vclxgraphics.cxx b/toolkit/source/awt/vclxgraphics.cxx
index 073afa5..482e29c 100644
--- a/toolkit/source/awt/vclxgraphics.cxx
+++ b/toolkit/source/awt/vclxgraphics.cxx
@@ -80,6 +80,9 @@ VCLXGraphics::~VCLXGraphics()
}
delete mpClipRegion;
+
+ SolarMutexGuard g;
+ mpOutputDevice.reset();
}
void VCLXGraphics::SetOutputDevice( OutputDevice* pOutDev )
diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx
index 82ad2b8..ee1f9b8 100644
--- a/toolkit/source/awt/vclxtoolkit.cxx
+++ b/toolkit/source/awt/vclxtoolkit.cxx
@@ -1463,6 +1463,8 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow(
::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragGestureRecognizer > SAL_CALL VCLXToolkit::getDragGestureRecognizer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >& window ) throw(::com::sun::star::uno::RuntimeException, std::exception)
{
+ SolarMutexGuard g;
+
vcl::Window * pWindow = VCLUnoHelper::GetWindow( window );
if( pWindow )
diff --git a/toolkit/source/controls/unocontrol.cxx b/toolkit/source/controls/unocontrol.cxx
index d5c6ebf..6daf050 100644
--- a/toolkit/source/controls/unocontrol.cxx
+++ b/toolkit/source/controls/unocontrol.cxx
@@ -640,8 +640,12 @@ void UnoControl::ImplModelPropertiesChanged( const Sequence< PropertyChangeEvent
// Since the implementations for the listeners changed a lot towards 1.1, this
// would not be the case anymore, if we would not do this listener-lock below
// #i14703#
- vcl::Window* pVclPeer = VCLUnoHelper::GetWindow( getPeer() );
- VCLXWindow* pPeer = pVclPeer ? pVclPeer->GetWindowPeer() : NULL;
+ VCLXWindow* pPeer;
+ {
+ SolarMutexGuard g;
+ vcl::Window* pVclPeer = VCLUnoHelper::GetWindow( getPeer() );
+ pPeer = pVclPeer ? pVclPeer->GetWindowPeer() : NULL;
+ }
VclListenerLock aNoVclEventMultiplexing( pPeer );
// setting peer properties may result in an attempt to acquire the solar mutex, 'cause the peers
More information about the Libreoffice-commits
mailing list