summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-06-28 13:26:48 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-06-28 13:26:48 +0100
commit96e2c20abd4b6cc9bc7cf30a64e5643e25cfb5c9 (patch)
tree4ca03a869eb1df8c963014adc65b9d4a6b790c39 /cui
parent6f9dff66ee12c3cf5874fd4a33b82dbb090fe124 (diff)
pretty this up a bit
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/about.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx
index 863bd90312fa..76248928500c 100644
--- a/cui/source/dialogs/about.cxx
+++ b/cui/source/dialogs/about.cxx
@@ -81,6 +81,7 @@ GetBuildId()
//strip trailing - from ./g log
if (!sBuildId.isEmpty() && sBuildId.getStr()[sBuildId.getLength()-1] == '-')
{
+ sBuildId = sBuildId.copy(0, sBuildId.getLength()-1);
rtl::OUStringBuffer aBuffer;
sal_Int32 nIndex = 0;
do
@@ -89,10 +90,13 @@ GetBuildId()
if (!aToken.isEmpty())
{
aBuffer.append(aToken);
- if (nIndex % 5)
- aBuffer.append(static_cast<sal_Unicode>('-'));
- else
- aBuffer.append(static_cast<sal_Unicode>('\n'));
+ if (nIndex >= 0)
+ {
+ if (nIndex % 5)
+ aBuffer.append(static_cast<sal_Unicode>('-'));
+ else
+ aBuffer.append(static_cast<sal_Unicode>('\n'));
+ }
}
}
while ( nIndex >= 0 );