diff options
Diffstat (limited to 'basctl/source/basicide/baside3.cxx')
-rw-r--r-- | basctl/source/basicide/baside3.cxx | 70 |
1 files changed, 34 insertions, 36 deletions
diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 613a05b32673..fdb69631d6fe 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -87,9 +87,7 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::resource; using namespace ::com::sun::star::ui::dialogs; -#if defined(MAC) -#define FILTERMASK_ALL "****" -#elif defined(OW) || defined(MTF) +#if defined(UNX) #define FILTERMASK_ALL "*" #elif defined(PM2) #define FILTERMASK_ALL "" @@ -106,7 +104,7 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St :IDEBaseWindow( pParent, rDocument, aLibName, aName ) ,pUndoMgr(NULL) { - InitSettings( TRUE, TRUE, TRUE ); + InitSettings( sal_True, sal_True, sal_True ); pEditor = new DlgEditor( rDocument.isDocument() ? rDocument.getDocument() : Reference< frame::XModel >() ); pEditor->SetWindow( this ); @@ -126,10 +124,10 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, St ::rtl::OUString aOULibName( aLibName ); Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY ); if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) - SetReadOnly( TRUE ); + SetReadOnly( sal_True ); if ( rDocument.isDocument() && rDocument.isReadOnly() ) - SetReadOnly( TRUE ); + SetReadOnly( sal_True ); } DialogWindow::~DialogWindow() @@ -291,7 +289,7 @@ void DialogWindow::DoScroll( ScrollBar* pCurScrollBar ) void DialogWindow::GetState( SfxItemSet& rSet ) { SfxWhichIter aIter(rSet); - for ( USHORT nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) + for ( sal_uInt16 nWh = aIter.FirstWhich(); 0 != nWh; nWh = aIter.NextWhich() ) { switch ( nWh ) { @@ -337,10 +335,10 @@ void DialogWindow::GetState( SfxItemSet& rSet ) if( IDE_DLL()->GetShell()->GetFrame() ) { rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE, - (pEditor->GetMode() == DLGED_TEST) ? TRUE : FALSE) ); + (pEditor->GetMode() == DLGED_TEST) ? sal_True : sal_False) ); } else - rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,FALSE )); + rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,sal_False )); } break; @@ -357,7 +355,7 @@ void DialogWindow::GetState( SfxItemSet& rSet ) aItem.SetValue( SVX_SNAP_SELECT ); else { - USHORT nObj; + sal_uInt16 nObj; switch( pEditor->GetInsertObj() ) { case OBJ_DLG_PUSHBUTTON: nObj = SVX_SNAP_PUSHBUTTON; break; @@ -637,16 +635,16 @@ Reference< container::XNameContainer > DialogWindow::GetDialog() const return pEditor->GetDialog(); } -BOOL DialogWindow::RenameDialog( const String& rNewName ) +sal_Bool DialogWindow::RenameDialog( const String& rNewName ) { if ( !BasicIDE::RenameDialog( this, GetDocument(), GetLibName(), GetName(), rNewName ) ) - return FALSE; + return sal_False; SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) pBindings->Invalidate( SID_DOC_MODIFIED ); - return TRUE; + return sal_True; } void DialogWindow::DisableBrowser() @@ -669,10 +667,10 @@ void DialogWindow::UpdateBrowser() static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); -BOOL DialogWindow::SaveDialog() +sal_Bool DialogWindow::SaveDialog() { DBG_CHKTHIS( DialogWindow, 0 ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -934,9 +932,9 @@ LanguageMismatchQueryBox::LanguageMismatchQueryBox( Window* pParent, SetImage( QueryBox::GetStandardImage() ); } -BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ) +sal_Bool implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocument& rDocument, const String& aLibName ) { - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; Reference< lang::XMultiServiceFactory > xMSF( ::comphelper::getProcessServiceFactory() ); Reference < XFilePicker > xFP; @@ -1030,7 +1028,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen aQueryBoxText.SearchAndReplace( String( RTL_CONSTASCII_USTRINGPARAM( "$(ARG1)" ) ), aXmlDlgName ); NameClashQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - USHORT nRet = aQueryBox.Execute(); + sal_uInt16 nRet = aQueryBox.Execute(); if( RET_YES == nRet ) { // RET_YES == Rename, see NameClashQueryBox::NameClashQueryBox @@ -1067,7 +1065,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales(); sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength(); - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, TRUE ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); sal_Int32 nLibLocaleCount = 0; Sequence< lang::Locale > aLibLocaleSeq; @@ -1092,7 +1090,7 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen String aQueryBoxTitle( IDEResId( RID_STR_DLGIMP_MISMATCH_TITLE ) ); String aQueryBoxText( IDEResId( RID_STR_DLGIMP_MISMATCH_TEXT ) ); LanguageMismatchQueryBox aQueryBox( pWin, aQueryBoxTitle, aQueryBoxText ); - USHORT nRet = aQueryBox.Execute(); + sal_uInt16 nRet = aQueryBox.Execute(); if( RET_YES == nRet ) { // RET_YES == Add, see LanguageMismatchQueryBox::LanguageMismatchQueryBox @@ -1178,9 +1176,9 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen { if ( BasicIDE::RemoveDialog( rDocument, aLibName, aNewDlgName ) ) { - IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, FALSE, TRUE ); + IDEBaseWindow* pDlgWin = pIDEShell->FindDlgWin( rDocument, aLibName, aNewDlgName, sal_False, sal_True ); if( pDlgWin != NULL ) - pIDEShell->RemoveWindow( pDlgWin, TRUE ); + pIDEShell->RemoveWindow( pDlgWin, sal_True ); BasicIDE::MarkDocumentModified( rDocument ); } else @@ -1223,10 +1221,10 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen if( bSuccess ) { DialogWindow* pNewDlgWin = pIDEShell->CreateDlgWin( rDocument, aLibName, aNewDlgName ); - pIDEShell->SetCurWindow( pNewDlgWin, TRUE ); + pIDEShell->SetCurWindow( pNewDlgWin, sal_True ); } - bDone = TRUE; + bDone = sal_True; } catch( Exception& ) {} @@ -1235,13 +1233,13 @@ BOOL implImportDialog( Window* pWin, const String& rCurPath, const ScriptDocumen return bDone; } -BOOL DialogWindow::ImportDialog() +sal_Bool DialogWindow::ImportDialog() { DBG_CHKTHIS( DialogWindow, 0 ); const ScriptDocument& rDocument = GetDocument(); String aLibName = GetLibName(); - BOOL bRet = implImportDialog( this, aCurPath, rDocument, aLibName ); + sal_Bool bRet = implImportDialog( this, aCurPath, rDocument, aLibName ); return bRet; } @@ -1260,12 +1258,12 @@ DlgEdView* DialogWindow::GetView() const return pEditor ? pEditor->GetView() : NULL; } -BOOL DialogWindow::IsModified() +sal_Bool DialogWindow::IsModified() { return pEditor->IsModified(); } -SfxUndoManager* DialogWindow::GetUndoManager() +::svl::IUndoManager* DialogWindow::GetUndoManager() { return pUndoMgr; } @@ -1284,7 +1282,7 @@ BasicEntryDescriptor DialogWindow::CreateEntryDescriptor() return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG ); } -void DialogWindow::SetReadOnly( BOOL b ) +void DialogWindow::SetReadOnly( sal_Bool b ) { if ( pEditor ) { @@ -1295,19 +1293,19 @@ void DialogWindow::SetReadOnly( BOOL b ) } } -BOOL DialogWindow::IsReadOnly() +sal_Bool DialogWindow::IsReadOnly() { - BOOL bReadOnly = FALSE; + sal_Bool bReadOnly = sal_False; if ( pEditor && pEditor->GetMode() == DLGED_READONLY ) - bReadOnly = TRUE; + bReadOnly = sal_True; return bReadOnly; } -BOOL DialogWindow::IsPasteAllowed() +sal_Bool DialogWindow::IsPasteAllowed() { - return pEditor ? pEditor->IsPasteAllowed() : FALSE; + return pEditor ? pEditor->IsPasteAllowed() : sal_False; } void DialogWindow::StoreData() @@ -1362,14 +1360,14 @@ void DialogWindow::DataChanged( const DataChangedEvent& rDCEvt ) { if( (rDCEvt.GetType()==DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - InitSettings( TRUE, TRUE, TRUE ); + InitSettings( sal_True, sal_True, sal_True ); Invalidate(); } else IDEBaseWindow::DataChanged( rDCEvt ); } -void DialogWindow::InitSettings(BOOL bFont,BOOL bForeground,BOOL bBackground) +void DialogWindow::InitSettings(sal_Bool bFont,sal_Bool bForeground,sal_Bool bBackground) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( bFont ) |