diff options
author | Caolán McNamara <caolanm@redhat.com> | 2012-10-11 21:29:24 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2012-10-12 09:19:42 +0100 |
commit | 5551d2776dbfa921d5520e8b09bf5caf4649a545 (patch) | |
tree | fa665baae24c6c7c07492a260cf7b9550ca786e0 /vcl | |
parent | 4ed91fd1633e90b8d1f872aa7ed023431958bd23 (diff) |
handle ui-previewer on .ui in cwd
Change-Id: If13c5494ffb960e943fa8d2c99f2da28b5f95736
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/source/window/builder.cxx | 9 |
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: |