diff options
Diffstat (limited to 'unotools/source/config/bootstrap.cxx')
-rw-r--r-- | unotools/source/config/bootstrap.cxx | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 4c4548fe3e92..a0e306744a2b 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -23,7 +23,6 @@ #include "unotools/bootstrap.hxx" - #include <rtl/ustring.hxx> #include <rtl/ustrbuf.hxx> #include <osl/file.hxx> @@ -35,7 +34,6 @@ #include <osl/process.h> #include "tools/getprocessworkingdir.hxx" - // #define this to true, if remembering defaults is not supported properly #define RTL_BOOTSTRAP_DEFAULTS_BROKEN true @@ -53,18 +51,13 @@ #define BOOTSTRAP_DIRNAME_USERDIR "user" - typedef char const * AsciiString; - namespace utl { - - // Implementation class: Bootstrap::Impl - namespace { OUString makeImplName() @@ -137,15 +130,12 @@ namespace utl theImpl::get().initialize(); } - // helper - typedef Bootstrap::PathStatus PathStatus; sal_Unicode const cURLSeparator = '/'; - // path status utility function static PathStatus implCheckStatusOfURL(OUString const& _sURL, osl::DirectoryItem& aDirItem) @@ -187,7 +177,6 @@ PathStatus implCheckStatusOfURL(OUString const& _sURL, osl::DirectoryItem& aDirI return eStatus; } - static bool implNormalizeURL(OUString & _sURL, osl::DirectoryItem& aDirItem) { @@ -238,8 +227,6 @@ bool implEnsureAbsolute(OUString & _rsURL) // also strips embedded dots !! } } - - static bool implMakeAbsoluteURL(OUString & _rsPathOrURL) { @@ -306,8 +293,6 @@ PathStatus checkStatusAndNormalizeURL(OUString & _sURL) return eStatus; } - - // helpers to build and check a nested URL static PathStatus getDerivedPath( @@ -353,11 +338,9 @@ PathStatus getDerivedPath( OSL_ASSERT( aStatus > Bootstrap::PATH_VALID ); } - return aStatus; } - static inline PathStatus getDerivedPath( @@ -370,8 +353,6 @@ PathStatus getDerivedPath( return getDerivedPath(_rURL,_aBaseData.path,_aBaseData.status,_sRelativeURL,_rData,_sBootstrapParameter); } - - static OUString getExecutableBaseName() { @@ -398,8 +379,6 @@ OUString getExecutableBaseName() return sExecutable; } - - static inline Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rResult) @@ -407,7 +386,6 @@ Bootstrap::PathStatus updateStatus(Bootstrap::Impl::PathData & _rResult) return _rResult.status = checkStatusAndNormalizeURL(_rResult.path); } - static Bootstrap::PathStatus implGetBootstrapFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rBootstrapFile) { @@ -416,7 +394,6 @@ Bootstrap::PathStatus implGetBootstrapFile(rtl::Bootstrap& _rData, Bootstrap::Im return updateStatus(_rBootstrapFile); } - static Bootstrap::PathStatus implGetVersionFile(rtl::Bootstrap& _rData, Bootstrap::Impl::PathData & _rVersionFile) { @@ -433,7 +410,6 @@ static char const IS_MISSING[] = "is missing"; static char const IS_INVALID[] = "is corrupt"; static char const PERIOD[] = ". "; - static void addFileError(OUStringBuffer& _rBuf, OUString const& _aPath, AsciiString _sWhat) { OUString sSimpleFileName = _aPath.copy(1 +_aPath.lastIndexOf(cURLSeparator)); @@ -443,7 +419,6 @@ static void addFileError(OUStringBuffer& _rBuf, OUString const& _aPath, AsciiStr _rBuf.appendAscii(_sWhat).appendAscii(PERIOD); } - static void addMissingDirectoryError(OUStringBuffer& _rBuf, OUString const& _aPath) { _rBuf.appendAscii("The configuration directory"); @@ -451,7 +426,6 @@ static void addMissingDirectoryError(OUStringBuffer& _rBuf, OUString const& _aPa _rBuf.appendAscii(IS_MISSING).appendAscii(PERIOD); } - static void addUnexpectedError(OUStringBuffer& _rBuf, AsciiString _sExtraInfo = NULL) { if (NULL == _sExtraInfo) @@ -460,7 +434,6 @@ static void addUnexpectedError(OUStringBuffer& _rBuf, AsciiString _sExtraInfo = _rBuf.appendAscii(_sExtraInfo).appendAscii(PERIOD); } - static Bootstrap::FailureCode describeError(OUStringBuffer& _rBuf, Bootstrap::Impl const& _rData) { Bootstrap::FailureCode eErrCode = Bootstrap::INVALID_BOOTSTRAP_DATA; @@ -557,10 +530,8 @@ static Bootstrap::FailureCode describeError(OUStringBuffer& _rBuf, Bootstrap::Im return eErrCode; } - // class Bootstrap - OUString Bootstrap::getProductKey() { OUString const csProductKeyItem(BOOTSTRAP_ITEM_PRODUCT_KEY); @@ -570,7 +541,6 @@ OUString Bootstrap::getProductKey() return data().getBootstrapValue( csProductKeyItem, sDefaultProductKey ); } - OUString Bootstrap::getProductKey(OUString const& _sDefault) { OUString const csProductKeyItem(BOOTSTRAP_ITEM_PRODUCT_KEY); @@ -578,7 +548,6 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault) return data().getBootstrapValue( csProductKeyItem, _sDefault ); } - OUString Bootstrap::getBuildVersion(OUString const& _sDefault) { OUString const csBuildVersionItem(BOOTSTRAP_ITEM_BUILDVERSION); @@ -589,7 +558,6 @@ OUString Bootstrap::getBuildVersion(OUString const& _sDefault) return sBuildVersion; } - OUString Bootstrap::getBuildIdData(OUString const& _sDefault) { OUString const csBuildIdItem(BOOTSTRAP_ITEM_BUILDID); @@ -603,8 +571,6 @@ OUString Bootstrap::getBuildIdData(OUString const& _sDefault) return sBuildId; } - - Bootstrap::PathStatus Bootstrap::locateBaseInstallation(OUString& _rURL) { Impl::PathData const& aPathData = data().aBaseInstall_; @@ -613,7 +579,6 @@ Bootstrap::PathStatus Bootstrap::locateBaseInstallation(OUString& _rURL) return aPathData.status; } - PathStatus Bootstrap::locateUserInstallation(OUString& _rURL) { Impl::PathData const& aPathData = data().aUserInstall_; @@ -622,8 +587,6 @@ PathStatus Bootstrap::locateUserInstallation(OUString& _rURL) return aPathData.status; } - - PathStatus Bootstrap::locateUserData(OUString& _rURL) { OUString const csUserDirItem(BOOTSTRAP_ITEM_USERDIR); @@ -641,7 +604,6 @@ PathStatus Bootstrap::locateUserData(OUString& _rURL) } } - PathStatus Bootstrap::locateBootstrapFile(OUString& _rURL) { Impl::PathData const& aPathData = data().aBootstrapINI_; @@ -650,7 +612,6 @@ PathStatus Bootstrap::locateBootstrapFile(OUString& _rURL) return aPathData.status; } - PathStatus Bootstrap::locateVersionFile(OUString& _rURL) { Impl::PathData const& aPathData = data().aVersionINI_; @@ -659,7 +620,6 @@ PathStatus Bootstrap::locateVersionFile(OUString& _rURL) return aPathData.status; } - Bootstrap::Status Bootstrap::checkBootstrapStatus(OUString& _rDiagnosticMessage, FailureCode& _rErrCode) { Impl const& aData = data(); @@ -680,10 +640,8 @@ Bootstrap::Status Bootstrap::checkBootstrapStatus(OUString& _rDiagnosticMessage, return result; } - // class Bootstrap::Impl - bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData) { OUString const csBaseInstallItem( BOOTSTRAP_ITEM_BASEINSTALLATION ); @@ -698,7 +656,6 @@ bool Bootstrap::Impl::initBaseInstallationData(rtl::Bootstrap& _rData) return bResult; } - bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData) { OUString const csUserInstallItem( BOOTSTRAP_ITEM_USERINSTALLATION ); @@ -732,7 +689,6 @@ bool Bootstrap::Impl::initUserInstallationData(rtl::Bootstrap& _rData) return bResult; } - void Bootstrap::Impl::initialize() { rtl::Bootstrap aData( m_aImplName ); @@ -769,7 +725,6 @@ void Bootstrap::Impl::initialize() } } - OUString Bootstrap::Impl::getBootstrapValue(OUString const& _sName, OUString const& _sDefault) const { rtl::Bootstrap aData( m_aImplName ); @@ -779,7 +734,6 @@ OUString Bootstrap::Impl::getBootstrapValue(OUString const& _sName, OUString con return sResult; } - bool Bootstrap::Impl::getVersionValue(OUString const& _sName, OUString& _rValue, OUString const& _sDefault) const { // try to open version.ini (versionrc) @@ -795,7 +749,6 @@ bool Bootstrap::Impl::getVersionValue(OUString const& _sName, OUString& _rValue, return true; } - } // namespace utl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |