[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - 8 commits - sc/source solenv/gdb svl/source sw/source vcl/source
Michael Meeks
michael.meeks at collabora.com
Fri Oct 20 09:34:29 UTC 2017
sc/source/core/tool/interpr1.cxx | 8 ++++--
sc/source/core/tool/scmatrix.cxx | 8 ++++++
sc/source/filter/oox/sheetdatabuffer.cxx | 19 ++++++++-------
sc/source/filter/xml/xmlcelli.cxx | 7 ++++-
sc/source/ui/app/inputhdl.cxx | 2 -
solenv/gdb/libreoffice/sal.py | 4 +--
solenv/gdb/libreoffice/util/string.py | 6 ++--
svl/source/numbers/zforscan.cxx | 38 +++++++++++++------------------
sw/source/filter/ww8/ww8par.hxx | 7 ++---
sw/source/filter/ww8/ww8par2.cxx | 24 +++++++++++--------
vcl/source/opengl/OpenGLContext.cxx | 1
11 files changed, 71 insertions(+), 53 deletions(-)
New commits:
commit 31426d61ef42df7f58610490656e4b36bad91778
Author: Michael Meeks <michael.meeks at collabora.com>
Date: Wed Oct 18 15:24:44 2017 +0100
tdf#113225 - reset framebuffer count when resetting OpenGLContext
Otherwise we can fail to allocate a new one when we need it post reset.
http://crashreport.libreoffice.org/stats/crash_details/e4f26191-15d5-441a-868f-9ada21ef4424
Change-Id: Icc5ec6c51338e18a0a1bc890f56670e8fe9c73ea
Reviewed-on: https://gerrit.libreoffice.org/43508
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
(cherry picked from commit 856d734ee1665b6aa7304847c3a923af09066016)
Reviewed-on: https://gerrit.libreoffice.org/43551
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 5396ddfb01539424c3aef02bbdea3c5c3152a4ce)
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index fc12d88617ff..57216f9827a2 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -422,6 +422,7 @@ void OpenGLContext::reset()
delete pFramebuffer;
pFramebuffer = pPrevFramebuffer;
}
+ mnFramebufferCount = 0;
mpFirstFramebuffer = nullptr;
mpLastFramebuffer = nullptr;
}
commit 857821d6e44390d96b91ac9c72cbea2ca11f5cda
Author: Eike Rathke <erack at redhat.com>
Date: Mon Oct 16 22:08:27 2017 +0200
Resolves: tdf#112933 correct number of one decimal in fraction of seconds
Regression from
commit 0ac1e2ad19d4fdb46dcf54f67db2df081f4675bb
Date: Wed Aug 2 09:39:43 2017 +0100
Resolves: ofz#2833 null deref
and similar for date+time
commit 42b894f80a6d0c39bb0f7092eb204a15c22c4f38
Date: Sat Aug 5 19:15:36 2017 +0100
ofz#2867 null deref
Effectively revert the code changes of those, leaving the test
case files intact, and "do the right thing" (switching two lines,
to
nPos = nPos + sStrArray[i].getLength();
i++;
nPos actually had always to be incremented by the length of the
*current* string position but was used after only as an error
position indicator, meaningless if there was no error.
(cherry picked from commit 4f72d2ec6c210232e0abd4965e215611e807c125)
Conflicts:
svl/source/numbers/zforscan.cxx
Backported.
Change-Id: I9bc4e5e56d70a275d26df0b72ed6a19e9297e0fa
Reviewed-on: https://gerrit.libreoffice.org/43441
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 18d0268acce2fdd10a1186e1466768887f64623e)
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 4098fc9e85b3..73e2c1d62f98 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -2349,21 +2349,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
bDecSep = true;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
OUString& rStr = sStrArray[i];
+ nPos = nPos + sStrArray[i].getLength();
+ nCounter++;
i++;
- if (i < nAnzStrings)
+ while (i < nAnzStrings &&
+ sStrArray[i][0] == '0')
{
+ rStr += sStrArray[i];
nPos = nPos + sStrArray[i].getLength();
+ nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
+ nAnzResStrings--;
nCounter++;
- while (i < nAnzStrings &&
- sStrArray[i][0] == '0')
- {
- rStr += sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
- nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
- nAnzResStrings--;
- nCounter++;
- i++;
- }
+ i++;
}
}
else
@@ -2502,21 +2499,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
bDecSep = true;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
OUString& rStr = sStrArray[i];
+ nPos = nPos + sStrArray[i].getLength();
i++;
- if (i < nAnzStrings)
+ nCounter++;
+ while (i < nAnzStrings &&
+ sStrArray[i][0] == '0')
{
+ rStr += sStrArray[i];
nPos = nPos + sStrArray[i].getLength();
+ nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
+ nAnzResStrings--;
nCounter++;
- while (i < nAnzStrings &&
- sStrArray[i][0] == '0')
- {
- rStr += sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
- nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
- nAnzResStrings--;
- nCounter++;
- i++;
- }
+ i++;
}
}
else
commit 33142ead138e73bf65964e4b474079b0a77b0603
Author: Michael Stahl <mstahl at redhat.com>
Date: Fri Sep 29 16:53:35 2017 +0200
gdb pretty-printers: fix StringPrinterHelper for gdb 8.0
Latest gdb release "lazy_string" validates the array size:
Traceback (most recent call last):
File "/work/lo/master/solenv/gdb/libreoffice/util/string.py", line
29, in to_string
return self.make_string(data, self.encoding, len)
File "/work/lo/master/solenv/gdb/libreoffice/util/string.py", line
66, in make_string
return data.lazy_string(encoding, length)
gdb.error: Length is larger than array size.
rtl_uString has "sal_Unicode buffer[1];", which is a lie
as the real size is the same as "length".
Taking the address of "buffer" appears to avoid the exception.
Change-Id: I85710b1adfae584ba09c8d517e9b49b290e79d8a
(cherry picked from commit 205677c88cb01e2bbee278443867baed2c89e5fe)
Reviewed-on: https://gerrit.libreoffice.org/42942
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
(cherry picked from commit 6e97479c443fceaf37feb8a4c76f290dc43de670)
diff --git a/solenv/gdb/libreoffice/sal.py b/solenv/gdb/libreoffice/sal.py
index c2e8384537be..8dcfaebe66e1 100644
--- a/solenv/gdb/libreoffice/sal.py
+++ b/solenv/gdb/libreoffice/sal.py
@@ -21,7 +21,7 @@ class RtlStringPrinter(StringPrinterHelper):
super(RtlStringPrinter, self).__init__(typename, val, encoding)
def data(self):
- return self.val['buffer']
+ return self.val['buffer'].address
def length(self):
return self.val['length']
@@ -37,7 +37,7 @@ class StringPrinter(StringPrinterHelper):
def data(self):
assert self.val['pData']
- return self.val['pData'].dereference()['buffer']
+ return self.val['pData'].dereference()['buffer'].address
def length(self):
assert self.val['pData']
diff --git a/solenv/gdb/libreoffice/util/string.py b/solenv/gdb/libreoffice/util/string.py
index 32583718f83b..742aabbaca27 100644
--- a/solenv/gdb/libreoffice/util/string.py
+++ b/solenv/gdb/libreoffice/util/string.py
@@ -52,15 +52,15 @@ class StringPrinterHelper(object):
if not encoding:
encoding = ''
- if use_lazy_string:
- return data.lazy_string(encoding, length)
-
# we need to determine length, if not given (for sal_Unicode*)
if length < 0:
length = 0
while data[length] != 0 and length <= 512: # arbitrary limit
length += 1
+ if use_lazy_string:
+ return data.lazy_string(encoding, length)
+
# The gdb.Value.string() conversion works on array of bytes, but
# the length we have is the length of the string. So we must
# multiply it by width of character if the string is Unicode.
commit a8cfb28a30de33e7850d23c7dea59a08038cbfc9
Author: Eike Rathke <erack at redhat.com>
Date: Mon Oct 2 16:13:34 2017 +0200
Resolves: tdf#112780 no ResetDirty() after SetHybridEmptyDisplayedAsString()
Change-Id: Idea5c1bd8e8577eaf90fc47d39f88c79963c422b
(cherry picked from commit df778416981ab02d42182e5c2e46dc09ba2e2a3c)
Reviewed-on: https://gerrit.libreoffice.org/43048
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
Tested-by: Eike Rathke <erack at redhat.com>
(cherry picked from commit 8d9b236dcb3fd0f7028e4d19ede04589cf85d760)
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 3f894d112a3b..9724b46bf6cc 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -1012,8 +1012,13 @@ void ScXMLTableRowCellContext::SetFormulaCell(ScFormulaCell* pFCell) const
{
pFCell->SetHybridDouble(fValue);
if (mbPossibleEmptyDisplay && fValue == 0.0)
+ {
+ // Needs to be recalculated to propagate, otherwise would be
+ // propagated as empty string. So don't ResetDirty().
pFCell->SetHybridEmptyDisplayedAsString();
- pFCell->ResetDirty();
+ }
+ else
+ pFCell->ResetDirty();
}
}
}
commit 98e811528fa2ed87e0b1e2d8bf1fd66ac222702d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Mon Oct 2 09:24:19 2017 +0100
ofz#3527 ofz#3532 Invalid read of size 8
use numrule name to look up numrule instead of cached numrule pointer
in case it was deleted on failure to apply the numrule over an invalid range
Invalid read of size 8
at 0x1E875132: rtl::OUString::OUString(rtl::OUString const&) (ustring.hxx:143)
by 0x1EB33D93: SwWW8ImplReader::StartAnl(unsigned char const*) (ww8par2.cxx:1094)
by 0x1EB33003: SwWW8ImplReader::Read_ANLevelNo(unsigned short, unsigned char const*, short) (ww8par2.cxx:910)
by 0x1EBA375D: SwWW8ImplReader::ImportSprm(unsigned char const*, int, unsigned short) (ww8par6.cxx:6337)
by 0x1EAEEA24: SwWW8ImplReader::ReadTextAttr(int&, long, bool&) (ww8par.cxx:3810)
by 0x1EAEF15A: SwWW8ImplReader::ReadAttrs(int&, int&, long, bool&) (ww8par.cxx:3921)
by 0x1EAEF6E0: SwWW8ImplReader::ReadText(int, int, ManTypes) (ww8par.cxx:4003)
by 0x1EAF6DCE: SwWW8ImplReader::CoreLoad(WW8Glossary const*) (ww8par.cxx:5219)
Address 0x31831158 is 200 bytes inside a block of size 248 free'd
at 0x4C2F21A: operator delete(void*) (vg_replace_malloc.c:576)
by 0x253BC1B5: SwDoc::DelNumRule(rtl::OUString const&, bool) (docnum.cxx:1033)
by 0x25CB943D: SwFltControlStack::SetAttrInDoc(SwPosition const&, SwFltStackEntry&) (fltshell.cxx:609)
by 0x1EAE5011: SwWW8FltControlStack::SetAttrInDoc(SwPosition const&, SwFltStackEntry&) (ww8par.cxx:1445)
by 0x25CB8A9E: SwFltControlStack::SetAttr(SwPosition const&, unsigned short, bool, long, bool) (fltshell.cxx:457)
by 0x1EAE420E: SwWW8FltControlStack::SetAttr(SwPosition const&, unsigned short, bool, long, bool) (ww8par.cxx:1185)
by 0x1EAE5C12: SwWW8ImplReader::Read_Tab(unsigned short, unsigned char const*, short) (ww8par.cxx:1625)
by 0x1EBA35F0: SwWW8ImplReader::EndSprm(unsigned short) (ww8par6.cxx:6321)
by 0x1EAEEA44: SwWW8ImplReader::ReadTextAttr(int&, long, bool&) (ww8par.cxx:3813)
by 0x1EAEF15A: SwWW8ImplReader::ReadAttrs(int&, int&, long, bool&) (ww8par.cxx:3921)
by 0x1EAEF6E0: SwWW8ImplReader::ReadText(int, int, ManTypes) (ww8par.cxx:4003)
by 0x1EAF6DCE: SwWW8ImplReader::CoreLoad(WW8Glossary const*) (ww8par.cxx:5219)
Change-Id: Ia7ab67e42fc7a162d8089722e77841285f72a671
Reviewed-on: https://gerrit.libreoffice.org/43030
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit 8580472270972733cda7fa6ecf23db73359d30bb)
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 3de77f914409..3d72215dc157 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -972,11 +972,10 @@ struct ApoTestResults
struct ANLDRuleMap
{
- SwNumRule* mpOutlineNumRule; // WinWord 6 numbering, variant 1
- SwNumRule* mpNumberingNumRule; // WinWord 6 numbering, variant 2
- SwNumRule* GetNumRule(sal_uInt8 nNumType);
+ OUString msOutlineNumRule; // WinWord 6 numbering, variant 1
+ OUString msNumberingNumRule; // WinWord 6 numbering, variant 2
+ SwNumRule* GetNumRule(SwDoc& rDoc, sal_uInt8 nNumType);
void SetNumRule(SwNumRule*, sal_uInt8 nNumType);
- ANLDRuleMap() : mpOutlineNumRule(nullptr), mpNumberingNumRule(nullptr) {}
};
struct SprmReadInfo;
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 7a3f269bb1ab..659ce0b4c0cd 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -1020,17 +1020,21 @@ WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
return nRet;
}
-SwNumRule *ANLDRuleMap::GetNumRule(sal_uInt8 nNumType)
+SwNumRule *ANLDRuleMap::GetNumRule(SwDoc& rDoc, sal_uInt8 nNumType)
{
- return (WW8_Numbering == nNumType ? mpNumberingNumRule : mpOutlineNumRule);
+ const OUString& rNumRule = WW8_Numbering == nNumType ? msNumberingNumRule : msOutlineNumRule;
+ if (rNumRule.isEmpty())
+ return nullptr;
+ return rDoc.FindNumRulePtr(rNumRule);
}
void ANLDRuleMap::SetNumRule(SwNumRule *pRule, sal_uInt8 nNumType)
{
+ OUString sNumRule = pRule ? pRule->GetName() : OUString();
if (WW8_Numbering == nNumType)
- mpNumberingNumRule = pRule;
+ msNumberingNumRule = sNumRule;
else
- mpOutlineNumRule = pRule;
+ msOutlineNumRule = sNumRule;
}
// StartAnl is called at the beginning of a row area that contains
@@ -1044,7 +1048,7 @@ void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
return;
m_nWwNumType = nT;
- SwNumRule *pNumRule = m_aANLDRules.GetNumRule(m_nWwNumType);
+ SwNumRule *pNumRule = m_aANLDRules.GetNumRule(m_rDoc, m_nWwNumType);
// check for COL numbering:
const sal_uInt8* pS12 = nullptr;// sprmAnld
@@ -1112,7 +1116,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
if (!m_bAnl)
return;
- SwNumRule *pNumRule = m_aANLDRules.GetNumRule(m_nWwNumType);
+ SwNumRule *pNumRule = m_aANLDRules.GetNumRule(m_rDoc, m_nWwNumType);
// pNd->UpdateNum ohne Regelwerk gibt GPF spaetestens beim Speichern als
// sdw3
@@ -1121,7 +1125,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
if (*pSprm13 == 10 || *pSprm13 == 11)
{
m_nSwNumLevel = 0;
- if (!pNumRule->GetNumFormat(m_nSwNumLevel))
+ if (pNumRule && !pNumRule->GetNumFormat(m_nSwNumLevel))
{
// not defined yet
// sprmAnld o. 0
@@ -1133,7 +1137,7 @@ void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
{
m_nSwNumLevel = *pSprm13 - 1; // outline
// undefined
- if (!pNumRule->GetNumFormat(m_nSwNumLevel))
+ if (pNumRule && !pNumRule->GetNumFormat(m_nSwNumLevel))
{
if (m_pNumOlst) // there was a OLST
{
@@ -1186,7 +1190,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
else
m_pCtrlStck->SetAttr(*m_pPaM->GetPoint(), RES_FLTR_NUMRULE);
- m_aANLDRules.mpNumberingNumRule = nullptr;
+ m_aANLDRules.msNumberingNumRule.clear();
/*
#i18816#
my take on this problem is that moving either way from an outline to a
@@ -1196,7 +1200,7 @@ void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
(((m_nWwNumType == WW8_Outline) && (nNewType == WW8_Numbering)) ||
((m_nWwNumType == WW8_Numbering) && (nNewType == WW8_Outline)));
if (!bNumberingNotStopOutline)
- m_aANLDRules.mpOutlineNumRule = nullptr;
+ m_aANLDRules.msOutlineNumRule.clear();
m_nSwNumLevel = 0xff;
m_nWwNumType = WW8_None;
commit 73c3f33f995d108bd10e7009655edae2d77c1534
Author: Eike Rathke <erack at redhat.com>
Date: Sat Sep 30 20:31:34 2017 +0200
Resolves: tdf#100822 use sax::Converter::parseDateTime() for 'd' ISO 8601 date
Instead of squeezing the string through the locale dependent
number parser (which should force '.' Time100SecSeparator for 'T'
ISO 8601 but apparently doesn't yet) that is a bottle neck anyway.
Change-Id: I70f74e680322a715c9cc658c8be033620d9798e3
(cherry picked from commit 5374c04a89e1720490a3625dfd95406c2d60c0cd)
Reviewed-on: https://gerrit.libreoffice.org/42971
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit d4dad2989071eb5a21d608aa5c3782a68fddf571)
diff --git a/sc/source/filter/oox/sheetdatabuffer.cxx b/sc/source/filter/oox/sheetdatabuffer.cxx
index dbcc07d5db64..350f271c1be0 100644
--- a/sc/source/filter/oox/sheetdatabuffer.cxx
+++ b/sc/source/filter/oox/sheetdatabuffer.cxx
@@ -54,6 +54,7 @@
#include "documentimport.hxx"
#include "formulabuffer.hxx"
#include <numformat.hxx>
+#include <sax/tools/converter.hxx>
namespace oox {
namespace xls {
@@ -215,15 +216,17 @@ void SheetDataBuffer::setErrorCell( const CellModel& rModel, sal_uInt8 nErrorCod
void SheetDataBuffer::setDateCell( const CellModel& rModel, const OUString& rDateString )
{
- ScDocument& rDoc = getScDocument();
- SvNumberFormatter* pFormatter = rDoc.GetFormatTable();
-
- double fValue = 0.0;
- sal_uInt32 nFormatIndex = 0;
- bool bValid = pFormatter->IsNumberFormat( rDateString, nFormatIndex, fValue );
+ css::util::DateTime aDateTime;
+ if (!sax::Converter::parseDateTime( aDateTime, nullptr, rDateString))
+ {
+ SAL_WARN("sc.filter", "SheetDataBuffer::setDateCell - could not parse: " << rDateString);
+ // At least don't lose data.
+ setStringCell( rModel, rDateString);
+ return;
+ }
- if(bValid)
- setValueCell( rModel, fValue );
+ double fSerial = getUnitConverter().calcSerialFromDateTime( aDateTime);
+ setValueCell( rModel, fSerial);
}
void SheetDataBuffer::createSharedFormula(const ScAddress& rAddr, const ApiTokenSequence& rTokens)
commit 9b6320bb348ec3c0342c2c102cbcb34e62fe551f
Author: Eike Rathke <erack at redhat.com>
Date: Mon Sep 4 12:57:16 2017 +0200
Resolves: tdf#103734 propagate error from matrix to MIN()/MAX()
(cherry picked from commit 9e694c747954078442d47d3d7bd1d4db283b96ff)
Conflicts:
sc/source/core/tool/interpr1.cxx
Backported.
Change-Id: I1ebc5baf4957ef9e3d1477b803cf7fee02754360
Reviewed-on: https://gerrit.libreoffice.org/41886
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit 149f28e9a5d66db18ffb36547b2ba394c303fc4d)
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index 22ae9153e5c9..16a902e21171 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -3510,7 +3510,9 @@ void ScInterpreter::ScMin( bool bTextAsZero )
SetError(FormulaError::IllegalParameter);
}
}
- if ( nVal < nMin )
+ if (!rtl::math::isFinite(nVal))
+ PushError( GetDoubleErrorValue( nVal));
+ else if ( nVal < nMin )
PushDouble(0.0);
else
PushDouble(nMin);
@@ -3605,7 +3607,9 @@ void ScInterpreter::ScMax( bool bTextAsZero )
SetError(FormulaError::IllegalParameter);
}
}
- if ( nVal > nMax )
+ if (!rtl::math::isFinite(nVal))
+ PushError( GetDoubleErrorValue( nVal));
+ else if ( nVal > nMax )
PushDouble(0.0);
else
PushDouble(nMax);
diff --git a/sc/source/core/tool/scmatrix.cxx b/sc/source/core/tool/scmatrix.cxx
index 30fb6eb0b36f..ae64e61234af 100644
--- a/sc/source/core/tool/scmatrix.cxx
+++ b/sc/source/core/tool/scmatrix.cxx
@@ -1385,6 +1385,10 @@ struct MaxOp
static double init() { return -std::numeric_limits<double>::max(); }
static double compare(double left, double right)
{
+ if (!rtl::math::isFinite(left))
+ return left;
+ if (!rtl::math::isFinite(right))
+ return right;
return std::max(left, right);
}
@@ -1403,6 +1407,10 @@ struct MinOp
static double init() { return std::numeric_limits<double>::max(); }
static double compare(double left, double right)
{
+ if (!rtl::math::isFinite(left))
+ return left;
+ if (!rtl::math::isFinite(right))
+ return right;
return std::min(left, right);
}
commit 80c25a05f84b3949c2faf050f93f49d4088ec832
Author: Eike Rathke <erack at redhat.com>
Date: Wed Sep 27 18:58:07 2017 +0200
Resolves: tdf#112523 do not use anything Ascii in UI context
Change-Id: I0854f7b1e6e0bf51d8b4c7d846fad9b0ff25e763
(cherry picked from commit 86910087fa41956aad6a22943bfbeb158e205dcd)
Reviewed-on: https://gerrit.libreoffice.org/42872
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
(cherry picked from commit f38e9f1d194e23e455c69e9417185986daeccc39)
diff --git a/sc/source/ui/app/inputhdl.cxx b/sc/source/ui/app/inputhdl.cxx
index 5c2a6112025f..6efbf8ac55aa 100644
--- a/sc/source/ui/app/inputhdl.cxx
+++ b/sc/source/ui/app/inputhdl.cxx
@@ -1294,7 +1294,7 @@ namespace {
bool needToExtendSelection(const OUString& rSelectedText, const OUString& rInsertText)
{
- return !rInsertText.startsWithIgnoreAsciiCase(rSelectedText);
+ return !ScGlobal::GetpTransliteration()->isMatch( rSelectedText, rInsertText);
}
void completeFunction( EditView* pView, const OUString& rInsert, bool& rParInserted )
More information about the Libreoffice-commits
mailing list