summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2001-06-14 10:42:00 +0000
committerMathias Bauer <mba@openoffice.org>2001-06-14 10:42:00 +0000
commit673f729dc896886aa5ebf63a9da523caefaa3b30 (patch)
tree56a2c073ac2cc98840ea4887150e8c43f5743762 /sw/source/ui
parentee26613b62fb757d21e8d159a955cf4f7559fd50 (diff)
#86150#: enable office without writer: webfactory always present, others are optional
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/app/docsh.cxx13
-rw-r--r--sw/source/ui/app/swdll.cxx22
-rw-r--r--sw/source/ui/app/swmodule.cxx18
-rw-r--r--sw/source/ui/uiview/view0.cxx16
4 files changed, 46 insertions, 23 deletions
diff --git a/sw/source/ui/app/docsh.cxx b/sw/source/ui/app/docsh.cxx
index c9aa093d3a..ccfaf731bd 100644
--- a/sw/source/ui/app/docsh.cxx
+++ b/sw/source/ui/app/docsh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docsh.cxx,v $
*
- * $Revision: 1.16 $
+ * $Revision: 1.17 $
*
- * last change: $Author: jp $ $Date: 2001-05-18 15:28:23 $
+ * last change: $Author: mba $ $Date: 2001-06-14 11:41:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -265,6 +265,8 @@
#include <app.hrc>
#endif
+#include <svtools/moduleoptions.hxx>
+
using namespace rtl;
using namespace ::com::sun::star::uno;
@@ -298,8 +300,11 @@ public:
SFX_IMPL_INTERFACE( SwDocShell, SfxObjectShell, SW_RES(0) )
{
- SwGlobalDocShell::Factory().RegisterHelpFile(String::CreateFromAscii("swriter.svh"));
- SwGlobalDocShell::Factory().RegisterHelpPIFile(String::CreateFromAscii("swriter.svh"));
+ if ( SvtModuleOptions().IsWriter() )
+ {
+ SwGlobalDocShell::Factory().RegisterHelpFile(String::CreateFromAscii("swriter.svh"));
+ SwGlobalDocShell::Factory().RegisterHelpPIFile(String::CreateFromAscii("swriter.svh"));
+ }
}
/*--------------------------------------------------------------------
diff --git a/sw/source/ui/app/swdll.cxx b/sw/source/ui/app/swdll.cxx
index 6fe53a0cd2..c203a8de48 100644
--- a/sw/source/ui/app/swdll.cxx
+++ b/sw/source/ui/app/swdll.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swdll.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2000-12-18 15:07:20 $
+ * last change: $Author: mba $ $Date: 2001-06-14 11:41:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -114,21 +114,24 @@ void SwDLL::Init()
SvFactory* pWDocFact = (SvFactory*)(*ppShlPtr)->pSwWebDocShellFactory;
SvFactory* pGlobDocFact = (SvFactory*)(*ppShlPtr)->pSwGlobalDocShellFactory;
delete (*ppShlPtr);
- SwModule* pModule = new SwModule(pDocFact, pWDocFact, pGlobDocFact);;
+ SwModule* pModule = new SwModule( pWDocFact, pDocFact, pGlobDocFact );
(*ppShlPtr) = pModule;
(*ppShlPtr)->pSwDocShellFactory = pDocFact ;
(*ppShlPtr)->pSwWebDocShellFactory = pWDocFact ;
(*ppShlPtr)->pSwGlobalDocShellFactory = pGlobDocFact;
- SwDocShell::Factory().RegisterPluginMenuBar( SW_RES(CFG_SW_MENU_PORTAL));
- SwDocShell::Factory().RegisterMenuBar(SW_RES(CFG_SW_MENU));
- SwDocShell::Factory().RegisterAccel(SW_RES(CFG_SW_ACCEL));
+ if ( pDocFact )
+ {
+ SwDocShell::Factory().RegisterPluginMenuBar( SW_RES(CFG_SW_MENU_PORTAL));
+ SwDocShell::Factory().RegisterMenuBar(SW_RES(CFG_SW_MENU));
+ SwDocShell::Factory().RegisterAccel(SW_RES(CFG_SW_ACCEL));
+ SwGlobalDocShell::Factory().RegisterMenuBar(SW_RES(CFG_SW_MENU));
+ SwGlobalDocShell::Factory().RegisterAccel(SW_RES(CFG_SW_ACCEL));
+ }
+
SwWebDocShell::Factory().RegisterPluginMenuBar( SW_RES(CFG_SWWEB_MENU_PORTAL));
SwWebDocShell::Factory().RegisterMenuBar(SW_RES(CFG_SWWEB_MENU));
SwWebDocShell::Factory().RegisterAccel(SW_RES(CFG_SWWEB_ACCEL));
- SwGlobalDocShell::Factory().RegisterMenuBar(SW_RES(CFG_SW_MENU));
- SwGlobalDocShell::Factory().RegisterAccel(SW_RES(CFG_SW_ACCEL));
-
SdrObjFactory::InsertMakeObjectHdl( LINK( &aSwObjectFactory, SwObjectFactory, MakeObject ) );
//Initialisierung der Statics
@@ -147,7 +150,6 @@ void SwDLL::Init()
// register your controllers here
RegisterControls();
-
}
diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx
index 21048adaa2..e1c65d13d2 100644
--- a/sw/source/ui/app/swmodule.cxx
+++ b/sw/source/ui/app/swmodule.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swmodule.cxx,v $
*
- * $Revision: 1.17 $
+ * $Revision: 1.18 $
*
- * last change: $Author: os $ $Date: 2001-05-02 12:38:13 $
+ * last change: $Author: mba $ $Date: 2001-06-14 11:41:46 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -345,6 +345,8 @@
#include <svx/rubydialog.hxx>
#endif
+#include <svtools/moduleoptions.hxx>
+
#include <app.hrc>
ResMgr *pSwResMgr = 0;
@@ -460,10 +462,16 @@ void SwDLL::RegisterFactories()
{
//Diese Id's duerfen nicht geaendert werden. Mittels der Id's wird vom
//Sfx die sdbcx::View (Dokumentansicht wiederherstellen) erzeugt.
- SwView::RegisterFactory ( 2 );
+ if ( SvtModuleOptions().IsWriter() )
+ SwView::RegisterFactory ( 2 );
+
SwWebView::RegisterFactory ( 5 );
- SwSrcView::RegisterFactory ( 6 );
- SwPagePreView::RegisterFactory ( 7 );
+
+ if ( SvtModuleOptions().IsWriter() )
+ {
+ SwSrcView::RegisterFactory ( 6 );
+ SwPagePreView::RegisterFactory ( 7 );
+ }
}
//************************************************************************
diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx
index e68103facf..b40f44d8a0 100644
--- a/sw/source/ui/uiview/view0.cxx
+++ b/sw/source/ui/uiview/view0.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: view0.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: os $ $Date: 2001-01-10 16:10:12 $
+ * last change: $Author: mba $ $Date: 2001-06-14 11:42:00 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -133,12 +133,17 @@
using namespace ::com::sun::star;
using namespace ::rtl;
+#include <svtools/moduleoptions.hxx>
+
#define C2S(cChar) UniString::CreateFromAscii(cChar)
SFX_IMPL_VIEWFACTORY(SwView, SW_RES(STR_NONAME))
{
- SFX_VIEW_REGISTRATION(SwDocShell);
- SFX_VIEW_REGISTRATION(SwGlobalDocShell);
+ if ( SvtModuleOptions().IsWriter() )
+ {
+ SFX_VIEW_REGISTRATION(SwDocShell);
+ SFX_VIEW_REGISTRATION(SwGlobalDocShell);
+ }
}
SFX_IMPL_INTERFACE( SwView, SfxViewShell, SW_RES(RID_TOOLS_TOOLBOX) )
@@ -179,6 +184,9 @@ view::XSelectionSupplier* SwView::GetUNOObject()
/*------------------------------------------------------------------------
$Log: not supported by cvs2svn $
+ Revision 1.6 2001/01/10 16:10:12 os
+ Ruby dialog
+
Revision 1.5 2000/11/10 15:49:54 tbe
removed outcommented basctl include file idetemp.hxx