solenv/gdb/libreoffice/sw.py | 6 +++++- vcl/source/treelist/treelistbox.cxx | 13 ++++++++++++- 2 files changed, 17 insertions(+), 2 deletions(-)
New commits: commit abfc1cf60def840204bcd7682665dd71e80baeff Author: Michael Stahl <[email protected]> AuthorDate: Thu Dec 2 11:57:40 2021 +0100 Commit: Michael Stahl <[email protected]> CommitDate: Fri Dec 3 16:55:27 2021 +0100 gdb: BigPtrArrayPrinter gets confused by libstdc++ std::unique_ptr It looks like this in libstdc++: <BigPtrArray> = { m_ppInf = { _M_t = { <std::__uniq_ptr_impl<BlockInfo*, std::default_delete<BlockInfo* []> >> = { _M_t = { <std::_Tuple_impl<0, BlockInfo**, std::default_delete<BlockInfo* []> >> = { <std::_Tuple_impl<1, std::default_delete<BlockInfo* []> >> = { <std::_Head_base<1, std::default_delete<BlockInfo* []>, true>> = { _M_head_impl = {<No data fields>} }, <No data fields>}, <std::_Head_base<0, BlockInfo**, false>> = { _M_head_impl = 0x567fd20 }, <No data fields>}, <No data fields>} }, <No data fields>} }, Note there are 2 _M_head_impl members, and somehow gdb 11.1-2.fc34 picks the wrong one. A manual cast to std::_Head_base<0, BlockInfo**, false> seems to help. Change-Id: I1332c2fc6eb2661d417fd92a73aed977bbb1dcea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126220 Tested-by: Jenkins Reviewed-by: Michael Stahl <[email protected]> (cherry picked from commit c9267ca4fa7fa94a1bf79320bec54428a6ad4804) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126288 diff --git a/solenv/gdb/libreoffice/sw.py b/solenv/gdb/libreoffice/sw.py index e170709fb79c..7a5ce193684b 100644 --- a/solenv/gdb/libreoffice/sw.py +++ b/solenv/gdb/libreoffice/sw.py @@ -8,6 +8,7 @@ # import six +import gdb from libreoffice.util import printing class SwPositionPrinter(object): @@ -194,7 +195,10 @@ class BigPtrArrayPrinter(object): class _iterator(six.Iterator): def __init__(self, array): - self.blocks = array['m_ppInf']['_M_t']['_M_t']['_M_head_impl'] + # libstdc++ unique_ptr is a std::tuple which contains multiple + # _M_head_impl members and gdb may pick the wrong one by default + # so have to manually cast it to the one that contains the array + self.blocks = array['m_ppInf']['_M_t']['_M_t'].cast(gdb.lookup_type("std::_Head_base<0, BlockInfo**, false>"))['_M_head_impl'] self.count = array['m_nSize'] self.pos = 0 self.block_count = array['m_nBlock'] commit d6b003da6d77471e5e17a9cb6a25172d6f52da2a Author: Caolán McNamara <[email protected]> AuthorDate: Fri Dec 3 12:12:12 2021 +0000 Commit: Caolán McNamara <[email protected]> CommitDate: Fri Dec 3 16:55:12 2021 +0100 tdf#145604 indicate the row as the target when dropping in a visual tree and indicate between rows when dropping in a visual list, which is what we are doing for the gtk version. a visual list case is tools, customize, menu and drag and drop the assigned commands around. a visual tree case is tools, macros, organize dialogs, use libraries to create two libraries, and move to dialog and create a dialog in one library, and drop it onto the other library to move it between libraries. Change-Id: Ia8dc944c1f411b1f072ad1c8dcc755a1e44e3b05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126291 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 58a1a006d72e..f8cfaaf6a311 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -2741,7 +2741,18 @@ void SvTreeListBox::PaintEntry1(SvTreeListEntry& rEntry, tools::Long nLine, vcl: rRenderContext.Push(); rRenderContext.SetLineColor(rSettings.GetDeactiveColor()); rRenderContext.SetFillColor(rSettings.GetDeactiveColor()); - rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine), Size(nWidth, 2))); + + const bool bAsTree = GetStyle() & (WB_HASLINES | WB_HASLINESATROOT); + if (bAsTree) + { + rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine + nTempEntryHeight - 2), Size(nWidth, 2))); + rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine), Size(nWidth, 2))); + } + else + { + rRenderContext.DrawRect(tools::Rectangle(Point(0, nLine), Size(nWidth, 2))); + } + rRenderContext.Pop(); }
