[Libreoffice-commits] core.git: Branch 'libreoffice-5-2' - 3 commits - external/mdds sw/source
Caolán McNamara
caolanm at redhat.com
Fri Jun 17 15:45:20 UTC 2016
external/mdds/UnpackedTarball_mdds.mk | 1 +
external/mdds/tdf90579.patch.0 | 23 +++++++++++++++++++++++
sw/source/core/access/acctable.cxx | 14 ++++++++------
sw/source/core/layout/tabfrm.cxx | 7 +++++--
sw/source/core/layout/wsfrm.cxx | 2 +-
5 files changed, 38 insertions(+), 9 deletions(-)
New commits:
commit 6114072a59cfff36218aea70e1b52fa4c3ba64b4
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 14:37:17 2016 +0100
Resolves: tdf#90579 swap_single_to_multi_blocks seems broken
when there is associated data in the src. Its copies those pointers
into the block that will appear in the destination. Then can destroy
the source block, which deletes the contents of those pointers, and
then inserts the new block which has dangling pointers to the deleted
data.
https://gitlab.com/mdds/mdds/merge_requests/2
Change-Id: Id9614d95652c8032b03cb5748a284917043d8d21
(cherry picked from commit 9ec54e92407cd632c4e38317f914edd557835a86)
diff --git a/external/mdds/UnpackedTarball_mdds.mk b/external/mdds/UnpackedTarball_mdds.mk
index c015f4c..bd57593 100644
--- a/external/mdds/UnpackedTarball_mdds.mk
+++ b/external/mdds/UnpackedTarball_mdds.mk
@@ -14,6 +14,7 @@ $(eval $(call gb_UnpackedTarball_set_tarball,mdds,$(MDDS_TARBALL)))
$(eval $(call gb_UnpackedTarball_set_patchlevel,mdds,0))
$(eval $(call gb_UnpackedTarball_add_patches,mdds,\
+ external/mdds/tdf90579.patch.0 \
))
# vim: set noet sw=4 ts=4:
diff --git a/external/mdds/tdf90579.patch.0 b/external/mdds/tdf90579.patch.0
new file mode 100644
index 0000000..5ef1bc7
--- /dev/null
+++ b/external/mdds/tdf90579.patch.0
@@ -0,0 +1,23 @@
+diff --git a/include/mdds/multi_type_vector_def.inl b/include/mdds/multi_type_vector_def.inl
+index 0e2a15a..fe9c767 100644
+--- include/mdds/multi_type_vector_def.inl
++++ include/mdds/multi_type_vector_def.inl
+@@ -2306,6 +2306,9 @@ void multi_type_vector<_CellBlockFunc, _EventFunc>::swap_single_to_multi_blocks(
+ {
+ // Source range is at the top of a block.
+
++ // Shrink the current block by erasing the top part.
++ element_block_func::erase(*blk_src->mp_data, 0, len);
++
+ if (src_tail_len == 0)
+ {
+ // the whole block needs to be replaced.
+@@ -2314,8 +2317,6 @@ void multi_type_vector<_CellBlockFunc, _EventFunc>::swap_single_to_multi_blocks(
+ }
+ else
+ {
+- // Shrink the current block by erasing the top part.
+- element_block_func::erase(*blk_src->mp_data, 0, len);
+ blk_src->m_size -= len;
+ }
+
commit ff7028465c5c5cd30a9bb28ac6aa610e67c4e843
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 10:10:33 2016 +0100
Resolves: tdf#100421, don't crash on deleting particular table
Change-Id: I52a4cf0732240aa26147313ae6a52c4fd8d8933c
(cherry picked from commit 4561119a8bab986df25a5ce2a544aa96394cbd5d)
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 002b653..422d64e 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -4326,8 +4326,10 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
//Only shrink as much as the content of the biggest cell allows.
SwTwips nRealDist = nDist;
+ SwFormat* pMod = GetFormat();
+ if (pMod)
{
- const SwFormatFrameSize &rSz = GetFormat()->GetFrameSize();
+ const SwFormatFrameSize &rSz = pMod->GetFrameSize();
SwTwips nMinHeight = rSz.GetHeightSizeType() == ATT_MIN_SIZE ?
rSz.GetHeight() :
0;
@@ -4361,7 +4363,8 @@ SwTwips SwRowFrame::ShrinkFrame( SwTwips nDist, bool bTst, bool bInfo )
Frame().Pos().X() += nReal;
}
- SwTwips nTmp = GetUpper()->Shrink( nReal, bTst );
+ SwLayoutFrame* pFrame = GetUpper();
+ SwTwips nTmp = pFrame ? pFrame->Shrink(nReal, bTst) : 0;
if ( !bShrinkAnyway && !GetNext() && nTmp != nReal )
{
//The last one gets the leftover in the upper and therefore takes
diff --git a/sw/source/core/layout/wsfrm.cxx b/sw/source/core/layout/wsfrm.cxx
index 1635463..9451c0a 100644
--- a/sw/source/core/layout/wsfrm.cxx
+++ b/sw/source/core/layout/wsfrm.cxx
@@ -1216,7 +1216,7 @@ SwTwips SwFrame::Shrink( SwTwips nDist, bool bTst, bool bInfo )
const SwTabFrame* pTab = FindTabFrame();
// NEW TABLES
- if ( pTab->IsVertical() != IsVertical() ||
+ if ( (pTab && pTab->IsVertical() != IsVertical()) ||
pThisCell->GetLayoutRowSpan() < 1 )
return 0;
}
commit f054ba24056dba34576bc43a86abb0b828917585
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jun 17 09:44:26 2016 +0100
Related: tdf#100421 crash in a11y on load of source odt
stldebug assert because end is before start and we can'g
get to start from end in a std::set
(cherry picked from commit e41a694c8b4fd1503b31f3a9da326e9f7ddd1b79)
Change-Id: I0471220d3940e08b564f88841703a539aaf369d6
diff --git a/sw/source/core/access/acctable.cxx b/sw/source/core/access/acctable.cxx
index c626b09..0831419 100644
--- a/sw/source/core/access/acctable.cxx
+++ b/sw/source/core/access/acctable.cxx
@@ -556,16 +556,18 @@ void SwAccessibleTableData_Impl::GetRowColumnAndExtent(
Int32Set_Impl::const_iterator aEnd(
maRows.upper_bound( rBox.Bottom() - maTabFramePos.Y() ) );
rRow =
- static_cast< sal_Int32 >( ::std::distance( maRows.begin(), aStt ) );
- rRowExtent =
- static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
+ static_cast< sal_Int32 >( std::distance( maRows.begin(), aStt ) );
+ sal_Int32 nRowEnd =
+ static_cast< sal_Int32 >( std::distance( maRows.begin(), aEnd ) );
+ rRowExtent = nRowEnd - rRow;
aStt = maColumns.lower_bound( rBox.Left() - maTabFramePos.X() );
aEnd = maColumns.upper_bound( rBox.Right() - maTabFramePos.X() );
rColumn =
- static_cast< sal_Int32 >( ::std::distance( maColumns.begin(), aStt ) );
- rColumnExtent =
- static_cast< sal_Int32 >( ::std::distance( aStt, aEnd ) );
+ static_cast< sal_Int32 >( std::distance( maColumns.begin(), aStt ) );
+ sal_Int32 nColumnEnd =
+ static_cast< sal_Int32 >( std::distance( maColumns.begin(), aEnd ) );
+ rColumnExtent = nColumnEnd - rColumn;
}
class SwAccSingleTableSelHander_Impl : public SwAccTableSelHander_Impl
More information about the Libreoffice-commits
mailing list