summaryrefslogtreecommitdiff
path: root/basctl/source
diff options
context:
space:
mode:
authorUray M. János <uray.janos@gmail.com>2012-08-06 14:28:28 +0200
committerAndras Timar <atimar@suse.com>2012-08-07 09:14:22 +0200
commitb0f2d55fe5ae0087079887bff61403afbade2415 (patch)
tree08268a1b01202c4f81dd84589fbd1bdb9819cdf9 /basctl/source
parentef7b382efc1eeb0edd4358be5ad8e4864ae14cc5 (diff)
Basic IDE Object Catalog improvements
Change-Id: I4c3bbf721428e93cdfa8f062f37c5911faba0fa4
Diffstat (limited to 'basctl/source')
-rw-r--r--basctl/source/basicide/baside2.cxx280
-rw-r--r--basctl/source/basicide/baside2.hxx30
-rw-r--r--basctl/source/basicide/baside2b.cxx5
-rw-r--r--basctl/source/basicide/basides1.cxx16
-rw-r--r--basctl/source/basicide/basides2.cxx7
-rw-r--r--basctl/source/basicide/basidesh.cxx52
-rw-r--r--basctl/source/basicide/basobj3.cxx8
-rw-r--r--basctl/source/basicide/iderdll.cxx2
-rw-r--r--basctl/source/basicide/iderdll2.hxx13
-rw-r--r--basctl/source/basicide/objdlg.cxx258
-rw-r--r--basctl/source/basicide/objdlg.hrc13
-rw-r--r--basctl/source/basicide/objdlg.hxx57
-rw-r--r--basctl/source/basicide/objdlg.src59
-rw-r--r--basctl/source/inc/basidesh.hxx8
14 files changed, 299 insertions, 509 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 1eab598b789a..4b0384cc2b9c 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -49,9 +49,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
@@ -1402,23 +1399,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(false),
- bHSplitted(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();
@@ -1473,158 +1472,179 @@ 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 );
}
IMPL_LINK( ModulWindowLayout, SplitHdl, Splitter *, pSplitter )
{
- if ( pSplitter == &aVSplitter )
- bVSplitted = true;
- else
- bHSplitted = 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();
}
@@ -1733,4 +1753,10 @@ void ModulWindowLayout::ToggleObjectCatalog ()
ArrangeWindows();
}
+// Updates the Object Catalog window.
+void ModulWindowLayout::UpdateObjectCatalog ()
+{
+ aObjectCatalog.UpdateEntries();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 24d2f46c6ec5..7c6e57b44efc 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;
- bool bVSplitted;
- 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,10 @@ public:
{ return m_aSyntaxColors[eType]; }
void ToggleObjectCatalog ();
+ bool HasObjectCatalog () const { return aObjectCatalog.IsVisible(); }
+ void UpdateObjectCatalog ();
};
-#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 c3223c670ffe..adb3fc8eb41e 100644
--- a/basctl/source/basicide/baside2b.cxx
+++ b/basctl/source/basicide/baside2b.cxx
@@ -47,8 +47,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
@@ -1515,7 +1518,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 d62d81e86f45..e29f68d9a90e 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( true, false );
}
}
@@ -1456,8 +1462,6 @@ void BasicIDEShell::Deactivate( sal_Bool bMDI )
break;
}
}
-
- ShowObjectDialog( false, false );
}
}
diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx
index 5ff0a814d281..95c5525f4b33 100644
--- a/basctl/source/basicide/basides2.cxx
+++ b/basctl/source/basicide/basides2.cxx
@@ -45,13 +45,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( false, 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 7a9929074152..b9a6e6d8eb68 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 = 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() );
@@ -531,46 +529,6 @@ void BasicIDEShell::ArrangeTabBar()
-void BasicIDEShell::ShowObjectDialog( bool bShow, 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& )
{
@@ -583,8 +541,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;
}
@@ -1024,4 +982,10 @@ void BasicIDEShell::ImplStartListening( StarBASIC* pBasic )
StartListening( pBasic->GetBroadcaster(), sal_True /* log on only once */ );
}
+// Updates the "Object Catalog" window.
+void BasicIDEShell::UpdateObjectCatalog ()
+{
+ pModulLayout->UpdateObjectCatalog();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx
index bc95693bb80b..b04dffe0217e 100644
--- a/basctl/source/basicide/basobj3.cxx
+++ b/basctl/source/basicide/basobj3.cxx
@@ -306,11 +306,9 @@ 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();
+ // updating the Object Catalog
+ if (BasicIDEShell* pIdeShell = BasicIDEGlobals::GetShell())
+ pIdeShell->UpdateObjectCatalog();
}
//----------------------------------------------------------------------------
diff --git a/basctl/source/basicide/iderdll.cxx b/basctl/source/basicide/iderdll.cxx
index bea3841d5204..357a3ddd56de 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 = false;
diff --git a/basctl/source/basicide/iderdll2.hxx b/basctl/source/basicide/iderdll2.hxx
index d2bcaa70aa2f..1ed344c459b8 100644
--- a/basctl/source/basicide/iderdll2.hxx
+++ b/basctl/source/basicide/iderdll2.hxx
@@ -40,9 +40,6 @@ private:
BasicEntryDescriptor m_aLastEntryDesc;
- Point aObjCatPos;
- Size aObjCatSize;
-
String aAddLibPath;
String aAddLibFilter;
@@ -73,16 +70,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 36cac994d643..00fc82cef6e1 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>
@@ -33,224 +34,107 @@
#include <vcl/msgbox.hxx>
#include <vcl/taskpanelist.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)));
+
+ // title
+ aTitle.SetText(String(IDEResId(RID_BASICIDE_OBJCAT)));
+ aTitle.SetStyle(WB_CENTER);
+
+ // 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();
- aToolBox.SetOutStyle( TOOLBOX_STYLE_FLAT );
- aToolBox.SetSizePixel( aToolBox.CalcWindowSizePixel() );
- aToolBox.SetSelectHdl( LINK( this, ObjectCatalog, ToolBoxHdl ) );
-
- aMacroTreeList.SetStyle( WB_BORDER | WB_TABSTOP |
- WB_HASLINES | WB_HASLINESATROOT |
- WB_HASBUTTONS | WB_HASBUTTONSATROOT |
- WB_HSCROLL );
-
- 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 );
-
- Point aTreePos = aMacroTreeList.GetPosPixel();
- Size aDescrSz = aMacroDescr.GetSizePixel();
+ Size const aSize = GetOutputSizePixel();
+ bool const bFloating = IsFloatingMode();
- 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 0e794b215755..8e725baa89a5 100644
--- a/basctl/source/basicide/objdlg.hrc
+++ b/basctl/source/basicide/objdlg.hrc
@@ -15,18 +15,13 @@
* 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 TBITEM_SHOW 1
-
#define RID_STR_TLB_MACROS ( RID_BASICIDE_START + 71 )
+#define RID_TLB_MACROS ( RID_BASICIDE_START + 72 )
-#endif // _OBJDLG_HXX
+#endif // BASCTL_OBJDLG_HRR
diff --git a/basctl/source/basicide/objdlg.hxx b/basctl/source/basicide/objdlg.hxx
index f82ae0e114b3..91a4b7742ffb 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 6d4688f59f03..b08a6b9c5317 100644
--- a/basctl/source/basicide/objdlg.src
+++ b/basctl/source/basicide/objdlg.src
@@ -19,61 +19,14 @@
#include <objdlg.hrc>
#include <helpid.hrc>
-#define MASKCOLOR MaskColor = Color { Red = 0xFFFF; Green = 0x0000; Blue = 0xFFFF; };
+Control RID_TLB_MACROS
+{
+ TabStop = TRUE ;
+};
-DockingWindow RID_BASICIDE_OBJCAT
+String 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 ;
- Control RID_TLB_MACROS
- {
- HelpId = HID_BASICIDE_OBJECTCAT ;
- Border = TRUE ;
- Pos = MAP_APPFONT ( 3 , 24 ) ;
- 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 ) ;
- };
+ 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 579365a27c3a..ed2b120c3cc7 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 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, bool bDestroy );
void UpdateWindows();
- void ShowObjectDialog( bool bShow, bool bCreateOrDestroy );
void InvalidateBasicIDESlots();
void StoreAllWindowData( bool bPersistent = 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; }
@@ -221,6 +215,8 @@ public:
GetCurrentDocument() const;
bool SourceLinesDisplayed();
+ void UpdateObjectCatalog ();
+
};
#endif // _BASIDESH_HXX