summaryrefslogtreecommitdiff
path: root/include/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'include/sfx2')
-rw-r--r--include/sfx2/app.hxx1
-rw-r--r--include/sfx2/dinfdlg.hxx2
-rw-r--r--include/sfx2/docfac.hxx1
-rw-r--r--include/sfx2/evntconf.hxx2
-rw-r--r--include/sfx2/frame.hxx5
-rw-r--r--include/sfx2/frmdescr.hxx1
-rw-r--r--include/sfx2/linksrc.hxx2
-rw-r--r--include/sfx2/lnkbase.hxx1
-rw-r--r--include/sfx2/minfitem.hxx2
-rw-r--r--include/sfx2/mnuitem.hxx6
-rw-r--r--include/sfx2/module.hxx1
-rw-r--r--include/sfx2/msg.hxx35
-rw-r--r--include/sfx2/msgpool.hxx2
-rw-r--r--include/sfx2/objitem.hxx2
-rw-r--r--include/sfx2/objsh.hxx4
-rw-r--r--include/sfx2/shell.hxx2
-rw-r--r--include/sfx2/stbitem.hxx6
-rw-r--r--include/sfx2/tabdlg.hxx1
-rw-r--r--include/sfx2/tbxctrl.hxx8
-rw-r--r--include/sfx2/tplpitem.hxx3
-rw-r--r--include/sfx2/viewfrm.hxx3
-rw-r--r--include/sfx2/viewsh.hxx1
-rw-r--r--include/sfx2/zoomitem.hxx2
23 files changed, 39 insertions, 54 deletions
diff --git a/include/sfx2/app.hxx b/include/sfx2/app.hxx
index 0b6c89806935..8db9229f3fe1 100644
--- a/include/sfx2/app.hxx
+++ b/include/sfx2/app.hxx
@@ -124,7 +124,6 @@ class SFX2_DLLPUBLIC SfxApplication: public SfxShell
void Deinitialize();
public:
- TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXAPP)
private:
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index faf6494bd920..4aefe3b478bb 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -86,7 +86,7 @@ private:
css::uno::Sequence< css::document::CmisProperty > m_aCmisProperties;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SfxDocumentInfoItem();
SfxDocumentInfoItem( const OUString &rFileName,
const css::uno::Reference< css::document::XDocumentProperties> & i_xDocProps,
diff --git a/include/sfx2/docfac.hxx b/include/sfx2/docfac.hxx
index 3170b86f9adb..138fe6d7e35d 100644
--- a/include/sfx2/docfac.hxx
+++ b/include/sfx2/docfac.hxx
@@ -22,7 +22,6 @@
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sal/types.h>
-#include <tools/rtti.hxx>
// SFX_IMPL_MODULE_LIB
#include <osl/module.hxx>
diff --git a/include/sfx2/evntconf.hxx b/include/sfx2/evntconf.hxx
index 88398a4ef7cc..7b4af17d661c 100644
--- a/include/sfx2/evntconf.hxx
+++ b/include/sfx2/evntconf.hxx
@@ -22,7 +22,6 @@
#include <sal/config.h>
#include <sfx2/dllapi.h>
#include <sal/types.h>
-#include <tools/rtti.hxx>
#include <vcl/fixed.hxx>
#include <vcl/button.hxx>
#include <sfx2/event.hxx>
@@ -72,7 +71,6 @@ class SFX2_DLLPUBLIC SfxEventNamesItem : public SfxPoolItem
SfxEventNamesList aEventsList;
public:
- TYPEINFO_OVERRIDE();
SfxEventNamesItem ( const sal_uInt16 nId ) : SfxPoolItem( nId ) {}
diff --git a/include/sfx2/frame.hxx b/include/sfx2/frame.hxx
index af408d2f19b3..82a7a0cf9a29 100644
--- a/include/sfx2/frame.hxx
+++ b/include/sfx2/frame.hxx
@@ -215,7 +215,6 @@ class SFX2_DLLPUBLIC SfxFrameItem: public SfxPoolItem
SAL_DLLPRIVATE void SetFramePtr_Impl( SfxFrame* /*pFrameP*/ ) { pFrame = wFrame; }
public:
- TYPEINFO_OVERRIDE();
SfxFrameItem( sal_uInt16 nWhich, SfxViewFrame *p );
SfxFrameItem( SfxFrame *p=nullptr );
@@ -235,7 +234,7 @@ class SFX2_DLLPUBLIC SfxUsrAnyItem : public SfxPoolItem
{
css::uno::Any aValue;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SfxUsrAnyItem( sal_uInt16 nWhich, const css::uno::Any& rAny );
css::uno::Any GetValue() const
{ return aValue; }
@@ -251,7 +250,7 @@ class SFX2_DLLPUBLIC SfxUnoFrameItem : public SfxPoolItem
m_xFrame;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SfxUnoFrameItem();
SfxUnoFrameItem( sal_uInt16 nWhich, const css::uno::Reference< css::frame::XFrame >& i_rFrame );
const css::uno::Reference< css::frame::XFrame >&
diff --git a/include/sfx2/frmdescr.hxx b/include/sfx2/frmdescr.hxx
index 7b56f1cf6491..eafbf4e9123e 100644
--- a/include/sfx2/frmdescr.hxx
+++ b/include/sfx2/frmdescr.hxx
@@ -190,7 +190,6 @@ class SfxFrameDescriptorItem : public SfxPoolItem
{
SfxFrameProperties aProperties;
public:
- TYPEINFO_OVERRIDE();
SfxFrameDescriptorItem ( const sal_uInt16 nId = SID_FRAMEDESCRIPTOR )
: SfxPoolItem( nId )
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index ea7a71c13ddb..4af9f0b8968c 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -24,7 +24,6 @@
#include <tools/link.hxx>
#include <tools/ref.hxx>
-#include <tools/rtti.hxx>
#include <com/sun/star/io/XInputStream.hpp>
namespace com { namespace sun { namespace star { namespace uno
@@ -56,7 +55,6 @@ private:
SvLinkSource_Impl* pImpl; // compatible area
public:
- TYPEINFO();
SvLinkSource();
virtual ~SvLinkSource();
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 438327d47fd7..d2e7b16a314a 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -108,7 +108,6 @@ protected:
}
public:
- TYPEINFO();
virtual void Closed();
diff --git a/include/sfx2/minfitem.hxx b/include/sfx2/minfitem.hxx
index f0b0541ddf4f..3356911e2e2f 100644
--- a/include/sfx2/minfitem.hxx
+++ b/include/sfx2/minfitem.hxx
@@ -35,7 +35,7 @@ class SFX2_DLLPUBLIC SfxMacroInfoItem: public SfxPoolItem
OUString aCommentText;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SfxMacroInfoItem( sal_uInt16 nWhich,
const BasicManager* pMgr,
const OUString &rLibName,
diff --git a/include/sfx2/mnuitem.hxx b/include/sfx2/mnuitem.hxx
index 3d76b44e8635..7afaec06c3a8 100644
--- a/include/sfx2/mnuitem.hxx
+++ b/include/sfx2/mnuitem.hxx
@@ -87,11 +87,11 @@ typedef SfxMenuControl* (*SfxMenuControlCtor)( sal_uInt16 nId, Menu &, SfxBindin
struct SfxMenuCtrlFactory
{
SfxMenuControlCtor pCtor;
- TypeId nTypeId;
+ const std::type_info& nTypeId;
sal_uInt16 nSlotId;
SfxMenuCtrlFactory( SfxMenuControlCtor pTheCtor,
- TypeId nTheTypeId, sal_uInt16 nTheSlotId ):
+ const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ):
pCtor(pTheCtor),
nTypeId(nTheTypeId),
nSlotId(nTheSlotId)
@@ -117,7 +117,7 @@ inline SfxVirtualMenu* SfxMenuControl::GetPopupMenu() const
{ return new Class(nId, rMenu, rBindings); } \
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxMenuControl::RegisterMenuControl( pMod, new SfxMenuCtrlFactory( \
- Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+ Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
#endif
diff --git a/include/sfx2/module.hxx b/include/sfx2/module.hxx
index 8254c6d25ea2..6d257b19a276 100644
--- a/include/sfx2/module.hxx
+++ b/include/sfx2/module.hxx
@@ -62,7 +62,6 @@ private:
SAL_DLLPRIVATE void Construct_Impl();
public:
- TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXMODULE)
private:
diff --git a/include/sfx2/msg.hxx b/include/sfx2/msg.hxx
index d9e2c12d650e..25fdbcdd0905 100644
--- a/include/sfx2/msg.hxx
+++ b/include/sfx2/msg.hxx
@@ -19,13 +19,13 @@
#ifndef INCLUDED_SFX2_MSG_HXX
#define INCLUDED_SFX2_MSG_HXX
-#include <tools/rtti.hxx>
#include <sfx2/shell.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include <sfx2/dllapi.h>
#include <svl/itemset.hxx>
#include <o3tl/typed_flags_set.hxx>
+#include <functional>
enum class SfxSlotMode {
NONE = 0x0000L, // exclusiv to VOLATILE, default
@@ -107,31 +107,34 @@ struct SfxTypeAttrib
sal_uInt16 nAID;
const char* pName;
};
-
+class SfxPoolItem;
+template<class T> SfxPoolItem* createSfxPoolItem()
+{
+ return T::CreateDefault();
+}
struct SfxType
{
- TypeId aTypeId;
+ std::function<SfxPoolItem* ()> createSfxPoolItemFunc;
+ const std::type_info* pType;
sal_uInt16 nAttribs;
SfxTypeAttrib aAttrib[1]; // variable length
- const TypeId& Type() const
- { return aTypeId; }
+ const std::type_info* Type() const{return pType;}
SfxPoolItem* CreateItem() const
- { return static_cast<SfxPoolItem*>(aTypeId()); }
+ { return static_cast<SfxPoolItem*>(createSfxPoolItemFunc()); }
};
struct SfxType0
{
- TypeId aTypeId;
+ std::function<SfxPoolItem* ()> createSfxPoolItemFunc;
+ const std::type_info* pType;
sal_uInt16 nAttribs;
-
- const TypeId& Type() const
- { return aTypeId; }
+ const std::type_info* Type() const { return pType;}
};
-
#define SFX_DECL_TYPE(n) struct SfxType##n \
{ \
- TypeId aTypeId; \
+ std::function<SfxPoolItem* ()> createSfxPoolItemFunc; \
+ const std::type_info* pType; \
sal_uInt16 nAttribs; \
SfxTypeAttrib aAttrib[n]; \
}
@@ -198,7 +201,7 @@ SFX_DECL_TYPE(22); // for SvxSearchItem
0, 0, DisableFlags, UnoName \
}
-class SfxPoolItem;
+//class SfxPoolItem;
struct SfxFormalArgument
{
@@ -206,10 +209,10 @@ struct SfxFormalArgument
const char* pName; // Name of the sParameters
sal_uInt16 nSlotId; // Slot-Id for identification of the Parameters
- const TypeId& Type() const
- { return pType->aTypeId; }
+// const TypeId& Type() const
+// { return pType->aTypeId; }
SfxPoolItem* CreateItem() const
- { return static_cast<SfxPoolItem*>(pType->aTypeId()); }
+ { return pType->createSfxPoolItemFunc(); }
};
diff --git a/include/sfx2/msgpool.hxx b/include/sfx2/msgpool.hxx
index 2b75d9503440..4308418ac1b2 100644
--- a/include/sfx2/msgpool.hxx
+++ b/include/sfx2/msgpool.hxx
@@ -61,7 +61,7 @@ public:
const SfxSlot* NextSlot();
const SfxSlot* GetSlot( sal_uInt16 nId );
const SfxSlot* GetUnoSlot( const OUString& rUnoName );
- TypeId GetSlotType( sal_uInt16 nSlotId ) const;
+ const std::type_info* GetSlotType( sal_uInt16 nSlotId ) const;
};
diff --git a/include/sfx2/objitem.hxx b/include/sfx2/objitem.hxx
index d2ce6c080ebd..db4139285f44 100644
--- a/include/sfx2/objitem.hxx
+++ b/include/sfx2/objitem.hxx
@@ -32,7 +32,7 @@ class SFX2_DLLPUBLIC SfxObjectItem: public SfxPoolItem
SfxShell* _pSh;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SfxObjectItem( sal_uInt16 nWhich=0, SfxShell *pSh=nullptr );
virtual bool operator==( const SfxPoolItem& ) const override;
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index fed9399ed8a3..a26617109adc 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -244,7 +244,6 @@ protected:
void AddToRecentlyUsedList();
public:
- TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXDOCSH)
private:
@@ -823,7 +822,8 @@ class SFX2_DLLPUBLIC SfxObjectShellItem: public SfxPoolItem
SfxObjectShell* pObjSh;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
+
SfxObjectShellItem() :
SfxPoolItem( 0 ),
pObjSh( nullptr )
diff --git a/include/sfx2/shell.hxx b/include/sfx2/shell.hxx
index 8ec29fdfcd46..07dd9a3359f3 100644
--- a/include/sfx2/shell.hxx
+++ b/include/sfx2/shell.hxx
@@ -26,7 +26,6 @@
#include <sfx2/dllapi.h>
#include <sfx2/sfxuno.hxx>
#include <svl/SfxBroadcaster.hxx>
-#include <tools/rtti.hxx>
class ResMgr;
namespace vcl { class Window; }
@@ -165,7 +164,6 @@ protected:
static void HandleOpenXmlFilterSettings(SfxRequest &);
public:
- TYPEINFO_OVERRIDE();
/**
The connection to a possible corresponding SbxObject is dissolved.
diff --git a/include/sfx2/stbitem.hxx b/include/sfx2/stbitem.hxx
index a4b890d2541b..97cc515cac93 100644
--- a/include/sfx2/stbitem.hxx
+++ b/include/sfx2/stbitem.hxx
@@ -40,11 +40,11 @@ typedef SfxStatusBarControl* (*SfxStatusBarControlCtor)( sal_uInt16 nSlotId, sal
struct SfxStbCtrlFactory
{
SfxStatusBarControlCtor pCtor;
- TypeId nTypeId;
+ const std::type_info& nTypeId;
sal_uInt16 nSlotId;
SfxStbCtrlFactory( SfxStatusBarControlCtor pTheCtor,
- TypeId nTheTypeId, sal_uInt16 nTheSlotId ):
+ const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ):
pCtor(pTheCtor),
nTypeId(nTheTypeId),
nSlotId(nTheSlotId)
@@ -130,7 +130,7 @@ public:
{ return new Class( nSlotId, nId, rStb ); } \
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxStatusBarControl::RegisterStatusBarControl( pMod, new SfxStbCtrlFactory( \
- Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+ Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
#endif
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index a02076495215..f1dc53cd0f1e 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -49,7 +49,6 @@ struct TabDlg_Impl;
class SFX2_DLLPUBLIC SfxTabDialogItem: public SfxSetItem
{
public:
- TYPEINFO_OVERRIDE();
SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet );
SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool=nullptr);
virtual SfxPoolItem* Clone(SfxItemPool* pToPool) const override;
diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx
index 20dc0120af54..b0fdb60140d3 100644
--- a/include/sfx2/tbxctrl.hxx
+++ b/include/sfx2/tbxctrl.hxx
@@ -48,11 +48,11 @@ typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( sal_uInt16 nSlotId, sal_uIn
struct SfxTbxCtrlFactory
{
SfxToolBoxControlCtor pCtor;
- TypeId nTypeId;
+ const std::type_info& nTypeId;
sal_uInt16 nSlotId;
SfxTbxCtrlFactory( SfxToolBoxControlCtor pTheCtor,
- TypeId nTheTypeId, sal_uInt16 nTheSlotId ):
+ const std::type_info& nTheTypeId, sal_uInt16 nTheSlotId ):
pCtor(pTheCtor),
nTypeId(nTheTypeId),
nSlotId(nTheSlotId)
@@ -232,14 +232,14 @@ public:
{ return new Class( nSlotId, nId, rTbx ); } \
void Class::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) \
{ SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( \
- Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+ 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( \
- Class::CreateImpl, TYPE(nItemClass), nSlotId ) ); }
+ Class::CreateImpl, typeid(nItemClass), nSlotId ) ); }
diff --git a/include/sfx2/tplpitem.hxx b/include/sfx2/tplpitem.hxx
index 490013493e9b..17c4a5295819 100644
--- a/include/sfx2/tplpitem.hxx
+++ b/include/sfx2/tplpitem.hxx
@@ -24,13 +24,12 @@
#include <sfx2/dllapi.h>
#include <svl/flagitem.hxx>
#include <svl/style.hrc>
-#include <tools/rtti.hxx>
class SFX2_DLLPUBLIC SfxTemplateItem: public SfxFlagItem
{
OUString aStyle;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SfxTemplateItem();
SfxTemplateItem( sal_uInt16 nWhich,
const OUString &rStyle,
diff --git a/include/sfx2/viewfrm.hxx b/include/sfx2/viewfrm.hxx
index 7626770bc7d3..cbb06866d100 100644
--- a/include/sfx2/viewfrm.hxx
+++ b/include/sfx2/viewfrm.hxx
@@ -86,7 +86,6 @@ protected:
public:
SfxViewFrame( SfxFrame& rFrame, SfxObjectShell *pDoc = nullptr );
- TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWFRM)
private:
@@ -280,7 +279,6 @@ class SFX2_DLLPUBLIC SfxViewFrameItem: public SfxPoolItem
SfxViewFrame* pFrame;
public:
- TYPEINFO_OVERRIDE();
SfxViewFrameItem( SfxViewFrame *pViewFrame ):
SfxPoolItem( 0 ),
pFrame( pViewFrame)
@@ -302,7 +300,6 @@ class SfxVerbListItem : public SfxPoolItem
css::uno::Sequence < css::embed::VerbDescriptor > aVerbs;
public:
- TYPEINFO_OVERRIDE();
SfxVerbListItem( sal_uInt16 nWhichId = SID_OBJECT ) :
SfxPoolItem( nWhichId )
{}
diff --git a/include/sfx2/viewsh.hxx b/include/sfx2/viewsh.hxx
index 669e9a5bbe38..86323a9ce1c5 100644
--- a/include/sfx2/viewsh.hxx
+++ b/include/sfx2/viewsh.hxx
@@ -181,7 +181,6 @@ public:
static SfxViewShell* Get( const css::uno::Reference< css::frame::XController>& i_rController );
// Initialize Constructors/Destructors
- TYPEINFO_OVERRIDE();
SFX_DECL_INTERFACE(SFX_INTERFACE_SFXVIEWSH)
private:
diff --git a/include/sfx2/zoomitem.hxx b/include/sfx2/zoomitem.hxx
index 9e9205950f7c..d595b7ec24d9 100644
--- a/include/sfx2/zoomitem.hxx
+++ b/include/sfx2/zoomitem.hxx
@@ -58,7 +58,7 @@ class SFX2_DLLPUBLIC SvxZoomItem: public SfxUInt16Item
SvxZoomType eType;
public:
- TYPEINFO_OVERRIDE();
+ static SfxPoolItem* CreateDefault();
SvxZoomItem( SvxZoomType eZoomType = SvxZoomType::PERCENT,
sal_uInt16 nVal = 0, sal_uInt16 nWhich = SID_ATTR_ZOOM );