cui/source/customize/CustomNotebookbarGenerator.cxx | 4 ++- cui/source/customize/SvxNotebookbarConfigPage.cxx | 25 ++++++++------------ 2 files changed, 13 insertions(+), 16 deletions(-)
New commits: commit 7d9ff70206dbd75a7751515b642fbbbc8878c159 Author: Sumit Chauhan <sumitc...@gmail.com> AuthorDate: Mon Jun 17 21:54:27 2019 +0530 Commit: Szymon Kłos <szymon.k...@collabora.com> CommitDate: Tue Jun 18 11:22:22 2019 +0200 User directory path changed The old path was not rendering file from user directory in production build Change-Id: I58e84156f8c93933d59b1ab9d50e3b24becdf3cd Reviewed-on: https://gerrit.libreoffice.org/74181 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.k...@collabora.com> diff --git a/cui/source/customize/CustomNotebookbarGenerator.cxx b/cui/source/customize/CustomNotebookbarGenerator.cxx index a1aa63bca568..1d5a2eb83ba7 100644 --- a/cui/source/customize/CustomNotebookbarGenerator.cxx +++ b/cui/source/customize/CustomNotebookbarGenerator.cxx @@ -18,6 +18,7 @@ */ #include <rtl/bootstrap.hxx> +#include <config_folders.h> #include <CustomNotebookbarGenerator.hxx> #include <osl/file.hxx> #include <vcl/dialog.hxx> @@ -96,7 +97,8 @@ static OUString getAppNameRegistryPath() static OUString customizedUIPathBuffer() { - OUString sDirPath("$BRAND_BASE_DIR/user/config/soffice.cfg/"); + OUString sDirPath("${$BRAND_BASE_DIR/" LIBO_ETC_FOLDER "/" SAL_CONFIGFILE( + "bootstrap") ":UserInstallation}/user/config/soffice.cfg/"); rtl::Bootstrap::expandMacros(sDirPath); return sDirPath; } diff --git a/cui/source/customize/SvxNotebookbarConfigPage.cxx b/cui/source/customize/SvxNotebookbarConfigPage.cxx index f32ad2c472a0..181e1b3d0ee3 100644 --- a/cui/source/customize/SvxNotebookbarConfigPage.cxx +++ b/cui/source/customize/SvxNotebookbarConfigPage.cxx @@ -304,24 +304,19 @@ void SvxNotebookbarConfigPage::searchNodeandAttribute(std::vector<NotebookbarEnt void SvxNotebookbarConfigPage::FillFunctionsList(std::vector<NotebookbarEntries>& aEntries) { + xmlDocPtr pDoc; + xmlNodePtr pNodePtr; OUString sUIFilePath = CustomNotebookbarGenerator::getCustomizedUIPath(); - sal_uInt32 nflag = osl_File_OpenFlag_Read | osl_File_OpenFlag_Write; - osl::File aFile(sUIFilePath); - if (aFile.open(nflag) == osl::FileBase::E_None) + char* cUIFileUIPath = CustomNotebookbarGenerator::convertToCharPointer(sUIFilePath); + pDoc = xmlParseFile(cUIFileUIPath); + pNodePtr = xmlDocGetRootElement(pDoc); + int aRightPos = 0; + searchNodeandAttribute(aEntries, pNodePtr, aRightPos); + if (pDoc != nullptr) { - xmlDocPtr pDoc; - xmlNodePtr pNodePtr; - char* cUIFileUIPath = CustomNotebookbarGenerator::convertToCharPointer(sUIFilePath); - pDoc = xmlParseFile(cUIFileUIPath); - pNodePtr = xmlDocGetRootElement(pDoc); - int aRightPos = 0; - searchNodeandAttribute(aEntries, pNodePtr, aRightPos); - if (pDoc != nullptr) - { - xmlFreeDoc(pDoc); - } - delete[] cUIFileUIPath; + xmlFreeDoc(pDoc); } + delete[] cUIFileUIPath; } void SvxNotebookbarConfigPage::SelectElement() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits