Kaydet (Commit) f3ba7596 authored tarafından Noel Grandin's avatar Noel Grandin

remove unused enum SfxObjectShellFlags

Change-Id: I594e7beb3fb320b70ffe4dd98fee46c833f443dc
Reviewed-on: https://gerrit.libreoffice.org/64453
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e909028c
...@@ -38,7 +38,7 @@ namespace basctl ...@@ -38,7 +38,7 @@ namespace basctl
{ {
SFX_IMPL_OBJECTFACTORY( DocShell, SvGlobalName(), SfxObjectShellFlags::STD_NORMAL, "sbasic" ) SFX_IMPL_OBJECTFACTORY( DocShell, SvGlobalName(), "sbasic" )
SFX_IMPL_SUPERCLASS_INTERFACE(basctl_DocShell, SfxObjectShell) SFX_IMPL_SUPERCLASS_INTERFACE(basctl_DocShell, SfxObjectShell)
......
...@@ -45,14 +45,12 @@ class SFX2_DLLPUBLIC SfxObjectFactory ...@@ -45,14 +45,12 @@ class SFX2_DLLPUBLIC SfxObjectFactory
private: private:
const OUString m_sFactoryName; const OUString m_sFactoryName;
std::unique_ptr<SfxObjectFactory_Impl> pImpl; // Additional Data std::unique_ptr<SfxObjectFactory_Impl> pImpl; // Additional Data
SfxObjectShellFlags const nFlags;
public: public:
SfxObjectFactory( const SvGlobalName &rName, SfxObjectShellFlags nFlags, const OUString& sFactoryName ); SfxObjectFactory( const SvGlobalName &rName, const OUString& sFactoryName );
~SfxObjectFactory(); ~SfxObjectFactory();
const SvGlobalName& GetClassId() const; const SvGlobalName& GetClassId() const;
SfxObjectShellFlags GetFlags() { return nFlags; }
OUString GetFactoryURL() const; // shortcut for "private:factory/GetShortName()" OUString GetFactoryURL() const; // shortcut for "private:factory/GetShortName()"
const OUString& GetFactoryName() const { return m_sFactoryName; } const OUString& GetFactoryName() const { return m_sFactoryName; }
OUString GetModuleName() const; OUString GetModuleName() const;
...@@ -90,10 +88,10 @@ public: \ ...@@ -90,10 +88,10 @@ public: \
static SfxObjectFactory& Factory(); \ static SfxObjectFactory& Factory(); \
virtual SfxObjectFactory& GetFactory() const override { return Factory(); } virtual SfxObjectFactory& GetFactory() const override { return Factory(); }
#define SFX_IMPL_OBJECTFACTORY(ClassName,GlobName,Flags,ShortName) \ #define SFX_IMPL_OBJECTFACTORY(ClassName,GlobName,ShortName) \
SfxObjectFactory& ClassName::Factory() \ SfxObjectFactory& ClassName::Factory() \
{ \ { \
static SfxObjectFactory aObjectFactory(GlobName, Flags, ShortName); \ static SfxObjectFactory aObjectFactory(GlobName, ShortName); \
return aObjectFactory; \ return aObjectFactory; \
} }
#endif // INCLUDED_SFX2_DOCFAC_HXX #endif // INCLUDED_SFX2_DOCFAC_HXX
......
...@@ -113,17 +113,6 @@ namespace com { namespace sun { namespace star { ...@@ -113,17 +113,6 @@ namespace com { namespace sun { namespace star {
} }
} } } } } }
enum class SfxObjectShellFlags
{
STD_NORMAL = 0x0000000,
HASMENU = 0x0000004,
UNDEFINED = 0xf000000
};
namespace o3tl
{
template<> struct typed_flags<SfxObjectShellFlags> : is_typed_flags<SfxObjectShellFlags, 0xf000004> {};
}
#define SFX_TITLE_TITLE 0 #define SFX_TITLE_TITLE 0
#define SFX_TITLE_FILENAME 1 #define SFX_TITLE_FILENAME 1
#define SFX_TITLE_FULLNAME 2 #define SFX_TITLE_FULLNAME 2
......
...@@ -186,7 +186,7 @@ void ScDocShell::InitInterface_Impl() ...@@ -186,7 +186,7 @@ void ScDocShell::InitInterface_Impl()
} }
// GlobalName of the current version: // GlobalName of the current version:
SFX_IMPL_OBJECTFACTORY( ScDocShell, SvGlobalName(SO3_SC_CLASSID), SfxObjectShellFlags::STD_NORMAL, "scalc" ) SFX_IMPL_OBJECTFACTORY( ScDocShell, SvGlobalName(SO3_SC_CLASSID), "scalc" )
void ScDocShell::FillClass( SvGlobalName* pClassName, void ScDocShell::FillClass( SvGlobalName* pClassName,
......
...@@ -94,7 +94,6 @@ namespace sd { ...@@ -94,7 +94,6 @@ namespace sd {
SFX_IMPL_OBJECTFACTORY( SFX_IMPL_OBJECTFACTORY(
DrawDocShell, DrawDocShell,
SvGlobalName(SO3_SIMPRESS_CLASSID), SvGlobalName(SO3_SIMPRESS_CLASSID),
SfxObjectShellFlags::STD_NORMAL,
"simpress" ) "simpress" )
void DrawDocShell::Construct( bool bClipboard ) void DrawDocShell::Construct( bool bClipboard )
......
...@@ -46,7 +46,7 @@ void GraphicDocShell::InitInterface_Impl() ...@@ -46,7 +46,7 @@ void GraphicDocShell::InitInterface_Impl()
GetStaticInterface()->RegisterChildWindow(SID_SEARCH_DLG); GetStaticInterface()->RegisterChildWindow(SID_SEARCH_DLG);
} }
SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), SfxObjectShellFlags::STD_NORMAL, "sdraw" ) SFX_IMPL_OBJECTFACTORY( GraphicDocShell, SvGlobalName(SO3_SDRAW_CLASSID_60), "sdraw" )
GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode) : GraphicDocShell::GraphicDocShell(SfxObjectCreateMode eMode) :
DrawDocShell(eMode, /*bDataObject*/true, DocumentType::Draw) DrawDocShell(eMode, /*bDataObject*/true, DocumentType::Draw)
......
...@@ -77,11 +77,9 @@ SfxFilterContainer* SfxObjectFactory::GetFilterContainer() const ...@@ -77,11 +77,9 @@ SfxFilterContainer* SfxObjectFactory::GetFilterContainer() const
SfxObjectFactory::SfxObjectFactory SfxObjectFactory::SfxObjectFactory
( (
const SvGlobalName& rName, const SvGlobalName& rName,
SfxObjectShellFlags nFlagsP,
const OUString& sName const OUString& sName
) : m_sFactoryName( sName ), ) : m_sFactoryName( sName ),
pImpl( new SfxObjectFactory_Impl ), pImpl( new SfxObjectFactory_Impl )
nFlags( nFlagsP )
{ {
pImpl->pFilterContainer = new SfxFilterContainer( m_sFactoryName ); pImpl->pFilterContainer = new SfxFilterContainer( m_sFactoryName );
pImpl->aClassName = rName; pImpl->aClassName = rName;
......
...@@ -238,7 +238,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell ) ...@@ -238,7 +238,6 @@ SfxObjectShell_Impl::SfxObjectShell_Impl( SfxObjectShell& _rDocShell )
,nFlagsInProgress( SfxLoadedFlags::NONE ) ,nFlagsInProgress( SfxLoadedFlags::NONE )
,bModalMode( false ) ,bModalMode( false )
,bRunningMacro( false ) ,bRunningMacro( false )
,eFlags( SfxObjectShellFlags::UNDEFINED )
,bReadOnlyUI( false ) ,bReadOnlyUI( false )
,nStyleFilter( 0 ) ,nStyleFilter( 0 )
,m_bEnableSetModified( true ) ,m_bEnableSetModified( true )
......
...@@ -101,7 +101,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess ...@@ -101,7 +101,6 @@ struct SfxObjectShell_Impl : public ::sfx2::IMacroDocumentAccess
SfxLoadedFlags nFlagsInProgress; SfxLoadedFlags nFlagsInProgress;
bool bModalMode; bool bModalMode;
bool bRunningMacro; bool bRunningMacro;
SfxObjectShellFlags eFlags;
bool bReadOnlyUI; bool bReadOnlyUI;
tools::SvRef<SvRefBase> xHeaderAttributes; tools::SvRef<SvRefBase> xHeaderAttributes;
::rtl::Reference< SfxBaseModel > ::rtl::Reference< SfxBaseModel >
......
...@@ -96,7 +96,7 @@ void SmDocShell::InitInterface_Impl() ...@@ -96,7 +96,7 @@ void SmDocShell::InitInterface_Impl()
GetStaticInterface()->RegisterPopupMenu("view"); GetStaticInterface()->RegisterPopupMenu("view");
} }
SFX_IMPL_OBJECTFACTORY(SmDocShell, SvGlobalName(SO3_SM_CLASSID), SfxObjectShellFlags::STD_NORMAL, "smath" ) SFX_IMPL_OBJECTFACTORY(SmDocShell, SvGlobalName(SO3_SM_CLASSID), "smath" )
void SmDocShell::Notify(SfxBroadcaster&, const SfxHint& rHint) void SmDocShell::Notify(SfxBroadcaster&, const SfxHint& rHint)
{ {
......
...@@ -145,7 +145,7 @@ void SwDocShell::InitInterface_Impl() ...@@ -145,7 +145,7 @@ void SwDocShell::InitInterface_Impl()
} }
SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), SfxObjectShellFlags::STD_NORMAL|SfxObjectShellFlags::HASMENU, "swriter" ) SFX_IMPL_OBJECTFACTORY(SwDocShell, SvGlobalName(SO3_SW_CLASSID), "swriter" )
bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium, bool SwDocShell::InsertGeneratedStream(SfxMedium & rMedium,
uno::Reference<text::XTextRange> const& xInsertPosition) uno::Reference<text::XTextRange> const& xInsertPosition)
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
// Description: Register all filters // Description: Register all filters
SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), SfxObjectShellFlags::STD_NORMAL|SfxObjectShellFlags::HASMENU, "swriter/GlobalDocument" ) SFX_IMPL_OBJECTFACTORY( SwGlobalDocShell, SvGlobalName(SO3_SWGLOB_CLASSID), "swriter/GlobalDocument" )
SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) : SwGlobalDocShell::SwGlobalDocShell(SfxObjectCreateMode eMode ) :
SwDocShell(eMode) SwDocShell(eMode)
......
...@@ -49,7 +49,7 @@ void SwWebDocShell::InitInterface_Impl() ...@@ -49,7 +49,7 @@ void SwWebDocShell::InitInterface_Impl()
} }
SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), SfxObjectShellFlags::STD_NORMAL|SfxObjectShellFlags::HASMENU, "swriter/web" ) SFX_IMPL_OBJECTFACTORY(SwWebDocShell, SvGlobalName(SO3_SWWEB_CLASSID), "swriter/web" )
SwWebDocShell::SwWebDocShell() SwWebDocShell::SwWebDocShell()
: SwDocShell(SfxObjectCreateMode::STANDARD) : SwDocShell(SfxObjectCreateMode::STANDARD)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment