[Libreoffice-commits] .: 3 commits - basctl/source
Andras Timar
timar at kemper.freedesktop.org
Thu Mar 1 04:34:51 PST 2012
basctl/source/basicide/basides1.cxx | 5 +++-
basctl/source/basicide/bastype2.cxx | 27 ++++++++++++++++++++++++
basctl/source/basicide/bastype2.hxx | 1
basctl/source/basicide/objdlg.cxx | 39 ------------------------------------
basctl/source/basicide/objdlg.hxx | 14 ------------
basctl/source/basicide/objdlg.src | 2 -
6 files changed, 33 insertions(+), 55 deletions(-)
New commits:
commit 491592015bc937a7fa46215e0ebaa0962456359b
Author: Tomcsik Bence <tomcsikbence at gmail.com>
Date: Thu Mar 1 13:33:04 2012 +0100
implement scrolling with mouse in Object Catalog dialog
I edited out the ObjectTreeListBox class because BasicTreeListBox
contains the scroll function and all the other functions that the
ObjectTreeListBox uses.
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index abacd01..3703776 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -33,7 +33,9 @@
#include <ide_pch.hxx>
-
+#include "basidesh.hxx"
+#include "iderdll.hxx"
+#include "iderdll2.hxx"
#include <basidesh.hrc>
#include <bastypes.hxx>
#include <bastype2.hxx>
@@ -879,4 +881,27 @@ void BasicTreeListBox::SetCurrentEntry( BasicEntryDescriptor& rDesc )
SetCurEntry( pCurEntry );
}
+void BasicTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
+{
+ SvTreeListBox::MouseButtonDown( rMEvt );
+ if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
+ {
+ BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) );
+
+ if ( aDesc.GetType() == OBJ_TYPE_METHOD )
+ {
+ BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
+ SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
+ SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
+ if( pDispatcher )
+ {
+ SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aDesc.GetName(),
+ aDesc.GetMethodName(), ConvertType( aDesc.GetType() ) );
+ pDispatcher->Execute( SID_BASICIDE_SHOWSBX,
+ SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
+ }
+ }
+ }
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/bastype2.hxx b/basctl/source/basicide/bastype2.hxx
index 6f11627..20aa7c5 100644
--- a/basctl/source/basicide/bastype2.hxx
+++ b/basctl/source/basicide/bastype2.hxx
@@ -157,6 +157,7 @@ private:
::basctl::DocumentEventNotifier m_aNotifier;
void SetEntryBitmaps( SvLBoxEntry * pEntry, const Image& rImage );
+ virtual void MouseButtonDown( const MouseEvent& rMEvt );
protected:
virtual void RequestingChildren( SvLBoxEntry* pParent );
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 59172c1..14355bf 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -43,45 +43,6 @@
#include <vcl/taskpanelist.hxx>
#include <vcl/sound.hxx>
-ObjectTreeListBox::ObjectTreeListBox( Window* pParent, const ResId& rRes )
- : BasicTreeListBox( pParent, rRes )
-{
-}
-
-ObjectTreeListBox::~ObjectTreeListBox()
-{
-}
-
-void ObjectTreeListBox::Command( const CommandEvent& )
-{
-}
-
-void ObjectTreeListBox::MouseButtonDown( const MouseEvent& rMEvt )
-{
- BasicTreeListBox::MouseButtonDown( rMEvt );
-
- if ( rMEvt.IsLeft() && ( rMEvt.GetClicks() == 2 ) )
- {
- BasicEntryDescriptor aDesc( GetEntryDescriptor( GetCurEntry() ) );
-
- if ( aDesc.GetType() == OBJ_TYPE_METHOD )
- {
- BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
- SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
- SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
- if( pDispatcher )
- {
- SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(), aDesc.GetName(),
- aDesc.GetMethodName(), ConvertType( aDesc.GetType() ) );
- pDispatcher->Execute( SID_BASICIDE_SHOWSBX,
- SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
- }
- }
- }
-}
-
-
-
ObjectCatalog::ObjectCatalog( Window * pParent )
:FloatingWindow( pParent, IDEResId( RID_BASICIDE_OBJCAT ) )
,aMacroTreeList( this, IDEResId( RID_TLB_MACROS ) )
diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx
index c919fbc..df77a64 100644
--- a/basctl/source/basicide/objdlg.hxx
+++ b/basctl/source/basicide/objdlg.hxx
@@ -39,18 +39,6 @@
class StarBASIC;
-class ObjectTreeListBox : public BasicTreeListBox
-{
-private:
-
- virtual void Command( const CommandEvent& rCEvt );
- virtual void MouseButtonDown( const MouseEvent& rMEvt );
-
-public:
- ObjectTreeListBox( Window* pParent, const ResId& rRes );
- ~ObjectTreeListBox();
-};
-
class ObjectCatalogToolBox_Impl: public ToolBox
{
public:
@@ -67,7 +55,7 @@ private:
class ObjectCatalog : public FloatingWindow
{
private:
- ObjectTreeListBox aMacroTreeList;
+ BasicTreeListBox aMacroTreeList;
ObjectCatalogToolBox_Impl aToolBox;
FixedText aMacroDescr;
Link aCancelHdl;
commit 4022a834b55c8db787916f1a6301f1402b149e4c
Author: Tomcsik Bence <tomcsikbence at gmail.com>
Date: Thu Mar 1 13:24:37 2012 +0100
Object Catalog button now toggles display of the dialog
TODO: implement a toggle toolbar button that shows the toggle state
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 63cc273..8ca700b 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -432,7 +432,10 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
break;
case SID_BASICIDE_OBJCAT:
{
- ShowObjectDialog( sal_True, sal_True );
+ if ( pObjectCatalog )
+ ShowObjectDialog( sal_False, sal_True );
+ else
+ ShowObjectDialog( sal_True, sal_True );
}
break;
case SID_BASICIDE_NAMECHANGEDONTAB:
commit efd4db1e6b20715bfda8efadc798bf9ce192fee0
Author: Tomcsik Bence <tomcsikbence at gmail.com>
Date: Thu Mar 1 13:23:28 2012 +0100
make button label and dialog title consistent (Object Catalog)
diff --git a/basctl/source/basicide/objdlg.src b/basctl/source/basicide/objdlg.src
index 3f4d0a2..845f491 100644
--- a/basctl/source/basicide/objdlg.src
+++ b/basctl/source/basicide/objdlg.src
@@ -36,7 +36,7 @@ FloatingWindow RID_BASICIDE_OBJCAT
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 191 , 179 ) ;
- Text [ en-US ] = "Objects" ;
+ Text [ en-US ] = "Object Catalog" ;
Closeable = TRUE ;
Moveable = TRUE ;
Sizeable = TRUE ;
More information about the Libreoffice-commits
mailing list