diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-12-12 18:13:03 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2018-03-19 19:02:01 +0100 |
commit | f03e71758c9a2f616dfbaaf81b77bd73b7024c8b (patch) | |
tree | f0d7e096bcbab1da021939579c05f5d404d4292b /desktop/source | |
parent | adffe88eaa4608ce52676568598cbc4199599ee7 (diff) |
lokdialog: Allow windows / dialogs in different languages.
Change-Id: I9f32161981aed73e6d97696e5f976af276d1625a
Reviewed-on: https://gerrit.libreoffice.org/46327
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/46775
Tested-by: Jenkins <ci@libreoffice.org>
(cherry picked from commit e16852cd1bc5d9e0646ae4183bc13a7bce19df7f)
Diffstat (limited to 'desktop/source')
-rw-r--r-- | desktop/source/lib/init.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index 5f18a457f241..13b072ec630f 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -598,6 +598,7 @@ static void doc_setView(LibreOfficeKitDocument* pThis, int nId); static int doc_getView(LibreOfficeKitDocument* pThis); static int doc_getViewsCount(LibreOfficeKitDocument* pThis); static bool doc_getViewIds(LibreOfficeKitDocument* pThis, int* pArray, size_t nSize); +static void doc_setViewLanguage(LibreOfficeKitDocument* pThis, int nId, const char* language); static unsigned char* doc_renderFont(LibreOfficeKitDocument* pThis, const char *pFontName, const char *pChar, @@ -663,6 +664,8 @@ LibLODocument_Impl::LibLODocument_Impl(const uno::Reference <css::lang::XCompone m_pDocumentClass->paintWindow = doc_paintWindow; m_pDocumentClass->postWindow = doc_postWindow; + m_pDocumentClass->setViewLanguage = doc_setViewLanguage; + gDocumentClass = m_pDocumentClass; } pClass = m_pDocumentClass.get(); @@ -3153,6 +3156,13 @@ static bool doc_getViewIds(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis* return SfxLokHelper::getViewIds(pArray, nSize); } +static void doc_setViewLanguage(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, int nId, const char* language) +{ + SolarMutexGuard aGuard; + + SfxLokHelper::setViewLanguage(nId, OStringToOUString(language, RTL_TEXTENCODING_UTF8)); +} + unsigned char* doc_renderFont(SAL_UNUSED_PARAMETER LibreOfficeKitDocument* /*pThis*/, const char* pFontName, const char* pChar, |