summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorAndreas Bregas <ab@openoffice.org>2002-11-05 07:59:43 +0000
committerAndreas Bregas <ab@openoffice.org>2002-11-05 07:59:43 +0000
commite5c6ce78e63fcfb0a40825671502959553eb241a (patch)
treecce656a5f36f8311fed91c889691d5b58ba7d651 /basctl
parent593493380e3bd5498fa3b1ee659f9e3600294c84 (diff)
#103795# DialogWindow::Command(): Selection centered popup menu location for Shift-F10
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside3.cxx20
1 files changed, 17 insertions, 3 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 8b8e17f84b4d..2a5c8f427358 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside3.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: tbe $ $Date: 2002-05-02 12:10:24 $
+ * last change: $Author: ab $ $Date: 2002-11-05 08:59:43 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -266,7 +266,21 @@ void DialogWindow::Command( const CommandEvent& rCEvt )
SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
if ( pDispatcher )
- pDispatcher->ExecutePopup( IDEResId(RID_POPUP_DLGED) );
+ {
+ SdrView* pView = GetView();
+ if( !rCEvt.IsMouseEvent() && pView->HasMarked() )
+ {
+ Rectangle aMarkedRect( pView->GetMarkedRect() );
+ Point MarkedCenter( aMarkedRect.Center() );
+ Point PosPixel( LogicToPixel( MarkedCenter ) );
+ pDispatcher->ExecutePopup( IDEResId(RID_POPUP_DLGED), this, &PosPixel );
+ }
+ else
+ {
+ pDispatcher->ExecutePopup( IDEResId(RID_POPUP_DLGED) );
+ }
+
+ }
}
else
IDEBaseWindow::Command( rCEvt );