Date: prev next · Thread: first prev next last
2012 Archives by date, by thread · List index


Now the "Object Catalog" window is undockable, and can be resized.
Its button in the toolbar looks pressed when the Object Catalog is visible.

Uray M. János
From 0da10568c90c8d53b17f078c996f8465869f6bd4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?"Uray=20M.=20J=C3=A1nos"?= <uray.janos@gmail.com>
Date: Fri, 3 Aug 2012 18:45:19 +0200
Subject: [PATCH] Basic IDE Object Catalog improvements

Change-Id: Ifbcf4cce45e231ec31a124fb10389390852841b5
---
 basctl/inc/basidesh.hrc             |    3 -
 basctl/source/basicide/baside2.cxx  |  281 +++++++++++++++++++----------------
 basctl/source/basicide/baside2.hxx  |   29 ++--
 basctl/source/basicide/baside2b.cxx |    5 +-
 basctl/source/basicide/basides1.cxx |   16 ++-
 basctl/source/basicide/basides2.cxx |    7 -
 basctl/source/basicide/basidesh.cxx |   46 +------
 basctl/source/basicide/basobj3.cxx  |   10 +-
 basctl/source/basicide/iderdll.cxx  |    2 +-
 basctl/source/basicide/iderdll2.hxx |   13 --
 basctl/source/basicide/objdlg.cxx   |  254 +++++++++-----------------------
 basctl/source/basicide/objdlg.hrc   |   15 +-
 basctl/source/basicide/objdlg.hxx   |   57 +++-----
 basctl/source/basicide/objdlg.src   |   85 +++++-------
 basctl/source/inc/basidesh.hxx      |    6 -
 15 files changed, 324 insertions(+), 505 deletions(-)

diff --git a/basctl/inc/basidesh.hrc b/basctl/inc/basidesh.hrc
index 0e47056..b8fa629 100644
--- a/basctl/inc/basidesh.hrc
+++ b/basctl/inc/basidesh.hrc
@@ -21,9 +21,6 @@
 
 #include <svx/svxids.hrc>
 
-// Width of Object Catalog pane in pixels
-#define OBJCAT_PANE_WIDTH 240
-
 // Resource-ID's...
 #ifndef _SVX_NOIDERESIDS
 
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 0ece951..ea5f877 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -50,9 +50,6 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
-#define SPLIT_MARGIN    5
-#define SPLIT_HEIGHT    2
-
 #define LMARGPRN        1700
 #define RMARGPRN         900
 #define TMARGPRN        2000
@@ -1416,23 +1413,25 @@ sal_Bool ModulWindow::IsPasteAllowed()
 }
 
 ModulWindowLayout::ModulWindowLayout( Window* pParent ) :
-    Window( pParent, WB_CLIPCHILDREN ),
-    aVSplitter( this, WinBits( WB_VSCROLL ) ),
-    aHSplitter( this, WinBits( WB_HSCROLL ) ),
-    aWatchWindow( this ),
-    aStackWindow( this ),
-    aObjectCatalog( this ),
-    bVSplitted(sal_False),
-    bHSplitted(sal_False),
+    Window(pParent, WB_CLIPCHILDREN),
+    bFirstArrange(true),
+    aLeftSplit(this, WB_HSCROLL),
+    aBottomSplit(this, WB_VSCROLL),
+    aVertSplit(this, WB_HSCROLL),
+    aObjectCatalog(this),
+    aWatchWindow(this),
+    aStackWindow(this),
     m_pModulWindow(0),
     m_aImagesNormal(IDEResId(RID_IMGLST_LAYOUT))
 {
     SetBackground(GetSettings().GetStyleSettings().GetWindowColor());
 
-    aVSplitter.SetSplitHdl( LINK( this, ModulWindowLayout, SplitHdl ) );
-    aHSplitter.SetSplitHdl( LINK( this, ModulWindowLayout, SplitHdl ) );
-    aVSplitter.Show();
-    aHSplitter.Show();
+    aLeftSplit.Show();
+    aBottomSplit.Show();
+    aVertSplit.Show();
+    aLeftSplit.SetSplitHdl( LINK(this, ModulWindowLayout, SplitHdl) );
+    aBottomSplit.SetSplitHdl( LINK(this, ModulWindowLayout, SplitHdl) );
+    aVertSplit.SetSplitHdl( LINK(this, ModulWindowLayout, SplitHdl) );
 
     aWatchWindow.Show();
     aStackWindow.Show();
@@ -1487,158 +1486,188 @@ void ModulWindowLayout::Paint( const Rectangle& )
 
 void ModulWindowLayout::ArrangeWindows()
 {
-    Size aSz = GetOutputSizePixel();
+    static long const nSplitThickness = 2;
+    static float const
+        fDefaultLeftSplit = 0.2,
+        fDefaultBottomSplit = 0.75,
+        fDefaultVertSplit = 0.67;
 
-    // test whether the splitter is in a valid area...
-    long nMinPos = SPLIT_MARGIN;
-    long nMaxPos = aSz.Height() - SPLIT_MARGIN;
+    Size const aSize = GetOutputSizePixel();
+    long const nWidth = aSize.Width(), nHeight = aSize.Height();
+    if (!nWidth || !nHeight) // empty size
+        return;
 
-    long nVSplitPos = aVSplitter.GetSplitPosPixel();
-    long nHSplitPos = aHSplitter.GetSplitPosPixel();
-    if ( !bVSplitted )
+    // When ArrangeWindows() is called first,
+    // the initial positions of the splitter lines are set.
+    if (bFirstArrange)
     {
-        nVSplitPos = aSz.Height() * 3 / 4;
-        aVSplitter.SetSplitPosPixel( nVSplitPos );
+        aLeftSplit.SetSplitPosPixel(aSize.Width()  * fDefaultLeftSplit);
+        aBottomSplit.SetSplitPosPixel(aSize.Height() * fDefaultBottomSplit);
+        aVertSplit.SetSplitPosPixel(aSize.Width()  * fDefaultVertSplit);
+        bFirstArrange = false;
     }
-    if ( !bHSplitted )
+
+    // resizing windows to the splitting lines
+    long const nLeftSplitPos = aLeftSplit.GetSplitPosPixel();
+    long const nBottomSplitPos = aBottomSplit.GetSplitPosPixel();
+    long const nVertSplitPos = aVertSplit.GetSplitPosPixel();
+    // which window is docked?
+    bool const bObjCat = !aObjectCatalog.IsFloatingMode() && aObjectCatalog.IsVisible();
+    bool const bWatchWin = !aWatchWindow.IsFloatingMode() && aWatchWindow.IsVisible();
+    bool const bStackWin = !aStackWindow.IsFloatingMode() && aStackWindow.IsVisible();
+    long const nBottom = bStackWin || bWatchWin ? nBottomSplitPos : nHeight;
+    // left splitting line
+    if (bObjCat)
     {
-        nHSplitPos = aSz.Width() * 2 / 3;
-        aHSplitter.SetSplitPosPixel( nHSplitPos );
+        aLeftSplit.SetDragRectPixel(Rectangle(Point(0, 0), Size(nWidth, nBottom)));
+        aLeftSplit.SetPosPixel(Point(nLeftSplitPos, 0));
+        aLeftSplit.SetSizePixel(Size(nSplitThickness, nBottom));
+        aLeftSplit.Show();
     }
-    if ( ( nVSplitPos < nMinPos ) || ( nVSplitPos > nMaxPos ) )
-        nVSplitPos = ( nVSplitPos < nMinPos ) ? 0 : ( aSz.Height() - SPLIT_HEIGHT );
-
-    if ( m_pModulWindow )
+    else
+        aLeftSplit.Hide();
+    // bottom splitting line
+    if (bWatchWin || bStackWin)
+    {
+        aBottomSplit.SetDragRectPixel(Rectangle(Point(0, 0), aSize));
+        aBottomSplit.SetPosPixel(Point(0, nBottomSplitPos));
+        aBottomSplit.SetSizePixel(Size(nWidth, nSplitThickness));
+        aBottomSplit.Show();
+    }
+    else
+        aBottomSplit.Hide();
+    // vertical (bottom) splitting line
+    if (bWatchWin || bStackWin)
+    {
+        Point const aPos(nVertSplitPos, nBottomSplitPos + nSplitThickness);
+        aVertSplit.SetDragRectPixel(Rectangle(Point(0, aPos.Y()), Size(nWidth, nHeight - 
aPos.Y())));
+        aVertSplit.SetPosSizePixel(aPos, Size(nSplitThickness, nHeight - aPos.Y()));
+        aVertSplit.Show();
+    }
+    else
+        aVertSplit.Hide();
+    // editor window
+    if (m_pModulWindow)
     {
-        DBG_CHKOBJ( m_pModulWindow, ModulWindow, 0 );
-        bool const bObjCat = aObjectCatalog.IsVisible();
+        DBG_CHKOBJ(m_pModulWindow, ModulWindow, 0);
+        long const nLeft = bObjCat ? nLeftSplitPos + nSplitThickness : 0;
         m_pModulWindow->SetPosSizePixel(
-            Point(bObjCat ? OBJCAT_PANE_WIDTH : 0, 0),
-            Size(bObjCat ? aSz.Width() - OBJCAT_PANE_WIDTH : aSz.Width(), nVSplitPos + 1)
+            Point(nLeft, 0),
+            Size(nWidth - nLeft, nBottom)
         );
     }
-
-    aVSplitter.SetDragRectPixel( Rectangle( Point( 0, 0 ), Size( aSz.Width(), aSz.Height() ) ) );
-    aVSplitter.SetPosPixel( Point( 0, nVSplitPos ) );
-    aVSplitter.SetSizePixel( Size( aSz.Width(), SPLIT_HEIGHT ) );
-
-    aHSplitter.SetDragRectPixel( Rectangle( Point( 0, nVSplitPos+SPLIT_HEIGHT ), Size( 
aSz.Width(), aSz.Height() - nVSplitPos - SPLIT_HEIGHT ) ) );
-    aHSplitter.SetPosPixel( Point( nHSplitPos, nVSplitPos ) );
-    aHSplitter.SetSizePixel( Size( SPLIT_HEIGHT, aSz.Height() - nVSplitPos ) );
-
-    Size aWWSz;
-    Point aWWPos( 0, nVSplitPos+SPLIT_HEIGHT );
-    aWWSz.Width() = nHSplitPos;
-    aWWSz.Height() = aSz.Height() - aWWPos.Y();
-    if ( !aWatchWindow.IsFloatingMode() )
-        aWatchWindow.SetPosSizePixel( aWWPos, aWWSz );
-
-    Size aSWSz;
-    Point aSWPos( nHSplitPos+SPLIT_HEIGHT, nVSplitPos+SPLIT_HEIGHT );
-    aSWSz.Width() = aSz.Width() - aSWPos.X();
-    aSWSz.Height() = aSz.Height() - aSWPos.Y();
-    if ( !aStackWindow.IsFloatingMode() )
-        aStackWindow.SetPosSizePixel( aSWPos, aSWSz );
-
-    if ( !aObjectCatalog.IsFloatingMode() )
+    // object catalog (left)
+    if (bObjCat)
     {
-        Size aOCSz( OBJCAT_PANE_WIDTH, aSz.Height() - aSWSz.Height() - 3 );
-        Point aOCPos( 0, 0 );
-        aObjectCatalog.SetPosSizePixel( aOCPos, aOCSz );
+        aObjectCatalog.SetPosPixel(Point(0, 0));
+        aObjectCatalog.SetSizePixel(Size(nLeftSplitPos, nBottom));
+    }
+    // watch (bottom left)
+    if (bWatchWin)
+    {
+        Point const aPos(0, nBottomSplitPos + nSplitThickness);
+        aWatchWindow.SetPosPixel(aPos);
+        aWatchWindow.SetSizePixel(Size(nVertSplitPos, nHeight - aPos.Y()));
+    }
+    // call stack (bottom right)
+    if (bStackWin)
+    {
+        Point const aPos(nVertSplitPos + nSplitThickness, nBottomSplitPos + nSplitThickness);
+        aStackWindow.SetPosPixel(aPos);
+        aStackWindow.SetSizePixel(Size(nWidth - aPos.X(), nHeight - aPos.Y()));
     }
 
-    if ( aStackWindow.IsFloatingMode() && aWatchWindow.IsFloatingMode() )
-        aHSplitter.Hide();
-    else
-        aHSplitter.Show();
-
-    long nHDoubleClickSplitPosX = aSz.Width()-aHSplitter.GetSizePixel().Width();
-    if ( aHSplitter.GetSplitPosPixel() < nHDoubleClickSplitPosX )
-        aHSplitter.SetLastSplitPosPixel( nHDoubleClickSplitPosX );
-
-
-    long nHDoubleClickSplitPosY = aSz.Height()-aVSplitter.GetSizePixel().Height();
-    if ( aVSplitter.GetSplitPosPixel() < nHDoubleClickSplitPosY )
-        aVSplitter.SetLastSplitPosPixel( nHDoubleClickSplitPosY );
+    //long nHDoubleClickSplitPosX = nWidth-aHSplitter.GetSizePixel().Width();
+    //if ( aHSplitter.GetSplitPosPixel() < nHDoubleClickSplitPosX )
+        //aHSplitter.SetLastSplitPosPixel( nHDoubleClickSplitPosX );
+//
+//
+    //long nHDoubleClickSplitPosY = nHeight-aVSplitter.GetSizePixel().Height();
+    //if ( aVSplitter.GetSplitPosPixel() < nHDoubleClickSplitPosY )
+        //aVSplitter.SetLastSplitPosPixel( nHDoubleClickSplitPosY );
 }
 
 IMPL_LINK( ModulWindowLayout, SplitHdl, Splitter *, pSplitter )
 {
-    if ( pSplitter == &aVSplitter )
-        bVSplitted = sal_True;
-    else
-        bHSplitted = sal_True;
-
+    // The split line cannot be closer to the edges than nMargin pixels.
+    static long const nMargin = 16;
+    // Checking margins:
+    if (long const nSize = pSplitter->IsHorizontal() ?
+        GetOutputSizePixel().Width() :
+        GetOutputSizePixel().Height()
+    ) {
+        long const nPos = pSplitter->GetSplitPosPixel();
+        if (nPos < nMargin)
+            pSplitter->SetSplitPosPixel(nMargin);
+        if (nPos > nSize - nMargin)
+            pSplitter->SetSplitPosPixel(nSize - nMargin);
+    }
     ArrangeWindows();
     return 0;
 }
 
-sal_Bool ModulWindowLayout::IsToBeDocked( DockingWindow* pDockingWindow, const Point& rPos, 
Rectangle& rRect )
-{
-    // test whether dock or child:
-    // TRUE:    Floating
-    // FALSE:   Child
-    Point aPosInMe = ScreenToOutputPixel( rPos );
-    Size aSz = GetOutputSizePixel();
-    if ( ( aPosInMe.X() > 0 ) && ( aPosInMe.X() < aSz.Width() ) &&
-         ( aPosInMe.Y() > 0 ) && ( aPosInMe.Y() < aSz.Height() ) )
+//
+// IsToBeDocked() -- test whether dock or child:
+// true:  Floating
+// false: Child
+//
+bool ModulWindowLayout::IsToBeDocked (
+    DockingWindow* pDockingWindow, Point const& rPos, Rectangle& rRect
+) {
+    Point const aPos = ScreenToOutputPixel(rPos);
+    Size const aSize = GetOutputSizePixel();
+    long const nWidth = aSize.Width(), nHeight = aSize.Height();
+
+    if (aPos.X() > 0 && aPos.X() < nWidth && aPos.Y() > 0 && aPos.Y() < nHeight)
     {
-        long nVSplitPos = aVSplitter.GetSplitPosPixel();
-        long nHSplitPos = aHSplitter.GetSplitPosPixel();
-        if ( pDockingWindow == &aWatchWindow )
+        long const nLeftSplit = aLeftSplit.GetSplitPosPixel();
+        long const nBottomSplit = aBottomSplit.GetSplitPosPixel();
+        long const nVertSplit = aVertSplit.GetSplitPosPixel();
+        if (pDockingWindow == &aObjectCatalog)
         {
-            if ( ( aPosInMe.Y() > nVSplitPos ) && ( aPosInMe.X() < nHSplitPos ) )
+            if (aPos.Y() < nBottomSplit && aPos.X() < nLeftSplit)
             {
-                rRect.SetSize( Size( nHSplitPos, aSz.Height() - nVSplitPos ) );
-                rRect.SetPos( OutputToScreenPixel( Point( 0, nVSplitPos ) ) );
-                return sal_True;
+                rRect = Rectangle(
+                    OutputToScreenPixel(Point(0, 0)),
+                    Size(nLeftSplit, nBottomSplit)
+                );
+                return true;
             }
         }
-        if ( pDockingWindow == &aStackWindow )
+        else if (pDockingWindow == &aWatchWindow)
         {
-            if ( ( aPosInMe.Y() > nVSplitPos ) && ( aPosInMe.X() > nHSplitPos ) )
+            if (aPos.Y() > nBottomSplit && aPos.X() < nVertSplit)
             {
-                rRect.SetSize( Size( aSz.Width() - nHSplitPos, aSz.Height() - nVSplitPos ) );
-                rRect.SetPos( OutputToScreenPixel( Point( nHSplitPos, nVSplitPos ) ) );
-                return sal_True;
+                rRect = Rectangle(
+                    OutputToScreenPixel(Point(0, nBottomSplit)),
+                    Size(nVertSplit, nHeight - nBottomSplit)
+                );
+                return true;
             }
         }
-        if ( pDockingWindow == &aObjectCatalog )
+        else if (pDockingWindow == &aStackWindow)
         {
-            if ( ( aPosInMe.Y() > nVSplitPos ) && ( aPosInMe.X() > nHSplitPos ) )
+            if (aPos.Y() > nBottomSplit && aPos.X() > nVertSplit)
             {
-                rRect.SetSize( Size( aSz.Width() - nHSplitPos, aSz.Height() - nVSplitPos ) );
-                rRect.SetPos( OutputToScreenPixel( Point( nHSplitPos, nVSplitPos ) ) );
-                return sal_True;
+                rRect = Rectangle(
+                    OutputToScreenPixel(Point(nVertSplit, nBottomSplit)),
+                    Size(nWidth - nVertSplit, nHeight - nBottomSplit)
+                );
+                return true;
             }
         }
     }
-    return sal_False;
+    return false;
 }
 
-void ModulWindowLayout::DockaWindow( DockingWindow* pDockingWindow )
+void ModulWindowLayout::DockaWindow (DockingWindow*)
 {
-    if ( pDockingWindow == &aWatchWindow )
-    {
-        ArrangeWindows();
-    }
-    else if ( pDockingWindow == &aStackWindow )
-    {
-        ArrangeWindows();
-    }
-    else if ( pDockingWindow == &aObjectCatalog )
-    {
-        ArrangeWindows();
-    }
-#if OSL_DEBUG_LEVEL > 0
-    else
-        OSL_FAIL( "Wer will sich denn hier andocken ?" );
-#endif
+    ArrangeWindows();
 }
 
-void ModulWindowLayout::SetModulWindow( ModulWindow* pModWin )
+void ModulWindowLayout::SetModulWindow (ModulWindow* pModulWindow)
 {
-    m_pModulWindow = pModWin;
+    m_pModulWindow = pModulWindow;
     ArrangeWindows();
 }
 
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index e13ce31..d1139daf 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -17,8 +17,8 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef _BASIDE2_HXX
-#define _BASIDE2_HXX
+#ifndef BASCTL_BASIDE2_HXX
+#define BASCTL_BASIDE2_HXX
 
 #include <svheader.hxx>
 
@@ -427,18 +427,18 @@ public:
 class ModulWindowLayout: public Window, public utl::ConfigurationListener
 {
 private:
+    // is ArrangeWindows() called first in this object?
+    bool bFirstArrange;
 
-    Splitter        aVSplitter;
-    Splitter        aHSplitter;
+    // splitter lines
+    Splitter aLeftSplit, aBottomSplit, aVertSplit;
 
-    WatchWindow     aWatchWindow;
-    StackWindow     aStackWindow;
-    ObjectCatalog   aObjectCatalog;
+    // dockable windows
+    ObjectCatalog aObjectCatalog;
+    WatchWindow aWatchWindow;
+    StackWindow aStackWindow;
 
-    sal_Bool            bVSplitted;
-    sal_Bool            bHSplitted;
-
-    ModulWindow * m_pModulWindow;
+    ModulWindow* m_pModulWindow;
 
     Color m_aSyntaxColors[TT_KEYWORDS + 1];
     svtools::ColorConfig m_aColorConfig;
@@ -464,14 +464,14 @@ public:
                     ~ModulWindowLayout();
 
     void            DockaWindow( DockingWindow* pDockingWin );
-    sal_Bool            IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& 
rRect );
+    bool            IsToBeDocked( DockingWindow* pDockingWin, const Point& rPos, Rectangle& rRect 
);
 
     void            SetModulWindow( ModulWindow* pModWin );
     ModulWindow*    GetModulWindow() const { return m_pModulWindow; }
 
     WatchWindow&    GetWatchWindow()    { return aWatchWindow; }
     StackWindow&    GetStackWindow()    { return aStackWindow; }
-    ObjectCatalog&    GetObjectCatalog()    { return aObjectCatalog; }
+    ObjectCatalog&  GetObjectCatalog()  { return aObjectCatalog; }
 
     Image getImage(sal_uInt16 nId) const;
 
@@ -479,8 +479,9 @@ public:
     { return m_aSyntaxColors[eType]; }
 
     void ToggleObjectCatalog ();
+    bool HasObjectCatalog () const { return aObjectCatalog.IsVisible(); }
 };
 
-#endif  // _BASIDE2_HXX
+#endif // BASCTL_BASIDE2_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx
index 610d779..89df519 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -48,8 +48,11 @@
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 
+namespace
+{
 long nVirtToolBoxHeight;    // inited in WatchWindow, used in Stackwindow
 long nHeaderBarHeight;
+} // namespace
 
 #define SCROLL_LINE     12
 #define SCROLL_PAGE     60
@@ -1521,7 +1524,7 @@ StackWindow::StackWindow( Window* pParent ) :
     aTreeListBox( this, WB_BORDER | WB_3DLOOK | WB_HSCROLL | WB_TABSTOP ),
     aStackStr( IDEResId( RID_STR_STACK ) )
 {
-       aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST);
+    aTreeListBox.SetHelpId(HID_BASICIDE_STACKWINDOW_LIST);
     aTreeListBox.SetAccessibleName(String( IDEResId(RID_STR_STACKNAME)));
     aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
     aTreeListBox.SetHighlightRange();
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 940bf80..f64960a 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -442,6 +442,9 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
 
         case SID_BASICIDE_OBJCAT:
             pModulLayout->ToggleObjectCatalog();
+            // refresh the button state
+            if (SfxBindings* pBindings = BasicIDE::GetBindingsPtr())
+                pBindings->Invalidate(nSlot);
             break;
 
         case SID_BASICIDE_NAMECHANGEDONTAB:
@@ -883,9 +886,14 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
                     rSet.Put(SfxVisibilityItem(nWh, sal_False));
                 }
                 else
-                    rSet.Put(SfxVisibilityItem(nWh, sal_True));
+                {
+                    if (nWh == SID_BASICIDE_OBJCAT)
+                        rSet.Put(SfxBoolItem(nWh, pModulLayout && 
pModulLayout->HasObjectCatalog()));
+                    else
+                        rSet.Put(SfxVisibilityItem(nWh, sal_True));
+                }
+                break;
             }
-            break;
             case SID_BASICIDE_SHOWSBX:
             case SID_BASICIDE_CREATEMACRO:
             case SID_BASICIDE_EDITMACRO:
@@ -1424,8 +1432,6 @@ void BasicIDEShell::Activate( sal_Bool bMDI )
     {
         if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) )
             ((DialogWindow*)pCurWin)->UpdateBrowser();
-
-        ShowObjectDialog( sal_True, sal_False );
     }
 }
 
@@ -1456,8 +1462,6 @@ void BasicIDEShell::Deactivate( sal_Bool bMDI )
                 break;
             }
         }
-
-        ShowObjectDialog( sal_False, sal_False );
     }
 }
 
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index c4ce84e..87ecb88 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -46,13 +46,6 @@ using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
 namespace css = ::com::sun::star;
 
-IMPL_LINK_NOARG_INLINE_START(BasicIDEShell, ObjectDialogCancelHdl)
-{
-    ShowObjectDialog( sal_False, sal_True );
-    return 0;
-}
-IMPL_LINK_NOARG_INLINE_END(BasicIDEShell, ObjectDialogCancelHdl)
-
 Reference< view::XRenderable > BasicIDEShell::GetRenderable()
 {
     return Reference< view::XRenderable >( new basicide::BasicRenderable( pCurWin ) );
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index e2e1c5a..883d05a 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -190,7 +190,6 @@ void BasicIDEShell::Init()
 
     pCurWin = 0;
     m_aCurDocument = ScriptDocument::getApplicationScriptDocument();
-    pObjectCatalog = 0;
     bCreatingWindow = sal_False;
 
     pTabBar = new BasicIDETabBar( &GetViewFrame()->GetWindow() );
@@ -238,7 +237,6 @@ BasicIDEShell::~BasicIDEShell()
 
     aIDEWindowTable.clear();
     delete pTabBar;
-    delete pObjectCatalog;
     DestroyModulWindowLayout();
 
         ContainerListenerImpl* pListener = static_cast< ContainerListenerImpl* >( 
m_xLibListener.get() );
@@ -532,46 +530,6 @@ void BasicIDEShell::ArrangeTabBar()
 
 
 
-void BasicIDEShell::ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy )
-{
-    if ( bShow )
-    {
-        if ( !pObjectCatalog && bCreateOrDestroy )
-        {
-            pObjectCatalog = new ObjectCatalog( &GetViewFrame()->GetWindow() );
-            // position is memorized in BasicIDEData and adjusted by the Dlg
-            if ( pObjectCatalog )
-            {
-                pObjectCatalog->SetCancelHdl( LINK( this, BasicIDEShell, ObjectDialogCancelHdl ) );
-                pObjectCatalog->SetCurrentEntry(pCurWin);
-            }
-        }
-
-        // the very last changes...
-        if ( pCurWin )
-            pCurWin->StoreData();
-
-        if ( pObjectCatalog )
-        {
-            pObjectCatalog->UpdateEntries();
-            pObjectCatalog->Show();
-        }
-    }
-    else if ( pObjectCatalog )
-    {
-        pObjectCatalog->Hide();
-        if ( bCreateOrDestroy )
-        {
-            // pObjectCatalog to NULL before the delete because of OS/2-focus-problem
-            ObjectCatalog* pTemp = pObjectCatalog;
-            pObjectCatalog = 0;
-            delete pTemp;
-        }
-    }
-}
-
-
-
 void BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
                                         const SfxHint& rHint, const TypeId& )
 {
@@ -584,8 +542,8 @@ void BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
                 case SFX_HINT_DYING:
                 {
                     EndListening( rBC, sal_True /* log off all */ );
-                    if ( pObjectCatalog )
-                        pObjectCatalog->UpdateEntries();
+                    //if ( pObjectCatalog )
+                        //pObjectCatalog->UpdateEntries();
                 }
                 break;
             }
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index 088ff07..2083448 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -306,11 +306,11 @@ void MarkDocumentModified( const ScriptDocument& rDocument )
         pBindings->Update( SID_SAVEDOC );
     }
 
-    // Objectcatalog updaten...
-    BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
-    ObjectCatalog* pObjCatalog = pIDEShell ? pIDEShell->GetObjectCatalog() : 0;
-    if ( pObjCatalog )
-        pObjCatalog->UpdateEntries();
+    //// Objectcatalog updaten...
+    //BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
+    //ObjectCatalog* pObjCatalog = pIDEShell ? pIDEShell->GetObjectCatalog() : 0;
+    //if ( pObjCatalog )
+        //pObjCatalog->UpdateEntries();
 }
 
 //----------------------------------------------------------------------------
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index d46c797..e332ce8 100644
--- a/basctl/source/basicide/iderdll.cxx
+++ b/basctl/source/basicide/iderdll.cxx
@@ -151,7 +151,7 @@ BasicIDEData* BasicIDEDLL::GetExtraData()
     return m_pExtraData;
 }
 
-BasicIDEData::BasicIDEData() : aObjCatPos( INVPOSITION, INVPOSITION )
+BasicIDEData::BasicIDEData()
 {
     nBasicDialogCount = 0;
     bChoosingMacro = sal_False;
diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx
index e20240c..b6ab71f 100644
--- a/basctl/source/basicide/iderdll2.hxx
+++ b/basctl/source/basicide/iderdll2.hxx
@@ -42,9 +42,6 @@ private:
 
     BasicEntryDescriptor    m_aLastEntryDesc;
 
-    Point           aObjCatPos;
-    Size            aObjCatSize;
-
     String          aAddLibPath;
     String          aAddLibFilter;
 
@@ -76,16 +73,6 @@ public:
     SvxSearchItem&          GetSearchItem() const;
     void                    SetSearchItem( const SvxSearchItem& rItem );
 
-    void                    SetObjectCatalogPos( const Point& rPnt )
-                                { aObjCatPos = rPnt; }
-    const Point&            GetObjectCatalogPos() const
-                                { return aObjCatPos; }
-
-    void                    SetObjectCatalogSize( const Size& rSize )
-                                { aObjCatSize = rSize; }
-    const Size&             GetObjectCatalogSize() const
-                                { return aObjCatSize; }
-
     const String&           GetAddLibPath() const   { return aAddLibPath; }
     void                    SetAddLibPath( const String& rPath ) { aAddLibPath = rPath; }
 
diff --git a/basctl/source/basicide/objdlg.cxx b/basctl/source/basicide/objdlg.cxx
index 64935bb..ec3f996 100644
--- a/basctl/source/basicide/objdlg.cxx
+++ b/basctl/source/basicide/objdlg.cxx
@@ -24,6 +24,7 @@
 #include "iderdll.hxx"
 #include "iderdll2.hxx"
 #include "objdlg.hxx"
+#include <helpid.hrc>
 
 #include <sfx2/app.hxx>
 #include <sfx2/dispatch.hxx>
@@ -34,224 +35,107 @@
 #include <vcl/taskpanelist.hxx>
 #include <vcl/sound.hxx>
 
-ObjectCatalog::ObjectCatalog( Window * pParent )
-    :BasicDockingWindow( pParent, IDEResId( RID_BASICIDE_OBJCAT ) )
-    ,aMacroTreeList( this, IDEResId( RID_TLB_MACROS ) )
-    ,aToolBox(this, IDEResId(RID_TB_TOOLBOX))
-    ,aMacroDescr( this, IDEResId( RID_FT_MACRODESCR ) )
+ObjectCatalog::ObjectCatalog (Window* pParent) :
+    BasicDockingWindow(pParent),
+    aTitle(this),
+    aTree(this, IDEResId(RID_TLB_MACROS))
 {
-    FreeResource();
+    SetHelpId("basctl:FloatingWindow:RID_BASICIDE_OBJCAT");
+    SetText(String(IDEResId(RID_BASICIDE_OBJCAT)));
 
-    aToolBox.SetOutStyle( TOOLBOX_STYLE_FLAT );
-    aToolBox.SetSizePixel( aToolBox.CalcWindowSizePixel() );
-    aToolBox.SetSelectHdl( LINK( this, ObjectCatalog, ToolBoxHdl ) );
+    // title
+    aTitle.SetText(String(IDEResId(RID_BASICIDE_OBJCAT)));
+    aTitle.SetStyle(WB_CENTER);
 
-    aMacroTreeList.SetStyle( WB_BORDER | WB_TABSTOP |
-                             WB_HASLINES | WB_HASLINESATROOT |
-                             WB_HASBUTTONS | WB_HASBUTTONSATROOT |
-                             WB_HSCROLL );
+    // tree list
+    aTree.Hide();
+    aTree.SetStyle(
+        WB_BORDER | WB_TABSTOP | WB_HSCROLL |
+        WB_HASLINES | WB_HASLINESATROOT |
+        WB_HASBUTTONS | WB_HASBUTTONSATROOT
+    );
+    aTree.SetAccessibleName(String(IDEResId(RID_STR_TLB_MACROS)));
+    aTree.SetHelpId(HID_BASICIDE_OBJECTCAT);
+    aTree.ScanAllEntries();
+    aTree.GrabFocus();
 
-    aMacroTreeList.SetSelectHdl( LINK( this, ObjectCatalog, TreeListHighlightHdl ) );
-    aMacroTreeList.SetAccessibleName(String(IDEResId(RID_STR_TLB_MACROS)));
-    aMacroTreeList.ScanAllEntries();
-    aMacroTreeList.GrabFocus();
-
-    CheckButtons();
-
-    Point aPos = BasicIDEGlobals::GetExtraData()->GetObjectCatalogPos();
-    Size aSize = BasicIDEGlobals::GetExtraData()->GetObjectCatalogSize();
-    if ( aPos.X() == INVPOSITION )
     {
         // centered after AppWin:
-        Window* pWin = GetParent();
-        aPos = pWin->OutputToScreenPixel( Point( 0, 0 ) );
-        Size aAppWinSz = pWin->GetSizePixel();
-        Size aDlgWinSz = GetSizePixel();
-        aPos.X() += aAppWinSz.Width() / 2;
-        aPos.X() -= aDlgWinSz.Width() / 2;
-        aPos.Y() += aAppWinSz.Height() / 2;
-        aPos.Y() -= aDlgWinSz.Height() / 2;
+        Window const& rParent = *GetParent();
+        Point aPos = rParent.OutputToScreenPixel(Point(0, 0));
+        Size const aParentSize = rParent.GetSizePixel();
+        Size const aSize = GetSizePixel();
+        aPos.X() += (aParentSize.Width() - aSize.Width()) / 2;
+        aPos.Y() += (aParentSize.Height() - aSize.Height()) / 2;
+        SetPosPixel(aPos);
     }
-    SetPosPixel( aPos );
-    if ( aSize.Width() )
-        SetOutputSizePixel( aSize );
-
-    Resize();   // so that the resize-handler arranges the controls
 
     // make object catalog keyboard accessible
-    pParent->GetSystemWindow()->GetTaskPaneList()->AddWindow( this );
-}
-
-ObjectCatalog::~ObjectCatalog()
-{
-    GetParent()->GetSystemWindow()->GetTaskPaneList()->RemoveWindow( this );
+    GetParent()->GetSystemWindow()->GetTaskPaneList()->AddWindow(this);
 }
 
-void ObjectCatalog::Paint( const Rectangle& )
+ObjectCatalog::~ObjectCatalog ()
 {
-    String sOC = GetText();
-    long nPos = GetSizePixel().Width()/2-GetTextWidth(sOC)/2;
-    DrawText( Point( nPos, 10 ), String( sOC ) );
+    GetParent()->GetSystemWindow()->GetTaskPaneList()->RemoveWindow(this);
 }
 
-void ObjectCatalog::Move()
+// Resize() -- called by Window
+void ObjectCatalog::Resize ()
 {
-    BasicIDEGlobals::GetExtraData()->SetObjectCatalogPos( GetPosPixel() );
+    // arranging the controls
+    ArrangeWindows();
 }
 
-sal_Bool ObjectCatalog::Close()
+// ToggleFloatingMode() -- called by DockingWindow when IsFloatingMode() changes
+void ObjectCatalog::ToggleFloatingMode ()
 {
-    aCancelHdl.Call( this );
-    return sal_True;
+    // base class version
+    BasicDockingWindow::ToggleFloatingMode();
+    // rearranging the controls (title)
+    ArrangeWindows();
 }
 
-void ObjectCatalog::Resize()
+// ArrangeWindows() -- arranges the controls to the size of the ObjectCatalog
+void ObjectCatalog::ArrangeWindows ()
 {
-    Size aOutSz = GetOutputSizePixel();
-    BasicIDEGlobals::GetExtraData()->SetObjectCatalogSize( aOutSz );
+    Size const aSize = GetOutputSizePixel();
+    bool const bFloating = IsFloatingMode();
 
-    Point aTreePos = aMacroTreeList.GetPosPixel();
-    Size aDescrSz = aMacroDescr.GetSizePixel();
-
-    Size aTreeSz;
-    long nCtrlWidth = aOutSz.Width() - 2*aTreePos.X();
-    aTreeSz.Width() = nCtrlWidth;
-    aTreeSz.Height() = aOutSz.Height() - aTreePos.Y() -
-                        2*aTreePos.X() - aDescrSz.Height();
-
-    if ( aTreeSz.Height() > 0 )
+    // title
+    // (showing only if no title bar)
+    if (bFloating)
+        aTitle.Hide();
+    else
     {
-        aMacroTreeList.SetSizePixel( aTreeSz );
-
-        Point aDescrPos( aTreePos.X(), aTreePos.Y()+aTreeSz.Height()+aTreePos.X() );
-
-        aMacroDescr.SetPosSizePixel( aDescrPos, Size( nCtrlWidth, aDescrSz.Height() ) );
-
-        String aDesc = aMacroDescr.GetText();
-        aMacroDescr.SetText(String());
-        aMacroDescr.SetText(aDesc);
+        Size aTitleSize = LogicToPixel(Size(3, 10), MAP_APPFONT);
+        aTitleSize.Width() = aSize.Width() - 2*aTitleSize.Width();
+        aTitle.SetPosPixel(LogicToPixel(Point(3, 3), MAP_APPFONT));
+        aTitle.SetSizePixel(aTitleSize);
+        aTitle.Show();
     }
 
-    // the buttons above always stay unmodified
-}
-
-IMPL_LINK( ObjectCatalog, ToolBoxHdl, ToolBox*, pToolBox )
-{
-    sal_uInt16 nCurItem = pToolBox->GetCurItemId();
-    switch ( nCurItem )
+    // tree
+    Point const aTreePos = LogicToPixel(Point(3, bFloating ? 3 : 16), MAP_APPFONT);
+    long const nMargin = aTreePos.X();
+    Size const aTreeSize(
+        aSize.Width() - 2*nMargin,
+        aSize.Height() - aTreePos.Y() - nMargin
+    );
+    if (aTreeSize.Height() > 0)
     {
-        case TBITEM_SHOW:
-        {
-            SfxAllItemSet aArgs( SFX_APP()->GetPool() );
-            SfxRequest aRequest( SID_BASICIDE_APPEAR, SFX_CALLMODE_SYNCHRON, aArgs );
-            SFX_APP()->ExecuteSlot( aRequest );
-
-            SvLBoxEntry* pCurEntry = aMacroTreeList.GetCurEntry();
-            DBG_ASSERT( pCurEntry, "Entry?!" );
-            BasicEntryDescriptor aDesc( aMacroTreeList.GetEntryDescriptor( pCurEntry ) );
-            BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
-            SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
-            SfxDispatcher* pDispatcher = pViewFrame ? pViewFrame->GetDispatcher() : NULL;
-            if ( aDesc.GetType() == OBJ_TYPE_MODULE ||
-                 aDesc.GetType() == OBJ_TYPE_DIALOG ||
-                 aDesc.GetType() == OBJ_TYPE_METHOD )
-            {
-                if( pDispatcher )
-                {
-                    SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), 
aDesc.GetLibName(), aDesc.GetName(),
-                                      aDesc.GetMethodName(), aMacroTreeList.ConvertType( 
aDesc.GetType() ) );
-                    pDispatcher->Execute( SID_BASICIDE_SHOWSBX,
-                                          SFX_CALLMODE_SYNCHRON, &aSbxItem, 0L );
-                }
-            }
-            else
-            {
-                ErrorBox( this, WB_OK, String( IDEResId( RID_STR_OBJNOTFOUND ) ) ).Execute();
-                aMacroTreeList.GetModel()->Remove( pCurEntry );
-                CheckButtons();
-            }
-        }
-        break;
+        aTree.SetPosSizePixel(aTreePos, aTreeSize);
+        aTree.Show();
     }
-
-    return 0;
-}
-
-
-
-void ObjectCatalog::CheckButtons()
-{
-    SvLBoxEntry* pCurEntry = aMacroTreeList.GetCurEntry();
-    BasicEntryType eType = pCurEntry ? ((BasicEntry*)pCurEntry->GetUserData())->GetType() : 
OBJ_TYPE_UNKNOWN;
-    if ( eType == OBJ_TYPE_DIALOG || eType == OBJ_TYPE_MODULE || eType == OBJ_TYPE_METHOD )
-        aToolBox.EnableItem( TBITEM_SHOW, sal_True );
     else
-        aToolBox.EnableItem( TBITEM_SHOW, sal_False );
-}
-
-
-
-IMPL_LINK_INLINE_START( ObjectCatalog, TreeListHighlightHdl, SvTreeListBox *, pBox )
-{
-    if ( pBox->IsSelected( pBox->GetHdlEntry() ) )
-        UpdateFields();
-    return 0;
-}
-IMPL_LINK_INLINE_END( ObjectCatalog, TreeListHighlightHdl, SvTreeListBox *, pBox )
-
-
-void ObjectCatalog::UpdateFields()
-{
-    SvLBoxEntry* pCurEntry = aMacroTreeList.GetCurEntry();
-    if ( pCurEntry )
-    {
-        CheckButtons();
-        aMacroDescr.SetText( String() );
-        SbxVariable* pVar = aMacroTreeList.FindVariable( pCurEntry );
-        if ( pVar )
-        {
-            SbxInfoRef xInfo = pVar->GetInfo();
-            if ( xInfo.Is() )
-                aMacroDescr.SetText( xInfo->GetComment() );
-        }
-    }
-}
-
-
-void ObjectCatalog::UpdateEntries()
-{
-    aMacroTreeList.UpdateEntries();
+        aTree.Hide();
 }
 
 void ObjectCatalog::SetCurrentEntry (IDEBaseWindow* pCurWin)
 {
-    BasicEntryDescriptor aDesc;
+    BasicEntryDescriptor aDescriptor;
     if (pCurWin)
-        aDesc = pCurWin->CreateEntryDescriptor();
-    aMacroTreeList.SetCurrentEntry(aDesc);
-}
-
-ObjectCatalogToolBox_Impl::ObjectCatalogToolBox_Impl(
-    Window * pParent, ResId const & rResId)
-    : ToolBox(pParent, rResId)
-    , m_aImagesNormal(GetImageList())
-{
-    setImages();
-}
-
-// virtual
-void ObjectCatalogToolBox_Impl::DataChanged(DataChangedEvent const & rDCEvt)
-{
-    ToolBox::DataChanged(rDCEvt);
-    if ((rDCEvt.GetType() == DATACHANGED_SETTINGS
-         || rDCEvt.GetType() == DATACHANGED_DISPLAY)
-        && (rDCEvt.GetFlags() & SETTINGS_STYLE) != 0)
-        setImages();
-}
-
-void ObjectCatalogToolBox_Impl::setImages()
-{
-    SetImageList(m_aImagesNormal);
+        aDescriptor = pCurWin->CreateEntryDescriptor();
+    aTree.SetCurrentEntry(aDescriptor);
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/objdlg.hrc b/basctl/source/basicide/objdlg.hrc
index 0e794b2..7a4e7b9 100644
--- a/basctl/source/basicide/objdlg.hrc
+++ b/basctl/source/basicide/objdlg.hrc
@@ -15,18 +15,19 @@
  *   except in compliance with the License. You may obtain a copy of
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
-#ifndef _OBJDLG_HRC
-#define _OBJDLG_HRC
+#ifndef BASCTL_OBJDLG_HRC
+#define BASCTL_OBJDLG_HRC
 
 #include <svl/solar.hrc>
 
 #define RID_BASICIDE_OBJCAT     ( RID_BASICIDE_START + 70 )
-#define RID_FT_MACRODESCR   8
-#define RID_TLB_MACROS     10
-#define RID_TB_TOOLBOX     11
+#define RID_TLB_MACROS          ( RID_BASICIDE_START + 72 )
+//#define RID_FT_TITLE            ( RID_BASICIDE_START + 73 )
+//#define RID_FT_MACRODESCR       ( RID_BASICIDE_START + 74 )
+//#define RID_TB_TOOLBOX     11
 
-#define TBITEM_SHOW     1
+//#define TBITEM_SHOW     1
 
 #define RID_STR_TLB_MACROS      ( RID_BASICIDE_START + 71 )
 
-#endif // _OBJDLG_HXX
+#endif // BASCTL_OBJDLG_HRR
diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx
index f82ae0e..91a4b77 100644
--- a/basctl/source/basicide/objdlg.hxx
+++ b/basctl/source/basicide/objdlg.hxx
@@ -17,57 +17,42 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef _OBJDLG_HXX
-#define _OBJDLG_HXX
+#ifndef BASCTL_OBJDLG_HXX
+#define BASCTL_OBJDLG_HXX
 
 #include <svheader.hxx>
 #include <vcl/floatwin.hxx>
 #include <vcl/toolbox.hxx>
 #include <vcl/fixed.hxx>
-#include "vcl/image.hxx"
+#include <vcl/image.hxx>
 
 #include <bastype2.hxx>
 
-class ObjectCatalogToolBox_Impl: public ToolBox
+//
+// ObjectCatalog -- a docking window that contains the currently loaded macros
+// in a tree structure.
+//
+class ObjectCatalog : public BasicDockingWindow
 {
 public:
-    ObjectCatalogToolBox_Impl(Window * pParent, ResId const & rResId);
+    ObjectCatalog (Window* pParent);
+    virtual ~ObjectCatalog ();
+public:
+    void UpdateEntries () { aTree.UpdateEntries(); }
+    void SetCurrentEntry (IDEBaseWindow* pCurWin);
 
 private:
-    virtual void DataChanged(DataChangedEvent const & rDCEvt);
-
-    void setImages();
+    // title: "Object Catalog"
+    FixedText aTitle;
+    // the tree-list of the objects
+    BasicTreeListBox aTree;
 
-    ImageList m_aImagesNormal;
-};
-
-class ObjectCatalog : public BasicDockingWindow
-{
 private:
-    BasicTreeListBox   aMacroTreeList;
-    ObjectCatalogToolBox_Impl aToolBox;
-    FixedText           aMacroDescr;
-    Link                aCancelHdl;
-
-protected:
-    DECL_LINK( ToolBoxHdl, ToolBox* );
-    void                CheckButtons();
-    DECL_LINK( TreeListHighlightHdl, SvTreeListBox * );
-    void                UpdateFields();
-    virtual void        Move();
-    virtual sal_Bool        Close();
-    virtual void        Resize();
-    virtual void    Paint( const Rectangle& rRect );
-
-public:
-    ObjectCatalog( Window * pParent );
-    virtual ~ObjectCatalog();
-
-    void                UpdateEntries();
-    void                SetCurrentEntry (IDEBaseWindow* pCurWin);
-    void                SetCancelHdl( const Link& rLink ) { aCancelHdl = rLink; }
+    virtual void Resize (); // Window
+    virtual void ToggleFloatingMode (); // DockingWindow
+    void ArrangeWindows ();
 };
 
-#endif  //_OBJDLG_HXX
+#endif // BASCTL_OBJDLG_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/objdlg.src b/basctl/source/basicide/objdlg.src
index 6d4688f..cb0d58f 100644
--- a/basctl/source/basicide/objdlg.src
+++ b/basctl/source/basicide/objdlg.src
@@ -19,61 +19,44 @@
 #include <objdlg.hrc>
 #include <helpid.hrc>
 
-#define MASKCOLOR   MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; };
-
-DockingWindow RID_BASICIDE_OBJCAT
-{
-    HelpID = "basctl:FloatingWindow:RID_BASICIDE_OBJCAT";
-    OutputSize = TRUE ;
-    SVLook = TRUE ;
-    Size = MAP_APPFONT ( 191 , 179 ) ;
-    Text [ en-US ] = "Object Catalog" ;
-    Closeable = TRUE ;
-    Moveable = TRUE ;
-    Sizeable = TRUE ;
-    Zoomable = TRUE ;
-    Hide = TRUE ;
-    ClipChildren = TRUE ;
-    Border = TRUE ;
+//DockingWindow RID_BASICIDE_OBJCAT
+//{
+    //HelpID = "basctl:FloatingWindow:RID_BASICIDE_OBJCAT";
+    //OutputSize = TRUE ;
+    //SVLook = TRUE ;
+    //Size = MAP_APPFONT ( 191 , 179 ) ;
+    //Closeable = TRUE ;
+    //Moveable = TRUE ;
+    //Sizeable = TRUE ;
+    //Zoomable = TRUE ;
+    //Hide = TRUE ;
+    //ClipChildren = TRUE ;
+    //Border = TRUE ;
     Control RID_TLB_MACROS
     {
-        HelpId = HID_BASICIDE_OBJECTCAT ;
-        Border = TRUE ;
-        Pos = MAP_APPFONT ( 3 , 24 ) ;
-        Size = MAP_APPFONT ( 185 , 126 ) ;
+        //HelpId = HID_BASICIDE_OBJECTCAT ;
+        //Border = TRUE ;
+        //Pos = MAP_APPFONT ( 3 , 16 ) ;
+        //Size = MAP_APPFONT ( 185 , 126 ) ;
         TabStop = TRUE ;
     };
-    ToolBox RID_TB_TOOLBOX
-    {
-        HelpId = HID_BASICIDE_OBJECTS ;
-        SVLook = TRUE ;
-        Align = BOXALIGN_TOP ;
-        Pos = MAP_APPFONT ( 4 , 6 ) ;
-        ItemImageList = ImageList
-        {
-            Prefix = "im";
-            MASKCOLOR
-            IdList =
-            {
-                TBITEM_SHOW ;
-            };
-        };
-        ItemList =
-        {
-            ToolBoxItem
-            {
-                Identifier = TBITEM_SHOW ;
-                HelpId = HID_BASICIDE_OBJCAT_SHOW ;
-                Text [ en-US ] = "Show" ;
-            };
-        };
-    };
-    FixedText RID_FT_MACRODESCR
-    {
-        WordBreak = TRUE ;
-        Pos = MAP_APPFONT ( 3 , 156 ) ;
-        Size = MAP_APPFONT ( 185 , 18 ) ;
-    };
+    //FixedText RID_FT_TITLE
+    //{
+        //Pos = MAP_APPFONT(3, 3);
+        //Size = MAP_APPFONT(185, 10);
+        //Text [ en-US ] = "Object Catalog" ;
+    //};
+    //FixedText RID_FT_MACRODESCR
+    //{
+        //WordBreak = TRUE ;
+        //Pos = MAP_APPFONT ( 3 , 156 ) ;
+        //Size = MAP_APPFONT ( 185 , 18 ) ;
+    //};
+//};
+
+String RID_BASICIDE_OBJCAT
+{
+    Text [en-US] = "Object Catalog";
 };
 
 String RID_STR_TLB_MACROS
diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx
index 9caf921..b0437db 100644
--- a/basctl/source/inc/basidesh.hxx
+++ b/basctl/source/inc/basidesh.hxx
@@ -40,7 +40,6 @@ class ModulWindow;
 class ModulWindowLayout;
 class DialogWindow;
 class SdrView;
-class ObjectCatalog;
 class BasicIDETabBar;
 class TabBar;
 class IDEBaseWindow;
@@ -69,8 +68,6 @@ friend class LocalizationMgr;
     friend sal_Bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const 
ScriptDocument& rDocument, const ::rtl::OUString& aLibName );
     friend bool BasicIDE::RemoveDialog( const ScriptDocument& rDocument, const ::rtl::OUString& 
rLibName, const ::rtl::OUString& rDlgName );
 
-    ObjectCatalog*      pObjectCatalog;
-
     IDEWindowTable      aIDEWindowTable;
     sal_uInt16              nCurKey;
     IDEBaseWindow*      pCurWin;
@@ -98,7 +95,6 @@ friend class ContainerListenerImpl;
     void                CheckWindows();
     void                RemoveWindows( const ScriptDocument& rDocument, const ::rtl::OUString& 
rLibName, sal_Bool bDestroy );
     void                UpdateWindows();
-    void                ShowObjectDialog( sal_Bool bShow, sal_Bool bCreateOrDestroy );
     void                InvalidateBasicIDESlots();
     void                StoreAllWindowData( sal_Bool bPersistent = sal_True );
     void                SetMDITitle();
@@ -109,7 +105,6 @@ friend class ContainerListenerImpl;
     void                ImplStartListening( StarBASIC* pBasic );
 
     DECL_LINK( TabBarHdl, TabBar* );
-    DECL_LINK(ObjectDialogCancelHdl, void *);
     DECL_LINK( TabBarSplitHdl, TabBar * );
 #endif
 
@@ -167,7 +162,6 @@ public:
     const ScriptDocument&
                         GetCurDocument() const { return m_aCurDocument; }
     const ::rtl::OUString&       GetCurLibName() const { return m_aCurLibName; }
-    ObjectCatalog*      GetObjectCatalog() const    { return pObjectCatalog; }
     boost::shared_ptr<LocalizationMgr> GetCurLocalizationMgr() const { return 
m_pCurLocalizationMgr; }
 
     ScrollBar&          GetHScrollBar()         { return aHScrollBar; }
-- 
1.7.7


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.