diff options
Diffstat (limited to 'unotools/source/config')
-rw-r--r-- | unotools/source/config/bootstrap.cxx | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index 24a5752d3fc1..eccf92f696ad 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -99,7 +99,6 @@ public: // construction and initialization // access helper OUString getBootstrapValue(OUString const& _sName, OUString const& _sDefault) const; - static bool getVersionValue(OUString const& _sName, OUString& _rValue, OUString const& _sDefault); const OUString& getImplName() const { return m_aImplName; } @@ -543,9 +542,17 @@ OUString Bootstrap::getProductKey(OUString const& _sDefault) OUString Bootstrap::getBuildIdData(OUString const& _sDefault) { + // try to open version.ini (versionrc) + OUString uri; + rtl::Bootstrap::get( "BRAND_BASE_DIR", uri); + rtl::Bootstrap aData( uri + "/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ); + if ( aData.getHandle() == nullptr ) + // version.ini (versionrc) doesn't exist + return _sDefault; + + // read value OUString sBuildId; - // read buildid from version.ini (versionrc) - utl::Bootstrap::Impl::getVersionValue( BOOTSTRAP_ITEM_BUILDID, sBuildId, _sDefault ); + aData.getFrom(BOOTSTRAP_ITEM_BUILDID,sBuildId,_sDefault); return sBuildId; } @@ -703,21 +710,6 @@ OUString Bootstrap::Impl::getBootstrapValue(OUString const& _sName, OUString con return sResult; } -bool Bootstrap::Impl::getVersionValue(OUString const& _sName, OUString& _rValue, OUString const& _sDefault) -{ - // try to open version.ini (versionrc) - OUString uri; - rtl::Bootstrap::get( "BRAND_BASE_DIR", uri); - rtl::Bootstrap aData( uri + "/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE("version") ); - if ( aData.getHandle() == nullptr ) - // version.ini (versionrc) doesn't exist - return false; - - // read value - aData.getFrom(_sName,_rValue,_sDefault); - return true; -} - } // namespace utl /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |