[Libreoffice-commits] core.git: 2 commits - include/sfx2 sfx2/source
Maxim Monastirsky
momonasmon at gmail.com
Mon May 5 12:26:08 PDT 2014
include/sfx2/recentdocsview.hxx | 2 --
include/sfx2/recentdocsviewitem.hxx | 2 +-
include/sfx2/thumbnailviewitem.hxx | 2 +-
sfx2/source/control/recentdocsview.cxx | 16 ++++------------
sfx2/source/control/recentdocsviewitem.cxx | 2 +-
sfx2/source/doc/guisaveas.cxx | 6 ++++--
6 files changed, 11 insertions(+), 19 deletions(-)
New commits:
commit 718fbf4f808def97ad55b1afaeb5af68b9144b96
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Mon May 5 22:17:59 2014 +0300
Fix indentation
Change-Id: I7ac9792da93a1b5231ddac5398823667b28adf92
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 908ed2a..85a9947 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -1715,11 +1715,13 @@ bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel,
}
// Launch PDF viewer
- if ( nStoreMode & PDFEXPORT_REQUESTED ) {
+ if ( nStoreMode & PDFEXPORT_REQUESTED )
+ {
FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" );
bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false );
- if ( aViewPDF ) {
+ if ( aViewPDF )
+ {
uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) );
xSystemShellExecute->execute( aURL.GetMainURL( INetURLObject::NO_DECODE ), "", SystemShellExecuteFlags::URIS_ONLY );
}
commit 1a2a961c1e7cdef648c28e211433e8de6e8a831b
Author: Maxim Monastirsky <momonasmon at gmail.com>
Date: Mon May 5 22:00:09 2014 +0300
startcenter: react on mouse down instead
There is a good reason for that: File lists of
some file pickers handle double click event on
mouse down. So if a start center thumbnail is
exactly behind the file on which the user double-
clicked, it will receive the mouse up event, and
will also open.
Change-Id: I9fc9ceff0874d0486d5b568c9b35143c8d8aabf8
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index c1ba062..0ebf30e 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -63,8 +63,6 @@ public:
protected:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
- virtual void MouseButtonUp( const MouseEvent& rMEvt ) SAL_OVERRIDE;
-
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) SAL_OVERRIDE;
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx
index b1a51fe..71b6474 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -33,7 +33,7 @@ public:
virtual void Paint(drawinglayer::processor2d::BaseProcessor2D *pProcessor,
const ThumbnailItemAttributes *pAttrs) SAL_OVERRIDE;
- virtual void MouseButtonUp(const MouseEvent& rMEvt) SAL_OVERRIDE;
+ virtual void MouseButtonDown(const MouseEvent& rMEvt) SAL_OVERRIDE;
/// Called when the user clicks a document - it will open it.
void OpenDocument();
diff --git a/include/sfx2/thumbnailviewitem.hxx b/include/sfx2/thumbnailviewitem.hxx
index ee4fd7f..cf3e860 100644
--- a/include/sfx2/thumbnailviewitem.hxx
+++ b/include/sfx2/thumbnailviewitem.hxx
@@ -129,7 +129,7 @@ public:
static drawinglayer::primitive2d::PolygonHairlinePrimitive2D*
createBorderLine (const basegfx::B2DPolygon &rPolygon);
- virtual void MouseButtonUp(const MouseEvent&) {}
+ virtual void MouseButtonDown(const MouseEvent&) {}
protected:
diff --git a/sfx2/source/control/recentdocsview.cxx b/sfx2/source/control/recentdocsview.cxx
index 0564e8b..b4be9c8 100644
--- a/sfx2/source/control/recentdocsview.cxx
+++ b/sfx2/source/control/recentdocsview.cxx
@@ -213,27 +213,19 @@ void RecentDocsView::MouseButtonDown( const MouseEvent& rMEvt )
{
if (rMEvt.IsLeft())
{
- // ignore to avoid stuff done in ThumbnailView; we don't do selections etc.
- return;
- }
-
- ThumbnailView::MouseButtonDown(rMEvt);
-}
+ if (rMEvt.GetClicks() > 1)
+ return;
-void RecentDocsView::MouseButtonUp(const MouseEvent& rMEvt)
-{
- if (rMEvt.IsLeft())
- {
size_t nPos = ImplGetItem(rMEvt.GetPosPixel());
ThumbnailViewItem* pItem = ImplGetItem(nPos);
if (pItem)
{
- pItem->MouseButtonUp(rMEvt);
+ pItem->MouseButtonDown(rMEvt);
return;
}
}
- ThumbnailView::MouseButtonUp(rMEvt);
+ ThumbnailView::MouseButtonDown(rMEvt);
}
void RecentDocsView::OnItemDblClicked(ThumbnailViewItem *)
diff --git a/sfx2/source/control/recentdocsviewitem.cxx b/sfx2/source/control/recentdocsviewitem.cxx
index aa2a7e0..0dfef15 100644
--- a/sfx2/source/control/recentdocsviewitem.cxx
+++ b/sfx2/source/control/recentdocsviewitem.cxx
@@ -182,7 +182,7 @@ void RecentDocsViewItem::Paint(drawinglayer::processor2d::BaseProcessor2D *pProc
}
}
-void RecentDocsViewItem::MouseButtonUp(const MouseEvent& rMEvt)
+void RecentDocsViewItem::MouseButtonDown(const MouseEvent& rMEvt)
{
if (rMEvt.IsLeft())
{
More information about the Libreoffice-commits
mailing list