summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2002-11-01 09:06:07 +0000
committerCarsten Driesner <cd@openoffice.org>2002-11-01 09:06:07 +0000
commited80a04295a477f47ac3414dc899bf9e9075bd41 (patch)
treeb3685141ae49b98bb164b10e7fbadc0dbb24985c /desktop
parentafe752cc3dd4a82b441d9ad0b3100a3235a64057 (diff)
#102708# Remove BUILD_SOSL and source restructuring
Diffstat (limited to 'desktop')
-rw-r--r--desktop/prj/d.lst2
-rw-r--r--desktop/source/app/appinit.cxx91
-rw-r--r--desktop/source/app/appinit.hxx11
-rw-r--r--desktop/source/app/configinit.cxx1
-rw-r--r--desktop/source/app/desktopresid.cxx8
-rw-r--r--desktop/source/app/desktopresid.hxx8
-rw-r--r--desktop/source/app/dispatchwatcher.cxx8
-rw-r--r--desktop/source/app/intro.cxx8
-rw-r--r--desktop/source/app/intro.hxx8
9 files changed, 117 insertions, 28 deletions
diff --git a/desktop/prj/d.lst b/desktop/prj/d.lst
index 5b2ef58e8d..4d28648a47 100644
--- a/desktop/prj/d.lst
+++ b/desktop/prj/d.lst
@@ -15,9 +15,11 @@ mkdir: %_DEST%\bin%_EXT%\remote2
..\%__SRC%\bin\soffice.exe %_DEST%\bin%_EXT%\soffice.exe
..\%__SRC%\bin\wrp?????.dll %_DEST%\bin%_EXT%\wrp?????.dll
+..\%__SRC%\bin\eval.dll %_DEST%\bin%_EXT%\eval.dll
..\%__SRC%\lib\libwrp?????.so %_DEST%\lib%_EXT%\libwrp?????.so
..\%__SRC%\lib\libdsk?????.so %_DEST%\lib%_EXT%\libdsk?????.so
..\%__SRC%\lib\libwrp*.dylib %_DEST%\lib%_EXT%\libwrp*.dylib
+..\%__SRC%\lib\libeval.so %_DEST%\lib%_EXT%\libeval.so
..\%__SRC%\bin\soffice %_DEST%\bin%_EXT%\soffice.bin
..\%__SRC%\bin\sweb %_DEST%\bin%_EXT%\sweb.bin
diff --git a/desktop/source/app/appinit.cxx b/desktop/source/app/appinit.cxx
index bf7996414a..0cd1cee11a 100644
--- a/desktop/source/app/appinit.cxx
+++ b/desktop/source/app/appinit.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appinit.cxx,v $
*
- * $Revision: 1.13 $
+ * $Revision: 1.14 $
*
- * last change: $Author: cd $ $Date: 2002-10-18 06:07:40 $
+ * last change: $Author: cd $ $Date: 2002-11-01 09:59:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -59,7 +59,7 @@
*
************************************************************************/
-#include "appinit.hxx"
+#include "app.hxx"
#include "cmdlineargs.hxx"
#include "officeacceptthread.hxx"
@@ -88,6 +88,9 @@
#ifndef _OSL_FILE_HXX_
#include <osl/file.hxx>
#endif
+#ifndef _OSL_MODULE_H_
+#include <osl/module.h>
+#endif
#ifndef _VOS_PROCESS_HXX_
#include <vos/process.hxx>
#endif
@@ -109,6 +112,9 @@
#ifndef _UCBHELPER_CONFIGURATIONKEYS_HXX_
#include <ucbhelper/configurationkeys.hxx>
#endif
+#ifndef _Installer_hxx
+#include <setup2/installer.hxx>
+#endif
#include <cppuhelper/bootstrap.hxx>
#include <tools/urlobj.hxx>
@@ -130,7 +136,7 @@
#include <svtools/internaloptions.hxx>
#endif
-#define DEFINE_CONST_UNICODE(CONSTASCII) UniString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
+
#define DEFINE_CONST_OUSTRING(CONSTASCII) OUString(RTL_CONSTASCII_USTRINGPARAM(CONSTASCII))
#define DESKTOP_TEMPDIRNAME "soffice.tmp"
@@ -143,11 +149,12 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::registry;
-extern desktop::CommandLineArgs* GetCommandLineArgs();
-extern desktop::OOfficeAcceptorThread* pOfficeAcceptThread;
+namespace desktop
+{
-static String aCurrentTempURL;
+char const INSTALLER_INITFILENAME[] = "initialize.ini";
+static String aCurrentTempURL;
// -----------------------------------------------------------------------------
@@ -187,8 +194,49 @@ static bool configureUcb(bool bServer, rtl::OUString const & rPortalConnect)
return ::ucb::ContentBroker::initialize( xServiceFactory, aArgs ) != false;
}
+sal_Bool Desktop::InitializeInstallation( const OUString& rAppFilename )
+{
+ OUString aAppPath;
+ OUString aFinishInstallation;
+ osl::FileBase::getFileURLFromSystemPath( rAppFilename, aFinishInstallation );
+
+ OUStringBuffer aAppPathBuf( aFinishInstallation.getLength() + sizeof( INSTALLER_INITFILENAME ) );
+
+ sal_Int32 nPos = aFinishInstallation.lastIndexOf( '/' );
+ if ( nPos >= 0 )
+ aAppPathBuf.append( aFinishInstallation.copy( 0, nPos ));
+ else
+ aAppPathBuf.append( aFinishInstallation );
+ aAppPathBuf.appendAscii( "/" );
+ aAppPathBuf.appendAscii( INSTALLER_INITFILENAME );
+ aAppPath = aAppPathBuf.makeStringAndClear();
+
+ osl::DirectoryItem aDI;
+ if( osl::DirectoryItem::get( aAppPath, aDI ) == osl_File_E_None )
+ {
+ // Load initialization code only on demand. This is done if the the 'initialize.ini'
+ // is written next to the executable. After initialization this file is removed.
+ // The implementation disposes the old service manager and creates an new one so we
+ // cannot use a service for InitializeInstallation!!
+ OUString aFuncName( RTL_CONSTASCII_USTRINGPARAM( INSTALLER_INITIALIZEINSTALLATION_CFUNCNAME ));
+ OUString aModulePath = OUString::createFromAscii( SVLIBRARY( "set" ) );
+
+ oslModule aSetupModule = osl_loadModule( aModulePath.pData, SAL_LOADMODULE_DEFAULT );
+ if ( aSetupModule )
+ {
+ void* pInitFunc = osl_getSymbol( aSetupModule, aFuncName.pData );
+ if ( pInitFunc )
+ (*(pfunc_InstallerInitializeInstallation)pInitFunc)( rAppFilename.getStr() );
+ osl_unloadModule( aSetupModule );
+ }
-Reference< XMultiServiceFactory > createApplicationServiceManager()
+ return sal_True;
+ }
+
+ return sal_False;
+}
+
+Reference< XMultiServiceFactory > Desktop::CreateApplicationServiceManager()
{
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createApplicationServiceManager" );
@@ -206,7 +254,7 @@ Reference< XMultiServiceFactory > createApplicationServiceManager()
return Reference< XMultiServiceFactory >();
}
-void destroyApplicationServiceManager( Reference< XMultiServiceFactory >& xSMgr )
+void Desktop::DestroyApplicationServiceManager( Reference< XMultiServiceFactory >& xSMgr )
{
Reference< XPropertySet > xProps( xSMgr, UNO_QUERY );
if ( xProps.is() )
@@ -225,7 +273,7 @@ void destroyApplicationServiceManager( Reference< XMultiServiceFactory >& xSMgr
}
}
-void registerServices( Reference< XMultiServiceFactory >& xSMgr )
+void Desktop::RegisterServices( Reference< XMultiServiceFactory >& xSMgr )
{
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::registerServices" );
@@ -293,7 +341,7 @@ void registerServices( Reference< XMultiServiceFactory >& xSMgr )
}
::rtl::OUString aPortalConnect;
- bool bServer = (bool) pCmdLine->IsServer();
+ bool bServer = (bool)pCmdLine->IsServer();
pCmdLine->GetPortalConnectString( aPortalConnect );
if ( !configureUcb( bServer, aPortalConnect ) )
@@ -303,10 +351,23 @@ void registerServices( Reference< XMultiServiceFactory >& xSMgr )
}
// UCB_Helper::Initialize(); !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
- createTemporaryDirectory();
+ CreateTemporaryDirectory();
+}
+
+void Desktop::DeregisterServices()
+{
+ if( pOfficeAcceptThread )
+ {
+ pOfficeAcceptThread->stopAccepting();
+#ifndef LINUX
+ Desktop::pOfficeAcceptThread->join();
+ delete pOfficeAcceptThread;
+#endif
+ pOfficeAcceptThread = 0;
+ }
}
-void createTemporaryDirectory()
+void Desktop::CreateTemporaryDirectory()
{
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::createTemporaryDirectory" );
@@ -353,7 +414,7 @@ void createTemporaryDirectory()
aCurrentTempURL = aRet;
}
-void removeTemporaryDirectory()
+void Desktop::RemoveTemporaryDirectory()
{
RTL_LOGFILE_CONTEXT( aLog, "desktop (cd100003) ::removeTemporaryDirectory" );
@@ -364,3 +425,5 @@ void removeTemporaryDirectory()
SvtInternalOptions().SetCurrentTempURL( String() );
}
}
+
+} // namespace desktop
diff --git a/desktop/source/app/appinit.hxx b/desktop/source/app/appinit.hxx
index 1b519f89bd..2791464616 100644
--- a/desktop/source/app/appinit.hxx
+++ b/desktop/source/app/appinit.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: appinit.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: cd $ $Date: 2001-07-16 12:52:33 $
+ * last change: $Author: cd $ $Date: 2002-11-01 09:59:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,13 +69,20 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#endif
+namespace desktop
+{
+
::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > createApplicationServiceManager();
+sal_Bool InitializeInstallation( const rtl::OUString& rAppFilename );
void registerServices( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMgr );
+void deregisterServices();
void destroyApplicationServiceManager( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& xSMgr );
void createTemporaryDirectory();
void removeTemporaryDirectory();
+}
+
#endif
diff --git a/desktop/source/app/configinit.cxx b/desktop/source/app/configinit.cxx
index 01d0ef3256..4d34075fba 100644
--- a/desktop/source/app/configinit.cxx
+++ b/desktop/source/app/configinit.cxx
@@ -49,6 +49,7 @@ namespace configuration = ::com::sun::star::configuration;
namespace backend = drafts::com::sun::star::configuration::backend;
using rtl::OUString;
using uno::UNO_QUERY;
+using desktop::Desktop;
// ----------------------------------------------------------------------------
static char const CONFIGURATION_PROVIDER[] = "com.sun.star.configuration.ConfigurationProvider";
diff --git a/desktop/source/app/desktopresid.cxx b/desktop/source/app/desktopresid.cxx
index 257d4e8420..6fc9bbe988 100644
--- a/desktop/source/app/desktopresid.cxx
+++ b/desktop/source/app/desktopresid.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: desktopresid.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: cd $ $Date: 2001-07-16 12:52:33 $
+ * last change: $Author: cd $ $Date: 2002-11-01 10:02:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,8 +65,12 @@
#include "app.hxx"
// -----------------------------------------------------------------------
+namespace desktop
+{
DesktopResId::DesktopResId( USHORT nId ) :
ResId( nId, Desktop::GetDesktopResManager() )
{
}
+
+}
diff --git a/desktop/source/app/desktopresid.hxx b/desktop/source/app/desktopresid.hxx
index 9724eb61e7..40c7a25b81 100644
--- a/desktop/source/app/desktopresid.hxx
+++ b/desktop/source/app/desktopresid.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: desktopresid.hxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: cd $ $Date: 2001-07-16 12:52:33 $
+ * last change: $Author: cd $ $Date: 2002-11-01 10:02:19 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -66,11 +66,15 @@
#include <tools/resid.hxx>
#endif
+namespace desktop
+{
+
class DesktopResId : public ResId
{
public:
DesktopResId( USHORT nId );
};
+}
#endif // _DESKTOP_RESID_HXX_
diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 94f47fbc95..051ec0c6e6 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: dispatchwatcher.cxx,v $
*
- * $Revision: 1.12 $
+ * $Revision: 1.13 $
*
- * last change: $Author: lo $ $Date: 2002-10-24 12:57:51 $
+ * last change: $Author: cd $ $Date: 2002-11-01 10:04:47 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -125,11 +125,11 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::view;
-String GetURL_Impl( const String& rName );
-
namespace desktop
{
+String GetURL_Impl( const String& rName );
+
struct DispatchHolder
{
DispatchHolder( const URL& rURL, Reference< XDispatch >& rDispatch ) :
diff --git a/desktop/source/app/intro.cxx b/desktop/source/app/intro.cxx
index 3a5de80a2b..d4833b7770 100644
--- a/desktop/source/app/intro.cxx
+++ b/desktop/source/app/intro.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: intro.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: ghiggins $ $Date: 2002-10-07 10:33:18 $
+ * last change: $Author: cd $ $Date: 2002-11-01 10:06:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -73,6 +73,8 @@
#include <vcl/svapp.hxx>
#endif
+namespace desktop
+{
// -----------------------------------------------------------------------
@@ -151,3 +153,5 @@ void IntroWindow_Impl::Paint( const Rectangle& )
void IntroWindow_Impl::Slide()
{
}
+
+}
diff --git a/desktop/source/app/intro.hxx b/desktop/source/app/intro.hxx
index 3b3aed85eb..3ebb8b3b8e 100644
--- a/desktop/source/app/intro.hxx
+++ b/desktop/source/app/intro.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: intro.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: ghiggins $ $Date: 2002-10-07 10:33:18 $
+ * last change: $Author: cd $ $Date: 2002-11-01 10:06:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,6 +71,8 @@
#endif
// class IntroWindow_Impl ------------------------------------------------
+namespace desktop
+{
class IntroWindow_Impl : public WorkWindow
{
@@ -89,4 +91,6 @@ public:
void Slide();
};
+}
+
#endif // #ifndef _DESKTOP_INTRO_HXX