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
This commit is contained in:
Uray M. János 2012-08-07 08:36:40 +02:00 committed by Tor Lillqvist
parent 67f688b97a
commit 13b9c05133
40 changed files with 445 additions and 506 deletions

View File

@ -76,14 +76,14 @@ AccessibleDialogControlShape::~AccessibleDialogControlShape()
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
sal_Bool AccessibleDialogControlShape::IsFocused() bool AccessibleDialogControlShape::IsFocused()
{ {
sal_Bool bFocused = sal_False; bool bFocused = false;
if ( m_pDialogWindow ) if ( m_pDialogWindow )
{ {
SdrView* pSdrView = m_pDialogWindow->GetView(); SdrView* pSdrView = m_pDialogWindow->GetView();
if ( pSdrView && pSdrView->IsObjMarked( m_pDlgEdObj ) && pSdrView->GetMarkedObjectList().GetMarkCount() == 1 ) if ( pSdrView && pSdrView->IsObjMarked( m_pDlgEdObj ) && pSdrView->GetMarkedObjectList().GetMarkCount() == 1 )
bFocused = sal_True; bFocused = true;
} }
return bFocused; 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 ) if ( m_pDialogWindow )
{ {
SdrView* pSdrView = m_pDialogWindow->GetView(); 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 ) 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 ) if ( m_bSelected != bSelected )
{ {

View File

@ -999,7 +999,7 @@ sal_Bool AccessibleDialogWindow::isAccessibleChildSelected( sal_Int32 nChildInde
if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() ) if ( nChildIndex < 0 || nChildIndex >= getAccessibleChildCount() )
throw IndexOutOfBoundsException(); throw IndexOutOfBoundsException();
sal_Bool bSelected = sal_False; bool bSelected = false;
if ( m_pDialogWindow ) if ( m_pDialogWindow )
{ {
DlgEdObj* pDlgEdObj = m_aAccessibleChildren[nChildIndex].pDlgEdObj; DlgEdObj* pDlgEdObj = m_aAccessibleChildren[nChildIndex].pDlgEdObj;
@ -1101,7 +1101,7 @@ void AccessibleDialogWindow::deselectAccessibleChild( sal_Int32 nChildIndex ) th
{ {
SdrPageView* pPgView = pSdrView->GetSdrPageView(); SdrPageView* pPgView = pSdrView->GetSdrPageView();
if ( pPgView ) if ( pPgView )
pSdrView->MarkObj( pDlgEdObj, pPgView, sal_True ); pSdrView->MarkObj( pDlgEdObj, pPgView, true );
} }
} }
} }

View File

@ -55,7 +55,7 @@ BasicDocShell::~BasicDocShell()
delete pPrinter; delete pPrinter;
} }
SfxPrinter* BasicDocShell::GetPrinter( sal_Bool bCreate ) SfxPrinter* BasicDocShell::GetPrinter( bool bCreate )
{ {
if ( !pPrinter && bCreate ) if ( !pPrinter && bCreate )
pPrinter = new SfxPrinter( new SfxItemSet( GetPool(), SID_PRINTER_NOTFOUND_WARN , SID_PRINTER_NOTFOUND_WARN ) ); 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 BasicDocShell::FillClass( SvGlobalName*, sal_uInt32*, String*, String*, String*, sal_Int32, sal_Bool bTemplate) const
{ {
(void)bTemplate; (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 ) void BasicDocShell::Draw( OutputDevice *, const JobSetup &, sal_uInt16 )

View File

@ -40,7 +40,7 @@ protected:
String * pFullTypeName, String * pFullTypeName,
String * pShortTypeName, String * pShortTypeName,
sal_Int32 nVersion, sal_Int32 nVersion,
sal_Bool bTemplate = sal_False ) const; sal_Bool bTemplate = false ) const;
public: public:
TYPEINFO(); TYPEINFO();
@ -51,7 +51,7 @@ public:
BasicDocShell(); BasicDocShell();
~BasicDocShell(); ~BasicDocShell();
SfxPrinter* GetPrinter( sal_Bool bCreate ); SfxPrinter* GetPrinter( bool bCreate );
void SetPrinter( SfxPrinter* pPrinter ); void SetPrinter( SfxPrinter* pPrinter );
}; };

View File

@ -201,7 +201,7 @@ void BasicLibBox::ReleaseFocus()
void BasicLibBox::FillBox() void BasicLibBox::FillBox()
{ {
SetUpdateMode( sal_False ); SetUpdateMode(false);
bIgnoreSelect = true; bIgnoreSelect = true;
aCurText = GetSelectEntry(); aCurText = GetSelectEntry();
@ -224,7 +224,7 @@ void BasicLibBox::FillBox()
InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT ); InsertEntries( *doc, LIBRARY_LOCATION_DOCUMENT );
} }
SetUpdateMode( sal_True ); SetUpdateMode(true);
SelectEntry( aCurText ); SelectEntry( aCurText );
if ( !GetSelectEntryCount() ) if ( !GetSelectEntryCount() )
@ -290,7 +290,7 @@ long BasicLibBox::PreNotify( NotifyEvent& rNEvt )
} }
else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) else if( rNEvt.GetType() == EVENT_LOSEFOCUS )
{ {
if ( !HasChildPathFocus( sal_True ) ) if ( !HasChildPathFocus(true) )
{ {
bIgnoreSelect = true; bIgnoreSelect = true;
bFillBox = true; bFillBox = true;
@ -407,7 +407,7 @@ BasicLanguageBox::~BasicLanguageBox()
void BasicLanguageBox::FillBox() void BasicLanguageBox::FillBox()
{ {
SetUpdateMode( sal_False ); SetUpdateMode(false);
m_bIgnoreSelect = true; m_bIgnoreSelect = true;
m_sCurrentText = GetSelectEntry(); m_sCurrentText = GetSelectEntry();
ClearBox(); ClearBox();
@ -454,7 +454,7 @@ void BasicLanguageBox::FillBox()
Disable(); Disable();
} }
SetUpdateMode( sal_True ); SetUpdateMode(true);
m_bIgnoreSelect = false; m_bIgnoreSelect = false;
} }

View File

@ -28,7 +28,7 @@ class BasicIDEModule : public SfxModule
{ {
public: public:
BasicIDEModule( ResMgr *pMgr, SfxObjectFactory *pObjFact) : BasicIDEModule( ResMgr *pMgr, SfxObjectFactory *pObjFact) :
SfxModule( pMgr, sal_False, pObjFact, NULL ) SfxModule( pMgr, false, pObjFact, NULL )
{} {}
}; };

View File

@ -45,7 +45,7 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
// create Subgroup for print range // create Subgroup for print range
vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt;
aPrintRangeOpt.maGroupHint = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PrintRange" ) ); 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 ) ), m_aUIProperties[0].Value = getSubgroupControlOpt( rtl::OUString( aStrings.GetString( 0 ) ),
rtl::OUString(), rtl::OUString(),
aPrintRangeOpt aPrintRangeOpt
@ -66,7 +66,7 @@ BasicRenderable::BasicRenderable( IDEBaseWindow* pWin )
0 ); 0 );
// create a an Edit dependent on "Pages" selected // 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(), m_aUIProperties[2].Value = getEditControlOpt( rtl::OUString(),
rtl::OUString(), rtl::OUString(),
rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ), rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageRange" ) ),

View File

@ -250,13 +250,13 @@ void ModulWindow::CheckCompileBasic()
if ( XModule().Is() ) if ( XModule().Is() )
{ {
// never compile while running! // never compile while running!
sal_Bool bRunning = StarBASIC::IsRunning(); bool const bRunning = StarBASIC::IsRunning();
sal_Bool bModified = ( !xModule->IsCompiled() || bool const bModified = ( !xModule->IsCompiled() ||
( GetEditEngine() && GetEditEngine()->IsModified() ) ); ( GetEditEngine() && GetEditEngine()->IsModified() ) );
if ( !bRunning && bModified ) if ( !bRunning && bModified )
{ {
sal_Bool bDone = sal_False; bool bDone = false;
BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell(); BasicIDEShell* pIDEShell = BasicIDEGlobals::GetShell();
pIDEShell->GetViewFrame()->GetWindow().EnterWait(); pIDEShell->GetViewFrame()->GetWindow().EnterWait();
@ -267,11 +267,11 @@ void ModulWindow::CheckCompileBasic()
GetEditorWindow().SetSourceInBasic(); GetEditorWindow().SetSourceInBasic();
} }
sal_Bool bWasModified = GetBasic()->IsModified(); bool bWasModified = GetBasic()->IsModified();
bDone = GetBasic()->Compile( xModule ); bDone = GetBasic()->Compile( xModule );
if ( !bWasModified ) if ( !bWasModified )
GetBasic()->SetModified( sal_False ); GetBasic()->SetModified(false);
if ( bDone ) if ( bDone )
{ {
@ -333,16 +333,16 @@ bool ModulWindow::BasicExecute()
if ( !pMethod ) if ( !pMethod )
{ {
// If not in a method then prompt the user // 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 ) if ( pMethod )
{ {
pMethod->SetDebugFlags( aStatus.nBasicFlags ); pMethod->SetDebugFlags( aStatus.nBasicFlags );
BasicDLL::SetDebugMode( sal_True ); BasicDLL::SetDebugMode( true );
BasicIDE::RunMethod( pMethod ); BasicIDE::RunMethod( pMethod );
BasicDLL::SetDebugMode( sal_False ); BasicDLL::SetDebugMode( false );
// if cancelled during Interactive=sal_False // if cancelled during Interactive=false
BasicDLL::EnableBreak( sal_True ); BasicDLL::EnableBreak( true );
} }
ClearStatus( BASWIN_RUNNINGBASIC ); ClearStatus( BASWIN_RUNNINGBASIC );
} }
@ -355,16 +355,12 @@ bool ModulWindow::BasicExecute()
return bDone; return bDone;
} }
sal_Bool ModulWindow::CompileBasic() bool ModulWindow::CompileBasic()
{ {
DBG_CHKTHIS( ModulWindow, 0 ); DBG_CHKTHIS( ModulWindow, 0 );
CheckCompileBasic(); CheckCompileBasic();
sal_Bool bIsCompiled = sal_False; return XModule().Is() && xModule->IsCompiled();
if ( XModule().Is() )
bIsCompiled = xModule->IsCompiled();
return bIsCompiled;
} }
bool ModulWindow::BasicRun() bool ModulWindow::BasicRun()
@ -372,16 +368,14 @@ bool ModulWindow::BasicRun()
DBG_CHKTHIS( ModulWindow, 0 ); DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = 0; aStatus.nBasicFlags = 0;
bool bDone = BasicExecute(); return BasicExecute();
return bDone;
} }
bool ModulWindow::BasicStepOver() bool ModulWindow::BasicStepOver()
{ {
DBG_CHKTHIS( ModulWindow, 0 ); DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER; aStatus.nBasicFlags = SbDEBUG_STEPINTO | SbDEBUG_STEPOVER;
bool bDone = BasicExecute(); return BasicExecute();
return bDone;
} }
@ -390,8 +384,7 @@ bool ModulWindow::BasicStepInto()
DBG_CHKTHIS( ModulWindow, 0 ); DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPINTO; aStatus.nBasicFlags = SbDEBUG_STEPINTO;
bool bDone = BasicExecute(); return BasicExecute();
return bDone;
} }
bool ModulWindow::BasicStepOut() bool ModulWindow::BasicStepOut()
@ -399,8 +392,7 @@ bool ModulWindow::BasicStepOut()
DBG_CHKTHIS( ModulWindow, 0 ); DBG_CHKTHIS( ModulWindow, 0 );
aStatus.nBasicFlags = SbDEBUG_STEPOUT; aStatus.nBasicFlags = SbDEBUG_STEPOUT;
bool bDone = BasicExecute(); return BasicExecute();
return bDone;
} }
@ -448,9 +440,9 @@ bool ModulWindow::LoadBasic()
sal_uLong nLines = CalcLineCount( *pStream ); sal_uLong nLines = CalcLineCount( *pStream );
// nLines*4: ReadText/Formatting/Highlighting/Formatting // nLines*4: ReadText/Formatting/Highlighting/Formatting
GetEditorWindow().CreateProgress( String( IDEResId( RID_STR_GENERATESOURCE ) ), nLines*4 ); GetEditorWindow().CreateProgress( String( IDEResId( RID_STR_GENERATESOURCE ) ), nLines*4 );
GetEditEngine()->SetUpdateMode( sal_False ); GetEditEngine()->SetUpdateMode( false );
GetEditView()->Read( *pStream ); GetEditView()->Read( *pStream );
GetEditEngine()->SetUpdateMode( sal_True ); GetEditEngine()->SetUpdateMode( true );
GetEditorWindow().Update(); GetEditorWindow().Update();
GetEditorWindow().ForceSyntaxTimeout(); GetEditorWindow().ForceSyntaxTimeout();
GetEditorWindow().DestroyProgress(); GetEditorWindow().DestroyProgress();
@ -483,9 +475,9 @@ bool ModulWindow::SaveBasicSource()
} }
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False); xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
Any aValue; Any aValue;
aValue <<= (sal_Bool) sal_True; aValue <<= sal_True;
xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
if ( !aCurPath.isEmpty() ) if ( !aCurPath.isEmpty() )
@ -627,7 +619,7 @@ void ModulWindow::BasicToggleBreakPointEnabled()
BreakPoint* pBrk = rList.FindBreakPoint( nLine ); BreakPoint* pBrk = rList.FindBreakPoint( nLine );
if ( pBrk ) if ( pBrk )
{ {
pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True; pBrk->bEnabled = !pBrk->bEnabled;
UpdateBreakPoint( *pBrk ); UpdateBreakPoint( *pBrk );
} }
} }
@ -676,9 +668,9 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
} }
::rtl::OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear()); ::rtl::OUString aErrorTextPrefix(aErrorTextPrefixBuf.makeStringAndClear());
// if other basic, the IDE should try to display the correct module // 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 ) if ( bMarkError )
aXEditorWindow.GetBrkWindow().SetMarkerPos( nErrorLine, sal_True ); aXEditorWindow.GetBrkWindow().SetMarkerPos(nErrorLine, true);
// #i47002# // #i47002#
Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( this ); Reference< awt::XWindow > xWindow = VCLUnoHelper::GetInterface( this );
@ -688,11 +680,11 @@ long ModulWindow::BasicErrorHdl( StarBASIC * pBasic )
// #i47002# // #i47002#
Window* pWindow = VCLUnoHelper::GetWindow( xWindow ); Window* pWindow = VCLUnoHelper::GetWindow( xWindow );
if ( !pWindow ) if ( !pWindow )
return sal_False; return false;
if ( bMarkError ) if ( bMarkError )
aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER ); aXEditorWindow.GetBrkWindow().SetMarkerPos( MARKER_NOMARKER );
return sal_False; return false;
} }
long ModulWindow::BasicBreakHdl( StarBASIC* pBasic ) long ModulWindow::BasicBreakHdl( StarBASIC* pBasic )
@ -746,7 +738,7 @@ void ModulWindow::BasicAddWatch()
DBG_CHKTHIS( ModulWindow, 0 ); DBG_CHKTHIS( ModulWindow, 0 );
String aWatchStr; String aWatchStr;
AssertValidEditEngine(); AssertValidEditEngine();
sal_Bool bAdd = sal_True; bool bAdd = true;
if ( !GetEditView()->HasSelection() ) if ( !GetEditView()->HasSelection() )
{ {
TextPaM aWordStart; TextPaM aWordStart;
@ -757,7 +749,7 @@ void ModulWindow::BasicAddWatch()
sal_uInt16& rIndex = aSel.GetEnd().GetIndex(); sal_uInt16& rIndex = aSel.GetEnd().GetIndex();
rIndex = rIndex + aWord.getLength(); rIndex = rIndex + aWord.getLength();
GetEditView()->SetSelection( aSel ); GetEditView()->SetSelection( aSel );
bAdd = sal_True; bAdd = true;
} }
} }
if ( bAdd ) if ( bAdd )
@ -814,7 +806,7 @@ void ModulWindow::EditMacro( const String& rMacroName )
long nNewStartY = nStart * pView->GetTextEngine()->GetCharHeight(); long nNewStartY = nStart * pView->GetTextEngine()->GetCharHeight();
nNewStartY = Min( nNewStartY, nMaxY ); nNewStartY = Min( nNewStartY, nMaxY );
pView->Scroll( 0, -(nNewStartY-nOldStartY) ); pView->Scroll( 0, -(nNewStartY-nOldStartY) );
pView->ShowCursor( sal_False, sal_True ); pView->ShowCursor( false, true );
GetEditVScrollBar().SetThumbPos( pView->GetStartDocPos().Y() ); GetEditVScrollBar().SetThumbPos( pView->GetStartDocPos().Y() );
} }
pView->SetSelection( aSel ); pView->SetSelection( aSel );
@ -864,7 +856,7 @@ void ModulWindow::UpdateData()
TextSelection aSel = GetEditView()->GetSelection(); TextSelection aSel = GetEditView()->GetSelection();
setTextEngineText( GetEditEngine(), xModule->GetSource32() ); setTextEngineText( GetEditEngine(), xModule->GetSource32() );
GetEditView()->SetSelection( aSel ); GetEditView()->SetSelection( aSel );
GetEditEngine()->SetModified( sal_False ); GetEditEngine()->SetModified( false );
BasicIDE::MarkDocumentModified( GetDocument() ); BasicIDE::MarkDocumentModified( GetDocument() );
} }
} }
@ -897,7 +889,7 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
Font aFont( GetEditEngine()->GetFont() ); Font aFont( GetEditEngine()->GetFont() );
aFont.SetAlign( ALIGN_BOTTOM ); aFont.SetAlign( ALIGN_BOTTOM );
aFont.SetTransparent( sal_True ); aFont.SetTransparent( true );
aFont.SetSize( Size( 0, 360 ) ); aFont.SetSize( Size( 0, 360 ) );
pPrinter->SetFont( aFont ); pPrinter->SetFont( aFont );
pPrinter->SetMapMode( MAP_100TH_MM ); 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: // don't scroll with the value but rather use the Thumb-Pos for the VisArea:
long nDiff = GetEditView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos(); long nDiff = GetEditView()->GetStartDocPos().X() - pCurScrollBar->GetThumbPos();
GetEditView()->Scroll( nDiff, 0 ); GetEditView()->Scroll( nDiff, 0 );
GetEditView()->ShowCursor( sal_False, sal_True ); GetEditView()->ShowCursor( false, true );
pCurScrollBar->SetThumbPos( GetEditView()->GetStartDocPos().X() ); 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 ) ) ); pView->SetSelection( TextSelection( TextPaM( 0xFFFFFFFF, 0xFFFF ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) );
} }
sal_Bool bForward = !rSearchItem.GetBackward(); bool const bForward = !rSearchItem.GetBackward();
sal_uInt16 nFound = 0; sal_uInt16 nFound = 0;
if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) || if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) ||
( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) ) ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) )
@ -1243,7 +1235,7 @@ sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem,
{ {
if ( !IsReadOnly() ) 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 ); nFound = pView->Replace( rSearchItem.GetSearchOptions() , bAll , bForward );
} }
} }
@ -1346,20 +1338,15 @@ BasicEntryDescriptor ModulWindow::CreateEntryDescriptor()
return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aModName, OBJ_TYPE_MODULE ); return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, aModName, OBJ_TYPE_MODULE );
} }
void ModulWindow::SetReadOnly( sal_Bool b ) void ModulWindow::SetReadOnly (bool b)
{ {
if ( GetEditView() ) if ( GetEditView() )
GetEditView()->SetReadOnly( b ); GetEditView()->SetReadOnly( b );
} }
sal_Bool ModulWindow::IsReadOnly() bool ModulWindow::IsReadOnly()
{ {
sal_Bool bReadOnly = sal_False; return GetEditView() && GetEditView()->IsReadOnly();
if ( GetEditView() )
bReadOnly = GetEditView()->IsReadOnly();
return bReadOnly;
} }
void ModulWindow::SetLineNumberDisplay(bool b) void ModulWindow::SetLineNumberDisplay(bool b)
@ -1372,9 +1359,9 @@ void ModulWindow::SetObjectCatalogDisplay(bool b)
aXEditorWindow.SetObjectCatalogDisplay(b); aXEditorWindow.SetObjectCatalogDisplay(b);
} }
sal_Bool ModulWindow::IsPasteAllowed() bool ModulWindow::IsPasteAllowed()
{ {
sal_Bool bPaste = sal_False; bool bPaste = false;
// get clipboard // get clipboard
Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard(); Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard();
@ -1389,9 +1376,7 @@ sal_Bool ModulWindow::IsPasteAllowed()
datatransfer::DataFlavor aFlavor; datatransfer::DataFlavor aFlavor;
SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor ); SotExchange::GetFormatDataFlavor( SOT_FORMAT_STRING, aFlavor );
if ( xTransf->isDataFlavorSupported( aFlavor ) ) if ( xTransf->isDataFlavorSupported( aFlavor ) )
{ bPaste = true;
bPaste = sal_True;
}
} }
} }

View File

@ -123,7 +123,7 @@ private:
virtual virtual
::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >
GetComponentInterface(sal_Bool bCreate = sal_True); GetComponentInterface(sal_Bool bCreate = true);
protected: protected:
virtual void Paint( const Rectangle& ); virtual void Paint( const Rectangle& );
@ -213,7 +213,7 @@ protected:
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
virtual sal_Bool EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText ); 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 ); SbxBase* ImplGetSBXForEntry( SvLBoxEntry* pEntry, bool& rbArrayElement );
public: public:
@ -359,8 +359,8 @@ public:
virtual ::rtl::OUString GetTitle(); virtual ::rtl::OUString GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor(); virtual BasicEntryDescriptor CreateEntryDescriptor();
virtual bool AllowUndo(); virtual bool AllowUndo();
virtual void SetReadOnly( sal_Bool bReadOnly ); virtual void SetReadOnly (bool bReadOnly);
virtual sal_Bool IsReadOnly(); virtual bool IsReadOnly();
void SetLineNumberDisplay(bool); void SetLineNumberDisplay(bool);
void SetObjectCatalogDisplay(bool); void SetObjectCatalogDisplay(bool);
@ -371,7 +371,7 @@ public:
void SetSbModule( SbModule* pModule ) { xModule = pModule; } void SetSbModule( SbModule* pModule ) { xModule = pModule; }
::rtl::OUString GetSbModuleName(); ::rtl::OUString GetSbModuleName();
sal_Bool CompileBasic(); bool CompileBasic();
bool BasicRun(); bool BasicRun();
bool BasicStepOver(); bool BasicStepOver();
bool BasicStepInto(); bool BasicStepInto();
@ -394,8 +394,8 @@ public:
BasicStatus& GetBasicStatus() { return aStatus; } BasicStatus& GetBasicStatus() { return aStatus; }
virtual sal_Bool IsModified(); virtual bool IsModified ();
virtual sal_Bool IsPasteAllowed(); virtual bool IsPasteAllowed ();
void FrameWindowMoved(); void FrameWindowMoved();
void ShowCursor( bool bOn ); void ShowCursor( bool bOn );

View File

@ -288,7 +288,7 @@ void EditorWindow::RequestHelp( const HelpEvent& rHEvt )
Point aWindowPos = rHEvt.GetMousePosPixel(); Point aWindowPos = rHEvt.GetMousePosPixel();
aWindowPos = ScreenToOutputPixel( aWindowPos ); aWindowPos = ScreenToOutputPixel( aWindowPos );
Point aDocPos = GetEditView()->GetDocPos( aWindowPos ); Point aDocPos = GetEditView()->GetDocPos( aWindowPos );
TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM( aDocPos, sal_False ); TextPaM aCursor = GetEditView()->GetTextEngine()->GetPaM(aDocPos, false);
TextPaM aStartOfWord; TextPaM aStartOfWord;
String aWord = GetEditView()->GetTextEngine()->GetWord( aCursor, &aStartOfWord ); String aWord = GetEditView()->GetTextEngine()->GetWord( aCursor, &aStartOfWord );
if ( aWord.Len() && !comphelper::string::isdigitAsciiString(aWord) ) if ( aWord.Len() && !comphelper::string::isdigitAsciiString(aWord) )
@ -414,7 +414,7 @@ bool EditorWindow::ImpCanModify()
// Remove markers in the modules in Notify at Basic::Stoped // Remove markers in the modules in Notify at Basic::Stoped
if ( QueryBox( 0, WB_OK_CANCEL, String( IDEResId( RID_STR_WILLSTOPPRG ) ) ).Execute() == RET_OK ) 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(); BasicIDE::StopBasic();
} }
else else
@ -435,14 +435,14 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
long nLinSz = pModulWindow->GetHScrollBar()->GetLineSize(); (void)nLinSz; long nLinSz = pModulWindow->GetHScrollBar()->GetLineSize(); (void)nLinSz;
long nThumb = pModulWindow->GetHScrollBar()->GetThumbPos(); (void)nThumb; long nThumb = pModulWindow->GetHScrollBar()->GetThumbPos(); (void)nThumb;
#endif #endif
sal_Bool bWasModified = pEditEngine->IsModified(); bool const bWasModified = pEditEngine->IsModified();
// see if there is an accelerator to be processed first // 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 ( !bDone && ( !TextEngine::DoesKeyChangeText( rKEvt ) || ImpCanModify() ) )
{ {
if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() ) if ( ( rKEvt.GetKeyCode().GetCode() == KEY_Y ) && rKEvt.GetKeyCode().IsMod1() )
bDone = sal_True; bDone = true;
else else
{ {
if ( ( rKEvt.GetKeyCode().GetCode() == KEY_TAB ) && !rKEvt.GetKeyCode().IsMod1() && if ( ( rKEvt.GetKeyCode().GetCode() == KEY_TAB ) && !rKEvt.GetKeyCode().IsMod1() &&
@ -457,7 +457,7 @@ void EditorWindow::KeyInput( const KeyEvent& rKEvt )
else else
pEditView->UnindentBlock(); pEditView->UnindentBlock();
bDelayHighlight = true; bDelayHighlight = true;
bDone = sal_True; bDone = true;
} }
} }
if ( !bDone ) if ( !bDone )
@ -528,7 +528,7 @@ bool EditorWindow::SetSourceInBasic()
String aName = pModulWindow->GetName(); String aName = pModulWindow->GetName();
OSL_VERIFY( aDocument.updateModule( aLibName, aName, aModule ) ); OSL_VERIFY( aDocument.updateModule( aLibName, aName, aModule ) );
pEditEngine->SetModified( sal_False ); pEditEngine->SetModified(false);
BasicIDE::MarkDocumentModified( aDocument ); BasicIDE::MarkDocumentModified( aDocument );
bChanged = true; bChanged = true;
} }
@ -563,8 +563,8 @@ void EditorWindow::CreateEditEngine()
pEditEngine = new ExtTextEngine; pEditEngine = new ExtTextEngine;
pEditView = new ExtTextView( pEditEngine, this ); pEditView = new ExtTextView( pEditEngine, this );
pEditView->SetAutoIndentMode( sal_True ); pEditView->SetAutoIndentMode(true);
pEditEngine->SetUpdateMode( sal_False ); pEditEngine->SetUpdateMode(false);
pEditEngine->InsertView( pEditView ); pEditEngine->InsertView( pEditView );
ImplSetFont(); ImplSetFont();
@ -596,15 +596,15 @@ void EditorWindow::CreateEditEngine()
pEditView->SetSelection( TextSelection() ); pEditView->SetSelection( TextSelection() );
pModulWindow->GetBreakPointWindow().GetCurYOffset() = 0; pModulWindow->GetBreakPointWindow().GetCurYOffset() = 0;
pModulWindow->GetLineNumberWindow().GetCurYOffset() = 0; pModulWindow->GetLineNumberWindow().GetCurYOffset() = 0;
pEditEngine->SetUpdateMode( sal_True ); pEditEngine->SetUpdateMode(true);
Update(); // has only been invalidated at UpdateMode = sal_True Update(); // has only been invalidated at UpdateMode = true
pModulWindow->GetLayout()->GetWatchWindow().Update(); pModulWindow->GetLayout()->GetWatchWindow().Update();
pModulWindow->GetLayout()->GetStackWindow().Update(); pModulWindow->GetLayout()->GetStackWindow().Update();
pModulWindow->GetBreakPointWindow().Update(); pModulWindow->GetBreakPointWindow().Update();
pModulWindow->GetLineNumberWindow().Update(); pModulWindow->GetLineNumberWindow().Update();
pEditView->ShowCursor( sal_True, sal_True ); pEditView->ShowCursor( true, true );
StartListening( *pEditEngine ); StartListening( *pEditEngine );
@ -619,8 +619,8 @@ void EditorWindow::CreateEditEngine()
DELETEZ( pProgress ); DELETEZ( pProgress );
pEditView->EraseVirtualDevice(); pEditView->EraseVirtualDevice();
pEditEngine->SetModified( sal_False ); pEditEngine->SetModified( false );
pEditEngine->EnableUndo( sal_True ); pEditEngine->EnableUndo( true );
InitScrollBars(); InitScrollBars();
@ -636,11 +636,11 @@ void EditorWindow::CreateEditEngine()
Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); Reference< script::XLibraryContainer2 > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) )
{ {
pModulWindow->SetReadOnly( sal_True ); pModulWindow->SetReadOnly(true);
} }
if ( aDocument.isDocument() && aDocument.isReadOnly() ) if ( aDocument.isDocument() && aDocument.isReadOnly() )
pModulWindow->SetReadOnly( sal_True ); pModulWindow->SetReadOnly(true);
} }
// virtual // virtual
@ -781,8 +781,8 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
aSyntaxIdleTimer.Start(); aSyntaxIdleTimer.Start();
} }
sal_Bool bWasModified = pEditEngine->IsModified(); bool const bWasModified = pEditEngine->IsModified();
pEditEngine->RemoveAttribs( nLine, sal_True ); pEditEngine->RemoveAttribs( nLine, true );
HighlightPortions aPortions; HighlightPortions aPortions;
aHighlighter.getHighlightPortions( nLine, aLine, aPortions ); aHighlighter.getHighlightPortions( nLine, aLine, aPortions );
@ -790,7 +790,7 @@ void EditorWindow::ImpDoHighlight( sal_uLong nLine )
{ {
HighlightPortion& r = aPortions[i]; HighlightPortion& r = aPortions[i];
const Color& rColor = dynamic_cast<ModulWindowLayout*>(pModulWindow->GetLayoutWindow())->getSyntaxColor(r.tokenType); 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 ); pEditEngine->SetModified( bWasModified );
@ -822,7 +822,7 @@ void EditorWindow::ImplSetFont()
if ( pEditEngine ) if ( pEditEngine )
{ {
sal_Bool bModified = pEditEngine->IsModified(); bool const bModified = pEditEngine->IsModified();
pEditEngine->SetFont( aFont ); pEditEngine->SetFont( aFont );
pEditEngine->SetModified( bModified ); pEditEngine->SetModified( bModified );
} }
@ -864,8 +864,8 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl)
{ {
DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" ); DBG_ASSERT( pEditView, "Noch keine View, aber Syntax-Highlight ?!" );
sal_Bool bWasModified = pEditEngine->IsModified(); bool const bWasModified = pEditEngine->IsModified();
// pEditEngine->SetUpdateMode( sal_False ); //pEditEngine->SetUpdateMode(false);
bHighlightning = true; bHighlightning = true;
for ( SyntaxLineSet::const_iterator it = aSyntaxLineTable.begin(); for ( SyntaxLineSet::const_iterator it = aSyntaxLineTable.begin();
@ -877,7 +877,7 @@ IMPL_LINK_NOARG(EditorWindow, SyntaxTimerHdl)
// #i45572# // #i45572#
if ( pEditView ) if ( pEditView )
pEditView->ShowCursor( sal_False, sal_True ); pEditView->ShowCursor( false, true );
pEditEngine->SetModified( bWasModified ); pEditEngine->SetModified( bWasModified );
@ -1095,7 +1095,7 @@ void BreakPointWindow::Command( const CommandEvent& rCEvt )
{ {
case RID_ACTIV: case RID_ACTIV:
{ {
pBrk->bEnabled = pBrk->bEnabled ? sal_False : sal_True; pBrk->bEnabled = !pBrk->bEnabled;
pModulWindow->UpdateBreakPoint( *pBrk ); pModulWindow->UpdateBreakPoint( *pBrk );
Invalidate(); Invalidate();
} }
@ -1207,7 +1207,7 @@ WatchWindow::WatchWindow( Window* pParent ) :
nHeaderBarHeight = 16; nHeaderBarHeight = 16;
aTreeListBox.SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST); aTreeListBox.SetHelpId(HID_BASICIDE_WATCHWINDOW_LIST);
aTreeListBox.EnableInplaceEditing( sal_True ); aTreeListBox.EnableInplaceEditing(true);
aTreeListBox.SetSelectHdl( LINK( this, WatchWindow, TreeListHdl ) ); aTreeListBox.SetSelectHdl( LINK( this, WatchWindow, TreeListHdl ) );
aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight + nHeaderBarHeight ) ); aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight + nHeaderBarHeight ) );
aTreeListBox.SetHighlightRange( 1, 5 ); aTreeListBox.SetHighlightRange( 1, 5 );
@ -1390,11 +1390,11 @@ void WatchWindow::AddWatch( const String& rVName )
String aWatchStr_( aVar ); String aWatchStr_( aVar );
aWatchStr_ += String( RTL_CONSTASCII_USTRINGPARAM( "\t\t" ) ); 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 ); pNewEntry->SetUserData( pWatchItem );
aTreeListBox.Select( pNewEntry, sal_True ); aTreeListBox.Select(pNewEntry, true);
aTreeListBox.MakeVisible( pNewEntry ); aTreeListBox.MakeVisible(pNewEntry);
aRemoveWatchButton.Enable(); aRemoveWatchButton.Enable();
} }
@ -1523,7 +1523,7 @@ StackWindow::StackWindow( Window* pParent ) :
aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) ); aTreeListBox.SetPosPixel( Point( DWBORDER, nVirtToolBoxHeight ) );
aTreeListBox.SetHighlightRange(); aTreeListBox.SetHighlightRange();
aTreeListBox.SetSelectionMode( NO_SELECTION ); aTreeListBox.SetSelectionMode( NO_SELECTION );
aTreeListBox.InsertEntry( String(), 0, sal_False, LIST_APPEND ); aTreeListBox.InsertEntry( String(), 0, false, LIST_APPEND );
aTreeListBox.Show(); aTreeListBox.Show();
SetText( String( IDEResId( RID_STR_STACKNAME ) ) ); SetText( String( IDEResId( RID_STR_STACKNAME ) ) );
@ -1568,7 +1568,7 @@ void StackWindow::Resize()
void StackWindow::UpdateCalls() void StackWindow::UpdateCalls()
{ {
aTreeListBox.SetUpdateMode( sal_False ); aTreeListBox.SetUpdateMode(false);
aTreeListBox.Clear(); aTreeListBox.Clear();
if ( StarBASIC::IsRunning() ) if ( StarBASIC::IsRunning() )
@ -1614,7 +1614,7 @@ void StackWindow::UpdateCalls()
} }
aEntry += ')'; aEntry += ')';
} }
aTreeListBox.InsertEntry( aEntry, 0, sal_False, LIST_APPEND ); aTreeListBox.InsertEntry( aEntry, 0, false, LIST_APPEND );
nScope++; nScope++;
pMethod = StarBASIC::GetActiveMethod( nScope ); pMethod = StarBASIC::GetActiveMethod( nScope );
} }
@ -1626,10 +1626,10 @@ void StackWindow::UpdateCalls()
else else
{ {
aTreeListBox.SetSelectionMode( NO_SELECTION ); 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 ) : ComplexEditorWindow::ComplexEditorWindow( ModulWindow* pParent ) :
@ -1691,7 +1691,7 @@ IMPL_LINK( ComplexEditorWindow, ScrollHdl, ScrollBar *, pCurScrollBar )
aEdtWindow.GetEditView()->Scroll( 0, nDiff ); aEdtWindow.GetEditView()->Scroll( 0, nDiff );
aBrkWindow.DoScroll( 0, nDiff ); aBrkWindow.DoScroll( 0, nDiff );
aLineNumberWindow.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() ); pCurScrollBar->SetThumbPos( aEdtWindow.GetEditView()->GetStartDocPos().Y() );
} }
@ -1921,7 +1921,7 @@ sal_Bool WatchTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{ {
WatchItem* pItem = (WatchItem*)pEntry->GetUserData(); WatchItem* pItem = (WatchItem*)pEntry->GetUserData();
sal_Bool bEdit = sal_False; bool bEdit = false;
if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() ) if ( StarBASIC::IsRunning() && StarBASIC::GetActiveMethod() && !SbxBase::IsError() )
{ {
// No out of scope entries // 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 = SvHeaderTabListBox::GetEntryText( pEntry, ITEM_ID_VALUE-1 );
aEditingRes = comphelper::string::strip(aEditingRes, ' '); 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 == '\"' ) if( cFirst == '\"' && cLast == '\"' )
aResult = aResult.Copy( 1, nResultLen - 2 ); aResult = aResult.Copy( 1, nResultLen - 2 );
bool bResModified = ( aResult != aEditingRes ); return aResult != aEditingRes && ImplBasicEntryEdited(pEntry, aResult);
sal_Bool bRet = sal_False;
if ( bResModified )
bRet = ImplBasicEntryEdited( pEntry, aResult );
return bRet;
} }
sal_Bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult ) bool WatchTreeListBox::ImplBasicEntryEdited( SvLBoxEntry* pEntry, const String& rResult )
{ {
bool bArrayElement; bool bArrayElement;
SbxBase* pSBX = ImplGetSBXForEntry( pEntry, 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, // The text should never be taken/copied 1:1,
// as the UpdateWatches will be lost // as the UpdateWatches will be lost
return sal_False; return false;
} }

View File

@ -92,10 +92,10 @@ DialogWindow::DialogWindow( Window* pParent, const ScriptDocument& rDocument, ::
// set readonly mode for readonly libraries // set readonly mode for readonly libraries
Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY ); Reference< script::XLibraryContainer2 > xDlgLibContainer( GetDocument().getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) ) if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) )
SetReadOnly( sal_True ); SetReadOnly(true);
if ( rDocument.isDocument() && rDocument.isReadOnly() ) if ( rDocument.isDocument() && rDocument.isReadOnly() )
SetReadOnly( sal_True ); SetReadOnly(true);
} }
DialogWindow::~DialogWindow() DialogWindow::~DialogWindow()
@ -311,13 +311,9 @@ void DialogWindow::GetState( SfxItemSet& rSet )
case SID_DIALOG_TESTMODE: case SID_DIALOG_TESTMODE:
{ {
// is the IDE still active? // is the IDE still active?
if( BasicIDEGlobals::GetShell()->GetFrame() ) bool const bBool = BasicIDEGlobals::GetShell()->GetFrame() &&
{ pEditor->GetMode() == DLGED_TEST;
rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE, rSet.Put(SfxBoolItem(SID_DIALOG_TESTMODE, bBool));
(pEditor->GetMode() == DLGED_TEST) ? sal_True : sal_False) );
}
else
rSet.Put( SfxBoolItem( SID_DIALOG_TESTMODE,sal_False ));
} }
break; break;
@ -709,9 +705,9 @@ bool DialogWindow::SaveDialog()
} }
Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY); Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False); xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
Any aValue; Any aValue;
aValue <<= (sal_Bool) sal_True; aValue <<= sal_True;
xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
if ( !aCurPath.isEmpty() ) if ( !aCurPath.isEmpty() )
@ -796,7 +792,7 @@ bool DialogWindow::SaveDialog()
::rtl::OUString aDialogName( aURLObj.getName() ); ::rtl::OUString aDialogName( aURLObj.getName() );
aURLObj.removeSegment(); aURLObj.removeSegment();
::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); ::rtl::OUString aURL( aURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
sal_Bool bReadOnly = sal_False; bool bReadOnly = false;
::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " )); ::rtl::OUString aComment( RTL_CONSTASCII_USTRINGPARAM( "# " ));
aComment += aDialogName; aComment += aDialogName;
aComment += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( " strings" )); 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); Reference< XFilePickerControlAccess > xFPControl(xFP, UNO_QUERY);
xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, sal_False); xFPControl->enableControl(ExtendedFilePickerElementIds::CHECKBOX_PASSWORD, false);
Any aValue; Any aValue;
aValue <<= (sal_Bool) sal_True; aValue <<= sal_True;
xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue); xFPControl->setValue(ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue);
::rtl::OUString aCurPath( rCurPath ); ::rtl::OUString aCurPath( rCurPath );
@ -1088,7 +1084,7 @@ bool implImportDialog( Window* pWin, const ::rtl::OUString& rCurPath, const Scri
Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales(); Sequence< lang::Locale > aImportLocaleSeq = xImportStringResource->getLocales();
sal_Int32 nImportLocaleCount = aImportLocaleSeq.getLength(); 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 ); Reference< resource::XStringResourceManager > xLibStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
sal_Int32 nLibLocaleCount = 0; sal_Int32 nLibLocaleCount = 0;
Sequence< lang::Locale > aLibLocaleSeq; Sequence< lang::Locale > aLibLocaleSeq;
@ -1280,7 +1276,7 @@ DlgEdView* DialogWindow::GetView() const
return pEditor ? pEditor->GetView() : NULL; return pEditor ? pEditor->GetView() : NULL;
} }
sal_Bool DialogWindow::IsModified() bool DialogWindow::IsModified()
{ {
return pEditor->IsModified(); return pEditor->IsModified();
} }
@ -1304,30 +1300,20 @@ BasicEntryDescriptor DialogWindow::CreateEntryDescriptor()
return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG ); return BasicEntryDescriptor( aDocument, eLocation, aLibName, aLibSubName, GetName(), OBJ_TYPE_DIALOG );
} }
void DialogWindow::SetReadOnly( sal_Bool b ) void DialogWindow::SetReadOnly (bool bReadOnly)
{ {
if ( pEditor ) if (pEditor)
{ pEditor->SetMode(bReadOnly ? DLGED_READONLY : DLGED_SELECT);
if ( b )
pEditor->SetMode( DLGED_READONLY );
else
pEditor->SetMode( DLGED_SELECT );
}
} }
sal_Bool DialogWindow::IsReadOnly() bool DialogWindow::IsReadOnly ()
{ {
sal_Bool bReadOnly = sal_False; return pEditor && pEditor->GetMode() == DLGED_READONLY;
if ( pEditor && pEditor->GetMode() == DLGED_READONLY )
bReadOnly = sal_True;
return bReadOnly;
} }
sal_Bool DialogWindow::IsPasteAllowed() bool DialogWindow::IsPasteAllowed()
{ {
return pEditor ? pEditor->IsPasteAllowed() : sal_False; return pEditor && pEditor->IsPasteAllowed();
} }
void DialogWindow::StoreData() void DialogWindow::StoreData()

View File

@ -79,7 +79,7 @@ void BasicIDEShell::ExecuteCurrent( SfxRequest& rReq )
{ {
case SID_SHOWLINES: 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; bool bValue = false;
if ( pItem ) if ( pItem )
bValue = pItem->GetValue(); bValue = pItem->GetValue();
@ -317,7 +317,8 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{ {
uno::Reference< task::XStatusIndicator > xStatusIndicator; 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 ) if ( pStatusIndicatorItem )
OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator ); OSL_VERIFY( pStatusIndicatorItem->GetValue() >>= xStatusIndicator );
else else
@ -379,7 +380,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
break; break;
case SID_BASICIDE_CHOOSEMACRO: case SID_BASICIDE_CHOOSEMACRO:
{ {
BasicIDE::ChooseMacro( NULL, sal_False, ::rtl::OUString() ); BasicIDE::ChooseMacro( NULL, false, ::rtl::OUString() );
} }
break; break;
case SID_BASICIDE_CREATEMACRO: case SID_BASICIDE_CREATEMACRO:
@ -392,7 +393,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
ScriptDocument aDocument( ScriptDocument::getDocumentForBasicManager( pBasMgr ) ); 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() ); ::rtl::OUString aLibName( rInfo.GetLib() );
if ( aLibName.isEmpty() ) if ( aLibName.isEmpty() )
aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard")); aLibName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
@ -420,7 +421,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
::rtl::OUString aModName = rInfo.GetModule(); ::rtl::OUString aModName = rInfo.GetModule();
::rtl::OUString sModuleCode; ::rtl::OUString sModuleCode;
if ( aDocument.createModule( aLibName, aModName, sal_False, sModuleCode ) ) if ( aDocument.createModule( aLibName, aModName, false, sModuleCode ) )
pModule = pBasic->FindModule( aModName ); pModule = pBasic->FindModule( aModName );
} }
else else
@ -552,7 +553,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
aDocument.loadLibraryIfExists( E_DIALOGS, aLibName ); aDocument.loadLibraryIfExists( E_DIALOGS, aLibName );
// check password, if library is password protected and not verified // 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 ) ); Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) )
{ {
@ -573,7 +574,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
// adjust old value... // adjust old value...
SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings ) if ( pBindings )
pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False ); pBindings->Invalidate(SID_BASICIDE_LIBSELECTOR, true, false);
} }
} }
else if ( nSlot == SID_BASICIDE_LIBREMOVED ) else if ( nSlot == SID_BASICIDE_LIBREMOVED )
@ -678,7 +679,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
{ {
::std::auto_ptr< ScriptDocument > pDocument; ::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 ) if ( pDocumentItem )
{ {
::rtl::OUString sDocumentCaption = pDocumentItem->GetValue(); ::rtl::OUString sDocumentCaption = pDocumentItem->GetValue();
@ -686,7 +687,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
pDocument.reset( new ScriptDocument( ScriptDocument::getDocumentWithURLOrCaption( sDocumentCaption ) ) ); 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 ) if ( !pDocument.get() && pDocModelItem )
{ {
uno::Reference< frame::XModel > xModel( pDocModelItem->GetValue(), UNO_QUERY ); uno::Reference< frame::XModel > xModel( pDocModelItem->GetValue(), UNO_QUERY );
@ -697,21 +698,21 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
if ( !pDocument.get() ) if ( !pDocument.get() )
break; 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 ) if ( !pLibNameItem )
break; break;
::rtl::OUString aLibName( pLibNameItem->GetValue() ); ::rtl::OUString aLibName( pLibNameItem->GetValue() );
pDocument->loadLibraryIfExists( E_SCRIPTS, aLibName ); pDocument->loadLibraryIfExists( E_SCRIPTS, aLibName );
SetCurLib( *pDocument, 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 ) if ( pNameItem )
{ {
::rtl::OUString aName( pNameItem->GetValue() ); ::rtl::OUString aName( pNameItem->GetValue() );
::rtl::OUString aModType(RTL_CONSTASCII_USTRINGPARAM("Module")); ::rtl::OUString aModType(RTL_CONSTASCII_USTRINGPARAM("Module"));
::rtl::OUString aDlgType(RTL_CONSTASCII_USTRINGPARAM("Dialog")); ::rtl::OUString aDlgType(RTL_CONSTASCII_USTRINGPARAM("Dialog"));
::rtl::OUString aType( aModType ); ::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 ) if ( pTypeItem )
aType = pTypeItem->GetValue(); aType = pTypeItem->GetValue();
@ -730,7 +731,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
if ( pWin->ISA( ModulWindow ) ) if ( pWin->ISA( ModulWindow ) )
{ {
ModulWindow* pModWin = (ModulWindow*)pWin; 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 ) if ( pLineItem )
{ {
pModWin->AssertValidEditEngine(); pModWin->AssertValidEditEngine();
@ -759,11 +760,11 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
long nNewY = nLine * pTextEngine->GetCharHeight() - nVisHeight / 2; long nNewY = nLine * pTextEngine->GetCharHeight() - nVisHeight / 2;
nNewY = ::std::min( nNewY, nMaxY ); nNewY = ::std::min( nNewY, nMaxY );
pTextView->Scroll( 0, -( nNewY - nOldY ) ); pTextView->Scroll( 0, -( nNewY - nOldY ) );
pTextView->ShowCursor( sal_False, sal_True ); pTextView->ShowCursor( false, true );
pModWin->GetEditVScrollBar().SetThumbPos( pTextView->GetStartDocPos().Y() ); pModWin->GetEditVScrollBar().SetThumbPos( pTextView->GetStartDocPos().Y() );
} }
sal_uInt16 nCol1 = 0, nCol2 = 0; 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 ) if ( pCol1Item )
{ {
nCol1 = pCol1Item->GetValue(); nCol1 = pCol1Item->GetValue();
@ -771,7 +772,7 @@ void BasicIDEShell::ExecuteGlobal( SfxRequest& rReq )
--nCol1; --nCol1;
nCol2 = 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 ) if ( pCol2Item )
{ {
nCol2 = pCol2Item->GetValue(); nCol2 = pCol2Item->GetValue();
@ -819,7 +820,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) ) if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) )
{ {
rSet.DisableItem( nWh ); rSet.DisableItem( nWh );
rSet.Put(SfxVisibilityItem(nWh, sal_False)); rSet.Put(SfxVisibilityItem(nWh, false));
} }
else else
rSet.Put( SfxBoolItem( nWh, lcl_GetSourceLinesEnabledValue() ) ); rSet.Put( SfxBoolItem( nWh, lcl_GetSourceLinesEnabledValue() ) );
@ -832,7 +833,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
break; break;
case SID_SAVEDOC: case SID_SAVEDOC:
{ {
sal_Bool bDisable = sal_False; bool bDisable = false;
if ( pCurWin ) if ( pCurWin )
{ {
@ -845,7 +846,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
} }
else else
{ {
bDisable = sal_True; bDisable = true;
} }
if ( bDisable ) if ( bDisable )
@ -883,14 +884,14 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) ) if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) )
{ {
rSet.DisableItem( nWh ); rSet.DisableItem( nWh );
rSet.Put(SfxVisibilityItem(nWh, sal_False)); rSet.Put(SfxVisibilityItem(nWh, false));
} }
else else
{ {
if (nWh == SID_BASICIDE_OBJCAT) if (nWh == SID_BASICIDE_OBJCAT)
rSet.Put(SfxBoolItem(nWh, pModulLayout && pModulLayout->HasObjectCatalog())); rSet.Put(SfxBoolItem(nWh, pModulLayout && pModulLayout->HasObjectCatalog()));
else else
rSet.Put(SfxVisibilityItem(nWh, sal_True)); rSet.Put(SfxVisibilityItem(nWh, true));
} }
break; break;
} }
@ -983,7 +984,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
break; break;
case SID_SEARCH_ITEM: case SID_SEARCH_ITEM:
{ {
::rtl::OUString aSelected = GetSelectionText( sal_True ); ::rtl::OUString aSelected = GetSelectionText(true);
SvxSearchItem& rItem = BasicIDEGlobals::GetExtraData()->GetSearchItem(); SvxSearchItem& rItem = BasicIDEGlobals::GetExtraData()->GetSearchItem();
rItem.SetSearchString( aSelected ); rItem.SetSearchString( aSelected );
rSet.Put( rItem ); rSet.Put( rItem );
@ -998,12 +999,12 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
break; break;
case SID_DOC_MODIFIED: case SID_DOC_MODIFIED:
{ {
sal_Bool bModified = sal_False; bool bModified = false;
if ( pCurWin ) if ( pCurWin )
{ {
if ( pCurWin->IsModified() ) if ( pCurWin->IsModified() )
bModified = sal_True; bModified = true;
else else
{ {
ScriptDocument aDocument( pCurWin->GetDocument() ); ScriptDocument aDocument( pCurWin->GetDocument() );
@ -1094,7 +1095,7 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) ) if( pCurWin && !pCurWin->IsA( TYPE( ModulWindow ) ) )
{ {
rSet.DisableItem( nWh ); rSet.DisableItem( nWh );
rSet.Put(SfxVisibilityItem(nWh, sal_False)); rSet.Put(SfxVisibilityItem(nWh, false));
} }
break; break;
} }
@ -1106,13 +1107,13 @@ void BasicIDEShell::GetState(SfxItemSet &rSet)
sal_Bool BasicIDEShell::HasUIFeature( sal_uInt32 nFeature ) 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 ) if ( (nFeature & BASICIDE_UI_FEATURE_SHOW_BROWSER) == BASICIDE_UI_FEATURE_SHOW_BROWSER )
{ {
// fade out (in) property browser in module (dialog) windows // fade out (in) property browser in module (dialog) windows
if ( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) && !pCurWin->IsReadOnly() ) if ( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) && !pCurWin->IsReadOnly() )
bResult = sal_True; bResult = true;
} }
return bResult; return bResult;
@ -1325,7 +1326,7 @@ long BasicIDEShell::CallBasicBreakHdl( StarBASIC* pBasic )
if ( StarBASIC::IsRunning() ) // if cancelled... if ( StarBASIC::IsRunning() ) // if cancelled...
{ {
if ( bAppWindowDisabled ) if ( bAppWindowDisabled )
Application::GetDefDialogParent()->Enable( sal_False ); Application::GetDefDialogParent()->Enable(false);
if ( nWaitCount ) if ( nWaitCount )
{ {
@ -1369,7 +1370,7 @@ ModulWindow* BasicIDEShell::ShowActiveModuleWindow( StarBASIC* pBasic )
} }
BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic ); BasicManager* pBasicMgr = BasicIDE::FindBasicManager( pBasic );
if ( pBasicMgr ) if ( pBasicMgr )
StartListening( *pBasicMgr, sal_True /* log on only once */ ); StartListening( *pBasicMgr, true /* log on only once */ );
return pWin; return pWin;
} }
return 0; return 0;
@ -1437,8 +1438,8 @@ void BasicIDEShell::Activate( sal_Bool bMDI )
void BasicIDEShell::Deactivate( sal_Bool bMDI ) void BasicIDEShell::Deactivate( sal_Bool bMDI )
{ {
// bMDI sal_True means that another MDI has been activated; in case of a // bMDI == true means that another MDI has been activated; in case of a
// deactivate due to a MessageBox bMDI is FALSE // deactivate due to a MessageBox bMDI is false
if ( bMDI ) if ( bMDI )
{ {
if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) ) if( pCurWin && pCurWin->IsA( TYPE( DialogWindow ) ) )

View File

@ -52,12 +52,12 @@ Reference< view::XRenderable > BasicIDEShell::GetRenderable()
sal_Bool BasicIDEShell::HasSelection( sal_Bool /* bText */ ) const sal_Bool BasicIDEShell::HasSelection( sal_Bool /* bText */ ) const
{ {
sal_Bool bSel = sal_False; bool bSel = false;
if ( pCurWin && pCurWin->ISA( ModulWindow ) ) if ( pCurWin && pCurWin->ISA( ModulWindow ) )
{ {
TextView* pEditView = ((ModulWindow*)pCurWin)->GetEditView(); TextView* pEditView = ((ModulWindow*)pCurWin)->GetEditView();
if ( pEditView && pEditView->HasSelection() ) if ( pEditView && pEditView->HasSelection() )
bSel = sal_True; bSel = true;
} }
return bSel; return bSel;
} }
@ -134,7 +134,7 @@ void BasicIDEShell::SetMDITitle()
if ( pShell && !pShell->GetTitle( SFX_TITLE_CAPTION ).Equals(aTitle) ) if ( pShell && !pShell->GetTitle( SFX_TITLE_CAPTION ).Equals(aTitle) )
{ {
pShell->SetTitle( aTitle ); pShell->SetTitle( aTitle );
pShell->SetModified( sal_False ); pShell->SetModified(false);
} }
css::uno::Reference< css::frame::XController > xController = GetController (); css::uno::Reference< css::frame::XController > xController = GetController ();
@ -193,7 +193,7 @@ ModulWindow* BasicIDEShell::CreateBasWin( const ScriptDocument& rDocument, const
if ( rDocument.hasModule( aLibName, aModName ) ) if ( rDocument.hasModule( aLibName, aModName ) )
bSuccess = rDocument.getModule( aLibName, aModName, aModule ); bSuccess = rDocument.getModule( aLibName, aModName, aModule );
else else
bSuccess = rDocument.createModule( aLibName, aModName, sal_True, aModule ); bSuccess = rDocument.createModule( aLibName, aModName, true, aModule );
if ( bSuccess ) if ( bSuccess )
{ {

View File

@ -78,7 +78,7 @@ public:
{ {
try 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() ) if ( xContainer.is() )
{ {
uno::Reference< container::XContainerListener > xContainerListener( this ); uno::Reference< container::XContainerListener > xContainerListener( this );
@ -91,7 +91,7 @@ public:
{ {
try 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() ) if ( xContainer.is() )
{ {
uno::Reference< container::XContainerListener > xContainerListener( this ); uno::Reference< container::XContainerListener > xContainerListener( this );
@ -155,7 +155,7 @@ BasicIDEShell::BasicIDEShell( SfxViewFrame* pFrame_, SfxViewShell* /* pOldShell
aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ), aHScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_HSCROLL | WB_DRAG ) ),
aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ), aVScrollBar( &GetViewFrame()->GetWindow(), WinBits( WB_VSCROLL | WB_DRAG ) ),
aScrollBarBox( &GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE ) ), aScrollBarBox( &GetViewFrame()->GetWindow(), WinBits( WB_SIZEABLE ) ),
m_bAppBasicModified( sal_False ), m_bAppBasicModified( false ),
m_aNotifier( *this ) m_aNotifier( *this )
{ {
m_xLibListener = new ContainerListenerImpl( this ); m_xLibListener = new ContainerListenerImpl( this );
@ -174,7 +174,7 @@ void BasicIDEShell::Init()
SvxSimpleUndoRedoController::RegisterControl( SID_UNDO ); SvxSimpleUndoRedoController::RegisterControl( SID_UNDO );
SvxSimpleUndoRedoController::RegisterControl( SID_REDO ); SvxSimpleUndoRedoController::RegisterControl( SID_REDO );
SvxSearchDialogWrapper::RegisterChildWindow( sal_False ); SvxSearchDialogWrapper::RegisterChildWindow(false);
BasicIDEGlobals::GetExtraData()->ShellInCriticalSection() = true; BasicIDEGlobals::GetExtraData()->ShellInCriticalSection() = true;
@ -342,7 +342,7 @@ void BasicIDEShell::onDocumentTitleChanged( const ScriptDocument& /*_rDocument*/
{ {
SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings ) if ( pBindings )
pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, sal_True, sal_False ); pBindings->Invalidate( SID_BASICIDE_LIBSELECTOR, true, false );
SetMDITitle(); SetMDITitle();
} }
@ -369,7 +369,7 @@ void BasicIDEShell::StoreAllWindowData( bool bPersistent )
if ( bPersistent ) if ( bPersistent )
{ {
SFX_APP()->SaveBasicAndDialogContainer(); SFX_APP()->SaveBasicAndDialogContainer();
SetAppBasicModified( sal_False ); SetAppBasicModified(false);
SfxBindings* pBindings = BasicIDE::GetBindingsPtr(); SfxBindings* pBindings = BasicIDE::GetBindingsPtr();
if ( pBindings ) if ( pBindings )
@ -386,7 +386,7 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
(void)bForBrowsing; (void)bForBrowsing;
// reset here because it's modified after printing etc. (DocInfo) // reset here because it's modified after printing etc. (DocInfo)
GetViewFrame()->GetObjectShell()->SetModified(sal_False); GetViewFrame()->GetObjectShell()->SetModified(false);
if ( StarBASIC::IsRunning() ) if ( StarBASIC::IsRunning() )
{ {
@ -395,11 +395,11 @@ sal_uInt16 BasicIDEShell::PrepareClose( sal_Bool bUI, sal_Bool bForBrowsing )
Window *pParent = &GetViewFrame()->GetWindow(); Window *pParent = &GetViewFrame()->GetWindow();
InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute(); InfoBox( pParent, IDE_RESSTR(RID_STR_CANNOTCLOSE)).Execute();
} }
return sal_False; return false;
} }
else else
{ {
sal_Bool bCanClose = sal_True; bool bCanClose = true;
for (IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); bCanClose && (it != aIDEWindowTable.end()); ++it) for (IDEWindowTable::const_iterator it = aIDEWindowTable.begin(); bCanClose && (it != aIDEWindowTable.end()); ++it)
{ {
IDEBaseWindow* pWin = it->second; 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 ) ) if ( !m_aCurLibName.isEmpty() && ( pWin->IsDocument( m_aCurDocument ) || pWin->GetLibName() != m_aCurLibName ) )
SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false ); SetCurLib( ScriptDocument::getApplicationScriptDocument(), ::rtl::OUString(), false );
SetCurWindow( pWin, true ); SetCurWindow( pWin, true );
bCanClose = sal_False; bCanClose = false;
} }
} }
@ -540,9 +540,8 @@ void BasicIDEShell::SFX_NOTIFY( SfxBroadcaster& rBC, const TypeId&,
{ {
case SFX_HINT_DYING: case SFX_HINT_DYING:
{ {
EndListening( rBC, sal_True /* log off all */ ); EndListening( rBC, true /* log off all */ );
//if ( pObjectCatalog ) UpdateObjectCatalog();
//pObjectCatalog->UpdateEntries();
} }
break; break;
} }
@ -698,7 +697,7 @@ void BasicIDEShell::UpdateWindows()
++doc ++doc
) )
{ {
StartListening( *doc->getBasicManager(), sal_True /* log on only once */ ); StartListening( *doc->getBasicManager(), true /* log on only once */ );
// libraries // libraries
Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() ); Sequence< ::rtl::OUString > aLibNames( doc->getLibraryNames() );
@ -966,7 +965,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, :
{ {
if( !aLibName.isEmpty() ) 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 ); xStringResourceManager = LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
} }
} }
@ -979,7 +978,7 @@ void BasicIDEShell::SetCurLibForLocalization( const ScriptDocument& rDocument, :
void BasicIDEShell::ImplStartListening( StarBASIC* pBasic ) 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. // Updates the "Object Catalog" window.

View File

@ -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++ ) for ( sal_uInt16 nChar = 0; nChar < rName.Len(); nChar++ )
{ {
sal_Unicode c = rName.GetChar(nChar); sal_Unicode c = rName.GetChar(nChar);
sal_Bool bValid = ( ( c >= 'A' && c <= 'Z' ) || bool bValid = (
( c >= 'a' && c <= 'z' ) || ( c >= 'A' && c <= 'Z' ) ||
( c >= '0' && c <= '9' && nChar ) || ( c >= 'a' && c <= 'z' ) ||
( c == '_' ) ); ( c >= '0' && c <= '9' && nChar ) ||
( c == '_' )
);
if ( !bValid ) if ( !bValid )
return sal_False; return false;
} }
return sal_True; return true;
} }
static bool StringCompareLessThan( const String& rStr1, const String& rStr2 ) 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; (void)rMacroDesc;

View File

@ -377,7 +377,7 @@ void BasicStopped( bool* pbAppWindowDisabled,
Window* pDefParent = Application::GetDefDialogParent(); Window* pDefParent = Application::GetDefDialogParent();
if ( pDefParent && !pDefParent->IsEnabled() ) if ( pDefParent && !pDefParent->IsEnabled() )
{ {
pDefParent->Enable( sal_True ); pDefParent->Enable(true);
if ( pbAppWindowDisabled ) if ( pbAppWindowDisabled )
*pbAppWindowDisabled = true; *pbAppWindowDisabled = true;
} }

View File

@ -215,7 +215,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati
// can be called multiple times for updating! // can be called multiple times for updating!
// actually test if basic's in the tree already?! // actually test if basic's in the tree already?!
SetUpdateMode( sal_False ); SetUpdateMode(false);
// level 1: BasicManager (application, document, ...) // level 1: BasicManager (application, document, ...)
SvLBoxEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation ); SvLBoxEntry* pDocumentRootEntry = FindRootEntry( rDocument, eLocation );
@ -235,7 +235,7 @@ void BasicTreeListBox::ScanEntry( const ScriptDocument& rDocument, LibraryLocati
SAL_WNODEPRECATED_DECLARATIONS_POP SAL_WNODEPRECATED_DECLARATIONS_POP
} }
SetUpdateMode( sal_True ); SetUpdateMode(true);
} }
void BasicTreeListBox::ImpCreateLibEntries( SvLBoxEntry* pDocumentRootEntry, const ScriptDocument& rDocument, LibraryLocation eLocation ) 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() long BasicTreeListBox::ExpandingHdl()
{ {
// expanding or collapsing? // expanding or collapsing?
sal_Bool bOK = sal_True; bool bOK = true;
if ( GetModel()->GetDepth( GetHdlEntry() ) == 1 ) if ( GetModel()->GetDepth( GetHdlEntry() ) == 1 )
{ {
SvLBoxEntry* pCurEntry = GetCurEntry(); SvLBoxEntry* pCurEntry = GetCurEntry();
@ -787,7 +787,7 @@ void BasicTreeListBox::GetRootEntryBitmaps( const ScriptDocument& rDocument, Ima
if ( !sFactoryURL.isEmpty() ) if ( !sFactoryURL.isEmpty() )
{ {
rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), sal_False ); rImage = SvFileInformationManager::GetFileImage( INetURLObject( sFactoryURL ), false );
} }
else else
{ {

View File

@ -58,7 +58,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
::rtl::OUString aOULibName( aDesc.GetLibName() ); ::rtl::OUString aOULibName( aDesc.GetLibName() );
// check password // check password
sal_Bool bOK = sal_True; bool bOK = true;
Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) ); Reference< script::XLibraryContainer > xModLibContainer( aDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{ {
@ -73,7 +73,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
if ( bOK ) if ( bOK )
{ {
// load module library // load module library
sal_Bool bModLibLoaded = sal_False; bool bModLibLoaded = false;
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
{ {
if ( !xModLibContainer->isLibraryLoaded( aOULibName ) ) if ( !xModLibContainer->isLibraryLoaded( aOULibName ) )
@ -86,7 +86,7 @@ void BasicTreeListBox::RequestingChildren( SvLBoxEntry* pEntry )
} }
// load dialog library // load dialog library
sal_Bool bDlgLibLoaded = sal_False; bool bDlgLibLoaded = false;
Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY ); Reference< script::XLibraryContainer > xDlgLibContainer( aDocument.getLibraryContainer( E_DIALOGS ), UNO_QUERY );
if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) ) if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) )
{ {

View File

@ -198,13 +198,13 @@ void IDEBaseWindow::UpdateData()
return aName.makeStringAndClear(); 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() 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() Window* IDEBaseWindow::GetLayoutWindow()
@ -264,7 +264,7 @@ sal_Bool BasicDockingWindow::Docking( const Point& rPos, Rectangle& rRect )
{ {
ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent(); ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent();
Rectangle aTmpRec( rRect ); 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 ) if ( bDock )
{ {
rRect.SetSize( aTmpRec.GetSize() ); rRect.SetSize( aTmpRec.GetSize() );
@ -285,7 +285,7 @@ void BasicDockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode
DockingWindow::EndDocking( rRect, bFloatMode ); DockingWindow::EndDocking( rRect, bFloatMode );
else else
{ {
SetFloatingMode( sal_False ); SetFloatingMode(false);
ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent(); ModulWindowLayout* pLayout = (ModulWindowLayout*)GetParent();
pLayout->DockaWindow( this ); pLayout->DockaWindow( this );
} }
@ -315,7 +315,7 @@ sal_Bool BasicDockingWindow::PrepareToggleFloatingMode()
aFloatingPosAndSize.SetPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) ); aFloatingPosAndSize.SetPos( GetParent()->OutputToScreenPixel( GetPosPixel() ) );
aFloatingPosAndSize.SetSize( GetSizePixel() ); aFloatingPosAndSize.SetSize( GetSizePixel() );
} }
return sal_True; return true;
} }
@ -376,7 +376,7 @@ struct TabBarDDInfo
BasicIDETabBar::BasicIDETabBar( Window* pParent ) : BasicIDETabBar::BasicIDETabBar( Window* pParent ) :
TabBar( pParent, WinBits( WB_3DLOOK | WB_SCROLL | WB_BORDER | WB_SIZEABLE | WB_DRAG ) ) TabBar( pParent, WinBits( WB_3DLOOK | WB_SCROLL | WB_BORDER | WB_SIZEABLE | WB_DRAG ) )
{ {
EnableEditMode( sal_True ); EnableEditMode(true);
SetHelpId( HID_BASICIDE_TABBAR ); SetHelpId( HID_BASICIDE_TABBAR );
} }
@ -414,15 +414,15 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt )
PopupMenu aPopup( IDEResId( RID_POPUP_TABBAR ) ); PopupMenu aPopup( IDEResId( RID_POPUP_TABBAR ) );
if ( GetPageCount() == 0 ) if ( GetPageCount() == 0 )
{ {
aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false);
aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false);
aPopup.EnableItem( SID_BASICIDE_HIDECURPAGE, sal_False ); aPopup.EnableItem(SID_BASICIDE_HIDECURPAGE, false);
} }
if ( StarBASIC::IsRunning() ) if ( StarBASIC::IsRunning() )
{ {
aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false); aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false);
aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, false); aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false);
aPopup.EnableItem(SID_BASICIDE_MODULEDLG, 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 ) ) || if ( ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && xModLibContainer->isLibraryReadOnly( aOULibName ) ) ||
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) ) ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aOULibName ) && xDlgLibContainer->isLibraryReadOnly( aOULibName ) ) )
{ {
aPopup.EnableItem( aPopup.GetItemId( 0 ), sal_False ); aPopup.EnableItem(aPopup.GetItemId( 0 ), false);
aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false);
aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false);
aPopup.RemoveDisabledEntries(); aPopup.RemoveDisabledEntries();
} }
if ( aDocument.isInVBAMode() ) if ( aDocument.isInVBAMode() )
@ -457,8 +457,8 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt )
SbModule* pActiveModule = (SbModule*)pBasic->FindModule( it->second->GetName() ); SbModule* pActiveModule = (SbModule*)pBasic->FindModule( it->second->GetName() );
if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) ) if( pActiveModule && ( pActiveModule->GetModuleType() == script::ModuleType::DOCUMENT ) )
{ {
aPopup.EnableItem( SID_BASICIDE_DELETECURRENT, sal_False ); aPopup.EnableItem(SID_BASICIDE_DELETECURRENT, false);
aPopup.EnableItem( SID_BASICIDE_RENAMECURRENT, sal_False ); aPopup.EnableItem(SID_BASICIDE_RENAMECURRENT, false);
} }
} }
} }
@ -476,7 +476,7 @@ void BasicIDETabBar::Command( const CommandEvent& rCEvt )
long BasicIDETabBar::AllowRenaming() long BasicIDETabBar::AllowRenaming()
{ {
sal_Bool bValid = BasicIDE::IsValidSbxName( GetEditText() ); bool const bValid = BasicIDE::IsValidSbxName( GetEditText() );
if ( !bValid ) if ( !bValid )
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();

View File

@ -70,7 +70,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
{ {
FreeResource(); FreeResource();
aComboBox.SetUpdateMode( sal_False ); aComboBox.SetUpdateMode(false);
for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i ) for ( size_t i = 0, n = m_aModifiedBreakPointList.size(); i < n; ++i )
{ {
BreakPoint* pBrk = m_aModifiedBreakPointList.at( i ); BreakPoint* pBrk = m_aModifiedBreakPointList.at( i );
@ -78,7 +78,7 @@ BreakPointDialog::BreakPointDialog( Window* pParent, BreakPointList& rBrkPntList
aEntryStr += String::CreateFromInt32( pBrk->nLine ); aEntryStr += String::CreateFromInt32( pBrk->nLine );
aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND ); aComboBox.InsertEntry( aEntryStr, COMBOBOX_APPEND );
} }
aComboBox.SetUpdateMode( sal_True ); aComboBox.SetUpdateMode(true);
aOKButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) ); aOKButton.SetClickHdl( LINK( this, BreakPointDialog, ButtonHdl ) );
aNewButton.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.SetMin( 0 );
aNumericField.SetMax( 0x7FFFFFFF ); aNumericField.SetMax( 0x7FFFFFFF );
aNumericField.SetSpinSize( 1 ); aNumericField.SetSpinSize( 1 );
aNumericField.SetStrictFormat( sal_True ); aNumericField.SetStrictFormat(true);
aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) ); aNumericField.SetModifyHdl( LINK( this, BreakPointDialog, EditModifyHdl ) );
aComboBox.SetText( aComboBox.GetEntry( 0 ) ); aComboBox.SetText( aComboBox.GetEntry( 0 ) );

View File

@ -843,7 +843,7 @@ void LocalizationMgr::setControlResourceIDsForNewEditorObject( DlgEditor* pEdito
if ( !aDocument.isValid() ) if ( !aDocument.isValid() )
return; return;
const String& rLibName = pDlgWin->GetLibName(); 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@ -873,7 +873,7 @@ void LocalizationMgr::renameControlResourceIDsForEditorObject( DlgEditor* pEdito
if ( !aDocument.isValid() ) if ( !aDocument.isValid() )
return; return;
const String& rLibName = pDlgWin->GetLibName(); 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@ -901,7 +901,7 @@ void LocalizationMgr::deleteControlResourceIDsForDeletedEditorObject( DlgEditor*
if ( !aDocument.isValid() ) if ( !aDocument.isValid() )
return; return;
const String& rLibName = pDlgWin->GetLibName(); 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@ -921,7 +921,7 @@ void LocalizationMgr::setStringResourceAtDialog( const ScriptDocument& rDocument
static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" )); static ::rtl::OUString aResourceResolverPropName( RTL_CONSTASCII_USTRINGPARAM( "ResourceResolver" ));
// Get library // 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
@ -951,7 +951,7 @@ void LocalizationMgr::renameStringResourceIDs( const ScriptDocument& rDocument,
const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel ) const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{ {
// Get library // 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( !xStringResourceManager.is() ) if( !xStringResourceManager.is() )
@ -982,7 +982,7 @@ void LocalizationMgr::removeResourceForDialog( const ScriptDocument& rDocument,
const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel ) const ::rtl::OUString& aDlgName, Reference< container::XNameContainer > xDialogModel )
{ {
// Get library // 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( !xStringResourceManager.is() ) if( !xStringResourceManager.is() )
@ -1076,7 +1076,7 @@ void LocalizationMgr::copyResourcesForPastedEditorObject( DlgEditor* pEditor,
if ( !aDocument.isValid() ) if ( !aDocument.isValid() )
return; return;
const String& rLibName = pDlgWin->GetLibName(); 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 = Reference< XStringResourceManager > xStringResourceManager =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );

View File

@ -556,10 +556,10 @@ IMPL_LINK( MacroChooser, BasicSelectHdl, SvTreeListBox *, pBox )
aMacros.insert( map< sal_uInt16, SbMethod*>::value_type( nStart, pMethod ) ); 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 ) for ( map< sal_uInt16, SbMethod* >::iterator it = aMacros.begin(); it != aMacros.end(); ++it )
aMacroBox.InsertEntry( (*it).second->GetName() ); aMacroBox.InsertEntry( (*it).second->GetName() );
aMacroBox.SetUpdateMode( sal_True ); aMacroBox.SetUpdateMode(true);
if ( aMacroBox.GetEntryCount() ) if ( aMacroBox.GetEntryCount() )
{ {
@ -626,7 +626,7 @@ IMPL_LINK( MacroChooser, EditModifyHdl, Edit *, pEdit )
SvLBoxEntry* pEntry = aMacroBox.FirstSelected(); SvLBoxEntry* pEntry = aMacroBox.FirstSelected();
// if the entry exists ->Select ->Desription... // if the entry exists ->Select ->Desription...
if ( pEntry ) 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 ) else if ( nMode == MACROCHOOSER_RECORDING )
{ {
sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); if ( !BasicIDE::IsValidSbxName(aMacroNameEdit.GetText()) )
if ( !bValid )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) ); aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) );
@ -740,8 +739,7 @@ IMPL_LINK( MacroChooser, ButtonHdl, Button *, pButton )
} }
else else
{ {
sal_Bool bValid = BasicIDE::IsValidSbxName( aMacroNameEdit.GetText() ); if ( !BasicIDE::IsValidSbxName(aMacroNameEdit.GetText()) )
if ( !bValid )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, String( IDEResId( RID_STR_BADSBXNAME ) ) ).Execute();
aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) ); aMacroNameEdit.SetSelection( Selection( 0, aMacroNameEdit.GetText().Len() ) );

View File

@ -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() ) if ( nPos < GetEntryCount() )
{ {
SvLBoxEntry* pEntry = GetEntry( nPos ); SvLBoxEntry* pEntry = GetEntry( nPos );
if ( bCheck != GetCheckButtonState( pEntry ) ) if ( bCheck != GetCheckButtonState( pEntry ) )
SetCheckButtonState( pEntry, SetCheckButtonState( pEntry, SvButtonState(bCheck ? SV_BUTTON_CHECKED : SV_BUTTON_UNCHECKED) );
bCheck
? SvButtonState(SV_BUTTON_CHECKED)
: SvButtonState(SV_BUTTON_UNCHECKED) );
} }
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
sal_Bool BasicCheckBox::IsChecked( sal_uLong nPos ) const bool BasicCheckBox::IsChecked( sal_uLong nPos ) const
{ {
if ( nPos < GetEntryCount() ) if ( nPos < GetEntryCount() )
return (GetCheckButtonState( GetEntry( nPos ) ) == SV_BUTTON_CHECKED); return GetCheckButtonState(GetEntry(nPos)) == SV_BUTTON_CHECKED;
return sal_False; return false;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -275,7 +272,7 @@ void BasicCheckBox::InitEntry( SvLBoxEntry* pEntry, const XubString& rTxt, const
sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{ {
if ( nMode != NEWOBJECTMODE_MOD ) if ( nMode != NEWOBJECTMODE_MOD )
return sal_False; return false;
DBG_ASSERT( pEntry, "Kein Eintrag?" ); DBG_ASSERT( pEntry, "Kein Eintrag?" );
@ -284,7 +281,7 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
if ( aLibName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) ) if ( aLibName.equalsIgnoreAsciiCaseAsciiL( RTL_CONSTASCII_STRINGPARAM( "Standard" ) ) )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_CANNOTCHANGENAMESTDLIB) ).Execute();
return sal_False; return false;
} }
// check, if library is readonly // 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 ) ) ) ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) && !xDlgLibContainer->isLibraryLink( aLibName ) ) )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_LIBISREADONLY) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_LIBISREADONLY) ).Execute();
return sal_False; return false;
} }
// i24094: Password verification necessary for renaming // i24094: Password verification necessary for renaming
sal_Bool bOK = sal_True; bool bOK = true;
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) )
{ {
// check password // check password
@ -310,19 +307,19 @@ sal_Bool BasicCheckBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
bOK = QueryPassword( xModLibContainer1, aLibName, aPassword ); bOK = QueryPassword( xModLibContainer1, aLibName, aPassword );
} }
if ( !bOK ) if ( !bOK )
return sal_False; return false;
} }
// TODO: check if library is reference/link // TODO: check if library is reference/link
return sal_True; return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewName ) 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 ) ); rtl::OUString aOldName( GetEntryText( pEntry, 0 ) );
if ( bValid && ( aOldName != rNewName ) ) if ( bValid && ( aOldName != rNewName ) )
{ {
@ -347,12 +344,12 @@ sal_Bool BasicCheckBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& r
catch (const container::ElementExistException& ) catch (const container::ElementExistException& )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_SBXNAMEALLREADYUSED) ).Execute();
return sal_False; return false;
} }
catch (const container::NoSuchElementException& ) catch (const container::NoSuchElementException& )
{ {
DBG_UNHANDLED_EXCEPTION(); DBG_UNHANDLED_EXCEPTION();
return sal_False; return false;
} }
} }
@ -520,7 +517,7 @@ LibPage::LibPage( Window * pParent )
aBasicsBox.SetSelectHdl( LINK( this, LibPage, BasicSelectHdl ) ); aBasicsBox.SetSelectHdl( LINK( this, LibPage, BasicSelectHdl ) );
aLibBox.SetMode( NEWOBJECTMODE_MOD ); aLibBox.SetMode( NEWOBJECTMODE_MOD );
aLibBox.EnableInplaceEditing( sal_True ); aLibBox.EnableInplaceEditing(true);
aLibBox.SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP ); aLibBox.SetStyle( WB_HSCROLL | WB_BORDER | WB_TABSTOP );
aCloseButton.GrabFocus(); aCloseButton.GrabFocus();
@ -711,15 +708,15 @@ IMPL_LINK( LibPage, ButtonHdl, Button *, pButton )
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() ) if ( xPasswd.is() )
{ {
sal_Bool bProtected = xPasswd->isLibraryPasswordProtected( aLibName ); bool const bProtected = xPasswd->isLibraryPasswordProtected( aLibName );
// change password dialog // change password dialog
SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, sal_True, !bProtected ); SvxPasswordDialog* pDlg = new SvxPasswordDialog( this, true, !bProtected );
pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) ); pDlg->SetCheckPasswordHdl( LINK( this, LibPage, CheckPasswordHdl ) );
if ( pDlg->Execute() == RET_OK ) if ( pDlg->Execute() == RET_OK )
{ {
sal_Bool bNewProtected = xPasswd->isLibraryPasswordProtected( aLibName ); bool const bNewProtected = xPasswd->isLibraryPasswordProtected( aLibName );
if ( bNewProtected != bProtected ) if ( bNewProtected != bProtected )
{ {
@ -898,7 +895,7 @@ void LibPage::InsertLib()
{ {
SvLBoxEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName ); SvLBoxEntry* pEntry = pLibDlg->GetLibBox().DoInsertEntry( aLibName );
sal_uInt16 nPos = (sal_uInt16) pLibDlg->GetLibBox().GetModel()->GetAbsPos( pEntry ); 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 // disable reference checkbox for documents and sbls
if ( aExtension != aLibExtension && aExtension != aContExtension ) if ( aExtension != aLibExtension && aExtension != aContExtension )
pLibDlg->EnableReference( sal_False ); pLibDlg->EnableReference(false);
if ( pLibDlg->Execute() ) if ( pLibDlg->Execute() )
{ {
sal_uLong nNewPos = aLibBox.GetEntryCount(); sal_uLong nNewPos = aLibBox.GetEntryCount();
bool bRemove = false; bool bRemove = false;
sal_Bool bReplace = pLibDlg->IsReplace(); bool bReplace = pLibDlg->IsReplace();
sal_Bool bReference = pLibDlg->IsReference(); bool bReference = pLibDlg->IsReference();
for ( sal_uInt16 nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ ) for ( sal_uInt16 nLib = 0; nLib < pLibDlg->GetLibBox().GetEntryCount(); nLib++ )
{ {
if ( pLibDlg->GetLibBox().IsChecked( nLib ) ) if ( pLibDlg->GetLibBox().IsChecked( nLib ) )
@ -975,14 +972,14 @@ void LibPage::InsertLib()
} }
// check, if the library is password protected // check, if the library is password protected
sal_Bool bOK = sal_False; bool bOK = false;
::rtl::OUString aPassword; ::rtl::OUString aPassword;
if ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) ) if ( xModLibContImport.is() && xModLibContImport->hasByName( aLibName ) )
{ {
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY ); Reference< script::XLibraryContainerPassword > xPasswd( xModLibContImport, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aLibName ) && !xPasswd->isLibraryPasswordVerified( aLibName ) && !bReference ) 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 ) if ( !bOK )
{ {
@ -1029,7 +1026,7 @@ void LibPage::InsertLib()
::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); ::rtl::OUString aModStorageURL( aModStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link // 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 else
{ {
@ -1098,7 +1095,7 @@ void LibPage::InsertLib()
::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) ); ::rtl::OUString aDlgStorageURL( aDlgStorageURLObj.GetMainURL( INetURLObject::NO_DECODE ) );
// create library link // 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 else
{ {
@ -1164,7 +1161,7 @@ void LibPage::Export( void )
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) && !xModLibContainer->isLibraryLoaded( aOULibName ) )
{ {
sal_Bool bOK = sal_True; bool bOK = true;
// check password // check password
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
@ -1303,7 +1300,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
String aTmpPath = SvtPathOptions().GetTempPath(); String aTmpPath = SvtPathOptions().GetTempPath();
INetURLObject aInetObj( aTmpPath ); 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 ); OUString aSourcePath = aInetObj.GetMainURL( INetURLObject::NO_DECODE );
if( xSFA->exists( aSourcePath ) ) if( xSFA->exists( aSourcePath ) )
xSFA->kill( aSourcePath ); xSFA->kill( aSourcePath );
@ -1334,7 +1331,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
INetURLObject aMetaInfInetObj( aTmpPath ); INetURLObject aMetaInfInetObj( aTmpPath );
aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "META-INF" ) ), 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 ); OUString aMetaInfFolder = aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE );
if( xSFA->exists( aMetaInfFolder ) ) if( xSFA->exists( aMetaInfFolder ) )
xSFA->kill( aMetaInfFolder ); xSFA->kill( aMetaInfFolder );
@ -1366,7 +1363,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
&manifest[ 0 ], manifest.size() ) ); &manifest[ 0 ], manifest.size() ) );
aMetaInfInetObj.insertName( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "manifest.xml" ) ), 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: // write buffered pipe data to content:
::ucbhelper::Content manifestContent( aMetaInfInetObj.GetMainURL( INetURLObject::NO_DECODE ), xCmdEnv ); ::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 ) SvLBoxEntry* LibPage::ImpInsertLibEntry( const String& rLibName, sal_uLong nPos )
{ {
// check, if library is password protected // check, if library is password protected
sal_Bool bProtected = sal_False; bool bProtected = false;
::rtl::OUString aOULibName( rLibName ); ::rtl::OUString aOULibName( rLibName );
Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY ); Reference< script::XLibraryContainer2 > xModLibContainer( m_aCurDocument.getLibraryContainer( E_SCRIPTS ), UNO_QUERY );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aOULibName ) )
@ -1642,7 +1639,7 @@ void createLibImpl( Window* pWin, const ScriptDocument& rDocument,
// create a module // create a module
String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName ); String aModName = rDocument.createObjectName( E_SCRIPTS, aLibName );
::rtl::OUString sModuleCode; ::rtl::OUString sModuleCode;
if ( !rDocument.createModule( aLibName, aModName, sal_True, sModuleCode ) ) if ( !rDocument.createModule( aLibName, aModName, true, sModuleCode ) )
throw Exception(); throw Exception();
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE ); SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, BASICIDE_TYPE_MODULE );

View File

@ -56,7 +56,7 @@ ExtBasicTreeListBox::~ExtBasicTreeListBox()
sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& ) sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
{ {
sal_Bool bRet = sal_False; bool bRet = false;
if ( pEntry ) if ( pEntry )
{ {
@ -72,7 +72,7 @@ sal_Bool ExtBasicTreeListBox::EditingEntry( SvLBoxEntry* pEntry, Selection& )
( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) ) ) ) ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) && xDlgLibContainer->isLibraryReadOnly( aLibName ) ) ) )
{ {
// allow editing only for libraries, which are not readonly // 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 ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText )
{ {
sal_Bool bValid = BasicIDE::IsValidSbxName( rNewText ); if ( !BasicIDE::IsValidSbxName(rNewText) )
if ( !bValid )
{ {
ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ).Execute(); ErrorBox( this, WB_OK | WB_DEF_OK, IDE_RESSTR(RID_STR_BADSBXNAME) ).Execute();
return sal_False; return false;
} }
rtl::OUString aCurText( GetEntryText( pEntry ) ); rtl::OUString aCurText( GetEntryText( pEntry ) );
if ( aCurText == rNewText ) if ( aCurText == rNewText )
// nothing to do // nothing to do
return sal_True; return true;
BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) ); BasicEntryDescriptor aDesc( GetEntryDescriptor( pEntry ) );
ScriptDocument aDocument( aDesc.GetDocument() ); ScriptDocument aDocument( aDesc.GetDocument() );
DBG_ASSERT( aDocument.isValid(), "ExtBasicTreeListBox::EditedEntry: no document!" ); DBG_ASSERT( aDocument.isValid(), "ExtBasicTreeListBox::EditedEntry: no document!" );
if ( !aDocument.isValid() ) if ( !aDocument.isValid() )
return sal_False; return false;
::rtl::OUString aLibName( aDesc.GetLibName() ); ::rtl::OUString aLibName( aDesc.GetLibName() );
BasicEntryType eType( aDesc.GetType() ); BasicEntryType eType( aDesc.GetType() );
@ -107,7 +106,7 @@ sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStr
: BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText ); : BasicIDE::RenameDialog( this, aDocument, aLibName, aCurText, rNewText );
if ( !bSuccess ) if ( !bSuccess )
return sal_False; return false;
BasicIDE::MarkDocumentModified( aDocument ); BasicIDE::MarkDocumentModified( aDocument );
@ -125,10 +124,10 @@ sal_Bool ExtBasicTreeListBox::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStr
SetEntryText( pEntry, rNewText ); SetEntryText( pEntry, rNewText );
SetCurEntry( pEntry ); SetCurEntry( pEntry );
SetCurEntry( pEntry ); SetCurEntry( pEntry );
Select( pEntry, sal_False ); Select( pEntry, false );
Select( pEntry ); // so that handler is called => update edit 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 ) ) if ( xDlgLibContainer.is() && xDlgLibContainer->hasByName( aLibName ) )
{ {
// Get StringResourceManager // 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 = Reference< XStringResourceManager > xSourceMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDialogLib );
if( xSourceMgr.is() ) if( xSourceMgr.is() )
@ -176,14 +175,14 @@ sal_Bool ExtBasicTreeListBox::NotifyAcceptDrop( SvLBoxEntry* pEntry )
{ {
// don't drop on a BasicManager (nDepth == 0) // don't drop on a BasicManager (nDepth == 0)
sal_uInt16 nDepth = pEntry ? GetModel()->GetDepth( pEntry ) : 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 // don't drop in the same library
SvLBoxEntry* pSelected = FirstSelected(); SvLBoxEntry* pSelected = FirstSelected();
if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) ) if ( ( nDepth == 1 ) && ( pEntry == GetParent( pSelected ) ) )
bValid = sal_False; bValid = false;
else if ( ( nDepth == 2 ) && ( GetParent( pEntry ) == GetParent( pSelected ) ) ) 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 // don't drop on a library, which is not loaded, readonly or password protected
// or which already has a module/dialog with this name // 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.is() && xModLibContainer->hasByName( aDestLibName ) )
{ {
if ( !xModLibContainer->isLibraryLoaded( aDestLibName ) ) if ( !xModLibContainer->isLibraryLoaded( aDestLibName ) )
bValid = sal_False; bValid = false;
if ( xModLibContainer->isLibraryReadOnly( aDestLibName ) ) if ( xModLibContainer->isLibraryReadOnly( aDestLibName ) )
bValid = sal_False; bValid = false;
Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY ); Reference< script::XLibraryContainerPassword > xPasswd( xModLibContainer, UNO_QUERY );
if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aDestLibName ) && !xPasswd->isLibraryPasswordVerified( aDestLibName ) ) if ( xPasswd.is() && xPasswd->isLibraryPasswordProtected( aDestLibName ) && !xPasswd->isLibraryPasswordVerified( aDestLibName ) )
bValid = sal_False; bValid = false;
} }
// check if dialog library is not loaded or readonly // 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.is() && xDlgLibContainer->hasByName( aDestLibName ) )
{ {
if ( !xDlgLibContainer->isLibraryLoaded( aDestLibName ) ) if ( !xDlgLibContainer->isLibraryLoaded( aDestLibName ) )
bValid = sal_False; bValid = false;
if ( xDlgLibContainer->isLibraryReadOnly( aDestLibName ) ) if ( xDlgLibContainer->isLibraryReadOnly( aDestLibName ) )
bValid = sal_False; bValid = false;
} }
// check, if module/dialog with this name is already existing in target library // check, if module/dialog with this name is already existing in target library
if ( ( eSourceType == OBJ_TYPE_MODULE && rDestDoc.hasModule( aDestLibName, aSourceName ) ) || if ( ( eSourceType == OBJ_TYPE_MODULE && rDestDoc.hasModule( aDestLibName, aSourceName ) ) ||
( eSourceType == OBJ_TYPE_DIALOG && rDestDoc.hasDialog( 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 ) SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos )
{ {
return NotifyCopyingMoving( pTarget, pEntry, return NotifyCopyingMoving( pTarget, pEntry,
rpNewParent, rNewChildPos, sal_True ); rpNewParent, rNewChildPos, true );
} }
sal_Bool ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry, sal_Bool ExtBasicTreeListBox::NotifyCopying( SvLBoxEntry* pTarget, SvLBoxEntry* pEntry,
SvLBoxEntry*& rpNewParent, sal_uLong& rNewChildPos ) 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, return NotifyCopyingMoving( pTarget, pEntry,
rpNewParent, rNewChildPos, sal_False ); rpNewParent, rNewChildPos, false );
} }
void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& io_xISP, void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >& io_xISP,
@ -259,14 +258,14 @@ void BasicIDEShell::CopyDialogResources( Reference< io::XInputStreamProvider >&
return; return;
// Get StringResourceManager // 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 = Reference< XStringResourceManager > xSourceMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xSourceDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xSourceDialogLib );
if( !xSourceMgr.is() ) if( !xSourceMgr.is() )
return; return;
bool bSourceLocalized = ( xSourceMgr->getLocales().getLength() > 0 ); 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 = Reference< XStringResourceManager > xDestMgr =
LocalizationMgr::getStringResourceFromDialogLibrary( xDestDialogLib ); LocalizationMgr::getStringResourceFromDialogLibrary( xDestDialogLib );
if( !xDestMgr.is() ) 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.SetDragDropMode( SV_DRAGDROP_CTRL_MOVE | SV_DRAGDROP_CTRL_COPY );
aBasicBox.EnableInplaceEditing( sal_True ); aBasicBox.EnableInplaceEditing(true);
aBasicBox.SetMode( nMode ); aBasicBox.SetMode( nMode );
aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP | aBasicBox.SetStyle( WB_BORDER | WB_TABSTOP |
WB_HASLINES | WB_HASLINESATROOT | WB_HASLINES | WB_HASLINESATROOT |
@ -739,7 +738,7 @@ bool ObjectPage::GetSelection( ScriptDocument& rDocument, ::rtl::OUString& rLibN
return false; return false;
// check if the module library is loaded // check if the module library is loaded
sal_Bool bOK = sal_True; bool bOK = true;
::rtl::OUString aLibName( rLibName ); ::rtl::OUString aLibName( rLibName );
Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) ); Reference< script::XLibraryContainer > xModLibContainer( rDocument.getLibraryContainer( E_SCRIPTS ) );
if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) ) if ( xModLibContainer.is() && xModLibContainer->hasByName( aLibName ) && !xModLibContainer->isLibraryLoaded( aLibName ) )

View File

@ -81,7 +81,7 @@ private:
OKButton maOKButton; OKButton maOKButton;
CancelButton maCancelButton; CancelButton maCancelButton;
sal_Bool mbExportAsPackage; bool mbExportAsPackage;
DECL_LINK(OkButtonHandler, void *); DECL_LINK(OkButtonHandler, void *);
@ -89,7 +89,7 @@ public:
ExportDialog( Window * pParent ); ExportDialog( Window * pParent );
~ExportDialog(); ~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* DoInsertEntry( const String& rStr, sal_uLong nPos = LISTBOX_APPEND );
SvLBoxEntry* FindEntry( const String& rName ); SvLBoxEntry* FindEntry( const String& rName );
void CheckEntryPos( sal_uLong nPos, sal_Bool bCheck = sal_True ); void CheckEntryPos( sal_uLong nPos, bool bCheck = true );
sal_Bool IsChecked( sal_uLong nPos ) const; bool IsChecked( sal_uLong nPos ) const;
virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind ); virtual void InitEntry( SvLBoxEntry*, const XubString&, const Image&, const Image&, SvLBoxButtonKind eButtonKind );
virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel ); virtual sal_Bool EditingEntry( SvLBoxEntry* pEntry, Selection& rSel );
@ -163,11 +163,11 @@ public:
void SetStorageName( const ::rtl::OUString& rName ); void SetStorageName( const ::rtl::OUString& rName );
BasicCheckBox& GetLibBox() { return aLibBox; } BasicCheckBox& GetLibBox() { return aLibBox; }
sal_Bool IsReference() const { return aReferenceBox.IsChecked(); } bool IsReference() const { return aReferenceBox.IsChecked(); }
sal_Bool IsReplace() const { return aReplaceBox.IsChecked(); } bool IsReplace() const { return aReplaceBox.IsChecked(); }
void EnableReference( sal_Bool b ) { aReferenceBox.Enable( b ); } void EnableReference (bool b) { aReferenceBox.Enable(b); }
void EnableReplace( sal_Bool b ) { aReplaceBox.Enable( b ); } void EnableReplace (bool b) { aReplaceBox.Enable(b); }
}; };

View File

@ -543,7 +543,7 @@ namespace basctl
{ {
try try
{ {
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) ); Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ) );
if ( xLib.is() ) if ( xLib.is() )
{ {
xLib->removeByName( _rModuleName ); xLib->removeByName( _rModuleName );
@ -567,7 +567,7 @@ namespace basctl
try try
{ {
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ) ); Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ) );
if ( xLib.is() ) if ( xLib.is() )
return xLib->hasByName( _rModName ); return xLib->hasByName( _rModName );
} }
@ -588,7 +588,7 @@ namespace basctl
_out_rModuleOrDialog.clear(); _out_rModuleOrDialog.clear();
try 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 ) ) if ( xLib->hasByName( _rObjectName ) )
{ {
_out_rModuleOrDialog = xLib->getByName( _rObjectName ); _out_rModuleOrDialog = xLib->getByName( _rObjectName );
@ -612,7 +612,7 @@ namespace basctl
try try
{ {
Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, sal_True ), UNO_QUERY_THROW ); Reference< XNameContainer > xLib( getLibrary( _eType, _rLibName, true ), UNO_QUERY_THROW );
// get element // get element
Any aElement( xLib->getByName( _rOldName ) ); Any aElement( xLib->getByName( _rOldName ) );
@ -676,7 +676,7 @@ namespace basctl
_out_rNewModuleCode = ::rtl::OUString(); _out_rNewModuleCode = ::rtl::OUString();
try try
{ {
Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, sal_True ) ); Reference< XNameContainer > xLib( getLibrary( E_SCRIPTS, _rLibName, true ) );
if ( !xLib.is() || xLib->hasByName( _rModName ) ) if ( !xLib.is() || xLib->hasByName( _rModName ) )
return false; return false;
@ -739,7 +739,7 @@ namespace basctl
{ {
try 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 // create dialog
_out_rDialogProvider.clear(); _out_rDialogProvider.clear();
@ -778,7 +778,7 @@ namespace basctl
{ {
try try
{ {
m_xDocModify->setModified( sal_True ); m_xDocModify->setModified( true );
} }
catch( const Exception& ) catch( const Exception& )
{ {
@ -1308,7 +1308,7 @@ namespace basctl
aObjectName += ::rtl::OUString::valueOf( i ); aObjectName += ::rtl::OUString::valueOf( i );
if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() ) if ( aUsedNamesCheck.find( aObjectName ) == aUsedNamesCheck.end() )
bValid = sal_True; bValid = true;
++i; ++i;
} }

View File

@ -146,29 +146,29 @@ void DlgEditor::ShowDialog()
} }
sal_Bool DlgEditor::UnmarkDialog() bool DlgEditor::UnmarkDialog()
{ {
SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0); SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0);
SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj );
if( bWasMarked ) if( bWasMarked )
pDlgEdView->MarkObj( pDlgObj, pPgView, sal_True ); pDlgEdView->MarkObj( pDlgObj, pPgView, true );
return bWasMarked; return bWasMarked;
} }
sal_Bool DlgEditor::RemarkDialog() bool DlgEditor::RemarkDialog()
{ {
SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0); SdrObject* pDlgObj = pDlgEdModel->GetPage(0)->GetObj(0);
SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj ); bool bWasMarked = pDlgEdView->IsObjMarked( pDlgObj );
if( !bWasMarked ) if( !bWasMarked )
pDlgEdView->MarkObj( pDlgObj, pPgView, sal_False ); pDlgEdView->MarkObj( pDlgObj, pPgView, false );
return bWasMarked; return bWasMarked;
} }
@ -191,10 +191,10 @@ DlgEditor::DlgEditor( const ::com::sun::star::uno::Reference< ::com::sun::star::
,eActObj( OBJ_DLG_PUSHBUTTON ) ,eActObj( OBJ_DLG_PUSHBUTTON )
,bFirstDraw(false) ,bFirstDraw(false)
,aGridSize( 100, 100 ) // 100TH_MM ,aGridSize( 100, 100 ) // 100TH_MM
,bGridVisible(sal_False) ,bGridVisible(false)
,bGridSnap(sal_True) ,bGridSnap(true)
,bCreateOK(sal_True) ,bCreateOK(true)
,bDialogModelChanged(sal_False) ,bDialogModelChanged(false)
,mnPaintGuard(0) ,mnPaintGuard(0)
,m_xDocument( xModel ) ,m_xDocument( xModel )
{ {
@ -261,17 +261,17 @@ void DlgEditor::SetWindow( Window* pWindow_ )
pDlgEdView = new DlgEdView( pDlgEdModel, pWindow_, this ); pDlgEdView = new DlgEdView( pDlgEdModel, pWindow_, this );
pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0)); pDlgEdView->ShowSdrPage(pDlgEdView->GetModel()->GetPage(0));
pDlgEdView->SetLayerVisible( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")), sal_False ); pDlgEdView->SetLayerVisible( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("HiddenLayer")), false );
pDlgEdView->SetMoveSnapOnlyTopLeft( sal_True ); pDlgEdView->SetMoveSnapOnlyTopLeft(true);
pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) ); pDlgEdView->SetWorkArea( Rectangle( Point( 0, 0 ), pDlgEdPage->GetSize() ) );
pDlgEdView->SetGridCoarse( aGridSize ); pDlgEdView->SetGridCoarse( aGridSize );
pDlgEdView->SetSnapGridWidth(Fraction(aGridSize.Width(), 1), Fraction(aGridSize.Height(), 1)); pDlgEdView->SetSnapGridWidth(Fraction(aGridSize.Width(), 1), Fraction(aGridSize.Height(), 1));
pDlgEdView->SetGridSnap( bGridSnap ); pDlgEdView->SetGridSnap( bGridSnap );
pDlgEdView->SetGridVisible( bGridVisible ); pDlgEdView->SetGridVisible( bGridVisible );
pDlgEdView->SetDragStripes( sal_False ); pDlgEdView->SetDragStripes(false);
pDlgEdView->SetDesignMode( sal_True ); pDlgEdView->SetDesignMode(true);
::comphelper::disposeComponent( m_xControlContainer ); ::comphelper::disposeComponent( m_xControlContainer );
} }
@ -426,21 +426,21 @@ void DlgEditor::SetDialog( uno::Reference< container::XNameContainer > xUnoContr
bFirstDraw = true; bFirstDraw = true;
pDlgEdModel->SetChanged( sal_False ); pDlgEdModel->SetChanged(false);
} }
void DlgEditor::ResetDialog( void ) void DlgEditor::ResetDialog ()
{ {
DlgEdForm* pOldDlgEdForm = pDlgEdForm; DlgEdForm* pOldDlgEdForm = pDlgEdForm;
DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0); DlgEdPage* pPage = (DlgEdPage*)pDlgEdModel->GetPage(0);
SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); SdrPageView* pPgView = pDlgEdView->GetSdrPageView();
sal_Bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm ); bool bWasMarked = pDlgEdView->IsObjMarked( pOldDlgEdForm );
pDlgEdView->UnmarkAll(); pDlgEdView->UnmarkAll();
pPage->Clear(); pPage->Clear();
pPage->SetDlgEdForm( NULL ); pPage->SetDlgEdForm( NULL );
SetDialog( m_xUnoControlDialogModel ); SetDialog( m_xUnoControlDialogModel );
if( bWasMarked ) 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 ) void DlgEditor::MouseButtonUp( const MouseEvent& rMEvt )
{ {
sal_Bool bRet = pFunc->MouseButtonUp( rMEvt ); bool bRet = pFunc->MouseButtonUp( rMEvt );
if( eMode == DLGED_INSERT ) if( eMode == DLGED_INSERT )
bCreateOK = bRet; 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 ); return pFunc->KeyInput( rKEvt );
} }
@ -553,7 +553,7 @@ IMPL_LINK_NOARG(DlgEditor, PaintTimeout)
pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) ); pDlgEdForm->SetSnapRect( Rectangle( aPos, aSize ) );
pDlgEdForm->EndListening(false); pDlgEdForm->EndListening(false);
pDlgEdForm->SetPropsFromRect(); pDlgEdForm->SetPropsFromRect();
pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(sal_True); pDlgEdForm->GetDlgEditor()->SetDialogModelChanged(true);
pDlgEdForm->StartListening(); pDlgEdForm->StartListening();
// set position and size of controls // set position and size of controls
@ -636,9 +636,9 @@ void DlgEditor::SetMode( DlgEdMode eNewMode )
pFunc = new DlgEdFuncSelect( this ); pFunc = new DlgEdFuncSelect( this );
if ( eNewMode == DLGED_READONLY ) if ( eNewMode == DLGED_READONLY )
pDlgEdModel->SetReadOnly( sal_True ); pDlgEdModel->SetReadOnly( true );
else else
pDlgEdModel->SetReadOnly( sal_False ); pDlgEdModel->SetReadOnly( false );
} }
if ( eNewMode == DLGED_TEST ) if ( eNewMode == DLGED_TEST )
@ -1039,7 +1039,7 @@ void DlgEditor::Paste()
// mark object // mark object
SdrPageView* pPgView = pDlgEdView->GetSdrPageView(); 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 // center marked objects in dialog editor form
@ -1051,7 +1051,7 @@ void DlgEditor::Paste()
pDlgEdView->MarkListHasChanged(); pDlgEdView->MarkListHasChanged();
// dialog model changed // dialog model changed
SetDialogModelChanged(sal_True); SetDialogModelChanged(true);
} }
} }
} }
@ -1108,17 +1108,15 @@ void DlgEditor::Delete()
pDlgEdView->BrkAction(); pDlgEdView->BrkAction();
sal_Bool bDlgMarked = UnmarkDialog(); bool const bDlgMarked = UnmarkDialog();
pDlgEdView->DeleteMarked(); pDlgEdView->DeleteMarked();
if( bDlgMarked ) if( bDlgMarked )
RemarkDialog(); RemarkDialog();
} }
sal_Bool DlgEditor::IsPasteAllowed() bool DlgEditor::IsPasteAllowed()
{ {
sal_Bool bPaste = sal_False;
// get clipboard // get clipboard
Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard(); Reference< datatransfer::clipboard::XClipboard > xClipboard = GetWindow()->GetClipboard();
if ( xClipboard.is() ) if ( xClipboard.is() )
@ -1127,16 +1125,9 @@ sal_Bool DlgEditor::IsPasteAllowed()
const sal_uInt32 nRef = Application::ReleaseSolarMutex(); const sal_uInt32 nRef = Application::ReleaseSolarMutex();
Reference< datatransfer::XTransferable > xTransf = xClipboard->getContents(); Reference< datatransfer::XTransferable > xTransf = xClipboard->getContents();
Application::AcquireSolarMutex( nRef ); Application::AcquireSolarMutex( nRef );
if ( xTransf.is() ) return xTransf.is() && xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] );
{
if ( xTransf->isDataFlavorSupported( m_ClipboardDataFlavors[0] ) )
{
bPaste = sal_True;
}
}
} }
return false;
return bPaste;
} }
@ -1155,7 +1146,7 @@ void DlgEditor::UpdatePropertyBrowserDelayed()
} }
sal_Bool DlgEditor::IsModified() const bool DlgEditor::IsModified() const
{ {
return pDlgEdModel->IsChanged() || bDialogModelChanged; return pDlgEdModel->IsChanged() || bDialogModelChanged;
} }
@ -1163,8 +1154,8 @@ sal_Bool DlgEditor::IsModified() const
void DlgEditor::ClearModifyFlag() void DlgEditor::ClearModifyFlag()
{ {
pDlgEdModel->SetChanged( sal_False ); pDlgEdModel->SetChanged(false);
bDialogModelChanged = sal_False; bDialogModelChanged = false;
} }

View File

@ -51,7 +51,7 @@ DlgEdTransferableImpl::~DlgEdTransferableImpl()
sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, const DataFlavor& rFlavor ) sal_Bool DlgEdTransferableImpl::compareDataFlavors( const DataFlavor& lFlavor, const DataFlavor& rFlavor )
{ {
sal_Bool bRet = sal_False; bool bRet = false;
// compare mime content types // compare mime content types
Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory(); Reference< lang::XMultiServiceFactory > xMSF = getProcessServiceFactory();
@ -112,18 +112,10 @@ sal_Bool SAL_CALL DlgEdTransferableImpl::isDataFlavorSupported( const DataFlavor
{ {
const SolarMutexGuard aGuard; const SolarMutexGuard aGuard;
sal_Bool bRet = sal_False;
for ( sal_Int32 i = 0; i < m_SeqFlavors.getLength(); i++ ) for ( sal_Int32 i = 0; i < m_SeqFlavors.getLength(); i++ )
{
if ( compareDataFlavors( m_SeqFlavors[i] , rFlavor ) ) if ( compareDataFlavors( m_SeqFlavors[i] , rFlavor ) )
{ return true;
bRet = sal_True; return false;
break;
}
}
return bRet;
} }
// XClipboardOwner // XClipboardOwner

View File

@ -42,7 +42,7 @@ DlgEdFactory::~DlgEdFactory()
IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory ) IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
{ {
static sal_Bool bNeedsInit = sal_True; static bool bNeedsInit = true;
static uno::Reference< lang::XMultiServiceFactory > xDialogSFact; static uno::Reference< lang::XMultiServiceFactory > xDialogSFact;
if( bNeedsInit ) if( bNeedsInit )
@ -54,7 +54,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
uno::Reference< lang::XMultiServiceFactory > xModFact( xC, uno::UNO_QUERY ); uno::Reference< lang::XMultiServiceFactory > xModFact( xC, uno::UNO_QUERY );
xDialogSFact = xModFact; xDialogSFact = xModFact;
} }
bNeedsInit = sal_False; bNeedsInit = false;
} }
if( (pObjFactory->nInventor == DlgInventor) && if( (pObjFactory->nInventor == DlgInventor) &&
@ -111,7 +111,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjFactory *, pObjFactory )
uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY); uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY);
if (xPSet.is()) if (xPSet.is())
{ {
sal_Bool bB = sal_True; sal_Bool bB = true;
xPSet->setPropertyValue( DLGED_PROP_DROPDOWN, uno::Any(&bB,::getBooleanCppuType())); xPSet->setPropertyValue( DLGED_PROP_DROPDOWN, uno::Any(&bB,::getBooleanCppuType()));
} }
} }

View File

@ -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(); 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(); SdrView* pView = pParent->GetView();
Window* pWindow = pParent->GetWindow(); Window* pWindow = pParent->GetWindow();
@ -139,7 +139,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
if ( pView->IsAction() ) if ( pView->IsAction() )
{ {
pView->BrkAction(); pView->BrkAction();
bReturn = sal_True; bReturn = true;
} }
else if ( pView->AreObjectsMarked() ) else if ( pView->AreObjectsMarked() )
{ {
@ -150,7 +150,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
else else
pView->UnmarkAll(); pView->UnmarkAll();
bReturn = sal_True; bReturn = true;
} }
} }
break; break;
@ -169,7 +169,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
if ( pView->AreObjectsMarked() ) if ( pView->AreObjectsMarked() )
pView->MakeVisible( pView->GetAllMarkedRect(), *pWindow ); pView->MakeVisible( pView->GetAllMarkedRect(), *pWindow );
bReturn = sal_True; bReturn = true;
} }
else if ( aCode.IsMod1() ) else if ( aCode.IsMod1() )
{ {
@ -186,7 +186,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
pView->MakeVisible( aVisRect, *pWindow ); pView->MakeVisible( aVisRect, *pWindow );
} }
bReturn = sal_True; bReturn = true;
} }
} }
break; break;
@ -292,14 +292,14 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
if ( pView->IsDragObj() ) if ( pView->IsDragObj() )
{ {
bool bWasNoSnap = rDragStat.IsNoSnap(); bool const bWasNoSnap = rDragStat.IsNoSnap();
sal_Bool bWasSnapEnabled = pView->IsSnapEnabled(); bool const bWasSnapEnabled = pView->IsSnapEnabled();
// switch snapping off // switch snapping off
if ( !bWasNoSnap ) if ( !bWasNoSnap )
((SdrDragStat&)rDragStat).SetNoSnap( sal_True ); ((SdrDragStat&)rDragStat).SetNoSnap(true);
if ( bWasSnapEnabled ) if ( bWasSnapEnabled )
pView->SetSnapEnabled( sal_False ); pView->SetSnapEnabled(false);
pView->MovAction( aEndPoint ); pView->MovAction( aEndPoint );
pView->EndDragObj(); pView->EndDragObj();
@ -335,7 +335,7 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
} }
} }
bReturn = sal_True; bReturn = true;
} }
break; break;
default: default:
@ -355,22 +355,22 @@ sal_Bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
DlgEdFuncInsert::DlgEdFuncInsert( DlgEditor* pParent_ ) : DlgEdFuncInsert::DlgEdFuncInsert( DlgEditor* pParent_ ) :
DlgEdFunc( pParent_ ) DlgEdFunc( pParent_ )
{ {
pParent_->GetView()->SetCreateMode( sal_True ); pParent_->GetView()->SetCreateMode(true);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
DlgEdFuncInsert::~DlgEdFuncInsert() 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() ) if( !rMEvt.IsLeft() )
return sal_True; return true;
SdrView* pView = pParent->GetView(); SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow(); Window* pWindow= pParent->GetWindow();
@ -403,12 +403,12 @@ sal_Bool DlgEdFuncInsert::MouseButtonDown( const MouseEvent& rMEvt )
pParent->ShowProperties(); pParent->ShowProperties();
} }
return sal_True; return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt ) bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
{ {
DlgEdFunc::MouseButtonUp( rMEvt ); DlgEdFunc::MouseButtonUp( rMEvt );
@ -430,22 +430,19 @@ sal_Bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& rMEvt )
pView->MarkObj(aPos, nHitLog); pView->MarkObj(aPos, nHitLog);
} }
if( pView->AreObjectsMarked() ) return pView->AreObjectsMarked();
return sal_True;
else
return sal_False;
} }
else else
{ {
if ( pView->IsDragObj() ) if ( pView->IsDragObj() )
pView->EndDragObj( rMEvt.IsMod1() ); 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(); SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow(); Window* pWindow= pParent->GetWindow();
@ -462,7 +459,7 @@ sal_Bool DlgEdFuncInsert::MouseMove( const MouseEvent& rMEvt )
pWindow->SetPointer( pView->GetPreferedPointer( aPos, pWindow, nHitLog ) ); 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 // get view from parent
SdrView* pView = pParent->GetView(); SdrView* pView = pParent->GetView();
@ -540,12 +537,12 @@ sal_Bool DlgEdFuncSelect::MouseButtonDown( const MouseEvent& rMEvt )
pParent->ShowProperties(); pParent->ShowProperties();
} }
return sal_True; return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt ) bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
{ {
DlgEdFunc::MouseButtonUp( rMEvt ); DlgEdFunc::MouseButtonUp( rMEvt );
@ -577,12 +574,12 @@ sal_Bool DlgEdFuncSelect::MouseButtonUp( const MouseEvent& rMEvt )
pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) ); pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) );
pWindow->ReleaseMouse(); pWindow->ReleaseMouse();
return sal_True; return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt ) bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
{ {
SdrView* pView = pParent->GetView(); SdrView* pView = pParent->GetView();
Window* pWindow= pParent->GetWindow(); Window* pWindow= pParent->GetWindow();
@ -602,7 +599,7 @@ sal_Bool DlgEdFuncSelect::MouseMove( const MouseEvent& rMEvt )
pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) ); pWindow->SetPointer( pView->GetPreferedPointer( aPnt, pWindow, nHitLog ) );
return sal_True; return true;
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------

View File

@ -54,7 +54,7 @@ DBG_NAME(DlgEdObj);
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
DlgEdObj::DlgEdObj() DlgEdObj::DlgEdObj()
:SdrUnoObj(String(), sal_False) :SdrUnoObj(String(), false)
,bIsListening(false) ,bIsListening(false)
,pDlgEdForm( NULL ) ,pDlgEdForm( NULL )
{ {
@ -65,7 +65,7 @@ DlgEdObj::DlgEdObj()
DlgEdObj::DlgEdObj(const ::rtl::OUString& rModelName, DlgEdObj::DlgEdObj(const ::rtl::OUString& rModelName,
const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac) const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSFac)
:SdrUnoObj(rModelName, rxSFac, sal_False) :SdrUnoObj(rModelName, rxSFac, false)
,bIsListening(false) ,bIsListening(false)
,pDlgEdForm( NULL ) ,pDlgEdForm( NULL )
{ {
@ -556,8 +556,8 @@ void DlgEdObj::UpdateStep()
sal_Int32 nStep = GetStep(); sal_Int32 nStep = GetStep();
SdrLayerAdmin& rLayerAdmin = GetModel()->GetLayerAdmin(); SdrLayerAdmin& rLayerAdmin = GetModel()->GetLayerAdmin();
SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), sal_False ); SdrLayerID nHiddenLayerId = rLayerAdmin.GetLayerID( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "HiddenLayer" ) ), false );
SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), sal_False ); SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName(), false );
if( nCurStep ) 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 DlgEdObj::supportsService( const sal_Char* _pServiceName ) const
{ {
sal_Bool bSupports = sal_False; bool bSupports = false;
Reference< lang::XServiceInfo > xServiceInfo( GetUnoControlModel() , UNO_QUERY ); Reference< lang::XServiceInfo > xServiceInfo( GetUnoControlModel() , UNO_QUERY );
// TODO: cache xServiceInfo as member? // TODO: cache xServiceInfo as member?
@ -999,7 +999,7 @@ void DlgEdObj::NbcMove( const Size& rSize )
StartListening(); StartListening();
// dialog model changed // 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(); StartListening();
// dialog model changed // dialog model changed
GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -1117,7 +1117,7 @@ void DlgEdObj::SetDefaults()
} }
// dialog model changed // 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; return;
// dialog model changed // dialog model changed
pDlgEditor->SetDialogModelChanged(sal_True); pDlgEditor->SetDialogModelChanged(true);
// update position and size // update position and size
if ( evt.PropertyName == DLGED_PROP_POSITIONX || evt.PropertyName == DLGED_PROP_POSITIONY || 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 // dialog model changed
if ( ISA(DlgEdForm) ) if ( ISA(DlgEdForm) )
{ {
((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(true);
} }
else 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 // dialog model changed
if ( ISA(DlgEdForm) ) if ( ISA(DlgEdForm) )
{ {
((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(true);
} }
else 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 // dialog model changed
if ( ISA(DlgEdForm) ) if ( ISA(DlgEdForm) )
{ {
((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(sal_True); ((DlgEdForm*)this)->GetDlgEditor()->SetDialogModelChanged(true);
} }
else else
{ {
GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(sal_True); GetDlgEdForm()->GetDlgEditor()->SetDialogModelChanged(true);
} }
} }
} }
@ -1758,7 +1758,7 @@ void DlgEdForm::NbcMove( const Size& rSize )
} }
// dialog model changed // 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 // dialog model changed
GetDlgEditor()->SetDialogModelChanged(sal_True); GetDlgEditor()->SetDialogModelChanged(true);
} }
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
@ -1798,7 +1798,7 @@ bool DlgEdForm::EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd)
SetPropsFromRect(); SetPropsFromRect();
// dialog model changed // dialog model changed
GetDlgEditor()->SetDialogModelChanged(sal_True); GetDlgEditor()->SetDialogModelChanged(true);
// start listening // start listening
StartListening(); StartListening();

View File

@ -60,7 +60,7 @@ namespace {
sal_Int32 nStartPos = 0; sal_Int32 nStartPos = 0;
const Locale aLocale = Application::GetSettings().GetUILocale(); const Locale aLocale = Application::GetSettings().GetUILocale();
Boundary aBoundary = xBreakIter->getWordBoundary( Boundary aBoundary = xBreakIter->getWordBoundary(
rText, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, sal_True ); rText, nStartPos, aLocale, WordType::ANYWORD_IGNOREWHITESPACES, true );
while ( aBoundary.startPos != aBoundary.endPos ) while ( aBoundary.startPos != aBoundary.endPos )
{ {
@ -120,7 +120,7 @@ void ManageLanguageDialog::Init()
m_aMakeDefPB.SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) ); m_aMakeDefPB.SetClickHdl( LINK( this, ManageLanguageDialog, MakeDefHdl ) );
m_aLanguageLB.SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) ); m_aLanguageLB.SetSelectHdl( LINK( this, ManageLanguageDialog, SelectHdl ) );
m_aLanguageLB.EnableMultiSelection( sal_True ); m_aLanguageLB.EnableMultiSelection( true );
CalcInfoSize(); CalcInfoSize();
} }
@ -317,7 +317,7 @@ SetDefaultLanguageDialog::~SetDefaultLanguageDialog()
void SetDefaultLanguageDialog::FillLanguageBox() void SetDefaultLanguageDialog::FillLanguageBox()
{ {
// fill list with all languages // 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 // remove the already localized languages
Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales(); Sequence< Locale > aLocaleSeq = m_pLocalizationMgr->getStringResourceManager()->getLocales();
const Locale* pLocale = aLocaleSeq.getConstArray(); const Locale* pLocale = aLocaleSeq.getConstArray();

View File

@ -165,7 +165,7 @@ void PropBrw::ImplReCreateController()
); );
if ( !m_xBrowserController.is() ) if ( !m_xBrowserController.is() )
{ {
ShowServiceNotAvailableError( GetParent(), s_sControllerServiceName, sal_True ); ShowServiceNotAvailableError( GetParent(), s_sControllerServiceName, true );
} }
else else
{ {
@ -194,7 +194,7 @@ void PropBrw::ImplReCreateController()
m_xBrowserComponentWindow->setPosSize(aPropWinPos.X(), aPropWinPos.Y(), aPropWinSize.Width(), aPropWinSize.Height(), 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::WIDTH | ::com::sun::star::awt::PosSize::HEIGHT |
::com::sun::star::awt::PosSize::X | ::com::sun::star::awt::PosSize::Y); ::com::sun::star::awt::PosSize::X | ::com::sun::star::awt::PosSize::Y);
m_xBrowserComponentWindow->setVisible(sal_True); m_xBrowserComponentWindow->setVisible(true);
} }
} }
catch (const Exception&) catch (const Exception&)
@ -257,9 +257,7 @@ sal_Bool PropBrw::Close()
if( IsRollUp() ) if( IsRollUp() )
RollDown(); RollDown();
sal_Bool bClose = SfxFloatingWindow::Close(); return SfxFloatingWindow::Close();
return bClose;
} }
@ -452,7 +450,7 @@ void PropBrw::implSetNewObject( const Reference< XPropertySet >& _rxObject )
void PropBrw::FillInfo( SfxChildWinInfo& rInfo ) const void PropBrw::FillInfo( SfxChildWinInfo& rInfo ) const
{ {
rInfo.bVisible = sal_False; rInfo.bVisible = false;
} }

View File

@ -54,18 +54,18 @@ private:
VCLExternalSolarLock* m_pExternalLock; VCLExternalSolarLock* m_pExternalLock;
DialogWindow* m_pDialogWindow; DialogWindow* m_pDialogWindow;
DlgEdObj* m_pDlgEdObj; DlgEdObj* m_pDlgEdObj;
sal_Bool m_bFocused; bool m_bFocused;
sal_Bool m_bSelected; bool m_bSelected;
::com::sun::star::awt::Rectangle m_aBounds; ::com::sun::star::awt::Rectangle m_aBounds;
::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel; ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xControlModel;
protected: protected:
sal_Bool IsFocused(); bool IsFocused();
sal_Bool IsSelected(); bool IsSelected();
void SetFocused( sal_Bool bFocused ); void SetFocused (bool bFocused);
void SetSelected( sal_Bool bSelected ); void SetSelected (bool bSelected);
::com::sun::star::awt::Rectangle GetBounds(); ::com::sun::star::awt::Rectangle GetBounds();
void SetBounds( const ::com::sun::star::awt::Rectangle& aBounds ); void SetBounds( const ::com::sun::star::awt::Rectangle& aBounds );

View File

@ -85,12 +85,12 @@ public:
virtual ::rtl::OUString GetTitle(); virtual ::rtl::OUString GetTitle();
virtual BasicEntryDescriptor CreateEntryDescriptor(); virtual BasicEntryDescriptor CreateEntryDescriptor();
virtual void SetReadOnly( sal_Bool bReadOnly ); virtual void SetReadOnly (bool bReadOnly);
virtual sal_Bool IsReadOnly(); virtual bool IsReadOnly();
virtual void StoreData(); virtual void StoreData();
virtual sal_Bool IsModified(); virtual bool IsModified();
virtual sal_Bool IsPasteAllowed(); virtual bool IsPasteAllowed();
virtual ::svl::IUndoManager* virtual ::svl::IUndoManager*
GetUndoManager(); GetUndoManager();

View File

@ -82,7 +82,7 @@ friend class LocalizationMgr;
bool bTabBarSplitted; bool bTabBarSplitted;
bool bCreatingWindow; bool bCreatingWindow;
ModulWindowLayout* pModulLayout; ModulWindowLayout* pModulLayout;
sal_Bool m_bAppBasicModified; bool m_bAppBasicModified;
::basctl::DocumentEventNotifier ::basctl::DocumentEventNotifier
m_aNotifier; m_aNotifier;
friend class ContainerListenerImpl; friend class ContainerListenerImpl;
@ -202,8 +202,8 @@ public:
IDEBaseWindow* FindApplicationWindow(); IDEBaseWindow* FindApplicationWindow();
bool NextPage( bool bPrev = false ); bool NextPage( bool bPrev = false );
sal_Bool IsAppBasicModified() const { return m_bAppBasicModified; } bool IsAppBasicModified () const { return m_bAppBasicModified; }
void SetAppBasicModified( sal_Bool bModified = sal_True ) { m_bAppBasicModified = bModified; } void SetAppBasicModified (bool bModified = true) { m_bAppBasicModified = bModified; }
// For Dialog Drag&Drop in Dialog Organizer // For Dialog Drag&Drop in Dialog Organizer
static void CopyDialogResources( static void CopyDialogResources(

View File

@ -47,7 +47,7 @@ namespace BasicIDE
void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0, void BasicStopped( bool* pbAppWindowDisabled = 0, bool* pbDispatcherLocked = 0, sal_uInt16* pnWaitCount = 0,
SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 ); SfxUInt16Item** ppSWActionCount = 0, SfxUInt16Item** ppSWLockViewCount = 0 );
sal_Bool IsValidSbxName( const String& rName ); bool IsValidSbxName( const String& rName );
BasicManager* FindBasicManager( StarBASIC* pLib ); BasicManager* FindBasicManager( StarBASIC* pLib );
@ -78,7 +78,7 @@ namespace BasicIDE
// new methods for macros // new methods for macros
::rtl::OUString ChooseMacro( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& rxLimitToDocument, ::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( ::com::sun::star::uno::Sequence< ::rtl::OUString > GetMethodNames(
const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName ) const ScriptDocument& rDocument, const ::rtl::OUString& rLibName, const ::rtl::OUString& rModName )

View File

@ -160,13 +160,13 @@ public:
::rtl::OUString CreateQualifiedName(); ::rtl::OUString CreateQualifiedName();
virtual BasicEntryDescriptor CreateEntryDescriptor() = 0; virtual BasicEntryDescriptor CreateEntryDescriptor() = 0;
virtual sal_Bool IsModified(); virtual bool IsModified();
virtual sal_Bool IsPasteAllowed(); virtual bool IsPasteAllowed();
virtual bool AllowUndo(); virtual bool AllowUndo();
virtual void SetReadOnly( sal_Bool bReadOnly ); virtual void SetReadOnly (bool bReadOnly);
virtual sal_Bool IsReadOnly(); virtual bool IsReadOnly();
int GetStatus() { return nStatus; } int GetStatus() { return nStatus; }
void SetStatus(int n) { nStatus = n; } void SetStatus(int n) { nStatus = n; }

View File

@ -108,15 +108,15 @@ protected:
Window* pWindow; Window* pWindow;
DlgEdFunc* pFunc; DlgEdFunc* pFunc;
DlgEdMode eMode; DlgEdMode eMode;
sal_uInt16 eActObj; sal_uInt16 eActObj;
bool bFirstDraw; bool bFirstDraw;
Size aGridSize; Size aGridSize;
sal_Bool bGridVisible; bool bGridVisible;
sal_Bool bGridSnap; bool bGridSnap;
sal_Bool bCreateOK; bool bCreateOK;
Timer aPaintTimer; Timer aPaintTimer;
Rectangle aPaintRect; Rectangle aPaintRect;
sal_Bool bDialogModelChanged; bool bDialogModelChanged;
Timer aMarkTimer; Timer aMarkTimer;
long mnPaintGuard; long mnPaintGuard;
::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument; ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xDocument;
@ -160,33 +160,33 @@ public:
void ShowDialog(); void ShowDialog();
sal_Bool UnmarkDialog(); bool UnmarkDialog();
sal_Bool RemarkDialog(); bool RemarkDialog();
void SetDialogModelChanged( sal_Bool bChanged = sal_True ) { bDialogModelChanged = bChanged; } void SetDialogModelChanged (bool bChanged = true) { bDialogModelChanged = bChanged; }
sal_Bool IsDialogModelChanged() const { return bDialogModelChanged; } bool IsDialogModelChanged () const { return bDialogModelChanged; }
sal_Bool IsModified() const; bool IsModified () const;
void ClearModifyFlag(); void ClearModifyFlag();
void MouseButtonDown( const MouseEvent& rMEvt ); void MouseButtonDown( const MouseEvent& rMEvt );
void MouseButtonUp( const MouseEvent& rMEvt ); void MouseButtonUp( const MouseEvent& rMEvt );
void MouseMove( const MouseEvent& rMEvt ); void MouseMove( const MouseEvent& rMEvt );
void Paint( const Rectangle& rRect ); void Paint( const Rectangle& rRect );
sal_Bool KeyInput( const KeyEvent& rKEvt ); bool KeyInput( const KeyEvent& rKEvt );
void SetMode( DlgEdMode eMode ); void SetMode( DlgEdMode eMode );
void SetInsertObj( sal_uInt16 eObj ); void SetInsertObj( sal_uInt16 eObj );
sal_uInt16 GetInsertObj() const; sal_uInt16 GetInsertObj() const;
void CreateDefaultObject(); void CreateDefaultObject();
DlgEdMode GetMode() const { return eMode; } DlgEdMode GetMode() const { return eMode; }
sal_Bool IsCreateOK() const { return bCreateOK; } bool IsCreateOK() const { return bCreateOK; }
void Cut(); void Cut();
void Copy(); void Copy();
void Paste(); void Paste();
void Delete(); void Delete();
sal_Bool IsPasteAllowed(); bool IsPasteAllowed();
void ShowProperties(); void ShowProperties();
void UpdatePropertyBrowserDelayed(); void UpdatePropertyBrowserDelayed();

View File

@ -39,10 +39,10 @@ public:
DlgEdFunc( DlgEditor* pParent ); DlgEdFunc( DlgEditor* pParent );
virtual ~DlgEdFunc(); virtual ~DlgEdFunc();
virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); virtual bool MouseButtonDown( const MouseEvent& rMEvt );
virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); virtual bool MouseButtonUp( const MouseEvent& rMEvt );
virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); virtual bool MouseMove( const MouseEvent& rMEvt );
virtual sal_Bool KeyInput( const KeyEvent& rKEvt ); virtual bool KeyInput( const KeyEvent& rKEvt );
}; };
//============================================================================ //============================================================================
@ -55,9 +55,9 @@ public:
DlgEdFuncInsert( DlgEditor* pParent ); DlgEdFuncInsert( DlgEditor* pParent );
~DlgEdFuncInsert(); ~DlgEdFuncInsert();
virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); virtual bool MouseButtonDown( const MouseEvent& rMEvt );
virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); virtual bool MouseButtonUp( const MouseEvent& rMEvt );
virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); virtual bool MouseMove( const MouseEvent& rMEvt );
}; };
//============================================================================ //============================================================================
@ -73,9 +73,9 @@ public:
DlgEdFuncSelect( DlgEditor* pParent ); DlgEdFuncSelect( DlgEditor* pParent );
~DlgEdFuncSelect(); ~DlgEdFuncSelect();
virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); virtual bool MouseButtonDown( const MouseEvent& rMEvt );
virtual sal_Bool MouseButtonUp( const MouseEvent& rMEvt ); virtual bool MouseButtonUp( const MouseEvent& rMEvt );
virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); virtual bool MouseMove( const MouseEvent& rMEvt );
}; };