summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/sfx2/app.hxx4
-rw-r--r--include/sfx2/module.hxx4
-rw-r--r--include/sfx2/stbitem.hxx4
-rw-r--r--include/sfx2/tbxctrl.hxx6
-rw-r--r--sfx2/source/appl/appreg.cxx20
-rw-r--r--sfx2/source/appl/module.cxx16
-rw-r--r--sfx2/source/control/ctrlfactoryimpl.cxx4
-rw-r--r--sfx2/source/inc/ctrlfactoryimpl.hxx9
-rw-r--r--sfx2/source/statbar/stbitem.cxx4
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx8
11 files changed, 41 insertions, 42 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index f9d4cd8fc6f7..0d9e8e31b93d 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -198,9 +198,9 @@ public:
// Object-Factories/global arrays
SAL_DLLPRIVATE void RegisterChildWindow_Impl(SfxModule*, SfxChildWinFactory*);
SAL_DLLPRIVATE void RegisterChildWindowContext_Impl(SfxModule*, sal_uInt16, SfxChildWinContextFactory*);
- SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, SfxStbCtrlFactory*);
+ SAL_DLLPRIVATE void RegisterStatusBarControl_Impl(SfxModule*, const SfxStbCtrlFactory&);
SAL_DLLPRIVATE void RegisterMenuControl_Impl(SfxModule*, const SfxMenuCtrlFactory&);
- SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, SfxTbxCtrlFactory*);
+ SAL_DLLPRIVATE void RegisterToolBoxControl_Impl( SfxModule*, const SfxTbxCtrlFactory&);
SAL_DLLPRIVATE SfxTbxCtrlFactArr_Impl& GetTbxCtrlFactories_Impl() const;
SAL_DLLPRIVATE SfxStbCtrlFactArr_Impl& GetStbCtrlFactories_Impl() const;
SAL_DLLPRIVATE SfxMenuCtrlFactArr_Impl& GetMenuCtrlFactories_Impl() const;
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 363bbf92d748..824a9c8624b2 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -77,9 +77,9 @@ public:
ResMgr* GetResMgr();
SfxSlotPool* GetSlotPool() const;
- void RegisterToolBoxControl(SfxTbxCtrlFactory*);
+ void RegisterToolBoxControl(const SfxTbxCtrlFactory&);
void RegisterChildWindow(SfxChildWinFactory*);
- void RegisterStatusBarControl(SfxStbCtrlFactory*);
+ void RegisterStatusBarControl(const SfxStbCtrlFactory&);
void RegisterMenuControl(const SfxMenuCtrlFactory&);
virtual VclPtr<SfxTabPage> CreateTabPage( sal_uInt16 nId,
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index 97cc515cac93..43eb733a249d 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -115,7 +115,7 @@ public:
StatusBar& GetStatusBar() const { return *pBar; }
static SfxStatusBarControl* CreateControl( sal_uInt16 nSlotID, sal_uInt16 nId, StatusBar *pBar, SfxModule* );
- static void RegisterStatusBarControl(SfxModule*, SfxStbCtrlFactory*);
+ static void RegisterStatusBarControl(SfxModule*, const SfxStbCtrlFactory&);
};
@@ -129,7 +129,7 @@ public:
SfxStatusBarControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, StatusBar &rStb ) \
{ return new Class( nSlotId, nId, rStb ); } \
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
- { SfxStatusBarControl::RegisterStatusBarControl( pMod, new SfxStbCtrlFactory( \
+ { SfxStatusBarControl::RegisterStatusBarControl( pMod, SfxStbCtrlFactory( \
Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index b0fdb60140d3..f8969fbdb24b 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -224,21 +224,21 @@ public:
static SfxItemState GetItemState( const SfxPoolItem* pState );
static SfxToolBoxControl* CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule *pMod );
- static void RegisterToolBoxControl( SfxModule*, SfxTbxCtrlFactory*);
+ static void RegisterToolBoxControl( SfxModule*, const SfxTbxCtrlFactory&);
};
#define SFX_IMPL_TOOLBOX_CONTROL(Class, nItemClass) \
SfxToolBoxControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) \
{ return new Class( nSlotId, nId, rTbx ); } \
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
- { SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
+ { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \
Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
#define SFX_IMPL_TOOLBOX_CONTROL_ARG(Class, nItemClass, Arg) \
SfxToolBoxControl* Class::CreateImpl( sal_uInt16 nSlotId, sal_uInt16 nId, ToolBox &rTbx ) \
{ return new Class( nSlotId, nId, rTbx, Arg); } \
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
- { SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
+ { SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( \
Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
diff --git a/sfx2/source/appl/appreg.cxx b/sfx2/source/appl/appreg.cxx
index 04b68b8baf0e..fc648ff36c8f 100644
--- a/sfx2/source/appl/appreg.cxx
+++ b/sfx2/source/appl/appreg.cxx
@@ -66,11 +66,11 @@ void SfxApplication::Registrations_Impl()
-void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFactory *pFact )
+void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, const SfxTbxCtrlFactory& rFact )
{
if ( pMod )
{
- pMod->RegisterToolBoxControl( pFact );
+ pMod->RegisterToolBoxControl( rFact );
return;
}
@@ -78,24 +78,24 @@ void SfxApplication::RegisterToolBoxControl_Impl( SfxModule *pMod, SfxTbxCtrlFac
for ( size_t n=0; n<pAppData_Impl->pTbxCtrlFac->size(); n++ )
{
SfxTbxCtrlFactory *pF = &(*pAppData_Impl->pTbxCtrlFac)[n];
- if ( pF->nTypeId == pFact->nTypeId &&
- (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ if ( pF->nTypeId == rFact.nTypeId &&
+ (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
{
SAL_INFO("sfx", "TbxController registration is not clearly defined!");
}
}
#endif
- pAppData_Impl->pTbxCtrlFac->push_back( pFact );
+ pAppData_Impl->pTbxCtrlFac->push_back( rFact );
}
-void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlFactory *pFact )
+void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, const SfxStbCtrlFactory& rFact )
{
if ( pMod )
{
- pMod->RegisterStatusBarControl( pFact );
+ pMod->RegisterStatusBarControl( rFact );
return;
}
@@ -103,15 +103,15 @@ void SfxApplication::RegisterStatusBarControl_Impl( SfxModule *pMod, SfxStbCtrlF
for ( size_t n=0; n<pAppData_Impl->pStbCtrlFac->size(); n++ )
{
SfxStbCtrlFactory *pF = &(*pAppData_Impl->pStbCtrlFac)[n];
- if ( pF->nTypeId == pFact->nTypeId &&
- (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ if ( pF->nTypeId == rFact.nTypeId &&
+ (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
{
SAL_INFO("sfx", "StbController registration is not clearly defined!");
}
}
#endif
- pAppData_Impl->pStbCtrlFac->push_back( pFact );
+ pAppData_Impl->pStbCtrlFac->push_back( rFact );
}
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index f9152c9a012f..327ace286269 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -233,7 +233,7 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact)
-void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
+void SfxModule::RegisterToolBoxControl( const SfxTbxCtrlFactory& rFact )
{
if (!pImpl->pTbxCtrlFac)
pImpl->pTbxCtrlFac = new SfxTbxCtrlFactArr_Impl;
@@ -242,20 +242,20 @@ void SfxModule::RegisterToolBoxControl( SfxTbxCtrlFactory *pFact )
for ( size_t n=0; n<pImpl->pTbxCtrlFac->size(); n++ )
{
SfxTbxCtrlFactory *pF = &(*pImpl->pTbxCtrlFac)[n];
- if ( pF->nTypeId == pFact->nTypeId &&
- (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ if ( pF->nTypeId == rFact.nTypeId &&
+ (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
{
SAL_INFO("sfx2.appl", "TbxController-Registering is not clearly defined!");
}
}
#endif
- pImpl->pTbxCtrlFac->push_back( pFact );
+ pImpl->pTbxCtrlFac->push_back( rFact );
}
-void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
+void SfxModule::RegisterStatusBarControl( const SfxStbCtrlFactory& rFact )
{
if (!pImpl->pStbCtrlFac)
pImpl->pStbCtrlFac = new SfxStbCtrlFactArr_Impl;
@@ -264,15 +264,15 @@ void SfxModule::RegisterStatusBarControl( SfxStbCtrlFactory *pFact )
for ( size_t n=0; n<pImpl->pStbCtrlFac->size(); n++ )
{
SfxStbCtrlFactory *pF = &(*pImpl->pStbCtrlFac)[n];
- if ( pF->nTypeId == pFact->nTypeId &&
- (pF->nSlotId == pFact->nSlotId || pF->nSlotId == 0) )
+ if ( pF->nTypeId == rFact.nTypeId &&
+ (pF->nSlotId == rFact.nSlotId || pF->nSlotId == 0) )
{
SAL_INFO("sfx2.appl", "TbxController-Registering is not clearly defined!");
}
}
#endif
- pImpl->pStbCtrlFac->push_back( pFact );
+ pImpl->pStbCtrlFac->push_back( rFact );
}
diff --git a/sfx2/source/control/ctrlfactoryimpl.cxx b/sfx2/source/control/ctrlfactoryimpl.cxx
index 6bfe2d44bdd7..1df7301b495d 100644
--- a/sfx2/source/control/ctrlfactoryimpl.cxx
+++ b/sfx2/source/control/ctrlfactoryimpl.cxx
@@ -49,7 +49,7 @@ SfxStbCtrlFactory& SfxStbCtrlFactArr_Impl::operator []( size_t i )
return maData[i];
}
-void SfxStbCtrlFactArr_Impl::push_back( SfxStbCtrlFactory* p )
+void SfxStbCtrlFactArr_Impl::push_back( const SfxStbCtrlFactory& p )
{
maData.push_back(p);
}
@@ -69,7 +69,7 @@ SfxTbxCtrlFactory& SfxTbxCtrlFactArr_Impl::operator []( size_t i )
return maData[i];
}
-void SfxTbxCtrlFactArr_Impl::push_back( SfxTbxCtrlFactory* p )
+void SfxTbxCtrlFactArr_Impl::push_back( const SfxTbxCtrlFactory& p )
{
maData.push_back(p);
}
diff --git a/sfx2/source/inc/ctrlfactoryimpl.hxx b/sfx2/source/inc/ctrlfactoryimpl.hxx
index 28e92d87a094..38a25d8fa099 100644
--- a/sfx2/source/inc/ctrlfactoryimpl.hxx
+++ b/sfx2/source/inc/ctrlfactoryimpl.hxx
@@ -24,7 +24,6 @@
#include <sfx2/stbitem.hxx>
#include <sfx2/tbxctrl.hxx>
-#include <boost/ptr_container/ptr_vector.hpp>
#include <vector>
class SfxMenuCtrlFactArr_Impl
@@ -43,28 +42,28 @@ public:
class SfxStbCtrlFactArr_Impl
{
- typedef boost::ptr_vector<SfxStbCtrlFactory> DataType;
+ typedef std::vector<SfxStbCtrlFactory> DataType;
DataType maData;
public:
const SfxStbCtrlFactory& operator []( size_t i ) const;
SfxStbCtrlFactory& operator []( size_t i );
- void push_back( SfxStbCtrlFactory* p );
+ void push_back( const SfxStbCtrlFactory& );
size_t size() const;
};
class SfxTbxCtrlFactArr_Impl
{
- typedef boost::ptr_vector<SfxTbxCtrlFactory> DataType;
+ typedef std::vector<SfxTbxCtrlFactory> DataType;
DataType maData;
public:
const SfxTbxCtrlFactory& operator []( size_t i ) const;
SfxTbxCtrlFactory& operator []( size_t i );
- void push_back( SfxTbxCtrlFactory* p );
+ void push_back( const SfxTbxCtrlFactory& );
size_t size() const;
};
diff --git a/sfx2/source/statbar/stbitem.cxx b/sfx2/source/statbar/stbitem.cxx
index 4c0d962a3383..4b3b9c042f4f 100644
--- a/sfx2/source/statbar/stbitem.cxx
+++ b/sfx2/source/statbar/stbitem.cxx
@@ -633,9 +633,9 @@ SfxStatusBarControl* SfxStatusBarControl::CreateControl
}
-void SfxStatusBarControl::RegisterStatusBarControl(SfxModule* pMod, SfxStbCtrlFactory* pFact)
+void SfxStatusBarControl::RegisterStatusBarControl(SfxModule* pMod, const SfxStbCtrlFactory& rFact)
{
- SfxGetpApp()->RegisterStatusBarControl_Impl( pMod, pFact );
+ SfxGetpApp()->RegisterStatusBarControl_Impl( pMod, rFact );
}
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index 7cbe75dde6a6..a23c55f02dc2 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -272,9 +272,9 @@ void SAL_CALL SfxToolBoxControl::dispose() throw (css::uno::RuntimeException, st
}
-void SfxToolBoxControl::RegisterToolBoxControl( SfxModule* pMod, SfxTbxCtrlFactory* pFact)
+void SfxToolBoxControl::RegisterToolBoxControl( SfxModule* pMod, const SfxTbxCtrlFactory& rFact)
{
- SfxGetpApp()->RegisterToolBoxControl_Impl( pMod, pFact );
+ SfxGetpApp()->RegisterToolBoxControl_Impl( pMod, rFact );
}
SfxToolBoxControl* SfxToolBoxControl::CreateControl( sal_uInt16 nSlotId, sal_uInt16 nTbxId, ToolBox *pBox, SfxModule* pMod )
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index 0c7de3d39641..0b2ef2498d78 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -2799,13 +2799,13 @@ SfxToolBoxControl* SvxColorToolBoxControl::CreateImpl( sal_uInt16 nSlotId, sal_u
void SvxColorToolBoxControl::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod)
{
if ( nSlotId == SID_ATTR_LINE_COLOR )
- SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(XLineColorItem), nSlotId ) );
+ SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(XLineColorItem), nSlotId ) );
else if ( nSlotId == SID_ATTR_FILL_COLOR )
- SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(XFillColorItem), nSlotId ) );
+ SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(XFillColorItem), nSlotId ) );
else if ( nSlotId == SID_ATTR_CHAR_BACK_COLOR )
- SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(SvxBackgroundColorItem), nSlotId ) );
+ SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(SvxBackgroundColorItem), nSlotId ) );
else
- SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(SvxColorItem), nSlotId ) );
+ SfxToolBoxControl::RegisterToolBoxControl( pMod, SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, typeid(SvxColorItem), nSlotId ) );
}
// class SvxFrameToolBoxControl --------------------------------------------