summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2023-07-10 11:27:17 +0200
committerSzymon Kłos <szymon.klos@collabora.com>2023-07-12 07:55:12 +0200
commit43c564da59d7d951ee9a903b80e82fd1159d0c71 (patch)
treecb79c40df160fd0e37b1d93302ee289f5ac1e030 /sc
parentf7af4c311ad04ce5e54e08b9d7ccd71b75b7a32d (diff)
lok: copy simple selection even when filtered
when selected cells contain data filtered with autofilter and regular cells after that - we get different type of selection called SC_MARK_SIMPLE_FILTERED allow copying that too Change-Id: I69f91a674f427a7b956fd87b8dc56937b3b55e86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154239 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154309 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/view/viewfun3.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 8a9b489833fc..651724209946 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -430,7 +430,8 @@ bool ScViewFunc::CopyToClipMultiRange( const ScDocument* pInputClipDoc, const Sc
rtl::Reference<ScTransferObj> ScViewFunc::CopyToTransferable()
{
ScRange aRange;
- if ( GetViewData().GetSimpleArea( aRange ) == SC_MARK_SIMPLE )
+ auto eMarkType = GetViewData().GetSimpleArea( aRange );
+ if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED )
{
ScDocument& rDoc = GetViewData().GetDocument();
ScMarkData& rMark = GetViewData().GetMarkData();