summaryrefslogtreecommitdiff
path: root/basctl/source/basicide/moduldlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'basctl/source/basicide/moduldlg.cxx')
-rw-r--r--basctl/source/basicide/moduldlg.cxx103
1 files changed, 52 insertions, 51 deletions
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index 47eed75e88eb..9a29fd200326 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -74,13 +74,13 @@ ExtBasicTreeListBox::~ExtBasicTreeListBox()
{
}
-BOOL ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
+sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if ( pEntry )
{
- USHORT nDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
if ( nDepth >= 2 )
{
BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
@@ -92,7 +92,7 @@ BOOL ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) )
{
// allow editing only for libraries, which are not readonly
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -100,25 +100,25 @@ BOOL ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
return bRet;
}
-BOOL ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
+sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewText )
{
- BOOL bValid = BasicIDE::IsValidSbxName( rNewText );
+ sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText );
if ( !bValid )
{
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
- return FALSE;
+ return sal_False;
}
String aCurText( GetEntryText( pEntry ) );
if ( aCurText == rNewText )
// nothing to do
- return TRUE;
+ return sal_True;
BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isValid(), "ExtBasicTreeListBox::EditedEntry: no document!" );
if ( !aDocument.isValid() )
- return FALSE;
+ return sal_False;
String aLibName( aDesc.GetLibName() );
BasicEntryType eType( aDesc.GetType() );
@@ -127,7 +127,7 @@ BOOL ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewTe
: BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText );
if ( !bSuccess )
- return FALSE;
+ return sal_False;
BasicIDE::MarkDocumentModified( aDocument );
@@ -145,10 +145,10 @@ BOOL ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const String& rNewTe
SetEntryText( pEntry, rNewText );
SetCurEntry( pEntry );
SetCurEntry( pEntry );
- Select( pEntry, FALSE );
+ Select( pEntry, sal_False );
Select( pEntry ); // damit Handler gerufen wird => Edit updaten
- return TRUE;
+ return sal_True;
}
@@ -158,7 +158,7 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo
if ( pEntry )
{
- USHORT nDepth = GetModel()->GetDepth( pEntry );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pEntry );
if ( nDepth >= 2 )
{
nMode_ = SV_DRAGDROP_CTRL_COPY;
@@ -176,7 +176,7 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
{
// Get StringResourceManager
- Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aOULibName, TRUE ) );
+ Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aOULibName, sal_True ) );
Reference< XStringResourceManager > xSourceMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( xSourceMgr.is() )
@@ -192,18 +192,18 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo
}
-BOOL ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
+sal_Bool ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{
// don't drop on a BasicManager (nDepth == 0)
- USHORT nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0;
- BOOL bValid = nDepth ? TRUE : FALSE;
+ sal_uInt16 nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0;
+ sal_Bool bValid = nDepth ? sal_True : sal_False;
// don't drop in the same library
SvLBoxEntry* pSelected = FirstSelected();
if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
- bValid = FALSE;
+ bValid = sal_False;
else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) )
- bValid = FALSE;
+ bValid = sal_False;
// don't drop on a library, which is not loaded, readonly or password protected
// or which already has a module/dialog with this name
@@ -225,14 +225,14 @@ BOOL ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOUDestLibName ) )
{
if ( !xModLibContainer->isLibraryLoaded( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
if ( xModLibContainer->isLibraryReadOnly( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aOUDestLibName ) && !xPasswd->isLibraryPasswordVerified( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
}
// check if dialog library is not loaded or readonly
@@ -240,17 +240,17 @@ BOOL ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOUDestLibName ) )
{
if ( !xDlgLibContainer->isLibraryLoaded( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
if ( xDlgLibContainer->isLibraryReadOnly( aOUDestLibName ) )
- bValid = FALSE;
+ bValid = sal_False;
}
// check, if module/dialog with this name is already existing in target library
if ( ( eSourceType == OBJ_TYPE_MODULE && rDestDoc.hasModule( aDestLibName, aSourceName ) ) ||
( eSourceType == OBJ_TYPE_DIALOG && rDestDoc.hasDialog( aDestLibName, aSourceName ) ) )
{
- bValid = FALSE;
+ bValid = sal_False;
}
}
@@ -258,20 +258,20 @@ BOOL ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
}
-BOOL ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
return NotifyCopyingMoving( pTarget, pEntry,
- rpNewParent, rNewChildPos, TRUE );
+ rpNewParent, rNewChildPos, sal_True );
}
-BOOL ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos )
+sal_Bool ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{
-// return FALSE; // Wie kopiere ich ein SBX ?!
+// return sal_False; // Wie kopiere ich ein SBX ?!
return NotifyCopyingMoving( pTarget, pEntry,
- rpNewParent, rNewChildPos, FALSE );
+ rpNewParent, rNewChildPos, sal_False );
}
@@ -283,14 +283,14 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
return;
// Get StringResourceManager
- Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, TRUE ) );
+ Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, sal_True ) );
Reference< XStringResourceManager > xSourceMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xSourceDialogLib );
if( !xSourceMgr.is() )
return;
bool bSourceLocalized = ( xSourceMgr->getLocales().getLength() > 0 );
- Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, TRUE ) );
+ Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, sal_True ) );
Reference< XStringResourceManager > xDestMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xDestDialogLib );
if( !xDestMgr.is() )
@@ -331,13 +331,13 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
}
-BOOL ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
- SvLBoxEntry*& rpNewParent, ULONG& rNewChildPos, BOOL bMove )
+sal_Bool ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
+ SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos, sal_Bool bMove )
{
(void)pEntry;
DBG_ASSERT( pEntry, "Kein Eintrag?" ); // Hier ASS ok, sollte nicht mit
DBG_ASSERT( pTarget, "Kein Ziel?" ); // NULL (ganz vorne) erreicht werden
- USHORT nDepth = GetModel()->GetDepth( pTarget );
+ sal_uInt16 nDepth = GetModel()->GetDepth( pTarget );
DBG_ASSERT( nDepth, "Tiefe?" );
if ( nDepth == 1 )
{
@@ -477,7 +477,7 @@ BOOL ExtBasicTreeListBox::NotifyCopyingMoving( SvLBoxEntry* pTarget, SvLBoxEntry
return 2; // Aufklappen...
}
-OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescriptor& rDesc )
+OrganizeDialog::OrganizeDialog( Window* pParent, sal_Int16 tabId, BasicEntryDescriptor& rDesc )
:TabDialog( pParent, IDEResId( RID_TD_ORGANIZE ) )
,aTabCtrl( this, IDEResId( RID_TC_ORGANIZE ) )
,m_aCurEntry( rDesc )
@@ -510,7 +510,7 @@ OrganizeDialog::OrganizeDialog( Window* pParent, INT16 tabId, BasicEntryDescript
OrganizeDialog::~OrganizeDialog()
{
- for ( USHORT i = 0; i < aTabCtrl.GetPageCount(); i++ )
+ for ( sal_uInt16 i = 0; i < aTabCtrl.GetPageCount(); i++ )
delete aTabCtrl.GetTabPage( aTabCtrl.GetPageId( i ) );
};
@@ -526,7 +526,7 @@ short OrganizeDialog::Execute()
IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
{
- USHORT nId = pTabCtrl->GetCurPageId();
+ sal_uInt16 nId = pTabCtrl->GetCurPageId();
// Wenn TabPage noch nicht erzeugt wurde, dann erzeugen
if ( !pTabCtrl->GetTabPage( nId ) )
{
@@ -561,7 +561,7 @@ IMPL_LINK( OrganizeDialog, ActivatePageHdl, TabControl *, pTabCtrl )
return 0;
}
-ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, USHORT nMode ) :
+ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, sal_uInt16 nMode ) :
TabPage( pParent, rResId ),
aLibText( this, IDEResId( RID_STR_LIB ) ),
aBasicBox( this, IDEResId( RID_TRLBOX ) ),
@@ -591,11 +591,12 @@ ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, USHORT nMode ) :
}
aBasicBox.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY );
- aBasicBox.EnableInplaceEditing( TRUE );
+ aBasicBox.EnableInplaceEditing( sal_True );
aBasicBox.SetMode( nMode );
- aBasicBox.SetWindowBits( WB_HASLINES | WB_HASLINESATROOT |
- WB_HASBUTTONS | WB_HASBUTTONSATROOT |
- WB_HSCROLL );
+ aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP |
+ WB_HASLINES | WB_HASLINESATROOT |
+ WB_HASBUTTONS | WB_HASBUTTONSATROOT |
+ WB_HSCROLL );
aBasicBox.ScanAllEntries();
aEditButton.GrabFocus();
@@ -625,9 +626,9 @@ void ObjectPage::CheckButtons()
::rtl::OUString aOULibName( aDesc.GetLibName() );
String aLibSubName( aDesc.GetLibSubName() );
sal_Bool bVBAEnabled = aDocument.isInVBAMode();
- USHORT nMode = aBasicBox.GetMode();
+ sal_uInt16 nMode = aBasicBox.GetMode();
- USHORT nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
+ sal_uInt16 nDepth = pCurEntry ? aBasicBox.GetModel()->GetDepth( pCurEntry ) : 0;
if ( nDepth >= 2 )
{
if( bVBAEnabled && ( nMode & BROWSEMODE_MODULES ) && ( nDepth == 2 ) )
@@ -640,7 +641,7 @@ void ObjectPage::CheckButtons()
// enable/disable new module/dialog buttons
LibraryLocation eLocation( aDesc.GetLocation() );
- BOOL bReadOnly = FALSE;
+ sal_Bool bReadOnly = sal_False;
if ( nDepth > 0 )
{
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
@@ -648,7 +649,7 @@ void ObjectPage::CheckButtons()
if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) )
{
- bReadOnly = TRUE;
+ bReadOnly = sal_True;
}
}
if ( bReadOnly || eLocation == LIBRARY_LOCATION_SHARE )
@@ -762,7 +763,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, String& rLibName )
return false;
// check if the module library is loaded
- BOOL bOK = TRUE;
+ sal_Bool bOK = sal_True;
::rtl::OUString aOULibName( rLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
@@ -927,7 +928,7 @@ void ObjectPage::DeleteCurrent()
-void ObjectPage::EndTabDialog( USHORT nRet )
+void ObjectPage::EndTabDialog( sal_uInt16 nRet )
{
DBG_ASSERT( pTabDlg, "TabDlg nicht gesetzt!" );
if ( pTabDlg )