[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - 6 commits - chart2/source emfio/source i18npool/source sc/source svl/source tools/qa tools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Aug 23 07:16:56 UTC 2018
chart2/source/view/main/Clipping.cxx | 15 ++++++++++++++-
emfio/source/reader/mtftools.cxx | 2 +-
i18npool/source/localedata/data/es_VE.xml | 9 ++++++++-
sc/source/core/tool/token.cxx | 13 +++++--------
svl/source/numbers/zforscan.cxx | 11 +++++++++--
tools/qa/cppunit/test_urlobj.cxx | 30 ------------------------------
tools/source/fsys/urlobj.cxx | 9 ---------
7 files changed, 37 insertions(+), 52 deletions(-)
New commits:
commit 69f6d82c51b1c33c5a5eceafb254b000dc410530
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Fri Aug 17 12:22:09 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 23 09:16:22 2018 +0200
Resolves: tdf#118983 do not expand range if sheet references not affected
Change-Id: Ib207d3723ce1d370a953e652957aaed399affc9c
Reviewed-on: https://gerrit.libreoffice.org/59255
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit da0dc858fc05e7f1d6a60ca61f722044e688d4f8)
Reviewed-on: https://gerrit.libreoffice.org/59272
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 211e4a9e03ef5f1c7c26617859435285d2699339)
diff --git a/sc/source/core/tool/token.cxx b/sc/source/core/tool/token.cxx
index 8103731db85f..679fa1ef0ee7 100644
--- a/sc/source/core/tool/token.cxx
+++ b/sc/source/core/tool/token.cxx
@@ -3917,6 +3917,11 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName(
{
ScComplexRefData& rRef = *p->GetDoubleRef();
ScRange aAbs = rRef.toAbs(rPos);
+
+ if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab())
+ // Sheet references not affected.
+ break;
+
if (rCxt.maRange.In(aAbs))
{
// This range is entirely within the shifted region.
@@ -3939,10 +3944,6 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName(
// column range of the reference is not entirely in the deleted column range.
break;
- if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab())
- // wrong tables
- break;
-
ScRange aDeleted = rCxt.maRange;
aDeleted.aStart.IncRow(rCxt.mnRowDelta);
aDeleted.aEnd.SetRow(aDeleted.aStart.Row()-rCxt.mnRowDelta-1);
@@ -3999,10 +4000,6 @@ sc::RefUpdateResult ScTokenArray::AdjustReferenceInName(
// row range of the reference is not entirely in the deleted row range.
break;
- if (aAbs.aStart.Tab() > rCxt.maRange.aEnd.Tab() || aAbs.aEnd.Tab() < rCxt.maRange.aStart.Tab())
- // wrong tables
- break;
-
ScRange aDeleted = rCxt.maRange;
aDeleted.aStart.IncCol(rCxt.mnColDelta);
aDeleted.aEnd.SetCol(aDeleted.aStart.Col()-rCxt.mnColDelta-1);
commit 759a3ad2cbe4a7feb86eddae0204ae1d03ac89f2
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Thu Aug 16 18:00:29 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 23 09:16:21 2018 +0200
Do not convert YMD date order to YDM and vice versa, tdf#107012 follow-up
Change-Id: I6362caae4dd0764a5f99f1b0453c17ecde4b53f1
Reviewed-on: https://gerrit.libreoffice.org/59213
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit a4c9e4539ee82c409add42e68329d4eb1100d62f)
Reviewed-on: https://gerrit.libreoffice.org/59244
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 16ee6373bab9056650cf3b7a153e832d8d09fc28)
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 0b2fe7ecca28..2e9b7e3d2b57 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -2987,7 +2987,11 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
switch (pLoc->getDateOrder())
{
case DateOrder::MDY:
- if (IsDateFragment( nDayPos, nMonthPos))
+ // Convert only if the actual format is not of YDM
+ // order (which would be a completely unusual order
+ // anyway, but..), e.g. YYYY.DD.MM not to
+ // YYYY/MM/DD
+ if (IsDateFragment( nDayPos, nMonthPos) && !IsDateFragment( nYearPos, nDayPos))
SwapArrayElements( nDayPos, nMonthPos);
break;
case DateOrder::YMD:
@@ -3010,7 +3014,10 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
switch (pLoc->getDateOrder())
{
case DateOrder::DMY:
- if (IsDateFragment( nMonthPos, nDayPos))
+ // Convert only if the actual format is not of YMD
+ // order, e.g. YYYY/MM/DD not to YYYY.DD.MM
+ /* TODO: convert such to DD.MM.YYYY instead? */
+ if (IsDateFragment( nMonthPos, nDayPos) && !IsDateFragment( nYearPos, nMonthPos))
SwapArrayElements( nMonthPos, nDayPos);
break;
case DateOrder::YMD:
commit b047bc2fa3a93f70c7bc4f1737a3c5fbdad3ad71
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Tue Aug 21 15:54:02 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 23 09:16:21 2018 +0200
Resolves: rhbz#115937 virtual device leak
windows runs out much sooner than the other platforms
Change-Id: I8ffbe32babf8854580150edfe741b03fd43e4326
Reviewed-on: https://gerrit.libreoffice.org/59408
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 1e918814aa4aa6d88c5426e9b28b1aea385d9a57)
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index fa62c205524e..3b922636b550 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1616,7 +1616,7 @@ namespace emfio
BitmapEx aBmpEx( rBitmap );
if ( mbComplexClip )
{
- VclPtrInstance< VirtualDevice > pVDev;
+ ScopedVclPtrInstance< VirtualDevice > pVDev;
MapMode aMapMode( MapUnit::Map100thMM );
aMapMode.SetOrigin( Point( -rPos.X(), -rPos.Y() ) );
const Size aOutputSizePixel( pVDev->LogicToPixel( rSize, aMapMode ) );
commit efd83d43d5a41840866e3208de0cc48b044a2fa7
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Tue Aug 21 16:23:17 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 23 09:12:26 2018 +0200
tdf#119326 crash when adding "Windows Share" File resource
this was a regression from
commit ce43d0ae9279edbf1ad108fe0d8325327a038d49
use consistent #define checks for the Windows platform
where I converted
#ifdef WIN
to
#ifdef _WIN32
But that was already dead code at that point since we did not define
that preprocessor constant anywhere.
Change-Id: Ieadafd61fada05fc19d04d83992fba7c42969daa
Reviewed-on: https://gerrit.libreoffice.org/59402
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
(cherry picked from commit 82034b04e81b74a048595b0eac0f73581ecbc9e4)
Reviewed-on: https://gerrit.libreoffice.org/59415
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 49e522f3d6c6045710ecb2d233a07880ac9c6c7d)
diff --git a/tools/qa/cppunit/test_urlobj.cxx b/tools/qa/cppunit/test_urlobj.cxx
index 71554d2d8a41..81f3f78d2315 100644
--- a/tools/qa/cppunit/test_urlobj.cxx
+++ b/tools/qa/cppunit/test_urlobj.cxx
@@ -54,11 +54,6 @@ namespace tools_urlobj
aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
#endif
-#ifdef _WIN32
- CPPUNIT_ASSERT_EQUAL( OUString("file://10.10.1.1/sampledir/sample.file"),
- aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol( ) );
-#endif
CPPUNIT_ASSERT_EQUAL(OUString("10.10.1.1"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(OUString("/sampledir/sample.file"),
@@ -80,11 +75,6 @@ namespace tools_urlobj
aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
#endif
-#ifdef _WIN32
- CPPUNIT_ASSERT_EQUAL( OUString("file://137.65.170.24/c$/Img0001.jpg"),
- aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol( ) );
-#endif
CPPUNIT_ASSERT_EQUAL(OUString("137.65.170.24"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(OUString("/c$/Img0001.jpg"),
@@ -106,11 +96,6 @@ namespace tools_urlobj
aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
#endif
-#ifdef _WIN32
- CPPUNIT_ASSERT_EQUAL( OUString("file://hive-winxp-x86/pmladek/test2.odt"),
- aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol( ) );
-#endif
CPPUNIT_ASSERT_EQUAL(OUString("hive-winxp-x86"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(OUString("/pmladek/test2.odt"),
@@ -125,11 +110,6 @@ namespace tools_urlobj
aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL( INetProtocol::Smb, aUrl.GetProtocol( ) );
#endif
-#ifdef _WIN32
- CPPUNIT_ASSERT_EQUAL( OUString("file://10.10.1.1/sampledir/sample.file"),
- aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol( ) );
-#endif
CPPUNIT_ASSERT_EQUAL(OUString("10.10.1.1"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(OUString("/sampledir/sample.file"),
@@ -149,11 +129,6 @@ namespace tools_urlobj
aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
#endif
-#ifdef _WIN32
- CPPUNIT_ASSERT_EQUAL( OUString("file://137.65.170.24/c$/Img0001.jpg"),
- aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol( ) );
-#endif
CPPUNIT_ASSERT_EQUAL(OUString("137.65.170.24"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(OUString("/c$/Img0001.jpg"),
@@ -174,11 +149,6 @@ namespace tools_urlobj
aUrl.GetMainURL(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(INetProtocol::Smb, aUrl.GetProtocol());
#endif
-#ifdef _WIN32
- CPPUNIT_ASSERT_EQUAL( OUString("file://hive-winxp-x86/pmladek/test2.odt"),
- aUrl.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
- CPPUNIT_ASSERT_EQUAL( INetProtocol::File, aUrl.GetProtocol( ) );
-#endif
CPPUNIT_ASSERT_EQUAL(OUString("hive-winxp-x86"),
aUrl.GetHost(INetURLObject::DecodeMechanism::NONE));
CPPUNIT_ASSERT_EQUAL(OUString("/pmladek/test2.odt"),
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index eee91285258e..73708132ada1 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -1454,15 +1454,6 @@ bool INetURLObject::setAbsURIRef(OUString const & rTheAbsURIRef,
}
#endif
-#ifdef _WIN32
- if (m_eScheme==INetProtocol::Smb) {
- // Change "smb://server/path" URIs to "file://server/path"
- // URIs on Windows, since Windows doesn't understand the
- // SMB scheme.
- changeScheme(INetProtocol::File);
- }
-#endif
-
return true;
}
commit 0d618f2a3a0ee9ef3c43037cc9647bb4382d9aa3
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Wed Aug 22 20:41:21 2018 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 23 09:10:57 2018 +0200
Resolves: tdf#119399 add es-VE currency Bolivar Soberano VES Bs.S.
Introduced on 2018-08-20
Change-Id: I1b10a0f3b2ff8037310e7cba9caceaacb0858463
Reviewed-on: https://gerrit.libreoffice.org/59462
Reviewed-by: Eike Rathke <erack at redhat.com>
Tested-by: Jenkins
(cherry picked from commit 0e9bdde3c07500abb13c72d2f6bec07aae6848da)
Reviewed-on: https://gerrit.libreoffice.org/59468
Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
(cherry picked from commit 65445886327c6f49e6d4f5ece620e918cdf8d88e)
diff --git a/i18npool/source/localedata/data/es_VE.xml b/i18npool/source/localedata/data/es_VE.xml
index 8ec69d958d76..31301d53c87e 100644
--- a/i18npool/source/localedata/data/es_VE.xml
+++ b/i18npool/source/localedata/data/es_VE.xml
@@ -42,13 +42,20 @@
<CurrencyName>Bolivar</CurrencyName>
<DecimalPlaces>2</DecimalPlaces>
</Currency>
- <Currency default="true" usedInCompatibleFormatCodes="false">
+ <Currency default="false" usedInCompatibleFormatCodes="false">
<CurrencyID>VEF</CurrencyID>
<CurrencySymbol>BsF</CurrencySymbol>
<BankSymbol>VEF</BankSymbol>
<CurrencyName>Bolivar Fuerte</CurrencyName>
<DecimalPlaces>2</DecimalPlaces>
</Currency>
+ <Currency default="true" usedInCompatibleFormatCodes="false">
+ <CurrencyID>VES</CurrencyID>
+ <CurrencySymbol>Bs.S.</CurrencySymbol>
+ <BankSymbol>VES</BankSymbol>
+ <CurrencyName>Bolivar Soberano</CurrencyName>
+ <DecimalPlaces>2</DecimalPlaces>
+ </Currency>
</LC_CURRENCY>
<LC_TRANSLITERATION ref="en_US"/>
<LC_MISC ref="es_ES"/>
commit bb3eef71add4c8e9827c56fe2fe9543897f61efa
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 22 17:08:23 2018 +0100
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Thu Aug 23 09:10:34 2018 +0200
Resolves: tdf#98558 oom under windows with certain charts
keep the performance fix of i#66963 but clip it to a value
larger than appears in that document, but massively smaller
than what is necessary for this document
Change-Id: I162c03a13ce11e348db8168fed212dfea216c7a4
Reviewed-on: https://gerrit.libreoffice.org/59463
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Jenkins
(cherry picked from commit b707def5e9696c429cfb1dbe8479d5b63046e800)
diff --git a/chart2/source/view/main/Clipping.cxx b/chart2/source/view/main/Clipping.cxx
index 7892815f322b..354871612233 100644
--- a/chart2/source/view/main/Clipping.cxx
+++ b/chart2/source/view/main/Clipping.cxx
@@ -140,6 +140,19 @@ bool lcl_clip2d_(drawing::Position3D& rPoint0, drawing::Position3D& rPoint1, con
return bRet;
}
+unsigned int round_up_nearest_pow2(unsigned int v)
+{
+ // compute the next highest power of 2 of 32-bit v
+ --v;
+ v |= v >> 1;
+ v |= v >> 2;
+ v |= v >> 4;
+ v |= v >> 8;
+ v |= v >> 16;
+ ++v;
+ return v;
+}
+
void lcl_addPointToPoly( drawing::PolyPolygonShape3D& rPoly
, const drawing::Position3D& rPos
, sal_Int32 nPolygonIndex
@@ -170,7 +183,7 @@ void lcl_addPointToPoly( drawing::PolyPolygonShape3D& rPoly
if( nSeqLength <= nNewResultPointCount )
{
- sal_Int32 nReallocLength = nReservePointCount;
+ sal_Int32 nReallocLength = nReservePointCount > SAL_MAX_INT16 ? round_up_nearest_pow2(nNewResultPointCount) * 2 : nReservePointCount;
if( nNewResultPointCount > nReallocLength )
{
nReallocLength = nNewResultPointCount;
More information about the Libreoffice-commits
mailing list