summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2023-11-27 18:40:57 +0200
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2023-12-04 20:16:06 +0100
commit5584980493fd599054cc5bbdb9911ae2c70cd60f (patch)
tree43b8b02e757b6b460916313af920d0c861e89d6b /sfx2
parentbc95ece0618b9886890d9c758b9d0ebc0fc41c69 (diff)
tdf#158404 Start Center: remove ability to do multiselections
in Recent Documents and Templates views using Shift+arrow keys as no actions can be executed for multiple selected files. Multiselection still works as normal in Manage Templates dialog. Change-Id: I03b9e54abb7772881139763a0c97f36637d01f85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160003 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/recentdocsview.cxx1
-rw-r--r--sfx2/source/control/templatedefaultview.cxx1
-rw-r--r--sfx2/source/control/thumbnailview.cxx3
3 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 6df534788a32..f6ea1278390a 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -68,6 +68,7 @@ RecentDocsView::RecentDocsView(std::unique_ptr<weld::ScrolledWindow> xWindow, st
, mpLoadRecentFile(nullptr)
, m_nExecuteHdlId(nullptr)
{
+ mbAllowMultiSelection = false;
AbsoluteScreenPixelRectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
mnItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
diff --git a/sfx2/source/control/templatedefaultview.cxx b/sfx2/source/control/templatedefaultview.cxx
index 909545e423ce..eef46f1817fd 100644
--- a/sfx2/source/control/templatedefaultview.cxx
+++ b/sfx2/source/control/templatedefaultview.cxx
@@ -25,6 +25,7 @@ TemplateDefaultView::TemplateDefaultView(std::unique_ptr<weld::ScrolledWindow> x
std::unique_ptr<weld::Menu> xMenu)
: TemplateLocalView(std::move(xWindow), std::move(xMenu))
{
+ mbAllowMultiSelection = false;
AbsoluteScreenPixelRectangle aScreen = Application::GetScreenPosSizePixel(Application::GetDisplayBuiltInScreen());
tools::Long nItemMaxSize = std::min(aScreen.GetWidth(),aScreen.GetHeight()) > 800 ? 256 : 192;
ThumbnailView::setItemDimensions( nItemMaxSize, nItemMaxSize, gnTextHeight, gnItemPadding );
diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx
index abb9f9799e34..1ae47016935e 100644
--- a/sfx2/source/control/thumbnailview.cxx
+++ b/sfx2/source/control/thumbnailview.cxx
@@ -246,6 +246,7 @@ void ThumbnailView::ImplInit()
mbHasVisibleItems = false;
mbShowTooltips = false;
mbDrawMnemonics = false;
+ mbAllowMultiSelection = true;
maFilterFunc = ViewFilterAll();
const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings();
@@ -681,7 +682,7 @@ bool ThumbnailView::KeyInput( const KeyEvent& rKEvt )
if ( pNext )
{
- if (aKeyCode.IsShift() && bValidRange)
+ if (aKeyCode.IsShift() && bValidRange && mbAllowMultiSelection)
{
std::pair<size_t,size_t> aRange;
size_t nSelPos = mpStartSelRange - mFilteredItemList.begin();