summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorThomas Arnhold <thomas@arnhold.org>2013-04-02 12:26:08 +0200
committerThomas Arnhold <thomas@arnhold.org>2013-04-02 14:21:18 +0200
commit381c5bf1ca968424585f679da8382ae3f8d6ac66 (patch)
tree1dd044ed3a77e1d861007c4d31bdacb2bcbd504f /sfx2/source
parent7d1044842e2316507eda719e116819572f4ce8d9 (diff)
sfx2: remove macros
Change-Id: I8871b0c95874ceab755b3cb304a60c34981c649c
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/doc/doctemplates.cxx31
-rw-r--r--sfx2/source/inc/doctemplates.hxx42
-rw-r--r--sfx2/source/inc/eventsupplier.hxx158
-rw-r--r--sfx2/source/notify/eventsupplier.cxx254
-rw-r--r--sfx2/source/view/frmload.cxx14
-rw-r--r--sfx2/source/view/sfxbasecontroller.cxx322
-rw-r--r--sfx2/source/view/viewsh.cxx18
7 files changed, 395 insertions, 444 deletions
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 9d2b6b2d4d3d..130777f09121 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -114,7 +114,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::util;
-using namespace ::rtl;
using namespace ::ucbhelper;
using namespace ::comphelper;
@@ -278,7 +277,7 @@ public:
sal_Bool storeTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
- const uno::Reference< XSTORABLE >& rStorable );
+ const uno::Reference< frame::XStorable >& rStorable );
sal_Bool addTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
@@ -1754,7 +1753,7 @@ sal_Bool SfxDocTplService_Impl::renameGroup( const OUString& rOldName,
//-----------------------------------------------------------------------------
sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
- const uno::Reference< XSTORABLE >& rStorable )
+ const uno::Reference< frame::XStorable >& rStorable )
{
::osl::MutexGuard aGuard( maMutex );
@@ -2224,7 +2223,7 @@ SfxDocTplService::~SfxDocTplService()
//-----------------------------------------------------------------------------
Locale SAL_CALL SfxDocTplService::getLocale()
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
return pImp->getLocale();
}
@@ -2232,7 +2231,7 @@ Locale SAL_CALL SfxDocTplService::getLocale()
//-----------------------------------------------------------------------------
void SAL_CALL SfxDocTplService::setLocale( const Locale & rLocale )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
pImp->setLocale( rLocale );
}
@@ -2240,8 +2239,8 @@ void SAL_CALL SfxDocTplService::setLocale( const Locale & rLocale )
//-----------------------------------------------------------------------------
//--- XDocumentTemplates ---
//-----------------------------------------------------------------------------
-uno::Reference< XCONTENT > SAL_CALL SfxDocTplService::getContent()
- throw( RUNTIMEEXCEPTION )
+uno::Reference< ucb::XContent > SAL_CALL SfxDocTplService::getContent()
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
return pImp->getContent().get();
@@ -2252,8 +2251,8 @@ uno::Reference< XCONTENT > SAL_CALL SfxDocTplService::getContent()
//-----------------------------------------------------------------------------
sal_Bool SAL_CALL SfxDocTplService::storeTemplate( const OUString& GroupName,
const OUString& TemplateName,
- const uno::Reference< XSTORABLE >& Storable )
- throw( RUNTIMEEXCEPTION )
+ const uno::Reference< frame::XStorable >& Storable )
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
return pImp->storeTemplate( GroupName, TemplateName, Storable );
@@ -2265,7 +2264,7 @@ sal_Bool SAL_CALL SfxDocTplService::storeTemplate( const OUString& GroupName,
sal_Bool SAL_CALL SfxDocTplService::addTemplate( const OUString& rGroupName,
const OUString& rTemplateName,
const OUString& rSourceURL )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
return pImp->addTemplate( rGroupName, rTemplateName, rSourceURL );
@@ -2276,7 +2275,7 @@ sal_Bool SAL_CALL SfxDocTplService::addTemplate( const OUString& rGroupName,
//-----------------------------------------------------------------------------
sal_Bool SAL_CALL SfxDocTplService::removeTemplate( const OUString& rGroupName,
const OUString& rTemplateName )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
return pImp->removeTemplate( rGroupName, rTemplateName );
@@ -2288,7 +2287,7 @@ sal_Bool SAL_CALL SfxDocTplService::removeTemplate( const OUString& rGroupName,
sal_Bool SAL_CALL SfxDocTplService::renameTemplate( const OUString& rGroupName,
const OUString& rOldName,
const OUString& rNewName )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( rOldName == rNewName )
return sal_True;
@@ -2301,7 +2300,7 @@ sal_Bool SAL_CALL SfxDocTplService::renameTemplate( const OUString& rGroupName,
//-----------------------------------------------------------------------------
sal_Bool SAL_CALL SfxDocTplService::addGroup( const OUString& rGroupName )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
return pImp->addGroup( rGroupName );
@@ -2311,7 +2310,7 @@ sal_Bool SAL_CALL SfxDocTplService::addGroup( const OUString& rGroupName )
//-----------------------------------------------------------------------------
sal_Bool SAL_CALL SfxDocTplService::removeGroup( const OUString& rGroupName )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
return pImp->removeGroup( rGroupName );
@@ -2322,7 +2321,7 @@ sal_Bool SAL_CALL SfxDocTplService::removeGroup( const OUString& rGroupName )
//-----------------------------------------------------------------------------
sal_Bool SAL_CALL SfxDocTplService::renameGroup( const OUString& rOldName,
const OUString& rNewName )
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( rOldName == rNewName )
return sal_True;
@@ -2335,7 +2334,7 @@ sal_Bool SAL_CALL SfxDocTplService::renameGroup( const OUString& rOldName,
//-----------------------------------------------------------------------------
void SAL_CALL SfxDocTplService::update()
- throw( RUNTIMEEXCEPTION )
+ throw( uno::RuntimeException )
{
if ( pImp->init() )
pImp->update( sal_True );
diff --git a/sfx2/source/inc/doctemplates.hxx b/sfx2/source/inc/doctemplates.hxx
index 390d2b722b47..a363f9e1c391 100644
--- a/sfx2/source/inc/doctemplates.hxx
+++ b/sfx2/source/inc/doctemplates.hxx
@@ -37,57 +37,41 @@
#include <ucbhelper/content.hxx>
#include <sfx2/sfxuno.hxx>
-//--------------------------------------------------------------------------------------------------------
-
-#define UNOLOCALE ::com::sun::star::lang::Locale
-#define REFERENCE ::com::sun::star::uno::Reference
-#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
-#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
-#define XCONTENT ::com::sun::star::ucb::XContent
-#define XDOCUMENTTEMPLATES ::com::sun::star::frame::XDocumentTemplates
-#define XINTERFACE ::com::sun::star::uno::XInterface
-#define XLOCALIZABLE ::com::sun::star::lang::XLocalizable
-#define XMODEL ::com::sun::star::frame::XModel
-#define XMULTISERVICEFACTORY ::com::sun::star::lang::XMultiServiceFactory
-#define XSERVICEINFO ::com::sun::star::lang::XServiceInfo
-#define XSTORABLE ::com::sun::star::frame::XStorable
-
-//--------------------------------------------------------------------------------------------------------
class SfxDocTplService_Impl;
-class SfxDocTplService: public ::cppu::WeakImplHelper3< XLOCALIZABLE, XDOCUMENTTEMPLATES, XSERVICEINFO >
+class SfxDocTplService: public ::cppu::WeakImplHelper3< css::lang::XLocalizable, css::frame::XDocumentTemplates, css::lang::XServiceInfo >
{
SfxDocTplService_Impl *pImp;
public:
SFX_DECL_XSERVICEINFO
- SfxDocTplService( const REFERENCE < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+ SfxDocTplService( const css::uno::Reference < css::lang::XMultiServiceFactory >& xFactory );
~SfxDocTplService();
// --- XLocalizable ---
- void SAL_CALL setLocale( const UNOLOCALE & eLocale ) throw( RUNTIMEEXCEPTION );
- UNOLOCALE SAL_CALL getLocale() throw( RUNTIMEEXCEPTION );
+ void SAL_CALL setLocale( const css::lang::Locale & eLocale ) throw( css::uno::RuntimeException );
+ css::lang::Locale SAL_CALL getLocale() throw( css::uno::RuntimeException );
// --- XDocumentTemplates ---
- REFERENCE< XCONTENT > SAL_CALL getContent() throw( RUNTIMEEXCEPTION );
+ css::uno::Reference< css::ucb::XContent > SAL_CALL getContent() throw( css::uno::RuntimeException );
sal_Bool SAL_CALL storeTemplate( const ::rtl::OUString& GroupName,
const ::rtl::OUString& TemplateName,
- const REFERENCE< XSTORABLE >& Storable ) throw( RUNTIMEEXCEPTION );
+ const css::uno::Reference< css::frame::XStorable >& Storable ) throw( css::uno::RuntimeException );
sal_Bool SAL_CALL addTemplate( const ::rtl::OUString& GroupName,
const ::rtl::OUString& TemplateName,
- const ::rtl::OUString& SourceURL ) throw( RUNTIMEEXCEPTION );
+ const ::rtl::OUString& SourceURL ) throw( css::uno::RuntimeException );
sal_Bool SAL_CALL removeTemplate( const ::rtl::OUString& GroupName,
- const ::rtl::OUString& TemplateName ) throw( RUNTIMEEXCEPTION );
+ const ::rtl::OUString& TemplateName ) throw( css::uno::RuntimeException );
sal_Bool SAL_CALL renameTemplate( const ::rtl::OUString& GroupName,
const ::rtl::OUString& OldTemplateName,
- const ::rtl::OUString& NewTemplateName ) throw( RUNTIMEEXCEPTION );
- sal_Bool SAL_CALL addGroup( const ::rtl::OUString& GroupName ) throw( RUNTIMEEXCEPTION );
- sal_Bool SAL_CALL removeGroup( const ::rtl::OUString& GroupName ) throw( RUNTIMEEXCEPTION );
+ const ::rtl::OUString& NewTemplateName ) throw( css::uno::RuntimeException );
+ sal_Bool SAL_CALL addGroup( const ::rtl::OUString& GroupName ) throw( css::uno::RuntimeException );
+ sal_Bool SAL_CALL removeGroup( const ::rtl::OUString& GroupName ) throw( css::uno::RuntimeException );
sal_Bool SAL_CALL renameGroup( const ::rtl::OUString& OldGroupName,
- const ::rtl::OUString& NewGroupName ) throw( RUNTIMEEXCEPTION );
- void SAL_CALL update() throw( RUNTIMEEXCEPTION );
+ const ::rtl::OUString& NewGroupName ) throw( css::uno::RuntimeException );
+ void SAL_CALL update() throw( css::uno::RuntimeException );
};
#endif
diff --git a/sfx2/source/inc/eventsupplier.hxx b/sfx2/source/inc/eventsupplier.hxx
index 737e3724bb99..9380cbd980e3 100644
--- a/sfx2/source/inc/eventsupplier.hxx
+++ b/sfx2/source/inc/eventsupplier.hxx
@@ -50,36 +50,16 @@ namespace comphelper
class NamedValueCollection;
}
-//--------------------------------------------------------------------------------------------------------
-
-#define NOSUCHELEMENTEXCEPTION ::com::sun::star::container::NoSuchElementException
-#define XNAMEREPLACE ::com::sun::star::container::XNameReplace
-#define DOCEVENTOBJECT ::com::sun::star::document::EventObject
-#define XEVENTBROADCASTER ::com::sun::star::document::XEventBroadcaster
-#define XDOCEVENTLISTENER ::com::sun::star::document::XEventListener
-#define XEVENTSSUPPLIER ::com::sun::star::document::XEventsSupplier
-#define EVENTOBJECT ::com::sun::star::lang::EventObject
-#define ILLEGALARGUMENTEXCEPTION ::com::sun::star::lang::IllegalArgumentException
-#define WRAPPEDTARGETEXCEPTION ::com::sun::star::lang::WrappedTargetException
-#define ANY ::com::sun::star::uno::Any
-#define REFERENCE ::com::sun::star::uno::Reference
-#define RUNTIMEEXCEPTION ::com::sun::star::uno::RuntimeException
-#define SEQUENCE ::com::sun::star::uno::Sequence
-#define UNOTYPE ::com::sun::star::uno::Type
-#define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper
-
-//--------------------------------------------------------------------------------------------------------
-
class SfxObjectShell;
class SvxMacro;
//--------------------------------------------------------------------------------------------------------
-class SfxEvents_Impl : public ::cppu::WeakImplHelper2< ::com::sun::star::container::XNameReplace, ::com::sun::star::document::XEventListener >
+class SfxEvents_Impl : public ::cppu::WeakImplHelper2< css::container::XNameReplace, css::document::XEventListener >
{
- SEQUENCE< ::rtl::OUString > maEventNames;
- SEQUENCE< ANY > maEventData;
- REFERENCE< XEVENTBROADCASTER > mxBroadcaster;
+ css::uno::Sequence< ::rtl::OUString > maEventNames;
+ css::uno::Sequence< css::uno::Any > maEventData;
+ css::uno::Reference< css::document::XEventBroadcaster > mxBroadcaster;
::osl::Mutex maMutex;
SfxObjectShell *mpObjShell;
@@ -87,35 +67,35 @@ class SfxEvents_Impl : public ::cppu::WeakImplHelper2< ::com::sun::star::contain
public:
SfxEvents_Impl( SfxObjectShell* pShell,
- REFERENCE< XEVENTBROADCASTER > xBroadcaster );
+ css::uno::Reference< css::document::XEventBroadcaster > xBroadcaster );
~SfxEvents_Impl();
// --- XNameReplace ---
- virtual void SAL_CALL replaceByName( const ::rtl::OUString & aName, const ANY & aElement )
- throw( ILLEGALARGUMENTEXCEPTION, NOSUCHELEMENTEXCEPTION,
- WRAPPEDTARGETEXCEPTION, RUNTIMEEXCEPTION );
+ virtual void SAL_CALL replaceByName( const ::rtl::OUString & aName, const css::uno::Any & aElement )
+ throw( css::lang::IllegalArgumentException, css::container::NoSuchElementException,
+ css::lang::WrappedTargetException, css::uno::RuntimeException );
// --- XNameAccess ( parent of XNameReplace ) ---
- virtual ANY SAL_CALL getByName( const ::rtl::OUString& aName )
- throw( NOSUCHELEMENTEXCEPTION, WRAPPEDTARGETEXCEPTION,
- RUNTIMEEXCEPTION );
- virtual SEQUENCE< ::rtl::OUString > SAL_CALL getElementNames() throw ( RUNTIMEEXCEPTION );
- virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw ( RUNTIMEEXCEPTION );
+ virtual css::uno::Any SAL_CALL getByName( const ::rtl::OUString& aName )
+ throw( css::container::NoSuchElementException, css::lang::WrappedTargetException,
+ css::uno::RuntimeException );
+ virtual css::uno::Sequence< ::rtl::OUString > SAL_CALL getElementNames() throw ( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasByName( const ::rtl::OUString& aName ) throw ( css::uno::RuntimeException );
// --- XElementAccess ( parent of XNameAccess ) ---
- virtual UNOTYPE SAL_CALL getElementType() throw ( RUNTIMEEXCEPTION );
- virtual sal_Bool SAL_CALL hasElements() throw ( RUNTIMEEXCEPTION );
+ virtual css::uno::Type SAL_CALL getElementType() throw ( css::uno::RuntimeException );
+ virtual sal_Bool SAL_CALL hasElements() throw ( css::uno::RuntimeException );
// --- ::document::XEventListener ---
- virtual void SAL_CALL notifyEvent( const DOCEVENTOBJECT& aEvent )
- throw( RUNTIMEEXCEPTION );
+ virtual void SAL_CALL notifyEvent( const css::document::EventObject& aEvent )
+ throw( css::uno::RuntimeException );
// --- ::lang::XEventListener ---
- virtual void SAL_CALL disposing( const EVENTOBJECT& Source )
- throw( RUNTIMEEXCEPTION );
+ virtual void SAL_CALL disposing( const css::lang::EventObject& Source )
+ throw( css::uno::RuntimeException );
- static SvxMacro* ConvertToMacro( const ANY& rElement, SfxObjectShell* pDoc, sal_Bool bNormalizeMacro );
- static void NormalizeMacro( const ANY& rIn, ANY& rOut, SfxObjectShell* pDoc );
+ static SvxMacro* ConvertToMacro( const css::uno::Any& rElement, SfxObjectShell* pDoc, sal_Bool bNormalizeMacro );
+ static void NormalizeMacro( const css::uno::Any& rIn, css::uno::Any& rOut, SfxObjectShell* pDoc );
static void NormalizeMacro(
const ::comphelper::NamedValueCollection& i_eventDescriptor,
::comphelper::NamedValueCollection& o_normalizedDescriptor,
@@ -130,11 +110,11 @@ struct ModelCollectionMutexBase
};
//=============================================================================
-typedef ::std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > > TModelList;
+typedef ::std::vector< css::uno::Reference< css::frame::XModel > > TModelList;
//=============================================================================
class ModelCollectionEnumeration : public ModelCollectionMutexBase
- , public ::cppu::WeakImplHelper1< ::com::sun::star::container::XEnumeration >
+ , public ::cppu::WeakImplHelper1< css::container::XEnumeration >
{
//-------------------------------------------------------------------------
@@ -159,95 +139,95 @@ class ModelCollectionEnumeration : public ModelCollectionMutexBase
// css.container.XEnumeration
virtual sal_Bool SAL_CALL hasMoreElements()
- throw(::com::sun::star::uno::RuntimeException);
+ throw(css::uno::RuntimeException);
- virtual ::com::sun::star::uno::Any SAL_CALL nextElement()
- throw(::com::sun::star::container::NoSuchElementException,
- ::com::sun::star::lang::WrappedTargetException ,
- ::com::sun::star::uno::RuntimeException );
+ virtual css::uno::Any SAL_CALL nextElement()
+ throw(css::container::NoSuchElementException,
+ css::lang::WrappedTargetException ,
+ css::uno::RuntimeException );
};
//=============================================================================
//TODO: remove support of obsolete document::XEventBroadcaster/Listener
class SfxGlobalEvents_Impl : public ModelCollectionMutexBase
- , public ::cppu::WeakImplHelper3< ::com::sun::star::lang::XServiceInfo
- , ::com::sun::star::frame::XGlobalEventBroadcaster
- , ::com::sun::star::document::XEventListener
+ , public ::cppu::WeakImplHelper3< css::lang::XServiceInfo
+ , css::frame::XGlobalEventBroadcaster
+ , css::document::XEventListener
>
{
- ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > m_xEvents;
- ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener > m_xJobExecutorListener;
- OINTERFACECONTAINERHELPER m_aLegacyListeners;
- OINTERFACECONTAINERHELPER m_aDocumentListeners;
+ css::uno::Reference< css::container::XNameReplace > m_xEvents;
+ css::uno::Reference< css::document::XEventListener > m_xJobExecutorListener;
+ ::cppu::OInterfaceContainerHelper m_aLegacyListeners;
+ ::cppu::OInterfaceContainerHelper m_aDocumentListeners;
TModelList m_lModels;
GlobalEventConfig* pImp;
public:
- SfxGlobalEvents_Impl(const com::sun::star::uno::Reference < ::com::sun::star::uno::XComponentContext >& rxContext);
+ SfxGlobalEvents_Impl(const css::uno::Reference < css::uno::XComponentContext >& rxContext);
virtual ~SfxGlobalEvents_Impl();
SFX_DECL_XSERVICEINFO
// css.document.XEventBroadcaster
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameReplace > SAL_CALL getEvents()
- throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XNameReplace > SAL_CALL getEvents()
+ throw(css::uno::RuntimeException);
- virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& xListener)
- throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener)
+ throw(css::uno::RuntimeException);
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventListener >& xListener)
- throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const css::uno::Reference< css::document::XEventListener >& xListener)
+ throw(css::uno::RuntimeException);
// css.document.XDocumentEventBroadcaster
- virtual void SAL_CALL addDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL removeDocumentEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::document::XDocumentEventListener >& _Listener ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XController2 >& _ViewController, const ::com::sun::star::uno::Any& _Supplement ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& _Listener ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& _Listener ) throw (css::uno::RuntimeException);
+ virtual void SAL_CALL notifyDocumentEvent( const ::rtl::OUString& _EventName, const css::uno::Reference< css::frame::XController2 >& _ViewController, const css::uno::Any& _Supplement ) throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException);
// css.document.XEventListener
- virtual void SAL_CALL notifyEvent(const ::com::sun::star::document::EventObject& aEvent)
- throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL notifyEvent(const css::document::EventObject& aEvent)
+ throw(css::uno::RuntimeException);
// css.document.XDocumentEventListener
- virtual void SAL_CALL documentEventOccured( const ::com::sun::star::document::DocumentEvent& Event ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL documentEventOccured( const css::document::DocumentEvent& Event ) throw (css::uno::RuntimeException);
// css.container.XSet
- virtual sal_Bool SAL_CALL has(const ::com::sun::star::uno::Any& aElement)
- throw(::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL has(const css::uno::Any& aElement)
+ throw(css::uno::RuntimeException);
- virtual void SAL_CALL insert(const ::com::sun::star::uno::Any& aElement)
- throw(::com::sun::star::lang::IllegalArgumentException ,
- ::com::sun::star::container::ElementExistException,
- ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL insert(const css::uno::Any& aElement)
+ throw(css::lang::IllegalArgumentException ,
+ css::container::ElementExistException,
+ css::uno::RuntimeException );
- virtual void SAL_CALL remove(const ::com::sun::star::uno::Any& aElement)
- throw(::com::sun::star::lang::IllegalArgumentException ,
- ::com::sun::star::container::NoSuchElementException,
- ::com::sun::star::uno::RuntimeException );
+ virtual void SAL_CALL remove(const css::uno::Any& aElement)
+ throw(css::lang::IllegalArgumentException ,
+ css::container::NoSuchElementException,
+ css::uno::RuntimeException );
// css.container.XEnumerationAccess
- virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration()
- throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration()
+ throw(css::uno::RuntimeException);
// css.container.XElementAccess
- virtual ::com::sun::star::uno::Type SAL_CALL getElementType()
- throw(::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Type SAL_CALL getElementType()
+ throw(css::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements()
- throw(::com::sun::star::uno::RuntimeException);
+ throw(css::uno::RuntimeException);
// css.lang.XEventListener
- virtual void SAL_CALL disposing(const ::com::sun::star::lang::EventObject& aEvent)
- throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disposing(const css::lang::EventObject& aEvent)
+ throw(css::uno::RuntimeException);
private:
// threadsafe
- void implts_notifyJobExecution(const ::com::sun::star::document::EventObject& aEvent);
- void implts_checkAndExecuteEventBindings(const ::com::sun::star::document::DocumentEvent& aEvent);
- void implts_notifyListener(const ::com::sun::star::document::DocumentEvent& aEvent);
+ void implts_notifyJobExecution(const css::document::EventObject& aEvent);
+ void implts_checkAndExecuteEventBindings(const css::document::DocumentEvent& aEvent);
+ void implts_notifyListener(const css::document::DocumentEvent& aEvent);
// not threadsafe
- TModelList::iterator impl_searchDoc(const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel);
+ TModelList::iterator impl_searchDoc(const css::uno::Reference< css::frame::XModel >& xModel);
};
#endif
diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx
index c6a1baf33ee0..a71788e08706 100644
--- a/sfx2/source/notify/eventsupplier.cxx
+++ b/sfx2/source/notify/eventsupplier.cxx
@@ -53,20 +53,14 @@
#define MACRO_PRFIX "macro://"
#define MACRO_POSTFIX "()"
-//--------------------------------------------------------------------------------------------------------
-
-#define PROPERTYVALUE ::com::sun::star::beans::PropertyValue
-#define UNO_QUERY ::com::sun::star::uno::UNO_QUERY
-
-using ::com::sun::star::uno::Sequence;
-using ::com::sun::star::beans::PropertyValue;
+using namespace css;
//--------------------------------------------------------------------------------------------------------
// --- XNameReplace ---
//--------------------------------------------------------------------------------------------------------
-void SAL_CALL SfxEvents_Impl::replaceByName( const rtl::OUString & aName, const ANY & rElement )
- throw( ILLEGALARGUMENTEXCEPTION, NOSUCHELEMENTEXCEPTION,
- WRAPPEDTARGETEXCEPTION, RUNTIMEEXCEPTION )
+void SAL_CALL SfxEvents_Impl::replaceByName( const rtl::OUString & aName, const uno::Any & rElement )
+ throw( lang::IllegalArgumentException, container::NoSuchElementException,
+ lang::WrappedTargetException, uno::RuntimeException )
{
::osl::MutexGuard aGuard( maMutex );
@@ -78,7 +72,7 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const rtl::OUString & aName, const
{
// check for correct type of the element
if ( !::comphelper::NamedValueCollection::canExtractFrom( rElement ) )
- throw ILLEGALARGUMENTEXCEPTION();
+ throw lang::IllegalArgumentException();
::comphelper::NamedValueCollection const aEventDescriptor( rElement );
// create Configuration at first, creation might call this method also and that would overwrite everything
@@ -116,15 +110,15 @@ void SAL_CALL SfxEvents_Impl::replaceByName( const rtl::OUString & aName, const
}
}
- throw NOSUCHELEMENTEXCEPTION();
+ throw container::NoSuchElementException();
}
//--------------------------------------------------------------------------------------------------------
// --- XNameAccess ---
//--------------------------------------------------------------------------------------------------------
-ANY SAL_CALL SfxEvents_Impl::getByName( const rtl::OUString& aName )
- throw( NOSUCHELEMENTEXCEPTION, WRAPPEDTARGETEXCEPTION,
- RUNTIMEEXCEPTION )
+uno::Any SAL_CALL SfxEvents_Impl::getByName( const rtl::OUString& aName )
+ throw( container::NoSuchElementException, lang::WrappedTargetException,
+ uno::RuntimeException )
{
::osl::MutexGuard aGuard( maMutex );
@@ -138,17 +132,17 @@ ANY SAL_CALL SfxEvents_Impl::getByName( const rtl::OUString& aName )
return maEventData[i];
}
- throw NOSUCHELEMENTEXCEPTION();
+ throw container::NoSuchElementException();
}
//--------------------------------------------------------------------------------------------------------
-SEQUENCE< rtl::OUString > SAL_CALL SfxEvents_Impl::getElementNames() throw ( RUNTIMEEXCEPTION )
+uno::Sequence< rtl::OUString > SAL_CALL SfxEvents_Impl::getElementNames() throw ( uno::RuntimeException )
{
return maEventNames;
}
//--------------------------------------------------------------------------------------------------------
-sal_Bool SAL_CALL SfxEvents_Impl::hasByName( const rtl::OUString& aName ) throw ( RUNTIMEEXCEPTION )
+sal_Bool SAL_CALL SfxEvents_Impl::hasByName( const rtl::OUString& aName ) throw ( uno::RuntimeException )
{
::osl::MutexGuard aGuard( maMutex );
@@ -168,14 +162,14 @@ sal_Bool SAL_CALL SfxEvents_Impl::hasByName( const rtl::OUString& aName ) throw
//--------------------------------------------------------------------------------------------------------
// --- XElementAccess ( parent of XNameAccess ) ---
//--------------------------------------------------------------------------------------------------------
-UNOTYPE SAL_CALL SfxEvents_Impl::getElementType() throw ( RUNTIMEEXCEPTION )
+uno::Type SAL_CALL SfxEvents_Impl::getElementType() throw ( uno::RuntimeException )
{
- UNOTYPE aElementType = ::getCppuType( (const SEQUENCE < PROPERTYVALUE > *)0 );
+ uno::Type aElementType = ::getCppuType( (const uno::Sequence < beans::PropertyValue > *)0 );
return aElementType;
}
//--------------------------------------------------------------------------------------------------------
-sal_Bool SAL_CALL SfxEvents_Impl::hasElements() throw ( RUNTIMEEXCEPTION )
+sal_Bool SAL_CALL SfxEvents_Impl::hasElements() throw ( uno::RuntimeException )
{
::osl::MutexGuard aGuard( maMutex );
@@ -185,9 +179,9 @@ sal_Bool SAL_CALL SfxEvents_Impl::hasElements() throw ( RUNTIMEEXCEPTION )
return sal_False;
}
-static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
+static void Execute( uno::Any& aEventData, const document::DocumentEvent& aTrigger, SfxObjectShell* pDoc )
{
- SEQUENCE < PROPERTYVALUE > aProperties;
+ uno::Sequence < beans::PropertyValue > aProperties;
if ( aEventData >>= aProperties )
{
rtl::OUString aType;
@@ -219,7 +213,7 @@ static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigg
if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM(STAR_BASIC)) && !aScript.isEmpty())
{
- com::sun::star::uno::Any aAny;
+ uno::Any aAny;
SfxMacroLoader::loadMacro( aScript, aAny, pDoc );
}
else if (aType.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("Service")) ||
@@ -231,38 +225,38 @@ static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigg
SfxViewFrame::GetFirst( pDoc ) :
SfxViewFrame::Current();
- ::com::sun::star::uno::Reference < ::com::sun::star::util::XURLTransformer > xTrans( ::com::sun::star::util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
+ uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) );
- ::com::sun::star::util::URL aURL;
+ util::URL aURL;
aURL.Complete = aScript;
xTrans->parseStrict( aURL );
- ::com::sun::star::uno::Reference
- < ::com::sun::star::frame::XDispatchProvider > xProv;
+ uno::Reference
+ < frame::XDispatchProvider > xProv;
if ( pView != NULL )
{
- xProv = ::com::sun::star::uno::Reference
- < ::com::sun::star::frame::XDispatchProvider > (
- pView->GetFrame().GetFrameInterface(), UNO_QUERY );
+ xProv = uno::Reference
+ < frame::XDispatchProvider > (
+ pView->GetFrame().GetFrameInterface(), uno::UNO_QUERY );
}
else
{
- xProv = css::uno::Reference< css::frame::XDispatchProvider > (
- css::frame::Desktop::create( ::comphelper::getProcessComponentContext() ),
- UNO_QUERY );
+ xProv = uno::Reference< frame::XDispatchProvider > (
+ frame::Desktop::create( ::comphelper::getProcessComponentContext() ),
+ uno::UNO_QUERY );
}
- ::com::sun::star::uno::Reference < ::com::sun::star::frame::XDispatch > xDisp;
+ uno::Reference < frame::XDispatch > xDisp;
if ( xProv.is() )
xDisp = xProv->queryDispatch( aURL, ::rtl::OUString(), 0 );
if ( xDisp.is() )
{
- css::beans::PropertyValue aEventParam;
+ beans::PropertyValue aEventParam;
aEventParam.Value <<= aTrigger;
- css::uno::Sequence< css::beans::PropertyValue > aDispatchArgs( &aEventParam, 1 );
+ uno::Sequence< beans::PropertyValue > aDispatchArgs( &aEventParam, 1 );
xDisp->dispatch( aURL, aDispatchArgs );
}
}
@@ -281,7 +275,7 @@ static void Execute( ANY& aEventData, const css::document::DocumentEvent& aTrigg
//--------------------------------------------------------------------------------------------------------
// --- ::document::XEventListener ---
//--------------------------------------------------------------------------------------------------------
-void SAL_CALL SfxEvents_Impl::notifyEvent( const DOCEVENTOBJECT& aEvent ) throw( RUNTIMEEXCEPTION )
+void SAL_CALL SfxEvents_Impl::notifyEvent( const document::EventObject& aEvent ) throw( uno::RuntimeException )
{
::osl::ClearableMutexGuard aGuard( maMutex );
@@ -303,15 +297,15 @@ void SAL_CALL SfxEvents_Impl::notifyEvent( const DOCEVENTOBJECT& aEvent ) throw(
if ( !bFound )
return;
- ANY aEventData = maEventData[ nIndex ];
+ uno::Any aEventData = maEventData[ nIndex ];
aGuard.clear();
- Execute( aEventData, css::document::DocumentEvent(aEvent.Source, aEvent.EventName, NULL, css::uno::Any()), mpObjShell );
+ Execute( aEventData, document::DocumentEvent(aEvent.Source, aEvent.EventName, NULL, uno::Any()), mpObjShell );
}
//--------------------------------------------------------------------------------------------------------
// --- ::lang::XEventListener ---
//--------------------------------------------------------------------------------------------------------
-void SAL_CALL SfxEvents_Impl::disposing( const EVENTOBJECT& /*Source*/ ) throw( RUNTIMEEXCEPTION )
+void SAL_CALL SfxEvents_Impl::disposing( const lang::EventObject& /*Source*/ ) throw( uno::RuntimeException )
{
::osl::MutexGuard aGuard( maMutex );
@@ -325,7 +319,7 @@ void SAL_CALL SfxEvents_Impl::disposing( const EVENTOBJECT& /*Source*/ ) throw(
//--------------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------------
SfxEvents_Impl::SfxEvents_Impl( SfxObjectShell* pShell,
- REFERENCE< XEVENTBROADCASTER > xBroadcaster )
+ uno::Reference< document::XEventBroadcaster > xBroadcaster )
{
// get the list of supported events and store it
if ( pShell )
@@ -333,7 +327,7 @@ SfxEvents_Impl::SfxEvents_Impl( SfxObjectShell* pShell,
else
maEventNames = GlobalEventConfig().getElementNames();
- maEventData = SEQUENCE < ANY > ( maEventNames.getLength() );
+ maEventData = uno::Sequence < uno::Any > ( maEventNames.getLength() );
mpObjShell = pShell;
mxBroadcaster = xBroadcaster;
@@ -348,11 +342,11 @@ SfxEvents_Impl::~SfxEvents_Impl()
}
//--------------------------------------------------------------------------------------------------------
-SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* pObjShell, sal_Bool bNormalizeMacro )
+SvxMacro* SfxEvents_Impl::ConvertToMacro( const uno::Any& rElement, SfxObjectShell* pObjShell, sal_Bool bNormalizeMacro )
{
SvxMacro* pMacro = NULL;
- SEQUENCE < PROPERTYVALUE > aProperties;
- ANY aAny;
+ uno::Sequence < beans::PropertyValue > aProperties;
+ uno::Any aAny;
if ( bNormalizeMacro )
NormalizeMacro( rElement, aAny, pObjShell );
else
@@ -414,7 +408,7 @@ SvxMacro* SfxEvents_Impl::ConvertToMacro( const ANY& rElement, SfxObjectShell* p
return pMacro;
}
-void SfxEvents_Impl::NormalizeMacro( const ANY& rEvent, ANY& rRet, SfxObjectShell* pDoc )
+void SfxEvents_Impl::NormalizeMacro( const uno::Any& rEvent, uno::Any& rRet, SfxObjectShell* pDoc )
{
const ::comphelper::NamedValueCollection aEventDescriptor( rEvent );
::comphelper::NamedValueCollection aEventDescriptorOut;
@@ -515,7 +509,7 @@ void ModelCollectionEnumeration::setModelList(const TModelList& rList)
}
sal_Bool SAL_CALL ModelCollectionEnumeration::hasMoreElements()
- throw(css::uno::RuntimeException)
+ throw(uno::RuntimeException)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -523,32 +517,32 @@ sal_Bool SAL_CALL ModelCollectionEnumeration::hasMoreElements()
// <- SAFE
}
-css::uno::Any SAL_CALL ModelCollectionEnumeration::nextElement()
- throw(css::container::NoSuchElementException,
- css::lang::WrappedTargetException ,
- css::uno::RuntimeException )
+uno::Any SAL_CALL ModelCollectionEnumeration::nextElement()
+ throw(container::NoSuchElementException,
+ lang::WrappedTargetException ,
+ uno::RuntimeException )
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
if (m_pEnumerationIt == m_lModels.end())
- throw css::container::NoSuchElementException(
+ throw container::NoSuchElementException(
::rtl::OUString("End of model enumeration reached."),
- static_cast< css::container::XEnumeration* >(this));
- css::uno::Reference< css::frame::XModel > xModel(*m_pEnumerationIt, UNO_QUERY);
+ static_cast< container::XEnumeration* >(this));
+ uno::Reference< frame::XModel > xModel(*m_pEnumerationIt, uno::UNO_QUERY);
++m_pEnumerationIt;
aLock.clear();
// <- SAFE
- return css::uno::makeAny(xModel);
+ return uno::makeAny(xModel);
}
SFX_IMPL_XSERVICEINFO_CTX( SfxGlobalEvents_Impl, "com.sun.star.frame.GlobalEventBroadcaster", "com.sun.star.comp.sfx2.GlobalEventBroadcaster" )
SFX_IMPL_ONEINSTANCEFACTORY( SfxGlobalEvents_Impl );
//-----------------------------------------------------------------------------
-SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const css::uno::Reference < css::uno::XComponentContext >& rxContext)
+SfxGlobalEvents_Impl::SfxGlobalEvents_Impl( const uno::Reference < uno::XComponentContext >& rxContext)
: ModelCollectionMutexBase( )
- , m_xJobExecutorListener( css::task::JobExecutor::create( rxContext ), css::uno::UNO_QUERY_THROW )
+ , m_xJobExecutorListener( task::JobExecutor::create( rxContext ), uno::UNO_QUERY_THROW )
, m_aLegacyListeners (m_aLock)
, m_aDocumentListeners (m_aLock)
, pImp (0 )
@@ -566,8 +560,8 @@ SfxGlobalEvents_Impl::~SfxGlobalEvents_Impl()
}
//-----------------------------------------------------------------------------
-css::uno::Reference< css::container::XNameReplace > SAL_CALL SfxGlobalEvents_Impl::getEvents()
- throw(css::uno::RuntimeException)
+uno::Reference< container::XNameReplace > SAL_CALL SfxGlobalEvents_Impl::getEvents()
+ throw(uno::RuntimeException)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -576,68 +570,68 @@ css::uno::Reference< css::container::XNameReplace > SAL_CALL SfxGlobalEvents_Imp
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const css::uno::Reference< css::document::XEventListener >& xListener)
- throw(css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::addEventListener(const uno::Reference< document::XEventListener >& xListener)
+ throw(uno::RuntimeException)
{
// container is threadsafe
m_aLegacyListeners.addInterface(xListener);
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::removeEventListener(const css::uno::Reference< css::document::XEventListener >& xListener)
- throw(css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::removeEventListener(const uno::Reference< document::XEventListener >& xListener)
+ throw(uno::RuntimeException)
{
// container is threadsafe
m_aLegacyListeners.removeInterface(xListener);
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::addDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& _Listener )
- throw(css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::addDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& _Listener )
+ throw(uno::RuntimeException)
{
m_aDocumentListeners.addInterface( _Listener );
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::removeDocumentEventListener( const css::uno::Reference< css::document::XDocumentEventListener >& _Listener )
- throw(css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::removeDocumentEventListener( const uno::Reference< document::XDocumentEventListener >& _Listener )
+ throw(uno::RuntimeException)
{
m_aDocumentListeners.removeInterface( _Listener );
}
//-----------------------------------------------------------------------------
void SAL_CALL SfxGlobalEvents_Impl::notifyDocumentEvent( const ::rtl::OUString& /*_EventName*/,
- const css::uno::Reference< css::frame::XController2 >& /*_ViewController*/, const css::uno::Any& /*_Supplement*/ )
- throw (css::lang::IllegalArgumentException, css::lang::NoSupportException, css::uno::RuntimeException)
+ const uno::Reference< frame::XController2 >& /*_ViewController*/, const uno::Any& /*_Supplement*/ )
+ throw (lang::IllegalArgumentException, lang::NoSupportException, uno::RuntimeException)
{
// we're a multiplexer only, no chance to generate artifical events here
- throw css::lang::NoSupportException(::rtl::OUString(), *this);
+ throw lang::NoSupportException(::rtl::OUString(), *this);
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const css::document::EventObject& aEvent)
- throw(css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::notifyEvent(const document::EventObject& aEvent)
+ throw(uno::RuntimeException)
{
- css::document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, NULL, css::uno::Any());
+ document::DocumentEvent aDocEvent(aEvent.Source, aEvent.EventName, NULL, uno::Any());
implts_notifyJobExecution(aEvent);
implts_checkAndExecuteEventBindings(aDocEvent);
implts_notifyListener(aDocEvent);
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::documentEventOccured( const css::document::DocumentEvent& _Event )
- throw (css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::documentEventOccured( const document::DocumentEvent& _Event )
+ throw (uno::RuntimeException)
{
- implts_notifyJobExecution(css::document::EventObject(_Event.Source, _Event.EventName));
+ implts_notifyJobExecution(document::EventObject(_Event.Source, _Event.EventName));
implts_checkAndExecuteEventBindings(_Event);
implts_notifyListener(_Event);
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::disposing(const css::lang::EventObject& aEvent)
- throw(css::uno::RuntimeException)
+void SAL_CALL SfxGlobalEvents_Impl::disposing(const lang::EventObject& aEvent)
+ throw(uno::RuntimeException)
{
- css::uno::Reference< css::frame::XModel > xDoc(aEvent.Source, UNO_QUERY);
+ uno::Reference< frame::XModel > xDoc(aEvent.Source, uno::UNO_QUERY);
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -649,10 +643,10 @@ void SAL_CALL SfxGlobalEvents_Impl::disposing(const css::lang::EventObject& aEve
}
//-----------------------------------------------------------------------------
-sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const css::uno::Any& aElement)
- throw (css::uno::RuntimeException)
+sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const uno::Any& aElement)
+ throw (uno::RuntimeException)
{
- css::uno::Reference< css::frame::XModel > xDoc;
+ uno::Reference< frame::XModel > xDoc;
aElement >>= xDoc;
sal_Bool bHas = sal_False;
@@ -669,90 +663,90 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::has(const css::uno::Any& aElement)
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::insert( const css::uno::Any& aElement )
- throw (css::lang::IllegalArgumentException ,
- css::container::ElementExistException,
- css::uno::RuntimeException )
+void SAL_CALL SfxGlobalEvents_Impl::insert( const uno::Any& aElement )
+ throw (lang::IllegalArgumentException ,
+ container::ElementExistException,
+ uno::RuntimeException )
{
- css::uno::Reference< css::frame::XModel > xDoc;
+ uno::Reference< frame::XModel > xDoc;
aElement >>= xDoc;
if (!xDoc.is())
- throw css::lang::IllegalArgumentException(
+ throw lang::IllegalArgumentException(
::rtl::OUString("Cant locate at least the model parameter."),
- static_cast< css::container::XSet* >(this),
+ static_cast< container::XSet* >(this),
0);
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
TModelList::iterator pIt = impl_searchDoc(xDoc);
if (pIt != m_lModels.end())
- throw css::container::ElementExistException(
+ throw container::ElementExistException(
::rtl::OUString(),
- static_cast< css::container::XSet* >(this));
+ static_cast< container::XSet* >(this));
m_lModels.push_back(xDoc);
aLock.clear();
// <- SAFE
- css::uno::Reference< css::document::XDocumentEventBroadcaster > xDocBroadcaster(xDoc, UNO_QUERY );
+ uno::Reference< document::XDocumentEventBroadcaster > xDocBroadcaster(xDoc, uno::UNO_QUERY );
if (xDocBroadcaster.is())
xDocBroadcaster->addDocumentEventListener(this);
else
{
// try the "legacy version" of XDocumentEventBroadcaster, which is XEventBroadcaster
- css::uno::Reference< css::document::XEventBroadcaster > xBroadcaster(xDoc, UNO_QUERY);
+ uno::Reference< document::XEventBroadcaster > xBroadcaster(xDoc, uno::UNO_QUERY);
if (xBroadcaster.is())
- xBroadcaster->addEventListener(static_cast< css::document::XEventListener* >(this));
+ xBroadcaster->addEventListener(static_cast< document::XEventListener* >(this));
}
}
//-----------------------------------------------------------------------------
-void SAL_CALL SfxGlobalEvents_Impl::remove( const css::uno::Any& aElement )
- throw (css::lang::IllegalArgumentException ,
- css::container::NoSuchElementException,
- css::uno::RuntimeException )
+void SAL_CALL SfxGlobalEvents_Impl::remove( const uno::Any& aElement )
+ throw (lang::IllegalArgumentException ,
+ container::NoSuchElementException,
+ uno::RuntimeException )
{
- css::uno::Reference< css::frame::XModel > xDoc;
+ uno::Reference< frame::XModel > xDoc;
aElement >>= xDoc;
if (!xDoc.is())
- throw css::lang::IllegalArgumentException(
+ throw lang::IllegalArgumentException(
::rtl::OUString("Cant locate at least the model parameter."),
- static_cast< css::container::XSet* >(this),
+ static_cast< container::XSet* >(this),
0);
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
TModelList::iterator pIt = impl_searchDoc(xDoc);
if (pIt == m_lModels.end())
- throw css::container::NoSuchElementException(
+ throw container::NoSuchElementException(
::rtl::OUString(),
- static_cast< css::container::XSet* >(this));
+ static_cast< container::XSet* >(this));
m_lModels.erase(pIt);
aLock.clear();
// <- SAFE
- css::uno::Reference< css::document::XDocumentEventBroadcaster > xDocBroadcaster(xDoc, UNO_QUERY );
+ uno::Reference< document::XDocumentEventBroadcaster > xDocBroadcaster(xDoc, uno::UNO_QUERY );
if (xDocBroadcaster.is())
xDocBroadcaster->removeDocumentEventListener(this);
else
{
// try the "legacy version" of XDocumentEventBroadcaster, which is XEventBroadcaster
- css::uno::Reference< css::document::XEventBroadcaster > xBroadcaster(xDoc, UNO_QUERY);
+ uno::Reference< document::XEventBroadcaster > xBroadcaster(xDoc, uno::UNO_QUERY);
if (xBroadcaster.is())
- xBroadcaster->removeEventListener(static_cast< css::document::XEventListener* >(this));
+ xBroadcaster->removeEventListener(static_cast< document::XEventListener* >(this));
}
}
//-----------------------------------------------------------------------------
-css::uno::Reference< css::container::XEnumeration > SAL_CALL SfxGlobalEvents_Impl::createEnumeration()
- throw (css::uno::RuntimeException)
+uno::Reference< container::XEnumeration > SAL_CALL SfxGlobalEvents_Impl::createEnumeration()
+ throw (uno::RuntimeException)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
ModelCollectionEnumeration* pEnum = new ModelCollectionEnumeration();
pEnum->setModelList(m_lModels);
- css::uno::Reference< css::container::XEnumeration > xEnum(
- static_cast< css::container::XEnumeration* >(pEnum),
- UNO_QUERY);
+ uno::Reference< container::XEnumeration > xEnum(
+ static_cast< container::XEnumeration* >(pEnum),
+ uno::UNO_QUERY);
aLock.clear();
// <- SAFE
@@ -760,15 +754,15 @@ css::uno::Reference< css::container::XEnumeration > SAL_CALL SfxGlobalEvents_Imp
}
//-----------------------------------------------------------------------------
-css::uno::Type SAL_CALL SfxGlobalEvents_Impl::getElementType()
- throw (css::uno::RuntimeException)
+uno::Type SAL_CALL SfxGlobalEvents_Impl::getElementType()
+ throw (uno::RuntimeException)
{
- return ::getCppuType(static_cast< css::uno::Reference< css::frame::XModel >* >(NULL));
+ return ::getCppuType(static_cast< uno::Reference< frame::XModel >* >(NULL));
}
//-----------------------------------------------------------------------------
sal_Bool SAL_CALL SfxGlobalEvents_Impl::hasElements()
- throw (css::uno::RuntimeException)
+ throw (uno::RuntimeException)
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
@@ -777,57 +771,57 @@ sal_Bool SAL_CALL SfxGlobalEvents_Impl::hasElements()
}
//-----------------------------------------------------------------------------
-void SfxGlobalEvents_Impl::implts_notifyJobExecution(const css::document::EventObject& aEvent)
+void SfxGlobalEvents_Impl::implts_notifyJobExecution(const document::EventObject& aEvent)
{
try
{
m_xJobExecutorListener->notifyEvent(aEvent);
}
- catch(const css::uno::RuntimeException&)
+ catch(const uno::RuntimeException&)
{ throw; }
- catch(const css::uno::Exception&)
+ catch(const uno::Exception&)
{}
}
//-----------------------------------------------------------------------------
-void SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const css::document::DocumentEvent& aEvent)
+void SfxGlobalEvents_Impl::implts_checkAndExecuteEventBindings(const document::DocumentEvent& aEvent)
{
try
{
// SAFE ->
::osl::ResettableMutexGuard aLock(m_aLock);
- css::uno::Reference< css::container::XNameReplace > xEvents = m_xEvents;
+ uno::Reference< container::XNameReplace > xEvents = m_xEvents;
aLock.clear();
// <- SAFE
- css::uno::Any aAny;
+ uno::Any aAny;
if ( xEvents.is() && xEvents->hasByName( aEvent.EventName ) )
aAny = xEvents->getByName(aEvent.EventName);
Execute(aAny, aEvent, 0);
}
- catch ( css::uno::RuntimeException const & )
+ catch ( uno::RuntimeException const & )
{
throw;
}
- catch ( css::uno::Exception const & )
+ catch ( uno::Exception const & )
{
DBG_UNHANDLED_EXCEPTION();
}
}
//-----------------------------------------------------------------------------
-void SfxGlobalEvents_Impl::implts_notifyListener(const css::document::DocumentEvent& aEvent)
+void SfxGlobalEvents_Impl::implts_notifyListener(const document::DocumentEvent& aEvent)
{
// containers are threadsafe
- css::document::EventObject aLegacyEvent(aEvent.Source, aEvent.EventName);
- m_aLegacyListeners.notifyEach( &css::document::XEventListener::notifyEvent, aLegacyEvent );
+ document::EventObject aLegacyEvent(aEvent.Source, aEvent.EventName);
+ m_aLegacyListeners.notifyEach( &document::XEventListener::notifyEvent, aLegacyEvent );
- m_aDocumentListeners.notifyEach( &css::document::XDocumentEventListener::documentEventOccured, aEvent );
+ m_aDocumentListeners.notifyEach( &document::XDocumentEventListener::documentEventOccured, aEvent );
}
//-----------------------------------------------------------------------------
// not threadsafe ... must be locked from outside!
-TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const css::uno::Reference< css::frame::XModel >& xModel)
+TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const uno::Reference< frame::XModel >& xModel)
{
if (!xModel.is())
return m_lModels.end();
@@ -837,7 +831,7 @@ TModelList::iterator SfxGlobalEvents_Impl::impl_searchDoc(const css::uno::Refere
pIt != m_lModels.end() ;
++pIt )
{
- css::uno::Reference< css::frame::XModel > xContainerDoc(*pIt, UNO_QUERY);
+ uno::Reference< frame::XModel > xContainerDoc(*pIt, uno::UNO_QUERY);
if (xContainerDoc == xModel)
break;
}
diff --git a/sfx2/source/view/frmload.cxx b/sfx2/source/view/frmload.cxx
index c56c45b07d7b..1ebdc4dc5116 100644
--- a/sfx2/source/view/frmload.cxx
+++ b/sfx2/source/view/frmload.cxx
@@ -659,7 +659,7 @@ rtl::OUString SAL_CALL SfxFrameLoader_Impl::getImplementationName() throw( Runti
/* XServiceInfo */
sal_Bool SAL_CALL SfxFrameLoader_Impl::supportsService( const rtl::OUString& sServiceName ) throw( RuntimeException )
{
- UNOSEQUENCE< rtl::OUString > seqServiceNames = getSupportedServiceNames();
+ Sequence< rtl::OUString > seqServiceNames = getSupportedServiceNames();
const rtl::OUString* pArray = seqServiceNames.getConstArray();
for ( sal_Int32 nCounter=0; nCounter<seqServiceNames.getLength(); nCounter++ )
{
@@ -672,16 +672,16 @@ sal_Bool SAL_CALL SfxFrameLoader_Impl::supportsService( const rtl::OUString& sSe
}
/* XServiceInfo */
-UNOSEQUENCE< rtl::OUString > SAL_CALL SfxFrameLoader_Impl::getSupportedServiceNames() throw( RuntimeException )
+Sequence< rtl::OUString > SAL_CALL SfxFrameLoader_Impl::getSupportedServiceNames() throw( RuntimeException )
{
return impl_getStaticSupportedServiceNames();
}
/* Helper for XServiceInfo */
-UNOSEQUENCE< rtl::OUString > SfxFrameLoader_Impl::impl_getStaticSupportedServiceNames()
+Sequence< rtl::OUString > SfxFrameLoader_Impl::impl_getStaticSupportedServiceNames()
{
- UNOMUTEXGUARD aGuard( UNOMUTEX::getGlobalMutex() );
- UNOSEQUENCE< rtl::OUString > seqServiceNames( 1 );
+ ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
+ Sequence< rtl::OUString > seqServiceNames( 1 );
seqServiceNames.getArray() [0] = ::rtl::OUString( "com.sun.star.frame.SynchronousFrameLoader" );
return seqServiceNames ;
}
@@ -693,9 +693,9 @@ rtl::OUString SfxFrameLoader_Impl::impl_getStaticImplementationName()
}
/* Helper for registry */
-Reference< UNOXINTERFACE > SAL_CALL SfxFrameLoader_Impl::impl_createInstance( const Reference< XMultiServiceFactory >& xServiceManager ) throw( UNOEXCEPTION )
+Reference< css::uno::XInterface > SAL_CALL SfxFrameLoader_Impl::impl_createInstance( const Reference< XMultiServiceFactory >& xServiceManager ) throw( Exception )
{
- return Reference< XInterface >( *new SfxFrameLoader_Impl( comphelper::getComponentContext(xServiceManager) ) );
+ return Reference< css::uno::XInterface >( *new SfxFrameLoader_Impl( comphelper::getComponentContext(xServiceManager) ) );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx
index 13fe2b654166..336bcb309900 100644
--- a/sfx2/source/view/sfxbasecontroller.cxx
+++ b/sfx2/source/view/sfxbasecontroller.cxx
@@ -79,12 +79,6 @@
#include <sfx2/event.hxx>
#include "sfx2/viewfac.hxx"
-#define OMULTITYPEINTERFACECONTAINERHELPER ::cppu::OMultiTypeInterfaceContainerHelper
-#define OINTERFACECONTAINERHELPER ::cppu::OInterfaceContainerHelper
-#define FRAMEACTIONEVENT ::com::sun::star::frame::FrameActionEvent
-#define EVENTOBJECT ::com::sun::star::lang::EventObject
-#define XKEYHANDLER ::com::sun::star::awt::XKeyHandler
-
#define TIMEOUT_START_RESCHEDULE 10L /* 10th s */
using namespace ::com::sun::star;
@@ -115,37 +109,37 @@ struct GroupIDToCommandGroup
};
// Please update when a new command group is added
-const sal_Int16 MAX_COMMANDGROUP = com::sun::star::frame::CommandGroup::CONTROLS;
+const sal_Int16 MAX_COMMANDGROUP = frame::CommandGroup::CONTROLS;
static sal_Bool bGroupIDMapInitialized = sal_False;
static GroupIDToCommandGroup GroupIDCommandGroupMap[] =
{
- { GID_INTERN , com::sun::star::frame::CommandGroup::INTERNAL },
- { GID_APPLICATION , com::sun::star::frame::CommandGroup::APPLICATION },
- { GID_DOCUMENT , com::sun::star::frame::CommandGroup::DOCUMENT },
- { GID_VIEW , com::sun::star::frame::CommandGroup::VIEW },
- { GID_EDIT , com::sun::star::frame::CommandGroup::EDIT },
- { GID_MACRO , com::sun::star::frame::CommandGroup::MACRO },
- { GID_OPTIONS , com::sun::star::frame::CommandGroup::OPTIONS },
- { GID_MATH , com::sun::star::frame::CommandGroup::MATH },
- { GID_NAVIGATOR , com::sun::star::frame::CommandGroup::NAVIGATOR },
- { GID_INSERT , com::sun::star::frame::CommandGroup::INSERT },
- { GID_FORMAT , com::sun::star::frame::CommandGroup::FORMAT },
- { GID_TEMPLATE , com::sun::star::frame::CommandGroup::TEMPLATE },
- { GID_TEXT , com::sun::star::frame::CommandGroup::TEXT },
- { GID_FRAME , com::sun::star::frame::CommandGroup::FRAME },
- { GID_GRAPHIC , com::sun::star::frame::CommandGroup::GRAPHIC },
- { GID_TABLE , com::sun::star::frame::CommandGroup::TABLE },
- { GID_ENUMERATION , com::sun::star::frame::CommandGroup::ENUMERATION },
- { GID_DATA , com::sun::star::frame::CommandGroup::DATA },
- { GID_SPECIAL , com::sun::star::frame::CommandGroup::SPECIAL },
- { GID_IMAGE , com::sun::star::frame::CommandGroup::IMAGE },
- { GID_CHART , com::sun::star::frame::CommandGroup::CHART },
- { GID_EXPLORER , com::sun::star::frame::CommandGroup::EXPLORER },
- { GID_CONNECTOR , com::sun::star::frame::CommandGroup::CONNECTOR },
- { GID_MODIFY , com::sun::star::frame::CommandGroup::MODIFY },
- { GID_DRAWING , com::sun::star::frame::CommandGroup::DRAWING },
- { GID_CONTROLS , com::sun::star::frame::CommandGroup::CONTROLS },
+ { GID_INTERN , frame::CommandGroup::INTERNAL },
+ { GID_APPLICATION , frame::CommandGroup::APPLICATION },
+ { GID_DOCUMENT , frame::CommandGroup::DOCUMENT },
+ { GID_VIEW , frame::CommandGroup::VIEW },
+ { GID_EDIT , frame::CommandGroup::EDIT },
+ { GID_MACRO , frame::CommandGroup::MACRO },
+ { GID_OPTIONS , frame::CommandGroup::OPTIONS },
+ { GID_MATH , frame::CommandGroup::MATH },
+ { GID_NAVIGATOR , frame::CommandGroup::NAVIGATOR },
+ { GID_INSERT , frame::CommandGroup::INSERT },
+ { GID_FORMAT , frame::CommandGroup::FORMAT },
+ { GID_TEMPLATE , frame::CommandGroup::TEMPLATE },
+ { GID_TEXT , frame::CommandGroup::TEXT },
+ { GID_FRAME , frame::CommandGroup::FRAME },
+ { GID_GRAPHIC , frame::CommandGroup::GRAPHIC },
+ { GID_TABLE , frame::CommandGroup::TABLE },
+ { GID_ENUMERATION , frame::CommandGroup::ENUMERATION },
+ { GID_DATA , frame::CommandGroup::DATA },
+ { GID_SPECIAL , frame::CommandGroup::SPECIAL },
+ { GID_IMAGE , frame::CommandGroup::IMAGE },
+ { GID_CHART , frame::CommandGroup::CHART },
+ { GID_EXPLORER , frame::CommandGroup::EXPLORER },
+ { GID_CONNECTOR , frame::CommandGroup::CONNECTOR },
+ { GID_MODIFY , frame::CommandGroup::MODIFY },
+ { GID_DRAWING , frame::CommandGroup::DRAWING },
+ { GID_CONTROLS , frame::CommandGroup::CONTROLS },
{ 0 , 0 }
};
@@ -173,7 +167,7 @@ sal_Int16 MapGroupIDToCommandGroup( sal_Int16 nGroupID )
if ( pIter != mHashMap.end() )
return pIter->second;
else
- return com::sun::star::frame::CommandGroup::INTERNAL;
+ return frame::CommandGroup::INTERNAL;
}
sal_uInt32 Get10ThSec()
@@ -194,11 +188,11 @@ void reschedule()
}
}
-class SfxStatusIndicator : public ::cppu::WeakImplHelper2< ::com::sun::star::task::XStatusIndicator, ::com::sun::star::lang::XEventListener >
+class SfxStatusIndicator : public ::cppu::WeakImplHelper2< task::XStatusIndicator, lang::XEventListener >
{
friend class SfxBaseController;
- ::com::sun::star::uno::Reference < XController > xOwner;
- ::com::sun::star::uno::Reference < ::com::sun::star::task::XStatusIndicator > xProgress;
+ Reference < XController > xOwner;
+ Reference < task::XStatusIndicator > xProgress;
SfxWorkWindow* pWorkWindow;
sal_Int32 _nRange;
sal_Int32 _nValue;
@@ -209,23 +203,23 @@ public:
, pWorkWindow( pWork )
{
++m_refCount;
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > xComponent(
- (static_cast< ::cppu::OWeakObject* >(pController)), ::com::sun::star::uno::UNO_QUERY );
+ Reference< lang::XComponent > xComponent(
+ (static_cast< ::cppu::OWeakObject* >(pController)), uno::UNO_QUERY );
if (xComponent.is())
xComponent->addEventListener(this);
--m_refCount;
}
- virtual void SAL_CALL start(const ::rtl::OUString& aText, sal_Int32 nRange) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL end(void) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setText(const ::rtl::OUString& aText) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL setValue(sal_Int32 nValue) throw(::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL reset() throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL start(const ::rtl::OUString& aText, sal_Int32 nRange) throw(RuntimeException);
+ virtual void SAL_CALL end(void) throw(RuntimeException);
+ virtual void SAL_CALL setText(const ::rtl::OUString& aText) throw(RuntimeException);
+ virtual void SAL_CALL setValue(sal_Int32 nValue) throw(RuntimeException);
+ virtual void SAL_CALL reset() throw(RuntimeException);
- virtual void SAL_CALL disposing( const com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disposing( const lang::EventObject& Source ) throw(RuntimeException);
};
-void SAL_CALL SfxStatusIndicator::start(const ::rtl::OUString& aText, sal_Int32 nRange) throw(::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxStatusIndicator::start(const ::rtl::OUString& aText, sal_Int32 nRange) throw(RuntimeException)
{
SolarMutexGuard aGuard;
if ( xOwner.is() )
@@ -244,7 +238,7 @@ void SAL_CALL SfxStatusIndicator::start(const ::rtl::OUString& aText, sal_Int32
}
}
-void SAL_CALL SfxStatusIndicator::end(void) throw(::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxStatusIndicator::end(void) throw(RuntimeException)
{
SolarMutexGuard aGuard;
if ( xOwner.is() )
@@ -259,7 +253,7 @@ void SAL_CALL SfxStatusIndicator::end(void) throw(::com::sun::star::uno::Runtime
}
}
-void SAL_CALL SfxStatusIndicator::setText(const ::rtl::OUString& aText) throw(::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxStatusIndicator::setText(const ::rtl::OUString& aText) throw(RuntimeException)
{
SolarMutexGuard aGuard;
if ( xOwner.is() )
@@ -274,7 +268,7 @@ void SAL_CALL SfxStatusIndicator::setText(const ::rtl::OUString& aText) throw(::
}
}
-void SAL_CALL SfxStatusIndicator::setValue( sal_Int32 nValue ) throw(::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxStatusIndicator::setValue( sal_Int32 nValue ) throw(RuntimeException)
{
SolarMutexGuard aGuard;
if ( xOwner.is() )
@@ -293,7 +287,7 @@ void SAL_CALL SfxStatusIndicator::setValue( sal_Int32 nValue ) throw(::com::sun:
}
}
-void SAL_CALL SfxStatusIndicator::reset() throw(::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxStatusIndicator::reset() throw(RuntimeException)
{
SolarMutexGuard aGuard;
if ( xOwner.is() )
@@ -308,7 +302,7 @@ void SAL_CALL SfxStatusIndicator::reset() throw(::com::sun::star::uno::RuntimeEx
}
}
-void SAL_CALL SfxStatusIndicator::disposing( const com::sun::star::lang::EventObject& /*Source*/ ) throw(::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxStatusIndicator::disposing( const lang::EventObject& /*Source*/ ) throw(RuntimeException)
{
SolarMutexGuard aGuard;
xOwner = 0;
@@ -319,13 +313,13 @@ void SAL_CALL SfxStatusIndicator::disposing( const com::sun::star::lang::EventOb
// declaration IMPL_SfxBaseController_ListenerHelper
//________________________________________________________________________________________________________
-class IMPL_SfxBaseController_ListenerHelper : public ::cppu::WeakImplHelper1< ::com::sun::star::frame::XFrameActionListener >
+class IMPL_SfxBaseController_ListenerHelper : public ::cppu::WeakImplHelper1< frame::XFrameActionListener >
{
public:
IMPL_SfxBaseController_ListenerHelper( SfxBaseController* pController ) ;
virtual ~IMPL_SfxBaseController_ListenerHelper() ;
- virtual void SAL_CALL frameAction( const FRAMEACTIONEVENT& aEvent ) throw (RUNTIMEEXCEPTION) ;
- virtual void SAL_CALL disposing( const EVENTOBJECT& aEvent ) throw (RUNTIMEEXCEPTION) ;
+ virtual void SAL_CALL frameAction( const frame::FrameActionEvent& aEvent ) throw (RuntimeException) ;
+ virtual void SAL_CALL disposing( const lang::EventObject& aEvent ) throw (RuntimeException) ;
private:
@@ -333,15 +327,15 @@ private:
} ; // class IMPL_SfxBaseController_ListenerContainer
-class IMPL_SfxBaseController_CloseListenerHelper : public ::cppu::WeakImplHelper1< ::com::sun::star::util::XCloseListener >
+class IMPL_SfxBaseController_CloseListenerHelper : public ::cppu::WeakImplHelper1< util::XCloseListener >
{
public:
IMPL_SfxBaseController_CloseListenerHelper( SfxBaseController* pController ) ;
virtual ~IMPL_SfxBaseController_CloseListenerHelper() ;
- virtual void SAL_CALL queryClosing( const EVENTOBJECT& aEvent, sal_Bool bDeliverOwnership )
- throw (RUNTIMEEXCEPTION, com::sun::star::util::CloseVetoException) ;
- virtual void SAL_CALL notifyClosing( const EVENTOBJECT& aEvent ) throw (RUNTIMEEXCEPTION) ;
- virtual void SAL_CALL disposing( const EVENTOBJECT& aEvent ) throw (RUNTIMEEXCEPTION) ;
+ virtual void SAL_CALL queryClosing( const lang::EventObject& aEvent, sal_Bool bDeliverOwnership )
+ throw (RuntimeException, util::CloseVetoException) ;
+ virtual void SAL_CALL notifyClosing( const lang::EventObject& aEvent ) throw (RuntimeException) ;
+ virtual void SAL_CALL disposing( const lang::EventObject& aEvent ) throw (RuntimeException) ;
private:
@@ -358,12 +352,12 @@ IMPL_SfxBaseController_CloseListenerHelper::~IMPL_SfxBaseController_CloseListene
{
}
-void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::disposing( const EVENTOBJECT& /*aEvent*/ ) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::disposing( const lang::EventObject& /*aEvent*/ ) throw( RuntimeException )
{
}
-void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const EVENTOBJECT& aEvent, sal_Bool bDeliverOwnership )
- throw (RUNTIMEEXCEPTION, com::sun::star::util::CloseVetoException)
+void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const lang::EventObject& aEvent, sal_Bool bDeliverOwnership )
+ throw (RuntimeException, util::CloseVetoException)
{
SolarMutexGuard aGuard;
SfxViewShell* pShell = m_pController->GetViewShell_Impl();
@@ -375,19 +369,19 @@ void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::queryClosing( const EV
if ( bDeliverOwnership && ( !pShell->GetWindow() || !pShell->GetWindow()->IsReallyVisible() ) )
{
// ignore Ownership in case of visible frame (will be closed by user)
- uno::Reference < frame::XModel > xModel( aEvent.Source, uno::UNO_QUERY );
+ Reference < frame::XModel > xModel( aEvent.Source, uno::UNO_QUERY );
if ( xModel.is() )
pShell->TakeOwnership_Impl();
else
pShell->TakeFrameOwnership_Impl();
}
- throw com::sun::star::util::CloseVetoException(::rtl::OUString("Controller disagree ..."),static_cast< ::cppu::OWeakObject*>(this));
+ throw util::CloseVetoException(::rtl::OUString("Controller disagree ..."),static_cast< ::cppu::OWeakObject*>(this));
}
}
}
-void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::notifyClosing( const EVENTOBJECT& /*aEvent*/ ) throw (RUNTIMEEXCEPTION)
+void SAL_CALL IMPL_SfxBaseController_CloseListenerHelper::notifyClosing( const lang::EventObject& /*aEvent*/ ) throw (RuntimeException)
{
}
@@ -401,8 +395,8 @@ struct IMPL_SfxBaseController_DataContainer
Reference< XFrameActionListener > m_xListener ;
Reference< XCloseListener > m_xCloseListener ;
::sfx2::UserInputInterception m_aUserInputInterception;
- OMULTITYPEINTERFACECONTAINERHELPER m_aListenerContainer ;
- OINTERFACECONTAINERHELPER m_aInterceptorContainer ;
+ ::cppu::OMultiTypeInterfaceContainerHelper m_aListenerContainer ;
+ ::cppu::OInterfaceContainerHelper m_aInterceptorContainer ;
Reference< XStatusIndicator > m_xIndicator ;
SfxViewShell* m_pViewShell ;
SfxBaseController* m_pController ;
@@ -411,7 +405,7 @@ struct IMPL_SfxBaseController_DataContainer
Reference< XTitle > m_xTitleHelper ;
Sequence< PropertyValue > m_aCreationArgs ;
- IMPL_SfxBaseController_DataContainer( MUTEX& aMutex ,
+ IMPL_SfxBaseController_DataContainer( ::osl::Mutex& aMutex ,
SfxViewShell* pViewShell ,
SfxBaseController* pController )
: m_xListener ( new IMPL_SfxBaseController_ListenerHelper( pController ) )
@@ -445,7 +439,7 @@ IMPL_SfxBaseController_ListenerHelper::~IMPL_SfxBaseController_ListenerHelper()
{
}
-void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACTIONEVENT& aEvent ) throw( RUNTIMEEXCEPTION )
+void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const frame::FrameActionEvent& aEvent ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
if (
@@ -454,12 +448,12 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACT
( m_pController->GetViewShell_Impl() && m_pController->GetViewShell_Impl()->GetWindow() != NULL )
)
{
- if ( aEvent.Action == ::com::sun::star::frame::FrameAction_FRAME_UI_ACTIVATED )
+ if ( aEvent.Action == frame::FrameAction_FRAME_UI_ACTIVATED )
{
if ( !m_pController->GetViewShell_Impl()->GetUIActiveIPClient_Impl() )
m_pController->GetViewShell_Impl()->GetViewFrame()->MakeActive_Impl( sal_False );
}
- else if ( aEvent.Action == ::com::sun::star::frame::FrameAction_CONTEXT_CHANGED )
+ else if ( aEvent.Action == frame::FrameAction_CONTEXT_CHANGED )
{
m_pController->GetViewShell_Impl()->GetViewFrame()->GetBindings().ContextChanged_Impl();
}
@@ -470,7 +464,7 @@ void SAL_CALL IMPL_SfxBaseController_ListenerHelper::frameAction( const FRAMEACT
// IMPL_SfxBaseController_ListenerHelper -> XEventListener
//________________________________________________________________________________________________________
-void SAL_CALL IMPL_SfxBaseController_ListenerHelper::disposing( const EVENTOBJECT& /*aEvent*/ ) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL IMPL_SfxBaseController_ListenerHelper::disposing( const lang::EventObject& /*aEvent*/ ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
if ( m_pController && m_pController->getFrame().is() )
@@ -555,15 +549,15 @@ SfxViewFrame& SfxBaseController::GetViewFrame_Impl() const
// SfxBaseController -> XController2 -> XController
//________________________________________________________________________________________________________
-void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame ) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL SfxBaseController::attachFrame( const Reference< frame::XFrame >& xFrame ) throw( RuntimeException )
{
- REFERENCE< XFRAME > xTemp( getFrame() ) ;
+ Reference< frame::XFrame > xTemp( getFrame() ) ;
SolarMutexGuard aGuard;
if ( xTemp.is() )
{
xTemp->removeFrameActionListener( m_pData->m_xListener ) ;
- REFERENCE < ::com::sun::star::util::XCloseBroadcaster > xCloseable( xTemp, com::sun::star::uno::UNO_QUERY );
+ Reference < util::XCloseBroadcaster > xCloseable( xTemp, uno::UNO_QUERY );
if ( xCloseable.is() )
xCloseable->removeCloseListener( m_pData->m_xCloseListener );
}
@@ -573,7 +567,7 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame
if ( xFrame.is() )
{
xFrame->addFrameActionListener( m_pData->m_xListener ) ;
- REFERENCE < ::com::sun::star::util::XCloseBroadcaster > xCloseable( xFrame, com::sun::star::uno::UNO_QUERY );
+ Reference < util::XCloseBroadcaster > xCloseable( xFrame, uno::UNO_QUERY );
if ( xCloseable.is() )
xCloseable->addCloseListener( m_pData->m_xCloseListener );
@@ -583,7 +577,7 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame
ShowInfoBars( );
// attaching the frame to the controller is the last step in the creation of a new view, so notify this
- SfxViewEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell(), uno::Reference< frame::XController2 >( this ) );
+ SfxViewEventHint aHint( SFX_EVENT_VIEWCREATED, GlobalEventConfig::GetEventName( STR_EVENT_VIEWCREATED ), m_pData->m_pViewShell->GetObjectShell(), Reference< frame::XController2 >( this ) );
SFX_APP()->NotifyEvent( aHint );
}
}
@@ -593,7 +587,7 @@ void SAL_CALL SfxBaseController::attachFrame( const REFERENCE< XFRAME >& xFrame
// SfxBaseController -> XController
//________________________________________________________________________________________________________
-sal_Bool SAL_CALL SfxBaseController::attachModel( const REFERENCE< XMODEL >& xModel ) throw( ::com::sun::star::uno::RuntimeException )
+sal_Bool SAL_CALL SfxBaseController::attachModel( const Reference< frame::XModel >& xModel ) throw( RuntimeException )
{
if ( m_pData->m_pViewShell && xModel.is() && xModel != m_pData->m_pViewShell->GetObjectShell()->GetModel() )
{
@@ -602,7 +596,7 @@ sal_Bool SAL_CALL SfxBaseController::attachModel( const REFERENCE< XMODEL >& xMo
return sal_False;
}
- REFERENCE < ::com::sun::star::util::XCloseBroadcaster > xCloseable( xModel, com::sun::star::uno::UNO_QUERY );
+ Reference < util::XCloseBroadcaster > xCloseable( xModel, uno::UNO_QUERY );
if ( xCloseable.is() )
xCloseable->addCloseListener( m_pData->m_xCloseListener );
return sal_True;
@@ -612,7 +606,7 @@ sal_Bool SAL_CALL SfxBaseController::attachModel( const REFERENCE< XMODEL >& xMo
// SfxBaseController -> XController
//________________________________________________________________________________________________________
-sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::sun::star::uno::RuntimeException )
+sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
@@ -670,9 +664,9 @@ sal_Bool SAL_CALL SfxBaseController::suspend( sal_Bool bSuspend ) throw( ::com::
// SfxBaseController -> XController
//________________________________________________________________________________________________________
-ANY SfxBaseController::getViewData() throw( ::com::sun::star::uno::RuntimeException )
+uno::Any SfxBaseController::getViewData() throw( RuntimeException )
{
- ANY aAny;
+ uno::Any aAny;
String sData1;
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
@@ -689,7 +683,7 @@ ANY SfxBaseController::getViewData() throw( ::com::sun::star::uno::RuntimeExcept
// SfxBaseController -> XController
//________________________________________________________________________________________________________
-void SAL_CALL SfxBaseController::restoreViewData( const ANY& aValue ) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL SfxBaseController::restoreViewData( const uno::Any& aValue ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
@@ -704,7 +698,7 @@ void SAL_CALL SfxBaseController::restoreViewData( const ANY& aValue ) throw( ::c
// SfxBaseController -> XController
//________________________________________________________________________________________________________
-REFERENCE< XFRAME > SAL_CALL SfxBaseController::getFrame() throw( ::com::sun::star::uno::RuntimeException )
+Reference< frame::XFrame > SAL_CALL SfxBaseController::getFrame() throw( RuntimeException )
{
SolarMutexGuard aGuard;
return m_pData->m_xFrame;
@@ -714,22 +708,22 @@ REFERENCE< XFRAME > SAL_CALL SfxBaseController::getFrame() throw( ::com::sun::st
// SfxBaseController -> XController
//________________________________________________________________________________________________________
-REFERENCE< XMODEL > SAL_CALL SfxBaseController::getModel() throw( ::com::sun::star::uno::RuntimeException )
+Reference< frame::XModel > SAL_CALL SfxBaseController::getModel() throw( RuntimeException )
{
SolarMutexGuard aGuard;
- return m_pData->m_pViewShell ? m_pData->m_pViewShell->GetObjectShell()->GetModel() : REFERENCE < XMODEL > () ;
+ return m_pData->m_pViewShell ? m_pData->m_pViewShell->GetObjectShell()->GetModel() : Reference < frame::XModel > () ;
}
//________________________________________________________________________________________________________
// SfxBaseController -> XDispatchProvider
//________________________________________________________________________________________________________
-REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOURL& aURL ,
+Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const util::URL& aURL ,
const ::rtl::OUString& sTargetFrameName,
- sal_Int32 eSearchFlags ) throw( RUNTIMEEXCEPTION )
+ sal_Int32 eSearchFlags ) throw( RuntimeException )
{
SolarMutexGuard aGuard;
- REFERENCE< XDISPATCH > xDisp;
+ Reference< frame::XDispatch > xDisp;
if ( m_pData->m_pViewShell )
{
SfxViewFrame* pAct = m_pData->m_pViewShell->GetViewFrame() ;
@@ -738,18 +732,18 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
if ( sTargetFrameName == "_beamer" )
{
SfxViewFrame *pFrame = m_pData->m_pViewShell->GetViewFrame();
- if ( eSearchFlags & ( ::com::sun::star::frame::FrameSearchFlag::CREATE ))
+ if ( eSearchFlags & ( frame::FrameSearchFlag::CREATE ))
pFrame->SetChildWindow( SID_BROWSER, sal_True );
SfxChildWindow* pChildWin = pFrame->GetChildWindow( SID_BROWSER );
- REFERENCE < XFRAME > xFrame;
+ Reference < frame::XFrame > xFrame;
if ( pChildWin )
xFrame = ( pChildWin->GetFrame() );
if ( xFrame.is() )
xFrame->setName( sTargetFrameName );
- Reference< XDispatchProvider > xProv( xFrame, ::com::sun::star::uno::UNO_QUERY );
+ Reference< XDispatchProvider > xProv( xFrame, uno::UNO_QUERY );
if ( xProv.is() )
- return xProv->queryDispatch( aURL, sTargetFrameName, ::com::sun::star::frame::FrameSearchFlag::SELF );
+ return xProv->queryDispatch( aURL, sTargetFrameName, frame::FrameSearchFlag::SELF );
}
if ( aURL.Protocol == ".uno:" )
@@ -770,10 +764,10 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
else
{
// try to find parent SfxViewFrame
- uno::Reference< frame::XFrame > xParentFrame;
- uno::Reference< frame::XFrame > xOwnFrame = pAct->GetFrame().GetFrameInterface();
+ Reference< frame::XFrame > xParentFrame;
+ Reference< frame::XFrame > xOwnFrame = pAct->GetFrame().GetFrameInterface();
if ( xOwnFrame.is() )
- xParentFrame = uno::Reference< frame::XFrame >( xOwnFrame->getCreator(), uno::UNO_QUERY );
+ xParentFrame = Reference< frame::XFrame >( xOwnFrame->getCreator(), uno::UNO_QUERY );
if ( xParentFrame.is() )
{
@@ -827,10 +821,10 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
else
{
// try to find parent SfxViewFrame
- uno::Reference< frame::XFrame > xParentFrame;
- uno::Reference< frame::XFrame > xOwnFrame = pAct->GetFrame().GetFrameInterface();
+ Reference< frame::XFrame > xParentFrame;
+ Reference< frame::XFrame > xOwnFrame = pAct->GetFrame().GetFrameInterface();
if ( xOwnFrame.is() )
- xParentFrame = uno::Reference< frame::XFrame >( xOwnFrame->getCreator(), uno::UNO_QUERY );
+ xParentFrame = Reference< frame::XFrame >( xOwnFrame->getCreator(), uno::UNO_QUERY );
if ( xParentFrame.is() )
{
@@ -863,13 +857,13 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
else if( sTargetFrameName.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("_self")) || sTargetFrameName.isEmpty() )
{
// check for already loaded URL ... but with additional jumpmark!
- REFERENCE< XMODEL > xModel = getModel();
+ Reference< frame::XModel > xModel = getModel();
if( xModel.is() && !aURL.Mark.isEmpty() )
{
SfxSlotPool& rSlotPool = SfxSlotPool::GetSlotPool( pAct );
const SfxSlot* pSlot = rSlotPool.GetSlot( SID_JUMPTOMARK );
if( !aURL.Main.isEmpty() && aURL.Main == xModel->getURL() && pSlot )
- return REFERENCE< XDISPATCH >( new SfxOfficeDispatch( pAct->GetBindings(), pAct->GetDispatcher(), pSlot, aURL) );
+ return Reference< frame::XDispatch >( new SfxOfficeDispatch( pAct->GetBindings(), pAct->GetDispatcher(), pSlot, aURL) );
}
}
}
@@ -882,12 +876,12 @@ REFERENCE< XDISPATCH > SAL_CALL SfxBaseController::queryDispatch( const UNOU
// SfxBaseController -> XDispatchProvider
//________________________________________________________________________________________________________
-uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatches( const uno::Sequence< DISPATCHDESCRIPTOR >& seqDescripts ) throw( ::com::sun::star::uno::RuntimeException )
+uno::Sequence< Reference< frame::XDispatch > > SAL_CALL SfxBaseController::queryDispatches( const uno::Sequence< frame::DispatchDescriptor >& seqDescripts ) throw( RuntimeException )
{
// Create return list - which must have same size then the given descriptor
// It's not allowed to pack it!
sal_Int32 nCount = seqDescripts.getLength();
- uno::Sequence< REFERENCE< XDISPATCH > > lDispatcher( nCount );
+ uno::Sequence< Reference< frame::XDispatch > > lDispatcher( nCount );
for( sal_Int32 i=0; i<nCount; ++i )
{
@@ -904,7 +898,7 @@ uno::Sequence< REFERENCE< XDISPATCH > > SAL_CALL SfxBaseController::queryDispatc
//________________________________________________________________________________________________________
frame::BorderWidths SAL_CALL SfxBaseController::getBorder()
- throw ( uno::RuntimeException )
+ throw ( RuntimeException )
{
frame::BorderWidths aResult;
@@ -921,22 +915,22 @@ frame::BorderWidths SAL_CALL SfxBaseController::getBorder()
return aResult;
}
-void SAL_CALL SfxBaseController::addBorderResizeListener( const uno::Reference< frame::XBorderResizeListener >& xListener )
- throw ( uno::RuntimeException )
+void SAL_CALL SfxBaseController::addBorderResizeListener( const Reference< frame::XBorderResizeListener >& xListener )
+ throw ( RuntimeException )
{
- m_pData->m_aListenerContainer.addInterface( ::getCppuType((const uno::Reference< frame::XBorderResizeListener >*)0),
+ m_pData->m_aListenerContainer.addInterface( ::getCppuType((const Reference< frame::XBorderResizeListener >*)0),
xListener );
}
-void SAL_CALL SfxBaseController::removeBorderResizeListener( const uno::Reference< frame::XBorderResizeListener >& xListener )
- throw ( uno::RuntimeException )
+void SAL_CALL SfxBaseController::removeBorderResizeListener( const Reference< frame::XBorderResizeListener >& xListener )
+ throw ( RuntimeException )
{
- m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const uno::Reference< frame::XBorderResizeListener >*)0),
+ m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const Reference< frame::XBorderResizeListener >*)0),
xListener );
}
awt::Rectangle SAL_CALL SfxBaseController::queryBorderedArea( const awt::Rectangle& aPreliminaryRectangle )
- throw ( uno::RuntimeException )
+ throw ( RuntimeException )
{
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
@@ -952,11 +946,11 @@ awt::Rectangle SAL_CALL SfxBaseController::queryBorderedArea( const awt::Rectang
void SfxBaseController::BorderWidthsChanged_Impl()
{
::cppu::OInterfaceContainerHelper* pContainer = m_pData->m_aListenerContainer.getContainer(
- ::getCppuType( ( const uno::Reference< frame::XBorderResizeListener >*) NULL ) );
+ ::getCppuType( ( const Reference< frame::XBorderResizeListener >*) NULL ) );
if ( pContainer )
{
frame::BorderWidths aBWidths = getBorder();
- uno::Reference< uno::XInterface > xThis( static_cast< ::cppu::OWeakObject* >(this), uno::UNO_QUERY );
+ Reference< uno::XInterface > xThis( static_cast< ::cppu::OWeakObject* >(this), uno::UNO_QUERY );
::cppu::OInterfaceIteratorHelper pIterator(*pContainer);
while (pIterator.hasMoreElements())
@@ -965,7 +959,7 @@ void SfxBaseController::BorderWidthsChanged_Impl()
{
((frame::XBorderResizeListener*)pIterator.next())->borderWidthsChanged( xThis, aBWidths );
}
- catch (const uno::RuntimeException&)
+ catch (const RuntimeException&)
{
pIterator.remove();
}
@@ -977,13 +971,13 @@ void SfxBaseController::BorderWidthsChanged_Impl()
// SfxBaseController -> XComponent
//________________________________________________________________________________________________________
-void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL SfxBaseController::dispose() throw( RuntimeException )
{
SolarMutexGuard aGuard;
Reference< XController > xTmp( this );
m_pData->m_bDisposing = sal_True ;
- EVENTOBJECT aEventObject;
+ lang::EventObject aEventObject;
aEventObject.Source = *this ;
m_pData->m_aListenerContainer.disposeAndClear( aEventObject ) ;
@@ -1000,7 +994,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
if ( pFrame )
{
- EVENTOBJECT aObject;
+ lang::EventObject aObject;
aObject.Source = *this ;
SfxObjectShell* pDoc = pFrame->GetObjectShell() ;
@@ -1013,12 +1007,12 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
pView = SfxViewFrame::GetNext( *pView, pDoc );
}
- SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, uno::Reference< frame::XController2 >( this ) ) );
+ SFX_APP()->NotifyEvent( SfxViewEventHint(SFX_EVENT_CLOSEVIEW, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEVIEW ), pDoc, Reference< frame::XController2 >( this ) ) );
if ( !pView )
SFX_APP()->NotifyEvent( SfxEventHint(SFX_EVENT_CLOSEDOC, GlobalEventConfig::GetEventName( STR_EVENT_CLOSEDOC ), pDoc) );
- REFERENCE< XMODEL > xModel = pDoc->GetModel();
- REFERENCE < ::com::sun::star::util::XCloseable > xCloseable( xModel, com::sun::star::uno::UNO_QUERY );
+ Reference< frame::XModel > xModel = pDoc->GetModel();
+ Reference < util::XCloseable > xCloseable( xModel, uno::UNO_QUERY );
if ( xModel.is() )
{
xModel->disconnectController( this );
@@ -1026,7 +1020,7 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
xCloseable->removeCloseListener( m_pData->m_xCloseListener );
}
- REFERENCE < XFRAME > aXFrame;
+ Reference < frame::XFrame > aXFrame;
attachFrame( aXFrame );
m_pData->m_xListener->disposing( aObject );
@@ -1048,18 +1042,18 @@ void SAL_CALL SfxBaseController::dispose() throw( ::com::sun::star::uno::Runtime
// SfxBaseController -> XComponent
//________________________________________________________________________________________________________
-void SAL_CALL SfxBaseController::addEventListener( const REFERENCE< XEVENTLISTENER >& aListener ) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL SfxBaseController::addEventListener( const Reference< lang::XEventListener >& aListener ) throw( RuntimeException )
{
- m_pData->m_aListenerContainer.addInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), aListener );
+ m_pData->m_aListenerContainer.addInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
}
//________________________________________________________________________________________________________
// SfxBaseController -> XComponent
//________________________________________________________________________________________________________
-void SAL_CALL SfxBaseController::removeEventListener( const REFERENCE< XEVENTLISTENER >& aListener ) throw( ::com::sun::star::uno::RuntimeException )
+void SAL_CALL SfxBaseController::removeEventListener( const Reference< lang::XEventListener >& aListener ) throw( RuntimeException )
{
- m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const REFERENCE< XEVENTLISTENER >*)0), aListener );
+ m_pData->m_aListenerContainer.removeInterface( ::getCppuType((const Reference< lang::XEventListener >*)0), aListener );
}
void SfxBaseController::ReleaseShell_Impl()
@@ -1068,8 +1062,8 @@ void SfxBaseController::ReleaseShell_Impl()
if ( m_pData->m_pViewShell )
{
SfxObjectShell* pDoc = m_pData->m_pViewShell->GetObjectShell() ;
- REFERENCE< XMODEL > xModel = pDoc->GetModel();
- REFERENCE < ::com::sun::star::util::XCloseable > xCloseable( xModel, com::sun::star::uno::UNO_QUERY );
+ Reference< frame::XModel > xModel = pDoc->GetModel();
+ Reference < util::XCloseable > xCloseable( xModel, uno::UNO_QUERY );
if ( xModel.is() )
{
xModel->disconnectController( this );
@@ -1078,7 +1072,7 @@ void SfxBaseController::ReleaseShell_Impl()
}
m_pData->m_pViewShell = 0;
- REFERENCE < XFRAME > aXFrame;
+ Reference < frame::XFrame > aXFrame;
attachFrame( aXFrame );
}
}
@@ -1088,7 +1082,7 @@ SfxViewShell* SfxBaseController::GetViewShell_Impl() const
return m_pData->m_pViewShell;
}
-::com::sun::star::uno::Reference< ::com::sun::star::task::XStatusIndicator > SAL_CALL SfxBaseController::getStatusIndicator( ) throw (::com::sun::star::uno::RuntimeException)
+Reference< task::XStatusIndicator > SAL_CALL SfxBaseController::getStatusIndicator( ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell && !m_pData->m_xIndicator.is() )
@@ -1096,7 +1090,7 @@ SfxViewShell* SfxBaseController::GetViewShell_Impl() const
return m_pData->m_xIndicator;
}
-void SAL_CALL SfxBaseController::registerContextMenuInterceptor( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor ) throw( RUNTIMEEXCEPTION )
+void SAL_CALL SfxBaseController::registerContextMenuInterceptor( const Reference< ui::XContextMenuInterceptor >& xInterceptor ) throw( RuntimeException )
{
m_pData->m_aInterceptorContainer.addInterface( xInterceptor );
@@ -1106,7 +1100,7 @@ void SAL_CALL SfxBaseController::registerContextMenuInterceptor( const REFERENCE
m_pData->m_pViewShell->AddContextMenuInterceptor_Impl( xInterceptor );
}
-void SAL_CALL SfxBaseController::releaseContextMenuInterceptor( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor ) throw( RUNTIMEEXCEPTION )
+void SAL_CALL SfxBaseController::releaseContextMenuInterceptor( const Reference< ui::XContextMenuInterceptor >& xInterceptor ) throw( RuntimeException )
{
m_pData->m_aInterceptorContainer.removeInterface( xInterceptor );
@@ -1116,32 +1110,32 @@ void SAL_CALL SfxBaseController::releaseContextMenuInterceptor( const REFERENCE<
m_pData->m_pViewShell->RemoveContextMenuInterceptor_Impl( xInterceptor );
}
-void SAL_CALL SfxBaseController::addKeyHandler( const ::com::sun::star::uno::Reference< XKEYHANDLER >& xHandler ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxBaseController::addKeyHandler( const Reference< awt::XKeyHandler >& xHandler ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
m_pData->m_aUserInputInterception.addKeyHandler( xHandler );
}
-void SAL_CALL SfxBaseController::removeKeyHandler( const ::com::sun::star::uno::Reference< XKEYHANDLER >& xHandler ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxBaseController::removeKeyHandler( const Reference< awt::XKeyHandler >& xHandler ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
m_pData->m_aUserInputInterception.removeKeyHandler( xHandler );
}
-void SAL_CALL SfxBaseController::addMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxBaseController::addMouseClickHandler( const Reference< awt::XMouseClickHandler >& xHandler ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
m_pData->m_aUserInputInterception.addMouseClickHandler( xHandler );
}
-void SAL_CALL SfxBaseController::removeMouseClickHandler( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XMouseClickHandler >& xHandler ) throw (::com::sun::star::uno::RuntimeException)
+void SAL_CALL SfxBaseController::removeMouseClickHandler( const Reference< awt::XMouseClickHandler >& xHandler ) throw (RuntimeException)
{
SolarMutexGuard aGuard;
m_pData->m_aUserInputInterception.removeMouseClickHandler( xHandler );
}
-::com::sun::star::uno::Sequence< sal_Int16 > SAL_CALL SfxBaseController::getSupportedCommandGroups()
-throw (::com::sun::star::uno::RuntimeException)
+uno::Sequence< sal_Int16 > SAL_CALL SfxBaseController::getSupportedCommandGroups()
+throw (RuntimeException)
{
SolarMutexGuard aGuard;
@@ -1169,15 +1163,15 @@ throw (::com::sun::star::uno::RuntimeException)
}
}
- ::com::sun::star::uno::Sequence< sal_Int16 > aSeq =
+ uno::Sequence< sal_Int16 > aSeq =
comphelper::containerToSequence< sal_Int16 >( aGroupList );
return aSeq;
}
-::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > SAL_CALL SfxBaseController::getConfigurableDispatchInformation( sal_Int16 nCmdGroup )
-throw (::com::sun::star::uno::RuntimeException)
+uno::Sequence< frame::DispatchInformation > SAL_CALL SfxBaseController::getConfigurableDispatchInformation( sal_Int16 nCmdGroup )
+throw (RuntimeException)
{
- std::list< ::com::sun::star::frame::DispatchInformation > aCmdList;
+ std::list< frame::DispatchInformation > aCmdList;
SolarMutexGuard aGuard;
if ( m_pData->m_pViewShell )
@@ -1202,7 +1196,7 @@ throw (::com::sun::star::uno::RuntimeException)
{
if ( pSfxSlot->GetMode() & nMode )
{
- ::com::sun::star::frame::DispatchInformation aCmdInfo;
+ frame::DispatchInformation aCmdInfo;
::rtl::OUStringBuffer aBuf( aCmdPrefix );
aBuf.appendAscii( pSfxSlot->GetUnoName() );
aCmdInfo.Command = aBuf.makeStringAndClear();
@@ -1216,8 +1210,8 @@ throw (::com::sun::star::uno::RuntimeException)
}
}
- ::com::sun::star::uno::Sequence< ::com::sun::star::frame::DispatchInformation > aSeq =
- comphelper::containerToSequence< ::com::sun::star::frame::DispatchInformation, std::list< ::com::sun::star::frame::DispatchInformation > >( aCmdList );
+ uno::Sequence< frame::DispatchInformation > aSeq =
+ comphelper::containerToSequence< frame::DispatchInformation, std::list< frame::DispatchInformation > >( aCmdList );
return aSeq;
}
@@ -1264,8 +1258,8 @@ void SfxBaseController::ConnectSfxFrame_Impl( const ConnectSfxFrame i_eConnect )
// size constant, if possible
try
{
- uno::Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW );
- uno::Reference< beans::XPropertySet > xLayouterProps(
+ Reference< beans::XPropertySet > xFrameProps( m_pData->m_xFrame, uno::UNO_QUERY_THROW );
+ Reference< beans::XPropertySet > xLayouterProps(
xFrameProps->getPropertyValue( ::rtl::OUString( "LayoutManager" ) ), uno::UNO_QUERY_THROW );
xLayouterProps->setPropertyValue( ::rtl::OUString( "PreserveContentSize" ), uno::makeAny( sal_True ) );
}
@@ -1433,7 +1427,7 @@ void SfxBaseController::ShowInfoBars( )
if ( m_pData->m_pViewShell )
{
// CMIS verifications
- REFERENCE< document::XCmisDocument > xCmisDoc( m_pData->m_pViewShell->GetObjectShell()->GetModel(), uno::UNO_QUERY );
+ Reference< document::XCmisDocument > xCmisDoc( m_pData->m_pViewShell->GetObjectShell()->GetModel(), uno::UNO_QUERY );
if ( xCmisDoc.is( ) && xCmisDoc->canCheckOut( ) )
{
beans::PropertyValues aCmisProperties = xCmisDoc->getCmisPropertiesValues( );
@@ -1476,18 +1470,18 @@ IMPL_LINK_NOARG ( SfxBaseController, CheckOutHandler )
//=============================================================================
-css::uno::Reference< css::frame::XTitle > SfxBaseController::impl_getTitleHelper ()
+Reference< frame::XTitle > SfxBaseController::impl_getTitleHelper ()
{
SolarMutexGuard aGuard;
if ( ! m_pData->m_xTitleHelper.is ())
{
- css::uno::Reference< css::frame::XModel > xModel = getModel ();
- css::uno::Reference< css::frame::XUntitledNumbers > xUntitledProvider(xModel , css::uno::UNO_QUERY );
- css::uno::Reference< css::frame::XController > xThis (static_cast< css::frame::XController* >(this), css::uno::UNO_QUERY_THROW);
+ Reference< frame::XModel > xModel = getModel ();
+ Reference< frame::XUntitledNumbers > xUntitledProvider(xModel , uno::UNO_QUERY );
+ Reference< frame::XController > xThis (static_cast< frame::XController* >(this), uno::UNO_QUERY_THROW);
::framework::TitleHelper* pHelper = new ::framework::TitleHelper(::comphelper::getProcessComponentContext());
- m_pData->m_xTitleHelper = css::uno::Reference< css::frame::XTitle >(static_cast< ::cppu::OWeakObject* >(pHelper), css::uno::UNO_QUERY_THROW);
+ m_pData->m_xTitleHelper = Reference< frame::XTitle >(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
pHelper->setOwner (xThis );
pHelper->connectWithUntitledNumbers (xUntitledProvider);
@@ -1497,37 +1491,37 @@ css::uno::Reference< css::frame::XTitle > SfxBaseController::impl_getTitleHelper
}
//=============================================================================
-// css::frame::XTitle
+// frame::XTitle
::rtl::OUString SAL_CALL SfxBaseController::getTitle()
- throw (css::uno::RuntimeException)
+ throw (RuntimeException)
{
return impl_getTitleHelper()->getTitle ();
}
//=============================================================================
-// css::frame::XTitle
+// frame::XTitle
void SAL_CALL SfxBaseController::setTitle(const ::rtl::OUString& sTitle)
- throw (css::uno::RuntimeException)
+ throw (RuntimeException)
{
impl_getTitleHelper()->setTitle (sTitle);
}
//=============================================================================
-// css::frame::XTitleChangeBroadcaster
-void SAL_CALL SfxBaseController::addTitleChangeListener(const css::uno::Reference< css::frame::XTitleChangeListener >& xListener)
- throw (css::uno::RuntimeException)
+// frame::XTitleChangeBroadcaster
+void SAL_CALL SfxBaseController::addTitleChangeListener(const Reference< frame::XTitleChangeListener >& xListener)
+ throw (RuntimeException)
{
- css::uno::Reference< css::frame::XTitleChangeBroadcaster > xBroadcaster(impl_getTitleHelper(), css::uno::UNO_QUERY);
+ Reference< frame::XTitleChangeBroadcaster > xBroadcaster(impl_getTitleHelper(), uno::UNO_QUERY);
if (xBroadcaster.is ())
xBroadcaster->addTitleChangeListener (xListener);
}
//=============================================================================
-// css::frame::XTitleChangeBroadcaster
-void SAL_CALL SfxBaseController::removeTitleChangeListener(const css::uno::Reference< css::frame::XTitleChangeListener >& xListener)
- throw (css::uno::RuntimeException)
+// frame::XTitleChangeBroadcaster
+void SAL_CALL SfxBaseController::removeTitleChangeListener(const Reference< frame::XTitleChangeListener >& xListener)
+ throw (RuntimeException)
{
- css::uno::Reference< css::frame::XTitleChangeBroadcaster > xBroadcaster(impl_getTitleHelper(), css::uno::UNO_QUERY);
+ Reference< frame::XTitleChangeBroadcaster > xBroadcaster(impl_getTitleHelper(), uno::UNO_QUERY);
if (xBroadcaster.is ())
xBroadcaster->removeTitleChangeListener (xListener);
}
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 57ab1077b14a..4760de15ad6a 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -448,12 +448,12 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
}
case SID_ACTIVATE_STYLE_APPLY:
{
- com::sun::star::uno::Reference< com::sun::star::frame::XFrame > xFrame(
+ uno::Reference< frame::XFrame > xFrame(
GetViewFrame()->GetFrame().GetFrameInterface(),
- com::sun::star::uno::UNO_QUERY);
+ uno::UNO_QUERY);
- Reference< com::sun::star::beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
- Reference< ::com::sun::star::frame::XLayoutManager > xLayoutManager;
+ Reference< beans::XPropertySet > xPropSet( xFrame, UNO_QUERY );
+ Reference< frame::XLayoutManager > xLayoutManager;
if ( xPropSet.is() )
{
try
@@ -705,7 +705,7 @@ void SfxViewShell::ExecMisc_Impl( SfxRequest &rReq )
{
xStorable->storeToURL( aFileURL, aArgs );
}
- catch (const com::sun::star::io::IOException&)
+ catch (const io::IOException&)
{
rReq.Done(sal_False);
return;
@@ -1497,11 +1497,11 @@ void SfxViewShell::ReadUserData(const String&, sal_Bool )
{
}
-void SfxViewShell::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool )
+void SfxViewShell::ReadUserDataSequence ( const uno::Sequence < beans::PropertyValue >&, sal_Bool )
{
}
-void SfxViewShell::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >&, sal_Bool )
+void SfxViewShell::WriteUserDataSequence ( uno::Sequence < beans::PropertyValue >&, sal_Bool )
{
}
@@ -1929,12 +1929,12 @@ SfxBaseController* SfxViewShell::GetBaseController_Impl() const
return pImp->m_pController.get();
}
-void SfxViewShell::AddContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor )
+void SfxViewShell::AddContextMenuInterceptor_Impl( const uno::Reference< ui::XContextMenuInterceptor >& xInterceptor )
{
pImp->aInterceptorContainer.addInterface( xInterceptor );
}
-void SfxViewShell::RemoveContextMenuInterceptor_Impl( const REFERENCE< XCONTEXTMENUINTERCEPTOR >& xInterceptor )
+void SfxViewShell::RemoveContextMenuInterceptor_Impl( const uno::Reference< ui::XContextMenuInterceptor >& xInterceptor )
{
pImp->aInterceptorContainer.removeInterface( xInterceptor );
}