[Libreoffice-commits] core.git: sfx2/source
Maxim Monastirsky
momonasmon at gmail.com
Sat May 17 11:57:15 PDT 2014
sfx2/source/control/recentdocsview.cxx | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 435c1b15dc33e4570aa8438cd92708572f8145c5
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Sat May 17 21:54:55 2014 +0300
fdo#78782 startcenter: open document on enter key
Change-Id: I501dbd6a0f4e5323a003afbb19707aad67897cd0
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 4a44c6d..f0c9c05 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -227,6 +227,9 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
{
if (rMEvt.IsLeft())
{
+ if( rMEvt.GetClicks() > 1 )
+ return;
+
size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
ThumbnailViewItem* pItem = ImplGetItem(nPos);
@@ -241,8 +244,11 @@ void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
ThumbnailView::MouseButtonUp(rMEvt);
}
-void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *)
+void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *pItem)
{
+ RecentDocsViewItem* pRecentItem = dynamic_cast< RecentDocsViewItem* >(pItem);
+ if (pRecentItem)
+ pRecentItem->OpenDocument();
}
void RecentDocsView::Paint( const Rectangle &aRect )
More information about the Libreoffice-commits
mailing list