summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/source/window/builder.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 53ffa37b4807..75d25235e511 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -78,7 +78,14 @@ VclBuilder::VclBuilder(Window *pParent, OUString sUIDir, OUString sUIFile, OStri
{
OUStringBuffer aTransBuf;
sal_Int32 nLastSlash = sUri.lastIndexOf('/');
- aTransBuf.append(sUri.copy(0, nLastSlash)).append("/res/").append(aLocale.Language);
+ if (nLastSlash != -1)
+ aTransBuf.append(sUri.copy(0, nLastSlash));
+ else
+ {
+ aTransBuf.append('.');
+ nLastSlash = 0;
+ }
+ aTransBuf.append("/res/").append(aLocale.Language);
switch (i)
{
case 0: