[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - 2 commits - solenv/gdb svx/source
Michael Stahl
mstahl at redhat.com
Tue Oct 3 14:56:45 UTC 2017
solenv/gdb/libreoffice/sal.py | 4 ++--
solenv/gdb/libreoffice/util/string.py | 6 +++---
svx/source/sidebar/area/AreaPropertyPanelBase.cxx | 3 ++-
3 files changed, 7 insertions(+), 6 deletions(-)
New commits:
commit 9a28c3693a9aa9de507cc0cdd78ffe597c807de5
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/42943
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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 584d87162aceaabd0a80674f07c65eda7318db8a
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Sep 28 22:12:42 2017 +0200
tdf#112727: crash in chart (transparency related)
There's nothing to rearrange if mpFloatTransparenceItem isn't set
0 0x00007fffefb26748 in NameOrIndex::IsIndex() const (this=0x0) at /home/julien/lo/libreoffice/include/svx/xit.hxx:56
1 0x00007fffefb23140 in XFillGradientItem::GetGradientValue() const (this=0x0) at /home/julien/lo/libreoffice/svx/source/xoutdev/xattr.cxx:2009
2 0x00007ffff0b2c95a in svx::sidebar::AreaTransparencyGradientPopup::InitStatus(XFillFloatTransparenceItem const*) (this=0x55555859a520, pGradientItem=0x0)
at /home/julien/lo/libreoffice/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx:61
3 0x00007ffff0b2cd33 in svx::sidebar::AreaTransparencyGradientPopup::Rearrange(XFillFloatTransparenceItem const*) (this=0x55555859a520, pGradientItem=0x0)
at /home/julien/lo/libreoffice/svx/source/sidebar/area/AreaTransparencyGradientPopup.cxx:90
4 0x00007ffff0b262ae in svx::sidebar::AreaPropertyPanelBase::ClickTrGrHdl_Impl(ToolBox*) (this=0x555558485a50, pToolBox=0x5555586ed8c0)
at /home/julien/lo/libreoffice/svx/source/sidebar/area/AreaPropertyPanelBase.cxx:1272
5 0x00007ffff0b26207 in svx::sidebar::AreaPropertyPanelBase::LinkStubClickTrGrHdl_Impl(void*, ToolBox*) (instance=0x555558485a50, data=0x5555586ed8c0)
at /home/julien/lo/libreoffice/svx/source/sidebar/area/AreaPropertyPanelBase.cxx:1268
Change-Id: I1d2db6b91c888ca3598e0ea04dd0fa0e9fc790a7
Reviewed-on: https://gerrit.libreoffice.org/42925
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Tested-by: Julien Nabet <serval2412 at yahoo.fr>
(cherry picked from commit 1fba529cf2d810bfce1f3fbcad84b6f6805e1405)
Reviewed-on: https://gerrit.libreoffice.org/42950
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 90140dfdb894..71c79af95cda 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -1272,7 +1272,8 @@ IMPL_LINK( AreaPropertyPanelBase, ClickTrGrHdl_Impl, ToolBox*, pToolBox, void )
{
if (!mxTrGrPopup)
mxTrGrPopup = VclPtr<AreaTransparencyGradientPopup>::Create(*this);
- mxTrGrPopup->Rearrange(mpFloatTransparenceItem.get());
+ if (mpFloatTransparenceItem.get())
+ mxTrGrPopup->Rearrange(mpFloatTransparenceItem.get());
OSL_ASSERT( pToolBox->GetItemCommand(pToolBox->GetCurItemId()) == UNO_SIDEBARGRADIENT);
mxTrGrPopup->StartPopupMode(pToolBox, FloatWinPopupFlags::GrabFocus);
}
More information about the Libreoffice-commits
mailing list