convert vos/process.hxx and related API
This commit is contained in:
parent
854ff7bfc8
commit
08be4cfe51
24 changed files with 35 additions and 67 deletions
|
@ -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)
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,6 @@
|
|||
#include <cppuhelper/implbase1.hxx>
|
||||
#include <cppuhelper/implbase3.hxx>
|
||||
|
||||
#include <vos/dynload.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
|
||||
using namespace ::rtl;
|
||||
|
|
|
@ -42,7 +42,6 @@
|
|||
|
||||
#include <cppuhelper/servicefactory.hxx>
|
||||
|
||||
#include <vos/dynload.hxx>
|
||||
#include <osl/diagnose.h>
|
||||
|
||||
using namespace ::rtl;
|
||||
|
|
|
@ -422,9 +422,6 @@
|
|||
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
#include <vos/process.hxx>
|
||||
#include <vos/security.hxx>
|
||||
#include <vos/thread.hxx>
|
||||
|
||||
//---MARKER---
|
||||
|
||||
|
|
|
@ -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 {}
|
||||
|
|
|
@ -426,7 +426,7 @@
|
|||
#include <vcl/unohelp.hxx>
|
||||
|
||||
#include <osl/mutex.hxx>
|
||||
#include <vos/process.hxx>
|
||||
#include <osl/process.h>
|
||||
|
||||
//---MARKER---
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -87,8 +87,6 @@
|
|||
#include "sys/stat.h"
|
||||
#include "sys/types.h"
|
||||
|
||||
#include "osl/mutex.hxx"
|
||||
#include "vos/process.hxx"
|
||||
//---MARKER---
|
||||
#endif
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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; }
|
||||
|
||||
|
|
|
@ -32,8 +32,6 @@
|
|||
#include <vcl/salinst.hxx>
|
||||
#include <vcl/solarmutex.hxx>
|
||||
|
||||
namespace vos { class OMutex; }
|
||||
|
||||
// -------------------
|
||||
// - SalInstanceData -
|
||||
// -------------------
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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 ];
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue