diff options
Diffstat (limited to 'vbahelper')
-rw-r--r-- | vbahelper/source/msforms/vbacontrol.cxx | 11 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbacontrols.cxx | 3 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbalistcontrolhelper.cxx | 4 | ||||
-rw-r--r-- | vbahelper/source/msforms/vbamultipage.cxx | 4 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbaapplicationbase.cxx | 8 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbacommandbarcontrols.cxx | 6 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbacommandbarhelper.cxx | 4 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbacommandbars.cxx | 3 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbadocumentsbase.cxx | 8 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbashaperange.cxx | 4 | ||||
-rw-r--r-- | vbahelper/source/vbahelper/vbashapes.cxx | 4 |
11 files changed, 59 insertions, 0 deletions
diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx index aa386fdae3e7..1e877c66d063 100644 --- a/vbahelper/source/msforms/vbacontrol.cxx +++ b/vbahelper/source/msforms/vbacontrol.cxx @@ -97,6 +97,8 @@ ScVbaControl::getWindowPeer() return xWinPeer; } +namespace { + //ScVbaControlListener class ScVbaControlListener: public cppu::WeakImplHelper< lang::XEventListener > { @@ -108,6 +110,8 @@ public: virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) override; }; +} + ScVbaControlListener::ScVbaControlListener( ScVbaControl *pTmpControl ): pControl( pTmpControl ) { } @@ -430,6 +434,7 @@ void SAL_CALL ScVbaControl::setTag( const OUString& aTag ) return OORGBToXLRGB( nForeColor ); } +namespace { struct PointerStyles { @@ -437,6 +442,8 @@ struct PointerStyles PointerStyle const loPointStyle; }; +} + // 1 -> 1 map of styles ( some dubious choices in there though ) PointerStyles const styles[] = { /// assuming pointer default is Arrow @@ -759,6 +766,8 @@ void ScVbaControl::setLocked( bool bLocked ) m_xProps->setPropertyValue( "ReadOnly" , uno::makeAny( bLocked ) ); } +namespace { + class ControlProviderImpl : public cppu::WeakImplHelper< XControlProvider > { uno::Reference< uno::XComponentContext > m_xCtx; @@ -767,6 +776,8 @@ public: virtual uno::Reference< msforms::XControl > SAL_CALL createControl( const uno::Reference< drawing::XControlShape >& xControl, const uno::Reference< frame::XModel >& xDocOwner ) override; }; +} + uno::Reference< msforms::XControl > SAL_CALL ControlProviderImpl::createControl( const uno::Reference< drawing::XControlShape >& xControlShape, const uno::Reference< frame::XModel >& xDocOwner ) { diff --git a/vbahelper/source/msforms/vbacontrols.cxx b/vbahelper/source/msforms/vbacontrols.cxx index 01abc34f67dd..c3cf49b86f0d 100644 --- a/vbahelper/source/msforms/vbacontrols.cxx +++ b/vbahelper/source/msforms/vbacontrols.cxx @@ -42,6 +42,8 @@ using namespace ooo::vba; typedef std::unordered_map< OUString, sal_Int32 > ControlIndexMap; +namespace { + class ControlArrayWrapper : public ::cppu::WeakImplHelper< container::XNameAccess, container::XIndexAccess > { uno::Reference< awt::XControlContainer > mxDialog; @@ -190,6 +192,7 @@ public: }; +} static uno::Reference<container::XIndexAccess > lcl_controlsWrapper( const uno::Reference< awt::XControl >& xDlg ) diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.cxx b/vbahelper/source/msforms/vbalistcontrolhelper.cxx index dfbbb19a3bde..b1601f99ec43 100644 --- a/vbahelper/source/msforms/vbalistcontrolhelper.cxx +++ b/vbahelper/source/msforms/vbalistcontrolhelper.cxx @@ -26,6 +26,8 @@ using namespace com::sun::star; using namespace ooo::vba; +namespace { + class ListPropListener : public PropListener { private: @@ -40,6 +42,8 @@ public: virtual css::uno::Any getValueEvent() override; }; +} + ListPropListener::ListPropListener( const uno::Reference< beans::XPropertySet >& xProps, const uno::Any& pvargIndex, const uno::Any& pvarColumn ) : m_xProps( xProps ), m_pvargIndex( pvargIndex ), m_pvarColumn( pvarColumn ) { } diff --git a/vbahelper/source/msforms/vbamultipage.cxx b/vbahelper/source/msforms/vbamultipage.cxx index 18c74ffdff30..58ca2182cda6 100644 --- a/vbahelper/source/msforms/vbamultipage.cxx +++ b/vbahelper/source/msforms/vbamultipage.cxx @@ -27,6 +27,8 @@ using namespace ooo::vba; const OUString SVALUE( "MultiPageValue" ); +namespace { + class PagesImpl : public cppu::WeakImplHelper< container::XIndexAccess > { sal_Int32 const mnPages; @@ -52,6 +54,8 @@ public: } }; +} + ScVbaMultiPage::ScVbaMultiPage( const uno::Reference< ov::XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, diff --git a/vbahelper/source/vbahelper/vbaapplicationbase.cxx b/vbahelper/source/vbahelper/vbaapplicationbase.cxx index 94c3419f6e2a..bf7ac741563c 100644 --- a/vbahelper/source/vbahelper/vbaapplicationbase.cxx +++ b/vbahelper/source/vbahelper/vbaapplicationbase.cxx @@ -60,6 +60,8 @@ using namespace ::ooo::vba; typedef ::std::pair< OUString, ::std::pair< double, double > > VbaTimerInfo; +namespace { + class VbaTimer { Timer m_aTimer; @@ -115,6 +117,8 @@ public: DECL_LINK( MacroCallHdl, Timer*, void ); }; +} + IMPL_LINK_NOARG(VbaTimer, MacroCallHdl, Timer *, void) { if ( m_aTimerInfo.second.second == 0 || GetNow() < m_aTimerInfo.second.second ) @@ -136,6 +140,8 @@ IMPL_LINK_NOARG(VbaTimer, MacroCallHdl, Timer *, void) {} } +namespace { + struct VbaTimerInfoHash { size_t operator()( const VbaTimerInfo& rTimerInfo ) const @@ -148,6 +154,8 @@ struct VbaTimerInfoHash } }; +} + typedef std::unordered_map< VbaTimerInfo, std::unique_ptr<VbaTimer>, VbaTimerInfoHash > VbaTimerHashMap; struct VbaApplicationBase_Impl final diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx index f789a487f6b2..cb83e51c8204 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.cxx @@ -23,6 +23,8 @@ using namespace com::sun::star; using namespace ooo::vba; +namespace { + class CommandBarControlEnumeration : public ::cppu::WeakImplHelper< container::XEnumeration > { //uno::Reference< uno::XComponentContext > m_xContext; @@ -45,6 +47,8 @@ public: } }; +} + ScVbaCommandBarControls::ScVbaCommandBarControls( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess>& xIndexAccess, VbaCommandBarHelperRef const & pHelper, const uno::Reference< container::XIndexAccess>& xBarSettings, const OUString& sResourceUrl ) : CommandBarControls_BASE( xParent, xContext, xIndexAccess ), pCBarHelper( pHelper ), m_xBarSettings( xBarSettings ), m_sResourceUrl( sResourceUrl ) { m_bIsMenu = sResourceUrl == ITEM_MENUBAR_URL; @@ -243,6 +247,7 @@ ScVbaCommandBarControls::getServiceNames() return aServiceNames; } +namespace { class VbaDummyIndexAccess : public ::cppu::WeakImplHelper< container::XIndexAccess > { @@ -260,6 +265,7 @@ public: { return false; } }; +} VbaDummyCommandBarControls::VbaDummyCommandBarControls( const uno::Reference< XHelperInterface >& xParent, diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx index aa18d1b0dc49..f2926139aea9 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.cxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.cxx @@ -41,6 +41,8 @@ using namespace ooo::vba; typedef std::map< OUString, OUString > MSO2OOCommandbarMap; +namespace { + class MSO2OOCommandbarHelper final { private: @@ -83,6 +85,8 @@ public: } }; +} + MSO2OOCommandbarHelper* MSO2OOCommandbarHelper::pMSO2OOCommandbarHelper = nullptr; diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx index be173f49b2a7..332249049b84 100644 --- a/vbahelper/source/vbahelper/vbacommandbars.cxx +++ b/vbahelper/source/vbahelper/vbacommandbars.cxx @@ -31,6 +31,7 @@ using namespace com::sun::star; using namespace ooo::vba; +namespace { class CommandBarEnumeration : public ::cppu::WeakImplHelper< container::XEnumeration > { @@ -71,6 +72,8 @@ public: } }; +} + ScVbaCommandBars::ScVbaCommandBars( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xIndexAccess, const uno::Reference< frame::XModel >& xModel ) : CommandBars_BASE( xParent, xContext, xIndexAccess ) { m_pCBarHelper.reset( new VbaCommandBarHelper( mxContext, xModel ) ); diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index 1ba2bb1a0b0f..d0951b0c13e7 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -56,6 +56,8 @@ typedef std::vector < uno::Reference< frame::XModel > > Documents; // #FIXME clearly this is a candidate for some sort of helper base class as // this is a copy of SelectedSheetsEnum ( vbawindow.cxx ) +namespace { + class DocumentsEnumImpl : public ::cppu::WeakImplHelper< container::XEnumeration > { uno::Reference< uno::XComponentContext > m_xContext; @@ -97,6 +99,8 @@ public: } }; +} + // #FIXME clearly this is also a candidate for some sort of helper base class as // a very similar one is used in vbawindow ( SelectedSheetsEnumAccess ) // Maybe a template base class that does all of the operations on the hashmap @@ -108,6 +112,8 @@ typedef ::cppu::WeakImplHelper< container::XEnumerationAccess , css::container::XNameAccess > DocumentsAccessImpl_BASE; +namespace { + class DocumentsAccessImpl : public DocumentsAccessImpl_BASE { uno::Reference< uno::XComponentContext > m_xContext; @@ -187,6 +193,8 @@ public: }; +} + VbaDocumentsBase::VbaDocumentsBase( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< css::uno::XComponentContext >& xContext, DOCUMENT_TYPE eDocType ) : VbaDocumentsBase_BASE( xParent, xContext, uno::Reference< container::XIndexAccess >( new DocumentsAccessImpl( xContext, eDocType ) ) ), meDocType( eDocType ) { } diff --git a/vbahelper/source/vbahelper/vbashaperange.cxx b/vbahelper/source/vbahelper/vbashaperange.cxx index b21c24165cf7..6f353e5e14d1 100644 --- a/vbahelper/source/vbahelper/vbashaperange.cxx +++ b/vbahelper/source/vbahelper/vbashaperange.cxx @@ -29,6 +29,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; +namespace { + class VbShapeRangeEnumHelper : public EnumerationHelper_BASE { uno::Reference< XCollection > m_xParent; @@ -50,6 +52,8 @@ public: }; +} + ScVbaShapeRange::ScVbaShapeRange( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XIndexAccess >& xShapes, const uno::Reference< drawing::XDrawPage >& xDrawPage, const uno::Reference< frame::XModel >& xModel ) : ScVbaShapeRange_BASE( xParent, xContext, xShapes ), m_xDrawPage( xDrawPage ), m_xModel( xModel ) { } diff --git a/vbahelper/source/vbahelper/vbashapes.cxx b/vbahelper/source/vbahelper/vbashapes.cxx index 7c9ca3f22cd9..f9356efedd9d 100644 --- a/vbahelper/source/vbahelper/vbashapes.cxx +++ b/vbahelper/source/vbahelper/vbashapes.cxx @@ -51,6 +51,8 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; +namespace { + class VbShapeEnumHelper : public EnumerationHelper_BASE { uno::Reference<msforms::XShapes > m_xParent; @@ -72,6 +74,8 @@ public: }; +} + void ScVbaShapes::initBaseCollection() { if ( m_xNameAccess.is() ) // already has NameAccess |