import libreoffice-6.3.6.2-3.el8

This commit is contained in:
CentOS Sources 2020-11-03 06:53:54 -05:00 committed by Andrew Lukoshko
parent 0a249eb73f
commit c8545b48be
63 changed files with 2728 additions and 8589 deletions

14
.gitignore vendored
View File

@ -1,14 +1,8 @@
SOURCES/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
SOURCES/185d60944ea767075d27247c3162b3bc-unowinreg.dll
SOURCES/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf
SOURCES/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
SOURCES/gpgkey-C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3.gpg.asc
SOURCES/libreoffice-6.0.6.1.tar.xz
SOURCES/libreoffice-base-symbolic.svg
SOURCES/libreoffice-calc-symbolic.svg
SOURCES/libreoffice-draw-symbolic.svg
SOURCES/libreoffice-help-6.0.6.1.tar.xz
SOURCES/libreoffice-impress-symbolic.svg
SOURCES/libreoffice-main-symbolic.svg
SOURCES/libreoffice-math-symbolic.svg
SOURCES/libreoffice-translations-6.0.6.1.tar.xz
SOURCES/libreoffice-writer-symbolic.svg
SOURCES/libreoffice-6.3.6.2.tar.xz
SOURCES/libreoffice-help-6.3.6.2.tar.xz
SOURCES/libreoffice-translations-6.3.6.2.tar.xz

View File

@ -1,14 +1,8 @@
7168b0f40aa5c72267899601c116d2348d2f56ec SOURCES/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
0619ed3a89644bef318df67db12045b2b590585b SOURCES/185d60944ea767075d27247c3162b3bc-unowinreg.dll
d336802a36ed2c87dd243e7c2f1d0542dace5cca SOURCES/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf
2d49e11b0b711970f494294dc3698f05eb294853 SOURCES/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
7b5fd93d787fbc6d9c2d4025d543730ee8dc4559 SOURCES/gpgkey-C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3.gpg.asc
7a10bc2e3d39a2b61a507eae30c8b505dcd4f553 SOURCES/libreoffice-6.0.6.1.tar.xz
54fc749ba924f9ca4e0391caaf579ab344302038 SOURCES/libreoffice-base-symbolic.svg
9de544172d736d59589767000c1f657034a5d53d SOURCES/libreoffice-calc-symbolic.svg
0f6dc4726da0920869354fbe4b2924f9ac569b4a SOURCES/libreoffice-draw-symbolic.svg
d453fdf82bf65f79bfbf70986720436ba4d9ed51 SOURCES/libreoffice-help-6.0.6.1.tar.xz
8c74dd667c660cc643c4d715dd50491ba92146d5 SOURCES/libreoffice-impress-symbolic.svg
c77acd04a7647b09745f9424ab0f65d52dfcd397 SOURCES/libreoffice-main-symbolic.svg
3857a55644148eb25ed1a594bd00d1262761fb39 SOURCES/libreoffice-math-symbolic.svg
9dbf1c8f3b373a3ec15e989f86c1a34a7d7aa761 SOURCES/libreoffice-translations-6.0.6.1.tar.xz
d4f0674ad46a832120db956cc01a27fdc2060458 SOURCES/libreoffice-writer-symbolic.svg
79aa683b98c465ce570652852faead9f973f8d95 SOURCES/libreoffice-6.3.6.2.tar.xz
f6f94206dad1038c4369610a90e1727e4266ea80 SOURCES/libreoffice-help-6.3.6.2.tar.xz
52b483e3d868345f7aa9ed187fd8b59d713d24fc SOURCES/libreoffice-translations-6.3.6.2.tar.xz

View File

@ -0,0 +1,59 @@
From b8bb7fd853db5d0d7cc4ea9120efb1a707e46c22 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 3 Dec 2019 11:56:33 +0100
Subject: [PATCH] Adapt SAL_WARN to C++20 deleted ostream << for sal_Unicode
(aka char16_t)
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2019/p1423r3.html> "char8_t
backward compatibility remediation", as implemented now by <https://gcc.gnu.org/
git/?p=gcc.git;a=commit;h=0c5b35933e5b150df0ab487efb2f11ef5685f713> "libstdc++:
P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads
that would print an integer rather than a (presumably expected) character.
Change-Id: Ic70d3e90e4b990d297e35f07379fe4952e138820
Reviewed-on: https://gerrit.libreoffice.org/84321
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
basegfx/source/polygon/b2dsvgpolypolygon.cxx | 2 +-
starmath/source/ooxmlimport.cxx | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
index 2fdacad3653f..490bcd69c9a6 100644
--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx
+++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx
@@ -648,7 +648,7 @@ namespace basegfx
default:
{
SAL_WARN("basegfx", "importFromSvgD(): skipping tags in svg:d element (unknown: \""
- << aCurrChar
+ << OUString(aCurrChar)
<< "\")!");
++nPos;
break;
diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx
index f0913f157078..731daa054120 100644
--- a/starmath/source/ooxmlimport.cxx
+++ b/starmath/source/ooxmlimport.cxx
@@ -223,7 +223,7 @@ OUString SmOoxmlImport::handleAcc()
break;
default:
acc = "acute";
- SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << accChr << "\'" );
+ SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << OUString(accChr) << "\'" );
break;
}
OUString e = readOMathArgInElement( M_TOKEN( e ));
@@ -554,7 +554,7 @@ OUString SmOoxmlImport::handleNary()
ret = "sum";
break;
default:
- SAL_WARN( "starmath.ooxml", "Unknown m:nary chr \'" << chr << "\'" );
+ SAL_WARN( "starmath.ooxml", "Unknown m:nary chr \'" << OUString(chr) << "\'" );
break;
}
if( !subHide )
--
2.24.1

View File

@ -1,23 +0,0 @@
From 6deba9b85bc9d5eb4f297ea305bcddfbad0060e1 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 3 Jul 2018 09:30:37 +0200
Subject: [PATCH] Adapt to Python 3
Change-Id: I7c44c23810a79242ec5ddf52a316b4bba7d838ce
---
solenv/bin/pack_images.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/solenv/bin/pack_images.py b/solenv/bin/pack_images.py
index 0f493c8f3035..b66ea34e731c 100755
--- a/solenv/bin/pack_images.py
+++ b/solenv/bin/pack_images.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# -*- coding: utf-8 -*-
# -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
#
--
2.17.1

View File

@ -0,0 +1,54 @@
From 22005041f829d85e675ea27bdee1770af58a1ea0 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 3 Jun 2019 16:21:24 +0200
Subject: [PATCH] AppendInfoBar can return null
e.g., when opening the old help window ("Help - LibreOffice Help" in a build
configured with --with-help to "build the old local help" (configure.ac))
Change-Id: Icecd224774b98811ddf9545c5fa83a85fab259fc
Reviewed-on: https://gerrit.libreoffice.org/73390
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
sfx2/source/view/viewfrm.cxx | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 5620f4396e8f..ed8ffa200ef6 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -1239,16 +1239,20 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest)
{
VclPtr<SfxInfoBarWindow> pInfoBar = AppendInfoBar("whatsnew", SfxResId(STR_WHATSNEW_TEXT), InfoBarType::Info);
- VclPtrInstance<PushButton> xWhatsNewButton(&GetWindow());
- xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON));
- xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize());
- xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler));
- pInfoBar->addButton(xWhatsNewButton);
-
- //update lastversion
- std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
- officecfg::Setup::Product::ooSetupLastVersion::set(sSetupVersion, batch);
- batch->commit();
+ if (pInfoBar)
+ {
+ VclPtrInstance<PushButton> xWhatsNewButton(&GetWindow());
+ xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON));
+ xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize());
+ xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler));
+ pInfoBar->addButton(xWhatsNewButton);
+
+ //update lastversion
+ std::shared_ptr<comphelper::ConfigurationChanges> batch(comphelper::ConfigurationChanges::create());
+ officecfg::Setup::Product::ooSetupLastVersion::set(
+ sSetupVersion, batch);
+ batch->commit();
+ }
}
}
--
2.25.1

View File

@ -0,0 +1,40 @@
From ac68d29966f78ac8799f31f13578e4843a49043f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 14 Apr 2020 13:46:44 +0100
Subject: [PATCH] "General Internet Error" dialog appearing on gio mount
we get a GError of G_IO_ERROR_FAILED_HANDLED which is documented
as "Operation failed and a helper program has already interacted with the user.
Do not display any error dialog." PENDING seems to describe this state
better than a generic error case and results in no error dialog.
Change-Id: Iee382e49edaa0a734526659971e0339991e2c03e
---
ucb/source/ucp/gio/gio_content.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx
index 77a5c0127ae7..8576713974a8 100644
--- a/ucb/source/ucp/gio/gio_content.cxx
+++ b/ucb/source/ucp/gio/gio_content.cxx
@@ -196,6 +196,9 @@ css::uno::Any convertToException(GError *pError, const css::uno::Reference< css:
css::task::InteractionClassification_ERROR, css::ucb::IOErrorCode_NAME_TOO_LONG, aArgs);
EXCEPT(aExcept); }
break;
+ case G_IO_ERROR_FAILED_HANDLED: /* Operation failed and a helper program
+ has already interacted with the user. Do not display any error
+ dialog */
case G_IO_ERROR_PENDING:
{ css::ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext,
css::task::InteractionClassification_ERROR, css::ucb::IOErrorCode_PENDING, aArgs);
@@ -257,7 +260,6 @@ css::uno::Any convertToException(GError *pError, const css::uno::Reference< css:
case G_IO_ERROR_NOT_EMPTY:
case G_IO_ERROR_NOT_SYMBOLIC_LINK:
case G_IO_ERROR_NOT_MOUNTABLE_FILE:
- case G_IO_ERROR_FAILED_HANDLED:
{ css::ucb::InteractiveNetworkGeneralException aExcept(sMessage, rContext,
css::task::InteractionClassification_ERROR);
EXCEPT(aExcept);}
--
2.25.1

View File

@ -0,0 +1,70 @@
From 0c20ed4d58f7b55bcc12fa288b93d1c6d88a7dcc Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Thu, 14 May 2020 14:47:21 +0200
Subject: [PATCH] Keep order of GDK input events intact
As explained at <https://bugzilla.redhat.com/show_bug.cgi?id=1377293#c12>
"[Wayland] When typing fast at high CPU load, LibreOffice breaks key (letter)
order": "with a local LO master --with-lang=ALL ASan+UBSan build (i.e., which
executes somewhat slowly): When typing 'file' in Writer right after it started
up (but no longer after more typing), that gets garbled as 'fiel'." The reason
for that (but probably not for the original issue reported in that rhbz#1377293)
apparently was:
Two GDK_KEY_PRESS events (A and B) were in the GTK event queue.
GtkInstance::AnyInput consumed only A, because it broke from the first while
loop as soon as it saw the first event of appropriate type. In the second while
loop it put A back on the end of the GTK event loop, so that it now followed B.
GtkSalFrame::signalKey (vcl/unx/gtk3/gtk3gtkframe.cxx) thus received the events
in the wrong order.
Dropping the "break" also reveals that GtkInstance::AnyInput should obviously
use a queue (i.e., deque) rather than a stack to hold the events it consumed and
needs to re-enqueue.
This appears to be a regression introduced with
658954e8b50fc264428402dc5a95b0d6f690d191 "Resolves: fdo#48011 writer
idle-callbacks are halting when events pending".
Change-Id: I87d601df118a20ea3dd59e9cebbcf5176db04be8
---
vcl/unx/gtk/gtkinst.cxx | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx
index 02ed688f366b..744c66b0baf0 100644
--- a/vcl/unx/gtk/gtkinst.cxx
+++ b/vcl/unx/gtk/gtkinst.cxx
@@ -427,25 +427,24 @@ bool GtkInstance::AnyInput( VclInputFlags nType )
return true;
bool bRet = false;
- std::stack<GdkEvent*> aEvents;
+ std::deque<GdkEvent*> aEvents;
GdkEvent *pEvent = nullptr;
while ((pEvent = gdk_event_get()))
{
- aEvents.push(pEvent);
+ aEvents.push_back(pEvent);
VclInputFlags nEventType = categorizeEvent(pEvent);
if ( (nEventType & nType) || ( nEventType == VclInputFlags::NONE && (nType & VclInputFlags::OTHER) ) )
{
bRet = true;
- break;
}
}
while (!aEvents.empty())
{
- pEvent = aEvents.top();
+ pEvent = aEvents.front();
gdk_event_put(pEvent);
gdk_event_free(pEvent);
- aEvents.pop();
+ aEvents.pop_front();
}
#endif
return bRet;
--
2.25.4

View File

@ -1,67 +0,0 @@
From 811575c105b0a2bc597afda2f84a087199447ae5 Mon Sep 17 00:00:00 2001
Message-Id: <811575c105b0a2bc597afda2f84a087199447ae5.1531842164.git.erack@redhat.com>
From: Stephan Bergmann <sbergman@redhat.com>
Date: Wed, 18 Apr 2018 16:35:55 +0200
Subject: [PATCH] Keep the still relevant part of
external/icu/icu4c-ubsan.patch.1
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
...which f247f08e370626bbb427acd8f4a400fd875350a3 "Upgrade to ICU 61.1" had
removed completely, in error.
Change-Id: I7239011561851333cac58e54e4e7d590b8529dbc
---
external/icu/UnpackedTarball_icu.mk | 1 +
external/icu/icu4c-ubsan.patch.1 | 14 ++++++++++++++
2 files changed, 15 insertions(+)
create mode 100644 external/icu/icu4c-ubsan.patch.1
--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch"
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index b81cdaab6242..c789e6eb8d84 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-solarisgcc.patch.1 \
external/icu/icu4c-mkdir.patch.1 \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
+ external/icu/icu4c-ubsan.patch.1 \
external/icu/icu4c-icu11100.patch.1 \
external/icu/icu4c-scriptrun.patch.1 \
external/icu/icu4c-rtti.patch.1 \
diff --git a/external/icu/icu4c-ubsan.patch.1 b/external/icu/icu4c-ubsan.patch.1
new file mode 100644
index 000000000000..ea9f13fd85cd
--- /dev/null
+++ b/external/icu/icu4c-ubsan.patch.1
@@ -0,0 +1,14 @@
+diff -ur icu.org/source/common/ubidiimp.h icu/source/common/ubidiimp.h
+--- icu.org/source/common/ubidiimp.h 2017-02-03 19:57:23.000000000 +0100
++++ icu/source/common/ubidiimp.h 2017-04-21 22:46:25.374651159 +0200
+@@ -198,8 +198,8 @@
+ /* in a Run, logicalStart will get this bit set if the run level is odd */
+ #define INDEX_ODD_BIT (1UL<<31)
+
+-#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)<<31))
+-#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)(level)<<31))
++#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)<<31))
++#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((uint32_t)(level)<<31))
+ #define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT)
+
+ #define GET_INDEX(x) ((x)&~INDEX_ODD_BIT)
--------------erAck-patch-parts--

View File

@ -1,374 +0,0 @@
From 96012f88aac95147ae1fd4834cea5c5bb184d52b Mon Sep 17 00:00:00 2001
From: Khaled Hosny <khaledhosny@eglug.org>
Date: Tue, 27 Aug 2019 15:19:15 +0200
Subject: [PATCH] Make Noto Color Emoji font work on Linux
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Noto Color Emoji is a bitmap color font, Cairo knows how to scale such
fonts and FontConfig will identify them as scalable but not outline
fonts, so change the FontConfig checks to checks for scalability.
Make sft.cxx:doOpenTTFont() accept non-outline fonts, the text will not
show in PDF but that is not worse than the status quo.
Reviewed-on: https://gerrit.libreoffice.org/78218
Tested-by: Jenkins
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
(cherry picked from commit dcf7792da2aa2a1ef774a124f7b21f68fff0fd15)
Change-Id: I756c718296d2c43e3165cd2f07b11bbb981318d3
Related: rhbz#1648281 improve fontconfig fallback for emojis
disregard text language for emoji and tag with und-zsye to
get fontconfig to give us the default emoji font
Change-Id: I8f94b0c41dea3204c9db77b96ad8f0d98bae2239
ctrl+shift+e emoji ibus engine problems converting UCS-4 positions to UTF-16
e.g. ctrl+shift+e type rabbit then space in writer and the len of underline
is 2 which should encompass the displayed e + 2 UTF-16 units
Change-Id: I424db7dd6cbcc5845922ac17208fed643e672dbd
rework IM underline impl wrt mix of UTF-8/16/32 units
e.g. ctrl+shift+e type boy then space twice in writer. The UTF-32 units
are 0x65 0x1f466 0x1f3fb. The underline should encompass the whole range,
prior to this the trailing Emoji Modifier Fitzpatrick was separated from
the boy base emoji by an incomplete underline
Reviewed-on: https://gerrit.libreoffice.org/78878
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 5e4d564e27d062a48fd04cb7263b769819dd3a50)
Change-Id: I2e846e8eeedf96f341ed7f50d504883768e9eff0
---
vcl/source/font/fontmetric.cxx | 4 +-
vcl/source/fontsubset/sft.cxx | 5 +-
vcl/unx/generic/fontmanager/fontconfig.cxx | 60 +++++++++--------
.../generic/glyphs/freetype_glyphcache.cxx | 6 +-
vcl/unx/gtk3/gtk3gtkframe.cxx | 64 +++++++++++++------
5 files changed, 87 insertions(+), 52 deletions(-)
diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx
index cd0b9f8557e9..816525c8773e 100644
--- a/vcl/source/font/fontmetric.cxx
+++ b/vcl/source/font/fontmetric.cxx
@@ -462,8 +462,8 @@ void ImplFontMetricData::ImplCalcLineSpacing(const std::vector<uint8_t>& rHheaDa
if (mnAscent || mnDescent)
mnIntLeading = mnAscent + mnDescent - mnHeight;
- SAL_INFO("vcl.gdi.fontmetric",
- "fsSelection: " << rInfo.fsSelection
+ SAL_INFO("vcl.gdi.fontmetric", GetFamilyName()
+ << ": fsSelection: " << rInfo.fsSelection
<< ", typoAscender: " << rInfo.typoAscender
<< ", typoDescender: " << rInfo.typoDescender
<< ", typoLineGap: " << rInfo.typoLineGap
diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 365b9401b95e..04921294ab21 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1666,7 +1666,10 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
/* TODO: implement to get subsetting */
assert(t->goffsets != nullptr);
} else {
- return SF_TTFORMAT;
+ // Bitmap font, accept for now.
+ t->goffsets = static_cast<sal_uInt32 *>(calloc(1+t->nglyphs, sizeof(sal_uInt32)));
+ /* TODO: implement to get subsetting */
+ assert(t->goffsets != nullptr);
}
table = getTable(t, O_hhea);
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 2c16e040cdab..33c50d082912 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -67,7 +67,7 @@ namespace
class FontCfgWrapper
{
- FcFontSet* m_pOutlineSet;
+ FcFontSet* m_pFontSet;
void addFontSet( FcSetName );
@@ -95,19 +95,15 @@ private:
};
FontCfgWrapper::FontCfgWrapper()
- :
- m_pOutlineSet( nullptr ),
- m_pLanguageTag( nullptr )
+ : m_pFontSet(nullptr)
+ , m_pLanguageTag(nullptr)
{
FcInit();
}
void FontCfgWrapper::addFontSet( FcSetName eSetName )
{
- /*
- add only acceptable outlined fonts to our config,
- for future fontconfig use
- */
+ // Add only acceptable fonts to our config, for future fontconfig use.
FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName );
if( !pOrig )
return;
@@ -116,10 +112,12 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
for( int i = 0; i < pOrig->nfont; ++i )
{
FcPattern* pPattern = pOrig->fonts[i];
- // #i115131# ignore non-outline fonts
- FcBool bOutline = FcFalse;
- FcResult eOutRes = FcPatternGetBool( pPattern, FC_OUTLINE, 0, &bOutline );
- if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) )
+ // #i115131# ignore non-scalable fonts
+ // Scalable fonts are usually outline fonts, but some bitmaps fonts
+ // (like Noto Color Emoji) are also scalable.
+ FcBool bScalable = FcFalse;
+ FcResult eScalableRes = FcPatternGetBool(pPattern, FC_SCALABLE, 0, &bScalable);
+ if ((eScalableRes != FcResultMatch) || (bScalable == FcFalse))
continue;
// Ignore Type 1 fonts, too.
@@ -129,7 +127,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName )
continue;
FcPatternReference( pPattern );
- FcFontSetAdd( m_pOutlineSet, pPattern );
+ FcFontSetAdd( m_pFontSet, pPattern );
}
// TODO?: FcFontSetDestroy( pOrig );
@@ -220,16 +218,16 @@ namespace
FcFontSet* FontCfgWrapper::getFontSet()
{
- if( !m_pOutlineSet )
+ if( !m_pFontSet )
{
- m_pOutlineSet = FcFontSetCreate();
+ m_pFontSet = FcFontSetCreate();
addFontSet( FcSetSystem );
addFontSet( FcSetApplication );
- ::std::sort(m_pOutlineSet->fonts,m_pOutlineSet->fonts+m_pOutlineSet->nfont,SortFont());
+ ::std::sort(m_pFontSet->fonts,m_pFontSet->fonts+m_pFontSet->nfont,SortFont());
}
- return m_pOutlineSet;
+ return m_pFontSet;
}
FontCfgWrapper::~FontCfgWrapper()
@@ -376,10 +374,10 @@ void FontCfgWrapper::clear()
{
m_aFontNameToLocalized.clear();
m_aLocalizedToCanonical.clear();
- if( m_pOutlineSet )
+ if( m_pFontSet )
{
- FcFontSetDestroy( m_pOutlineSet );
- m_pOutlineSet = nullptr;
+ FcFontSetDestroy( m_pFontSet );
+ m_pFontSet = nullptr;
}
delete m_pLanguageTag;
m_pLanguageTag = nullptr;
@@ -499,7 +497,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int>& o
int width = 0;
int spacing = 0;
int nCollectionEntry = -1;
- FcBool outline = false;
+ FcBool scalable = false;
FcResult eFileRes = FcPatternGetString(pFSet->fonts[i], FC_FILE, 0, &file);
FcResult eFamilyRes = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &family, FC_FAMILY, FC_FAMILYLANG );
@@ -510,11 +508,11 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int>& o
FcResult eWeightRes = FcPatternGetInteger(pFSet->fonts[i], FC_WEIGHT, 0, &weight);
FcResult eWidthRes = FcPatternGetInteger(pFSet->fonts[i], FC_WIDTH, 0, &width);
FcResult eSpacRes = FcPatternGetInteger(pFSet->fonts[i], FC_SPACING, 0, &spacing);
- FcResult eOutRes = FcPatternGetBool(pFSet->fonts[i], FC_OUTLINE, 0, &outline);
+ FcResult eScalableRes = FcPatternGetBool(pFSet->fonts[i], FC_SCALABLE, 0, &scalable);
FcResult eIndexRes = FcPatternGetInteger(pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry);
FcResult eFormatRes = FcPatternGetString(pFSet->fonts[i], FC_FONTFORMAT, 0, &format);
- if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch )
+ if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eScalableRes != FcResultMatch )
continue;
#if (OSL_DEBUG_LEVEL > 2)
@@ -528,14 +526,15 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int>& o
, eWeightRes == FcResultMatch ? width : -1
, eSpacRes == FcResultMatch ? spacing : -1
, eOutRes == FcResultMatch ? outline : -1
+ , eScalableRes == FcResultMatch ? scalable : -1
, eFormatRes == FcResultMatch ? (const char*)format : "<unknown>"
);
#endif
-// OSL_ASSERT(eOutRes != FcResultMatch || outline);
+// OSL_ASSERT(eScalableRes != FcResultMatch || scalable);
- // only outline fonts are usable to psprint anyway
- if( eOutRes == FcResultMatch && ! outline )
+ // only scalable fonts are usable to psprint anyway
+ if( eScalableRes == FcResultMatch && ! scalable )
continue;
if (isPreviouslyDuplicateOrObsoleted(pFSet, i))
@@ -807,6 +806,11 @@ namespace
#endif
}
+ bool isEmoji(sal_uInt32 nCurrentChar)
+ {
+ return u_hasBinaryProperty(nCurrentChar, UCHAR_EMOJI);
+ }
+
//returns true if the given code-point couldn't possibly be in rLangTag.
bool isImpossibleCodePointForLang(const LanguageTag &rLangTag, sal_uInt32 currentChar)
{
@@ -855,6 +859,8 @@ namespace
OUString getExemplarLangTagForCodePoint(sal_uInt32 currentChar)
{
+ if (isEmoji(currentChar))
+ return "und-zsye";
int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
UScriptCode eScript = static_cast<UScriptCode>(script);
OStringBuffer aBuf(unicode::getExemplarLanguageForUScriptCode(eScript));
@@ -981,7 +987,7 @@ void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi
FcCharSetAddChar( codePoints, nCode );
//if the codepoint is impossible for this lang tag, then clear it
//and autodetect something useful
- if (!aLangAttrib.isEmpty() && isImpossibleCodePointForLang(aLangTag, nCode))
+ if (!aLangAttrib.isEmpty() && (isImpossibleCodePointForLang(aLangTag, nCode) || isEmoji(nCode)))
aLangAttrib.clear();
//#i105784#/rhbz#527719 improve selection of fallback font
if (aLangAttrib.isEmpty())
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 5a55ee47bff3..0b03f428c3fa 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -409,9 +409,9 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI
FT_New_Size( maFaceFT, &maSizeFT );
FT_Activate_Size( maSizeFT );
- FT_Error rc = FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight );
- if( rc != FT_Err_Ok )
- return;
+ /* This might fail for color bitmap fonts, but that is fine since we will
+ * not need any glyph data from FreeType in this case */
+ /*FT_Error rc = */ FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight );
FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE);
diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 4ee63a98da95..2f80d03f542b 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -4031,34 +4031,59 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
pThis->m_bPreeditJustChanged = true;
bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != nullptr;
- pThis->m_aInputEvent.maText = pText ? OUString( pText, strlen(pText), RTL_TEXTENCODING_UTF8 ) : OUString();
- pThis->m_aInputEvent.mnCursorPos = nCursorPos;
- pThis->m_aInputEvent.mnCursorFlags = 0;
+ gint nUtf8Len = pText ? strlen(pText) : 0;
+ pThis->m_aInputEvent.maText = pText ? OUString(pText, nUtf8Len, RTL_TEXTENCODING_UTF8) : OUString();
+ const OUString& rText = pThis->m_aInputEvent.maText;
- pThis->m_aInputFlags = std::vector<ExtTextInputAttr>( std::max( 1, (int)pThis->m_aInputEvent.maText.getLength() ), ExtTextInputAttr::NONE );
+ std::vector<sal_Int32> aUtf16Offsets;
+ for (sal_Int32 nUtf16Offset = 0; nUtf16Offset < rText.getLength(); rText.iterateCodePoints(&nUtf16Offset))
+ aUtf16Offsets.push_back(nUtf16Offset);
+
+ sal_Int32 nUtf32Len = aUtf16Offsets.size();
+ aUtf16Offsets.push_back(rText.getLength());
+
+ // sanitize the CurPos which is in utf-32
+ if (nCursorPos < 0)
+ nCursorPos = 0;
+ else if (nCursorPos > nUtf32Len)
+ nCursorPos = nUtf32Len;
+
+ pThis->m_aInputEvent.mnCursorPos = aUtf16Offsets[nCursorPos];
+ pThis->m_aInputEvent.mnCursorFlags = 0;
+
+ pThis->m_aInputFlags = std::vector<ExtTextInputAttr>( std::max( 1, static_cast<int>(rText.getLength()) ), ExtTextInputAttr::NONE );
PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs);
do
{
GSList *attr_list = nullptr;
GSList *tmp_list = nullptr;
- gint start, end;
+ gint nUtf8Start, nUtf8End;
ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE;
- pango_attr_iterator_range (iter, &start, &end);
- if (start == G_MAXINT || end == G_MAXINT)
- {
- auto len = pText ? g_utf8_strlen(pText, -1) : 0;
- if (end == G_MAXINT)
- end = len;
- if (start == G_MAXINT)
- start = len;
- }
- if (end == start)
+ // docs say... "Get the range of the current segment ... the stored
+ // return values are signed, not unsigned like the values in
+ // PangoAttribute", which implies that the units are otherwise the same
+ // as that of PangoAttribute whose docs state these units are "in
+ // bytes"
+ // so this is the utf8 range
+ pango_attr_iterator_range(iter, &nUtf8Start, &nUtf8End);
+
+ // sanitize the utf8 range
+ nUtf8Start = std::min(nUtf8Start, nUtf8Len);
+ nUtf8End = std::min(nUtf8End, nUtf8Len);
+ if (nUtf8Start >= nUtf8End)
continue;
- start = g_utf8_pointer_to_offset (pText, pText + start);
- end = g_utf8_pointer_to_offset (pText, pText + end);
+ // get the utf32 range
+ sal_Int32 nUtf32Start = g_utf8_pointer_to_offset(pText, pText + nUtf8Start);
+ sal_Int32 nUtf32End = g_utf8_pointer_to_offset(pText, pText + nUtf8End);
+
+ // sanitize the utf32 range
+ nUtf32Start = std::min(nUtf32Start, nUtf32Len);
+ nUtf32End = std::min(nUtf32End, nUtf32Len);
+ if (nUtf32Start >= nUtf32End)
+ continue;
tmp_list = attr_list = pango_attr_iterator_get_attrs (iter);
while (tmp_list)
@@ -4088,11 +4113,12 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_
g_slist_free (attr_list);
// Set the sal attributes on our text
- for (int i = start; i < end; ++i)
+ // rhbz#1648281 apply over our utf-16 range derived from the input utf-32 range
+ for (sal_Int32 i = aUtf16Offsets[nUtf32Start]; i < aUtf16Offsets[nUtf32End]; ++i)
{
SAL_WARN_IF(i >= static_cast<int>(pThis->m_aInputFlags.size()),
"vcl.gtk3", "pango attrib out of range. Broken range: "
- << start << "," << end << " Legal range: 0,"
+ << aUtf16Offsets[nUtf32Start] << "," << aUtf16Offsets[nUtf32End] << " Legal range: 0,"
<< pThis->m_aInputFlags.size());
if (i >= static_cast<int>(pThis->m_aInputFlags.size()))
continue;
--
2.21.0

View File

@ -1,94 +0,0 @@
From 03ab9306c70df34d7824f700d5635e8b458e6d6d Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Thu, 23 Aug 2018 16:45:34 +0200
Subject: [PATCH 1/5] Related rhbz#1618703: Properly handle failure decoding
master password
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
...when e.g. FIPS mode makes PasswordContainer::DecodePasswords fail by throwing
an exception which needs to be caught in PasswordContainerHelper::addRecord (in
uui/source/passwordcontainer.cxx, but which only catches NoMasterException, not
generic RuntimeException)
Change-Id: I877bb5126e79ac2c90b11ef6d31bf81a2927f409
Reviewed-on: https://gerrit.libreoffice.org/59511
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit e17987f4bd54fec7e0d94bdefdb94809255b3436)
Reviewed-on: https://gerrit.libreoffice.org/59568
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 24b3d08018b6350d5e60615eb375b337ab1b4f75)
---
svl/source/passwordcontainer/passwordcontainer.cxx | 11 ++++++-----
svl/source/passwordcontainer/passwordcontainer.hxx | 2 +-
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx
index c2e8b7100028..6d4bb02427ac 100644
--- a/svl/source/passwordcontainer/passwordcontainer.cxx
+++ b/svl/source/passwordcontainer/passwordcontainer.cxx
@@ -417,7 +417,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& )
}
}
-std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd )
+std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode )
{
if( !aMasterPasswd.isEmpty() )
{
@@ -463,7 +463,8 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin
// problems with decoding
OSL_FAIL( "Problem with decoding" );
- throw RuntimeException("Can't decode!" );
+ throw css::task::NoMasterException(
+ "Can't decode!", css::uno::Reference<css::uno::XInterface>(), mode);
}
OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPasswd )
@@ -586,7 +587,7 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b
{
try
{
- ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ) );
+ ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER );
aPasswords.insert( aPasswords.end(), aDecodedPasswords.begin(), aDecodedPasswords.end() );
}
catch( NoMasterException& )
@@ -848,7 +849,7 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac
}
else
{
- std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass ) );
+ std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass, aRMode ) );
if( aRM.empty() || aPass != aRM[0] )
{
bAskAgain = true;
@@ -1005,7 +1006,7 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere
{
sal_Int32 oldLen = aUsers.getLength();
aUsers.realloc( oldLen + 1 );
- aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ) ) ) );
+ aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) );
}
if( aUsers.getLength() )
diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx
index 67ad63e72722..a1190549eb77 100644
--- a/svl/source/passwordcontainer/passwordcontainer.hxx
+++ b/svl/source/passwordcontainer/passwordcontainer.hxx
@@ -268,7 +268,7 @@ css::task::UrlRecord find(
const css::uno::Reference< css::task::XInteractionHandler >& Handler );
/// @throws css::uno::RuntimeException
- static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword );
+ static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword, css::task::PasswordRequestMode mode );
/// @throws css::uno::RuntimeException
static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPassword );
--
2.17.1

View File

@ -1,74 +0,0 @@
From 15cdcd0346b7aa98d4697edec8aeea9c810efa62 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 5 Dec 2017 17:13:28 +0000
Subject: [PATCH] Related: tdf#105998 except cut and paste as bitmap instead of
export
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Take a drawing rectangle in draw and cut and paste as bitmap to writer. The
hairline border along the very right/bottom edge of the bitmap appear missing.
fallback to default handlers which can distort the hairline to be visible
Change-Id: Iedb580f65879628839c83e41092745ae7c11267c
Reviewed-on: https://gerrit.libreoffice.org/45902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
---
.../source/processor2d/vclpixelprocessor2d.cxx | 25 +++++++++++++++++-----
1 file changed, 20 insertions(+), 5 deletions(-)
diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
index 9c21c83ee..5c5c0bb 100644
--- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx
@@ -41,6 +41,7 @@
#include "helperwrongspellrenderer.hxx"
#include <drawinglayer/primitive2d/fillhatchprimitive2d.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
+#include <basegfx/polygon/b2dpolypolygontools.hxx>
#include <vcl/hatch.hxx>
#include <tools/diagnose_ex.h>
#include <com/sun/star/awt/PosSize.hpp>
@@ -210,10 +211,6 @@ namespace drawinglayer
maBColorModifierStack.getModifiedColor(
rSource.getLineAttribute().getColor()));
- mpOutputDevice->SetFillColor();
- mpOutputDevice->SetLineColor(Color(aLineColor));
- aHairLinePolyPolygon.transform(maCurrentTransformation);
-
double fLineWidth(rSource.getLineAttribute().getWidth());
if(basegfx::fTools::more(fLineWidth, 0.0))
@@ -234,6 +231,24 @@ namespace drawinglayer
fLineWidth = 0.0;
}
+ //Related: tdf#105998 cut and paste as bitmap of shape from draw to
+ //writer. If we are a hairline along the very right/bottom edge of
+ //the canvas then fallback to defaults which can distort the
+ //hairline inside the paintable area
+ if (fLineWidth == 0.0)
+ {
+ Size aSize = mpOutputDevice->GetOutputSize();
+ basegfx::B2DRange aRange = aHairLinePolyPolygon.getB2DRange();
+ basegfx::B2DRange aOutputRange = aRange;
+ aOutputRange.transform(maCurrentTransformation);
+ if (std::round(aOutputRange.getMaxX()) == aSize.Width() || std::round(aOutputRange.getMaxY()) == aSize.Height())
+ return false;
+ }
+
+ mpOutputDevice->SetFillColor();
+ mpOutputDevice->SetLineColor(Color(aLineColor));
+ aHairLinePolyPolygon.transform(maCurrentTransformation);
+
bool bHasPoints(false);
bool bTryWorked(false);
--
2.9.5

View File

@ -1,67 +0,0 @@
From a74837a0e7c7259e4396aa5f05cf1384e256db35 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 20 Feb 2017 16:04:58 +0000
Subject: [PATCH] Related: tdf#106100 recover mangled svg in presentations
Change-Id: I77b452aa69a8341aa30e1e93d0d5ee8160533095
---
svgio/Module_svgio.mk | 4 ----
svgio/source/svgreader/svgsvgnode.cxx | 27 +++------------------------
2 files changed, 3 insertions(+), 28 deletions(-)
diff --git a/svgio/Module_svgio.mk b/svgio/Module_svgio.mk
index 29ef97d..8b827fc 100644
--- a/svgio/Module_svgio.mk
+++ b/svgio/Module_svgio.mk
@@ -22,8 +22,4 @@ $(eval $(call gb_Module_add_targets,svgio,\
Library_svgio \
))
-$(eval $(call gb_Module_add_check_targets,svgio,\
- CppunitTest_svgio \
-))
-
# vim: set noet ts=4 sw=4:
diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx
index 7800666..087c621 100644
--- a/svgio/source/svgreader/svgsvgnode.cxx
+++ b/svgio/source/svgreader/svgsvgnode.cxx
@@ -522,32 +522,11 @@ namespace svgio
}
else
{
- // There exists no parent to resolve relative width or height.
- // Use child size as fallback and expand to aspect ratio given
- // by the viewBox. No mapping.
- // We get viewport >= content, therefore no clipping.
- bNeedsMapping = false;
- const basegfx::B2DRange aChildRange(
- aSequence.getB2DRange(
- drawinglayer::geometry::ViewInformation2D()));
- const double fChildWidth(aChildRange.getWidth());
- const double fChildHeight(aChildRange.getHeight());
- const double fLeft(aChildRange.getMinX());
- const double fTop(aChildRange.getMinY());
- if ( fChildWidth / fViewBoxWidth > fChildHeight / fViewBoxHeight )
- { // expand y
- fW = fChildWidth;
- fH = fChildWidth / fViewBoxRatio;
- }
- else
- { // expand x
- fH = fChildHeight;
- fW = fChildHeight * fViewBoxRatio;
- }
- aSvgCanvasRange = basegfx::B2DRange(fLeft, fTop, fLeft + fW, fTop + fH);
+ fW = fViewBoxWidth;
+ fH = fViewBoxHeight;
+ aSvgCanvasRange = basegfx::B2DRange(0.0, 0.0, fW, fH);
}
-
if (bNeedsMapping)
{
// create mapping
--
2.9.3

View File

@ -1,40 +0,0 @@
From f648553dfc356b3c5e6dd77ea96039a9977f00d6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 8 Nov 2018 10:58:00 +0000
Subject: [PATCH] Resolves: rhbz#1647507 try inputted password as both user and
owner password
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Change-Id: Ibe1fae39d3153238e85400c9645766c260c9290d
Reviewed-on: https://gerrit.libreoffice.org/63080
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit e3ca8385fed93e61efb8200149e06b822a84a47e)
---
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
index 16db05afe870..b536a710e832 100644
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
@@ -101,9 +101,11 @@ int main(int argc, char **argv)
: (ownerPassword[0] != '\001'
? new GooString(ownerPassword)
: nullptr ) );
- GooString* pUserPasswordStr( userPassword[0] != '\001'
+ GooString* pUserPasswordStr( aPwBuf[0] != 0
+ ? new GooString( aPwBuf )
+ : (userPassword[0] != '\001'
? new GooString(userPassword)
- : nullptr );
+ : nullptr ) );
if( outputFile[0] != '\001' )
g_binary_out = fopen(outputFile,"wb");
--
2.17.1

View File

@ -1,57 +0,0 @@
From bcb05a5daba9aafdc3921322676f33e055413f9f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 31 May 2019 15:33:00 +0100
Subject: [PATCH] Resolves: rhbz#1715109 add All files to the graphic import
dialog
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
to pick up things without extensions, for consistency with file->open
Reviewed-on: https://gerrit.libreoffice.org/73276
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit c6c14f6ae7f6d7768b450e7776db917bb662f3cf)
Change-Id: Ib119fb0d053d1d288eee7cd17fa4f12dcb9956d7
---
sfx2/source/dialog/filedlghelper.cxx | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 3820ee4107c9..737dcb278a2a 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -1872,11 +1872,23 @@ void FileDialogHelper_Impl::addGraphicFilter()
try
{
- OUString aAllFilterName = SfxResId( STR_SFX_IMPORT_ALL );
- aAllFilterName = ::sfx2::addExtension( aAllFilterName, aExtensions, bIsInOpenMode, *this );
+ // if the extension is not "All files", insert "All images"
+ if (aExtensions != FILEDIALOG_FILTER_ALL)
+ {
+ OUString aAllFilterName = SfxResId(STR_SFX_IMPORT_ALL);
+ aAllFilterName = ::sfx2::addExtension( aAllFilterName, aExtensions, bIsInOpenMode, *this );
+ xFltMgr->appendFilter( aAllFilterName, aExtensions );
+ maSelectFilter = aAllFilterName; // and make it the default
+ }
+
+ // rhbz#1715109 always include All files *.* or *
+ OUString aAllFilesName = SfxResId( STR_SFX_FILTERNAME_ALL );
+ aAllFilesName = ::sfx2::addExtension( aAllFilesName, FILEDIALOG_FILTER_ALL, bIsInOpenMode, *this );
+ xFltMgr->appendFilter( aAllFilesName, FILEDIALOG_FILTER_ALL );
- xFltMgr->appendFilter( aAllFilterName, aExtensions );
- maSelectFilter = aAllFilterName;
+ // if the extension is "All files", make that the default
+ if (aExtensions == FILEDIALOG_FILTER_ALL)
+ maSelectFilter = aAllFilesName;
}
catch( const IllegalArgumentException& )
{
--
2.21.0

View File

@ -0,0 +1,255 @@
From fd1692b657838f137c8974eae7730510b7d190df Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 24 Apr 2020 16:38:26 +0100
Subject: [PATCH] Resolves: tdf#132288 don't merge adjacent properties for
spell checking
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
spell checking relies on each attribute chunk being unmerged with identical
adjacent chunks
squash includes...
nStartPosition and nEndPosition are always the same
and
tdf#132288 preservation of footnote depends on reverse iteration
like TextCharAttribList::FindAttrib does which spell checking
used before
commit 243b5b392906042ab03800e0b5765e6f3513372c
Author: Caolán McNamara <caolanm@redhat.com>
Date: Fri Jun 14 21:56:44 2019 +0100
weld SpellDialog
converted to use an EditEngine instead of a TextEngine in order to
be able to host it in a native widget
Change-Id: Ia835fa054cad0dee4304f16724b9eb0c29b46102
---
cui/source/dialogs/SpellDialog.cxx | 37 ++++++++++++++++--------------
editeng/inc/editdoc.hxx | 3 +++
editeng/source/editeng/editdoc.cxx | 12 +++++++++-
editeng/source/editeng/editeng.cxx | 4 ++++
include/editeng/editeng.hxx | 5 ++++
5 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index 1bb15c934552..17bff36056fb 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1142,6 +1142,8 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea)
pDrawingArea->get_text_height() * 6);
pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
WeldEditView::SetDrawingArea(pDrawingArea);
+ // tdf#132288 don't merge equal adjacent attributes
+ m_xEditEngine->DisableAttributeExpanding();
}
SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
@@ -1150,13 +1152,14 @@ SentenceEditWindow_Impl::~SentenceEditWindow_Impl()
namespace
{
- const EECharAttrib* FindCharAttrib(int nStartPosition, int nEndPosition, sal_uInt16 nWhich, std::vector<EECharAttrib>& rAttribList)
+ const EECharAttrib* FindCharAttrib(int nPosition, sal_uInt16 nWhich, std::vector<EECharAttrib>& rAttribList)
{
- for (const auto& rTextAtr : rAttribList)
+ for (auto it = rAttribList.rbegin(); it != rAttribList.rend(); ++it)
{
+ const auto& rTextAtr = *it;
if (rTextAtr.pAttr->Which() != nWhich)
continue;
- if (rTextAtr.nStart <= nStartPosition && rTextAtr.nEnd >= nEndPosition)
+ if (rTextAtr.nStart <= nPosition && rTextAtr.nEnd >= nPosition)
{
return &rTextAtr;
}
@@ -1272,8 +1275,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt)
m_xEditEngine->GetCharAttribs(0, aAttribList);
auto nCursor = aCurrentSelection.nStartPos;
- const EECharAttrib* pBackAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_BKGCOLOR, aAttribList);
- const EECharAttrib* pErrorAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList);
+ const EECharAttrib* pBackAttr = FindCharAttrib(nCursor, EE_CHAR_BKGCOLOR, aAttribList);
+ const EECharAttrib* pErrorAttr = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList);
const EECharAttrib* pBackAttrLeft = nullptr;
const EECharAttrib* pErrorAttrLeft = nullptr;
@@ -1299,8 +1302,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt)
while (nCursor < aCurrentSelection.nEndPos)
{
++nCursor;
- const EECharAttrib* pIntBackAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_BKGCOLOR, aAttribList);
- const EECharAttrib* pIntErrorAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList);
+ const EECharAttrib* pIntBackAttr = FindCharAttrib(nCursor, EE_CHAR_BKGCOLOR, aAttribList);
+ const EECharAttrib* pIntErrorAttr = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList);
//if any attr has been found then BRACE
if (pIntBackAttr || pIntErrorAttr)
nSelectionType = BRACE;
@@ -1342,8 +1345,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt)
if (nCursor)
{
--nCursor;
- pBackAttrLeft = FindCharAttrib(nCursor, nCursor, EE_CHAR_BKGCOLOR, aAttribList);
- pErrorAttrLeft = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList);
+ pBackAttrLeft = FindCharAttrib(nCursor, EE_CHAR_BKGCOLOR, aAttribList);
+ pErrorAttrLeft = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList);
bHasFieldLeft = pBackAttrLeft !=nullptr;
bHasErrorLeft = pErrorAttrLeft != nullptr;
++nCursor;
@@ -1492,8 +1495,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt)
//start position
if (!IsUndoEditMode() && bIsErrorActive)
{
- const EECharAttrib* pFontColor = FindCharAttrib(nCursor, nCursor, EE_CHAR_COLOR, aAttribList);
- const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, m_nErrorStart, EE_CHAR_GRABBAG, aAttribList);
+ const EECharAttrib* pFontColor = FindCharAttrib(nCursor, EE_CHAR_COLOR, aAttribList);
+ const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_GRABBAG, aAttribList);
if (pFontColor && pErrorAttrib)
{
m_nErrorStart = pFontColor->nStart;
@@ -1695,7 +1698,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language
auto nDiffLen = rNewWord.getLength() - m_nErrorEnd + m_nErrorStart;
//Remove spell error attribute
m_xEditEngine->UndoActionStart(SPELLUNDO_MOVE_ERROREND);
- const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, m_nErrorStart, EE_CHAR_GRABBAG, aAttribList);
+ const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_GRABBAG, aAttribList);
DBG_ASSERT(pErrorAttrib, "no error attribute found");
bool bSpellErrorDescription = false;
SpellErrorDescription aSpellErrorDescription;
@@ -1706,7 +1709,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language
bSpellErrorDescription = true;
}
- const EECharAttrib* pBackAttrib = FindCharAttrib(m_nErrorStart, m_nErrorStart, EE_CHAR_BKGCOLOR, aAttribList);
+ const EECharAttrib* pBackAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_BKGCOLOR, aAttribList);
ESelection aSel(0, m_nErrorStart, 0, m_nErrorEnd);
m_xEditEngine->QuickInsertText(rNewWord, aSel);
@@ -1721,7 +1724,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language
//attributes following an error at the start of the text are not moved but expanded from the
//text engine - this is done to keep full-paragraph-attributes
//in the current case that handling is not desired
- const EECharAttrib* pLangAttrib = FindCharAttrib(m_nErrorEnd, m_nErrorEnd, EE_CHAR_LANGUAGE, aAttribList);
+ const EECharAttrib* pLangAttrib = FindCharAttrib(m_nErrorEnd, EE_CHAR_LANGUAGE, aAttribList);
if (pLangAttrib && !pLangAttrib->nStart && pLangAttrib->nEnd == nTextLen)
{
@@ -1776,7 +1779,7 @@ bool SentenceEditWindow_Impl::GetErrorDescription(SpellErrorDescription& rSpellE
std::vector<EECharAttrib> aAttribList;
m_xEditEngine->GetCharAttribs(0, aAttribList);
- if (const EECharAttrib* pEECharAttrib = FindCharAttrib(nPosition, nPosition, EE_CHAR_GRABBAG, aAttribList))
+ if (const EECharAttrib* pEECharAttrib = FindCharAttrib(nPosition, EE_CHAR_GRABBAG, aAttribList))
{
ExtractErrorDescription(*pEECharAttrib, rSpellErrorDescription);
return true;
@@ -1895,7 +1898,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const
const EECharAttrib* pError = nullptr;
while (nCursor < nTextLen)
{
- const EECharAttrib* pLang = FindCharAttrib(nCursor, nCursor, EE_CHAR_LANGUAGE, aAttribList);
+ const EECharAttrib* pLang = FindCharAttrib(nCursor, EE_CHAR_LANGUAGE, aAttribList);
if(pLang && pLang != pLastLang)
{
eLang = static_cast<const SvxLanguageItem*>(pLang->pAttr)->GetLanguage();
@@ -1903,7 +1906,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const
lcl_InsertBreakPosition_Impl(aBreakPositions, pLang->nEnd, eLang);
pLastLang = pLang;
}
- pError = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList);
+ pError = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList);
if (pError && pLastError != pError)
{
lcl_InsertBreakPosition_Impl(aBreakPositions, pError->nStart, eLang);
diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx
index 089addc59c07..258fa945912c 100644
--- a/editeng/inc/editdoc.hxx
+++ b/editeng/inc/editdoc.hxx
@@ -747,6 +747,7 @@ private:
bool bOwnerOfPool:1;
bool bModified:1;
+ bool bDisableAttributeExpanding:1;
private:
void ImplDestroyContents();
@@ -761,6 +762,8 @@ public:
bool IsModified() const { return bModified; }
void SetModified( bool b );
+ void DisableAttributeExpanding() { bDisableAttributeExpanding = true; }
+
void SetModifyHdl( const Link<LinkParamNone*,void>& rLink ) { aModifyHdl = rLink; }
void CreateDefFont( bool bUseStyles );
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index 73a356054741..aacc0b2c7b6b 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -1906,7 +1906,8 @@ EditDoc::EditDoc( SfxItemPool* pPool ) :
bIsTopToBottomVert(false),
bIsFixedCellHeight(false),
bOwnerOfPool(pPool == nullptr),
- bModified(false)
+ bModified(false),
+ bDisableAttributeExpanding(false)
{
// Don't create an empty node, Clear() will be called in EditEngine-CTOR
};
@@ -2354,6 +2355,15 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_Int32 nStart, sal
RemoveAttribs( pNode, nStart, nEnd, pStartingAttrib, pEndingAttrib, rPoolItem.Which() );
+ // tdf#132288 By default inserting an attribute beside another that is of
+ // the same type expands the original instead of inserting another. But the
+ // spell check dialog doesn't want that behaviour
+ if (bDisableAttributeExpanding)
+ {
+ pStartingAttrib = nullptr;
+ pEndingAttrib = nullptr;
+ }
+
if ( pStartingAttrib && pEndingAttrib &&
( *(pStartingAttrib->GetItem()) == rPoolItem ) &&
( *(pEndingAttrib->GetItem()) == rPoolItem ) )
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 458f71b34d3f..f46106a5773c 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -2802,6 +2802,10 @@ bool EditEngine::IsPageOverflow() {
return pImpEditEngine->IsPageOverflow();
}
+void EditEngine::DisableAttributeExpanding() {
+ pImpEditEngine->GetEditDoc().DisableAttributeExpanding();
+}
+
EFieldInfo::EFieldInfo()
{
}
diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx
index f585ce8b5796..7d4129c0ad0b 100644
--- a/include/editeng/editeng.hxx
+++ b/include/editeng/editeng.hxx
@@ -618,6 +618,11 @@ public:
sal_Int32 GetOverflowingLineNum() const;
void ClearOverflowingParaNum();
bool IsPageOverflow();
+
+ // tdf#132288 By default inserting an attribute beside another that is of
+ // the same type expands the original instead of inserting another. But the
+ // spell check dialog doesn't want that behaviour
+ void DisableAttributeExpanding();
};
#endif // INCLUDED_EDITENG_EDITENG_HXX
--
2.25.3

File diff suppressed because it is too large Load Diff

View File

@ -1,675 +0,0 @@
From f247f08e370626bbb427acd8f4a400fd875350a3 Mon Sep 17 00:00:00 2001
Message-Id: <f247f08e370626bbb427acd8f4a400fd875350a3.1531842113.git.erack@redhat.com>
From: Eike Rathke <erack@redhat.com>
Date: Tue, 17 Apr 2018 20:13:52 +0200
Subject: [PATCH] Upgrade to ICU 61.1
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
Change-Id: I89c1c3d13d85decc72576744de2a16d20471d29d
Reviewed-on: https://gerrit.libreoffice.org/53064
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Eike Rathke <erack@redhat.com>
---
configure.ac | 4 +-
download.lst | 8 +-
external/icu/UnpackedTarball_icu.mk | 3 +-
...patch.1 => icu4c-61-werror-shadow.patch.1} | 30 ++-
external/icu/icu4c-khmerbreakengine.patch.1 | 246 +++++++++---------
external/icu/icu4c-ubsan.patch.1 | 91 -------
6 files changed, 147 insertions(+), 235 deletions(-)
rename external/icu/{icu4c-59-werror-shadow.patch.1 => icu4c-61-werror-shadow.patch.1} (50%)
delete mode 100644 external/icu/icu4c-ubsan.patch.1
--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-Upgrade-to-ICU-61.1.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-Upgrade-to-ICU-61.1.patch"
diff --git a/configure.ac b/configure.ac
index bdc374699cb9..458f9f3c2735 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9001,8 +9001,8 @@ SYSTEM_GENBRK=
SYSTEM_GENCCODE=
SYSTEM_GENCMN=
-ICU_MAJOR=60
-ICU_MINOR=2
+ICU_MAJOR=61
+ICU_MINOR=1
ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE"
ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE"
ICU_RECLASSIFIED_HEBREW_LETTER="TRUE"
diff --git a/download.lst b/download.lst
index 0a1fa65396d1..76f067bff4d7 100644
--- a/download.lst
+++ b/download.lst
@@ -102,10 +102,10 @@ export HUNSPELL_SHA256SUM := 3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce
export HUNSPELL_TARBALL := hunspell-1.6.2.tar.gz
export HYPHEN_SHA256SUM := 304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705
export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz
-export ICU_SHA256SUM := f073ea8f35b926d70bb33e6577508aa642a8b316a803f11be20af384811db418
-export ICU_TARBALL := icu4c-60_2-src.tgz
-export ICU_DATA_SHA256SUM := 68f42ad0c9e0a5a5af8eba0577ba100833912288bad6e4d1f42ff480bbcfd4a9
-export ICU_DATA_TARBALL := icu4c-60_2-data.zip
+export ICU_SHA256SUM := d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef
+export ICU_TARBALL := icu4c-61_1-src.tgz
+export ICU_DATA_SHA256SUM := d149ed0985b5a6e16a9d8ed66f105dd58fd334c276779f74241cfa656ed2830a
+export ICU_DATA_TARBALL := icu4c-61_1-data.zip
export JFREEREPORT_FLOW_ENGINE_SHA256SUM := 233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd
export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip
export JFREEREPORT_FLUTE_SHA256SUM := 1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133
diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk
index a4d0b16ecb36..b81cdaab6242 100644
--- a/external/icu/UnpackedTarball_icu.mk
+++ b/external/icu/UnpackedTarball_icu.mk
@@ -27,15 +27,14 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\
external/icu/icu4c-solarisgcc.patch.1 \
external/icu/icu4c-mkdir.patch.1 \
external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \
- external/icu/icu4c-ubsan.patch.1 \
external/icu/icu4c-icu11100.patch.1 \
external/icu/icu4c-scriptrun.patch.1 \
external/icu/icu4c-rtti.patch.1 \
external/icu/icu4c-clang-cl.patch.1 \
$(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \
external/icu/icu4c-khmerbreakengine.patch.1 \
- external/icu/icu4c-59-werror-shadow.patch.1 \
external/icu/ofz4860.patch.2 \
+ external/icu/icu4c-61-werror-shadow.patch.1 \
))
$(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict))
diff --git a/external/icu/icu4c-59-werror-shadow.patch.1 b/external/icu/icu4c-61-werror-shadow.patch.1
similarity index 50%
rename from external/icu/icu4c-59-werror-shadow.patch.1
rename to external/icu/icu4c-61-werror-shadow.patch.1
index fb88244aff13..b00f76317eff 100644
--- a/external/icu/icu4c-59-werror-shadow.patch.1
+++ b/external/icu/icu4c-61-werror-shadow.patch.1
@@ -1,33 +1,35 @@
+# https://ssl.icu-project.org/trac/ticket/13709
+# Werror=shadow fails for unistr.h
diff -ur icu.org/source/common/unicode/unistr.h icu/source/common/unicode/unistr.h
---- icu.org/source/common/unicode/unistr.h 2017-03-29 06:44:37.000000000 +0200
-+++ icu/source/common/unicode/unistr.h 2017-04-24 11:59:51.782076511 +0200
-@@ -3080,11 +3080,11 @@
+--- icu.org/source/common/unicode/unistr.h 2018-03-26 15:38:29.000000000 +0200
++++ icu/source/common/unicode/unistr.h 2018-04-18 10:44:16.321188314 +0200
+@@ -3053,11 +3053,11 @@
* uint16_t * constructor.
* Delegates to UnicodeString(const char16_t *, int32_t).
* @param text UTF-16 string
- * @param length string length
-+ * @param length_ string length
- * @draft ICU 59
++ * @param textLength string length
+ * @stable ICU 59
*/
- UnicodeString(const uint16_t *text, int32_t length) :
- UnicodeString(ConstChar16Ptr(text), length) {}
-+ UnicodeString(const uint16_t *text, int32_t length_) :
-+ UnicodeString(ConstChar16Ptr(text), length_) {}
++ UnicodeString(const uint16_t *text, int32_t textLength) :
++ UnicodeString(ConstChar16Ptr(text), textLength) {}
#endif
- /*
-@@ -3097,11 +3097,11 @@
+ #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN)
+@@ -3066,11 +3066,11 @@
* (Only defined if U_SIZEOF_WCHAR_T==2.)
* Delegates to UnicodeString(const char16_t *, int32_t).
* @param text NUL-terminated UTF-16 string
- * @param length string length
-+ * @param length_ string length
- * @draft ICU 59
++ * @param textLength string length
+ * @stable ICU 59
*/
- UnicodeString(const wchar_t *text, int32_t length) :
- UnicodeString(ConstChar16Ptr(text), length) {}
-+ UnicodeString(const wchar_t *text, int32_t length_) :
-+ UnicodeString(ConstChar16Ptr(text), length_) {}
++ UnicodeString(const wchar_t *text, int32_t textLength) :
++ UnicodeString(ConstChar16Ptr(text), textLength) {}
#endif
- /*
+ /**
diff --git a/external/icu/icu4c-khmerbreakengine.patch.1 b/external/icu/icu4c-khmerbreakengine.patch.1
index 6b45b3743611..9f134dd961b1 100644
--- a/external/icu/icu4c-khmerbreakengine.patch.1
+++ b/external/icu/icu4c-khmerbreakengine.patch.1
@@ -1,16 +1,18 @@
diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
---- icu.org/source/common/dictbe.cpp 2017-01-20 01:20:31.000000000 +0100
-+++ icu/source/common/dictbe.cpp 2017-04-21 23:14:23.845894374 +0200
-@@ -29,8 +29,17 @@
+--- icu.org/source/common/dictbe.cpp 2018-03-26 15:38:30.000000000 +0200
++++ icu/source/common/dictbe.cpp 2018-04-17 17:55:38.620944919 +0200
+@@ -29,7 +29,19 @@
******************************************************************
*/
--DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) {
-+DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) :
-+ clusterLimit(3)
-+{
+-DictionaryBreakEngine::DictionaryBreakEngine() {
++DictionaryBreakEngine::DictionaryBreakEngine()
++ : fTypes(0), clusterLimit(0) {
++}
++
++DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes)
++ : fTypes(breakTypes), clusterLimit(3) {
+ UErrorCode status = U_ZERO_ERROR;
- fTypes = breakTypes;
+ fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status);
+
+ // note Skip Sets contain fIgnoreSet characters too.
@@ -20,16 +22,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
}
DictionaryBreakEngine::~DictionaryBreakEngine() {
-@@ -92,7 +101,7 @@
- result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks);
- utext_setNativeIndex(text, current);
- }
--
-+
- return result;
- }
-
-@@ -103,6 +112,169 @@
+@@ -76,6 +88,169 @@
fSet.compact();
}
@@ -199,7 +192,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
/*
******************************************************************
* PossibleWord
-@@ -130,35 +302,35 @@
+@@ -103,35 +278,35 @@
public:
PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {};
~PossibleWord() {};
@@ -244,7 +237,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
// Dictionary leaves text after longest prefix, not longest word. Back up.
if (count <= 0) {
utext_setNativeIndex(text, start);
-@@ -830,51 +1002,28 @@
+@@ -803,51 +978,28 @@
* KhmerBreakEngine
*/
@@ -265,7 +258,8 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
-static const int32_t KHMER_MIN_WORD_SPAN = KHMER_MIN_WORD * 2;
-
KhmerBreakEngine::KhmerBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCode &status)
- : DictionaryBreakEngine((1 << UBRK_WORD) | (1 << UBRK_LINE)),
+- : DictionaryBreakEngine(),
++ : DictionaryBreakEngine((1 << UBRK_WORD) | (1 << UBRK_LINE)),
fDictionary(adoptDictionary)
{
- fKhmerWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]]"), status);
@@ -301,13 +295,13 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
- fEndWordSet.compact();
- fBeginWordSet.compact();
-// fSuffixSet.compact();
-+ fIgnoreSet.compact();
-+ fBaseSet.compact();
-+ fPuncSet.compact();
++ fIgnoreSet.compact();
++ fBaseSet.compact();
++ fPuncSet.compact();
}
KhmerBreakEngine::~KhmerBreakEngine() {
-@@ -886,180 +1035,204 @@
+@@ -859,180 +1011,204 @@
int32_t rangeStart,
int32_t rangeEnd,
UVector32 &foundBreaks ) const {
@@ -350,17 +344,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
+ foundBreaks.push(rangeEnd, status);
+ return foundBreaks.size() - wordsFound;
+ }
-+
-+ scanStart = rangeStart;
-+ scanWJ(text, scanStart, rangeEnd, before, after);
-+ if (startZwsp || initAfter >= before) {
-+ after = initAfter;
-+ before = 0;
-+ }
-+ if (!endZwsp && after > finalBefore && after < rangeEnd)
-+ endZwsp = true;
-+ if (endZwsp && before > finalBefore)
-+ before = finalBefore;
- while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) {
- cuWordLength = 0;
@@ -375,7 +358,17 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
- cpWordLength = words[wordsFound % KHMER_LOOKAHEAD].markedCPLength();
- wordsFound += 1;
- }
--
++ scanStart = rangeStart;
++ scanWJ(text, scanStart, rangeEnd, before, after);
++ if (startZwsp || initAfter >= before) {
++ after = initAfter;
++ before = 0;
++ }
++ if (!endZwsp && after > finalBefore && after < rangeEnd)
++ endZwsp = true;
++ if (endZwsp && before > finalBefore)
++ before = finalBefore;
+
- // If there was more than one, see which one can take us forward the most words
- else if (candidates > 1) {
- // If we're already at the end of the range, we're done
@@ -390,22 +383,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
- words[wordsFound % KHMER_LOOKAHEAD].markCurrent();
- wordsMatched = 2;
- }
--
-- // If we're already at the end of the range, we're done
-- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) {
-- goto foundBest;
-- }
--
-- // See if any of the possible second words is followed by a third word
-- do {
-- // If we find a third word, stop right away
-- if (words[(wordsFound + 2) % KHMER_LOOKAHEAD].candidates(text, fDictionary, rangeEnd)) {
-- words[wordsFound % KHMER_LOOKAHEAD].markCurrent();
-- goto foundBest;
-- }
-- }
-- while (words[(wordsFound + 1) % KHMER_LOOKAHEAD].backUp(text));
-- }
+ utext_setNativeIndex(text, rangeStart);
+ int32_t numCodePts = rangeEnd - rangeStart;
+ // bestSnlp[i] is the snlp of the best segmentation of the first i
@@ -415,7 +392,11 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
+ for(int32_t i = 1; i <= numCodePts; i++) {
+ bestSnlp.addElement(kuint32max, status);
+ }
-+
+
+- // If we're already at the end of the range, we're done
+- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) {
+- goto foundBest;
+- }
+ // prev[i] is the index of the last code point in the previous word in
+ // the best segmentation of the first i characters. Note negative implies
+ // that the code point is part of an unknown word.
@@ -423,7 +404,17 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
+ for(int32_t i = 0; i <= numCodePts; i++) {
+ prev.addElement(kuint32max, status);
+ }
-+
+
+- // See if any of the possible second words is followed by a third word
+- do {
+- // If we find a third word, stop right away
+- if (words[(wordsFound + 2) % KHMER_LOOKAHEAD].candidates(text, fDictionary, rangeEnd)) {
+- words[wordsFound % KHMER_LOOKAHEAD].markCurrent();
+- goto foundBest;
+- }
+- }
+- while (words[(wordsFound + 1) % KHMER_LOOKAHEAD].backUp(text));
+- }
+ const int32_t maxWordSize = 20;
+ UVector32 values(maxWordSize, status);
+ values.setSize(maxWordSize);
@@ -528,27 +519,17 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp
- if (cuWordLength <= 0) {
- wordsFound += 1;
- }
--
-- // Update the length with the passed-over characters
-- cuWordLength += chars;
-- }