diff options
author | Henry Castro <hcastro@collabora.com> | 2016-08-23 14:13:57 -0400 |
---|---|---|
committer | Henry Castro <hcastro@collabora.com> | 2016-08-23 22:40:53 +0000 |
commit | cc497d86e092315f78a89f3ace8b81623dad7b46 (patch) | |
tree | 2df256d60917296ca8ea16d0df10d407762b9045 /sc/source/ui/view/cellsh3.cxx | |
parent | 499f79e4726048afe0f5adf69627dfa849e60aef (diff) |
sc lok: fix re-sizing several rows/columns at once
Change-Id: I7b3760432aa4b3120bfd586a1abc42a46fff0df8
Reviewed-on: https://gerrit.libreoffice.org/28351
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Henry Castro <hcastro@collabora.com>
Diffstat (limited to 'sc/source/ui/view/cellsh3.cxx')
-rw-r--r-- | sc/source/ui/view/cellsh3.cxx | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx index b70141345d17..1c2a91998812 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 ) |