7.3.1 release

f41
Caolán McNamara 3 years ago
parent cf4e04a165
commit f780bf929d

12
.gitignore vendored

@ -4,10 +4,10 @@
/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf /f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf
/libreoffice-multiliblauncher.sh /libreoffice-multiliblauncher.sh
/dtoa-20180411.tgz /dtoa-20180411.tgz
/libreoffice-7.3.0.3.tar.xz
/libreoffice-7.3.0.3.tar.xz.asc
/libreoffice-help-7.3.0.3.tar.xz
/libreoffice-help-7.3.0.3.tar.xz.asc
/libreoffice-translations-7.3.0.3.tar.xz
/libreoffice-translations-7.3.0.3.tar.xz.asc
/libcuckoo-93217f8d391718380c508a722ab9acd5e9081233.tar.gz /libcuckoo-93217f8d391718380c508a722ab9acd5e9081233.tar.gz
/libreoffice-7.3.1.3.tar.xz
/libreoffice-7.3.1.3.tar.xz.asc
/libreoffice-help-7.3.1.3.tar.xz
/libreoffice-help-7.3.1.3.tar.xz.asc
/libreoffice-translations-7.3.1.3.tar.xz
/libreoffice-translations-7.3.1.3.tar.xz.asc

@ -1,45 +0,0 @@
From 3f96d70ce7f31d556b995733b44cb8715b64e329 Mon Sep 17 00:00:00 2001
From: Thorsten Behrens <thorsten.behrens@allotropia.de>
Date: Mon, 31 Jan 2022 22:45:37 +0100
Subject: [PATCH 1/2] Avoid calling AVX code in library static initialization
Despite 26072b8db7ba53f00c83197cb064229a76001989 and
12c6b1ef6a824b09778163ec83fc44bb196e65db, Linux builds using
RH devtoolset-7 gcc7 still hit occasional unit test crashes
with illegal instructions.
Backtrace is always:
> #0 __static_initialization_and_destruction_0 (__initialize_p=1, __priority=65535) at core/sc/source/core/tool/arraysumAVX.cxx:20
> #1 _GLOBAL__sub_I_arraysumAVX.cxx(void) () at core/sc/source/core/tool/arraysumAVX.cxx:112
>
So lets make sure initializer is run only on function entry.
Change-Id: I69f5cb725e4d72fb346166b21870612473f974b8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129246
Tested-by: Jenkins
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
(cherry picked from commit d140817428cdbb519efa496f578bf6c054c94361)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129251
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
---
sc/source/core/tool/arraysumAVX.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sc/source/core/tool/arraysumAVX.cxx b/sc/source/core/tool/arraysumAVX.cxx
index e256248047d0..4d9ee02285e7 100644
--- a/sc/source/core/tool/arraysumAVX.cxx
+++ b/sc/source/core/tool/arraysumAVX.cxx
@@ -30,7 +30,7 @@ using namespace AVX;
*/
static inline void sumAVX(__m256d& sum, __m256d& err, const __m256d& value)
{
- const __m256d ANNULATE_SIGN_BIT
+ static const __m256d ANNULATE_SIGN_BIT
= _mm256_castsi256_pd(_mm256_set1_epi64x(0x7FFF'FFFF'FFFF'FFFF));
// Temporal parameter
__m256d t = _mm256_add_pd(sum, value);
--
2.33.1

@ -1,469 +0,0 @@
From 9ef5a52faecf9118ef46582911f537fd3b6efaad Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 3 Feb 2022 14:29:21 +0000
Subject: [PATCH] disable ICEing function under x86
Change-Id: I75afe56b248236f30a96876e2aed96f5dd887df1
---
sc/Library_sc.mk | 1 +
sc/source/core/tool/bahttext.cxx | 243 +++++++++++++++++++++++++++++++
sc/source/core/tool/interpr2.cxx | 181 -----------------------
3 files changed, 244 insertions(+), 181 deletions(-)
create mode 100644 sc/source/core/tool/bahttext.cxx
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index 936ca33901ee..f31bbd3f5f8c 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -207,6 +207,7 @@ $(eval $(call gb_Library_add_exception_objects,sc,\
sc/source/core/tool/adiasync \
sc/source/core/tool/appoptio \
sc/source/core/tool/autoform \
+ sc/source/core/tool/bahttext \
sc/source/core/tool/calcconfig \
sc/source/core/tool/callform \
sc/source/core/tool/cellform \
diff --git a/sc/source/core/tool/bahttext.cxx b/sc/source/core/tool/bahttext.cxx
new file mode 100644
index 000000000000..307a92e39c7c
--- /dev/null
+++ b/sc/source/core/tool/bahttext.cxx
@@ -0,0 +1,243 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <memory>
+#include <interpre.hxx>
+#include <osl/diagnose.h>
+#include <sc.hrc>
+#include <string.h>
+
+using ::std::vector;
+using namespace com::sun::star;
+using namespace formula;
+
+#if defined(X86)
+void ScInterpreter::ScBahtText() {}
+#else
+
+// BAHTTEXT
+#define UTF8_TH_0 "\340\270\250\340\270\271\340\270\231\340\270\242\340\271\214"
+#define UTF8_TH_1 "\340\270\253\340\270\231\340\270\266\340\271\210\340\270\207"
+#define UTF8_TH_2 "\340\270\252\340\270\255\340\270\207"
+#define UTF8_TH_3 "\340\270\252\340\270\262\340\270\241"
+#define UTF8_TH_4 "\340\270\252\340\270\265\340\271\210"
+#define UTF8_TH_5 "\340\270\253\340\271\211\340\270\262"
+#define UTF8_TH_6 "\340\270\253\340\270\201"
+#define UTF8_TH_7 "\340\271\200\340\270\210\340\271\207\340\270\224"
+#define UTF8_TH_8 "\340\271\201\340\270\233\340\270\224"
+#define UTF8_TH_9 "\340\271\200\340\270\201\340\271\211\340\270\262"
+#define UTF8_TH_10 "\340\270\252\340\270\264\340\270\232"
+#define UTF8_TH_11 "\340\271\200\340\270\255\340\271\207\340\270\224"
+#define UTF8_TH_20 "\340\270\242\340\270\265\340\271\210"
+#define UTF8_TH_1E2 "\340\270\243\340\271\211\340\270\255\340\270\242"
+#define UTF8_TH_1E3 "\340\270\236\340\270\261\340\270\231"
+#define UTF8_TH_1E4 "\340\270\253\340\270\241\340\270\267\340\271\210\340\270\231"
+#define UTF8_TH_1E5 "\340\271\201\340\270\252\340\270\231"
+#define UTF8_TH_1E6 "\340\270\245\340\271\211\340\270\262\340\270\231"
+#define UTF8_TH_DOT0 "\340\270\226\340\271\211\340\270\247\340\270\231"
+#define UTF8_TH_BAHT "\340\270\232\340\270\262\340\270\227"
+#define UTF8_TH_SATANG "\340\270\252\340\270\225\340\270\262\340\270\207\340\270\204\340\271\214"
+#define UTF8_TH_MINUS "\340\270\245\340\270\232"
+
+// local functions
+static void lclSplitBlock(double& rfInt, sal_Int32& rnBlock, double fValue, double fSize)
+{
+ rnBlock = static_cast<sal_Int32>(modf((fValue + 0.1) / fSize, &rfInt) * fSize + 0.1);
+}
+
+/** Appends a digit (0 to 9) to the passed string. */
+static void lclAppendDigit(OStringBuffer& rText, sal_Int32 nDigit)
+{
+ switch (nDigit)
+ {
+ case 0:
+ rText.append(UTF8_TH_0);
+ break;
+ case 1:
+ rText.append(UTF8_TH_1);
+ break;
+ case 2:
+ rText.append(UTF8_TH_2);
+ break;
+ case 3:
+ rText.append(UTF8_TH_3);
+ break;
+ case 4:
+ rText.append(UTF8_TH_4);
+ break;
+ case 5:
+ rText.append(UTF8_TH_5);
+ break;
+ case 6:
+ rText.append(UTF8_TH_6);
+ break;
+ case 7:
+ rText.append(UTF8_TH_7);
+ break;
+ case 8:
+ rText.append(UTF8_TH_8);
+ break;
+ case 9:
+ rText.append(UTF8_TH_9);
+ break;
+ default:
+ OSL_FAIL("lclAppendDigit - illegal digit");
+ }
+}
+
+/** Appends a value raised to a power of 10: nDigit*10^nPow10.
+ @param nDigit A digit in the range from 1 to 9.
+ @param nPow10 A value in the range from 2 to 5.
+ */
+static void lclAppendPow10(OStringBuffer& rText, sal_Int32 nDigit, sal_Int32 nPow10)
+{
+ OSL_ENSURE((1 <= nDigit) && (nDigit <= 9), "lclAppendPow10 - illegal digit");
+ lclAppendDigit(rText, nDigit);
+ switch (nPow10)
+ {
+ case 2:
+ rText.append(UTF8_TH_1E2);
+ break;
+ case 3:
+ rText.append(UTF8_TH_1E3);
+ break;
+ case 4:
+ rText.append(UTF8_TH_1E4);
+ break;
+ case 5:
+ rText.append(UTF8_TH_1E5);
+ break;
+ default:
+ OSL_FAIL("lclAppendPow10 - illegal power");
+ }
+}
+
+/** Appends a block of 6 digits (value from 1 to 999,999) to the passed string. */
+static void lclAppendBlock(OStringBuffer& rText, sal_Int32 nValue)
+{
+ OSL_ENSURE((1 <= nValue) && (nValue <= 999999), "lclAppendBlock - illegal value");
+ if (nValue >= 100000)
+ {
+ lclAppendPow10(rText, nValue / 100000, 5);
+ nValue %= 100000;
+ }
+ if (nValue >= 10000)
+ {
+ lclAppendPow10(rText, nValue / 10000, 4);
+ nValue %= 10000;
+ }
+ if (nValue >= 1000)
+ {
+ lclAppendPow10(rText, nValue / 1000, 3);
+ nValue %= 1000;
+ }
+ if (nValue >= 100)
+ {
+ lclAppendPow10(rText, nValue / 100, 2);
+ nValue %= 100;
+ }
+ if (nValue <= 0)
+ return;
+
+ sal_Int32 nTen = nValue / 10;
+ sal_Int32 nOne = nValue % 10;
+ if (nTen >= 1)
+ {
+ if (nTen >= 3)
+ lclAppendDigit(rText, nTen);
+ else if (nTen == 2)
+ rText.append(UTF8_TH_20);
+ rText.append(UTF8_TH_10);
+ }
+ if ((nTen > 0) && (nOne == 1))
+ rText.append(UTF8_TH_11);
+ else if (nOne > 0)
+ lclAppendDigit(rText, nOne);
+}
+
+void ScInterpreter::ScBahtText()
+{
+ sal_uInt8 nParamCount = GetByte();
+ if (!MustHaveParamCount(nParamCount, 1))
+ return;
+
+ double fValue = GetDouble();
+ if (nGlobalError != FormulaError::NONE)
+ {
+ PushError(nGlobalError);
+ return;
+ }
+
+ // sign
+ bool bMinus = fValue < 0.0;
+ fValue = std::abs(fValue);
+
+ // round to 2 digits after decimal point, fValue contains Satang as integer
+ fValue = ::rtl::math::approxFloor(fValue * 100.0 + 0.5);
+
+ // split Baht and Satang
+ double fBaht = 0.0;
+ sal_Int32 nSatang = 0;
+ lclSplitBlock(fBaht, nSatang, fValue, 100.0);
+
+ OStringBuffer aText;
+
+ // generate text for Baht value
+ if (fBaht == 0.0)
+ {
+ if (nSatang == 0)
+ aText.append(UTF8_TH_0);
+ }
+ else
+ while (fBaht > 0.0)
+ {
+ OStringBuffer aBlock;
+ sal_Int32 nBlock = 0;
+ lclSplitBlock(fBaht, nBlock, fBaht, 1.0e6);
+ if (nBlock > 0)
+ lclAppendBlock(aBlock, nBlock);
+ // add leading "million", if there will come more blocks
+ if (fBaht > 0.0)
+ aBlock.insert(0, UTF8_TH_1E6);
+
+ aText.insert(0, aBlock.makeStringAndClear());
+ }
+ if (!aText.isEmpty())
+ aText.append(UTF8_TH_BAHT);
+
+ // generate text for Satang value
+ if (nSatang == 0)
+ {
+ aText.append(UTF8_TH_DOT0);
+ }
+ else
+ {
+ lclAppendBlock(aText, nSatang);
+ aText.append(UTF8_TH_SATANG);
+ }
+
+ // add the minus sign
+ if (bMinus)
+ aText.insert(0, UTF8_TH_MINUS);
+
+ PushString(OStringToOUString(aText.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+}
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/interpr2.cxx b/sc/source/core/tool/interpr2.cxx
index 6525f2a6784b..96f47f2e27ad 100644
--- a/sc/source/core/tool/interpr2.cxx
+++ b/sc/source/core/tool/interpr2.cxx
@@ -3307,187 +3307,6 @@ void ScInterpreter::ScEuroConvert()
}
}
-// BAHTTEXT
-#define UTF8_TH_0 "\340\270\250\340\270\271\340\270\231\340\270\242\340\271\214"
-#define UTF8_TH_1 "\340\270\253\340\270\231\340\270\266\340\271\210\340\270\207"
-#define UTF8_TH_2 "\340\270\252\340\270\255\340\270\207"
-#define UTF8_TH_3 "\340\270\252\340\270\262\340\270\241"
-#define UTF8_TH_4 "\340\270\252\340\270\265\340\271\210"
-#define UTF8_TH_5 "\340\270\253\340\271\211\340\270\262"
-#define UTF8_TH_6 "\340\270\253\340\270\201"
-#define UTF8_TH_7 "\340\271\200\340\270\210\340\271\207\340\270\224"
-#define UTF8_TH_8 "\340\271\201\340\270\233\340\270\224"
-#define UTF8_TH_9 "\340\271\200\340\270\201\340\271\211\340\270\262"
-#define UTF8_TH_10 "\340\270\252\340\270\264\340\270\232"
-#define UTF8_TH_11 "\340\271\200\340\270\255\340\271\207\340\270\224"
-#define UTF8_TH_20 "\340\270\242\340\270\265\340\271\210"
-#define UTF8_TH_1E2 "\340\270\243\340\271\211\340\270\255\340\270\242"
-#define UTF8_TH_1E3 "\340\270\236\340\270\261\340\270\231"
-#define UTF8_TH_1E4 "\340\270\253\340\270\241\340\270\267\340\271\210\340\270\231"
-#define UTF8_TH_1E5 "\340\271\201\340\270\252\340\270\231"
-#define UTF8_TH_1E6 "\340\270\245\340\271\211\340\270\262\340\270\231"
-#define UTF8_TH_DOT0 "\340\270\226\340\271\211\340\270\247\340\270\231"
-#define UTF8_TH_BAHT "\340\270\232\340\270\262\340\270\227"
-#define UTF8_TH_SATANG "\340\270\252\340\270\225\340\270\262\340\270\207\340\270\204\340\271\214"
-#define UTF8_TH_MINUS "\340\270\245\340\270\232"
-
-// local functions
-namespace {
-
-void lclSplitBlock( double& rfInt, sal_Int32& rnBlock, double fValue, double fSize )
-{
- rnBlock = static_cast< sal_Int32 >( modf( (fValue + 0.1) / fSize, &rfInt ) * fSize + 0.1 );
-}
-
-/** Appends a digit (0 to 9) to the passed string. */
-void lclAppendDigit( OStringBuffer& rText, sal_Int32 nDigit )
-{
- switch( nDigit )
- {
- case 0: rText.append( UTF8_TH_0 ); break;
- case 1: rText.append( UTF8_TH_1 ); break;
- case 2: rText.append( UTF8_TH_2 ); break;
- case 3: rText.append( UTF8_TH_3 ); break;
- case 4: rText.append( UTF8_TH_4 ); break;
- case 5: rText.append( UTF8_TH_5 ); break;
- case 6: rText.append( UTF8_TH_6 ); break;
- case 7: rText.append( UTF8_TH_7 ); break;
- case 8: rText.append( UTF8_TH_8 ); break;
- case 9: rText.append( UTF8_TH_9 ); break;
- default: OSL_FAIL( "lclAppendDigit - illegal digit" );
- }
-}
-
-/** Appends a value raised to a power of 10: nDigit*10^nPow10.
- @param nDigit A digit in the range from 1 to 9.
- @param nPow10 A value in the range from 2 to 5.
- */
-void lclAppendPow10( OStringBuffer& rText, sal_Int32 nDigit, sal_Int32 nPow10 )
-{
- OSL_ENSURE( (1 <= nDigit) && (nDigit <= 9), "lclAppendPow10 - illegal digit" );
- lclAppendDigit( rText, nDigit );
- switch( nPow10 )
- {
- case 2: rText.append( UTF8_TH_1E2 ); break;
- case 3: rText.append( UTF8_TH_1E3 ); break;
- case 4: rText.append( UTF8_TH_1E4 ); break;
- case 5: rText.append( UTF8_TH_1E5 ); break;
- default: OSL_FAIL( "lclAppendPow10 - illegal power" );
- }
-}
-
-/** Appends a block of 6 digits (value from 1 to 999,999) to the passed string. */
-void lclAppendBlock( OStringBuffer& rText, sal_Int32 nValue )
-{
- OSL_ENSURE( (1 <= nValue) && (nValue <= 999999), "lclAppendBlock - illegal value" );
- if( nValue >= 100000 )
- {
- lclAppendPow10( rText, nValue / 100000, 5 );
- nValue %= 100000;
- }
- if( nValue >= 10000 )
- {
- lclAppendPow10( rText, nValue / 10000, 4 );
- nValue %= 10000;
- }
- if( nValue >= 1000 )
- {
- lclAppendPow10( rText, nValue / 1000, 3 );
- nValue %= 1000;
- }
- if( nValue >= 100 )
- {
- lclAppendPow10( rText, nValue / 100, 2 );
- nValue %= 100;
- }
- if( nValue <= 0 )
- return;
-
- sal_Int32 nTen = nValue / 10;
- sal_Int32 nOne = nValue % 10;
- if( nTen >= 1 )
- {
- if( nTen >= 3 )
- lclAppendDigit( rText, nTen );
- else if( nTen == 2 )
- rText.append( UTF8_TH_20 );
- rText.append( UTF8_TH_10 );
- }
- if( (nTen > 0) && (nOne == 1) )
- rText.append( UTF8_TH_11 );
- else if( nOne > 0 )
- lclAppendDigit( rText, nOne );
-}
-
-} // namespace
-
-void ScInterpreter::ScBahtText()
-{
- sal_uInt8 nParamCount = GetByte();
- if ( !MustHaveParamCount( nParamCount, 1 ) )
- return;
-
- double fValue = GetDouble();
- if( nGlobalError != FormulaError::NONE )
- {
- PushError( nGlobalError);
- return;
- }
-
- // sign
- bool bMinus = fValue < 0.0;
- fValue = std::abs( fValue );
-
- // round to 2 digits after decimal point, fValue contains Satang as integer
- fValue = ::rtl::math::approxFloor( fValue * 100.0 + 0.5 );
-
- // split Baht and Satang
- double fBaht = 0.0;
- sal_Int32 nSatang = 0;
- lclSplitBlock( fBaht, nSatang, fValue, 100.0 );
-
- OStringBuffer aText;
-
- // generate text for Baht value
- if( fBaht == 0.0 )
- {
- if( nSatang == 0 )
- aText.append( UTF8_TH_0 );
- }
- else while( fBaht > 0.0 )
- {
- OStringBuffer aBlock;
- sal_Int32 nBlock = 0;
- lclSplitBlock( fBaht, nBlock, fBaht, 1.0e6 );
- if( nBlock > 0 )
- lclAppendBlock( aBlock, nBlock );
- // add leading "million", if there will come more blocks
- if( fBaht > 0.0 )
- aBlock.insert( 0, UTF8_TH_1E6 );
-
- aText.insert(0, aBlock.makeStringAndClear());
- }
- if (!aText.isEmpty())
- aText.append( UTF8_TH_BAHT );
-
- // generate text for Satang value
- if( nSatang == 0 )
- {
- aText.append( UTF8_TH_DOT0 );
- }
- else
- {
- lclAppendBlock( aText, nSatang );
- aText.append( UTF8_TH_SATANG );
- }
-
- // add the minus sign
- if( bMinus )
- aText.insert( 0, UTF8_TH_MINUS );
-
- PushString( OStringToOUString(aText.makeStringAndClear(), RTL_TEXTENCODING_UTF8) );
-}
-
void ScInterpreter::ScGetPivotData()
{
sal_uInt8 nParamCount = GetByte();
--
2.33.1

@ -1,49 +0,0 @@
From dad09df8cf2fd44105c7224203d76d0273ed04d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 8 Feb 2022 08:37:34 +0000
Subject: [PATCH] drop checksum assert that is platform dependant
Change-Id: I3459d753a8f655ca34ecf6c25fdfd9655687c6d1
---
emfio/qa/cppunit/emf/EmfImportTest.cxx | 11 -----------
1 file changed, 11 deletions(-)
diff --git a/emfio/qa/cppunit/emf/EmfImportTest.cxx b/emfio/qa/cppunit/emf/EmfImportTest.cxx
index 0f0bd76d199d..c9c2bcb94219 100644
--- a/emfio/qa/cppunit/emf/EmfImportTest.cxx
+++ b/emfio/qa/cppunit/emf/EmfImportTest.cxx
@@ -853,10 +853,6 @@ void Test::TestBitBltStretchBltWMF()
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[1]", "xy23", "406");
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[1]", "height", "10");
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[1]", "width", "10");
-#if !defined(MACOSX) \
- && !defined(_WIN32) // TODO Bitmap display needs to be aligned for macOS and Windows
- assertXPath(pDocument, aXPathPrefix + "mask/bitmap[1]", "checksum", "747141214295528493");
-#endif
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[1]/data", 10);
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[1]/data[1]", "row",
"000000,000000,000000,000000,000000,000000,000000,000000,000000,000000");
@@ -874,10 +870,6 @@ void Test::TestBitBltStretchBltWMF()
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[2]", "height", "10");
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[2]", "width", "10");
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[2]/data", 10);
-#if !defined(MACOSX) \
- && !defined(_WIN32) // TODO Bitmap display needs to be aligned for macOS and Windows
- assertXPath(pDocument, aXPathPrefix + "mask/bitmap[2]", "checksum", "3134789313661517563");
-#endif
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[2]/data[1]", "row",
"000000,00001c,000038,000055,000071,00008d,0000aa,0000c6,0000e2,0000ff");
assertXPath(pDocument, aXPathPrefix + "mask/bitmap[2]/data[5]", "row",
@@ -1052,9 +1044,6 @@ void Test::TestStretchDIBWMF()
assertXPath(pDocument, aXPathPrefix + "mask/bitmap", "height", "10");
assertXPath(pDocument, aXPathPrefix + "mask/bitmap", "width", "10");
-#if !defined(MACOSX) // TODO DIB display needs to be aligned for macOS
- assertXPath(pDocument, aXPathPrefix + "mask/bitmap", "checksum", "14148300367030905133");
-#endif
assertXPath(pDocument, aXPathPrefix + "mask/bitmap/data", 10);
assertXPath(pDocument, aXPathPrefix + "/mask/bitmap/data[1]", "row",
"000000,00001c,000038,000055,000071,00008d,0000aa,0000c6,0000e2,0000ff");
--
2.34.1

@ -1,44 +0,0 @@
From 099a72eb674ca25e348747229a188da5d00a58e1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 7 Feb 2022 12:17:03 +0000
Subject: [PATCH] fix big-endian hsql to firebird migration
Change-Id: I047d2366ad80eca701924cb0f66b6b1bcfdcac5b
---
connectivity/source/drivers/firebird/PreparedStatement.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 9225c3b26895..39fef04a185c 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -207,7 +207,8 @@ void SAL_CALL OPreparedStatement::setString(sal_Int32 nParameterIndex,
{
str = str.copy(0, max_varchar_len);
}
- const auto nLength = str.getLength();
+ const sal_uInt16 nLength = str.getLength();
+ static_assert(sizeof(nLength) == 2, "must match dest memcpy len");
memcpy(pVar->sqldata, &nLength, 2);
// Actual data
memcpy(pVar->sqldata + 2, str.getStr(), str.getLength());
@@ -908,7 +909,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
{
xBytesCopy.realloc( nMaxSize );
}
- const auto nSize = xBytesCopy.getLength();
+ const sal_uInt16 nSize = xBytesCopy.getLength();
// 8000 corresponds to value from lcl_addDefaultParameters
// in dbaccess/source/filter/hsqldb/createparser.cxx
if (nSize > 8000)
@@ -916,6 +917,7 @@ void SAL_CALL OPreparedStatement::setBytes(sal_Int32 nParameterIndex,
free(pVar->sqldata);
pVar->sqldata = static_cast<char *>(malloc(sizeof(char) * nSize + 2));
}
+ static_assert(sizeof(nSize) == 2, "must match dest memcpy len");
// First 2 bytes indicate string size
memcpy(pVar->sqldata, &nSize, 2);
// Actual data
--
2.33.1

@ -1,401 +0,0 @@
From e60f4c7cc51bb58b4e42bb47b37209fa0e6b3400 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 4 Feb 2022 15:02:17 +0000
Subject: [PATCH] fix direct leaks in vcl cppunit tests
the uses of new are wholly unnecessary
Change-Id: Id7238be6e73567add8a0d3ed6dc9f3262e15c043
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129435
Tested-by: Jenkins
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
---
vcl/qa/cppunit/text.cxx | 276 ++++++++++++++++++++--------------------
1 file changed, 138 insertions(+), 138 deletions(-)
diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index eef1478286d5..072a0d0a1f98 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -425,67 +425,67 @@ void VclTextTest::testImplLayoutRuns_AddPos()
aRuns.AddPos(6, true); // add RTL marker glyph
aRuns.AddPos(7, false);
- int* pCharPos = new int(0);
- bool* pRightToLeftMarker = new bool(false);
+ int nCharPos(0);
+ bool bRightToLeftMarker(false);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(1, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(1, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(2, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(2, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(3, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(3, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(4, *pCharPos);
- CPPUNIT_ASSERT(*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(4, nCharPos);
+ CPPUNIT_ASSERT(bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(5, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(5, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(6, *pCharPos);
- CPPUNIT_ASSERT(*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(6, nCharPos);
+ CPPUNIT_ASSERT(bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(7, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(7, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
// no next position, we are running off the end
- CPPUNIT_ASSERT(!aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
+ CPPUNIT_ASSERT(!aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
aRuns.ResetPos();
int nMinRunPos, nEndRunPos;
- bool* pRightToLeft = new bool(false);
+ bool bRightToLeft(false);
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(1, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(4, nEndRunPos);
- CPPUNIT_ASSERT(!*pRightToLeft);
+ CPPUNIT_ASSERT(!bRightToLeft);
aRuns.NextRun();
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(4, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(5, nEndRunPos);
- CPPUNIT_ASSERT(*pRightToLeft);
+ CPPUNIT_ASSERT(bRightToLeft);
aRuns.NextRun();
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(5, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(6, nEndRunPos);
- CPPUNIT_ASSERT(!*pRightToLeft);
+ CPPUNIT_ASSERT(!bRightToLeft);
aRuns.NextRun();
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(6, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(7, nEndRunPos);
- CPPUNIT_ASSERT(*pRightToLeft);
+ CPPUNIT_ASSERT(bRightToLeft);
// test clear
aRuns.Clear();
@@ -500,63 +500,63 @@ void VclTextTest::testImplLayoutRuns_AddRuns()
aRuns.AddRun(5, 6, false);
aRuns.AddRun(6, 7, true);
- int* pCharPos = new int(0);
- bool* pRightToLeftMarker = new bool(false);
+ int nCharPos(0);
+ bool bRightToLeftMarker(false);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(1, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(1, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(2, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(2, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(3, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(3, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(4, *pCharPos);
- CPPUNIT_ASSERT(*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(4, nCharPos);
+ CPPUNIT_ASSERT(bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(5, *pCharPos);
- CPPUNIT_ASSERT(!*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(5, nCharPos);
+ CPPUNIT_ASSERT(!bRightToLeftMarker);
- CPPUNIT_ASSERT(aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
- CPPUNIT_ASSERT_EQUAL(6, *pCharPos);
- CPPUNIT_ASSERT(*pRightToLeftMarker);
+ CPPUNIT_ASSERT(aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
+ CPPUNIT_ASSERT_EQUAL(6, nCharPos);
+ CPPUNIT_ASSERT(bRightToLeftMarker);
// no next position, we are running off the end
- CPPUNIT_ASSERT(!aRuns.GetNextPos(pCharPos, pRightToLeftMarker));
+ CPPUNIT_ASSERT(!aRuns.GetNextPos(&nCharPos, &bRightToLeftMarker));
aRuns.ResetPos();
int nMinRunPos, nEndRunPos;
- bool* pRightToLeft = new bool(false);
+ bool bRightToLeft(false);
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(1, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(4, nEndRunPos);
- CPPUNIT_ASSERT(!*pRightToLeft);
+ CPPUNIT_ASSERT(!bRightToLeft);
aRuns.NextRun();
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(4, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(5, nEndRunPos);
- CPPUNIT_ASSERT(*pRightToLeft);
+ CPPUNIT_ASSERT(bRightToLeft);
aRuns.NextRun();
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(5, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(6, nEndRunPos);
- CPPUNIT_ASSERT(!*pRightToLeft);
+ CPPUNIT_ASSERT(!bRightToLeft);
aRuns.NextRun();
- CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, pRightToLeft));
+ CPPUNIT_ASSERT(aRuns.GetRun(&nMinRunPos, &nEndRunPos, &bRightToLeft));
CPPUNIT_ASSERT_EQUAL(6, nMinRunPos);
CPPUNIT_ASSERT_EQUAL(7, nEndRunPos);
- CPPUNIT_ASSERT(*pRightToLeft);
+ CPPUNIT_ASSERT(bRightToLeft);
}
void VclTextTest::testImplLayoutRuns_PosIsInRun()
@@ -603,23 +603,23 @@ void VclTextTest::testImplLayoutArgsBiDiStrong()
SalLayoutFlags::BiDiStrong, LanguageTag(LANGUAGE_NONE),
nullptr);
- int* nMinRunPos = new int(0);
- int* nEndRunPos = new int(0);
- bool* pRTL = new bool(false);
+ int nMinRunPos(0);
+ int nEndRunPos(0);
+ bool bRTL(false);
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(0, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(19, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(0, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(19, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(20, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(51, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(20, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(51, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(20, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(51, *nEndRunPos);
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(20, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(51, nEndRunPos);
}
void VclTextTest::testImplLayoutArgsBiDiRtl()
@@ -629,29 +629,29 @@ void VclTextTest::testImplLayoutArgsBiDiRtl()
vcl::text::ImplLayoutArgs aArgs(sTestString, 0, sTestString.getLength(),
SalLayoutFlags::BiDiRtl, LanguageTag(LANGUAGE_NONE), nullptr);
- int* nMinRunPos = new int(0);
- int* nEndRunPos = new int(0);
- bool* pRTL = new bool(false);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(45, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(51, *nEndRunPos);
- CPPUNIT_ASSERT(*pRTL);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(21, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(45, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(20, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(21, *nEndRunPos);
- CPPUNIT_ASSERT(*pRTL);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(0, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(19, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
+ int nMinRunPos(0);
+ int nEndRunPos(0);
+ bool bRTL(false);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(45, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(51, nEndRunPos);
+ CPPUNIT_ASSERT(&bRTL);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(21, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(45, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(20, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(21, nEndRunPos);
+ CPPUNIT_ASSERT(bRTL);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(0, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(19, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
}
void VclTextTest::testImplLayoutArgsRightAlign()
@@ -662,24 +662,24 @@ void VclTextTest::testImplLayoutArgsRightAlign()
SalLayoutFlags::RightAlign, LanguageTag(LANGUAGE_NONE),
nullptr);
- int* nMinRunPos = new int(0);
- int* nEndRunPos = new int(0);
- bool* pRTL = new bool(false);
+ int nMinRunPos(0);
+ int nEndRunPos(0);
+ bool bRTL(false);
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(0, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(19, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(0, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(19, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(20, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(45, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(20, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(45, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(45, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(51, *nEndRunPos);
- CPPUNIT_ASSERT(*pRTL);
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(45, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(51, nEndRunPos);
+ CPPUNIT_ASSERT(bRTL);
}
void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs()
@@ -702,29 +702,29 @@ void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs()
aArgs.PrepareFallback(pGlyphsImpl);
- int* nMinRunPos = new int(0);
- int* nEndRunPos = new int(0);
- bool* pRTL = new bool(false);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(0, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(3, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(4, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(9, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(11, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(17, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
-
- aArgs.GetNextRun(nMinRunPos, nEndRunPos, pRTL);
- CPPUNIT_ASSERT_EQUAL(18, *nMinRunPos);
- CPPUNIT_ASSERT_EQUAL(22, *nEndRunPos);
- CPPUNIT_ASSERT(!*pRTL);
+ int nMinRunPos(0);
+ int nEndRunPos(0);
+ bool bRTL(false);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(0, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(3, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(4, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(9, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(11, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(17, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
+
+ aArgs.GetNextRun(&nMinRunPos, &nEndRunPos, &bRTL);
+ CPPUNIT_ASSERT_EQUAL(18, nMinRunPos);
+ CPPUNIT_ASSERT_EQUAL(22, nEndRunPos);
+ CPPUNIT_ASSERT(!bRTL);
}
CPPUNIT_TEST_SUITE_REGISTRATION(VclTextTest);
--
2.33.1

@ -1,103 +0,0 @@
From ccc57428482903923e6df745ea62f5cad8c64bbf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 3 Feb 2022 16:05:48 +0000
Subject: [PATCH] the real font used for 'Roman' is arbitrary
the font name isn't a typical semi-standard one so it neither exists nor
has a standard fallback. binary-hack "Roman" to "Arial" which is
conveniently the same length and does have a standard fallback of
"Liberation Sans" which we can add a dependency on via more_fonts
Change-Id: I1d9b8294f67a00a1e5cabe38b71467e66b83aedf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129473
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
---
emfio/CppunitTest_emfio_emf.mk | 2 ++
emfio/CppunitTest_emfio_wmf.mk | 1 +
.../wmf/data/tdf88163-non-placeable.wmf | Bin 1268 -> 1268 bytes
.../wmf/data/tdf88163-wrong-font-size.wmf | Bin 1290 -> 1290 bytes
emfio/qa/cppunit/wmf/wmfimporttest.cxx | 13 +++----------
5 files changed, 6 insertions(+), 10 deletions(-)
diff --git a/emfio/CppunitTest_emfio_emf.mk b/emfio/CppunitTest_emfio_emf.mk
index 5b32187b7ea8..1714755a4fb1 100644
--- a/emfio/CppunitTest_emfio_emf.mk
+++ b/emfio/CppunitTest_emfio_emf.mk
@@ -40,6 +40,8 @@ $(eval $(call gb_CppunitTest_use_vcl,emfio_emf))
$(eval $(call gb_CppunitTest_use_rdb,emfio_emf,services))
+$(eval $(call gb_CppunitTest_use_more_fonts,emfio_emf))
+
$(eval $(call gb_CppunitTest_use_configuration,emfio_emf))
# vim: set noet sw=4 ts=4:
diff --git a/emfio/CppunitTest_emfio_wmf.mk b/emfio/CppunitTest_emfio_wmf.mk
index ec67bff3a9b4..44f0a1b273b7 100644
--- a/emfio/CppunitTest_emfio_wmf.mk
+++ b/emfio/CppunitTest_emfio_wmf.mk
@@ -40,6 +40,7 @@ $(eval $(call gb_CppunitTest_use_components,emfio_wmf,\
unotools/util/utl \
))
+$(eval $(call gb_CppunitTest_use_more_fonts,emfio_wmf))
$(eval $(call gb_CppunitTest_use_configuration,emfio_wmf))
$(eval $(call gb_CppunitTest_use_sdk_api,emfio_wmf))
$(eval $(call gb_CppunitTest_use_ure,emfio_wmf))
diff --git a/emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmf b/emfio/qa/cppunit/wmf/data/tdf88163-non-placeable.wmf
index b39514bd1b5cefc721175680ddca05cfe2341c15..6d27691f0d2d9dbf9936996b077f1ec64e255d83 100644
GIT binary patch
delta 16
Xcmeyu`Gs?W7OP`XW@64p{i7@ZI9&!z
delta 16
Xcmeyu`Gs?W7Hd#`Zerd>{i7@ZIRpk^
diff --git a/emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmf b/emfio/qa/cppunit/wmf/data/tdf88163-wrong-font-size.wmf
index edcab8aea63552e27ee3b75a0bf7bff74b3966f5..4902ba18d16bb567cb58c93c7a4167311cf05b19 100644
GIT binary patch
delta 16
XcmeC;>f)N<!0K3(nV7TD^(YGfEkOmQ
delta 16
XcmeC;>f)N<z#5dFo0zxJ^(YGfE$9Wh
diff --git a/emfio/qa/cppunit/wmf/wmfimporttest.cxx b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
index b7a4dc1badb7..d6533d8ba07c 100644
--- a/emfio/qa/cppunit/wmf/wmfimporttest.cxx
+++ b/emfio/qa/cppunit/wmf/wmfimporttest.cxx
@@ -117,14 +117,10 @@ void WmfTest::testTdf88163NonPlaceableWmf()
// These values come from the fix for tdf#88163
- // Font 'Roman' and its height can vary according to the platform
// Fails without the fix
- // Linux: With fix: 3136, without fix: ~ 8000
- // Mac: With fix: 3230, without fix: ~ 8000
- // Windows: With fix: 3303, without fix: ~ 8000
+ // With fix: 3272, without fix: ~ 8000
auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() > 3000);
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() < 3500);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(3272), x.toInt32());
// Fails without the fix: Expected: 7359, Actual: 7336
assertXPath(pDoc, "/metafile/push[2]/textarray[1]", "x", "7359");
@@ -157,12 +153,9 @@ void WmfTest::testTdf88163PlaceableWmf()
// These values come from the fix for tdf#88163
- // Font 'Roman' and its height can vary according to the platform
// The fix does not affect the font size
- // Linux: 300 - Mac: 309 - Windows: 316
auto x = getXPath(pDoc, "/metafile/push[2]/font[1]", "height");
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() > 290);
- CPPUNIT_ASSERT_MESSAGE(fileName.toUtf8().getStr(), x.toInt32() < 320);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(313), x.toInt32());
// Fails without the fix: Expected: 1900, Actual: 19818
assertXPath(pDoc, "/metafile", "height", "1900");
--
2.33.1

@ -1,75 +0,0 @@
From 32ec6094e81d292346f83db6e18a3daec99bd2ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 4 Feb 2022 15:13:28 +0000
Subject: [PATCH] this test assumes KacstBook has no Latin glyphs
which is true for the one bundled with LibreOffice but is not
true for the fedora one (kacst-book-fonts-2.0-26.fc35), but
neither of them have Cyrillic glyphs
Change-Id: Ide8b84502886c7b9e0bc4fcef4685b4b89ec2bc3
test fails with both fedora KacstBook and bundled KacstBook installed
fedora KacstBook ver is less than bundled KacstBook ver so bundled is
preferred, bundled KacstBook has no Latin glyphs, but glyph fallback
finds system one and sees it has the missing glyphs, determines that the
whole thing can be done in the fallback font, so the toplevel is unused
and so "invalid" and this test fails on checking that.
The test is supposed to ensure that glyph caching gives the same result
as uncached, which it does, so just assert if there is a difference
between cached and uncached
Change-Id: I3c424a17f3e544aa64f4af98e0c151fc00b2e6e5
---
vcl/qa/cppunit/complextext.cxx | 4 +---
vcl/qa/cppunit/text.cxx | 6 ++++--
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/vcl/qa/cppunit/complextext.cxx b/vcl/qa/cppunit/complextext.cxx
index 21e1e58f96ac..5d9ac92f1f69 100644
--- a/vcl/qa/cppunit/complextext.cxx
+++ b/vcl/qa/cppunit/complextext.cxx
@@ -172,13 +172,11 @@ static void testCachedGlyphs( const OUString& aText, const OUString& aFontName =
std::unique_ptr<SalLayout> pLayout1 = pOutputDevice->ImplLayout(
aText, 0, aText.getLength(), Point(0, 0), 0, {}, SalLayoutFlags::GlyphItemsOnly);
SalLayoutGlyphs aGlyphs1 = pLayout1->GetGlyphs();
- CPPUNIT_ASSERT_MESSAGE(message, aGlyphs1.IsValid());
- CPPUNIT_ASSERT_MESSAGE(message, aGlyphs1.Impl(0) != nullptr);
// Reuse the cached glyphs to get glyphs again.
std::unique_ptr<SalLayout> pLayout2 = pOutputDevice->ImplLayout(
aText, 0, aText.getLength(), Point(0, 0), 0, {}, SalLayoutFlags::GlyphItemsOnly, nullptr, &aGlyphs1);
SalLayoutGlyphs aGlyphs2 = pLayout2->GetGlyphs();
- CPPUNIT_ASSERT_MESSAGE(message, aGlyphs2.IsValid());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE(message, aGlyphs1.IsValid(), aGlyphs2.IsValid());
// And check it's the same.
for( int level = 0; level < MAX_FALLBACK; ++level )
{
diff --git a/vcl/qa/cppunit/text.cxx b/vcl/qa/cppunit/text.cxx
index 072a0d0a1f98..3647589a38d1 100644
--- a/vcl/qa/cppunit/text.cxx
+++ b/vcl/qa/cppunit/text.cxx
@@ -690,7 +690,8 @@ void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs()
ScopedVclPtrInstance<VirtualDevice> pVirDev;
pVirDev->SetFont(aFont);
- const OUString sTestString = "The quick\n jumped over";
+ const OString sUTF8String(u8"Тхе яуицк\n ыумпед овер");
+ const OUString sTestString(OUString::fromUtf8(sUTF8String));
std::unique_ptr<SalLayout> pLayout
= pVirDev->ImplLayout(sTestString, 0, sTestString.getLength(), Point(0, 0), 0, {},
SalLayoutFlags::GlyphItemsOnly);
@@ -698,7 +699,8 @@ void VclTextTest::testImplLayoutArgs_PrepareFallback_precalculatedglyphs()
SalLayoutGlyphsImpl* pGlyphsImpl = aGlyphs.Impl(1);
vcl::text::ImplLayoutArgs aArgs(sTestString, 0, sTestString.getLength(),
- SalLayoutFlags::BiDiRtl, LanguageTag(LANGUAGE_LATIN), nullptr);
+ SalLayoutFlags::BiDiRtl, LanguageTag(LANGUAGE_RUSSIAN),
+ nullptr);
aArgs.PrepareFallback(pGlyphsImpl);
--
2.33.1

@ -1,5 +1,5 @@
# download path contains version without the last (fourth) digit # download path contains version without the last (fourth) digit
%global libo_version 7.3.0 %global libo_version 7.3.1
# Should contain .alphaX / .betaX, if this is pre-release (actually # Should contain .alphaX / .betaX, if this is pre-release (actually
# pre-RC) version. The pre-release string is part of tarball file names, # pre-RC) version. The pre-release string is part of tarball file names,
# so we need a way to define it easily at one place. # so we need a way to define it easily at one place.
@ -57,7 +57,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice Name: libreoffice
Epoch: 1 Epoch: 1
Version: %{libo_version}.3 Version: %{libo_version}.3
Release: 3%{?libo_prerelease}%{?dist} Release: 1%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0
URL: http://www.libreoffice.org/ URL: http://www.libreoffice.org/
@ -245,14 +245,6 @@ Patch1: 0001-disble-tip-of-the-day-dialog-by-default.patch
Patch2: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch Patch2: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch
# backported # backported
Patch3: 0001-Revert-tdf-101630-gdrive-support-w-oAuth-and-Drive-A.patch Patch3: 0001-Revert-tdf-101630-gdrive-support-w-oAuth-and-Drive-A.patch
Patch4: 0001-the-real-font-used-for-Roman-is-arbitrary.patch
Patch5: 0001-fix-direct-leaks-in-vcl-cppunit-tests.patch
Patch6: 0001-this-test-assumes-KacstBook-has-no-Latin-glyphs.patch
Patch7: 0001-Avoid-calling-AVX-code-in-library-static-initializat.patch
Patch8: 0001-fix-big-endian-hsql-to-firebird-migration.patch
Patch9: 0001-drop-checksum-assert-that-is-platform-dependant.patch
# see if ICE still happens
Patch10: 0001-disable-ICEing-function-under-x86.patch
# not upstreamed # not upstreamed
Patch500: 0001-disable-libe-book-support.patch Patch500: 0001-disable-libe-book-support.patch
@ -2184,6 +2176,9 @@ gtk-update-icon-cache -q %{_datadir}/icons/hicolor &>/dev/null || :
%{_includedir}/LibreOfficeKit %{_includedir}/LibreOfficeKit
%changelog %changelog
* Sat Mar 05 2022 Caolán McNamara <caolanm@redhat.com> - 1:7.3.1.3-1
- 7.3.1 release
* Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1:7.3.0.3-3 * Sat Feb 05 2022 Jiri Vanek <jvanek@redhat.com> - 1:7.3.0.3-3
- Rebuilt for java-17-openjdk as system jdk - Rebuilt for java-17-openjdk as system jdk

@ -4,10 +4,10 @@ SHA512 (a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip) = 2d3835f7ac356805025
SHA512 (f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf) = 6a6d131dad5191614950a49323ae6d9385afe331983c1c85fde82ce6ee816051d95dde9ef90658b8f0a8a0a21754e72ff724bf41f6b96c046b7b4c2660f7095b SHA512 (f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf) = 6a6d131dad5191614950a49323ae6d9385afe331983c1c85fde82ce6ee816051d95dde9ef90658b8f0a8a0a21754e72ff724bf41f6b96c046b7b4c2660f7095b
SHA512 (libreoffice-multiliblauncher.sh) = db532afdf5000bc66f9e02c7d0ab586468466f63f8f0bdb204832581e8277c5c59f688fa096548d642411cb8c46e8de4a744676b4e624c075262cfd6945138cd SHA512 (libreoffice-multiliblauncher.sh) = db532afdf5000bc66f9e02c7d0ab586468466f63f8f0bdb204832581e8277c5c59f688fa096548d642411cb8c46e8de4a744676b4e624c075262cfd6945138cd
SHA512 (dtoa-20180411.tgz) = 722aa814c33a34bfffe6c0201b0035cc3b65854a0ba9ae2f51620a89d68019353e2c306651b35bca337186b22b2e9865ef3c5e3df8e9328006f882e4577f8c85 SHA512 (dtoa-20180411.tgz) = 722aa814c33a34bfffe6c0201b0035cc3b65854a0ba9ae2f51620a89d68019353e2c306651b35bca337186b22b2e9865ef3c5e3df8e9328006f882e4577f8c85
SHA512 (libreoffice-7.3.0.3.tar.xz) = 408b98184afc0721f922768f60e877fd756b656b4fd30cf6ad629bd32ba323fb1f4b052c8427b11395253b4ed67f9a1fd20ef3f7fd5945abc0f8cfb1f40c5d47
SHA512 (libreoffice-7.3.0.3.tar.xz.asc) = 894ed8f6153fd70194f6f299b5f8406ea1245a54930ec154c6e04763eb2aec7fa41bfd23b0d378df68391659b436f1225fc00ddfcc3719c456d47516fffe2716
SHA512 (libreoffice-help-7.3.0.3.tar.xz) = 6d6fb4968ce7b40291c9426183d2d031761e5d3421d66adda0b0e1cf57c1aeb68252cec561119935c68b6239add8ba7ee686ce6365ce84cc2ce4f85346fe2aec
SHA512 (libreoffice-help-7.3.0.3.tar.xz.asc) = a4b0d295cacde6eb57dffd35ffbbb462c4e0e9ef4459f59f8585cfd7a1d8b56a3cadbc40f1709351e0d1a7143e03ad908c8a6ef7c26a8c768584a04e0efa86be
SHA512 (libreoffice-translations-7.3.0.3.tar.xz) = 0a7b28ec242159dc6d4fc9c58a966b005dc7b29b6e43e6debf79bd3ab124931f1f9ab203a57f62cfbde6f0a4be43efa62d8b32eb43f317b2b743129f8deaecfb
SHA512 (libreoffice-translations-7.3.0.3.tar.xz.asc) = 7743eb40163dd561c3dfee7b07fdebd710310a50832529122e8ba13afa310e787b5bac70533a4ad82a7c26c7e40244f82d690080b41cc444eb58020e9d747748
SHA512 (libcuckoo-93217f8d391718380c508a722ab9acd5e9081233.tar.gz) = 4159dfb4d08e359feb23127e12db590260913e70774161ac9513abb5183ad6ed6d2bdfbe56fc8aa68e2fc57ee29eae67aa0180e1a7d955016884ecba2ca60ff8 SHA512 (libcuckoo-93217f8d391718380c508a722ab9acd5e9081233.tar.gz) = 4159dfb4d08e359feb23127e12db590260913e70774161ac9513abb5183ad6ed6d2bdfbe56fc8aa68e2fc57ee29eae67aa0180e1a7d955016884ecba2ca60ff8
SHA512 (libreoffice-7.3.1.3.tar.xz) = d0daaee058e2cd7f1af02101b68d33c3df50b3eaae951b40c557c4e74c6f0929162fec0759fa4688cd7da41a5fa7ab4dbf867f31cad428487da2393dcb40a3d8
SHA512 (libreoffice-7.3.1.3.tar.xz.asc) = ecc7b6e440ad277092ad2967fa1dc1eceed71bcbd175156c640fbb596f651f91f0c08b20288ed6bce0563857e05b265279a3903930e0e2ad12c83e6f7ab38dec
SHA512 (libreoffice-help-7.3.1.3.tar.xz) = cb41afc6b4c35a97a62d4263395210b3309c8a68822cecfc245217d9f93697a0bd9043801622923ed81a14d346161d56f6443ccb6e082d3ba8ddcf737653da0f
SHA512 (libreoffice-help-7.3.1.3.tar.xz.asc) = 5ce16fc3bf1249af33180822ace70ec299b65d65217b76545d3e5e22071d978578ff72fe1574418164a761fac624b5477e7776bd5885768d89a23dce525175a5
SHA512 (libreoffice-translations-7.3.1.3.tar.xz) = 2760ff338c31ca2c763c7b72e0a031ee7ac0d0d45f0a2bc9f05d431eed62f6a08bd45b66a05f0f13d32d046e45f564cc392c0f6b05194ae92eee669ca8679ea8
SHA512 (libreoffice-translations-7.3.1.3.tar.xz.asc) = e5cb12e107bbec06eb09744220fcdeace0991a923c9d567108781ddb4086c6d5ecebb1700420bda4dab3f278606cdcd98b898501b984f61dd38eaa62884343a7

Loading…
Cancel
Save