[Libreoffice-commits] core.git: sc/source
Henry Castro
hcastro at collabora.com
Tue Aug 23 22:41:18 UTC 2016
sc/source/ui/view/cellsh3.cxx | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
New commits:
commit cc497d86e092315f78a89f3ace8b81623dad7b46
Author: Henry Castro <hcastro at 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 <ci at libreoffice.org>
Reviewed-by: Henry Castro <hcastro at 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 )
More information about the Libreoffice-commits
mailing list