sc/source/ui/view/cellsh3.cxx | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-)
New commits: commit cc497d86e092315f78a89f3ace8b81623dad7b46 Author: Henry Castro <hcas...@collabora.com> Date: Tue Aug 23 14:13:57 2016 -0400 sc lok: fix re-sizing several rows/columns at once Change-Id: I7b3760432aa4b3120bfd586a1abc42a46fff0df8 Reviewed-on: https://gerrit.libreoffice.org/28351 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Henry Castro <hcas...@collabora.com> diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index b701413..1c2a919 100644 --- a/sc/source/ui/view/cellsh3.cxx +++ b/sc/source/ui/view/cellsh3.cxx @@ -548,8 +548,17 @@ void ScCellShell::Execute( SfxRequest& rReq ) std::vector<sc::ColRowSpan> aRanges; SCCOLROW nRow = static_cast<const SfxUInt16Item*>(pRow)->GetValue() - 1; sal_uInt16 nHeight = static_cast<const SfxUInt16Item*>(pHeight)->GetValue(); + ScMarkData& rMark = GetViewData()->GetMarkData(); + + if ( rMark.IsRowMarked( static_cast<SCROW>(nRow) ) ) + { + aRanges = rMark.GetMarkedRowSpans(); + } + else + { + aRanges.push_back(sc::ColRowSpan(nRow, nRow)); + } - aRanges.push_back(sc::ColRowSpan(nRow, nRow)); pTabViewShell->SetWidthOrHeight(false, aRanges, SC_SIZE_DIRECT, nHeight); } else if ( pReqArgs ) @@ -644,8 +653,17 @@ void ScCellShell::Execute( SfxRequest& rReq ) std::vector<sc::ColRowSpan> aRanges; SCCOLROW nColumn = static_cast<const SfxUInt16Item*>(pColumn)->GetValue() - 1; sal_uInt16 nWidth = static_cast<const SfxUInt16Item*>(pWidth)->GetValue(); + ScMarkData& rMark = GetViewData()->GetMarkData(); + + if ( rMark.IsColumnMarked( static_cast<SCCOL>(nColumn) ) ) + { + aRanges = rMark.GetMarkedColSpans(); + } + else + { + aRanges.push_back(sc::ColRowSpan(nColumn, nColumn)); + } - aRanges.push_back(sc::ColRowSpan(nColumn, nColumn)); pTabViewShell->SetWidthOrHeight(true, aRanges, SC_SIZE_DIRECT, nWidth); } else if ( pReqArgs ) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits