summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2001-11-14 09:53:42 +0000
committerThomas Benisch <tbe@openoffice.org>2001-11-14 09:53:42 +0000
commite453101dfda1b325400550a01923a88d1ba2aa2f (patch)
tree1775ef5491563a90b39deeaef9a1c214c406a75e
parent2bb1651cb0200f51f093d136b7345d930dd6c79e (diff)
#92173# Reimplement Basic password protection UI in Basic IDE
-rw-r--r--basctl/sdi/baside.sdi6
-rw-r--r--basctl/source/basicide/baside3.cxx23
-rw-r--r--basctl/source/basicide/basides1.cxx20
-rw-r--r--basctl/source/basicide/basidesh.cxx6
-rw-r--r--basctl/source/basicide/bastypes.cxx8
5 files changed, 48 insertions, 15 deletions
diff --git a/basctl/sdi/baside.sdi b/basctl/sdi/baside.sdi
index 69f6ca83b01d..89f41a95b404 100644
--- a/basctl/sdi/baside.sdi
+++ b/basctl/sdi/baside.sdi
@@ -288,6 +288,12 @@ SlotIdFile( "basidesh.hrc" )
StateMethod = GetState;
]
+ SID_SHOW_PROPERTYBROWSER
+ [
+ ExecMethod = ExecuteGlobal;
+ StateMethod = GetState;
+ ]
+
// ========================================================
// Nur, wenn BasicFenster oben
// ========================================================
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx
index 00cd5c9bd72d..ec104b9f961c 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: baside3.cxx,v $
*
- * $Revision: 1.20 $
+ * $Revision: 1.21 $
*
- * last change: $Author: tbe $ $Date: 2001-11-12 22:33:30 $
+ * last change: $Author: tbe $ $Date: 2001-11-14 10:51:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -204,6 +204,9 @@ void DialogWindow::Resize()
void DialogWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
pEditor->MouseButtonDown( rMEvt );
+
+ SfxBindings& rBindings = BasicIDE::GetBindings();
+ rBindings.Invalidate( SID_SHOW_PROPERTYBROWSER );
}
@@ -416,6 +419,18 @@ void __EXPORT DialogWindow::GetState( SfxItemSet& rSet )
}
}
break;
+
+ case SID_SHOW_PROPERTYBROWSER:
+ {
+ BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
+ SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
+ if ( pViewFrame && !pViewFrame->HasChildWindow( SID_SHOW_PROPERTYBROWSER ) && !pEditor->GetView()->HasMarkedObj() )
+ rSet.DisableItem( nWh );
+
+ if ( IsReadOnly() )
+ rSet.DisableItem( nWh );
+ }
+ break;
}
}
}
@@ -649,7 +664,7 @@ void DialogWindow::DisableBrowser()
{
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
- SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow(SID_SHOW_BROWSER) : NULL;
+ SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow(SID_SHOW_PROPERTYBROWSER) : NULL;
if( pChildWin )
((PropBrw*)(pChildWin->GetWindow()))->Update( 0 );
}
@@ -658,7 +673,7 @@ void DialogWindow::UpdateBrowser()
{
BasicIDEShell* pIDEShell = IDE_DLL()->GetShell();
SfxViewFrame* pViewFrame = pIDEShell ? pIDEShell->GetViewFrame() : NULL;
- SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow(SID_SHOW_BROWSER) : NULL;
+ SfxChildWindow* pChildWin = pViewFrame ? pViewFrame->GetChildWindow(SID_SHOW_PROPERTYBROWSER) : NULL;
if( pChildWin )
((PropBrw*)(pChildWin->GetWindow()))->Update(GetEditor()->GetView());
}
diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx
index 06d75607ada9..b4e9cb133cfb 100644
--- a/basctl/source/basicide/basides1.cxx
+++ b/basctl/source/basicide/basides1.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basides1.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: tbe $ $Date: 2001-11-12 22:35:27 $
+ * last change: $Author: tbe $ $Date: 2001-11-14 10:51:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -748,6 +748,12 @@ void __EXPORT BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
pTabBar->MakeVisible( pTabBar->GetCurPageId() );
}
break;
+ case SID_SHOW_PROPERTYBROWSER:
+ {
+ GetViewFrame()->ChildWindowExecute( rReq );
+ rReq.Done();
+ }
+ break;
}
}
@@ -973,6 +979,14 @@ void __EXPORT BasicIDEShell::GetState(SfxItemSet &rSet)
GetViewFrame()->GetSlotState( nWh, NULL, &rSet );
}
break;
+ case SID_SHOW_PROPERTYBROWSER:
+ {
+ if ( GetViewFrame()->KnowsChildWindow( nWh ) )
+ rSet.Put( SfxBoolItem( nWh, GetViewFrame()->HasChildWindow( nWh ) ) );
+ else
+ rSet.DisableItem( nWh );
+ }
+ break;
}
}
if ( pCurWin )
@@ -986,7 +1000,7 @@ BOOL BasicIDEShell::HasUIFeature( ULONG nFeature )
if ( (nFeature & BASICIDE_UI_FEATURE_SHOW_BROWSER) == BASICIDE_UI_FEATURE_SHOW_BROWSER )
{
// fade out (in) property browser in module (dialog) windows
- if ( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) )
+ if ( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) && !pCurWin->IsReadOnly() )
bResult = TRUE;
}
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 7555be49d41c..3482b1635bdb 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: basidesh.cxx,v $
*
- * $Revision: 1.19 $
+ * $Revision: 1.20 $
*
- * last change: $Author: tbe $ $Date: 2001-11-12 22:35:27 $
+ * last change: $Author: tbe $ $Date: 2001-11-14 10:51:53 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -137,7 +137,7 @@ SFX_IMPL_INTERFACE( BasicIDEShell, SfxViewShell, IDEResId( RID_STR_IDENAME ) )
SFX_OBJECTBAR_REGISTRATION( SFX_OBJECTBAR_MACRO | SFX_VISIBILITY_STANDARD
| SFX_VISIBILITY_FULLSCREEN | SFX_VISIBILITY_CLIENT, IDEResId( RID_BASICIDE_OBJECTBAR ) );
SFX_CHILDWINDOW_REGISTRATION( SID_SEARCH_DLG );
- SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_BROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER);
+ SFX_FEATURED_CHILDWINDOW_REGISTRATION(SID_SHOW_PROPERTYBROWSER, BASICIDE_UI_FEATURE_SHOW_BROWSER);
SFX_POPUPMENU_REGISTRATION( IDEResId( RID_POPUP_DLGED ) );
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index f632ceb8963e..6e4400a5fdcd 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: bastypes.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: tbe $ $Date: 2001-11-12 22:35:27 $
+ * last change: $Author: tbe $ $Date: 2001-11-14 10:53:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -610,11 +610,9 @@ void __EXPORT BasicIDETabBar::Command( const CommandEvent& rCEvt )
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) )
{
aPopup.EnableItem( aPopup.GetItemId( 0 ), FALSE );
- //aPopup.EnableItem( SID_BASICIDE_NEWMODULE, FALSE );
- //aPopup.EnableItem( SID_BASICIDE_NEWDIALOG, FALSE );
aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, FALSE );
aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, FALSE );
- //aPopup.RemoveDisabledEntries();
+ aPopup.RemoveDisabledEntries();
}
}
}