diff options
author | Uray M. János <uray.janos@gmail.com> | 2012-08-07 08:36:40 +0200 |
---|---|---|
committer | Tor Lillqvist <tlillqvist@suse.com> | 2012-08-07 11:01:01 +0300 |
commit | 13b9c0513319623fd56a5a0ead5bdddecf90a10f (patch) | |
tree | 0e20a62643c2c44023222bcc63b451c7c4b6947a /basctl/source | |
parent | 67f688b97aa5afde455674dbe28297a89d817503 (diff) |
IDE: sal_Bool to bool
Convert all occurences of sal_Bool, sal_True and sal_False in basctl
to bool, true and false -- except in prototypes of virtual function
overrides. (The virtual functions that are internal to basctl can be
and was converted.) Note that since sal_Bool and bool are implicitly
convertible to each other, for functions that take a sal_Bool (by
value), true and false can be given too.
Change-Id: Ie44740fa87f89e9fedd913840ca2b38e95e6b957
Diffstat (limited to 'basctl/source')
40 files changed, 445 insertions, 506 deletions
diff --git a/basctl/source/accessibility/accessibledialogcontrolshape.cxx b/basctl/source/accessibility/accessibledialogcontrolshape.cxx index 2546c100fe37..4b8f05d8304c 100644 --- a/basctl/source/accessibility/accessibledialogcontrolshape.cxx +++ b/basctl/source/accessibility/accessibledialogcontrolshape.cxx @@ -76,14 +76,14 @@ AccessibleDialogControlShape::~AccessibleDialogControlShape() // ----------------------------------------------------------------------------- -sal_Bool AccessibleDialogControlShape::IsFocused() +bool AccessibleDialogControlShape::IsFocused() { - sal_Bool bFocused = sal_False; + bool bFocused = false; if ( m_pDialogWindow ) { SdrView* pSdrView = m_pDialogWindow->GetView(); if ( pSdrView && pSdrView->IsObjMarked( m_pDlgEdObj ) && pSdrView->GetMarkedObjectList().GetMarkCount() == 1 ) - bFocused = sal_True; + bFocused = true; } return bFocused; @@ -91,9 +91,9 @@ sal_Bool AccessibleDialogControlShape::IsFocused() // ----------------------------------------------------------------------------- -sal_Bool AccessibleDialogControlShape::IsSelected() +bool AccessibleDialogControlShape::IsSelected() { - sal_Bool bSelected = sal_False; + bool bSelected = false; if ( m_pDialogWindow ) { SdrView* pSdrView = m_pDialogWindow->GetView(); @@ -106,7 +106,7 @@ sal_Bool AccessibleDialogControlShape::IsSelected() // ----------------------------------------------------------------------------- -void AccessibleDialogControlShape::SetFocused( sal_Bool bFocused ) +void AccessibleDialogControlShape::SetFocused( bool bFocused ) { if ( m_bFocused != bFocused ) { @@ -122,7 +122,7 @@ void AccessibleDialogControlShape::SetFocused( sal_Bool bFocused ) // ----------------------------------------------------------------------------- -void AccessibleDialogControlShape::SetSelected( sal_Bool bSelected ) +void AccessibleDialogControlShape::SetSelected( bool bSelected ) { if ( m_bSelected != bSelected ) { diff --git a/basctl/source/accessibility/accessibledialogwindow.cxx b/basctl/source/accessibility/accessibledialogwindow.cxx index 987dbc834798..7c40a3ffff5f 100644 --- a/basctl/source/accessibility/accessibledialogwindow.cxx +++ b/basctl/source/accessibility/accessibledialogwindow.cxx @@ -999,7 +999,7 @@ sal_Bool AccessibleDialogWindow::isAccessibleChildSelected( sal_Int32 nChildInde if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) throw IndexOutOfBoundsException(); - sal_Bool bSelected = sal_False; + bool bSelected = false; if ( m_pDialogWindow ) { DlgEdObj* pDlgEdObj = m_aAccessibleChildren[nChildIndex].pDlgEdObj; @@ -1101,7 +1101,7 @@ void AccessibleDialogWindow::deselectAccessibleChild( sal_Int32 nChildIndex ) th { SdrPageView* pPgView = pSdrView->GetSdrPageView(); if ( pPgView ) - pSdrView->MarkObj( pDlgEdObj, pPgView, sal_True ); + pSdrView->MarkObj( pDlgEdObj, pPgView, true ); } } } diff --git a/basctl/source/basicide/basdoc.cxx b/basctl/source/basicide/basdoc.cxx index 4a3fa90d1099..75f3c6edebfd 100644 --- a/basctl/source/basicide/basdoc.cxx +++ b/basctl/source/basicide/basdoc.cxx @@ -55,7 +55,7 @@ BasicDocShell::~BasicDocShell() delete pPrinter; } -SfxPrinter* BasicDocShell::GetPrinter( sal_Bool bCreate ) +SfxPrinter* BasicDocShell::GetPrinter( bool bCreate ) { if ( !pPrinter && bCreate ) pPrinter = new SfxPrinter( new SfxItemSet( GetPool(), SID_PRINTER_NOTFOUND_WARN , SID_PRINTER_NOTFOUND_WARN ) ); @@ -75,7 +75,7 @@ void BasicDocShell::SetPrinter( SfxPrinter* pPr ) void BasicDocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, String*, sal_Int32, sal_Bool bTemplate) const { (void)bTemplate; - DBG_ASSERT( bTemplate == sal_False, "No template for Basic" ); + DBG_ASSERT( !bTemplate, "No template for Basic" ); } void BasicDocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 ) diff --git a/basctl/source/basicide/basdoc.hxx b/basctl/source/basicide/basdoc.hxx index 60c899fa014a..0c72add19d5e 100644 --- a/basctl/source/basicide/basdoc.hxx +++ b/basctl/source/basicide/basdoc.hxx @@ -40,7 +40,7 @@ protected: String * pFullTypeName, String * pShortTypeName, sal_Int32 nVersion, - sal_Bool bTemplate = sal_False ) const; + sal_Bool bTemplate = false ) const; public: TYPEINFO(); @@ -51,7 +51,7 @@ public: BasicDocShell(); ~BasicDocShell(); - SfxPrinter* GetPrinter( sal_Bool bCreate ); + SfxPrinter* GetPrinter( bool bCreate ); void SetPrinter( SfxPrinter* pPrinter ); }; diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx index 81b2f9d5238f..99ffa2392d73 100644 --- a/basctl/source/basicide/basicbox.cxx +++ b/basctl/source/basicide/basicbox.cxx @@ -201,7 +201,7 @@ void BasicLibBox::ReleaseFocus() void BasicLibBox::FillBox() { - SetUpdateMode( sal_False ); + SetUpdateMode(false); bIgnoreSelect = true; aCurText = GetSelectEntry(); @@ -224,7 +224,7 @@ void BasicLibBox::FillBox() InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT ); } - SetUpdateMode( sal_True ); + SetUpdateMode(true); SelectEntry( aCurText ); if ( !GetSelectEntryCount() ) @@ -290,7 +290,7 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - if ( !HasChildPathFocus( sal_True ) ) + if ( !HasChildPathFocus(true) ) { bIgnoreSelect = true; bFillBox = true; @@ -407,7 +407,7 @@ BasicLanguageBox::~BasicLanguageBox() void BasicLanguageBox::FillBox() { - SetUpdateMode( sal_False ); + SetUpdateMode(false); m_bIgnoreSelect = true; m_sCurrentText = GetSelectEntry(); ClearBox(); @@ -454,7 +454,7 @@ void BasicLanguageBox::FillBox() Disable(); } - SetUpdateMode( sal_True ); + SetUpdateMode(true); m_bIgnoreSelect = false; } diff --git a/basctl/source/basicide/basicmod.hxx b/basctl/source/basicide/basicmod.hxx index 5ee37f8633df..070829e43d16 100644 --- a/basctl/source/basicide/basicmod.hxx +++ b/basctl/source/basicide/basicmod.hxx @@ -28,7 +28,7 @@ class BasicIDEModule : public SfxModule { public: BasicIDEModule( ResMgr *pMgr, SfxObjectFactory *pObjFact) : - SfxModule( pMgr, sal_False, pObjFact, NULL ) + SfxModule( pMgr, false, pObjFact, NULL ) {} }; diff --git a/basctl/source/basicide/basicrenderable.cxx b/basctl/source/basicide/basicrenderable.cxx index dfb42baa84d7..9d58d71db6e2 100644 --- a/basctl/source/basicide/basicrenderable.cxx +++ b/basctl/source/basicide/basicrenderable.cxx @@ -45,7 +45,7 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin ) // create Subgroup for print range vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); - aPrintRangeOpt.mbInternalOnly = sal_True; + aPrintRangeOpt.mbInternalOnly = true; m_aUIProperties[0].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ), rtl::OUString(), aPrintRangeOpt @@ -66,7 +66,7 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin ) 0 ); // create a an Edit dependent on "Pages" selected - vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintContentName, 1, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt(aPrintContentName, 1, true); m_aUIProperties[2].Value = getEditControlOpt( rtl::OUString(), rtl::OUString(), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 4b0384cc2b9c..2fd6660fa571 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -250,13 +250,13 @@ void ModulWindow::CheckCompileBasic() if ( XModule().Is() ) { // never compile while running! - sal_Bool bRunning = StarBASIC::IsRunning(); - sal_Bool bModified = ( !xModule->IsCompiled() || + bool const bRunning = StarBASIC::IsRunning(); + bool const bModified = ( !xModule->IsCompiled() || ( GetEditEngine() && GetEditEngine()->IsModified() ) ); if ( !bRunning && bModified ) { - sal_Bool bDone = sal_False; + bool bDone = false; BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell(); pIDEShell->GetViewFrame()->GetWindow().EnterWait(); @@ -267,11 +267,11 @@ void ModulWindow::CheckCompileBasic() GetEditorWindow().SetSourceInBasic(); } - sal_Bool bWasModified = GetBasic()->IsModified(); + bool bWasModified = GetBasic()->IsModified(); bDone = GetBasic()->Compile( xModule ); if ( !bWasModified ) - GetBasic()->SetModified( sal_False ); + GetBasic()->SetModified(false); if ( bDone ) { @@ -333,16 +333,16 @@ bool ModulWindow::BasicExecute() if ( !pMethod ) { // If not in a method then prompt the user - return ( !BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), sal_False, rtl::OUString() ).isEmpty() ); + return ( !BasicIDE::ChooseMacro( uno::Reference< frame::XModel >(), false, rtl::OUString() ).isEmpty() ); } if ( pMethod ) { pMethod->SetDebugFlags( aStatus.nBasicFlags ); - BasicDLL::SetDebugMode( sal_True ); + BasicDLL::SetDebugMode( true ); BasicIDE::RunMethod( pMethod ); - BasicDLL::SetDebugMode( sal_False ); - // if cancelled during Interactive=sal_False - BasicDLL::EnableBreak( sal_True ); + BasicDLL::SetDebugMode( false ); + // if cancelled during Interactive=false + BasicDLL::EnableBreak( true ); } ClearStatus( BASWIN_RUNNINGBASIC ); } @@ -355,16 +355,12 @@ bool ModulWindow::BasicExecute() return bDone; } -sal_Bool ModulWindow::CompileBasic() +bool ModulWindow::CompileBasic() { DBG_CHKTHIS( ModulWindow, 0 ); CheckCompileBasic(); - sal_Bool bIsCompiled = sal_False; - if ( XModule().Is() ) - bIsCompiled = xModule->IsCompiled(); - - return bIsCompiled; + return XModule().Is() && xModule->IsCompiled(); } bool ModulWindow::BasicRun() @@ -372,16 +368,14 @@ bool ModulWindow::BasicRun() DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = 0; - bool bDone = BasicExecute(); - return bDone; + return BasicExecute(); } bool ModulWindow::BasicStepOver() { DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER; - bool bDone = BasicExecute(); - return bDone; + return BasicExecute(); } @@ -390,8 +384,7 @@ bool ModulWindow::BasicStepInto() DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = SbDEBUG_STEPINTO; - bool bDone = BasicExecute(); - return bDone; + return BasicExecute(); } bool ModulWindow::BasicStepOut() @@ -399,8 +392,7 @@ bool ModulWindow::BasicStepOut() DBG_CHKTHIS( ModulWindow, 0 ); aStatus.nBasicFlags = SbDEBUG_STEPOUT; - bool bDone = BasicExecute(); - return bDone; + return BasicExecute(); } @@ -448,9 +440,9 @@ bool ModulWindow::LoadBasic() sal_uLong nLines = CalcLineCount( *pStream ); // nLines*4: ReadText/Formatting/Highlighting/Formatting GetEditorWindow().CreateProgress( String( IDEResId( RID_STR_GENERATESOURCE ) ), nLines*4 ); - GetEditEngine()->SetUpdateMode( sal_False ); + GetEditEngine()->SetUpdateMode( false ); GetEditView()->Read( *pStream ); - GetEditEngine()->SetUpdateMode( sal_True ); + GetEditEngine()->SetUpdateMode( true ); GetEditorWindow().Update(); GetEditorWindow().ForceSyntaxTimeout(); GetEditorWindow().DestroyProgress(); @@ -483,9 +475,9 @@ bool ModulWindow::SaveBasicSource() } Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); - xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False); + xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false); Any aValue; - aValue <<= (sal_Bool) sal_True; + aValue <<= sal_True; xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); if ( !aCurPath.isEmpty() ) @@ -627,7 +619,7 @@ void ModulWindow::BasicToggleBreakPointEnabled() BreakPoint* pBrk = rList.FindBreakPoint( nLine ); if ( pBrk ) { - pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True; + pBrk->bEnabled = !pBrk->bEnabled; UpdateBreakPoint( *pBrk ); } } @@ -676,9 +668,9 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic ) } ::rtl::OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear()); // if other basic, the IDE should try to display the correct module - sal_Bool bMarkError = ( pBasic == GetBasic() ) ? sal_True : sal_False; + bool const bMarkError = pBasic == GetBasic(); if ( bMarkError ) - aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, sal_True ); + aXEditorWindow.GetBrkWindow().SetMarkerPos(nErrorLine, true); // #i47002# Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( this ); @@ -688,11 +680,11 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic ) // #i47002# Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); if ( !pWindow ) - return sal_False; + return false; if ( bMarkError ) aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER ); - return sal_False; + return false; } long ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) @@ -746,7 +738,7 @@ void ModulWindow::BasicAddWatch() DBG_CHKTHIS( ModulWindow, 0 ); String aWatchStr; AssertValidEditEngine(); - sal_Bool bAdd = sal_True; + bool bAdd = true; if ( !GetEditView()->HasSelection() ) { TextPaM aWordStart; @@ -757,7 +749,7 @@ void ModulWindow::BasicAddWatch() sal_uInt16& rIndex = aSel.GetEnd().GetIndex(); rIndex = rIndex + aWord.getLength(); GetEditView()->SetSelection( aSel ); - bAdd = sal_True; + bAdd = true; } } if ( bAdd ) @@ -814,7 +806,7 @@ void ModulWindow::EditMacro( const String& rMacroName ) long nNewStartY = nStart * pView->GetTextEngine()->GetCharHeight(); nNewStartY = Min( nNewStartY, nMaxY ); pView->Scroll( 0, -(nNewStartY-nOldStartY) ); - pView->ShowCursor( sal_False, sal_True ); + pView->ShowCursor( false, true ); GetEditVScrollBar().SetThumbPos( pView->GetStartDocPos().Y() ); } pView->SetSelection( aSel ); @@ -864,7 +856,7 @@ void ModulWindow::UpdateData() TextSelection aSel = GetEditView()->GetSelection(); setTextEngineText( GetEditEngine(), xModule->GetSource32() ); GetEditView()->SetSelection( aSel ); - GetEditEngine()->SetModified( sal_False ); + GetEditEngine()->SetModified( false ); BasicIDE::MarkDocumentModified( GetDocument() ); } } @@ -897,7 +889,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage ) Font aFont( GetEditEngine()->GetFont() ); aFont.SetAlign( ALIGN_BOTTOM ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aFont.SetSize( Size( 0, 360 ) ); pPrinter->SetFont( aFont ); pPrinter->SetMapMode( MAP_100TH_MM ); @@ -1145,16 +1137,16 @@ void ModulWindow::DoScroll( ScrollBar* pCurScrollBar ) // don't scroll with the value but rather use the Thumb-Pos for the VisArea: long nDiff = GetEditView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos(); GetEditView()->Scroll( nDiff, 0 ); - GetEditView()->ShowCursor( sal_False, sal_True ); + GetEditView()->ShowCursor( false, true ); pCurScrollBar->SetThumbPos( GetEditView()->GetStartDocPos().X() ); } } -sal_Bool ModulWindow::IsModified() +bool ModulWindow::IsModified() { - return GetEditEngine() ? GetEditEngine()->IsModified() : sal_False; + return GetEditEngine() && GetEditEngine()->IsModified(); } @@ -1231,7 +1223,7 @@ sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, pView->SetSelection( TextSelection( TextPaM( 0xFFFFFFFF, 0xFFFF ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); } - sal_Bool bForward = !rSearchItem.GetBackward(); + bool const bForward = !rSearchItem.GetBackward(); sal_uInt16 nFound = 0; if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) || ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) ) @@ -1243,7 +1235,7 @@ sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, { if ( !IsReadOnly() ) { - sal_Bool bAll = rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL; + bool const bAll = rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL; nFound = pView->Replace( rSearchItem.GetSearchOptions() , bAll , bForward ); } } @@ -1346,20 +1338,15 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor() return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aModName, OBJ_TYPE_MODULE ); } -void ModulWindow::SetReadOnly( sal_Bool b ) +void ModulWindow::SetReadOnly (bool b) { if ( GetEditView() ) GetEditView()->SetReadOnly( b ); } -sal_Bool ModulWindow::IsReadOnly() +bool ModulWindow::IsReadOnly() { - sal_Bool bReadOnly = sal_False; - - if ( GetEditView() ) - bReadOnly = GetEditView()->IsReadOnly(); - - return bReadOnly; + return GetEditView() && GetEditView()->IsReadOnly(); } void ModulWindow::SetLineNumberDisplay(bool b) @@ -1372,9 +1359,9 @@ void ModulWindow::SetObjectCatalogDisplay(bool b) aXEditorWindow.SetObjectCatalogDisplay(b); } -sal_Bool ModulWindow::IsPasteAllowed() +bool ModulWindow::IsPasteAllowed() { - sal_Bool bPaste = sal_False; + bool bPaste = false; // get clipboard Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard(); @@ -1389,9 +1376,7 @@ sal_Bool ModulWindow::IsPasteAllowed() datatransfer::DataFlavor aFlavor; SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); if ( xTransf->isDataFlavorSupported( aFlavor ) ) - { - bPaste = sal_True; - } + bPaste = true; } } diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx index 7c6e57b44efc..e3aeeedb5277 100644 --- a/basctl/source/basicide/baside2.hxx +++ b/basctl/source/basicide/baside2.hxx @@ -123,7 +123,7 @@ private: virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > - GetComponentInterface(sal_Bool bCreate = sal_True); + GetComponentInterface(sal_Bool bCreate = true); protected: virtual void Paint( const Rectangle& ); @@ -213,7 +213,7 @@ protected: virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText ); - sal_Bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ); + bool ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ); SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement ); public: @@ -359,8 +359,8 @@ public: virtual ::rtl::OUString GetTitle(); virtual BasicEntryDescriptor CreateEntryDescriptor(); virtual bool AllowUndo(); - virtual void SetReadOnly( sal_Bool bReadOnly ); - virtual sal_Bool IsReadOnly(); + virtual void SetReadOnly (bool bReadOnly); + virtual bool IsReadOnly(); void SetLineNumberDisplay(bool); void SetObjectCatalogDisplay(bool); @@ -371,7 +371,7 @@ public: void SetSbModule( SbModule* pModule ) { xModule = pModule; } ::rtl::OUString GetSbModuleName(); - sal_Bool CompileBasic(); + bool CompileBasic(); bool BasicRun(); bool BasicStepOver(); bool BasicStepInto(); @@ -394,8 +394,8 @@ public: BasicStatus& GetBasicStatus() { return aStatus; } - virtual sal_Bool IsModified(); - virtual sal_Bool IsPasteAllowed(); + virtual bool IsModified (); + virtual bool IsPasteAllowed (); void FrameWindowMoved(); void ShowCursor( bool bOn ); diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index adb3fc8eb41e..9577c65b1f8e 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -288,7 +288,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt ) Point aWindowPos = rHEvt.GetMousePosPixel(); aWindowPos = ScreenToOutputPixel( aWindowPos ); Point aDocPos = GetEditView()->GetDocPos( aWindowPos ); - TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM( aDocPos, sal_False ); + TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM(aDocPos, false); TextPaM aStartOfWord; String aWord = GetEditView()->GetTextEngine()->GetWord( aCursor, &aStartOfWord ); if ( aWord.Len() && !comphelper::string::isdigitAsciiString(aWord) ) @@ -414,7 +414,7 @@ bool EditorWindow::ImpCanModify() // Remove markers in the modules in Notify at Basic::Stoped if ( QueryBox( 0, WB_OK_CANCEL, String( IDEResId( RID_STR_WILLSTOPPRG ) ) ).Execute() == RET_OK ) { - pModulWindow->GetBasicStatus().bIsRunning = sal_False; + pModulWindow->GetBasicStatus().bIsRunning = false; BasicIDE::StopBasic(); } else @@ -435,14 +435,14 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) long nLinSz = pModulWindow->GetHScrollBar()->GetLineSize(); (void)nLinSz; long nThumb = pModulWindow->GetHScrollBar()->GetThumbPos(); (void)nThumb; #endif - sal_Bool bWasModified = pEditEngine->IsModified(); + bool const bWasModified = pEditEngine->IsModified(); // see if there is an accelerator to be processed first - sal_Bool bDone = SfxViewShell::Current()->KeyInput( rKEvt ); + bool bDone = SfxViewShell::Current()->KeyInput( rKEvt ); if ( !bDone && ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) ) { if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() ) - bDone = sal_True; + bDone = true; else { if ( ( rKEvt.GetKeyCode().GetCode() == KEY_TAB ) && !rKEvt.GetKeyCode().IsMod1() && @@ -457,7 +457,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt ) else pEditView->UnindentBlock(); bDelayHighlight = true; - bDone = sal_True; + bDone = true; } } if ( !bDone ) @@ -528,7 +528,7 @@ bool EditorWindow::SetSourceInBasic() String aName = pModulWindow->GetName(); OSL_VERIFY( aDocument.updateModule( aLibName, aName, aModule ) ); - pEditEngine->SetModified( sal_False ); + pEditEngine->SetModified(false); BasicIDE::MarkDocumentModified( aDocument ); bChanged = true; } @@ -563,8 +563,8 @@ void EditorWindow::CreateEditEngine() pEditEngine = new ExtTextEngine; pEditView = new ExtTextView( pEditEngine, this ); - pEditView->SetAutoIndentMode( sal_True ); - pEditEngine->SetUpdateMode( sal_False ); + pEditView->SetAutoIndentMode(true); + pEditEngine->SetUpdateMode(false); pEditEngine->InsertView( pEditView ); ImplSetFont(); @@ -596,15 +596,15 @@ void EditorWindow::CreateEditEngine() pEditView->SetSelection( TextSelection() ); pModulWindow->GetBreakPointWindow().GetCurYOffset() = 0; pModulWindow->GetLineNumberWindow().GetCurYOffset() = 0; - pEditEngine->SetUpdateMode( sal_True ); - Update(); // has only been invalidated at UpdateMode = sal_True + pEditEngine->SetUpdateMode(true); + Update(); // has only been invalidated at UpdateMode = true pModulWindow->GetLayout()->GetWatchWindow().Update(); pModulWindow->GetLayout()->GetStackWindow().Update(); pModulWindow->GetBreakPointWindow().Update(); pModulWindow->GetLineNumberWindow().Update(); - pEditView->ShowCursor( sal_True, sal_True ); + pEditView->ShowCursor( true, true ); StartListening( *pEditEngine ); @@ -619,8 +619,8 @@ void EditorWindow::CreateEditEngine() DELETEZ( pProgress ); pEditView->EraseVirtualDevice(); - pEditEngine->SetModified( sal_False ); - pEditEngine->EnableUndo( sal_True ); + pEditEngine->SetModified( false ); + pEditEngine->EnableUndo( true ); InitScrollBars(); @@ -636,11 +636,11 @@ void EditorWindow::CreateEditEngine() Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) { - pModulWindow->SetReadOnly( sal_True ); + pModulWindow->SetReadOnly(true); } if ( aDocument.isDocument() && aDocument.isReadOnly() ) - pModulWindow->SetReadOnly( sal_True ); + pModulWindow->SetReadOnly(true); } // virtual @@ -781,8 +781,8 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine ) aSyntaxIdleTimer.Start(); } - sal_Bool bWasModified = pEditEngine->IsModified(); - pEditEngine->RemoveAttribs( nLine, sal_True ); + bool const bWasModified = pEditEngine->IsModified(); + pEditEngine->RemoveAttribs( nLine, true ); HighlightPortions aPortions; aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); @@ -790,7 +790,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine ) { HighlightPortion& r = aPortions[i]; const Color& rColor = dynamic_cast<ModulWindowLayout*>(pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType); - pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, sal_True ); + pEditEngine->SetAttrib( TextAttribFontColor( rColor ), nLine, r.nBegin, r.nEnd, true ); } pEditEngine->SetModified( bWasModified ); @@ -822,7 +822,7 @@ void EditorWindow::ImplSetFont() if ( pEditEngine ) { - sal_Bool bModified = pEditEngine->IsModified(); + bool const bModified = pEditEngine->IsModified(); pEditEngine->SetFont( aFont ); pEditEngine->SetModified( bModified ); } @@ -864,8 +864,8 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl) { DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" ); - sal_Bool bWasModified = pEditEngine->IsModified(); - // pEditEngine->SetUpdateMode( sal_False ); + bool const bWasModified = pEditEngine->IsModified(); + //pEditEngine->SetUpdateMode(false); bHighlightning = true; for ( SyntaxLineSet::const_iterator it = aSyntaxLineTable.begin(); @@ -877,7 +877,7 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl) // #i45572# if ( pEditView ) - pEditView->ShowCursor( sal_False, sal_True ); + pEditView->ShowCursor( false, true ); pEditEngine->SetModified( bWasModified ); @@ -1095,7 +1095,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt ) { case RID_ACTIV: { - pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True; + pBrk->bEnabled = !pBrk->bEnabled; pModulWindow->UpdateBreakPoint( *pBrk ); Invalidate(); } @@ -1207,7 +1207,7 @@ WatchWindow::WatchWindow( Window* pParent ) : nHeaderBarHeight = 16; aTreeListBox.SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST); - aTreeListBox.EnableInplaceEditing( sal_True ); + aTreeListBox.EnableInplaceEditing(true); aTreeListBox.SetSelectHdl( LINK( this, WatchWindow, TreeListHdl ) ); aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight + nHeaderBarHeight ) ); aTreeListBox.SetHighlightRange( 1, 5 ); @@ -1390,11 +1390,11 @@ void WatchWindow::AddWatch( const String& rVName ) String aWatchStr_( aVar ); aWatchStr_ += String( RTL_CONSTASCII_USTRINGPARAM( "\t\t" ) ); - SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, sal_True, LIST_APPEND ); + SvLBoxEntry* pNewEntry = aTreeListBox.InsertEntry( aWatchStr_, 0, true, LIST_APPEND ); pNewEntry->SetUserData( pWatchItem ); - aTreeListBox.Select( pNewEntry, sal_True ); - aTreeListBox.MakeVisible( pNewEntry ); + aTreeListBox.Select(pNewEntry, true); + aTreeListBox.MakeVisible(pNewEntry); aRemoveWatchButton.Enable(); } @@ -1523,7 +1523,7 @@ StackWindow::StackWindow( Window* pParent ) : aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) ); aTreeListBox.SetHighlightRange(); aTreeListBox.SetSelectionMode( NO_SELECTION ); - aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND ); + aTreeListBox.InsertEntry( String(), 0, false, LIST_APPEND ); aTreeListBox.Show(); SetText( String( IDEResId( RID_STR_STACKNAME ) ) ); @@ -1568,7 +1568,7 @@ void StackWindow::Resize() void StackWindow::UpdateCalls() { - aTreeListBox.SetUpdateMode( sal_False ); + aTreeListBox.SetUpdateMode(false); aTreeListBox.Clear(); if ( StarBASIC::IsRunning() ) @@ -1614,7 +1614,7 @@ void StackWindow::UpdateCalls() } aEntry += ')'; } - aTreeListBox.InsertEntry( aEntry, 0, sal_False, LIST_APPEND ); + aTreeListBox.InsertEntry( aEntry, 0, false, LIST_APPEND ); nScope++; pMethod = StarBASIC::GetActiveMethod( nScope ); } @@ -1626,10 +1626,10 @@ void StackWindow::UpdateCalls() else { aTreeListBox.SetSelectionMode( NO_SELECTION ); - aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND ); + aTreeListBox.InsertEntry( String(), 0, false, LIST_APPEND ); } - aTreeListBox.SetUpdateMode( sal_True ); + aTreeListBox.SetUpdateMode(true); } ComplexEditorWindow::ComplexEditorWindow( ModulWindow* pParent ) : @@ -1691,7 +1691,7 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar ) aEdtWindow.GetEditView()->Scroll( 0, nDiff ); aBrkWindow.DoScroll( 0, nDiff ); aLineNumberWindow.DoScroll(0, nDiff); - aEdtWindow.GetEditView()->ShowCursor( sal_False, sal_True ); + aEdtWindow.GetEditView()->ShowCursor(false, true); pCurScrollBar->SetThumbPos( aEdtWindow.GetEditView()->GetStartDocPos().Y() ); } @@ -1921,7 +1921,7 @@ sal_Bool WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); - sal_Bool bEdit = sal_False; + bool bEdit = false; if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() ) { // No out of scope entries @@ -1934,7 +1934,7 @@ sal_Bool WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { aEditingRes = SvHeaderTabListBox::GetEntryText( pEntry, ITEM_ID_VALUE-1 ); aEditingRes = comphelper::string::strip(aEditingRes, ' '); - bEdit = sal_True; + bEdit = true; } } } @@ -1955,16 +1955,10 @@ sal_Bool WatchTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString if( cFirst == '\"' && cLast == '\"' ) aResult = aResult.Copy( 1, nResultLen - 2 ); - bool bResModified = ( aResult != aEditingRes ); - sal_Bool bRet = sal_False; - - if ( bResModified ) - bRet = ImplBasicEntryEdited( pEntry, aResult ); - - return bRet; + return aResult != aEditingRes && ImplBasicEntryEdited(pEntry, aResult); } -sal_Bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ) +bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ) { bool bArrayElement; SbxBase* pSBX = ImplGetSBXForEntry( pEntry, bArrayElement ); @@ -1991,7 +1985,7 @@ sal_Bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const Stri // The text should never be taken/copied 1:1, // as the UpdateWatches will be lost - return sal_False; + return false; } diff --git a/basctl/source/basicide/baside3.cxx b/basctl/source/basicide/baside3.cxx index 6083fbd30cb6..adf4581e9ecd 100644 --- a/basctl/source/basicide/baside3.cxx +++ b/basctl/source/basicide/baside3.cxx @@ -92,10 +92,10 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, :: // set readonly mode for readonly libraries Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY ); if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) ) - SetReadOnly( sal_True ); + SetReadOnly(true); if ( rDocument.isDocument() && rDocument.isReadOnly() ) - SetReadOnly( sal_True ); + SetReadOnly(true); } DialogWindow::~DialogWindow() @@ -311,13 +311,9 @@ void DialogWindow::GetState( SfxItemSet& rSet ) case SID_DIALOG_TESTMODE: { // is the IDE still active? - if( BasicIDEGlobals::GetShell()->GetFrame() ) - { - rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE, - (pEditor->GetMode() == DLGED_TEST) ? sal_True : sal_False) ); - } - else - rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,sal_False )); + bool const bBool = BasicIDEGlobals::GetShell()->GetFrame() && + pEditor->GetMode() == DLGED_TEST; + rSet.Put(SfxBoolItem(SID_DIALOG_TESTMODE, bBool)); } break; @@ -709,9 +705,9 @@ bool DialogWindow::SaveDialog() } Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); - xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False); + xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false); Any aValue; - aValue <<= (sal_Bool) sal_True; + aValue <<= sal_True; xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); if ( !aCurPath.isEmpty() ) @@ -796,7 +792,7 @@ bool DialogWindow::SaveDialog() ::rtl::OUString aDialogName( aURLObj.getName() ); aURLObj.removeSegment(); ::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); - sal_Bool bReadOnly = sal_False; + bool bReadOnly = false; ::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " )); aComment += aDialogName; aComment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " strings" )); @@ -971,9 +967,9 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri } Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); - xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False); + xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false); Any aValue; - aValue <<= (sal_Bool) sal_True; + aValue <<= sal_True; xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); ::rtl::OUString aCurPath( rCurPath ); @@ -1088,7 +1084,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales(); sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength(); - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) ); Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); sal_Int32 nLibLocaleCount = 0; Sequence< lang::Locale > aLibLocaleSeq; @@ -1280,7 +1276,7 @@ DlgEdView* DialogWindow::GetView() const return pEditor ? pEditor->GetView() : NULL; } -sal_Bool DialogWindow::IsModified() +bool DialogWindow::IsModified() { return pEditor->IsModified(); } @@ -1304,30 +1300,20 @@ BasicEntryDescriptor DialogWindow::CreateEntryDescriptor() return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG ); } -void DialogWindow::SetReadOnly( sal_Bool b ) +void DialogWindow::SetReadOnly (bool bReadOnly) { - if ( pEditor ) - { - if ( b ) - pEditor->SetMode( DLGED_READONLY ); - else - pEditor->SetMode( DLGED_SELECT ); - } + if (pEditor) + pEditor->SetMode(bReadOnly ? DLGED_READONLY : DLGED_SELECT); } -sal_Bool DialogWindow::IsReadOnly() +bool DialogWindow::IsReadOnly () { - sal_Bool bReadOnly = sal_False; - - if ( pEditor && pEditor->GetMode() == DLGED_READONLY ) - bReadOnly = sal_True; - - return bReadOnly; + return pEditor && pEditor->GetMode() == DLGED_READONLY; } -sal_Bool DialogWindow::IsPasteAllowed() +bool DialogWindow::IsPasteAllowed() { - return pEditor ? pEditor->IsPasteAllowed() : sal_False; + return pEditor && pEditor->IsPasteAllowed(); } void DialogWindow::StoreData() diff --git a/basctl/source/basicide/basides1.cxx b/basctl/source/basicide/basides1.cxx index e29f68d9a90e..f48d56bf004f 100644 --- a/basctl/source/basicide/basides1.cxx +++ b/basctl/source/basicide/basides1.cxx @@ -79,7 +79,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq ) { case SID_SHOWLINES: { - SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), sal_False); + SFX_REQUEST_ARG(rReq, pItem, SfxBoolItem, rReq.GetSlot(), false); bool bValue = false; if ( pItem ) bValue = pItem->GetValue(); @@ -317,7 +317,8 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { uno::Reference< task::XStatusIndicator > xStatusIndicator; - SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, SID_PROGRESS_STATUSBAR_CONTROL, sal_False ); + SFX_REQUEST_ARG( rReq, pStatusIndicatorItem, SfxUnoAnyItem, + SID_PROGRESS_STATUSBAR_CONTROL, false ); if ( pStatusIndicatorItem ) OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator ); else @@ -379,7 +380,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) break; case SID_BASICIDE_CHOOSEMACRO: { - BasicIDE::ChooseMacro( NULL, sal_False, ::rtl::OUString() ); + BasicIDE::ChooseMacro( NULL, false, ::rtl::OUString() ); } break; case SID_BASICIDE_CREATEMACRO: @@ -392,7 +393,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); - StartListening( *pBasMgr, sal_True /* log on only once */ ); + StartListening( *pBasMgr, true /* log on only once */ ); ::rtl::OUString aLibName( rInfo.GetLib() ); if ( aLibName.isEmpty() ) aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")); @@ -420,7 +421,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) ::rtl::OUString aModName = rInfo.GetModule(); ::rtl::OUString sModuleCode; - if ( aDocument.createModule( aLibName, aModName, sal_False, sModuleCode ) ) + if ( aDocument.createModule( aLibName, aModName, false, sModuleCode ) ) pModule = pBasic->FindModule( aModName ); } else @@ -552,7 +553,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) aDocument.loadLibraryIfExists( E_DIALOGS, aLibName ); // check password, if library is password protected and not verified - sal_Bool bOK = sal_True; + bool bOK = true; Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) ) { @@ -573,7 +574,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) // adjust old value... SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) - pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False ); + pBindings->Invalidate(SID_BASICIDE_LIBSELECTOR, true, false); } } else if ( nSlot == SID_BASICIDE_LIBREMOVED ) @@ -678,7 +679,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) { ::std::auto_ptr< ScriptDocument > pDocument; - SFX_REQUEST_ARG( rReq, pDocumentItem, SfxStringItem, SID_BASICIDE_ARG_DOCUMENT, sal_False ); + SFX_REQUEST_ARG( rReq, pDocumentItem, SfxStringItem, SID_BASICIDE_ARG_DOCUMENT, false ); if ( pDocumentItem ) { ::rtl::OUString sDocumentCaption = pDocumentItem->GetValue(); @@ -686,7 +687,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) pDocument.reset( new ScriptDocument( ScriptDocument::getDocumentWithURLOrCaption( sDocumentCaption ) ) ); } - SFX_REQUEST_ARG( rReq, pDocModelItem, SfxUsrAnyItem, SID_BASICIDE_ARG_DOCUMENT_MODEL, sal_False ); + SFX_REQUEST_ARG( rReq, pDocModelItem, SfxUsrAnyItem, SID_BASICIDE_ARG_DOCUMENT_MODEL, false ); if ( !pDocument.get() && pDocModelItem ) { uno::Reference< frame::XModel > xModel( pDocModelItem->GetValue(), UNO_QUERY ); @@ -697,21 +698,21 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) if ( !pDocument.get() ) break; - SFX_REQUEST_ARG( rReq, pLibNameItem, SfxStringItem, SID_BASICIDE_ARG_LIBNAME, sal_False ); + SFX_REQUEST_ARG( rReq, pLibNameItem, SfxStringItem, SID_BASICIDE_ARG_LIBNAME, false ); if ( !pLibNameItem ) break; ::rtl::OUString aLibName( pLibNameItem->GetValue() ); pDocument->loadLibraryIfExists( E_SCRIPTS, aLibName ); SetCurLib( *pDocument, aLibName ); - SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_BASICIDE_ARG_NAME, sal_False ); + SFX_REQUEST_ARG( rReq, pNameItem, SfxStringItem, SID_BASICIDE_ARG_NAME, false ); if ( pNameItem ) { ::rtl::OUString aName( pNameItem->GetValue() ); ::rtl::OUString aModType(RTL_CONSTASCII_USTRINGPARAM("Module")); ::rtl::OUString aDlgType(RTL_CONSTASCII_USTRINGPARAM("Dialog")); ::rtl::OUString aType( aModType ); - SFX_REQUEST_ARG( rReq, pTypeItem, SfxStringItem, SID_BASICIDE_ARG_TYPE, sal_False ); + SFX_REQUEST_ARG( rReq, pTypeItem, SfxStringItem, SID_BASICIDE_ARG_TYPE, false ); if ( pTypeItem ) aType = pTypeItem->GetValue(); @@ -730,7 +731,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) if ( pWin->ISA( ModulWindow ) ) { ModulWindow* pModWin = (ModulWindow*)pWin; - SFX_REQUEST_ARG( rReq, pLineItem, SfxUInt32Item, SID_BASICIDE_ARG_LINE, sal_False ); + SFX_REQUEST_ARG( rReq, pLineItem, SfxUInt32Item, SID_BASICIDE_ARG_LINE, false ); if ( pLineItem ) { pModWin->AssertValidEditEngine(); @@ -759,11 +760,11 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) long nNewY = nLine * pTextEngine->GetCharHeight() - nVisHeight / 2; nNewY = ::std::min( nNewY, nMaxY ); pTextView->Scroll( 0, -( nNewY - nOldY ) ); - pTextView->ShowCursor( sal_False, sal_True ); + pTextView->ShowCursor( false, true ); pModWin->GetEditVScrollBar().SetThumbPos( pTextView->GetStartDocPos().Y() ); } sal_uInt16 nCol1 = 0, nCol2 = 0; - SFX_REQUEST_ARG( rReq, pCol1Item, SfxUInt16Item, SID_BASICIDE_ARG_COLUMN1, sal_False ); + SFX_REQUEST_ARG( rReq, pCol1Item, SfxUInt16Item, SID_BASICIDE_ARG_COLUMN1, false ); if ( pCol1Item ) { nCol1 = pCol1Item->GetValue(); @@ -771,7 +772,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq ) --nCol1; nCol2 = nCol1; } - SFX_REQUEST_ARG( rReq, pCol2Item, SfxUInt16Item, SID_BASICIDE_ARG_COLUMN2, sal_False ); + SFX_REQUEST_ARG( rReq, pCol2Item, SfxUInt16Item, SID_BASICIDE_ARG_COLUMN2, false ); if ( pCol2Item ) { nCol2 = pCol2Item->GetValue(); @@ -819,7 +820,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) ) { rSet.DisableItem( nWh ); - rSet.Put(SfxVisibilityItem(nWh, sal_False)); + rSet.Put(SfxVisibilityItem(nWh, false)); } else rSet.Put( SfxBoolItem( nWh, lcl_GetSourceLinesEnabledValue() ) ); @@ -832,7 +833,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_SAVEDOC: { - sal_Bool bDisable = sal_False; + bool bDisable = false; if ( pCurWin ) { @@ -845,7 +846,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) } else { - bDisable = sal_True; + bDisable = true; } if ( bDisable ) @@ -883,14 +884,14 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) ) { rSet.DisableItem( nWh ); - rSet.Put(SfxVisibilityItem(nWh, sal_False)); + rSet.Put(SfxVisibilityItem(nWh, false)); } else { if (nWh == SID_BASICIDE_OBJCAT) rSet.Put(SfxBoolItem(nWh, pModulLayout && pModulLayout->HasObjectCatalog())); else - rSet.Put(SfxVisibilityItem(nWh, sal_True)); + rSet.Put(SfxVisibilityItem(nWh, true)); } break; } @@ -983,7 +984,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_SEARCH_ITEM: { - ::rtl::OUString aSelected = GetSelectionText( sal_True ); + ::rtl::OUString aSelected = GetSelectionText(true); SvxSearchItem& rItem = BasicIDEGlobals::GetExtraData()->GetSearchItem(); rItem.SetSearchString( aSelected ); rSet.Put( rItem ); @@ -998,12 +999,12 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) break; case SID_DOC_MODIFIED: { - sal_Bool bModified = sal_False; + bool bModified = false; if ( pCurWin ) { if ( pCurWin->IsModified() ) - bModified = sal_True; + bModified = true; else { ScriptDocument aDocument( pCurWin->GetDocument() ); @@ -1094,7 +1095,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) ) { rSet.DisableItem( nWh ); - rSet.Put(SfxVisibilityItem(nWh, sal_False)); + rSet.Put(SfxVisibilityItem(nWh, false)); } break; } @@ -1106,13 +1107,13 @@ void BasicIDEShell::GetState(SfxItemSet &rSet) sal_Bool BasicIDEShell::HasUIFeature( sal_uInt32 nFeature ) { - sal_Bool bResult = sal_False; + bool bResult = false; 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 ) ) && !pCurWin->IsReadOnly() ) - bResult = sal_True; + bResult = true; } return bResult; @@ -1325,7 +1326,7 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic ) if ( StarBASIC::IsRunning() ) // if cancelled... { if ( bAppWindowDisabled ) - Application::GetDefDialogParent()->Enable( sal_False ); + Application::GetDefDialogParent()->Enable(false); if ( nWaitCount ) { @@ -1369,7 +1370,7 @@ ModulWindow* BasicIDEShell::ShowActiveModuleWindow( StarBASIC* pBasic ) } BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic ); if ( pBasicMgr ) - StartListening( *pBasicMgr, sal_True /* log on only once */ ); + StartListening( *pBasicMgr, true /* log on only once */ ); return pWin; } return 0; @@ -1437,8 +1438,8 @@ void BasicIDEShell::Activate( sal_Bool bMDI ) void BasicIDEShell::Deactivate( sal_Bool bMDI ) { - // bMDI sal_True means that another MDI has been activated; in case of a - // deactivate due to a MessageBox bMDI is FALSE + // bMDI == true means that another MDI has been activated; in case of a + // deactivate due to a MessageBox bMDI is false if ( bMDI ) { if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) ) diff --git a/basctl/source/basicide/basides2.cxx b/basctl/source/basicide/basides2.cxx index 95c5525f4b33..c49e8cfa9938 100644 --- a/basctl/source/basicide/basides2.cxx +++ b/basctl/source/basicide/basides2.cxx @@ -52,12 +52,12 @@ Reference< view::XRenderable > BasicIDEShell::GetRenderable() sal_Bool BasicIDEShell::HasSelection( sal_Bool /* bText */ ) const { - sal_Bool bSel = sal_False; + bool bSel = false; if ( pCurWin && pCurWin->ISA( ModulWindow ) ) { TextView* pEditView = ((ModulWindow*)pCurWin)->GetEditView(); if ( pEditView && pEditView->HasSelection() ) - bSel = sal_True; + bSel = true; } return bSel; } @@ -134,7 +134,7 @@ void BasicIDEShell::SetMDITitle() if ( pShell && !pShell->GetTitle( SFX_TITLE_CAPTION ).Equals(aTitle) ) { pShell->SetTitle( aTitle ); - pShell->SetModified( sal_False ); + pShell->SetModified(false); } css::uno::Reference< css::frame::XController > xController = GetController (); @@ -193,7 +193,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const if ( rDocument.hasModule( aLibName, aModName ) ) bSuccess = rDocument.getModule( aLibName, aModName, aModule ); else - bSuccess = rDocument.createModule( aLibName, aModName, sal_True, aModule ); + bSuccess = rDocument.createModule( aLibName, aModName, true, aModule ); if ( bSuccess ) { diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx index b9a6e6d8eb68..7a8d733130ee 100644 --- a/basctl/source/basicide/basidesh.cxx +++ b/basctl/source/basicide/basidesh.cxx @@ -78,7 +78,7 @@ public: { try { - uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, sal_False ), uno::UNO_QUERY ); + uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, false ), uno::UNO_QUERY ); if ( xContainer.is() ) { uno::Reference< container::XContainerListener > xContainerListener( this ); @@ -91,7 +91,7 @@ public: { try { - uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, sal_False ), uno::UNO_QUERY ); + uno::Reference< container::XContainer > xContainer( rScriptDocument.getLibrary( E_SCRIPTS, aLibName, false ), uno::UNO_QUERY ); if ( xContainer.is() ) { uno::Reference< container::XContainerListener > xContainerListener( this ); @@ -155,7 +155,7 @@ BasicIDEShell::BasicIDEShell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ), aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ), aScrollBarBox( &GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE ) ), - m_bAppBasicModified( sal_False ), + m_bAppBasicModified( false ), m_aNotifier( *this ) { m_xLibListener = new ContainerListenerImpl( this ); @@ -174,7 +174,7 @@ void BasicIDEShell::Init() SvxSimpleUndoRedoController::RegisterControl( SID_UNDO ); SvxSimpleUndoRedoController::RegisterControl( SID_REDO ); - SvxSearchDialogWrapper::RegisterChildWindow( sal_False ); + SvxSearchDialogWrapper::RegisterChildWindow(false); BasicIDEGlobals::GetExtraData()->ShellInCriticalSection() = true; @@ -342,7 +342,7 @@ void BasicIDEShell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/ { SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) - pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False ); + pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, true, false ); SetMDITitle(); } @@ -369,7 +369,7 @@ void BasicIDEShell::StoreAllWindowData( bool bPersistent ) if ( bPersistent ) { SFX_APP()->SaveBasicAndDialogContainer(); - SetAppBasicModified( sal_False ); + SetAppBasicModified(false); SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); if ( pBindings ) @@ -386,7 +386,7 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) (void)bForBrowsing; // reset here because it's modified after printing etc. (DocInfo) - GetViewFrame()->GetObjectShell()->SetModified(sal_False); + GetViewFrame()->GetObjectShell()->SetModified(false); if ( StarBASIC::IsRunning() ) { @@ -395,11 +395,11 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) Window *pParent = &GetViewFrame()->GetWindow(); InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute(); } - return sal_False; + return false; } else { - sal_Bool bCanClose = sal_True; + bool bCanClose = true; for (IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); bCanClose && (it != aIDEWindowTable.end()); ++it) { IDEBaseWindow* pWin = it->second; @@ -408,7 +408,7 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing ) if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) ) SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false ); SetCurWindow( pWin, true ); - bCanClose = sal_False; + bCanClose = false; } } @@ -540,9 +540,8 @@ void BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&, { case SFX_HINT_DYING: { - EndListening( rBC, sal_True /* log off all */ ); - //if ( pObjectCatalog ) - //pObjectCatalog->UpdateEntries(); + EndListening( rBC, true /* log off all */ ); + UpdateObjectCatalog(); } break; } @@ -698,7 +697,7 @@ void BasicIDEShell::UpdateWindows() ++doc ) { - StartListening( *doc->getBasicManager(), sal_True /* log on only once */ ); + StartListening( *doc->getBasicManager(), true /* log on only once */ ); // libraries Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() ); @@ -966,7 +965,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, : { if( !aLibName.isEmpty() ) { - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) ); xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); } } @@ -979,7 +978,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, : void BasicIDEShell::ImplStartListening( StarBASIC* pBasic ) { - StartListening( pBasic->GetBroadcaster(), sal_True /* log on only once */ ); + StartListening( pBasic->GetBroadcaster(), true /* log on only once */ ); } // Updates the "Object Catalog" window. diff --git a/basctl/source/basicide/basobj2.cxx b/basctl/source/basicide/basobj2.cxx index e4323599ac25..01df2eac19c1 100644 --- a/basctl/source/basicide/basobj2.cxx +++ b/basctl/source/basicide/basobj2.cxx @@ -93,19 +93,21 @@ void Organize( sal_Int16 tabId ) //---------------------------------------------------------------------------- -sal_Bool IsValidSbxName( const String& rName ) +bool IsValidSbxName( const String& rName ) { for ( sal_uInt16 nChar = 0; nChar < rName.Len(); nChar++ ) { sal_Unicode c = rName.GetChar(nChar); - sal_Bool bValid = ( ( c >= 'A' && c <= 'Z' ) || - ( c >= 'a' && c <= 'z' ) || - ( c >= '0' && c <= '9' && nChar ) || - ( c == '_' ) ); + bool bValid = ( + ( c >= 'A' && c <= 'Z' ) || + ( c >= 'a' && c <= 'z' ) || + ( c >= '0' && c <= '9' && nChar ) || + ( c == '_' ) + ); if ( !bValid ) - return sal_False; + return false; } - return sal_True; + return true; } static bool StringCompareLessThan( const String& rStr1, const String& rStr2 ) @@ -259,7 +261,7 @@ namespace //---------------------------------------------------------------------------- -::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc ) +::rtl::OUString ChooseMacro( const uno::Reference< frame::XModel >& rxLimitToDocument, bool bChooseOnly, const ::rtl::OUString& rMacroDesc ) { (void)rMacroDesc; diff --git a/basctl/source/basicide/basobj3.cxx b/basctl/source/basicide/basobj3.cxx index b04dffe0217e..1479735e6738 100644 --- a/basctl/source/basicide/basobj3.cxx +++ b/basctl/source/basicide/basobj3.cxx @@ -377,7 +377,7 @@ void BasicStopped( bool* pbAppWindowDisabled, Window* pDefParent = Application::GetDefDialogParent(); if ( pDefParent && !pDefParent->IsEnabled() ) { - pDefParent->Enable( sal_True ); + pDefParent->Enable(true); if ( pbAppWindowDisabled ) *pbAppWindowDisabled = true; } diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx index 6d49fefaa7a0..801560a6232a 100644 --- a/basctl/source/basicide/bastype2.cxx +++ b/basctl/source/basicide/bastype2.cxx @@ -215,7 +215,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati // can be called multiple times for updating! // actually test if basic's in the tree already?! - SetUpdateMode( sal_False ); + SetUpdateMode(false); // level 1: BasicManager (application, document, ...) SvLBoxEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation ); @@ -235,7 +235,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati SAL_WNODEPRECATED_DECLARATIONS_POP } - SetUpdateMode( sal_True ); + SetUpdateMode(true); } void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation ) @@ -651,7 +651,7 @@ SvLBoxEntry* BasicTreeListBox::FindEntry( SvLBoxEntry* pParent, const ::rtl::OUS long BasicTreeListBox::ExpandingHdl() { // expanding or collapsing? - sal_Bool bOK = sal_True; + bool bOK = true; if ( GetModel()->GetDepth( GetHdlEntry() ) == 1 ) { SvLBoxEntry* pCurEntry = GetCurEntry(); @@ -787,7 +787,7 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima if ( !sFactoryURL.isEmpty() ) { - rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), sal_False ); + rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), false ); } else { diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx index 7ae2c5d61cd5..3df5055a0cf7 100644 --- a/basctl/source/basicide/bastype3.cxx +++ b/basctl/source/basicide/bastype3.cxx @@ -58,7 +58,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry ) ::rtl::OUString aOULibName( aDesc.GetLibName() ); // check password - sal_Bool bOK = sal_True; + bool bOK = true; Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) { @@ -73,7 +73,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry ) if ( bOK ) { // load module library - sal_Bool bModLibLoaded = sal_False; + bool bModLibLoaded = false; if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) { if ( !xModLibContainer->isLibraryLoaded( aOULibName ) ) @@ -86,7 +86,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry ) } // load dialog library - sal_Bool bDlgLibLoaded = sal_False; + bool bDlgLibLoaded = false; Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY ); if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) { diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index 3c686854d9d6..7ca8c569b62b 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -198,13 +198,13 @@ void IDEBaseWindow::UpdateData() return aName.makeStringAndClear(); } -void IDEBaseWindow::SetReadOnly( sal_Bool ) +void IDEBaseWindow::SetReadOnly (bool) { } -sal_Bool IDEBaseWindow::IsReadOnly() +bool IDEBaseWindow::IsReadOnly () { - return sal_False; + return false; } void IDEBaseWindow::BasicStarted() @@ -215,14 +215,14 @@ void IDEBaseWindow::BasicStopped() { } -sal_Bool IDEBaseWindow::IsModified() +bool IDEBaseWindow::IsModified () { - return sal_True; + return true; } -sal_Bool IDEBaseWindow::IsPasteAllowed() +bool IDEBaseWindow::IsPasteAllowed () { - return sal_False; + return false; } Window* IDEBaseWindow::GetLayoutWindow() @@ -264,7 +264,7 @@ sal_Bool BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) { ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent(); Rectangle aTmpRec( rRect ); - sal_Bool bDock = IsDockingPrevented() ? sal_False : pLayout->IsToBeDocked( this, rPos, aTmpRec ); + bool const bDock = !IsDockingPrevented() && pLayout->IsToBeDocked( this, rPos, aTmpRec ); if ( bDock ) { rRect.SetSize( aTmpRec.GetSize() ); @@ -285,7 +285,7 @@ void BasicDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode DockingWindow::EndDocking( rRect, bFloatMode ); else { - SetFloatingMode( sal_False ); + SetFloatingMode(false); ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent(); pLayout->DockaWindow( this ); } @@ -315,7 +315,7 @@ sal_Bool BasicDockingWindow::PrepareToggleFloatingMode() aFloatingPosAndSize.SetPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); aFloatingPosAndSize.SetSize( GetSizePixel() ); } - return sal_True; + return true; } @@ -376,7 +376,7 @@ struct TabBarDDInfo BasicIDETabBar::BasicIDETabBar( Window* pParent ) : TabBar( pParent, WinBits( WB_3DLOOK | WB_SCROLL | WB_BORDER | WB_SIZEABLE | WB_DRAG ) ) { - EnableEditMode( sal_True ); + EnableEditMode(true); SetHelpId( HID_BASICIDE_TABBAR ); } @@ -414,15 +414,15 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt ) PopupMenu aPopup( IDEResId( RID_POPUP_TABBAR ) ); if ( GetPageCount() == 0 ) { - aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); - aPopup.EnableItem( SID_BASICIDE_HIDECURPAGE, sal_False ); + aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false); + aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false); + aPopup.EnableItem(SID_BASICIDE_HIDECURPAGE, false); } if ( StarBASIC::IsRunning() ) { aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, false); + aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false); aPopup.EnableItem(SID_BASICIDE_MODULEDLG, false); } @@ -436,9 +436,9 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt ) if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) || ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) { - aPopup.EnableItem( aPopup.GetItemId( 0 ), sal_False ); - aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); + aPopup.EnableItem(aPopup.GetItemId( 0 ), false); + aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false); + aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false); aPopup.RemoveDisabledEntries(); } if ( aDocument.isInVBAMode() ) @@ -457,8 +457,8 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt ) SbModule* pActiveModule = (SbModule*)pBasic->FindModule( it->second->GetName() ); if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) ) { - aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); - aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); + aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false); + aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false); } } } @@ -476,7 +476,7 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt ) long BasicIDETabBar::AllowRenaming() { - sal_Bool bValid = BasicIDE::IsValidSbxName( GetEditText() ); + bool const bValid = BasicIDE::IsValidSbxName( GetEditText() ); if ( !bValid ) ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); diff --git a/basctl/source/basicide/brkdlg.cxx b/basctl/source/basicide/brkdlg.cxx index 4928473542f7..2fbc61f70bb4 100644 --- a/basctl/source/basicide/brkdlg.cxx +++ b/basctl/source/basicide/brkdlg.cxx @@ -70,7 +70,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList { FreeResource(); - aComboBox.SetUpdateMode( sal_False ); + aComboBox.SetUpdateMode(false); for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i ) { BreakPoint* pBrk = m_aModifiedBreakPointList.at( i ); @@ -78,7 +78,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList aEntryStr += String::CreateFromInt32( pBrk->nLine ); aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND ); } - aComboBox.SetUpdateMode( sal_True ); + aComboBox.SetUpdateMode(true); aOKButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); aNewButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); @@ -92,7 +92,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList aNumericField.SetMin( 0 ); aNumericField.SetMax( 0x7FFFFFFF ); aNumericField.SetSpinSize( 1 ); - aNumericField.SetStrictFormat( sal_True ); + aNumericField.SetStrictFormat(true); aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) ); aComboBox.SetText( aComboBox.GetEntry( 0 ) ); diff --git a/basctl/source/basicide/localizationmgr.cxx b/basctl/source/basicide/localizationmgr.cxx index a3aa4a836426..9097531a7440 100644 --- a/basctl/source/basicide/localizationmgr.cxx +++ b/basctl/source/basicide/localizationmgr.cxx @@ -843,7 +843,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -873,7 +873,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -901,7 +901,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor* if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -921,7 +921,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); // Get library - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); @@ -951,7 +951,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument, const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel ) { // Get library - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); if( !xStringResourceManager.is() ) @@ -982,7 +982,7 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument, const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel ) { // Get library - Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( rDocument.getLibrary( E_DIALOGS, aLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); if( !xStringResourceManager.is() ) @@ -1076,7 +1076,7 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor, if ( !aDocument.isValid() ) return; const String& rLibName = pDlgWin->GetLibName(); - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, rLibName, true ) ); Reference< XStringResourceManager > xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx index 2fac2046fbfb..97422a023cea 100644 --- a/basctl/source/basicide/macrodlg.cxx +++ b/basctl/source/basicide/macrodlg.cxx @@ -556,10 +556,10 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox ) aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) ); } - aMacroBox.SetUpdateMode( sal_False ); + aMacroBox.SetUpdateMode(false); for ( map< sal_uInt16, SbMethod* >::iterator it = aMacros.begin(); it != aMacros.end(); ++it ) aMacroBox.InsertEntry( (*it).second->GetName() ); - aMacroBox.SetUpdateMode( sal_True ); + aMacroBox.SetUpdateMode(true); if ( aMacroBox.GetEntryCount() ) { @@ -626,7 +626,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit ) SvLBoxEntry* pEntry = aMacroBox.FirstSelected(); // if the entry exists ->Select ->Desription... if ( pEntry ) - aMacroBox.Select( pEntry, sal_False ); + aMacroBox.Select( pEntry, false ); } } } @@ -663,8 +663,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) } else if ( nMode == MACROCHOOSER_RECORDING ) { - sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); - if ( !bValid ) + if ( !BasicIDE::IsValidSbxName(aMacroNameEdit.GetText()) ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) ); @@ -740,8 +739,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton ) } else { - sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); - if ( !bValid ) + if ( !BasicIDE::IsValidSbxName(aMacroNameEdit.GetText()) ) { ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) ); diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx index d68603e52f51..673f88aa2ef3 100644 --- a/basctl/source/basicide/moduldl2.cxx +++ b/basctl/source/basicide/moduldl2.cxx @@ -228,27 +228,24 @@ SvLBoxEntry* BasicCheckBox::FindEntry( const String& rName ) //---------------------------------------------------------------------------- -void BasicCheckBox::CheckEntryPos( sal_uLong nPos, sal_Bool bCheck ) +void BasicCheckBox::CheckEntryPos( sal_uLong nPos, bool bCheck ) { if ( nPos < GetEntryCount() ) { SvLBoxEntry* pEntry = GetEntry( nPos ); if ( bCheck != GetCheckButtonState( pEntry ) ) - SetCheckButtonState( pEntry, - bCheck - ? SvButtonState(SV_BUTTON_CHECKED) - : SvButtonState(SV_BUTTON_UNCHECKED) ); + SetCheckButtonState( pEntry, SvButtonState(bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED) ); } } //---------------------------------------------------------------------------- -sal_Bool BasicCheckBox::IsChecked( sal_uLong nPos ) const +bool BasicCheckBox::IsChecked( sal_uLong nPos ) const { if ( nPos < GetEntryCount() ) - return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED); - return sal_False; + return GetCheckButtonState(GetEntry(nPos)) == SV_BUTTON_CHECKED; + return false; } //---------------------------------------------------------------------------- @@ -275,7 +272,7 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { if ( nMode != NEWOBJECTMODE_MOD ) - return sal_False; + return false; DBG_ASSERT( pEntry, "Kein Eintrag?" ); @@ -284,7 +281,7 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) if ( aLibName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) ) { ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB) ).Execute(); - return sal_False; + return false; } // check, if library is readonly @@ -294,11 +291,11 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) ) { ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_LIBISREADONLY) ).Execute(); - return sal_False; + return false; } // i24094: Password verification necessary for renaming - sal_Bool bOK = sal_True; + bool bOK = true; if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) ) { // check password @@ -310,19 +307,19 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) bOK = QueryPassword( xModLibContainer1, aLibName, aPassword ); } if ( !bOK ) - return sal_False; + return false; } // TODO: check if library is reference/link - return sal_True; + return true; } //---------------------------------------------------------------------------- sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewName ) { - sal_Bool bValid = ( rNewName.getLength() <= 30 ) && BasicIDE::IsValidSbxName( rNewName ); + bool bValid = ( rNewName.getLength() <= 30 ) && BasicIDE::IsValidSbxName( rNewName ); rtl::OUString aOldName( GetEntryText( pEntry, 0 ) ); if ( bValid && ( aOldName != rNewName ) ) { @@ -347,12 +344,12 @@ sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& r catch (const container::ElementExistException& ) { ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED) ).Execute(); - return sal_False; + return false; } catch (const container::NoSuchElementException& ) { DBG_UNHANDLED_EXCEPTION(); - return sal_False; + return false; } } @@ -520,7 +517,7 @@ LibPage::LibPage( Window * pParent ) aBasicsBox.SetSelectHdl( LINK( this, LibPage, BasicSelectHdl ) ); aLibBox.SetMode( NEWOBJECTMODE_MOD ); - aLibBox.EnableInplaceEditing( sal_True ); + aLibBox.EnableInplaceEditing(true); aLibBox.SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP ); aCloseButton.GrabFocus(); @@ -711,15 +708,15 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton ) Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() ) { - sal_Bool bProtected = xPasswd->isLibraryPasswordProtected( aLibName ); + bool const bProtected = xPasswd->isLibraryPasswordProtected( aLibName ); // change password dialog - SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, sal_True, !bProtected ); + SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, true, !bProtected ); pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) ); if ( pDlg->Execute() == RET_OK ) { - sal_Bool bNewProtected = xPasswd->isLibraryPasswordProtected( aLibName ); + bool const bNewProtected = xPasswd->isLibraryPasswordProtected( aLibName ); if ( bNewProtected != bProtected ) { @@ -898,7 +895,7 @@ void LibPage::InsertLib() { SvLBoxEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName ); sal_uInt16 nPos = (sal_uInt16) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry ); - pLibDlg->GetLibBox().CheckEntryPos( nPos, sal_True); + pLibDlg->GetLibBox().CheckEntryPos(nPos, true); } } @@ -913,14 +910,14 @@ void LibPage::InsertLib() // disable reference checkbox for documents and sbls if ( aExtension != aLibExtension && aExtension != aContExtension ) - pLibDlg->EnableReference( sal_False ); + pLibDlg->EnableReference(false); if ( pLibDlg->Execute() ) { sal_uLong nNewPos = aLibBox.GetEntryCount(); bool bRemove = false; - sal_Bool bReplace = pLibDlg->IsReplace(); - sal_Bool bReference = pLibDlg->IsReference(); + bool bReplace = pLibDlg->IsReplace(); + bool bReference = pLibDlg->IsReference(); for ( sal_uInt16 nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ ) { if ( pLibDlg->GetLibBox().IsChecked( nLib ) ) @@ -975,14 +972,14 @@ void LibPage::InsertLib() } // check, if the library is password protected - sal_Bool bOK = sal_False; + bool bOK = false; ::rtl::OUString aPassword; if ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) ) { Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) && !bReference ) { - bOK = QueryPassword( xModLibContImp, aLibName, aPassword, sal_True, sal_True ); + bOK = QueryPassword( xModLibContImp, aLibName, aPassword, true, true ); if ( !bOK ) { @@ -1029,7 +1026,7 @@ void LibPage::InsertLib() ::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); // create library link - xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, sal_True ), UNO_QUERY); + xModLib = Reference< container::XNameContainer >( xModLibContainer->createLibraryLink( aLibName, aModStorageURL, true ), UNO_QUERY); } else { @@ -1098,7 +1095,7 @@ void LibPage::InsertLib() ::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); // create library link - xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, sal_True ), UNO_QUERY); + xDlgLib = Reference< container::XNameContainer >( xDlgLibContainer->createLibraryLink( aLibName, aDlgStorageURL, true ), UNO_QUERY); } else { @@ -1164,7 +1161,7 @@ void LibPage::Export( void ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) ) { - sal_Bool bOK = sal_True; + bool bOK = true; // check password Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); @@ -1303,7 +1300,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) String aTmpPath = SvtPathOptions().GetTempPath(); INetURLObject aInetObj( aTmpPath ); - aInetObj.insertName( aLibName, sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); + aInetObj.insertName( aLibName, true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); OUString aSourcePath = aInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( xSFA->exists( aSourcePath ) ) xSFA->kill( aSourcePath ); @@ -1334,7 +1331,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) INetURLObject aMetaInfInetObj( aTmpPath ); aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF" ) ), - sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); + true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ); if( xSFA->exists( aMetaInfFolder ) ) xSFA->kill( aMetaInfFolder ); @@ -1366,7 +1363,7 @@ void LibPage::ExportAsPackage( const String& aLibName ) &manifest[ 0 ], manifest.size() ) ); aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "manifest.xml" ) ), - sal_True, INetURLObject::LAST_SEGMENT, sal_True, INetURLObject::ENCODE_ALL ); + true, INetURLObject::LAST_SEGMENT, true, INetURLObject::ENCODE_ALL ); // write buffered pipe data to content: ::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv ); @@ -1545,7 +1542,7 @@ void LibPage::SetCurLib() SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos ) { // check, if library is password protected - sal_Bool bProtected = sal_False; + bool bProtected = false; ::rtl::OUString aOULibName( rLibName ); Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) @@ -1642,7 +1639,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument, // create a module String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); ::rtl::OUString sModuleCode; - if ( !rDocument.createModule( aLibName, aModName, sal_True, sModuleCode ) ) + if ( !rDocument.createModule( aLibName, aModName, true, sModuleCode ) ) throw Exception(); SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE ); diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx index 6a77b4942342..968a7631192d 100644 --- a/basctl/source/basicide/moduldlg.cxx +++ b/basctl/source/basicide/moduldlg.cxx @@ -56,7 +56,7 @@ ExtBasicTreeListBox::~ExtBasicTreeListBox() sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( pEntry ) { @@ -72,7 +72,7 @@ sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) ) ) ) { // allow editing only for libraries, which are not readonly - bRet = sal_True; + bRet = true; } } } @@ -82,23 +82,22 @@ sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText ) { - sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText ); - if ( !bValid ) + if ( !BasicIDE::IsValidSbxName(rNewText) ) { ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ).Execute(); - return sal_False; + return false; } rtl::OUString aCurText( GetEntryText( pEntry ) ); if ( aCurText == rNewText ) // nothing to do - return sal_True; + return true; BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) ); ScriptDocument aDocument( aDesc.GetDocument() ); DBG_ASSERT( aDocument.isValid(), "ExtBasicTreeListBox::EditedEntry: no document!" ); if ( !aDocument.isValid() ) - return sal_False; + return false; ::rtl::OUString aLibName( aDesc.GetLibName() ); BasicEntryType eType( aDesc.GetType() ); @@ -107,7 +106,7 @@ sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStr : BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText ); if ( !bSuccess ) - return sal_False; + return false; BasicIDE::MarkDocumentModified( aDocument ); @@ -125,10 +124,10 @@ sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStr SetEntryText( pEntry, rNewText ); SetCurEntry( pEntry ); SetCurEntry( pEntry ); - Select( pEntry, sal_False ); + Select( pEntry, false ); Select( pEntry ); // so that handler is called => update edit - return sal_True; + return true; } @@ -156,7 +155,7 @@ DragDropMode ExtBasicTreeListBox::NotifyStartDrag( TransferDataContainer&, SvLBo if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) ) { // Get StringResourceManager - Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aLibName, sal_True ) ); + Reference< container::XNameContainer > xDialogLib( aDocument.getLibrary( E_DIALOGS, aLibName, true ) ); Reference< XStringResourceManager > xSourceMgr = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); if( xSourceMgr.is() ) @@ -176,14 +175,14 @@ sal_Bool ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) { // don't drop on a BasicManager (nDepth == 0) sal_uInt16 nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 0; - sal_Bool bValid = nDepth ? sal_True : sal_False; + bool bValid = nDepth != 0; // don't drop in the same library SvLBoxEntry* pSelected = FirstSelected(); if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) ) - bValid = sal_False; + bValid = false; else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) ) - bValid = sal_False; + bValid = 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 @@ -204,14 +203,14 @@ sal_Bool ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aDestLibName ) ) { if ( !xModLibContainer->isLibraryLoaded( aDestLibName ) ) - bValid = sal_False; + bValid = false; if ( xModLibContainer->isLibraryReadOnly( aDestLibName ) ) - bValid = sal_False; + bValid = false; Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aDestLibName ) && !xPasswd->isLibraryPasswordVerified( aDestLibName ) ) - bValid = sal_False; + bValid = false; } // check if dialog library is not loaded or readonly @@ -219,17 +218,17 @@ sal_Bool ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry ) if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aDestLibName ) ) { if ( !xDlgLibContainer->isLibraryLoaded( aDestLibName ) ) - bValid = sal_False; + bValid = false; if ( xDlgLibContainer->isLibraryReadOnly( aDestLibName ) ) - bValid = sal_False; + bValid = 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 = sal_False; + bValid = false; } } @@ -240,15 +239,15 @@ sal_Bool ExtBasicTreeListBox::NotifyMoving( SvLBoxEntry* pTarget, SvLBoxEntry* p SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ) { return NotifyCopyingMoving( pTarget, pEntry, - rpNewParent, rNewChildPos, sal_True ); + rpNewParent, rNewChildPos, true ); } sal_Bool ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ) { -// return sal_False; // how do I copy an SBX?! +// return false; // how do I copy an SBX?! return NotifyCopyingMoving( pTarget, pEntry, - rpNewParent, rNewChildPos, sal_False ); + rpNewParent, rNewChildPos, false ); } void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& io_xISP, @@ -259,14 +258,14 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& return; // Get StringResourceManager - Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, sal_True ) ); + Reference< container::XNameContainer > xSourceDialogLib( rSourceDoc.getLibrary( E_DIALOGS, rSourceLibName, 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, sal_True ) ); + Reference< container::XNameContainer > xDestDialogLib( rDestDoc.getLibrary( E_DIALOGS, rDestLibName, true ) ); Reference< XStringResourceManager > xDestMgr = LocalizationMgr::getStringResourceFromDialogLibrary( xDestDialogLib ); if( !xDestMgr.is() ) @@ -567,7 +566,7 @@ ObjectPage::ObjectPage( Window * pParent, const ResId& rResId, sal_uInt16 nMode } aBasicBox.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY ); - aBasicBox.EnableInplaceEditing( sal_True ); + aBasicBox.EnableInplaceEditing(true); aBasicBox.SetMode( nMode ); aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP | WB_HASLINES | WB_HASLINESATROOT | @@ -739,7 +738,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibN return false; // check if the module library is loaded - sal_Bool bOK = sal_True; + bool bOK = true; ::rtl::OUString aLibName( rLibName ); Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) ); if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) ) diff --git a/basctl/source/basicide/moduldlg.hxx b/basctl/source/basicide/moduldlg.hxx index 21329676bd31..a86f94bfd6e1 100644 --- a/basctl/source/basicide/moduldlg.hxx +++ b/basctl/source/basicide/moduldlg.hxx @@ -81,7 +81,7 @@ private: OKButton maOKButton; CancelButton maCancelButton; - sal_Bool mbExportAsPackage; + bool mbExportAsPackage; DECL_LINK(OkButtonHandler, void *); @@ -89,7 +89,7 @@ public: ExportDialog( Window * pParent ); ~ExportDialog(); - sal_Bool isExportAsPackage( void ) { return mbExportAsPackage; } + bool isExportAsPackage () { return mbExportAsPackage; } }; @@ -132,8 +132,8 @@ public: SvLBoxEntry* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND ); SvLBoxEntry* FindEntry( const String& rName ); - void CheckEntryPos( sal_uLong nPos, sal_Bool bCheck = sal_True ); - sal_Bool IsChecked( sal_uLong nPos ) const; + void CheckEntryPos( sal_uLong nPos, bool bCheck = true ); + bool IsChecked( sal_uLong nPos ) const; virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind ); virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); @@ -163,11 +163,11 @@ public: void SetStorageName( const ::rtl::OUString& rName ); BasicCheckBox& GetLibBox() { return aLibBox; } - sal_Bool IsReference() const { return aReferenceBox.IsChecked(); } - sal_Bool IsReplace() const { return aReplaceBox.IsChecked(); } + bool IsReference() const { return aReferenceBox.IsChecked(); } + bool IsReplace() const { return aReplaceBox.IsChecked(); } - void EnableReference( sal_Bool b ) { aReferenceBox.Enable( b ); } - void EnableReplace( sal_Bool b ) { aReplaceBox.Enable( b ); } + void EnableReference (bool b) { aReferenceBox.Enable(b); } + void EnableReplace (bool b) { aReplaceBox.Enable(b); } }; diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx index f0a92f756d6c..e9b0a30d011d 100644 --- a/basctl/source/basicide/scriptdocument.cxx +++ b/basctl/source/basicide/scriptdocument.cxx @@ -543,7 +543,7 @@ namespace basctl { try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ) ); if ( xLib.is() ) { xLib->removeByName( _rModuleName ); @@ -567,7 +567,7 @@ namespace basctl try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ) ); if ( xLib.is() ) return xLib->hasByName( _rModName ); } @@ -588,7 +588,7 @@ namespace basctl _out_rModuleOrDialog.clear(); try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_QUERY_THROW ); if ( xLib->hasByName( _rObjectName ) ) { _out_rModuleOrDialog = xLib->getByName( _rObjectName ); @@ -612,7 +612,7 @@ namespace basctl try { - Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW ); + Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_QUERY_THROW ); // get element Any aElement( xLib->getByName( _rOldName ) ); @@ -676,7 +676,7 @@ namespace basctl _out_rNewModuleCode = ::rtl::OUString(); try { - Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, sal_True ) ); + Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, true ) ); if ( !xLib.is() || xLib->hasByName( _rModName ) ) return false; @@ -739,7 +739,7 @@ namespace basctl { try { - Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, sal_True ), UNO_QUERY_THROW ); + Reference< XNameContainer > xLib( getLibrary( E_DIALOGS, _rLibName, true ), UNO_QUERY_THROW ); // create dialog _out_rDialogProvider.clear(); @@ -778,7 +778,7 @@ namespace basctl { try { - m_xDocModify->setModified( sal_True ); + m_xDocModify->setModified( true ); } catch( const Exception& ) { @@ -1308,7 +1308,7 @@ namespace basctl aObjectName += ::rtl::OUString::valueOf( i ); if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() ) - bValid = sal_True; + bValid = true; ++i; } diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 9f52b82f887a..391663646e57 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -146,29 +146,29 @@ void DlgEditor::ShowDialog() } -sal_Bool DlgEditor::UnmarkDialog() +bool DlgEditor::UnmarkDialog() { SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0); SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); + bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); if( bWasMarked ) - pDlgEdView->MarkObj( pDlgObj, pPgView, sal_True ); + pDlgEdView->MarkObj( pDlgObj, pPgView, true ); return bWasMarked; } -sal_Bool DlgEditor::RemarkDialog() +bool DlgEditor::RemarkDialog() { SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0); SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); + bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); if( !bWasMarked ) - pDlgEdView->MarkObj( pDlgObj, pPgView, sal_False ); + pDlgEdView->MarkObj( pDlgObj, pPgView, false ); return bWasMarked; } @@ -191,10 +191,10 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star:: ,eActObj( OBJ_DLG_PUSHBUTTON ) ,bFirstDraw(false) ,aGridSize( 100, 100 ) // 100TH_MM - ,bGridVisible(sal_False) - ,bGridSnap(sal_True) - ,bCreateOK(sal_True) - ,bDialogModelChanged(sal_False) + ,bGridVisible(false) + ,bGridSnap(true) + ,bCreateOK(true) + ,bDialogModelChanged(false) ,mnPaintGuard(0) ,m_xDocument( xModel ) { @@ -261,17 +261,17 @@ void DlgEditor::SetWindow( Window* pWindow_ ) pDlgEdView = new DlgEdView( pDlgEdModel, pWindow_, this ); pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0)); - pDlgEdView->SetLayerVisible( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")), sal_False ); - pDlgEdView->SetMoveSnapOnlyTopLeft( sal_True ); + pDlgEdView->SetLayerVisible( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")), false ); + pDlgEdView->SetMoveSnapOnlyTopLeft(true); pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); pDlgEdView->SetGridCoarse( aGridSize ); pDlgEdView->SetSnapGridWidth(Fraction(aGridSize.Width(), 1), Fraction(aGridSize.Height(), 1)); pDlgEdView->SetGridSnap( bGridSnap ); pDlgEdView->SetGridVisible( bGridVisible ); - pDlgEdView->SetDragStripes( sal_False ); + pDlgEdView->SetDragStripes(false); - pDlgEdView->SetDesignMode( sal_True ); + pDlgEdView->SetDesignMode(true); ::comphelper::disposeComponent( m_xControlContainer ); } @@ -426,21 +426,21 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr bFirstDraw = true; - pDlgEdModel->SetChanged( sal_False ); + pDlgEdModel->SetChanged(false); } -void DlgEditor::ResetDialog( void ) +void DlgEditor::ResetDialog () { DlgEdForm* pOldDlgEdForm = pDlgEdForm; DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0); SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); + bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); pDlgEdView->UnmarkAll(); pPage->Clear(); pPage->SetDlgEdForm( NULL ); SetDialog( m_xUnoControlDialogModel ); if( bWasMarked ) - pDlgEdView->MarkObj( pDlgEdForm, pPgView, sal_False ); + pDlgEdView->MarkObj( pDlgEdForm, pPgView, false ); } @@ -472,7 +472,7 @@ void DlgEditor::MouseButtonDown( const MouseEvent& rMEvt ) void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt ) { - sal_Bool bRet = pFunc->MouseButtonUp( rMEvt ); + bool bRet = pFunc->MouseButtonUp( rMEvt ); if( eMode == DLGED_INSERT ) bCreateOK = bRet; @@ -485,7 +485,7 @@ void DlgEditor::MouseMove( const MouseEvent& rMEvt ) } -sal_Bool DlgEditor::KeyInput( const KeyEvent& rKEvt ) +bool DlgEditor::KeyInput( const KeyEvent& rKEvt ) { return pFunc->KeyInput( rKEvt ); } @@ -553,7 +553,7 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout) pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) ); pDlgEdForm->EndListening(false); pDlgEdForm->SetPropsFromRect(); - pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(sal_True); + pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(true); pDlgEdForm->StartListening(); // set position and size of controls @@ -636,9 +636,9 @@ void DlgEditor::SetMode( DlgEdMode eNewMode ) pFunc = new DlgEdFuncSelect( this ); if ( eNewMode == DLGED_READONLY ) - pDlgEdModel->SetReadOnly( sal_True ); + pDlgEdModel->SetReadOnly( true ); else - pDlgEdModel->SetReadOnly( sal_False ); + pDlgEdModel->SetReadOnly( false ); } if ( eNewMode == DLGED_TEST ) @@ -1039,7 +1039,7 @@ void DlgEditor::Paste() // mark object SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); - pDlgEdView->MarkObj( pCtrlObj, pPgView, sal_False, sal_True); + pDlgEdView->MarkObj( pCtrlObj, pPgView, false, true); } // center marked objects in dialog editor form @@ -1051,7 +1051,7 @@ void DlgEditor::Paste() pDlgEdView->MarkListHasChanged(); // dialog model changed - SetDialogModelChanged(sal_True); + SetDialogModelChanged(true); } } } @@ -1108,17 +1108,15 @@ void DlgEditor::Delete() pDlgEdView->BrkAction(); - sal_Bool bDlgMarked = UnmarkDialog(); + bool const bDlgMarked = UnmarkDialog(); pDlgEdView->DeleteMarked(); if( bDlgMarked ) RemarkDialog(); } -sal_Bool DlgEditor::IsPasteAllowed() +bool DlgEditor::IsPasteAllowed() { - sal_Bool bPaste = sal_False; - // get clipboard Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard(); if ( xClipboard.is() ) @@ -1127,16 +1125,9 @@ sal_Bool DlgEditor::IsPasteAllowed() const sal_uInt32 nRef = Application::ReleaseSolarMutex(); Reference< datatransfer::XTransferable > xTransf = xClipboard->getContents(); Application::AcquireSolarMutex( nRef ); - if ( xTransf.is() ) - { - if ( xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ) ) - { - bPaste = sal_True; - } - } + return xTransf.is() && xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ); } - - return bPaste; + return false; } @@ -1155,7 +1146,7 @@ void DlgEditor::UpdatePropertyBrowserDelayed() } -sal_Bool DlgEditor::IsModified() const +bool DlgEditor::IsModified() const { return pDlgEdModel->IsChanged() || bDialogModelChanged; } @@ -1163,8 +1154,8 @@ sal_Bool DlgEditor::IsModified() const void DlgEditor::ClearModifyFlag() { - pDlgEdModel->SetChanged( sal_False ); - bDialogModelChanged = sal_False; + pDlgEdModel->SetChanged(false); + bDialogModelChanged = false; } diff --git a/basctl/source/dlged/dlgedclip.cxx b/basctl/source/dlged/dlgedclip.cxx index e967a65522cf..b6e34b4d9bbc 100644 --- a/basctl/source/dlged/dlgedclip.cxx +++ b/basctl/source/dlged/dlgedclip.cxx @@ -51,7 +51,7 @@ DlgEdTransferableImpl::~DlgEdTransferableImpl() sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, const DataFlavor& rFlavor ) { - sal_Bool bRet = sal_False; + bool bRet = false; // compare mime content types Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); @@ -112,18 +112,10 @@ sal_Bool SAL_CALL DlgEdTransferableImpl::isDataFlavorSupported( const DataFlavor { const SolarMutexGuard aGuard; - sal_Bool bRet = sal_False; - for ( sal_Int32 i = 0; i < m_SeqFlavors.getLength(); i++ ) - { if ( compareDataFlavors( m_SeqFlavors[i] , rFlavor ) ) - { - bRet = sal_True; - break; - } - } - - return bRet; + return true; + return false; } // XClipboardOwner diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 24a2511337a2..899697e357f0 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -42,7 +42,7 @@ DlgEdFactory::~DlgEdFactory() IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) { - static sal_Bool bNeedsInit = sal_True; + static bool bNeedsInit = true; static uno::Reference< lang::XMultiServiceFactory > xDialogSFact; if( bNeedsInit ) @@ -54,7 +54,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) uno::Reference< lang::XMultiServiceFactory > xModFact( xC, uno::UNO_QUERY ); xDialogSFact = xModFact; } - bNeedsInit = sal_False; + bNeedsInit = false; } if( (pObjFactory->nInventor == DlgInventor) && @@ -111,7 +111,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY); if (xPSet.is()) { - sal_Bool bB = sal_True; + sal_Bool bB = true; xPSet->setPropertyValue( DLGED_PROP_DROPDOWN, uno::Any(&bB,::getBooleanCppuType())); } } diff --git a/basctl/source/dlged/dlgedfunc.cxx b/basctl/source/dlged/dlgedfunc.cxx index 3221a1ce619c..6dbcc48e967a 100644 --- a/basctl/source/dlged/dlgedfunc.cxx +++ b/basctl/source/dlged/dlgedfunc.cxx @@ -100,31 +100,31 @@ DlgEdFunc::~DlgEdFunc() //---------------------------------------------------------------------------- -sal_Bool DlgEdFunc::MouseButtonDown( const MouseEvent& ) +bool DlgEdFunc::MouseButtonDown( const MouseEvent& ) { - return sal_True; + return true; } //---------------------------------------------------------------------------- -sal_Bool DlgEdFunc::MouseButtonUp( const MouseEvent& ) +bool DlgEdFunc::MouseButtonUp( const MouseEvent& ) { aScrollTimer.Stop(); - return sal_True; + return true; } //---------------------------------------------------------------------------- -sal_Bool DlgEdFunc::MouseMove( const MouseEvent& ) +bool DlgEdFunc::MouseMove( const MouseEvent& ) { - return sal_True; + return true; } //---------------------------------------------------------------------------- -sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) +bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) { - sal_Bool bReturn = sal_False; + bool bReturn = false; SdrView* pView = pParent->GetView(); Window* pWindow = pParent->GetWindow(); @@ -139,7 +139,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->IsAction() ) { pView->BrkAction(); - bReturn = sal_True; + bReturn = true; } else if ( pView->AreObjectsMarked() ) { @@ -150,7 +150,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) else pView->UnmarkAll(); - bReturn = sal_True; + bReturn = true; } } break; @@ -169,7 +169,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->AreObjectsMarked() ) pView->MakeVisible( pView->GetAllMarkedRect(), *pWindow ); - bReturn = sal_True; + bReturn = true; } else if ( aCode.IsMod1() ) { @@ -186,7 +186,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) pView->MakeVisible( aVisRect, *pWindow ); } - bReturn = sal_True; + bReturn = true; } } break; @@ -292,14 +292,14 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) if ( pView->IsDragObj() ) { - bool bWasNoSnap = rDragStat.IsNoSnap(); - sal_Bool bWasSnapEnabled = pView->IsSnapEnabled(); + bool const bWasNoSnap = rDragStat.IsNoSnap(); + bool const bWasSnapEnabled = pView->IsSnapEnabled(); // switch snapping off if ( !bWasNoSnap ) - ((SdrDragStat&)rDragStat).SetNoSnap( sal_True ); + ((SdrDragStat&)rDragStat).SetNoSnap(true); if ( bWasSnapEnabled ) - pView->SetSnapEnabled( sal_False ); + pView->SetSnapEnabled(false); pView->MovAction( aEndPoint ); pView->EndDragObj(); @@ -335,7 +335,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) } } - bReturn = sal_True; + bReturn = true; } break; default: @@ -355,22 +355,22 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt ) DlgEdFuncInsert::DlgEdFuncInsert( DlgEditor* pParent_ ) : DlgEdFunc( pParent_ ) { - pParent_->GetView()->SetCreateMode( sal_True ); + pParent_->GetView()->SetCreateMode(true); } //---------------------------------------------------------------------------- DlgEdFuncInsert::~DlgEdFuncInsert() { - pParent->GetView()->SetEditMode( sal_True ); + pParent->GetView()->SetEditMode( true ); } //---------------------------------------------------------------------------- -sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) +bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) { if( !rMEvt.IsLeft() ) - return sal_True; + return true; SdrView* pView = pParent->GetView(); Window* pWindow= pParent->GetWindow(); @@ -403,12 +403,12 @@ sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt ) pParent->ShowProperties(); } - return sal_True; + return true; } //---------------------------------------------------------------------------- -sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) +bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) { DlgEdFunc::MouseButtonUp( rMEvt ); @@ -430,22 +430,19 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) pView->MarkObj(aPos, nHitLog); } - if( pView->AreObjectsMarked() ) - return sal_True; - else - return sal_False; + return pView->AreObjectsMarked(); } else { if ( pView->IsDragObj() ) pView->EndDragObj( rMEvt.IsMod1() ); - return sal_True; + return true; } } //---------------------------------------------------------------------------- -sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) +bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) { SdrView* pView = pParent->GetView(); Window* pWindow= pParent->GetWindow(); @@ -462,7 +459,7 @@ sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt ) pWindow->SetPointer( pView->GetPreferedPointer( aPos, pWindow, nHitLog ) ); - return sal_True; + return true; } //---------------------------------------------------------------------------- @@ -481,7 +478,7 @@ DlgEdFuncSelect::~DlgEdFuncSelect() //---------------------------------------------------------------------------- -sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) +bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) { // get view from parent SdrView* pView = pParent->GetView(); @@ -540,12 +537,12 @@ sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt ) pParent->ShowProperties(); } - return sal_True; + return true; } //---------------------------------------------------------------------------- -sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) +bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) { DlgEdFunc::MouseButtonUp( rMEvt ); @@ -577,12 +574,12 @@ sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) ); pWindow->ReleaseMouse(); - return sal_True; + return true; } //---------------------------------------------------------------------------- -sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) +bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) { SdrView* pView = pParent->GetView(); Window* pWindow= pParent->GetWindow(); @@ -602,7 +599,7 @@ sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) ); - return sal_True; + return true; } //---------------------------------------------------------------------------- diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 518048f7e593..df7ed2bf0282 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -54,7 +54,7 @@ DBG_NAME(DlgEdObj); //---------------------------------------------------------------------------- DlgEdObj::DlgEdObj() - :SdrUnoObj(String(), sal_False) + :SdrUnoObj(String(), false) ,bIsListening(false) ,pDlgEdForm( NULL ) { @@ -65,7 +65,7 @@ DlgEdObj::DlgEdObj() DlgEdObj::DlgEdObj(const ::rtl::OUString& rModelName, const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac) - :SdrUnoObj(rModelName, rxSFac, sal_False) + :SdrUnoObj(rModelName, rxSFac, false) ,bIsListening(false) ,pDlgEdForm( NULL ) { @@ -556,8 +556,8 @@ void DlgEdObj::UpdateStep() sal_Int32 nStep = GetStep(); SdrLayerAdmin& rLayerAdmin = GetModel()->GetLayerAdmin(); - SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), sal_False ); - SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), sal_False ); + SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), false ); + SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), false ); if( nCurStep ) { @@ -677,7 +677,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) throw (Ru sal_Bool DlgEdObj::supportsService( const sal_Char* _pServiceName ) const { - sal_Bool bSupports = sal_False; + bool bSupports = false; Reference< lang::XServiceInfo > xServiceInfo( GetUnoControlModel() , UNO_QUERY ); // TODO: cache xServiceInfo as member? @@ -999,7 +999,7 @@ void DlgEdObj::NbcMove( const Size& rSize ) StartListening(); // dialog model changed - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true); } //---------------------------------------------------------------------------- @@ -1018,7 +1018,7 @@ void DlgEdObj::NbcResize(const Point& rRef, const Fraction& xFract, const Fracti StartListening(); // dialog model changed - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true); } //---------------------------------------------------------------------------- @@ -1117,7 +1117,7 @@ void DlgEdObj::SetDefaults() } // dialog model changed - pDlgEdForm->GetDlgEditor()->SetDialogModelChanged( sal_True ); + pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(true); } } @@ -1212,7 +1212,7 @@ void SAL_CALL DlgEdObj::_propertyChange( const ::com::sun::star::beans::Propert return; // dialog model changed - pDlgEditor->SetDialogModelChanged(sal_True); + pDlgEditor->SetDialogModelChanged(true); // update position and size if ( evt.PropertyName == DLGED_PROP_POSITIONX || evt.PropertyName == DLGED_PROP_POSITIONY || @@ -1262,11 +1262,11 @@ void SAL_CALL DlgEdObj::_elementInserted(const ::com::sun::star::container::Cont // dialog model changed if ( ISA(DlgEdForm) ) { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); + ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(true); } else { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true); } } } @@ -1280,11 +1280,11 @@ void SAL_CALL DlgEdObj::_elementReplaced(const ::com::sun::star::container::Cont // dialog model changed if ( ISA(DlgEdForm) ) { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); + ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(true); } else { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true); } } } @@ -1298,11 +1298,11 @@ void SAL_CALL DlgEdObj::_elementRemoved(const ::com::sun::star::container::Conta // dialog model changed if ( ISA(DlgEdForm) ) { - ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); + ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(true); } else { - GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true); } } } @@ -1758,7 +1758,7 @@ void DlgEdForm::NbcMove( const Size& rSize ) } // dialog model changed - GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEditor()->SetDialogModelChanged(true); } //---------------------------------------------------------------------------- @@ -1782,7 +1782,7 @@ void DlgEdForm::NbcResize(const Point& rRef, const Fraction& xFract, const Fract } // dialog model changed - GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEditor()->SetDialogModelChanged(true); } //---------------------------------------------------------------------------- @@ -1798,7 +1798,7 @@ bool DlgEdForm::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) SetPropsFromRect(); // dialog model changed - GetDlgEditor()->SetDialogModelChanged(sal_True); + GetDlgEditor()->SetDialogModelChanged(true); // start listening StartListening(); diff --git a/basctl/source/dlged/managelang.cxx b/basctl/source/dlged/managelang.cxx index cee695ff11da..87999a63b6ac 100644 --- a/basctl/source/dlged/managelang.cxx +++ b/basctl/source/dlged/managelang.cxx @@ -60,7 +60,7 @@ namespace { sal_Int32 nStartPos = 0; const Locale aLocale = Application::GetSettings().GetUILocale(); Boundary aBoundary = xBreakIter->getWordBoundary( - rText, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); + rText, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, true ); while ( aBoundary.startPos != aBoundary.endPos ) { @@ -120,7 +120,7 @@ void ManageLanguageDialog::Init() m_aMakeDefPB.SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) ); m_aLanguageLB.SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) ); - m_aLanguageLB.EnableMultiSelection( sal_True ); + m_aLanguageLB.EnableMultiSelection( true ); CalcInfoSize(); } @@ -317,7 +317,7 @@ SetDefaultLanguageDialog::~SetDefaultLanguageDialog() void SetDefaultLanguageDialog::FillLanguageBox() { // fill list with all languages - m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, sal_False ); + m_pLanguageLB->SetLanguageList( LANG_LIST_ALL, false ); // remove the already localized languages Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales(); const Locale* pLocale = aLocaleSeq.getConstArray(); diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 8a9e550a1b3a..673af7b1e3ba 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -165,7 +165,7 @@ void PropBrw::ImplReCreateController() ); if ( !m_xBrowserController.is() ) { - ShowServiceNotAvailableError( GetParent(), s_sControllerServiceName, sal_True ); + ShowServiceNotAvailableError( GetParent(), s_sControllerServiceName, true ); } else { @@ -194,7 +194,7 @@ void PropBrw::ImplReCreateController() m_xBrowserComponentWindow->setPosSize(aPropWinPos.X(), aPropWinPos.Y(), aPropWinSize.Width(), aPropWinSize.Height(), ::com::sun::star::awt::PosSize::WIDTH | ::com::sun::star::awt::PosSize::HEIGHT | ::com::sun::star::awt::PosSize::X | ::com::sun::star::awt::PosSize::Y); - m_xBrowserComponentWindow->setVisible(sal_True); + m_xBrowserComponentWindow->setVisible(true); } } catch (const Exception&) @@ -257,9 +257,7 @@ sal_Bool PropBrw::Close() if( IsRollUp() ) RollDown(); - sal_Bool bClose = SfxFloatingWindow::Close(); - - return bClose; + return SfxFloatingWindow::Close(); } @@ -452,7 +450,7 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject ) void PropBrw::FillInfo( SfxChildWinInfo& rInfo ) const { - rInfo.bVisible = sal_False; + rInfo.bVisible = false; } diff --git a/basctl/source/inc/accessibledialogcontrolshape.hxx b/basctl/source/inc/accessibledialogcontrolshape.hxx index 01e204794722..0d5e512454a1 100644 --- a/basctl/source/inc/accessibledialogcontrolshape.hxx +++ b/basctl/source/inc/accessibledialogcontrolshape.hxx @@ -54,18 +54,18 @@ private: VCLExternalSolarLock* m_pExternalLock; DialogWindow* m_pDialogWindow; DlgEdObj* m_pDlgEdObj; - sal_Bool m_bFocused; - sal_Bool m_bSelected; + bool m_bFocused; + bool m_bSelected; ::com::sun::star::awt::Rectangle m_aBounds; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; protected: - sal_Bool IsFocused(); - sal_Bool IsSelected(); + bool IsFocused(); + bool IsSelected(); - void SetFocused( sal_Bool bFocused ); - void SetSelected( sal_Bool bSelected ); + void SetFocused (bool bFocused); + void SetSelected (bool bSelected); ::com::sun::star::awt::Rectangle GetBounds(); void SetBounds( const ::com::sun::star::awt::Rectangle& aBounds ); diff --git a/basctl/source/inc/baside3.hxx b/basctl/source/inc/baside3.hxx index 17bd9ec7e7c7..f2560e38da10 100644 --- a/basctl/source/inc/baside3.hxx +++ b/basctl/source/inc/baside3.hxx @@ -85,12 +85,12 @@ public: virtual ::rtl::OUString GetTitle(); virtual BasicEntryDescriptor CreateEntryDescriptor(); - virtual void SetReadOnly( sal_Bool bReadOnly ); - virtual sal_Bool IsReadOnly(); + virtual void SetReadOnly (bool bReadOnly); + virtual bool IsReadOnly(); virtual void StoreData(); - virtual sal_Bool IsModified(); - virtual sal_Bool IsPasteAllowed(); + virtual bool IsModified(); + virtual bool IsPasteAllowed(); virtual ::svl::IUndoManager* GetUndoManager(); diff --git a/basctl/source/inc/basidesh.hxx b/basctl/source/inc/basidesh.hxx index ed2b120c3cc7..5e8c25713fac 100644 --- a/basctl/source/inc/basidesh.hxx +++ b/basctl/source/inc/basidesh.hxx @@ -82,7 +82,7 @@ friend class LocalizationMgr; bool bTabBarSplitted; bool bCreatingWindow; ModulWindowLayout* pModulLayout; - sal_Bool m_bAppBasicModified; + bool m_bAppBasicModified; ::basctl::DocumentEventNotifier m_aNotifier; friend class ContainerListenerImpl; @@ -202,8 +202,8 @@ public: IDEBaseWindow* FindApplicationWindow(); bool NextPage( bool bPrev = false ); - sal_Bool IsAppBasicModified() const { return m_bAppBasicModified; } - void SetAppBasicModified( sal_Bool bModified = sal_True ) { m_bAppBasicModified = bModified; } + bool IsAppBasicModified () const { return m_bAppBasicModified; } + void SetAppBasicModified (bool bModified = true) { m_bAppBasicModified = bModified; } // For Dialog Drag&Drop in Dialog Organizer static void CopyDialogResources( diff --git a/basctl/source/inc/basobj.hxx b/basctl/source/inc/basobj.hxx index 5e72308534fa..52d8c46e400e 100644 --- a/basctl/source/inc/basobj.hxx +++ b/basctl/source/inc/basobj.hxx @@ -47,7 +47,7 @@ namespace BasicIDE void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0, SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 ); - sal_Bool IsValidSbxName( const String& rName ); + bool IsValidSbxName( const String& rName ); BasicManager* FindBasicManager( StarBASIC* pLib ); @@ -78,7 +78,7 @@ namespace BasicIDE // new methods for macros ::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument, - sal_Bool bChooseOnly, const ::rtl::OUString& rMacroDesc ); + bool bChooseOnly, const ::rtl::OUString& rMacroDesc ); ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames( const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName ) diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index 7795becbb47d..30fb847f5db1 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -160,13 +160,13 @@ public: ::rtl::OUString CreateQualifiedName(); virtual BasicEntryDescriptor CreateEntryDescriptor() = 0; - virtual sal_Bool IsModified(); - virtual sal_Bool IsPasteAllowed(); + virtual bool IsModified(); + virtual bool IsPasteAllowed(); virtual bool AllowUndo(); - virtual void SetReadOnly( sal_Bool bReadOnly ); - virtual sal_Bool IsReadOnly(); + virtual void SetReadOnly (bool bReadOnly); + virtual bool IsReadOnly(); int GetStatus() { return nStatus; } void SetStatus(int n) { nStatus = n; } diff --git a/basctl/source/inc/dlged.hxx b/basctl/source/inc/dlged.hxx index 3426e0caabdb..bbb0dca03843 100644 --- a/basctl/source/inc/dlged.hxx +++ b/basctl/source/inc/dlged.hxx @@ -108,15 +108,15 @@ protected: Window* pWindow; DlgEdFunc* pFunc; DlgEdMode eMode; - sal_uInt16 eActObj; + sal_uInt16 eActObj; bool bFirstDraw; Size aGridSize; - sal_Bool bGridVisible; - sal_Bool bGridSnap; - sal_Bool bCreateOK; + bool bGridVisible; + bool bGridSnap; + bool bCreateOK; Timer aPaintTimer; Rectangle aPaintRect; - sal_Bool bDialogModelChanged; + bool bDialogModelChanged; Timer aMarkTimer; long mnPaintGuard; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument; @@ -160,33 +160,33 @@ public: void ShowDialog(); - sal_Bool UnmarkDialog(); - sal_Bool RemarkDialog(); + bool UnmarkDialog(); + bool RemarkDialog(); - void SetDialogModelChanged( sal_Bool bChanged = sal_True ) { bDialogModelChanged = bChanged; } - sal_Bool IsDialogModelChanged() const { return bDialogModelChanged; } + void SetDialogModelChanged (bool bChanged = true) { bDialogModelChanged = bChanged; } + bool IsDialogModelChanged () const { return bDialogModelChanged; } - sal_Bool IsModified() const; + bool IsModified () const; void ClearModifyFlag(); void MouseButtonDown( const MouseEvent& rMEvt ); void MouseButtonUp( const MouseEvent& rMEvt ); void MouseMove( const MouseEvent& rMEvt ); void Paint( const Rectangle& rRect ); - sal_Bool KeyInput( const KeyEvent& rKEvt ); + bool KeyInput( const KeyEvent& rKEvt ); void SetMode( DlgEdMode eMode ); void SetInsertObj( sal_uInt16 eObj ); - sal_uInt16 GetInsertObj() const; + sal_uInt16 GetInsertObj() const; void CreateDefaultObject(); DlgEdMode GetMode() const { return eMode; } - sal_Bool IsCreateOK() const { return bCreateOK; } + bool IsCreateOK() const { return bCreateOK; } void Cut(); void Copy(); void Paste(); void Delete(); - sal_Bool IsPasteAllowed(); + bool IsPasteAllowed(); void ShowProperties(); void UpdatePropertyBrowserDelayed(); diff --git a/basctl/source/inc/dlgedfunc.hxx b/basctl/source/inc/dlgedfunc.hxx index f4a8c77158dd..b7a4f7bf3673 100644 --- a/basctl/source/inc/dlgedfunc.hxx +++ b/basctl/source/inc/dlgedfunc.hxx @@ -39,10 +39,10 @@ public: DlgEdFunc( DlgEditor* pParent ); virtual ~DlgEdFunc(); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); - virtual sal_Bool KeyInput( const KeyEvent& rKEvt ); + virtual bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual bool MouseMove( const MouseEvent& rMEvt ); + virtual bool KeyInput( const KeyEvent& rKEvt ); }; //============================================================================ @@ -55,9 +55,9 @@ public: DlgEdFuncInsert( DlgEditor* pParent ); ~DlgEdFuncInsert(); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); + virtual bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual bool MouseMove( const MouseEvent& rMEvt ); }; //============================================================================ @@ -73,9 +73,9 @@ public: DlgEdFuncSelect( DlgEditor* pParent ); ~DlgEdFuncSelect(); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); + virtual bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual bool MouseButtonUp( const MouseEvent& rMEvt ); + virtual bool MouseMove( const MouseEvent& rMEvt ); }; |