summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSumit Chauhan <sumitcn25@gmail.com>2019-06-17 21:54:27 +0530
committerSzymon Kłos <szymon.klos@collabora.com>2019-06-18 11:22:22 +0200
commit7d9ff70206dbd75a7751515b642fbbbc8878c159 (patch)
tree178b90ad2649b566ee09cb3c604180346e309b34
parent857c72b6eaa7ecb96300a096280dae8e2895d05c (diff)
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.klos@collabora.com>
-rw-r--r--cui/source/customize/CustomNotebookbarGenerator.cxx4
-rw-r--r--cui/source/customize/SvxNotebookbarConfigPage.cxx25
2 files changed, 13 insertions, 16 deletions
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()