Kaydet (Commit) 6f9dff66 authored tarafından Caolán McNamara's avatar Caolán McNamara

break build id into multiple lines if using g log

üst 8294f08c
...@@ -72,13 +72,34 @@ Image SfxApplication::GetApplicationLogo() ...@@ -72,13 +72,34 @@ Image SfxApplication::GetApplicationLogo()
return Image( aBitmap ); return Image( aBitmap );
} }
/* intense magic to get strong version information */ /* get good version information */
static String static String
GetBuildId() GetBuildId()
{ {
rtl::OUString sDefault; rtl::OUString sDefault;
String sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) ); rtl::OUString sBuildId( utl::Bootstrap::getBuildIdData( sDefault ) );
OSL_ENSURE( sBuildId.Len() > 0, "No BUILDID in bootstrap file" ); //strip trailing - from ./g log
if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-')
{
rtl::OUStringBuffer aBuffer;
sal_Int32 nIndex = 0;
do
{
rtl::OUString aToken = sBuildId.getToken( 0, '-', nIndex );
if (!aToken.isEmpty())
{
aBuffer.append(aToken);
if (nIndex % 5)
aBuffer.append(static_cast<sal_Unicode>('-'));
else
aBuffer.append(static_cast<sal_Unicode>('\n'));
}
}
while ( nIndex >= 0 );
sBuildId = aBuffer.makeStringAndClear();
}
OSL_ENSURE( sBuildId.getLength() > 0, "No BUILDID in bootstrap file" );
return sBuildId; return sBuildId;
} }
......
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