diff options
author | Ashod Nakashian <ashodnakashian@yahoo.com> | 2015-11-10 19:20:12 -0500 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-11-12 10:47:26 +0000 |
commit | d7801c39826f2f24f7340e1b25809d3bb65d6099 (patch) | |
tree | 6acf82af5954e72930272fd62ac37c07664cf937 /svx/source/form | |
parent | b34eab5996c52269360d166815ef15a250627c48 (diff) |
Namespace cleanup and disambiguation
Change-Id: Ib6d2f8b4e71436c3a7c26bdfc9847152ebaf0739
Reviewed-on: https://gerrit.libreoffice.org/19900
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/form')
-rw-r--r-- | svx/source/form/fmshimp.cxx | 9 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 79 |
2 files changed, 43 insertions, 45 deletions
diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index b1d59bf1ae1f..307454051047 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -265,7 +265,6 @@ using namespace ::com::sun::star::form::runtime; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::view; using namespace ::com::sun::star::util; -using namespace ::com::sun::star::frame; using namespace ::com::sun::star::script; using namespace ::svxform; using namespace ::svx; @@ -675,14 +674,14 @@ FmXFormShell::~FmXFormShell() } -Reference< XModel > FmXFormShell::getContextDocument() const +Reference< css::frame::XModel > FmXFormShell::getContextDocument() const { - Reference< XModel > xModel; + Reference< css::frame::XModel > xModel; // determine the type of document we live in try { - Reference< XController > xController; + Reference< css::frame::XController > xController; if ( m_xAttachedFrame.is() ) xController = m_xAttachedFrame->getController(); if ( xController.is() ) @@ -719,7 +718,7 @@ bool FmXFormShell::impl_checkDisposed() const return m_eDocumentType; // determine the type of document we live in - Reference< XModel > xModel = getContextDocument(); + Reference< css::frame::XModel > xModel = getContextDocument(); if ( xModel.is() ) m_eDocumentType = DocumentClassification::classifyDocument( xModel ); else diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 89a608b80a82..9b787da6af25 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -72,7 +72,6 @@ namespace svx using namespace ::com::sun::star; using namespace ::com::sun::star::uno; - using namespace ::com::sun::star::awt; using namespace ::com::sun::star::form; using namespace ::com::sun::star::form::runtime; using namespace ::com::sun::star::lang; @@ -160,16 +159,16 @@ namespace svx 0 }; - typedef ::cppu::WeakImplHelper < XFocusListener + typedef ::cppu::WeakImplHelper < css::awt::XFocusListener > FmFocusListenerAdapter_Base; class FmFocusListenerAdapter : public FmFocusListenerAdapter_Base { private: IFocusObserver* m_pObserver; - Reference< XWindow > m_xWindow; + Reference< css::awt::XWindow > m_xWindow; public: - FmFocusListenerAdapter( const Reference< XControl >& _rxControl, IFocusObserver* _pObserver ); + FmFocusListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IFocusObserver* _pObserver ); // clean up the instance void dispose(); @@ -178,14 +177,14 @@ namespace svx virtual ~FmFocusListenerAdapter(); protected: - virtual void SAL_CALL focusGained( const FocusEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL focusLost( const FocusEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL focusGained( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL focusLost( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) override; virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException, std::exception) override; }; - FmFocusListenerAdapter::FmFocusListenerAdapter( const Reference< XControl >& _rxControl, IFocusObserver* _pObserver ) + FmFocusListenerAdapter::FmFocusListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IFocusObserver* _pObserver ) :m_pObserver( _pObserver ) ,m_xWindow( _rxControl, UNO_QUERY ) { @@ -225,14 +224,14 @@ namespace svx } - void SAL_CALL FmFocusListenerAdapter::focusGained( const FocusEvent& e ) throw (RuntimeException, std::exception) + void SAL_CALL FmFocusListenerAdapter::focusGained( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) { if ( m_pObserver ) m_pObserver->focusGained( e ); } - void SAL_CALL FmFocusListenerAdapter::focusLost( const FocusEvent& e ) throw (RuntimeException, std::exception) + void SAL_CALL FmFocusListenerAdapter::focusLost( const css::awt::FocusEvent& e ) throw (RuntimeException, std::exception) { if ( m_pObserver ) m_pObserver->focusLost( e ); @@ -246,16 +245,16 @@ namespace svx m_xWindow.clear(); } - typedef ::cppu::WeakImplHelper < XMouseListener + typedef ::cppu::WeakImplHelper < css::awt::XMouseListener > FmMouseListenerAdapter_Base; class FmMouseListenerAdapter : public FmMouseListenerAdapter_Base { private: IContextRequestObserver* m_pObserver; - Reference< XWindow > m_xWindow; + Reference< css::awt::XWindow > m_xWindow; public: - FmMouseListenerAdapter( const Reference< XControl >& _rxControl, IContextRequestObserver* _pObserver ); + FmMouseListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IContextRequestObserver* _pObserver ); // clean up the instance void dispose(); @@ -264,14 +263,14 @@ namespace svx virtual ~FmMouseListenerAdapter(); protected: - virtual void SAL_CALL mousePressed( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL mouseReleased( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL mouseEntered( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; - virtual void SAL_CALL mouseExited( const awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mousePressed( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mouseReleased( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mouseEntered( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; + virtual void SAL_CALL mouseExited( const css::awt::MouseEvent& e ) throw (RuntimeException, std::exception) override; virtual void SAL_CALL disposing( const EventObject& Source ) throw (RuntimeException, std::exception) override; }; - FmMouseListenerAdapter::FmMouseListenerAdapter( const Reference< XControl >& _rxControl, IContextRequestObserver* _pObserver ) + FmMouseListenerAdapter::FmMouseListenerAdapter( const Reference< css::awt::XControl >& _rxControl, IContextRequestObserver* _pObserver ) :m_pObserver( _pObserver ) ,m_xWindow( _rxControl, UNO_QUERY ) { @@ -311,7 +310,7 @@ namespace svx } - void SAL_CALL FmMouseListenerAdapter::mousePressed( const awt::MouseEvent& _rEvent ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mousePressed( const css::awt::MouseEvent& _rEvent ) throw (css::uno::RuntimeException, std::exception) { SolarMutexGuard aGuard; // is this a request for a context menu? @@ -323,19 +322,19 @@ namespace svx } - void SAL_CALL FmMouseListenerAdapter::mouseReleased( const awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mouseReleased( const css::awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) { // not interested in } - void SAL_CALL FmMouseListenerAdapter::mouseEntered( const awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mouseEntered( const css::awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) { // not interested in } - void SAL_CALL FmMouseListenerAdapter::mouseExited( const awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) + void SAL_CALL FmMouseListenerAdapter::mouseExited( const css::awt::MouseEvent& /*e*/ ) throw (css::uno::RuntimeException, std::exception) { // not interested in } @@ -455,7 +454,7 @@ namespace svx } - bool lcl_determineReadOnly( const Reference< XControl >& _rxControl ) + bool lcl_determineReadOnly( const Reference< css::awt::XControl >& _rxControl ) { bool bIsReadOnlyModel = true; try @@ -484,12 +483,12 @@ namespace svx } - static vcl::Window* lcl_getWindow( const Reference< XControl >& _rxControl ) + static vcl::Window* lcl_getWindow( const Reference< css::awt::XControl >& _rxControl ) { vcl::Window* pWindow = nullptr; try { - Reference< XWindowPeer > xControlPeer; + Reference< css::awt::XWindowPeer > xControlPeer; if ( _rxControl.is() ) xControlPeer = _rxControl->getPeer(); if ( xControlPeer.is() ) @@ -504,7 +503,7 @@ namespace svx } - bool lcl_isRichText( const Reference< XControl >& _rxControl ) + bool lcl_isRichText( const Reference< css::awt::XControl >& _rxControl ) { if ( !_rxControl.is() ) return false; @@ -758,7 +757,7 @@ namespace svx if ( m_xActiveTextComponent.is() ) { sal_Int32 nTextLen = m_xActiveTextComponent->getText().getLength(); - m_xActiveTextComponent->setSelection( awt::Selection( 0, nTextLen ) ); + m_xActiveTextComponent->setSelection( css::awt::Selection( 0, nTextLen ) ); return true; } } @@ -785,7 +784,7 @@ namespace svx ::svt::OStringTransfer::CopyString( sSelectedText, lcl_getWindow( m_xActiveControl ) ); if ( SID_CUT == _nSlot ) { - awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); + css::awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); m_xActiveTextComponent->insertText( aSelection, OUString() ); } } @@ -794,7 +793,7 @@ namespace svx { OUString sClipboardContent; OSL_VERIFY( ::svt::OStringTransfer::PasteString( sClipboardContent, lcl_getWindow( m_xActiveControl ) ) ); - awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); + css::awt::Selection aSelection( m_xActiveTextComponent->getSelection() ); m_xActiveTextComponent->insertText( aSelection, sClipboardContent ); } break; @@ -1008,7 +1007,7 @@ namespace svx if ( !bDisable && bNeedSelection ) { - awt::Selection aSelection = m_xActiveTextComponent->getSelection(); + css::awt::Selection aSelection = m_xActiveTextComponent->getSelection(); bDisable |= aSelection.Min == aSelection.Max; } @@ -1102,12 +1101,12 @@ namespace svx try { - Sequence< Reference< XControl > > aControls( _rxController->getControls() ); + Sequence< Reference< css::awt::XControl > > aControls( _rxController->getControls() ); m_aControlObservers.resize( 0 ); m_aControlObservers.reserve( aControls.getLength() ); - const Reference< XControl >* pControls = aControls.getConstArray(); - const Reference< XControl >* pControlsEnd = pControls + aControls.getLength(); + const Reference< css::awt::XControl >* pControls = aControls.getConstArray(); + const Reference< css::awt::XControl >* pControlsEnd = pControls + aControls.getLength(); for ( ; pControls != pControlsEnd; ++pControls ) { m_aControlObservers.push_back( FocusListenerAdapter( new FmFocusListenerAdapter( *pControls, this ) ) ); @@ -1186,7 +1185,7 @@ namespace svx } - void FmTextControlShell::controlActivated( const Reference< XControl >& _rxControl ) + void FmTextControlShell::controlActivated( const Reference< css::awt::XControl >& _rxControl ) { // ensure that all knittings with the previously active control are lost if ( m_xActiveControl.is() ) @@ -1195,14 +1194,14 @@ namespace svx #if OSL_DEBUG_LEVEL > 0 { - Sequence< Reference< XControl > > aActiveControls; + Sequence< Reference< css::awt::XControl > > aActiveControls; if ( m_xActiveController.is() ) aActiveControls = m_xActiveController->getControls(); bool bFoundThisControl = false; - const Reference< XControl >* pControls = aActiveControls.getConstArray(); - const Reference< XControl >* pControlsEnd = pControls + aActiveControls.getLength(); + const Reference< css::awt::XControl >* pControls = aActiveControls.getConstArray(); + const Reference< css::awt::XControl >* pControlsEnd = pControls + aActiveControls.getLength(); for ( ; ( pControls != pControlsEnd ) && !bFoundThisControl; ++pControls ) { if ( *pControls == _rxControl ) @@ -1262,7 +1261,7 @@ namespace svx } - void FmTextControlShell::fillFeatureDispatchers(const Reference< XControl >& _rxControl, SfxSlotId* _pZeroTerminatedSlots, + void FmTextControlShell::fillFeatureDispatchers(const Reference< css::awt::XControl >& _rxControl, SfxSlotId* _pZeroTerminatedSlots, ControlFeatures& _rDispatchers) { Reference< XDispatchProvider > xProvider( _rxControl, UNO_QUERY ); @@ -1325,7 +1324,7 @@ namespace svx void FmTextControlShell::focusGained( const css::awt::FocusEvent& _rEvent ) { - Reference< XControl > xControl( _rEvent.Source, UNO_QUERY ); + Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY ); #if OSL_DEBUG_LEVEL > 0 OString sTrace( "FmTextControlShell::focusGained: 0x" ); @@ -1341,7 +1340,7 @@ namespace svx void FmTextControlShell::focusLost( const css::awt::FocusEvent& _rEvent ) { - Reference< XControl > xControl( _rEvent.Source, UNO_QUERY ); + Reference< css::awt::XControl > xControl( _rEvent.Source, UNO_QUERY ); #if OSL_DEBUG_LEVEL > 0 OString sTrace( "FmTextControlShell::focusLost: 0x" ); @@ -1359,7 +1358,7 @@ namespace svx } - void FmTextControlShell::contextMenuRequested( const awt::MouseEvent& /*_rEvent*/ ) + void FmTextControlShell::contextMenuRequested( const css::awt::MouseEvent& /*_rEvent*/ ) { m_rBindings.GetDispatcher()->ExecutePopup( SVX_RES( RID_FM_TEXTATTRIBUTE_MENU ) ); } |