diff options
Diffstat (limited to 'svtools/source/uno')
27 files changed, 338 insertions, 293 deletions
diff --git a/svtools/source/uno/addrtempuno.cxx b/svtools/source/uno/addrtempuno.cxx index 706afe09202f..8cb5a4945e2e 100644 --- a/svtools/source/uno/addrtempuno.cxx +++ b/svtools/source/uno/addrtempuno.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -112,7 +113,7 @@ namespace svt OAddressBookSourceDialogUno::OAddressBookSourceDialogUno(const Reference< XMultiServiceFactory >& _rxORB) :OGenericUnoDialog(_rxORB) { - registerProperty(::rtl::OUString::createFromAscii(UNODIALOG_PROPERTY_ALIASES), UNODIALOG_PROPERTY_ID_ALIASES, PropertyAttribute::READONLY, + registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_ALIASES)), UNODIALOG_PROPERTY_ID_ALIASES, PropertyAttribute::READONLY, &m_aAliases, getCppuType(&m_aAliases)); } @@ -138,7 +139,7 @@ namespace svt //------------------------------------------------------------------------- ::rtl::OUString OAddressBookSourceDialogUno::getImplementationName_Static() throw(RuntimeException) { - return ::rtl::OUString::createFromAscii("com.sun.star.comp.svtools.OAddressBookSourceDialogUno"); + return ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.comp.svtools.OAddressBookSourceDialogUno" )); } //------------------------------------------------------------------------- @@ -151,7 +152,7 @@ namespace svt ::comphelper::StringSequence OAddressBookSourceDialogUno::getSupportedServiceNames_Static() throw(RuntimeException) { ::comphelper::StringSequence aSupported(1); - aSupported.getArray()[0] = ::rtl::OUString::createFromAscii("com.sun.star.ui.AddressBookSourceDialog"); + aSupported.getArray()[0] = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" )); return aSupported; } @@ -239,3 +240,4 @@ namespace svt } // namespace svt // ....................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/contextmenuhelper.cxx b/svtools/source/uno/contextmenuhelper.cxx index 5b7d7c709509..82ae79fa2c92 100644 --- a/svtools/source/uno/contextmenuhelper.cxx +++ b/svtools/source/uno/contextmenuhelper.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ #include <osl/conditn.hxx> #include <cppuhelper/weak.hxx> #include <comphelper/processfactory.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <vcl/image.hxx> #include <toolkit/unohlp.hxx> @@ -138,7 +139,7 @@ void SAL_CALL StateEventHelper::disposing( const lang::EventObject& ) throw ( uno::RuntimeException ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; m_xDispatchProvider.clear(); m_xURLTransformer.clear(); m_aCondition.set(); @@ -148,7 +149,7 @@ void SAL_CALL StateEventHelper::statusChanged( const frame::FeatureStateEvent& Event ) throw ( uno::RuntimeException ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; m_bCurrentCommandEnabled = Event.IsEnabled; m_aCondition.set(); } @@ -162,7 +163,7 @@ bool StateEventHelper::isCommandEnabled() uno::Reference< frame::XDispatch > xDispatch; util::URL aTargetURL; { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; if ( m_xDispatchProvider.is() && m_xURLTransformer.is() ) { ::rtl::OUString aSelf( RTL_CONSTASCII_USTRINGPARAM( "_self" )); @@ -204,7 +205,7 @@ bool StateEventHelper::isCommandEnabled() { } - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; bResult = m_bCurrentCommandEnabled; } @@ -276,7 +277,7 @@ ContextMenuHelper::completeAndExecute( const Point& aPos, PopupMenu& rPopupMenu ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; associateUIConfigurationManagers(); completeMenuProperties( &rPopupMenu ); @@ -289,7 +290,7 @@ ContextMenuHelper::completeAndExecute( const Point& aPos, const uno::Reference< awt::XPopupMenu >& xPopupMenu ) { - vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; VCLXMenu* pXMenu = VCLXMenu::GetImplementation( xPopupMenu ); if ( pXMenu ) @@ -503,15 +504,11 @@ ContextMenuHelper::associateUIConfigurationManagers() } Image -ContextMenuHelper::getImageFromCommandURL( - const ::rtl::OUString& aCmdURL, - bool bHiContrast ) const +ContextMenuHelper::getImageFromCommandURL( const ::rtl::OUString& aCmdURL ) const { Image aImage; sal_Int16 nImageType( ui::ImageType::COLOR_NORMAL| ui::ImageType::SIZE_DEFAULT ); - if ( bHiContrast ) - nImageType |= ui::ImageType::COLOR_HIGHCONTRAST; uno::Sequence< uno::Reference< graphic::XGraphic > > aGraphicSeq; uno::Sequence< ::rtl::OUString > aImageCmdSeq( 1 ); @@ -543,7 +540,7 @@ ContextMenuHelper::getImageFromCommandURL( { aGraphicSeq = m_xModuleImageMgr->getImages( nImageType, aImageCmdSeq ); uno::Reference< ::com::sun::star::graphic::XGraphic > xGraphic = aGraphicSeq[0]; - aImage = Image( xGraphic ); + aImage = Image( xGraphic ); if ( !!aImage ) return aImage; @@ -579,7 +576,7 @@ ContextMenuHelper::getLabelFromCommandURL( { for ( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ ) { - if ( aPropSeq[i].Name.equalsAscii( "Label" )) + if ( aPropSeq[i].Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Label")) ) { aPropSeq[i].Value >>= aStr; break; @@ -608,7 +605,6 @@ ContextMenuHelper::completeMenuProperties( // menu correctly. const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); bool bShowMenuImages( rSettings.GetUseImagesInMenus() ); - bool bIsHiContrast( rSettings.GetHighContrastMode() ); if ( pMenu ) { @@ -638,7 +634,7 @@ ContextMenuHelper::completeMenuProperties( { Image aImage; if ( aCmdURL.getLength() > 0 ) - aImage = getImageFromCommandURL( aCmdURL, bIsHiContrast ); + aImage = getImageFromCommandURL( aCmdURL ); pMenu->SetItemImage( nId, aImage ); } else @@ -685,3 +681,5 @@ IMPL_STATIC_LINK_NOINSTANCE( ContextMenuHelper, ExecuteHdl_Impl, ExecuteInfo*, p } } // namespace svt + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx index f7a0540f6eb4..2c228f28e5e6 100644 --- a/svtools/source/uno/framestatuslistener.cxx +++ b/svtools/source/uno/framestatuslistener.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -30,7 +31,7 @@ #include <svtools/framestatuslistener.hxx> #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/lang/DisposedException.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> using namespace ::cppu; @@ -61,13 +62,13 @@ FrameStatusListener::~FrameStatusListener() Reference< XFrame > FrameStatusListener::getFrameInterface() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; return m_xFrame; } Reference< XMultiServiceFactory > FrameStatusListener::getServiceManager() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; return m_xServiceManager; } @@ -105,7 +106,7 @@ throw (::com::sun::star::uno::RuntimeException) { Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -155,7 +156,7 @@ throw ( RuntimeException ) { Reference< XInterface > xSource( Source.Source ); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.begin(); while ( pIter != m_aListenerMap.end() ) @@ -192,7 +193,7 @@ void FrameStatusListener::addStatusListener( const rtl::OUString& aCommandURL ) com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); // Already in the list of status listener. Do nothing. @@ -203,7 +204,7 @@ void FrameStatusListener::addStatusListener( const rtl::OUString& aCommandURL ) // intialize is called. if ( !m_bInitialized ) { - // Put into the hash_map of status listener. Will be activated when initialized is called + // Put into the boost::unordered_map of status listener. Will be activated when initialized is called m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, Reference< XDispatch >() )); return; } @@ -255,7 +256,7 @@ void FrameStatusListener::addStatusListener( const rtl::OUString& aCommandURL ) void FrameStatusListener::removeStatusListener( const rtl::OUString& aCommandURL ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); if ( pIter != m_aListenerMap.end() ) @@ -288,7 +289,7 @@ void FrameStatusListener::bindListener() Reference< XStatusListener > xStatusListener; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -359,7 +360,7 @@ void FrameStatusListener::bindListener() void FrameStatusListener::unbindListener() { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -405,7 +406,7 @@ void FrameStatusListener::updateStatus( const rtl::OUString aCommandURL ) com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -442,3 +443,5 @@ void FrameStatusListener::updateStatus( const rtl::OUString aCommandURL ) } } // svt + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx index 33ec21a189f8..0c3ef6129e5a 100644 --- a/svtools/source/uno/generictoolboxcontroller.cxx +++ b/svtools/source/uno/generictoolboxcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ //_________________________________________________________________________________________________________________ // other includes //_________________________________________________________________________________________________________________ -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> using namespace ::com::sun::star::awt; @@ -91,7 +92,7 @@ GenericToolboxController::~GenericToolboxController() void SAL_CALL GenericToolboxController::dispose() throw ( RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; svt::ToolboxController::dispose(); @@ -107,7 +108,7 @@ throw ( RuntimeException ) ::rtl::OUString aCommandURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -148,7 +149,7 @@ throw ( RuntimeException ) void GenericToolboxController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; @@ -206,3 +207,5 @@ IMPL_STATIC_LINK_NOINSTANCE( GenericToolboxController, ExecuteHdl_Impl, ExecuteI } } // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/genericunodialog.cxx b/svtools/source/uno/genericunodialog.cxx index a1fdc7840a55..065c6207317a 100644 --- a/svtools/source/uno/genericunodialog.cxx +++ b/svtools/source/uno/genericunodialog.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -40,7 +41,7 @@ #include <osl/diagnose.h> #include <tools/diagnose_ex.h> #include <vcl/msgbox.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> using namespace ::comphelper; @@ -66,9 +67,9 @@ OGenericUnoDialog::OGenericUnoDialog(const Reference< XMultiServiceFactory >& _r ,m_bNeedInitialization( false ) ,m_aContext( _rxORB ) { - registerProperty(::rtl::OUString::createFromAscii(UNODIALOG_PROPERTY_TITLE), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT, + registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_TITLE)), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT, &m_sTitle, getCppuType(&m_sTitle)); - registerProperty(::rtl::OUString::createFromAscii(UNODIALOG_PROPERTY_PARENT), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT, + registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_PARENT)), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT, &m_xParent, getCppuType(&m_xParent)); } @@ -83,9 +84,9 @@ OGenericUnoDialog::OGenericUnoDialog(const Reference< XComponentContext >& _rxCo ,m_bNeedInitialization( false ) ,m_aContext(_rxContext) { - registerProperty(::rtl::OUString::createFromAscii(UNODIALOG_PROPERTY_TITLE), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT, + registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_TITLE)), UNODIALOG_PROPERTY_ID_TITLE, PropertyAttribute::TRANSIENT, &m_sTitle, getCppuType(&m_sTitle)); - registerProperty(::rtl::OUString::createFromAscii(UNODIALOG_PROPERTY_PARENT), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT, + registerProperty(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_PARENT)), UNODIALOG_PROPERTY_ID_PARENT, PropertyAttribute::TRANSIENT, &m_xParent, getCppuType(&m_xParent)); } @@ -94,7 +95,7 @@ OGenericUnoDialog::~OGenericUnoDialog() { if ( m_pDialog ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); if ( m_pDialog ) destroyDialog(); @@ -188,7 +189,7 @@ void SAL_CALL OGenericUnoDialog::setTitle( const ::rtl::OUString& _rTitle ) thro try { - setPropertyValue(::rtl::OUString::createFromAscii(UNODIALOG_PROPERTY_TITLE), makeAny(_rTitle)); + setPropertyValue(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(UNODIALOG_PROPERTY_TITLE)), makeAny(_rTitle)); } catch(RuntimeException&) { @@ -241,7 +242,7 @@ bool OGenericUnoDialog::impl_ensureDialog_lck() sal_Int16 SAL_CALL OGenericUnoDialog::execute( ) throw(RuntimeException) { // both creation and execution of the dialog must be guarded with the SolarMutex, so be generous here - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; Dialog* pDialogToExecute = NULL; // create the dialog, if neccessary @@ -371,3 +372,4 @@ IMPL_LINK( OGenericUnoDialog, OnDialogDying, VclWindowEvent*, _pEvent ) } // namespace svt //......................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index 34984976bf07..c652b6028bf0 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -113,7 +114,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( { Sequence< OUString > aServiceNames(1); aServiceNames.getArray()[0] = - OUString::createFromAscii( "com.sun.star.ui.AddressBookSourceDialog" ); + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.AddressBookSourceDialog" )); xFactory = ::cppu::createSingleFactory ( reinterpret_cast< XMultiServiceFactory* >( _pServiceManager ), @@ -126,7 +127,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( { Sequence< OUString > aServiceNames(1); aServiceNames.getArray()[0] = - OUString::createFromAscii( "com.sun.star.ui.dialogs.FilterOptionsDialog" ); + OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FilterOptionsDialog" )); xFactory = ::cppu::createSingleFactory ( reinterpret_cast< XMultiServiceFactory* >( _pServiceManager ), @@ -168,3 +169,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory ( } // "C" +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx index ac75a1b9a24b..1c1412193c06 100644 --- a/svtools/source/uno/popupmenucontrollerbase.cxx +++ b/svtools/source/uno/popupmenucontrollerbase.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -48,13 +49,11 @@ // includes of other projects //_________________________________________________________________________________________________________________ -#ifndef _VCL_MENU_HXX_ #include <vcl/menu.hxx> -#endif #include <vcl/svapp.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/logfile.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> //_________________________________________________________________________________________________________________ // Defines @@ -113,7 +112,7 @@ void PopupMenuControllerBase::resetPopupMenu( com::sun::star::uno::Reference< co pPopupMenu = (VCLXPopupMenu *)VCLXMenu::GetImplementation( rPopupMenu ); if ( pPopupMenu ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; PopupMenu* pVCLPopupMenu = (PopupMenu *)pPopupMenu->GetMenu(); pVCLPopupMenu->Clear(); @@ -372,9 +371,9 @@ void SAL_CALL PopupMenuControllerBase::initialize( const Sequence< Any >& aArgum { if ( aArguments[i] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "Frame" )) + if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")) ) aPropValue.Value >>= xFrame; - else if ( aPropValue.Name.equalsAscii( "CommandURL" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CommandURL")) ) aPropValue.Value >>= aCommandURL; } } @@ -397,7 +396,7 @@ void SAL_CALL PopupMenuControllerBase::setPopupMenu( const Reference< awt::XPopu if ( m_xFrame.is() && !m_xPopupMenu.is() ) { // Create popup menu on demand - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; m_xPopupMenu = xPopupMenu; m_xPopupMenu->addMenuListener( Reference< awt::XMenuListener >( (OWeakObject*)this, UNO_QUERY )); @@ -418,3 +417,5 @@ void PopupMenuControllerBase::impl_setPopupMenu() { } } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/popupwindowcontroller.cxx b/svtools/source/uno/popupwindowcontroller.cxx index 4fbaff23714d..03368204401b 100644 --- a/svtools/source/uno/popupwindowcontroller.cxx +++ b/svtools/source/uno/popupwindowcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -256,3 +257,4 @@ Reference< awt::XWindow > SAL_CALL PopupWindowController::createItemWindow( cons } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx index 8dde75dc7fc3..a64117823c60 100644 --- a/svtools/source/uno/statusbarcontroller.cxx +++ b/svtools/source/uno/statusbarcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <vcl/window.hxx> #include <vcl/status.hxx> @@ -84,19 +85,19 @@ StatusbarController::~StatusbarController() Reference< XFrame > StatusbarController::getFrameInterface() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; return m_xFrame; } Reference< XMultiServiceFactory > StatusbarController::getServiceManager() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; return m_xServiceManager; } Reference< XLayoutManager > StatusbarController::getLayoutManager() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; Reference< XLayoutManager > xLayoutManager; Reference< XPropertySet > xPropSet( m_xFrame, UNO_QUERY ); if ( xPropSet.is() ) @@ -117,7 +118,7 @@ Reference< XLayoutManager > StatusbarController::getLayoutManager() const Reference< XURLTransformer > StatusbarController::getURLTransformer() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_xURLTransformer.is() && m_xServiceManager.is() ) { m_xURLTransformer = Reference< XURLTransformer >( @@ -170,7 +171,7 @@ throw ( Exception, RuntimeException ) bool bInitialized( true ); { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -180,7 +181,7 @@ throw ( Exception, RuntimeException ) if ( !bInitialized ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; m_bInitialized = sal_True; PropertyValue aPropValue; @@ -188,15 +189,15 @@ throw ( Exception, RuntimeException ) { if ( aArguments[i] >>= aPropValue ) { - if ( aPropValue.Name.equalsAscii( "Frame" )) + if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Frame")) ) aPropValue.Value >>= m_xFrame; - else if ( aPropValue.Name.equalsAscii( "CommandURL" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("CommandURL")) ) aPropValue.Value >>= m_aCommandURL; - else if ( aPropValue.Name.equalsAscii( "ServiceManager" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ServiceManager")) ) aPropValue.Value >>= m_xServiceManager; - else if ( aPropValue.Name.equalsAscii( "ParentWindow" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("ParentWindow")) ) aPropValue.Value >>= m_xParentWindow; - else if ( aPropValue.Name.equalsAscii( "Identifier" )) + else if ( aPropValue.Name.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Identifier")) ) aPropValue.Value >>= m_nID; } } @@ -210,7 +211,7 @@ void SAL_CALL StatusbarController::update() throw ( RuntimeException ) { { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); } @@ -226,7 +227,7 @@ throw (::com::sun::star::uno::RuntimeException) Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); } @@ -234,7 +235,7 @@ throw (::com::sun::star::uno::RuntimeException) com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY ); Reference< XURLTransformer > xURLTransformer = getURLTransformer(); URLToDispatchMap::iterator pIter = m_aListenerMap.begin(); @@ -287,7 +288,7 @@ throw ( RuntimeException ) { Reference< XInterface > xSource( Source.Source ); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; @@ -299,7 +300,7 @@ throw ( RuntimeException ) Reference< XInterface > xIfac( pIter->second, UNO_QUERY ); if ( xSource == xIfac ) pIter->second.clear(); - pIter++; + ++pIter; } Reference< XInterface > xIfac( m_xFrame, UNO_QUERY ); @@ -311,7 +312,7 @@ throw ( RuntimeException ) void SAL_CALL StatusbarController::statusChanged( const FeatureStateEvent& Event ) throw ( RuntimeException ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; @@ -376,7 +377,7 @@ throw (::com::sun::star::uno::RuntimeException) void SAL_CALL StatusbarController::doubleClick() throw (::com::sun::star::uno::RuntimeException) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; @@ -392,7 +393,7 @@ void StatusbarController::addStatusListener( const rtl::OUString& aCommandURL ) com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); // Already in the list of status listener. Do nothing. @@ -403,7 +404,7 @@ void StatusbarController::addStatusListener( const rtl::OUString& aCommandURL ) // intialize is called. if ( !m_bInitialized ) { - // Put into the hash_map of status listener. Will be activated when initialized is called + // Put into the boost::unordered_map of status listener. Will be activated when initialized is called m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, Reference< XDispatch >() )); return; } @@ -453,7 +454,7 @@ void StatusbarController::addStatusListener( const rtl::OUString& aCommandURL ) void StatusbarController::removeStatusListener( const rtl::OUString& aCommandURL ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); if ( pIter != m_aListenerMap.end() ) @@ -484,7 +485,7 @@ void StatusbarController::bindListener() Reference< XStatusListener > xStatusListener; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -573,7 +574,7 @@ void StatusbarController::bindListener() void StatusbarController::unbindListener() { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -612,7 +613,7 @@ void StatusbarController::unbindListener() sal_Bool StatusbarController::isBound() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return sal_False; @@ -636,7 +637,7 @@ void StatusbarController::updateStatus( const rtl::OUString aCommandURL ) com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -675,7 +676,7 @@ void StatusbarController::updateStatus( const rtl::OUString aCommandURL ) ::Rectangle aRect; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -698,7 +699,7 @@ void StatusbarController::execute( const ::com::sun::star::uno::Sequence< ::com: rtl::OUString aCommandURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -740,7 +741,7 @@ void StatusbarController::execute( com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -780,3 +781,5 @@ void StatusbarController::execute( } } // svt + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 0e826ef6bff3..778925a60c44 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,6 +47,8 @@ #include <com/sun/star/util/Color.hpp> #include <com/sun/star/awt/FontDescriptor.hpp> +#include <vcl/svapp.hxx> + using namespace ::svt::table; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt::grid; @@ -80,7 +83,7 @@ void SVTXGridControl::SetWindow( Window* pWindow ) // --------------------------------------------------------------------------------------------------------------------- sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getRowAtPoint: no control (anymore)!", -1 ); @@ -92,7 +95,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getRowAtPoint(::sal_Int32 x, ::sal_Int32 y) // --------------------------------------------------------------------------------------------------------------------- sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 y) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getColumnAtPoint: no control (anymore)!", -1 ); @@ -104,7 +107,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getColumnAtPoint(::sal_Int32 x, ::sal_Int32 // --------------------------------------------------------------------------------------------------------------------- sal_Int32 SAL_CALL SVTXGridControl::getCurrentColumn( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentColumn: no control (anymore)!", -1 ); @@ -116,7 +119,7 @@ sal_Int32 SAL_CALL SVTXGridControl::getCurrentColumn( ) throw (RuntimeException // --------------------------------------------------------------------------------------------------------------------- sal_Int32 SAL_CALL SVTXGridControl::getCurrentRow( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getCurrentRow: no control (anymore)!", -1 ); @@ -140,7 +143,7 @@ void SAL_CALL SVTXGridControl::removeSelectionListener(const ::com::sun::star::u // --------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const Any& aValue) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable != NULL, "SVTXGridControl::setProperty: no control (anymore)!" ); @@ -383,7 +386,7 @@ namespace Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getProperty: no control (anymore)!", Any() ); @@ -513,7 +516,7 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::rowsInserted( const GridDataEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; m_pTableModel->notifyRowsInserted( i_event ); } @@ -521,14 +524,14 @@ void SAL_CALL SVTXGridControl::rowsInserted( const GridDataEvent& i_event ) thro void SAL_CALL//---------------------------------------------------------------------------------------------------------------------- SVTXGridControl::rowsRemoved( const GridDataEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; m_pTableModel->notifyRowsRemoved( i_event ); } //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; m_pTableModel->notifyDataChanged( i_event ); @@ -542,7 +545,7 @@ void SAL_CALL SVTXGridControl::dataChanged( const GridDataEvent& i_event ) throw //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; OSL_UNUSED( i_event ); TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); @@ -555,7 +558,7 @@ void SAL_CALL SVTXGridControl::rowHeadingChanged( const GridDataEvent& i_event ) //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Reference< XGridColumn > const xGridColumn( i_event.Element, UNO_QUERY_THROW ); @@ -567,7 +570,7 @@ void SAL_CALL SVTXGridControl::elementInserted( const ContainerEvent& i_event ) //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::elementRemoved( const ContainerEvent& i_event ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; sal_Int32 nIndex( -1 ); OSL_VERIFY( i_event.Accessor >>= nIndex ); @@ -593,7 +596,7 @@ void SAL_CALL SVTXGridControl::disposing( const ::com::sun::star::lang::EventObj //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectRow: no control (anymore)!" ); @@ -604,7 +607,7 @@ void SAL_CALL SVTXGridControl::selectRow( ::sal_Int32 i_rowIndex ) throw (::com: //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::selectAllRows: no control (anymore)!" ); @@ -615,7 +618,7 @@ void SAL_CALL SVTXGridControl::selectAllRows() throw (::com::sun::star::uno::Run //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectRow: no control (anymore)!" ); @@ -626,7 +629,7 @@ void SAL_CALL SVTXGridControl::deselectRow( ::sal_Int32 i_rowIndex ) throw (::co //---------------------------------------------------------------------------------------------------------------------- void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN_VOID( pTable, "SVTXGridControl::deselectAllRows: no control (anymore)!" ); @@ -637,7 +640,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R //---------------------------------------------------------------------------------------------------------------------- ::com::sun::star::uno::Sequence< ::sal_Int32 > SAL_CALL SVTXGridControl::getSelection() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", Sequence< sal_Int32 >() ); @@ -652,7 +655,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R //---------------------------------------------------------------------------------------------------------------------- ::sal_Bool SAL_CALL SVTXGridControl::isSelectionEmpty() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable, "SVTXGridControl::getSelection: no control (anymore)!", sal_True ); @@ -663,7 +666,7 @@ void SAL_CALL SVTXGridControl::deselectAllRows() throw (::com::sun::star::uno::R //---------------------------------------------------------------------------------------------------------------------- ::sal_Bool SAL_CALL SVTXGridControl::isSelectedIndex( ::sal_Int32 index ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable, "SVTXGridControl::isSelectedIndex: no control (anymore)!", sal_False ); @@ -683,7 +686,7 @@ void SVTXGridControl::dispose() throw(::com::sun::star::uno::RuntimeException) //---------------------------------------------------------------------------------------------------------------------- void SVTXGridControl::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow > xKeepAlive( this ); switch ( rVclWindowEvent.GetId() ) @@ -778,3 +781,4 @@ void SVTXGridControl::impl_updateColumnsFromModel_nothrow() } } +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/svtxgridcontrol.hxx b/svtools/source/uno/svtxgridcontrol.hxx index 525327b3c760..6e4eb807667e 100755..100644 --- a/svtools/source/uno/svtxgridcontrol.hxx +++ b/svtools/source/uno/svtxgridcontrol.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -117,3 +118,5 @@ private: void impl_checkTableModelInit(); }; #endif // _SVT_GRIDCONTROL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx index 254dbae12f68..110a9d3f4ce5 100644 --- a/svtools/source/uno/toolboxcontroller.cxx +++ b/svtools/source/uno/toolboxcontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -33,7 +34,7 @@ #include <com/sun/star/frame/XDispatchProvider.hpp> #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/frame/XLayoutManager.hpp> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <svtools/imgdef.hxx> #include <svtools/miscopt.hxx> @@ -136,13 +137,13 @@ ToolboxController::~ToolboxController() Reference< XFrame > ToolboxController::getFrameInterface() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; return m_xFrame; } Reference< XMultiServiceFactory > ToolboxController::getServiceManager() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; return m_xServiceManager; } @@ -151,7 +152,7 @@ Reference< XLayoutManager > ToolboxController::getLayoutManager() const Reference< XLayoutManager > xLayoutManager; Reference< XPropertySet > xPropSet; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; xPropSet = Reference< XPropertySet >( m_xFrame, UNO_QUERY ); } @@ -209,7 +210,7 @@ throw ( Exception, RuntimeException ) bool bInitialized( true ); { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -219,7 +220,7 @@ throw ( Exception, RuntimeException ) if ( !bInitialized ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; m_bInitialized = sal_True; //shizhoubo add m_bSupportVisiable = sal_False; @@ -261,7 +262,7 @@ void SAL_CALL ToolboxController::update() throw ( RuntimeException ) { { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); } @@ -277,7 +278,7 @@ throw (::com::sun::star::uno::RuntimeException) Reference< XComponent > xThis( static_cast< OWeakObject* >(this), UNO_QUERY ); { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); } @@ -285,7 +286,7 @@ throw (::com::sun::star::uno::RuntimeException) com::sun::star::lang::EventObject aEvent( xThis ); m_aListenerContainer.disposeAndClear( aEvent ); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; Reference< XStatusListener > xStatusListener( static_cast< OWeakObject* >( this ), UNO_QUERY ); URLToDispatchMap::iterator pIter = m_aListenerMap.begin(); while ( pIter != m_aListenerMap.end() ) @@ -330,7 +331,7 @@ throw ( RuntimeException ) { Reference< XInterface > xSource( Source.Source ); - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) return; @@ -365,7 +366,7 @@ throw (::com::sun::star::uno::RuntimeException) ::rtl::OUString aCommandURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( m_bDisposed ) throw DisposedException(); @@ -434,7 +435,7 @@ void ToolboxController::addStatusListener( const rtl::OUString& aCommandURL ) com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); // Already in the list of status listener. Do nothing. @@ -445,7 +446,7 @@ void ToolboxController::addStatusListener( const rtl::OUString& aCommandURL ) // intialize is called. if ( !m_bInitialized ) { - // Put into the hash_map of status listener. Will be activated when initialized is called + // Put into the boost::unordered_map of status listener. Will be activated when initialized is called m_aListenerMap.insert( URLToDispatchMap::value_type( aCommandURL, Reference< XDispatch >() )); return; } @@ -495,7 +496,7 @@ void ToolboxController::addStatusListener( const rtl::OUString& aCommandURL ) void ToolboxController::removeStatusListener( const rtl::OUString& aCommandURL ) { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; URLToDispatchMap::iterator pIter = m_aListenerMap.find( aCommandURL ); if ( pIter != m_aListenerMap.end() ) @@ -526,7 +527,7 @@ void ToolboxController::bindListener() Reference< XStatusListener > xStatusListener; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -615,7 +616,7 @@ void ToolboxController::bindListener() void ToolboxController::unbindListener() { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -654,7 +655,7 @@ void ToolboxController::unbindListener() sal_Bool ToolboxController::isBound() const { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return sal_False; @@ -671,22 +672,6 @@ sal_Bool ToolboxController::hasBigImages() const return SvtMiscOptions().AreCurrentSymbolsLarge(); } -sal_Bool ToolboxController::isHighContrast() const -{ - sal_Bool bHighContrast( sal_False ); - - Reference< XWindow > xWindow = m_pImpl->m_xParentWindow; - if ( xWindow.is() ) - { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); - Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); - if ( pWindow ) - bHighContrast = ( ((ToolBox *)pWindow)->GetSettings().GetStyleSettings().GetHighContrastMode() ); - } - - return bHighContrast; -} - void ToolboxController::updateStatus() { bindListener(); @@ -699,7 +684,7 @@ void ToolboxController::updateStatus( const rtl::OUString aCommandURL ) com::sun::star::util::URL aTargetURL; { - vos::OGuard aSolarMutexGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarMutexGuard; if ( !m_bInitialized ) return; @@ -881,3 +866,5 @@ bool ToolboxController::getToolboxId( sal_uInt16& rItemId, ToolBox** ppToolBox ) //end } // svt + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx index c36368023a22..e3cf909ea31c 100644 --- a/svtools/source/uno/treecontrolpeer.cxx +++ b/svtools/source/uno/treecontrolpeer.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -42,6 +43,7 @@ #include <rtl/ref.hxx> #include <vcl/graph.hxx> +#include <vcl/svapp.hxx> #include <svtools/svtreebx.hxx> #include <map> @@ -486,7 +488,7 @@ UnoTreeListBoxImpl& TreeControlPeer::getTreeListBoxOrThrow() const throw (Runtim void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect, bool bSetSelection ) throw( RuntimeException, IllegalArgumentException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -548,7 +550,7 @@ void TreeControlPeer::ChangeNodesSelection( const Any& rSelection, bool bSelect, sal_Bool SAL_CALL TreeControlPeer::select( const Any& rSelection ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ChangeNodesSelection( rSelection, true, true ); return sal_True; } @@ -557,7 +559,7 @@ sal_Bool SAL_CALL TreeControlPeer::select( const Any& rSelection ) throw (Illega Any SAL_CALL TreeControlPeer::getSelection() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -624,7 +626,7 @@ void SAL_CALL TreeControlPeer::removeSelection( const Any& rSelection ) throw (I void SAL_CALL TreeControlPeer::clearSelection() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; getTreeListBoxOrThrow().SelectAll( sal_False ); } @@ -632,7 +634,7 @@ void SAL_CALL TreeControlPeer::clearSelection() throw (RuntimeException) sal_Int32 SAL_CALL TreeControlPeer::getSelectionCount() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return getTreeListBoxOrThrow().GetSelectionCount(); } @@ -678,7 +680,7 @@ Any SAL_CALL TreeSelectionEnumeration::nextElement() throw (NoSuchElementExcepti Reference< XEnumeration > SAL_CALL TreeControlPeer::createSelectionEnumeration() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -702,7 +704,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createSelectionEnumeration() Reference< XEnumeration > SAL_CALL TreeControlPeer::createReverseSelectionEnumeration() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -728,7 +730,7 @@ Reference< XEnumeration > SAL_CALL TreeControlPeer::createReverseSelectionEnumer OUString SAL_CALL TreeControlPeer::getDefaultExpandedGraphicURL() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return msDefaultExpandedGraphicURL; } @@ -736,7 +738,7 @@ OUString SAL_CALL TreeControlPeer::getDefaultExpandedGraphicURL() throw (::com:: void SAL_CALL TreeControlPeer::setDefaultExpandedGraphicURL( const ::rtl::OUString& sDefaultExpandedGraphicURL ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( msDefaultExpandedGraphicURL != sDefaultExpandedGraphicURL ) { if( sDefaultExpandedGraphicURL.getLength() ) @@ -766,7 +768,7 @@ void SAL_CALL TreeControlPeer::setDefaultExpandedGraphicURL( const ::rtl::OUStri OUString SAL_CALL TreeControlPeer::getDefaultCollapsedGraphicURL() throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return msDefaultCollapsedGraphicURL; } @@ -774,7 +776,7 @@ OUString SAL_CALL TreeControlPeer::getDefaultCollapsedGraphicURL() throw (::com: void SAL_CALL TreeControlPeer::setDefaultCollapsedGraphicURL( const ::rtl::OUString& sDefaultCollapsedGraphicURL ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( msDefaultCollapsedGraphicURL != sDefaultCollapsedGraphicURL ) { if( sDefaultCollapsedGraphicURL.getLength() ) @@ -804,7 +806,7 @@ void SAL_CALL TreeControlPeer::setDefaultCollapsedGraphicURL( const ::rtl::OUStr sal_Bool SAL_CALL TreeControlPeer::isNodeExpanded( const Reference< XTreeNode >& xNode ) throw (RuntimeException, IllegalArgumentException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); @@ -815,7 +817,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeExpanded( const Reference< XTreeNode >& sal_Bool SAL_CALL TreeControlPeer::isNodeCollapsed( const Reference< XTreeNode >& xNode ) throw (RuntimeException, IllegalArgumentException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return !isNodeExpanded( xNode ); } @@ -823,7 +825,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeCollapsed( const Reference< XTreeNode > void SAL_CALL TreeControlPeer::makeNodeVisible( const Reference< XTreeNode >& xNode ) throw (RuntimeException, ExpandVetoException, IllegalArgumentException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); @@ -835,7 +837,7 @@ void SAL_CALL TreeControlPeer::makeNodeVisible( const Reference< XTreeNode >& xN sal_Bool SAL_CALL TreeControlPeer::isNodeVisible( const Reference< XTreeNode >& xNode ) throw (RuntimeException, IllegalArgumentException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); @@ -846,7 +848,7 @@ sal_Bool SAL_CALL TreeControlPeer::isNodeVisible( const Reference< XTreeNode >& void SAL_CALL TreeControlPeer::expandNode( const Reference< XTreeNode >& xNode ) throw (RuntimeException, ExpandVetoException, IllegalArgumentException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); @@ -858,7 +860,7 @@ void SAL_CALL TreeControlPeer::expandNode( const Reference< XTreeNode >& xNode ) void SAL_CALL TreeControlPeer::collapseNode( const Reference< XTreeNode >& xNode ) throw (RuntimeException, ExpandVetoException, IllegalArgumentException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); @@ -884,7 +886,7 @@ void SAL_CALL TreeControlPeer::removeTreeExpansionListener( const Reference< XTr Reference< XTreeNode > SAL_CALL TreeControlPeer::getNodeForLocation( sal_Int32 x, sal_Int32 y ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -902,7 +904,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getNodeForLocation( sal_Int32 x Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_Int32 x, sal_Int32 y ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -920,7 +922,7 @@ Reference< XTreeNode > SAL_CALL TreeControlPeer::getClosestNodeForLocation( sal_ awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode >& i_Node ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( i_Node, true ); @@ -933,7 +935,7 @@ awt::Rectangle SAL_CALL TreeControlPeer::getNodeRect( const Reference< XTreeNode sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); return rTree.IsEditingActive() ? sal_True : sal_False; @@ -943,7 +945,7 @@ sal_Bool SAL_CALL TreeControlPeer::isEditing( ) throw (RuntimeException) sal_Bool SAL_CALL TreeControlPeer::stopEditing() throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); if( rTree.IsEditingActive() ) @@ -961,7 +963,7 @@ sal_Bool SAL_CALL TreeControlPeer::stopEditing() throw (RuntimeException) void SAL_CALL TreeControlPeer::cancelEditing( ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); rTree.EndEditing(sal_False); @@ -971,7 +973,7 @@ void SAL_CALL TreeControlPeer::cancelEditing( ) throw (RuntimeException) void SAL_CALL TreeControlPeer::startEditingAtNode( const Reference< XTreeNode >& xNode ) throw (IllegalArgumentException, RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); UnoTreeListEntry* pEntry = getEntry( xNode ); @@ -1041,7 +1043,7 @@ bool TreeControlPeer::onEditedEntry( UnoTreeListEntry* pEntry, const XubString& void SAL_CALL TreeControlPeer::treeNodesChanged( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mnEditLock != 0 ) return; @@ -1051,7 +1053,7 @@ void SAL_CALL TreeControlPeer::treeNodesChanged( const ::com::sun::star::awt::tr void SAL_CALL TreeControlPeer::treeNodesInserted( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mnEditLock != 0 ) return; @@ -1061,7 +1063,7 @@ void SAL_CALL TreeControlPeer::treeNodesInserted( const ::com::sun::star::awt::t void SAL_CALL TreeControlPeer::treeNodesRemoved( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mnEditLock != 0 ) return; @@ -1071,7 +1073,7 @@ void SAL_CALL TreeControlPeer::treeNodesRemoved( const ::com::sun::star::awt::tr void SAL_CALL TreeControlPeer::treeStructureChanged( const ::com::sun::star::awt::tree::TreeDataModelEvent& rEvent ) throw (RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if( mnEditLock != 0 ) return; @@ -1241,7 +1243,7 @@ OUString TreeControlPeer::getEntryString( const Any& rValue ) void SAL_CALL TreeControlPeer::disposing( const ::com::sun::star::lang::EventObject& ) throw(::com::sun::star::uno::RuntimeException) { // model is disposed, so we clear our tree - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); rTree.Clear(); mxDataModel.clear(); @@ -1281,7 +1283,7 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere ::com::sun::star::awt::Size TreeControlPeer::getMinimumSize() throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz; /* todo @@ -1299,7 +1301,7 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere ::com::sun::star::awt::Size TreeControlPeer::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz = rNewSize; /* todo @@ -1316,7 +1318,7 @@ void TreeControlPeer::onChangeDataModel( UnoTreeListBoxImpl& rTree, const Refere void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const Any& aValue) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; UnoTreeListBoxImpl& rTree = getTreeListBoxOrThrow(); @@ -1419,7 +1421,7 @@ void TreeControlPeer::setProperty( const ::rtl::OUString& PropertyName, const An Any TreeControlPeer::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; const sal_uInt16 nPropId = GetPropertyId( PropertyName ); if( (nPropId >= BASEPROPERTY_TREE_START) && (nPropId <= BASEPROPERTY_TREE_END) ) @@ -1763,3 +1765,5 @@ UnoTreeListEntry::~UnoTreeListEntry() if( mpPeer ) mpPeer->removeEntry( this ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/treecontrolpeer.hxx b/svtools/source/uno/treecontrolpeer.hxx index 66ab96c60ff1..4c13acde8648 100644 --- a/svtools/source/uno/treecontrolpeer.hxx +++ b/svtools/source/uno/treecontrolpeer.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -37,7 +38,6 @@ #include <vcl/image.hxx> -//#include <comphelper/uno3.hxx> #include <cppuhelper/implbase2.hxx> @@ -172,3 +172,5 @@ private: }; #endif // _TREE_CONTROL_PEER_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index 933363115810..73085561e542 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -46,7 +47,7 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> // ..................................................................................................................... namespace svt { namespace table @@ -891,3 +892,4 @@ namespace svt { namespace table // ..................................................................................................................... } } // svt::table // ..................................................................................................................... +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index 537c3d9a5249..d804ca0f03b4 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -165,3 +166,5 @@ namespace svt { namespace table // ..................................................................................................................... #endif // _UNOCONTROL_TABLEMODEL_HXX_ + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/unoevent.cxx b/svtools/source/uno/unoevent.cxx index 0f8bc91d9927..f06f809af319 100644 --- a/svtools/source/uno/unoevent.cxx +++ b/svtools/source/uno/unoevent.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -279,7 +280,7 @@ void SvBaseEventDescriptor::getAnyFromMacro(Any& rAny, } case JAVASCRIPT: default: - DBG_ERROR("not implemented"); + OSL_FAIL("not implemented"); } } // else: bRetValueOK not set @@ -604,3 +605,4 @@ void SvMacroTableEventDescriptor::copyMacrosIntoTable( +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/unogridcolumnfacade.cxx b/svtools/source/uno/unogridcolumnfacade.cxx index d2f5e7b565fd..5f1286b90ed6 100755..100644 --- a/svtools/source/uno/unogridcolumnfacade.cxx +++ b/svtools/source/uno/unogridcolumnfacade.cxx @@ -44,7 +44,7 @@ #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> // ..................................................................................................................... namespace svt { namespace table @@ -150,7 +150,7 @@ namespace svt { namespace table { if ( i_event.AttributeName.equalsAscii( "DataColumnIndex" ) ) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_pColumnImplementation != NULL ) m_pColumnImplementation->dataColumnIndexChanged(); return; @@ -173,7 +173,7 @@ namespace svt { namespace table OSL_ENSURE( nChangedAttributes != COL_ATTRS_NONE, "ColumnChangeMultiplexer::columnChanged: unknown column attributed changed!" ); - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; if ( m_pColumnImplementation != NULL ) m_pColumnImplementation->columnChanged( nChangedAttributes ); } diff --git a/svtools/source/uno/unogridcolumnfacade.hxx b/svtools/source/uno/unogridcolumnfacade.hxx index 7499621ba8af..7499621ba8af 100755..100644 --- a/svtools/source/uno/unogridcolumnfacade.hxx +++ b/svtools/source/uno/unogridcolumnfacade.hxx diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 18af2c696a8c..d2cf9cbf12cf 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -224,7 +225,7 @@ void VCLXMultiLineEdit::removeTextListener( const ::com::sun::star::uno::Referen void VCLXMultiLineEdit::setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow(); if ( pEdit ) @@ -241,7 +242,7 @@ void VCLXMultiLineEdit::setText( const ::rtl::OUString& aText ) throw(::com::sun void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow(); if ( pEdit ) @@ -253,7 +254,7 @@ void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel ::rtl::OUString VCLXMultiLineEdit::getText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow(); @@ -264,7 +265,7 @@ void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel ::rtl::OUString VCLXMultiLineEdit::getSelectedText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); @@ -276,7 +277,7 @@ void VCLXMultiLineEdit::insertText( const ::com::sun::star::awt::Selection& rSel void VCLXMultiLineEdit::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); if ( pMultiLineEdit ) @@ -287,7 +288,7 @@ void VCLXMultiLineEdit::setSelection( const ::com::sun::star::awt::Selection& aS ::com::sun::star::awt::Selection VCLXMultiLineEdit::getSelection() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Selection aSel; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); @@ -301,7 +302,7 @@ void VCLXMultiLineEdit::setSelection( const ::com::sun::star::awt::Selection& aS sal_Bool VCLXMultiLineEdit::isEditable() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); return ( pMultiLineEdit && !pMultiLineEdit->IsReadOnly() && pMultiLineEdit->IsEnabled() ) ? sal_True : sal_False; @@ -309,7 +310,7 @@ sal_Bool VCLXMultiLineEdit::isEditable() throw(::com::sun::star::uno::RuntimeExc void VCLXMultiLineEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); if ( pMultiLineEdit ) @@ -318,7 +319,7 @@ void VCLXMultiLineEdit::setEditable( sal_Bool bEditable ) throw(::com::sun::star void VCLXMultiLineEdit::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); if ( pMultiLineEdit ) @@ -327,7 +328,7 @@ void VCLXMultiLineEdit::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star:: sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*) GetWindow(); return pMultiLineEdit ? (sal_Int16)pMultiLineEdit->GetMaxTextLen() : (sal_Int16)0; @@ -335,7 +336,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim ::rtl::OUString VCLXMultiLineEdit::getTextLines() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; MultiLineEdit* pEdit = (MultiLineEdit*)GetWindow(); @@ -346,7 +347,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim ::com::sun::star::awt::Size VCLXMultiLineEdit::getMinimumSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz; MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow(); @@ -362,7 +363,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim ::com::sun::star::awt::Size VCLXMultiLineEdit::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz = rNewSize; MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow(); @@ -373,7 +374,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim ::com::sun::star::awt::Size VCLXMultiLineEdit::getMinimumSize( sal_Int16 nCols, sal_Int16 nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz; MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow(); @@ -384,7 +385,7 @@ sal_Int16 VCLXMultiLineEdit::getMaxTextLen() throw(::com::sun::star::uno::Runtim void VCLXMultiLineEdit::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; nCols = nLines = 0; MultiLineEdit* pEdit = (MultiLineEdit*) GetWindow(); @@ -421,7 +422,7 @@ void VCLXMultiLineEdit::ProcessWindowEvent( const VclWindowEvent& rVclWindowEven void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*)GetWindow(); if ( pMultiLineEdit ) @@ -438,7 +439,7 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const case ::com::sun::star::awt::LineEndFormat::CARRIAGE_RETURN: meLineEndType = LINEEND_CR; break; case ::com::sun::star::awt::LineEndFormat::LINE_FEED: meLineEndType = LINEEND_LF; break; case ::com::sun::star::awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED: meLineEndType = LINEEND_CRLF; break; - default: DBG_ERROR( "VCLXMultiLineEdit::setProperty: invalid line end value!" ); break; + default: OSL_FAIL( "VCLXMultiLineEdit::setProperty: invalid line end value!" ); break; } } break; @@ -477,7 +478,7 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any VCLXMultiLineEdit::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; MultiLineEdit* pMultiLineEdit = (MultiLineEdit*)GetWindow(); @@ -494,7 +495,7 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const case LINEEND_CR: nLineEndType = ::com::sun::star::awt::LineEndFormat::CARRIAGE_RETURN; break; case LINEEND_LF: nLineEndType = ::com::sun::star::awt::LineEndFormat::LINE_FEED; break; case LINEEND_CRLF: nLineEndType = ::com::sun::star::awt::LineEndFormat::CARRIAGE_RETURN_LINE_FEED; break; - default: DBG_ERROR( "VCLXMultiLineEdit::getProperty: invalid line end value!" ); break; + default: OSL_FAIL( "VCLXMultiLineEdit::getProperty: invalid line end value!" ); break; } aProp <<= nLineEndType; } @@ -521,13 +522,13 @@ void VCLXMultiLineEdit::setProperty( const ::rtl::OUString& PropertyName, const void SAL_CALL VCLXMultiLineEdit::setFocus( ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; // don't grab the focus if we already have it. Reason is that the only thing which the edit // does is forwarding the focus to it's text window. This text window then does a "select all". // So if the text window already has the focus, and we give the focus to the multi line // edit, then all which happens is that everything is selected. - // #i27072# - 2004-04-25 - fs@openoffice.org + // #i27072# if ( GetWindow() && !GetWindow()->HasChildPathFocus() ) GetWindow()->GrabFocus(); } @@ -576,7 +577,7 @@ IMPL_XTYPEPROVIDER_END void SAL_CALL VCLXFileControl::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pControl = (FileControl*)GetWindow(); if ( pControl ) @@ -626,7 +627,7 @@ void VCLXFileControl::removeTextListener( const ::com::sun::star::uno::Reference void VCLXFileControl::setText( const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -641,7 +642,7 @@ void VCLXFileControl::setText( const ::rtl::OUString& aText ) throw(::com::sun:: void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel, const ::rtl::OUString& aText ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pFileControl = (FileControl*) GetWindow(); if ( pFileControl ) @@ -653,7 +654,7 @@ void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel, ::rtl::OUString VCLXFileControl::getText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; Window* pWindow = GetWindow(); @@ -664,7 +665,7 @@ void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel, ::rtl::OUString VCLXFileControl::getSelectedText() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::rtl::OUString aText; FileControl* pFileControl = (FileControl*) GetWindow(); @@ -676,7 +677,7 @@ void VCLXFileControl::insertText( const ::com::sun::star::awt::Selection& rSel, void VCLXFileControl::setSelection( const ::com::sun::star::awt::Selection& aSelection ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pFileControl = (FileControl*) GetWindow(); if ( pFileControl ) @@ -685,7 +686,7 @@ void VCLXFileControl::setSelection( const ::com::sun::star::awt::Selection& aSel ::com::sun::star::awt::Selection VCLXFileControl::getSelection() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Selection aSel; FileControl* pFileControl = (FileControl*) GetWindow(); @@ -699,7 +700,7 @@ void VCLXFileControl::setSelection( const ::com::sun::star::awt::Selection& aSel sal_Bool VCLXFileControl::isEditable() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pFileControl = (FileControl*) GetWindow(); return ( pFileControl && !pFileControl->GetEdit().IsReadOnly() && pFileControl->GetEdit().IsEnabled() ) ? sal_True : sal_False; @@ -707,7 +708,7 @@ sal_Bool VCLXFileControl::isEditable() throw(::com::sun::star::uno::RuntimeExcep void VCLXFileControl::setEditable( sal_Bool bEditable ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pFileControl = (FileControl*) GetWindow(); if ( pFileControl ) @@ -716,7 +717,7 @@ void VCLXFileControl::setEditable( sal_Bool bEditable ) throw(::com::sun::star:: void VCLXFileControl::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pFileControl = (FileControl*) GetWindow(); if ( pFileControl ) @@ -725,7 +726,7 @@ void VCLXFileControl::setMaxTextLen( sal_Int16 nLen ) throw(::com::sun::star::un sal_Int16 VCLXFileControl::getMaxTextLen() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FileControl* pFileControl = (FileControl*) GetWindow(); return pFileControl ? pFileControl->GetEdit().GetMaxTextLen() : 0; @@ -743,7 +744,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG ) ::com::sun::star::awt::Size VCLXFileControl::getMinimumSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz; FileControl* pControl = (FileControl*) GetWindow(); @@ -765,7 +766,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG ) ::com::sun::star::awt::Size VCLXFileControl::calcAdjustedSize( const ::com::sun::star::awt::Size& rNewSize ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz =rNewSize; FileControl* pControl = (FileControl*) GetWindow(); @@ -780,7 +781,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG ) ::com::sun::star::awt::Size VCLXFileControl::getMinimumSize( sal_Int16 nCols, sal_Int16 ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::awt::Size aSz; FileControl* pControl = (FileControl*) GetWindow(); @@ -794,7 +795,7 @@ IMPL_LINK( VCLXFileControl, ModifyHdl, Edit*, EMPTYARG ) void VCLXFileControl::getColumnsAndLines( sal_Int16& nCols, sal_Int16& nLines ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; nCols = 0; nLines = 1; @@ -845,7 +846,7 @@ void SVTXFormattedField::SetWindow( Window* _pWindow ) // -------------------------------------------------------------------------------------- void SVTXFormattedField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -970,7 +971,7 @@ void SVTXFormattedField::setProperty( const ::rtl::OUString& PropertyName, const // -------------------------------------------------------------------------------------- ::com::sun::star::uno::Any SVTXFormattedField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aReturn; @@ -1431,7 +1432,7 @@ void SVTXRoadmap::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) { case VCLEVENT_ROADMAP_ITEMSELECTED: { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::svt::ORoadmap* pField = GetRoadmap(); if ( pField ) { @@ -1453,7 +1454,7 @@ void SVTXRoadmap::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ) void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeEvent& evt ) throw (::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::svt::ORoadmap* pField = GetRoadmap(); if ( pField ) { @@ -1461,25 +1462,25 @@ void SVTXRoadmap::propertyChange( const ::com::sun::star::beans::PropertyChangeE xRoadmapItem = evt.Source; sal_Int32 nID = 0; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY ); - ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "ID" )); + ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" ))); aValue >>= nID; ::com::sun::star::uno::Any rVal = evt.NewValue; evt.NewValue >>= rVal; ::rtl::OUString sPropertyName = evt.PropertyName; - if ( sPropertyName.equals(::rtl::OUString::createFromAscii( "Enabled" ) ) ) + if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" )) ) ) { sal_Bool bEnable = false; evt.NewValue >>= bEnable; pField->EnableRoadmapItem( (RoadmapTypes::ItemId)nID , bEnable ); } - else if ( sPropertyName.equals(::rtl::OUString::createFromAscii( "Label" ) ) ) + else if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" )) ) ) { ::rtl::OUString sLabel; evt.NewValue >>= sLabel; pField->ChangeRoadmapItemLabel( (RoadmapTypes::ItemId)nID , sLabel ); } - else if ( sPropertyName.equals(::rtl::OUString::createFromAscii( "ID" ) ) ) + else if ( sPropertyName.equals(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" )) ) ) { sal_Int32 nNewID = 0; evt.NewValue >>= nNewID; @@ -1510,11 +1511,11 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropertySet( xRoadmapItem, ::com::sun::star::uno::UNO_QUERY ); if ( xPropertySet.is() ) { - ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "Label" )); + ::com::sun::star::uno::Any aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Label" ))); aValue >>= aCurRMItemData.Label; - aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "ID" )); + aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "ID" ))); aValue >>= aCurRMItemData.n_ID; - aValue = xPropertySet->getPropertyValue(::rtl::OUString::createFromAscii( "Enabled" )); + aValue = xPropertySet->getPropertyValue(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Enabled" ))); aValue >>= aCurRMItemData.b_Enabled; } return aCurRMItemData;; @@ -1522,7 +1523,7 @@ RMItemData SVTXRoadmap::GetRMItemData( const ::com::sun::star::container::Contai void SVTXRoadmap::elementInserted( const ::com::sun::star::container::ContainerEvent& _rEvent )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::svt::ORoadmap* pField = GetRoadmap(); if ( pField ) { @@ -1535,21 +1536,19 @@ void SVTXRoadmap::elementInserted( const ::com::sun::star::container::ContainerE void SVTXRoadmap::elementRemoved( const ::com::sun::star::container::ContainerEvent& _rEvent )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::svt::ORoadmap* pField = GetRoadmap(); if ( pField ) { sal_Int32 DelIndex = 0; _rEvent.Accessor >>= DelIndex; pField->DeleteRoadmapItem(DelIndex); -// pField->GetCurrentRoadmapItem() -// setProperty(::rtl::OUString.createFromAscii( "CurrentItem" )aAny, } } void SVTXRoadmap::elementReplaced( const ::com::sun::star::container::ContainerEvent& _rEvent )throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::svt::ORoadmap* pField = GetRoadmap(); if ( pField ) { @@ -1565,7 +1564,7 @@ void SVTXRoadmap::elementReplaced( const ::com::sun::star::container::ContainerE // -------------------------------------------------------------------------------------- void SVTXRoadmap::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::svt::ORoadmap* pField = GetRoadmap(); if ( pField ) @@ -1620,7 +1619,7 @@ void SVTXRoadmap::setProperty( const ::rtl::OUString& PropertyName, const ::com: // -------------------------------------------------------------------------------------- ::com::sun::star::uno::Any SVTXRoadmap::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aReturn; @@ -1694,7 +1693,7 @@ IMPL_XTYPEPROVIDER_END void SVTXNumericField::setValue( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1703,7 +1702,7 @@ void SVTXNumericField::setValue( double Value ) throw(::com::sun::star::uno::Run double SVTXNumericField::getValue() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetValue() : 0; @@ -1711,7 +1710,7 @@ double SVTXNumericField::getValue() throw(::com::sun::star::uno::RuntimeExceptio void SVTXNumericField::setMin( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1720,7 +1719,7 @@ void SVTXNumericField::setMin( double Value ) throw(::com::sun::star::uno::Runti double SVTXNumericField::getMin() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetMinValue() : 0; @@ -1728,7 +1727,7 @@ double SVTXNumericField::getMin() throw(::com::sun::star::uno::RuntimeException) void SVTXNumericField::setMax( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1737,7 +1736,7 @@ void SVTXNumericField::setMax( double Value ) throw(::com::sun::star::uno::Runti double SVTXNumericField::getMax() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetMaxValue() : 0; @@ -1745,7 +1744,7 @@ double SVTXNumericField::getMax() throw(::com::sun::star::uno::RuntimeException) void SVTXNumericField::setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1754,7 +1753,7 @@ void SVTXNumericField::setFirst( double Value ) throw(::com::sun::star::uno::Run double SVTXNumericField::getFirst() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetSpinFirst() : 0; @@ -1762,7 +1761,7 @@ double SVTXNumericField::getFirst() throw(::com::sun::star::uno::RuntimeExceptio void SVTXNumericField::setLast( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1771,7 +1770,7 @@ void SVTXNumericField::setLast( double Value ) throw(::com::sun::star::uno::Runt double SVTXNumericField::getLast() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetSpinLast() : 0; @@ -1779,7 +1778,7 @@ double SVTXNumericField::getLast() throw(::com::sun::star::uno::RuntimeException void SVTXNumericField::setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1788,7 +1787,7 @@ void SVTXNumericField::setSpinSize( double Value ) throw(::com::sun::star::uno:: double SVTXNumericField::getSpinSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetSpinSize() : 0; @@ -1796,7 +1795,7 @@ double SVTXNumericField::getSpinSize() throw(::com::sun::star::uno::RuntimeExcep void SVTXNumericField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1805,7 +1804,7 @@ void SVTXNumericField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::sta sal_Int16 SVTXNumericField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetDecimalDigits() : 0; @@ -1813,7 +1812,7 @@ sal_Int16 SVTXNumericField::getDecimalDigits() throw(::com::sun::star::uno::Runt void SVTXNumericField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1822,7 +1821,7 @@ void SVTXNumericField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::sta sal_Bool SVTXNumericField::isStrictFormat() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->IsStrictFormat() : sal_False; @@ -1860,7 +1859,7 @@ IMPL_XTYPEPROVIDER_END void SVTXCurrencyField::setValue( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1869,7 +1868,7 @@ void SVTXCurrencyField::setValue( double Value ) throw(::com::sun::star::uno::Ru double SVTXCurrencyField::getValue() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetValue() : 0; @@ -1877,7 +1876,7 @@ double SVTXCurrencyField::getValue() throw(::com::sun::star::uno::RuntimeExcepti void SVTXCurrencyField::setMin( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1886,7 +1885,7 @@ void SVTXCurrencyField::setMin( double Value ) throw(::com::sun::star::uno::Runt double SVTXCurrencyField::getMin() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetMinValue() : 0; @@ -1894,7 +1893,7 @@ double SVTXCurrencyField::getMin() throw(::com::sun::star::uno::RuntimeException void SVTXCurrencyField::setMax( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1903,7 +1902,7 @@ void SVTXCurrencyField::setMax( double Value ) throw(::com::sun::star::uno::Runt double SVTXCurrencyField::getMax() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetMaxValue() : 0; @@ -1911,7 +1910,7 @@ double SVTXCurrencyField::getMax() throw(::com::sun::star::uno::RuntimeException void SVTXCurrencyField::setFirst( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1920,7 +1919,7 @@ void SVTXCurrencyField::setFirst( double Value ) throw(::com::sun::star::uno::Ru double SVTXCurrencyField::getFirst() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetSpinFirst() : 0; @@ -1928,7 +1927,7 @@ double SVTXCurrencyField::getFirst() throw(::com::sun::star::uno::RuntimeExcepti void SVTXCurrencyField::setLast( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1937,7 +1936,7 @@ void SVTXCurrencyField::setLast( double Value ) throw(::com::sun::star::uno::Run double SVTXCurrencyField::getLast() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetSpinLast() : 0; @@ -1945,7 +1944,7 @@ double SVTXCurrencyField::getLast() throw(::com::sun::star::uno::RuntimeExceptio void SVTXCurrencyField::setSpinSize( double Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1954,7 +1953,7 @@ void SVTXCurrencyField::setSpinSize( double Value ) throw(::com::sun::star::uno: double SVTXCurrencyField::getSpinSize() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetSpinSize() : 0; @@ -1962,7 +1961,7 @@ double SVTXCurrencyField::getSpinSize() throw(::com::sun::star::uno::RuntimeExce void SVTXCurrencyField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1971,7 +1970,7 @@ void SVTXCurrencyField::setDecimalDigits( sal_Int16 Value ) throw(::com::sun::st sal_Int16 SVTXCurrencyField::getDecimalDigits() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->GetDecimalDigits() : 0; @@ -1979,7 +1978,7 @@ sal_Int16 SVTXCurrencyField::getDecimalDigits() throw(::com::sun::star::uno::Run void SVTXCurrencyField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); if ( pField ) @@ -1988,7 +1987,7 @@ void SVTXCurrencyField::setStrictFormat( sal_Bool bStrict ) throw(::com::sun::st sal_Bool SVTXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; FormattedField* pField = GetFormattedField(); return pField ? pField->IsStrictFormat() : sal_False; @@ -1996,7 +1995,7 @@ sal_Bool SVTXCurrencyField::isStrictFormat() throw(::com::sun::star::uno::Runtim void SVTXCurrencyField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aReturn; @@ -2036,7 +2035,7 @@ void SVTXCurrencyField::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any SVTXCurrencyField::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aReturn; @@ -2157,7 +2156,7 @@ IMPL_XTYPEPROVIDER_END // ::com::sun::star::awt::XProgressBar void VCLXProgressBar::setForegroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2169,7 +2168,7 @@ void VCLXProgressBar::setForegroundColor( sal_Int32 nColor ) throw(::com::sun::s void VCLXProgressBar::setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; Window* pWindow = GetWindow(); if ( pWindow ) @@ -2183,7 +2182,7 @@ void VCLXProgressBar::setBackgroundColor( sal_Int32 nColor ) throw(::com::sun::s void VCLXProgressBar::setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; m_nValue = nValue; ImplUpdateValue(); @@ -2191,7 +2190,7 @@ void VCLXProgressBar::setValue( sal_Int32 nValue ) throw(::com::sun::star::uno:: void VCLXProgressBar::setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::sun::star::uno::RuntimeException ) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; if ( nMin < nMax ) { @@ -2211,7 +2210,7 @@ void VCLXProgressBar::setRange( sal_Int32 nMin, sal_Int32 nMax ) throw(::com::su sal_Int32 VCLXProgressBar::getValue() throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; return m_nValue; } @@ -2219,7 +2218,7 @@ sal_Int32 VCLXProgressBar::getValue() throw(::com::sun::star::uno::RuntimeExcept // ::com::sun::star::awt::VclWindowPeer void VCLXProgressBar::setProperty( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Any& Value) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ProgressBar* pProgressBar = (ProgressBar*)GetWindow(); if ( pProgressBar ) @@ -2277,7 +2276,7 @@ void VCLXProgressBar::setProperty( const ::rtl::OUString& PropertyName, const :: ::com::sun::star::uno::Any VCLXProgressBar::getProperty( const ::rtl::OUString& PropertyName ) throw(::com::sun::star::uno::RuntimeException) { - ::vos::OGuard aGuard( GetMutex() ); + SolarMutexGuard aGuard; ::com::sun::star::uno::Any aProp; ProgressBar* pProgressBar = (ProgressBar*)GetWindow(); @@ -2364,3 +2363,5 @@ void SVTXDateField::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) 0); VCLXDateField::ImplGetPropertyIds( rIds ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/unoimap.cxx b/svtools/source/uno/unoimap.cxx index e6a7626b8f4a..4c20ca232902 100644 --- a/svtools/source/uno/unoimap.cxx +++ b/svtools/source/uno/unoimap.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -43,7 +44,7 @@ #include <cppuhelper/implbase3.hxx> #include <list> #include <rtl/uuid.h> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <svtools/unoevent.hxx> #include <svtools/unoimap.hxx> @@ -385,7 +386,7 @@ uno::Sequence< uno::Type > SAL_CALL SvUnoImageMapObject::getTypes() uno::Sequence< sal_Int8 > SAL_CALL SvUnoImageMapObject::getImplementationId() throw (uno::RuntimeException) { - vos::OGuard aGuard( Application::GetSolarMutex() ); + SolarMutexGuard aGuard; static uno::Sequence< sal_Int8 > aId; if( aId.getLength() == 0 ) @@ -487,7 +488,7 @@ void SvUnoImageMapObject::_setPropertyValues( const PropertyMapEntry** ppEntries bOk = *pValues >>= maPolygon; break; default: - DBG_ERROR( "SvUnoImageMapObject::_setPropertyValues: unexpected property handle" ); + OSL_FAIL( "SvUnoImageMapObject::_setPropertyValues: unexpected property handle" ); break; } @@ -537,7 +538,7 @@ void SvUnoImageMapObject::_getPropertyValues( const PropertyMapEntry** ppEntries *pValues <<= maPolygon; break; default: - DBG_ERROR( "SvUnoImageMapObject::_getPropertyValues: unexpected property handle" ); + OSL_FAIL( "SvUnoImageMapObject::_getPropertyValues: unexpected property handle" ); break; } @@ -655,7 +656,7 @@ void SAL_CALL SvUnoImageMap::insertByIndex( sal_Int32 Index, const Any& Element { std::list< SvUnoImageMapObject* >::iterator aIter = maObjectList.begin(); for( sal_Int32 n = 0; n < Index; n++ ) - aIter++; + ++aIter; maObjectList.insert( aIter, pObject ); } @@ -676,7 +677,7 @@ void SAL_CALL SvUnoImageMap::removeByIndex( sal_Int32 Index ) throw(IndexOutOfBo { std::list< SvUnoImageMapObject* >::iterator aIter = maObjectList.begin(); for( sal_Int32 n = 0; n < Index; n++ ) - aIter++; + ++aIter; (*aIter)->release(); maObjectList.erase( aIter ); @@ -693,7 +694,7 @@ void SAL_CALL SvUnoImageMap::replaceByIndex( sal_Int32 Index, const Any& Element std::list< SvUnoImageMapObject* >::iterator aIter = maObjectList.begin(); for( sal_Int32 n = 0; n < Index; n++ ) - aIter++; + ++aIter; (*aIter)->release(); *aIter = pObject; @@ -714,7 +715,7 @@ Any SAL_CALL SvUnoImageMap::getByIndex( sal_Int32 Index ) throw(IndexOutOfBounds std::list< SvUnoImageMapObject* >::iterator aIter = maObjectList.begin(); for( sal_Int32 n = 0; n < Index; n++ ) - aIter++; + ++aIter; Reference< XPropertySet > xObj( *aIter ); return makeAny( xObj ); @@ -773,7 +774,7 @@ sal_Bool SvUnoImageMap::fillImageMap( ImageMap& rMap ) const rMap.InsertIMapObject( *pNewMapObject ); delete pNewMapObject; - aIter++; + ++aIter; } return sal_True; @@ -816,3 +817,5 @@ sal_Bool SvUnoImageMap_fillImageMap( Reference< XInterface > xImageMap, ImageMap return pUnoImageMap->fillImageMap( rMap ); } + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/unowizard.hxx b/svtools/source/uno/unowizard.hxx index ceb8fac14eb6..f56a23024f5c 100644 --- a/svtools/source/uno/unowizard.hxx +++ b/svtools/source/uno/unowizard.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -115,3 +116,5 @@ namespace svt { namespace uno //...................................................................................................................... #endif // SVT_UNO_WIZARD_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/wizard/unowizard.cxx b/svtools/source/uno/wizard/unowizard.cxx index ea147c5979d3..e8d7adaf58a2 100644 --- a/svtools/source/uno/wizard/unowizard.cxx +++ b/svtools/source/uno/wizard/unowizard.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -40,7 +41,7 @@ #include <tools/diagnose_ex.h> #include <rtl/strbuf.hxx> -#include <vos/mutex.hxx> +#include <osl/mutex.hxx> #include <vcl/svapp.hxx> #include <tools/urlobj.hxx> @@ -91,7 +92,7 @@ namespace svt { namespace uno case WizardButton::CANCEL: return WZB_CANCEL; case WizardButton::HELP: return WZB_HELP; } - OSL_ENSURE( false, "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" ); + OSL_FAIL( "lcl_convertWizardButtonToWZB: invalid WizardButton constant!" ); return WZB_NONE; } } @@ -295,7 +296,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ ::rtl::OUString SAL_CALL Wizard::getHelpURL() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_pDialog ) @@ -307,7 +308,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::setHelpURL( const ::rtl::OUString& i_HelpURL ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); if ( !m_pDialog ) @@ -319,7 +320,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ Reference< XWindow > SAL_CALL Wizard::getDialogWindow() throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); ENSURE_OR_RETURN( m_pDialog, "Wizard::getDialogWindow: illegal call (execution did not start, yet)!", NULL ); @@ -329,7 +330,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::enableButton( ::sal_Int16 i_WizardButton, ::sal_Bool i_Enable ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -341,7 +342,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::setDefaultButton( ::sal_Int16 i_WizardButton ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -353,7 +354,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ sal_Bool SAL_CALL Wizard::travelNext( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -365,7 +366,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ sal_Bool SAL_CALL Wizard::travelPrevious( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -377,7 +378,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::enablePage( ::sal_Int16 i_PageID, ::sal_Bool i_Enable ) throw (NoSuchElementException, InvalidStateException, RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -395,7 +396,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::updateTravelUI( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -407,7 +408,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ ::sal_Bool SAL_CALL Wizard::advanceTo( ::sal_Int16 i_PageId ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -419,7 +420,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ ::sal_Bool SAL_CALL Wizard::goBackTo( ::sal_Int16 i_PageId ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -431,7 +432,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ Reference< XWizardPage > SAL_CALL Wizard::getCurrentPage( ) throw (RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); WizardShell* pWizardImpl = dynamic_cast< WizardShell* >( m_pDialog ); @@ -443,7 +444,7 @@ namespace svt { namespace uno //------------------------------------------------------------------------------------------------------------------ void SAL_CALL Wizard::activatePath( ::sal_Int16 i_PathIndex, ::sal_Bool i_Final ) throw (NoSuchElementException, InvalidStateException, RuntimeException) { - ::vos::OGuard aSolarGuard( Application::GetSolarMutex() ); + SolarMutexGuard aSolarGuard; ::osl::MutexGuard aGuard( m_aMutex ); if ( ( i_PathIndex < 0 ) || ( i_PathIndex >= m_aWizardSteps.getLength() ) ) @@ -471,3 +472,5 @@ namespace svt { namespace uno //...................................................................................................................... } } // namespace svt::uno //...................................................................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/wizard/wizardpagecontroller.cxx b/svtools/source/uno/wizard/wizardpagecontroller.cxx index 6bc01c76da4a..eec2fe98dfde 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.cxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -188,3 +189,5 @@ namespace svt { namespace uno //...................................................................................................................... } } // namespace svt::uno //...................................................................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/wizard/wizardpagecontroller.hxx b/svtools/source/uno/wizard/wizardpagecontroller.hxx index 9de04d2f0dd4..7b8273ce43a9 100644 --- a/svtools/source/uno/wizard/wizardpagecontroller.hxx +++ b/svtools/source/uno/wizard/wizardpagecontroller.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -73,3 +74,5 @@ namespace svt { namespace uno //...................................................................................................................... #endif // SVT_UNOWIZ_WIZARDPAGECONTROLLER_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/wizard/wizardshell.cxx b/svtools/source/uno/wizard/wizardshell.cxx index 7737b214ac1f..7220091d7648 100644 --- a/svtools/source/uno/wizard/wizardshell.cxx +++ b/svtools/source/uno/wizard/wizardshell.cxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -133,7 +134,7 @@ namespace svt { namespace uno default: break; } - OSL_ENSURE( false, "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" ); + OSL_FAIL( "WizardShell::convertCommitReasonToTravelType: unsupported CommitPageReason!" ); return WizardTravelType::FINISH; } @@ -277,3 +278,5 @@ namespace svt { namespace uno //...................................................................................................................... } } // namespace svt::uno //...................................................................................................................... + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/uno/wizard/wizardshell.hxx b/svtools/source/uno/wizard/wizardshell.hxx index 338b4f38dc4a..9697b71b36d2 100644 --- a/svtools/source/uno/wizard/wizardshell.hxx +++ b/svtools/source/uno/wizard/wizardshell.hxx @@ -1,3 +1,4 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ /************************************************************************* * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * @@ -145,3 +146,5 @@ namespace svt { namespace uno //...................................................................................................................... #endif // SVT_UNO_WIZARD_SHELL + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |