diff options
author | Jan Holesovsky <kendy@collabora.com> | 2017-12-12 18:13:03 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@collabora.com> | 2017-12-19 17:23:01 +0100 |
commit | e16852cd1bc5d9e0646ae4183bc13a7bce19df7f (patch) | |
tree | 07e7ada37599b825459358b5fa89cc5b11b3bf9d /desktop/source | |
parent | 193ebf963cf251fd0885b47e59d9db11a97450f2 (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>
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, |