take the .ui files from $BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR

Change-Id: I9cffdc092206c038da32a32a2cfe629e68b5c258
diff --git a/sw/CppunitTest_sw_ooxmlexport8.mk b/sw/CppunitTest_sw_ooxmlexport8.mk
index f3995b2..7c88db6 100644
--- a/sw/CppunitTest_sw_ooxmlexport8.mk
+++ b/sw/CppunitTest_sw_ooxmlexport8.mk
@@ -100,7 +100,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlexport8,\
    xmloff/util/xo \
))

$(eval $(call gb_CppunitTest_use_instdir_configuration,sw_ooxmlexport8))
$(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlexport8))

$(eval $(call gb_CppunitTest_use_uiconfigs,sw_ooxmlexport8,\
    modules/swriter \
diff --git a/sw/ooxmlexport_setup.mk b/sw/ooxmlexport_setup.mk
index 7bd941f..d9f9818 100644
--- a/sw/ooxmlexport_setup.mk
+++ b/sw/ooxmlexport_setup.mk
@@ -114,7 +114,7 @@ $(eval $(call gb_CppunitTest_use_components,sw_ooxmlexport$(1),\
	filter/source/storagefilterdetect/storagefd \
))

$(eval $(call gb_CppunitTest_use_instdir_configuration,sw_ooxmlexport$(1)))
$(eval $(call gb_CppunitTest_use_configuration,sw_ooxmlexport$(1)))

$(eval $(call gb_CppunitTest_use_uiconfigs,sw_ooxmlexport$(1),\
    modules/swriter \
diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx
index 95d0e13..45713fd 100644
--- a/vcl/source/window/dialog.cxx
+++ b/vcl/source/window/dialog.cxx
@@ -32,6 +32,7 @@
#include <window.h>
#include <brdwin.hxx>

#include <rtl/bootstrap.hxx>
#include <rtl/strbuf.hxx>
#include <sal/log.hxx>

@@ -489,23 +490,8 @@ void VclBuilderContainer::disposeBuilder()

OUString VclBuilderContainer::getUIRootDir()
{
    /*to-do, check if user config has an override before using shared one, etc*/
    css::uno::Reference< css::util::XPathSettings > xPathSettings = css::util::thePathSettings::get(
        ::comphelper::getProcessComponentContext() );

    OUString sShareLayer = xPathSettings->getBasePathShareLayer();

    // "UIConfig" is a "multi path" ... use first part only here!
    sal_Int32 nPos = sShareLayer.indexOf(';');
    if (nPos > 0)
        sShareLayer = sShareLayer.copy(0, nPos);

    // Note: May be an user uses URLs without a final slash! Check it ...
    if (!sShareLayer.endsWith("/"))
        sShareLayer += "/";

    sShareLayer += "soffice.cfg/";
    /*to-do, can we merge all this foo with existing soffice.cfg finding code, etc*/
    OUString sShareLayer("$BRAND_BASE_DIR/$BRAND_SHARE_SUBDIR/config/soffice.cfg/");
    rtl::Bootstrap::expandMacros(sShareLayer);
    return sShareLayer;
}