diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-10-29 17:20:37 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-10-30 12:06:24 +0100 |
commit | 998057c36b6df4a12818824d770121f779725f72 (patch) | |
tree | 90a3432f552ff029421f85c3eb3c3910a7bf66fb | |
parent | 282126c22cccac60388df2cbf3216acb3ba33e21 (diff) |
fix vcldemo lookup of icons
Icon themes are in [srcdir]/icon-themes, which is not necessarily
the same as $PWD/icon-themes.
Change-Id: Id2c5037afcbea4ea7dd511a9e10e19e05fa52a5a
Reviewed-on: https://gerrit.libreoffice.org/81701
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
-rw-r--r-- | config_host/config_folders.h.in | 6 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | vcl/source/image/ImplImageTree.cxx | 8 |
3 files changed, 9 insertions, 6 deletions
diff --git a/config_host/config_folders.h.in b/config_host/config_folders.h.in index 51d0e2444de6..13051984f385 100644 --- a/config_host/config_folders.h.in +++ b/config_host/config_folders.h.in @@ -45,4 +45,10 @@ #undef LIBO_URE_MISC_FOLDER #undef LIBO_URE_SHARE_JAVA_FOLDER +/* the source root directory of the build */ +#undef SRC_ROOT + +/* the build directory of the build */ +#undef BUILDDIR + #endif diff --git a/configure.ac b/configure.ac index e7825f93b9a5..ebd4f785c202 100644 --- a/configure.ac +++ b/configure.ac @@ -332,6 +332,7 @@ AC_SUBST(SRC_ROOT) AC_SUBST(BUILDDIR) AC_SUBST(x_Cygwin) AC_DEFINE_UNQUOTED(SRCDIR,"$SRC_ROOT") +AC_DEFINE_UNQUOTED(SRC_ROOT,"$SRC_ROOT") AC_DEFINE_UNQUOTED(BUILDDIR,"$BUILDDIR") if test "z$EUID" = "z0" -a "`uname -o 2>/dev/null`" = "Cygwin"; then diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 21901a9b940e..df561e87a842 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -464,14 +464,10 @@ void ImplImageTree::createStyle() if (isVclDemo()) { - static OUString s_workingDir; - if (!s_workingDir.getLength()) - osl_getProcessWorkingDir( &s_workingDir.pData ); - if (maCurrentStyle == "default") - sThemeUrl = s_workingDir + "/icon-themes/colibre-svg"; + sThemeUrl = "file://" SRC_ROOT "/icon-themes/colibre-svg"; else - sThemeUrl = s_workingDir + "/icon-themes/" + maCurrentStyle; + sThemeUrl = "file://" SRC_ROOT "/icon-themes/" + maCurrentStyle; } else if (maCurrentStyle != "default") { |