[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - sfx2/source
Julien Nabet (via logerrit)
logerrit at kemper.freedesktop.org
Mon Sep 6 11:47:44 UTC 2021
sfx2/source/control/emojiview.cxx | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
New commits:
commit c0ac99bd1f3b035260aa6a1a180e1e4b230ef554
Author: Julien Nabet <serval2412 at yahoo.fr>
AuthorDate: Sat Sep 4 22:00:51 2021 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Sep 6 13:47:10 2021 +0200
tdf#105689: fix path management to retrieve Emoji toolbar button
On Windows console logs show:
warn:sfx:7060:6444:sfx2/source/control/emojiview.cxx:105: Emoji config data is empty
Change-Id: I85baf2fedc20ff855183147e9a178bb048ac75ce
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121653
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 37357e3cae749c54f1b9645c6670240baf860bc4)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121564
Reviewed-by: Xisco Fauli <xiscofauli at libreoffice.org>
Signed-off-by: Xisco Fauli <xiscofauli at libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121711
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/sfx2/source/control/emojiview.cxx b/sfx2/source/control/emojiview.cxx
index 63aa9ac602c9..ee902a9da207 100644
--- a/sfx2/source/control/emojiview.cxx
+++ b/sfx2/source/control/emojiview.cxx
@@ -7,6 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <osl/file.hxx>
#include <emojiview.hxx>
#include <emojiviewitem.hxx>
#include <rtl/bootstrap.hxx>
@@ -64,9 +65,12 @@ EmojiView::EmojiView(std::unique_ptr<weld::ScrolledWindow> xWindow)
: ThumbnailView(std::move(xWindow), nullptr)
{
// locate json data file
- OUString sPath("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/emojiconfig/emoji.json");
- rtl::Bootstrap::expandMacros(sPath);
- std::string strPath = OUStringToOString(sPath.copy(strlen("file://")), RTL_TEXTENCODING_UTF8).getStr();
+ OUString aURL("$BRAND_BASE_DIR/" LIBO_SHARE_FOLDER "/emojiconfig/emoji.json");
+ rtl::Bootstrap::expandMacros(aURL);
+
+ OUString aPath;
+ osl::FileBase::getSystemPathFromFileURL(aURL, aPath);
+ std::string strPath = OUStringToOString(aPath, RTL_TEXTENCODING_UTF8).getStr();
std::ifstream file(strPath);
if(!file.is_open())
More information about the Libreoffice-commits
mailing list