Kaydet (Commit) a24a1701 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Rename weird "NetPath" term to the more descriptive "InstallationRootPath"

üst 9d0c50e8
...@@ -51,7 +51,7 @@ namespace psp { ...@@ -51,7 +51,7 @@ namespace psp {
OUString getOfficePath( enum whichOfficePath ePath ) OUString getOfficePath( enum whichOfficePath ePath )
{ {
static OUString aNetPath; static OUString aInstallationRootPath;
static OUString aUserPath; static OUString aUserPath;
static OUString aConfigPath; static OUString aConfigPath;
static OUString aEmpty; static OUString aEmpty;
...@@ -61,8 +61,8 @@ OUString getOfficePath( enum whichOfficePath ePath ) ...@@ -61,8 +61,8 @@ OUString getOfficePath( enum whichOfficePath ePath )
{ {
bOnce = true; bOnce = true;
OUString aIni; OUString aIni;
Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aNetPath ); Bootstrap::get( OUString( RTL_CONSTASCII_USTRINGPARAM( "BRAND_BASE_DIR" ) ), aInstallationRootPath );
aIni = aNetPath + OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) ); aIni = aInstallationRootPath + OUString( RTL_CONSTASCII_USTRINGPARAM( "/program/" SAL_CONFIGFILE( "bootstrap" ) ) );
Bootstrap aBootstrap( aIni ); Bootstrap aBootstrap( aIni );
aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomDataUrl" ) ), aConfigPath ); aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "CustomDataUrl" ) ), aConfigPath );
aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath ); aBootstrap.getFrom( OUString( RTL_CONSTASCII_USTRINGPARAM( "UserInstallation" ) ), aUserPath );
...@@ -74,11 +74,11 @@ OUString getOfficePath( enum whichOfficePath ePath ) ...@@ -74,11 +74,11 @@ OUString getOfficePath( enum whichOfficePath ePath )
if( osl_getSystemPathFromFileURL( aConfigPath.pData, &aSysPath.pData ) == osl_File_E_None ) if( osl_getSystemPathFromFileURL( aConfigPath.pData, &aSysPath.pData ) == osl_File_E_None )
aConfigPath = aSysPath; aConfigPath = aSysPath;
} }
if( ! aNetPath.compareToAscii( "file://", 7 ) ) if( ! aInstallationRootPath.compareToAscii( "file://", 7 ) )
{ {
OUString aSysPath; OUString aSysPath;
if( osl_getSystemPathFromFileURL( aNetPath.pData, &aSysPath.pData ) == osl_File_E_None ) if( osl_getSystemPathFromFileURL( aInstallationRootPath.pData, &aSysPath.pData ) == osl_File_E_None )
aNetPath = aSysPath; aInstallationRootPath = aSysPath;
} }
if( ! aUserPath.compareToAscii( "file://", 7 ) ) if( ! aUserPath.compareToAscii( "file://", 7 ) )
{ {
...@@ -100,7 +100,7 @@ OUString getOfficePath( enum whichOfficePath ePath ) ...@@ -100,7 +100,7 @@ OUString getOfficePath( enum whichOfficePath ePath )
switch( ePath ) switch( ePath )
{ {
case ConfigPath: return aConfigPath; case ConfigPath: return aConfigPath;
case NetPath: return aNetPath; case InstallationRootPath: return aInstallationRootPath;
case UserPath: return aUserPath; case UserPath: return aUserPath;
} }
return aEmpty; return aEmpty;
...@@ -128,7 +128,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub ...@@ -128,7 +128,7 @@ void psp::getPrinterPathList( std::list< OUString >& rPathList, const char* pSub
OUStringBuffer aPathBuffer( 256 ); OUStringBuffer aPathBuffer( 256 );
// append net path // append net path
aPathBuffer.append( getOfficePath( psp::NetPath ) ); aPathBuffer.append( getOfficePath( psp::InstallationRootPath ) );
if( aPathBuffer.getLength() ) if( aPathBuffer.getLength() )
{ {
aPathBuffer.appendAscii( "/share/psprint" ); aPathBuffer.appendAscii( "/share/psprint" );
...@@ -206,7 +206,7 @@ OUString psp::getFontPath() ...@@ -206,7 +206,7 @@ OUString psp::getFontPath()
OUStringBuffer aPathBuffer( 512 ); OUStringBuffer aPathBuffer( 512 );
OUString aConfigPath( getOfficePath( psp::ConfigPath ) ); OUString aConfigPath( getOfficePath( psp::ConfigPath ) );
OUString aNetPath( getOfficePath( psp::NetPath ) ); OUString aInstallationRootPath( getOfficePath( psp::InstallationRootPath ) );
OUString aUserPath( getOfficePath( psp::UserPath ) ); OUString aUserPath( getOfficePath( psp::UserPath ) );
if( aConfigPath.getLength() ) if( aConfigPath.getLength() )
{ {
...@@ -227,11 +227,11 @@ OUString psp::getFontPath() ...@@ -227,11 +227,11 @@ OUString psp::getFontPath()
} }
if( aConfigPath.getLength() == 0 ) if( aConfigPath.getLength() == 0 )
{ {
if( aNetPath.getLength() ) if( aInstallationRootPath.getLength() )
{ {
aPathBuffer.append( aNetPath ); aPathBuffer.append( aInstallationRootPath );
aPathBuffer.appendAscii( "/share/fonts/truetype;"); aPathBuffer.appendAscii( "/share/fonts/truetype;");
aPathBuffer.append( aNetPath ); aPathBuffer.append( aInstallationRootPath );
aPathBuffer.appendAscii( "/share/fonts/type1;" ); aPathBuffer.appendAscii( "/share/fonts/type1;" );
} }
if( aUserPath.getLength() ) if( aUserPath.getLength() )
......
...@@ -57,7 +57,7 @@ void VCL_DLLPUBLIC normPath( rtl::OString& rPath ); ...@@ -57,7 +57,7 @@ void VCL_DLLPUBLIC normPath( rtl::OString& rPath );
// rOrgPath will be subject to normPath // rOrgPath will be subject to normPath
void VCL_DLLPUBLIC splitPath( rtl::OString& rOrgPath, rtl::OString& rDir, rtl::OString& rBase ); void VCL_DLLPUBLIC splitPath( rtl::OString& rOrgPath, rtl::OString& rDir, rtl::OString& rBase );
enum whichOfficePath { NetPath, UserPath, ConfigPath }; enum whichOfficePath { InstallationRootPath, UserPath, ConfigPath };
// note: gcc 3.4.1 warns about visibility if we retunr a const rtl::OUString& here // note: gcc 3.4.1 warns about visibility if we retunr a const rtl::OUString& here
// seems to be a bug in gcc, now we return an object instead of a reference // seems to be a bug in gcc, now we return an object instead of a reference
rtl::OUString VCL_DLLPUBLIC getOfficePath( enum whichOfficePath ePath ); rtl::OUString VCL_DLLPUBLIC getOfficePath( enum whichOfficePath ePath );
......
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