summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2010-10-21 15:46:17 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2010-10-25 19:55:38 -0500
commit08be4cfe51342b5b08511951b9c5ff13b3eeee8d (patch)
tree9a5394379bda57ec3d52f499a71898da0aea995f
parent854ff7bfc802d47d2a7419f7185af069a216b0bd (diff)
convert vos/process.hxx and related API
-rw-r--r--comphelper/source/misc/regpathhelper.cxx17
-rw-r--r--l10ntools/inc/l10ntools/vosapp.hxx7
-rw-r--r--sax/test/saxdemo.cxx1
-rw-r--r--sax/test/testcomponent.cxx1
-rw-r--r--svl/inc/pch/precompiled_svl.hxx3
-rw-r--r--svl/source/misc/svldata.cxx1
-rw-r--r--svtools/inc/pch/precompiled_svtools.hxx2
-rw-r--r--svtools/source/misc/svtdata.cxx1
-rw-r--r--toolkit/source/awt/xsimpleanimation.cxx1
-rw-r--r--toolkit/source/awt/xthrobber.cxx1
-rw-r--r--tools/inc/pch/precompiled_tools.hxx2
-rw-r--r--tools/source/testtoolloader/testtoolloader.cxx10
-rw-r--r--unotools/source/config/defaultoptions.cxx1
-rw-r--r--unotools/source/config/pathoptions.cxx1
-rw-r--r--vcl/aqua/source/app/salinst.cxx2
-rwxr-xr-xvcl/aqua/source/window/salframeview.mm2
-rw-r--r--vcl/inc/vcl/svdata.hxx1
-rw-r--r--vcl/os2/inc/salinst.h2
-rw-r--r--vcl/test/dndtest.cxx9
-rw-r--r--vcl/unx/inc/salsys.h4
-rw-r--r--vcl/unx/kde/kdedata.cxx10
-rw-r--r--vcl/unx/kde4/KDEXLib.cxx10
-rw-r--r--vcl/unx/source/app/saldata.cxx11
-rw-r--r--vcl/win/source/app/salinst.cxx2
24 files changed, 35 insertions, 67 deletions
diff --git a/comphelper/source/misc/regpathhelper.cxx b/comphelper/source/misc/regpathhelper.cxx
index 5b4fc8b88cdf..898d1224b091 100644
--- a/comphelper/source/misc/regpathhelper.cxx
+++ b/comphelper/source/misc/regpathhelper.cxx
@@ -33,12 +33,11 @@
#include <osl/file.hxx>
#include <osl/security.hxx>
#include <osl/thread.h>
-#include <vos/process.hxx>
+#include <osl/process.h>
#include <rtl/textenc.h>
#include <rtl/uri.h>
#include <rtl/uri.hxx>
-using namespace vos;
using namespace osl;
using namespace rtl;
@@ -66,18 +65,17 @@ namespace comphelper
*/
static sal_Bool retrievePortalUserDir( OUString *pDirectory )
{
- OStartupInfo startInfo;
- sal_uInt32 nArgs = startInfo.getCommandArgCount();
+ sal_uInt32 nArgs = osl_getCommandArgCount();
sal_Bool bIsPortalUser = sal_False;
OUString sArg;
while( nArgs > 0 )
- {
- if ( !startInfo.getCommandArg(--nArgs, sArg) )
- {
+ {
+ if ( !osl_getCommandArg(--nArgs, &sArg.pData) )
+ {
if ( sArg.indexOf(OUString::createFromAscii("-userid")) == 0 )
{
- bIsPortalUser = sal_True;
+ bIsPortalUser = sal_True;
sal_Int32 nStart = sArg.lastIndexOf( '[' );
sal_Int32 nEnd = sArg.lastIndexOf( ']' );
if( -1 == nStart || -1 == nEnd || nEnd < nStart)
@@ -189,8 +187,7 @@ OUString getPathToSystemRegistry()
FILE *f=NULL;
// search in the directory of the executable
- OStartupInfo info;
- if( OStartupInfo::E_None == info.getExecutableFile(uBuffer) )
+ if(osl_Process_E_None == osl_getExecutableFile(&uBuffer.pData))
{
sal_uInt32 lastIndex = uBuffer.lastIndexOf(PATH_DELEMITTER);
if (lastIndex > 0)
diff --git a/l10ntools/inc/l10ntools/vosapp.hxx b/l10ntools/inc/l10ntools/vosapp.hxx
index 937994fc5eb7..e45840b4f9df 100644
--- a/l10ntools/inc/l10ntools/vosapp.hxx
+++ b/l10ntools/inc/l10ntools/vosapp.hxx
@@ -5,7 +5,6 @@
#include <sal/main.h>
#include <tools/solar.h>
#include <tools/string.hxx>
-#include <vos/process.hxx>
// Mininmal vcl/svapp compatibility without vcl dependence
class Application
@@ -19,15 +18,13 @@ public:
// Urg: Cut & Paste from svapp.cxx: we don't want to depend on vcl
USHORT Application::GetCommandLineParamCount()
{
- vos::OStartupInfo aStartInfo;
- return (USHORT)aStartInfo.getCommandArgCount();
+ return osl_getCommandArgCount();
}
XubString Application::GetCommandLineParam( USHORT nParam )
{
- vos::OStartupInfo aStartInfo;
rtl::OUString aParam;
- aStartInfo.getCommandArg( nParam, aParam );
+ osl_getCommandArg( nParam, &aParam.pData );
return XubString( aParam );
}
diff --git a/sax/test/saxdemo.cxx b/sax/test/saxdemo.cxx
index 17f286149867..18715609a4c0 100644
--- a/sax/test/saxdemo.cxx
+++ b/sax/test/saxdemo.cxx
@@ -51,7 +51,6 @@
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase3.hxx>
-#include <vos/dynload.hxx>
#include <osl/diagnose.h>
using namespace ::rtl;
diff --git a/sax/test/testcomponent.cxx b/sax/test/testcomponent.cxx
index 128fbebdb3c0..c92e416fc791 100644
--- a/sax/test/testcomponent.cxx
+++ b/sax/test/testcomponent.cxx
@@ -42,7 +42,6 @@
#include <cppuhelper/servicefactory.hxx>
-#include <vos/dynload.hxx>
#include <osl/diagnose.h>
using namespace ::rtl;
diff --git a/svl/inc/pch/precompiled_svl.hxx b/svl/inc/pch/precompiled_svl.hxx
index 2d8d42942c99..387ea3629728 100644
--- a/svl/inc/pch/precompiled_svl.hxx
+++ b/svl/inc/pch/precompiled_svl.hxx
@@ -422,9 +422,6 @@
#include <osl/mutex.hxx>
-#include <vos/process.hxx>
-#include <vos/security.hxx>
-#include <vos/thread.hxx>
//---MARKER---
diff --git a/svl/source/misc/svldata.cxx b/svl/source/misc/svldata.cxx
index a9d5027f25c8..eb36f0fc8f64 100644
--- a/svl/source/misc/svldata.cxx
+++ b/svl/source/misc/svldata.cxx
@@ -32,7 +32,6 @@
#include <map>
#include <tools/resmgr.hxx>
#include <tools/shl.hxx>
-#include <vos/process.hxx>
#include <svl/svldata.hxx>
namespace unnamed_svl_svldata {}
diff --git a/svtools/inc/pch/precompiled_svtools.hxx b/svtools/inc/pch/precompiled_svtools.hxx
index c746d53b7c7f..07c0e3a23382 100644
--- a/svtools/inc/pch/precompiled_svtools.hxx
+++ b/svtools/inc/pch/precompiled_svtools.hxx
@@ -426,7 +426,7 @@
#include <vcl/unohelp.hxx>
#include <osl/mutex.hxx>
-#include <vos/process.hxx>
+#include <osl/process.h>
//---MARKER---
diff --git a/svtools/source/misc/svtdata.cxx b/svtools/source/misc/svtdata.cxx
index 6b5228e4b521..9429ac014df9 100644
--- a/svtools/source/misc/svtdata.cxx
+++ b/svtools/source/misc/svtdata.cxx
@@ -32,7 +32,6 @@
#include <map>
#include <tools/resmgr.hxx>
#include <tools/shl.hxx>
-#include <vos/process.hxx>
#include <svtools/svtdata.hxx>
#include <vcl/svapp.hxx>
diff --git a/toolkit/source/awt/xsimpleanimation.cxx b/toolkit/source/awt/xsimpleanimation.cxx
index e67b44ac9821..925fe57b3436 100644
--- a/toolkit/source/awt/xsimpleanimation.cxx
+++ b/toolkit/source/awt/xsimpleanimation.cxx
@@ -90,7 +90,6 @@ namespace toolkit
void XSimpleAnimation::ProcessWindowEvent( const VclWindowEvent& _rVclWindowEvent )
{
// TODO: XSimpleAnimation::ProcessWindowEvent
- //::vos::OClearableGuard aGuard( GetMutex() );
//Reference< XSimpleAnimation > xKeepAlive( this );
//SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
//if ( !pSpinButton )
diff --git a/toolkit/source/awt/xthrobber.cxx b/toolkit/source/awt/xthrobber.cxx
index 96328cfd3e3a..01527839d75f 100644
--- a/toolkit/source/awt/xthrobber.cxx
+++ b/toolkit/source/awt/xthrobber.cxx
@@ -96,7 +96,6 @@ namespace toolkit
bInit = true;
}
// TODO: XSimpleAnimation::ProcessWindowEvent
- //::vos::OClearableGuard aGuard( GetMutex() );
//Reference< XSimpleAnimation > xKeepAlive( this );
//SpinButton* pSpinButton = static_cast< SpinButton* >( GetWindow() );
//if ( !pSpinButton )
diff --git a/tools/inc/pch/precompiled_tools.hxx b/tools/inc/pch/precompiled_tools.hxx
index 60ab99762cc6..dfed2ac7d4f6 100644
--- a/tools/inc/pch/precompiled_tools.hxx
+++ b/tools/inc/pch/precompiled_tools.hxx
@@ -87,8 +87,6 @@
#include "sys/stat.h"
#include "sys/types.h"
-#include "osl/mutex.hxx"
-#include "vos/process.hxx"
//---MARKER---
#endif
diff --git a/tools/source/testtoolloader/testtoolloader.cxx b/tools/source/testtoolloader/testtoolloader.cxx
index 5944801f4432..22cddf65673c 100644
--- a/tools/source/testtoolloader/testtoolloader.cxx
+++ b/tools/source/testtoolloader/testtoolloader.cxx
@@ -32,7 +32,7 @@
#include "tools/testtoolloader.hxx"
#include <osl/module.h>
#include <rtl/logfile.hxx>
-#include <vos/process.hxx>
+#include <osl/process.h>
#include "tools/solar.h"
#include "tools/string.hxx"
#include "tools/debug.hxx"
@@ -57,16 +57,14 @@ static bool bLoggerStarted = false;
sal_uInt32 GetCommandLineParamCount()
{
- vos::OStartupInfo aStartInfo;
- return aStartInfo.getCommandArgCount();
+ return osl_getCommandArgCount();
}
String GetCommandLineParam( sal_uInt32 nParam )
{
- vos::OStartupInfo aStartInfo;
::rtl::OUString aParam;
- vos::OStartupInfo::TStartupError eError = aStartInfo.getCommandArg( nParam, aParam );
- if ( eError == vos::OStartupInfo::E_None )
+ oslProcessError eError = osl_getCommandArg( nParam, &aParam.pData );
+ if ( eError == osl_Process_E_None )
return String( aParam );
else
{
diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx
index 8698047a7b55..a4611ab74ef5 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -40,7 +40,6 @@
#include <com/sun/star/uno/Sequence.hxx>
#include <osl/mutex.hxx>
-#include <vos/process.hxx>
#include <unotools/localfilehelper.hxx>
#include <rtl/instance.hxx>
diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx
index 5ce92c5d6fee..8c850a805372 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -43,7 +43,6 @@
#include <unotools/bootstrap.hxx>
#include <unotools/ucbhelper.hxx>
-#include <vos/process.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index bf8c79d8cea9..4d8a205bdf3c 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -112,7 +112,7 @@ class AquaDelayedSettingsChanged : public Timer
void AquaSalInstance::delayedSettingsChanged( bool bInvalidate )
{
- vos::OGuard aGuard( *mpSalYieldMutex );
+ osl:SolarGuard aGuard( *mpSalYieldMutex );
AquaDelayedSettingsChanged* pTimer = new AquaDelayedSettingsChanged( bInvalidate );
pTimer->SetTimeout( 50 );
pTimer->Start();
diff --git a/vcl/aqua/source/window/salframeview.mm b/vcl/aqua/source/window/salframeview.mm
index ca9ef4a5e263..8da1bf9f3085 100755
--- a/vcl/aqua/source/window/salframeview.mm
+++ b/vcl/aqua/source/window/salframeview.mm
@@ -408,7 +408,7 @@ static AquaSalFrame* getMouseContainerFrame()
return mpFrame ? (mpFrame->getClipPath() != 0 ? NO : YES) : YES;
}
-// helper class similar to a vos::OGuard for the SalYieldMutex
+// helper class similar to a osl::SolarGuard for the SalYieldMutex
// the difference is that it only does tryToAcquire instead of aquire
// so dreaded deadlocks like #i93512# are prevented
class TryGuard
diff --git a/vcl/inc/vcl/svdata.hxx b/vcl/inc/vcl/svdata.hxx
index ce5ad4bb9442..8b180183a9b3 100644
--- a/vcl/inc/vcl/svdata.hxx
+++ b/vcl/inc/vcl/svdata.hxx
@@ -110,7 +110,6 @@ class SalI18NImeStatus;
class DockingManager;
class VclEventListeners2;
-namespace vos { class OMutex; }
namespace vcl { class DisplayConnection; class SettingsConfigItem; class DeleteOnDeinitBase; }
namespace utl { class DefaultFontConfiguration; class FontSubstConfiguration; }
diff --git a/vcl/os2/inc/salinst.h b/vcl/os2/inc/salinst.h
index ddb2050b33e3..a3d3fdb6bcfc 100644
--- a/vcl/os2/inc/salinst.h
+++ b/vcl/os2/inc/salinst.h
@@ -32,8 +32,6 @@
#include <vcl/salinst.hxx>
#include <vcl/solarmutex.hxx>
-namespace vos { class OMutex; }
-
// -------------------
// - SalInstanceData -
// -------------------
diff --git a/vcl/test/dndtest.cxx b/vcl/test/dndtest.cxx
index ecca58011c49..31bc02ffd8ef 100644
--- a/vcl/test/dndtest.cxx
+++ b/vcl/test/dndtest.cxx
@@ -45,7 +45,7 @@
#include <com/sun/star/datatransfer/dnd/XDropTargetListener.hpp>
#include <com/sun/star/datatransfer/dnd/XDragGestureRecognizer.hpp>
#include <com/sun/star/datatransfer/dnd/XDragGestureListener.hpp>
-#include <vos/process.hxx>
+#include <osl/process.h>
#include <stdio.h>
@@ -156,18 +156,17 @@ public:
void MyApp::Main()
{
OUString aRegistry;
- OStartupInfo aInfo;
- for( sal_Int32 n = 0, nmax = aInfo.getCommandArgCount(); n < nmax; n++ )
+ for( sal_Int32 n = 0, nmax = osl_getCommandArgCount(); n < nmax; n++ )
{
OUString aArg;
- aInfo.getCommandArg( n, aArg );
+ osl_getCommandArg( n, &aArg.pData );
if( aArg.compareTo( OUString::createFromAscii( "-r" ), 2 ) == 0 )
{
if ( n + 1 < nmax )
- aInfo.getCommandArg( ++n, aRegistry );
+ osl_getCommandArg( ++n, &aRegistry.pData );
}
}
diff --git a/vcl/unx/inc/salsys.h b/vcl/unx/inc/salsys.h
index c74d11306e01..988409027835 100644
--- a/vcl/unx/inc/salsys.h
+++ b/vcl/unx/inc/salsys.h
@@ -30,12 +30,8 @@
#define _SV_SALSYS_H
#include <vcl/sv.h>
-#ifndef _VOS_MUTEX_HXX
#include <osl/mutex.hxx>
-#endif
-#ifndef _THREAD_HXX_
#include <osl/thread.hxx>
-#endif
#include <vcl/salsys.hxx>
#include <vcl/dllapi.h>
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index 9c4f43fc9db7..aeac873aea5f 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -50,12 +50,11 @@
#include <osl/thread.h>
#include <osl/process.h>
#include <osl/module.h>
+#include <osl/mutex.hxx>
#include <tools/debug.hxx>
#include "i18n_im.hxx"
#include "i18n_xkb.hxx"
-#include <vos/process.hxx>
-#include <osl/mutex.hxx>
/* #i59042# override KApplications method for session management
* since it will interfere badly with our own.
@@ -137,17 +136,16 @@ void KDEXLib::Init()
m_nFakeCmdLineArgs = 1;
USHORT nIdx;
- vos::OExtCommandLine aCommandLine;
- int nParams = aCommandLine.getCommandArgCount();
+ int nParams = osl_getCommandArgCount();
rtl::OString aDisplay;
rtl::OUString aParam, aBin;
for ( nIdx = 0; nIdx < nParams; ++nIdx )
{
- aCommandLine.getCommandArg( nIdx, aParam );
+ osl_getCommandArg( nIdx, &aParam.pData );
if ( !m_pFreeCmdLineArgs && aParam.equalsAscii( "-display" ) && nIdx + 1 < nParams )
{
- aCommandLine.getCommandArg( nIdx + 1, aParam );
+ osl_getCommandArg( nIdx + 1, &aParam.pData );
aDisplay = rtl::OUStringToOString( aParam, osl_getThreadTextEncoding() );
m_nFakeCmdLineArgs = 3;
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index f4519b301c99..a7ac4547ef67 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -47,7 +47,7 @@
#include <i18n_xkb.hxx>
#include <saldata.hxx>
-#include <vos/process.hxx>
+#include <osl/process.h>
#include "KDESalDisplay.hxx"
@@ -133,17 +133,17 @@ void KDEXLib::Init()
m_nFakeCmdLineArgs = 2;
USHORT nIdx;
- vos::OExtCommandLine aCommandLine;
- int nParams = aCommandLine.getCommandArgCount();
+
+ int nParams = osl_getCommandArgCount();
rtl::OString aDisplay;
rtl::OUString aParam, aBin;
for ( nIdx = 0; nIdx < nParams; ++nIdx )
{
- aCommandLine.getCommandArg( nIdx, aParam );
+ osl_getCommandArg( nIdx, &aParam.pData );
if ( !m_pFreeCmdLineArgs && aParam.equalsAscii( "-display" ) && nIdx + 1 < nParams )
{
- aCommandLine.getCommandArg( nIdx + 1, aParam );
+ osl_getCommandArg( nIdx + 1, &aParam.pData );
aDisplay = rtl::OUStringToOString( aParam, osl_getThreadTextEncoding() );
m_pFreeCmdLineArgs = new char*[ m_nFakeCmdLineArgs + 2 ];
diff --git a/vcl/unx/source/app/saldata.cxx b/vcl/unx/source/app/saldata.cxx
index 657bacb7bb03..609ae471ceaa 100644
--- a/vcl/unx/source/app/saldata.cxx
+++ b/vcl/unx/source/app/saldata.cxx
@@ -57,7 +57,7 @@
#include <sys/time.h>
#include <unistd.h>
#endif
-#include <vos/process.hxx>
+#include <osl/process.h>
#include <osl/mutex.hxx>
#include "Xproto.h"
@@ -67,7 +67,6 @@
#include <salframe.h>
#include <osl/signal.h>
#include <osl/thread.h>
-#include <osl/process.h>
#include <rtl/strbuf.hxx>
#include <rtl/bootstrap.hxx>
@@ -401,16 +400,16 @@ void SalXLib::Init()
Display *pDisp = NULL;
// is there a -display command line parameter?
- vos::OExtCommandLine aCommandLine;
- sal_uInt32 nParams = aCommandLine.getCommandArgCount();
+
+ sal_uInt32 nParams = osl_getCommandArgCount();
rtl::OUString aParam;
rtl::OString aDisplay;
for (USHORT i=0; i<nParams; i++)
{
- aCommandLine.getCommandArg(i, aParam);
+ osl_getCommandArg(i, &aParam.pData);
if (aParam.equalsAscii("-display"))
{
- aCommandLine.getCommandArg(i+1, aParam);
+ osl_getCommandArg(i+1, &aParam.pData);
aDisplay = rtl::OUStringToOString(
aParam, osl_getThreadTextEncoding());
diff --git a/vcl/win/source/app/salinst.cxx b/vcl/win/source/app/salinst.cxx
index ec8384cad451..cc3aba411b59 100644
--- a/vcl/win/source/app/salinst.cxx
+++ b/vcl/win/source/app/salinst.cxx
@@ -104,7 +104,7 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
// =======================================================================
-class SalYieldMutex : public vos::OMutex
+class SalYieldMutex : public vcl::SolarMutexObject
{
public: // for ImplSalYield()
WinSalInstance* mpInstData;