[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 2 commits - desktop/source sc/source
Dennis Francis (via logerrit)
logerrit at kemper.freedesktop.org
Mon May 18 15:17:48 UTC 2020
desktop/source/lib/init.cxx | 10 ++++++++++
sc/source/ui/view/output.cxx | 9 +++++----
2 files changed, 15 insertions(+), 4 deletions(-)
New commits:
commit be84f24a42ee0b5b94a0daa75cc01c053bb76881
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Wed Apr 1 20:20:19 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon May 18 17:17:14 2020 +0200
tdf#127158 :lokit: preload liblocaledata_others.so
...even if LOK_WHITELIST_LANGUAGES does not contain an Asian language.
Not preloading this module causes locale-fallbacks for example
when a calc-cell with Asian locale has some date with number-formatting,
LOOL displays the date with the fallback locale(en_US).
(more details in comments)
Change-Id: Id8a31565f7f0f0262c044028f55fdf4fe33ecec8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91510
Tested-by: Jenkins
Reviewed-by: Andras Timar <andras.timar at collabora.com>
diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx
index c86b2eb72dd4..ddb42e0f3860 100644
--- a/desktop/source/lib/init.cxx
+++ b/desktop/source/lib/init.cxx
@@ -93,6 +93,8 @@
#include <com/sun/star/linguistic2/LinguServiceManager.hpp>
#include <com/sun/star/linguistic2/XSpellChecker.hpp>
+#include <com/sun/star/i18n/Calendar2.hpp>
+#include <com/sun/star/i18n/LocaleCalendar2.hpp>
#include <com/sun/star/i18n/ScriptType.hpp>
#include <com/sun/star/lang/DisposedException.hpp>
@@ -5722,6 +5724,14 @@ static void preloadData()
}
std::cerr << "\n";
+ // Hack to load and cache the module liblocaledata_others.so which is not loaded normally
+ // (when loading dictionaries of just non-Asian locales). Creating a XCalendar4 of one Asian locale
+ // will cheaply load this missing "others" locale library. Appending an Asian locale in
+ // LOK_WHITELIST_LANGUAGES env-var also works but at the cost of loading that dictionary.
+ css::uno::Reference< css::i18n::XCalendar4 > xCal = css::i18n::LocaleCalendar2::create(comphelper::getProcessComponentContext());
+ css::lang::Locale aAsianLocale = {"hi", "IN", ""};
+ xCal->loadDefaultCalendar(aAsianLocale);
+
// preload all available thesauri
css::uno::Reference<linguistic2::XThesaurus> xThesaurus(xLngSvcMgr->getThesaurus());
css::uno::Reference<linguistic2::XSupportedLocales> xThesLocales(xSpellChecker, css::uno::UNO_QUERY_THROW);
commit 3c4e4cc92d0850d53b2a875bc4ffd09883521c7f
Author: Dennis Francis <dennis.francis at collabora.com>
AuthorDate: Tue Jan 21 22:11:19 2020 +0530
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon May 18 17:17:13 2020 +0200
tdf#130112 lok: Do not apply zoom-factor twice...
... in ScOutputData::FillReferenceMarks().
mnPPT[XY] already has the factor aZoom[XY] in it. Refer
ScViewData::CalcPPT() to see how PPT[XY] are derived.
Change-Id: I3f9b5c01cb53514450fad5f7b2b6861b112effdb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87158
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 3f62c10548466119ec6b1a662ab339e5dbe0b05f)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87170
Tested-by: Jenkins
Reviewed-by: Dennis Francis <dennis.francis at collabora.com>
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index e14647bd7954..ced84e795ecd 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -1958,10 +1958,11 @@ ReferenceMark ScOutputData::FillReferenceMark( SCCOL nRefStartX, SCROW nRefStart
if (bTop && bBottom && bLeft && bRight)
{
- aResult = ReferenceMark( nMinX / mnPPTX * double( aZoomX ),
- nMinY / mnPPTY * double( aZoomY ),
- ( nMaxX - nMinX ) / mnPPTX * double( aZoomX ),
- ( nMaxY - nMinY ) / mnPPTY * double( aZoomY ),
+ // mnPPT[XY] already has the factor aZoom[XY] in it.
+ aResult = ReferenceMark( nMinX / mnPPTX,
+ nMinY / mnPPTY,
+ ( nMaxX - nMinX ) / mnPPTX,
+ ( nMaxY - nMinY ) / mnPPTY,
nTab,
rColor );
}
More information about the Libreoffice-commits
mailing list