diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 12:53:51 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-21 12:53:51 +0100 |
commit | e8f8f24c8415898c787bbfb629247ed62e73a2b9 (patch) | |
tree | dae18a3acbf29c192118e7c003f80df8da8e21ae | |
parent | 1c8402465cfd4df862409dc310f5f099d044c4d8 (diff) |
vcl: sal_Bool -> bool
Change-Id: I2a3e3d3e3266ea0f0fafdd91362076a4aa160f0e
869 files changed, 8364 insertions, 8350 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index b0b84faa4034..d0525d2a6eba 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -80,7 +80,7 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : const OUString aTimeText( " 00:00:00/00:00:00 " ); SetBackground(); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); if( MEDIACONTROLSTYLE_SINGLELINE != meControlStyle ) @@ -98,11 +98,11 @@ MediaControl::MediaControl( Window* pParent, MediaControlStyle eControlStyle ) : mpZoomListBox->SetBackground(); maZoomToolBox.SetBackground(); - maZoomToolBox.SetPaintTransparent( sal_True ); + maZoomToolBox.SetPaintTransparent( true ); maPlayToolBox.SetBackground(); - maPlayToolBox.SetPaintTransparent( sal_True ); + maPlayToolBox.SetPaintTransparent( true ); maMuteToolBox.SetBackground(); - maMuteToolBox.SetPaintTransparent( sal_True ); + maMuteToolBox.SetPaintTransparent( true ); } diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx index 1aa12a407315..06bc28ade190 100644 --- a/basctl/source/basicide/baside2.cxx +++ b/basctl/source/basicide/baside2.cxx @@ -1295,7 +1295,7 @@ sal_uInt16 ModulWindow::StartSearchAndReplace( const SvxSearchItem& rSearchItem, if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND ) || ( rSearchItem.GetCommand() == SVX_SEARCHCMD_FIND_ALL ) ) { - nFound = pView->Search( rSearchItem.GetSearchOptions() , bForward ); + nFound = pView->Search( rSearchItem.GetSearchOptions() , bForward ) ? 1 : 0; } else if ( ( rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE ) || ( rSearchItem.GetCommand() == SVX_SEARCHCMD_REPLACE_ALL ) ) diff --git a/basctl/source/basicide/baside2b.cxx b/basctl/source/basicide/baside2b.cxx index 07b0a9944ef5..51094d002fba 100644 --- a/basctl/source/basicide/baside2b.cxx +++ b/basctl/source/basicide/baside2b.cxx @@ -2653,14 +2653,14 @@ void CodeCompleteListBox::InsertSelectedEntry() if( !((OUString) GetEntry( GetSelectEntryPos() )).isEmpty() ) {//if the user selected something - GetParentEditView()->InsertText( (OUString) GetEntry(GetSelectEntryPos()), sal_False ); + GetParentEditView()->InsertText( (OUString) GetEntry(GetSelectEntryPos()), false ); } } else { if( !((OUString) GetEntry( GetSelectEntryPos() )).isEmpty() ) {//if the user selected something - GetParentEditView()->InsertText( (OUString) GetEntry(GetSelectEntryPos()), sal_False ); + GetParentEditView()->InsertText( (OUString) GetEntry(GetSelectEntryPos()), false ); } } HideAndRestoreFocus(); @@ -2741,7 +2741,7 @@ void CodeCompleteListBox::KeyInput( const KeyEvent& rKeyEvt ) GetParentEditView()->SetSelection( aTextSelection ); GetParentEditView()->DeleteSelected(); - GetParentEditView()->InsertText( GetSelectEntry(), sal_False ); + GetParentEditView()->InsertText( GetSelectEntry(), false ); } } break; diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx index eb1299947a31..bf478e970bfb 100644 --- a/basctl/source/basicide/bastypes.cxx +++ b/basctl/source/basicide/bastypes.cxx @@ -344,7 +344,7 @@ void DockingWindow::Hide () Show(false); } -sal_Bool DockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +bool DockingWindow::Docking( const Point& rPos, Rectangle& rRect ) { if (!IsDockingPrevented() && aDockingRect.IsInside(rPos)) { @@ -383,7 +383,7 @@ void DockingWindow::ToggleFloatingMode() DockThis(); } -sal_Bool DockingWindow::PrepareToggleFloatingMode() +bool DockingWindow::PrepareToggleFloatingMode() { if (IsFloatingMode()) { diff --git a/basctl/source/dlged/propbrw.cxx b/basctl/source/dlged/propbrw.cxx index 384fb736cb13..d03bbb72dfa9 100644 --- a/basctl/source/dlged/propbrw.cxx +++ b/basctl/source/dlged/propbrw.cxx @@ -227,7 +227,7 @@ void PropBrw::ImplDestroyController() } -sal_Bool PropBrw::Close() +bool PropBrw::Close() { ImplDestroyController(); diff --git a/basctl/source/inc/bastypes.hxx b/basctl/source/inc/bastypes.hxx index eb6d0ac42b3d..e4afb64b99eb 100644 --- a/basctl/source/inc/bastypes.hxx +++ b/basctl/source/inc/bastypes.hxx @@ -90,10 +90,10 @@ public: void Hide (); protected: - virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect ); + virtual bool Docking( const Point& rPos, Rectangle& rRect ); virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ); virtual void ToggleFloatingMode(); - virtual sal_Bool PrepareToggleFloatingMode(); + virtual bool PrepareToggleFloatingMode(); virtual void StartDocking(); private: diff --git a/basctl/source/inc/propbrw.hxx b/basctl/source/inc/propbrw.hxx index ef4358bd6d63..f8a169539567 100644 --- a/basctl/source/inc/propbrw.hxx +++ b/basctl/source/inc/propbrw.hxx @@ -57,7 +57,7 @@ private: protected: SdrView* pView; virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); typedef std::vector< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> > InterfaceArray; diff --git a/canvas/source/cairo/cairo_canvasfont.cxx b/canvas/source/cairo/cairo_canvasfont.cxx index 7a1a78e7a240..96370023af3b 100644 --- a/canvas/source/cairo/cairo_canvasfont.cxx +++ b/canvas/source/cairo/cairo_canvasfont.cxx @@ -68,7 +68,7 @@ namespace cairocanvas if( pOutDev ) { const bool bOldMapState( pOutDev->IsMapModeEnabled() ); - pOutDev->EnableMapMode(sal_False); + pOutDev->EnableMapMode(false); const Size aSize = pOutDev->GetFontMetric( *maFont ).GetSize(); diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx index 42d4d8924fd4..216994b3bd2e 100644 --- a/canvas/source/cairo/cairo_devicehelper.cxx +++ b/canvas/source/cairo/cairo_devicehelper.cxx @@ -262,7 +262,7 @@ namespace cairocanvas const ::Point aEmptyPoint; bool bOldMap( mpRefDevice->IsMapModeEnabled() ); - mpRefDevice->EnableMapMode( sal_False ); + mpRefDevice->EnableMapMode( false ); const ::Bitmap aTempBitmap(mpRefDevice->GetBitmap(aEmptyPoint, mpRefDevice->GetOutputSizePixel())); WriteDIB(aTempBitmap, aStream, false, true); mpRefDevice->EnableMapMode( bOldMap ); diff --git a/canvas/source/vcl/bitmapbackbuffer.cxx b/canvas/source/vcl/bitmapbackbuffer.cxx index 0fb9380c6914..d140ea002a10 100644 --- a/canvas/source/vcl/bitmapbackbuffer.cxx +++ b/canvas/source/vcl/bitmapbackbuffer.cxx @@ -77,7 +77,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { // VDev content is more current than bitmap - copy contents before! - mpVDev->EnableMapMode( sal_False ); + mpVDev->EnableMapMode( false ); mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Point aEmptyPoint; *maBitmap = mpVDev->GetBitmapEx( aEmptyPoint, @@ -98,7 +98,7 @@ namespace vclcanvas if( mbVDevContentIsCurrent && mpVDev ) { - mpVDev->EnableMapMode( sal_False ); + mpVDev->EnableMapMode( false ); mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); aSize = mpVDev->GetOutputSizePixel(); } @@ -142,7 +142,7 @@ namespace vclcanvas if( mpVDev && mbBitmapContentIsCurrent ) { // fill with bitmap content - mpVDev->EnableMapMode( sal_False ); + mpVDev->EnableMapMode( false ); mpVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Point aEmptyPoint; mpVDev->DrawBitmapEx( aEmptyPoint, *maBitmap ); diff --git a/canvas/source/vcl/canvasfont.cxx b/canvas/source/vcl/canvasfont.cxx index 6229072c2925..0393751c8093 100644 --- a/canvas/source/vcl/canvasfont.cxx +++ b/canvas/source/vcl/canvasfont.cxx @@ -68,7 +68,7 @@ namespace vclcanvas OutputDevice& rOutDev( rOutDevProvider->getOutDev() ); const bool bOldMapState( rOutDev.IsMapModeEnabled() ); - rOutDev.EnableMapMode(sal_False); + rOutDev.EnableMapMode(false); const Size aSize = rOutDev.GetFontMetric( *maFont ).GetSize(); diff --git a/canvas/source/vcl/canvashelper.cxx b/canvas/source/vcl/canvashelper.cxx index 54fff82b4d74..521056068892 100644 --- a/canvas/source/vcl/canvashelper.cxx +++ b/canvas/source/vcl/canvashelper.cxx @@ -154,7 +154,7 @@ namespace vclcanvas void CanvasHelper::setBackgroundOutDev( const OutDevProviderSharedPtr& rOutDev ) { mp2ndOutDev = rOutDev; - mp2ndOutDev->getOutDev().EnableMapMode( sal_False ); + mp2ndOutDev->getOutDev().EnableMapMode( false ); mp2ndOutDev->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); } @@ -166,7 +166,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetLineColor( COL_WHITE ); rOutDev.SetFillColor( COL_WHITE ); @@ -179,7 +179,7 @@ namespace vclcanvas OutputDevice& rOutDev2( mp2ndOutDev->getOutDev() ); rOutDev2.SetDrawMode( DRAWMODE_DEFAULT ); - rOutDev2.EnableMapMode( sal_False ); + rOutDev2.EnableMapMode( false ); rOutDev2.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev2.SetLineColor( COL_WHITE ); rOutDev2.SetFillColor( COL_WHITE ); @@ -936,7 +936,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); // TODO(F2): Support alpha vdev canvas here @@ -966,7 +966,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); Bitmap aBitmap( rOutDev.GetBitmap(aRect.TopLeft(), @@ -1019,7 +1019,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Rectangle aRect( ::vcl::unotools::rectangleFromIntegerRectangle2D(rect) ); @@ -1144,7 +1144,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1182,7 +1182,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); tools::OutDevStateKeeper aStateKeeper( mpProtectedOutDev ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); const Size aBmpSize( rOutDev.GetOutputSizePixel() ); @@ -1226,7 +1226,7 @@ namespace vclcanvas OutputDevice& rOutDev( mpOutDev->getOutDev() ); OutputDevice* p2ndOutDev = NULL; - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); if( mp2ndOutDev ) diff --git a/canvas/source/vcl/devicehelper.cxx b/canvas/source/vcl/devicehelper.cxx index 2618a04b219b..e0c5fe001cac 100644 --- a/canvas/source/vcl/devicehelper.cxx +++ b/canvas/source/vcl/devicehelper.cxx @@ -218,7 +218,7 @@ namespace vclcanvas const ::Point aEmptyPoint; OutputDevice& rOutDev = mpOutDev->getOutDev(); bool bOldMap( rOutDev.IsMapModeEnabled() ); - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); WriteDIB(rOutDev.GetBitmap(aEmptyPoint, rOutDev.GetOutputSizePixel()), aStream, false, true); rOutDev.EnableMapMode( bOldMap ); diff --git a/canvas/source/vcl/impltools.hxx b/canvas/source/vcl/impltools.hxx index d017ebf87e64..e422f213ca72 100644 --- a/canvas/source/vcl/impltools.hxx +++ b/canvas/source/vcl/impltools.hxx @@ -154,7 +154,7 @@ namespace vclcanvas if( mpOutDev ) { mpOutDev->Push(); - mpOutDev->EnableMapMode(sal_False); + mpOutDev->EnableMapMode(false); mpOutDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); } } diff --git a/canvas/source/vcl/spritecanvashelper.cxx b/canvas/source/vcl/spritecanvashelper.cxx index 88a297025158..1003fc23f199 100644 --- a/canvas/source/vcl/spritecanvashelper.cxx +++ b/canvas/source/vcl/spritecanvashelper.cxx @@ -87,7 +87,7 @@ namespace vclcanvas // clip output to actual update region (otherwise a) // wouldn't save much render time, and b) will clutter // scrolled sprite content outside this area) - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetClipRegion(Region(rRequestedArea)); @@ -308,7 +308,7 @@ namespace vclcanvas // but repaint everything (or caller requested that) maVDev->SetOutputSizePixel( aOutDevSize ); - maVDev->EnableMapMode( sal_False ); + maVDev->EnableMapMode( false ); maVDev->DrawOutDev( aEmptyPoint, aOutDevSize, aEmptyPoint, aOutDevSize, rBackOutDev ); @@ -322,7 +322,7 @@ namespace vclcanvas _1 ) ); // flush to screen - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.SetClipRegion(); rOutDev.DrawOutDev( aEmptyPoint, aOutDevSize, @@ -564,7 +564,7 @@ namespace vclcanvas } // paint background - maVDev->EnableMapMode( sal_False ); + maVDev->EnableMapMode( false ); maVDev->SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); maVDev->SetClipRegion(); maVDev->DrawOutDev( aEmptyPoint, aOutputSize, @@ -582,7 +582,7 @@ namespace vclcanvas _1 ) ); // flush to screen - rOutDev.EnableMapMode( sal_False ); + rOutDev.EnableMapMode( false ); rOutDev.SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); rOutDev.DrawOutDev( aOutputPosition, aOutputSize, aEmptyPoint, aOutputSize, diff --git a/canvas/source/vcl/spritedevicehelper.cxx b/canvas/source/vcl/spritedevicehelper.cxx index 982042b84165..9b6ace50f926 100644 --- a/canvas/source/vcl/spritedevicehelper.cxx +++ b/canvas/source/vcl/spritedevicehelper.cxx @@ -133,7 +133,7 @@ namespace vclcanvas SvFileStream aStream( aFilename, STREAM_STD_READWRITE ); const ::Point aEmptyPoint; - mpBackBuffer->getOutDev().EnableMapMode( sal_False ); + mpBackBuffer->getOutDev().EnableMapMode( false ); mpBackBuffer->getOutDev().SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW ); WriteDIB(mpBackBuffer->getOutDev().GetBitmap(aEmptyPoint, mpBackBuffer->getOutDev().GetOutputSizePixel()), aStream, false, true); } diff --git a/canvas/source/vcl/textlayout.cxx b/canvas/source/vcl/textlayout.cxx index 1ef4fa6176d6..36ba673db317 100644 --- a/canvas/source/vcl/textlayout.cxx +++ b/canvas/source/vcl/textlayout.cxx @@ -132,7 +132,7 @@ namespace vclcanvas maText.StartPosition, maText.StartPosition, maText.Length, - sal_False, + false, 0, aOffsets.get())) { diff --git a/chart2/source/controller/dialogs/dlg_DataEditor.cxx b/chart2/source/controller/dialogs/dlg_DataEditor.cxx index b60a52a38558..ddba251a56d3 100644 --- a/chart2/source/controller/dialogs/dlg_DataEditor.cxx +++ b/chart2/source/controller/dialogs/dlg_DataEditor.cxx @@ -187,12 +187,12 @@ void DataEditor::UpdateData() m_xBrwData->SetDataFromModel( m_xChartDoc, m_xContext ); } -sal_Bool DataEditor::Close() +bool DataEditor::Close() { if( ApplyChangesToModel() ) return ModalDialog::Close(); else - return sal_True; + return true; } bool DataEditor::ApplyChangesToModel() diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index caf17e60a67e..ca29b4d13700 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -77,14 +77,14 @@ bool lcl_ReadNumberFormatFromItemSet( const SfxItemSet& rSet, sal_uInt16 nValueW void lcl_setBoolItemToCheckBox( const SfxItemSet& rInAttrs, sal_uInt16 nWhichId, CheckBox& rCheckbox ) { - rCheckbox.EnableTriState( sal_False ); + rCheckbox.EnableTriState( false ); const SfxPoolItem *pPoolItem = NULL; if( rInAttrs.GetItemState(nWhichId, true, &pPoolItem) == SFX_ITEM_SET ) rCheckbox.Check( ((const SfxBoolItem*)pPoolItem)->GetValue() ); else { - rCheckbox.EnableTriState( sal_True ); + rCheckbox.EnableTriState( true ); rCheckbox.SetState( STATE_DONTKNOW ); } } @@ -237,7 +237,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, PushButton *, pButton ) IMPL_LINK( DataLabelResources, CheckHdl, CheckBox*, pBox ) { if( pBox ) - pBox->EnableTriState( sal_False ); + pBox->EnableTriState( false ); EnableControls(); return 0; } diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx index ec3c63a282f0..7c25681bf7df 100644 --- a/chart2/source/controller/dialogs/res_ErrorBar.cxx +++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx @@ -139,7 +139,7 @@ ErrorBarResources::ErrorBarResources( VclBuilderContainer* pParent, Dialog * pPa m_pRbRange->SetClickHdl( LINK( this, ErrorBarResources, CategoryChosen )); m_pLbFunction->SetSelectHdl( LINK( this, ErrorBarResources, CategoryChosen )); - m_pCbSyncPosNeg->Check( sal_False ); + m_pCbSyncPosNeg->Check( false ); m_pCbSyncPosNeg->SetToggleHdl( LINK( this, ErrorBarResources, SynchronizePosAndNeg )); m_pMfPositive->SetModifyHdl( LINK( this, ErrorBarResources, PosValueChanged )); @@ -522,10 +522,10 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } else { - m_pRbNone->Check( sal_False ); - m_pRbConst->Check( sal_False ); - m_pRbPercent->Check( sal_False ); - m_pRbFunction->Check( sal_False ); + m_pRbNone->Check( false ); + m_pRbConst->Check( false ); + m_pRbPercent->Check( false ); + m_pRbFunction->Check( false ); } // parameters @@ -576,9 +576,9 @@ void ErrorBarResources::Reset(const SfxItemSet& rInAttrs) } else { - m_pRbBoth->Check( sal_False ); - m_pRbPositive->Check( sal_False ); - m_pRbNegative->Check( sal_False ); + m_pRbBoth->Check( false ); + m_pRbPositive->Check( false ); + m_pRbNegative->Check( false ); } // ranges diff --git a/chart2/source/controller/dialogs/res_LegendPosition.cxx b/chart2/source/controller/dialogs/res_LegendPosition.cxx index 12d4b620aa85..3302233c094e 100644 --- a/chart2/source/controller/dialogs/res_LegendPosition.cxx +++ b/chart2/source/controller/dialogs/res_LegendPosition.cxx @@ -188,16 +188,16 @@ void LegendPositionResources::initFromItemSet( const SfxItemSet& rInAttrs ) switch( nLegendPosition ) { case chart2::LegendPosition_LINE_START: - m_pRbtLeft->Check(sal_True); + m_pRbtLeft->Check(true); break; case chart2::LegendPosition_PAGE_START: - m_pRbtTop->Check(sal_True); + m_pRbtTop->Check(true); break; case chart2::LegendPosition_LINE_END: - m_pRbtRight->Check(sal_True); + m_pRbtRight->Check(true); break; case chart2::LegendPosition_PAGE_END: - m_pRbtBottom->Check(sal_True); + m_pRbtBottom->Check(true); break; default: break; diff --git a/chart2/source/controller/dialogs/res_Trendline.cxx b/chart2/source/controller/dialogs/res_Trendline.cxx index 108ae3bab42a..ae02ba08e4bd 100644 --- a/chart2/source/controller/dialogs/res_Trendline.cxx +++ b/chart2/source/controller/dialogs/res_Trendline.cxx @@ -178,12 +178,12 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SET_INTERCEPT, true, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_pCB_SetIntercept->EnableTriState( sal_True ); + m_pCB_SetIntercept->EnableTriState( true ); m_pCB_SetIntercept->SetState( STATE_DONTKNOW ); } else { - m_pCB_SetIntercept->EnableTriState( sal_False ); + m_pCB_SetIntercept->EnableTriState( false ); if( aState == SFX_ITEM_SET ) m_pCB_SetIntercept->Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } @@ -191,12 +191,12 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_EQUATION, true, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_pCB_ShowEquation->EnableTriState( sal_True ); + m_pCB_ShowEquation->EnableTriState( true ); m_pCB_ShowEquation->SetState( STATE_DONTKNOW ); } else { - m_pCB_ShowEquation->EnableTriState( sal_False ); + m_pCB_ShowEquation->EnableTriState( false ); if( aState == SFX_ITEM_SET ) m_pCB_ShowEquation->Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } @@ -204,12 +204,12 @@ void TrendlineResources::Reset( const SfxItemSet& rInAttrs ) aState = rInAttrs.GetItemState( SCHATTR_REGRESSION_SHOW_COEFF, true, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_pCB_ShowCorrelationCoeff->EnableTriState( sal_True ); + m_pCB_ShowCorrelationCoeff->EnableTriState( true ); m_pCB_ShowCorrelationCoeff->SetState( STATE_DONTKNOW ); } else { - m_pCB_ShowCorrelationCoeff->EnableTriState( sal_False ); + m_pCB_ShowCorrelationCoeff->EnableTriState( false ); if( aState == SFX_ITEM_SET ) m_pCB_ShowCorrelationCoeff->Check( static_cast< const SfxBoolItem * >( pPoolItem )->GetValue()); } diff --git a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx index 7bc3a6463483..abb672f58a4f 100644 --- a/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx +++ b/chart2/source/controller/dialogs/tp_3D_SceneAppearance.cxx @@ -113,9 +113,9 @@ ThreeD_SceneAppearance_TabPage::ThreeD_SceneAppearance_TabPage( m_pCB_Shading->SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectShading ) ); m_pCB_ObjectLines->SetToggleHdl( LINK( this, ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines ) ); - m_pCB_RoundedEdge->EnableTriState( sal_True ); - m_pCB_Shading->EnableTriState( sal_True ); - m_pCB_ObjectLines->EnableTriState( sal_True ); + m_pCB_RoundedEdge->EnableTriState( true ); + m_pCB_Shading->EnableTriState( true ); + m_pCB_ObjectLines->EnableTriState( true ); initControlsFromModel(); } @@ -204,50 +204,50 @@ void ThreeD_SceneAppearance_TabPage::initControlsFromModel() if(aProps.m_aShadeMode == drawing::ShadeMode_FLAT) { - m_pCB_Shading->EnableTriState( sal_False ); - m_pCB_Shading->Check(sal_False); + m_pCB_Shading->EnableTriState( false ); + m_pCB_Shading->Check(false); } else if(aProps.m_aShadeMode == drawing::ShadeMode_SMOOTH) { - m_pCB_Shading->EnableTriState( sal_False ); - m_pCB_Shading->Check(sal_True); + m_pCB_Shading->EnableTriState( false ); + m_pCB_Shading->Check(true); } else { - m_pCB_Shading->EnableTriState( sal_True ); + m_pCB_Shading->EnableTriState( true ); m_pCB_Shading->SetState( STATE_DONTKNOW ); } if(aProps.m_nObjectLines == 0) { - m_pCB_ObjectLines->EnableTriState( sal_False ); - m_pCB_ObjectLines->Check(sal_False); + m_pCB_ObjectLines->EnableTriState( false ); + m_pCB_ObjectLines->Check(false); } else if(aProps.m_nObjectLines==1) { - m_pCB_ObjectLines->EnableTriState( sal_False ); - m_pCB_ObjectLines->Check(sal_True); + m_pCB_ObjectLines->EnableTriState( false ); + m_pCB_ObjectLines->Check(true); } else { - m_pCB_ObjectLines->EnableTriState( sal_True ); + m_pCB_ObjectLines->EnableTriState( true ); m_pCB_ObjectLines->SetState( STATE_DONTKNOW ); } if(aProps.m_nRoundedEdges >= 5) { - m_pCB_RoundedEdge->EnableTriState( sal_False ); - m_pCB_RoundedEdge->Check(sal_True); + m_pCB_RoundedEdge->EnableTriState( false ); + m_pCB_RoundedEdge->Check(true); } else if(aProps.m_nRoundedEdges<0) { - m_pCB_RoundedEdge->EnableTriState( sal_False ); + m_pCB_RoundedEdge->EnableTriState( false ); m_pCB_RoundedEdge->SetState( STATE_DONTKNOW ); } else { - m_pCB_RoundedEdge->EnableTriState( sal_True ); - m_pCB_RoundedEdge->Check(sal_False); + m_pCB_RoundedEdge->EnableTriState( true ); + m_pCB_RoundedEdge->Check(false); } m_pCB_RoundedEdge->Enable( !m_pCB_ObjectLines->IsChecked() ); @@ -315,7 +315,7 @@ IMPL_LINK_NOARG(ThreeD_SceneAppearance_TabPage, SelectShading) if( !m_bUpdateOtherControls ) return 0; - m_pCB_Shading->EnableTriState( sal_False ); + m_pCB_Shading->EnableTriState( false ); applyShadeModeToModel(); updateScheme(); return 0; @@ -327,15 +327,15 @@ IMPL_LINK( ThreeD_SceneAppearance_TabPage, SelectRoundedEdgeOrObjectLines, Check if( pCheckBox == m_pCB_ObjectLines ) { - m_pCB_ObjectLines->EnableTriState( sal_False ); + m_pCB_ObjectLines->EnableTriState( false ); m_bUpdateOtherControls = false; m_pCB_RoundedEdge->Enable( !m_pCB_ObjectLines->IsChecked() ); if(!m_pCB_RoundedEdge->IsEnabled()) - m_pCB_RoundedEdge->Check(sal_False); + m_pCB_RoundedEdge->Check(false); m_bUpdateOtherControls = true; } else - m_pCB_RoundedEdge->EnableTriState( sal_False ); + m_pCB_RoundedEdge->EnableTriState( false ); applyRoundedEdgeAndObjectLinesToModel(); updateScheme(); return 0; diff --git a/chart2/source/controller/dialogs/tp_AxisLabel.cxx b/chart2/source/controller/dialogs/tp_AxisLabel.cxx index f6619c07c063..3389bf869af4 100644 --- a/chart2/source/controller/dialogs/tp_AxisLabel.cxx +++ b/chart2/source/controller/dialogs/tp_AxisLabel.cxx @@ -67,7 +67,7 @@ SchAxisLabelTabPage::SchAxisLabelTabPage( Window* pParent, const SfxItemSet& rIn m_pOrientHlp->Enable( true ); - m_pCbStacked->EnableTriState( sal_False ); + m_pCbStacked->EnableTriState( false ); m_pOrientHlp->AddDependentWindow( *m_pFlOrient ); m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK ); @@ -146,12 +146,12 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) SfxItemState aState = rInAttrs.GetItemState( SCHATTR_AXIS_SHOWDESCR, false, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_pCbShowDescription->EnableTriState( sal_True ); + m_pCbShowDescription->EnableTriState( true ); m_pCbShowDescription->SetState( STATE_DONTKNOW ); } else { - m_pCbShowDescription->EnableTriState( sal_False ); + m_pCbShowDescription->EnableTriState( false ); sal_Bool bCheck = sal_False; if( aState == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); @@ -194,12 +194,12 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) aState = rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_OVERLAP, false, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_pCbTextOverlap->EnableTriState( sal_True ); + m_pCbTextOverlap->EnableTriState( true ); m_pCbTextOverlap->SetState( STATE_DONTKNOW ); } else { - m_pCbTextOverlap->EnableTriState( sal_False ); + m_pCbTextOverlap->EnableTriState( false ); sal_Bool bCheck = sal_False; if( aState == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); @@ -213,12 +213,12 @@ void SchAxisLabelTabPage::Reset( const SfxItemSet& rInAttrs ) aState = rInAttrs.GetItemState( SCHATTR_AXIS_LABEL_BREAK, false, &pPoolItem ); if( aState == SFX_ITEM_DONTCARE ) { - m_pCbTextBreak->EnableTriState( sal_True ); + m_pCbTextBreak->EnableTriState( true ); m_pCbTextBreak->SetState( STATE_DONTKNOW ); } else { - m_pCbTextBreak->EnableTriState( sal_False ); + m_pCbTextBreak->EnableTriState( false ); sal_Bool bCheck = sal_False; if( aState == SFX_ITEM_SET ) bCheck = static_cast< const SfxBoolItem * >( pPoolItem )->GetValue(); diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx index 571b26070510..720e70d9037e 100644 --- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx +++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx @@ -36,7 +36,7 @@ namespace PushButton& rChooserButton, bool bShow) { - if( rChooserButton.IsVisible() != (sal_Bool) bShow ) + if( rChooserButton.IsVisible() != bShow ) { rChooserButton.Show( bShow ); } diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 010b6e7dea14..43bdad7a2796 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -120,15 +120,15 @@ void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs) { const SfxPoolItem *pPoolItem = NULL; - m_pRbtAxis1->Check(sal_True); - m_pRbtAxis2->Check(sal_False); + m_pRbtAxis1->Check(true); + m_pRbtAxis2->Check(false); if (rInAttrs.GetItemState(SCHATTR_AXIS,true, &pPoolItem) == SFX_ITEM_SET) { long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(nVal==CHART_AXIS_SECONDARY_Y) { - m_pRbtAxis2->Check(sal_True); - m_pRbtAxis1->Check(sal_False); + m_pRbtAxis2->Check(true); + m_pRbtAxis1->Check(false); } } @@ -193,11 +193,11 @@ void SchOptionTabPage::Reset(const SfxItemSet& rInAttrs) long nVal=((const SfxInt32Item*)pPoolItem)->GetValue(); if(nVal==::com::sun::star::chart::MissingValueTreatment::LEAVE_GAP) - m_pRB_DontPaint->Check(sal_True); + m_pRB_DontPaint->Check(true); else if(nVal==::com::sun::star::chart::MissingValueTreatment::USE_ZERO) - m_pRB_AssumeZero->Check(sal_True); + m_pRB_AssumeZero->Check(true); else if(nVal==::com::sun::star::chart::MissingValueTreatment::CONTINUE) - m_pRB_ContinueLine->Check(sal_True); + m_pRB_ContinueLine->Check(true); } else { diff --git a/chart2/source/controller/dialogs/tp_TitleRotation.cxx b/chart2/source/controller/dialogs/tp_TitleRotation.cxx index 08823d6efa83..8e94ae18276f 100644 --- a/chart2/source/controller/dialogs/tp_TitleRotation.cxx +++ b/chart2/source/controller/dialogs/tp_TitleRotation.cxx @@ -46,7 +46,7 @@ SchAlignmentTabPage::SchAlignmentTabPage(Window* pWindow, m_pCtrlDial->SetText(m_pFtABCD->GetText()); m_pOrientHlp = new svx::OrientationHelper(*m_pCtrlDial, *m_pNfRotate, *m_pCbStacked); - m_pCbStacked->EnableTriState( sal_False ); + m_pCbStacked->EnableTriState( false ); m_pOrientHlp->Enable( true ); m_pOrientHlp->AddDependentWindow( *m_pFtRotate, STATE_CHECK ); diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx index cff710741412..347977a8871a 100644 --- a/chart2/source/controller/inc/dlg_DataEditor.hxx +++ b/chart2/source/controller/inc/dlg_DataEditor.hxx @@ -50,7 +50,7 @@ public: virtual ~DataEditor(); // Dialog - virtual sal_Bool Close(); + virtual bool Close(); void SetReadOnly( bool bReadOnly ); bool ApplyChangesToModel(); diff --git a/chart2/source/controller/main/ChartWindow.cxx b/chart2/source/controller/main/ChartWindow.cxx index c56489f000fb..917d69e8ae74 100644 --- a/chart2/source/controller/main/ChartWindow.cxx +++ b/chart2/source/controller/main/ChartWindow.cxx @@ -52,9 +52,9 @@ ChartWindow::ChartWindow( WindowController* pWindowController, Window* pParent, adjustHighContrastMode(); // chart does not depend on exact pixel painting => enable antialiased drawing SetAntialiasing( ANTIALIASING_ENABLE_B2DDRAW | GetAntialiasing() ); - EnableRTL( sal_False ); + EnableRTL( false ); if( pParent ) - pParent->EnableRTL( sal_False );// #i96215# necessary for a correct position of the context menu in rtl mode + pParent->EnableRTL( false );// #i96215# necessary for a correct position of the context menu in rtl mode } ChartWindow::~ChartWindow() diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx index b8ecbb2b83f4..53f233d7709a 100644 --- a/chart2/source/view/main/DummyXShape.cxx +++ b/chart2/source/view/main/DummyXShape.cxx @@ -1212,16 +1212,16 @@ bool DummyChart::initWindow() winData.nSize = sizeof(winData); OSL_TRACE("using VisualID %08X", vi->visualid); winData.pVisual = (void*)(vi->visual); - pWindow.reset(new SystemChildWindow(mpWindow.get(), 0, &winData, sal_False)); + pWindow.reset(new SystemChildWindow(mpWindow.get(), 0, &winData, false)); pChildSysData = pWindow->GetSystemData(); } if (!pWindow || !pChildSysData) return false; - pWindow->SetMouseTransparent( sal_True ); + pWindow->SetMouseTransparent( true ); pWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - pWindow->EnableEraseBackground( sal_False ); + pWindow->EnableEraseBackground( false ); pWindow->SetControlForeground(); pWindow->SetControlBackground(); diff --git a/cppcanvas/source/mtfrenderer/implrenderer.cxx b/cppcanvas/source/mtfrenderer/implrenderer.cxx index 1804074410ae..9f3635e02bae 100644 --- a/cppcanvas/source/mtfrenderer/implrenderer.cxx +++ b/cppcanvas/source/mtfrenderer/implrenderer.cxx @@ -1491,9 +1491,9 @@ namespace cppcanvas (sal_Int8)rFont.GetUnderline(); rState.textStrikeoutStyle = (sal_Int8)rFont.GetStrikeout(); rState.textEmphasisMarkStyle = (sal_Int8)rFont.GetEmphasisMark(); - rState.isTextEffectShadowSet = (rFont.IsShadow() != sal_False); - rState.isTextWordUnderlineSet = (rFont.IsWordLineMode() != sal_False); - rState.isTextOutlineModeSet = (rFont.IsOutline() != sal_False); + rState.isTextEffectShadowSet = rFont.IsShadow(); + rState.isTextWordUnderlineSet = rFont.IsWordLineMode(); + rState.isTextOutlineModeSet = rFont.IsOutline(); } break; @@ -2889,7 +2889,7 @@ namespace cppcanvas VectorOfOutDevStates aStateStack; VirtualDevice aVDev; - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); // Setup VDev for state tracking and mapping // ========================================= diff --git a/cppcanvas/source/mtfrenderer/mtftools.cxx b/cppcanvas/source/mtfrenderer/mtftools.cxx index f34487b56b6f..9f852937f774 100644 --- a/cppcanvas/source/mtfrenderer/mtftools.cxx +++ b/cppcanvas/source/mtfrenderer/mtftools.cxx @@ -239,7 +239,7 @@ namespace cppcanvas rVDev.GetFontMetric(); // will restore map mode below - const_cast< ::VirtualDevice& >(rVDev).EnableMapMode( sal_False ); + const_cast< ::VirtualDevice& >(rVDev).EnableMapMode( false ); const ::FontMetric aMetric = rVDev.GetFontMetric(); diff --git a/cppcanvas/source/mtfrenderer/textaction.cxx b/cppcanvas/source/mtfrenderer/textaction.cxx index b231c2129cf8..4cd4ab6dd30e 100644 --- a/cppcanvas/source/mtfrenderer/textaction.cxx +++ b/cppcanvas/source/mtfrenderer/textaction.cxx @@ -1967,7 +1967,7 @@ namespace cppcanvas static_cast<sal_uInt16>(nStartPos), static_cast<sal_uInt16>(nStartPos), static_cast<sal_uInt16>(nLen), - sal_True, 0, pDXArray ) ); + true, 0, pDXArray ) ); rVDev.SetFont(aOrigFont); if( !bHaveOutlines ) diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index ddef6003f4ed..dd768be7da09 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1580,7 +1580,7 @@ SvxConfigPage::SvxConfigPage( { aDescriptionField.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); aDescriptionField.SetAutoScroll( sal_True ); - aDescriptionField.EnableCursor( sal_False ); + aDescriptionField.EnableCursor( false ); aMoveUpButton.SetAccessibleRelationMemberOf(&aContentsSeparator); aMoveDownButton.SetAccessibleRelationMemberOf(&aContentsSeparator); @@ -1697,13 +1697,13 @@ void SvxConfigPage::Reset( const SfxItemSet& ) { if ( pDocData != NULL && pDocData->HasURL( m_aURLToSelect ) ) { - aSaveInListBox.SelectEntryPos( nPos, sal_True ); + aSaveInListBox.SelectEntryPos( nPos, true ); pCurrentSaveInData = pDocData; bURLToSelectFound = true; } else if ( pModuleData->HasURL( m_aURLToSelect ) ) { - aSaveInListBox.SelectEntryPos( 0, sal_True ); + aSaveInListBox.SelectEntryPos( 0, true ); pCurrentSaveInData = pModuleData; bURLToSelectFound = true; } @@ -1715,12 +1715,12 @@ void SvxConfigPage::Reset( const SfxItemSet& ) // it the SaveIn listbox, otherwise select the module data if ( pDocData != NULL && pDocData->HasSettings() ) { - aSaveInListBox.SelectEntryPos( nPos, sal_True ); + aSaveInListBox.SelectEntryPos( nPos, true ); pCurrentSaveInData = pDocData; } else { - aSaveInListBox.SelectEntryPos( 0, sal_True ); + aSaveInListBox.SelectEntryPos( 0, true ); pCurrentSaveInData = pModuleData; } } @@ -1960,7 +1960,7 @@ void SvxConfigPage::ReloadTopLevelListBox( SvxConfigEntry* pToSelect ) nSelectionPos = nSelectionPos < aTopLevelListBox.GetEntryCount() ? nSelectionPos : aTopLevelListBox.GetEntryCount() - 1; - aTopLevelListBox.SelectEntryPos( nSelectionPos, sal_True ); + aTopLevelListBox.SelectEntryPos( nSelectionPos, true ); aTopLevelListBox.GetSelectHdl().Call( this ); } @@ -2313,7 +2313,7 @@ void SvxMenuConfigPage::Init() ReloadTopLevelListBox(); - aTopLevelListBox.SelectEntryPos(0, sal_True); + aTopLevelListBox.SelectEntryPos(0, true); aTopLevelListBox.GetSelectHdl().Call(this); } @@ -2356,9 +2356,9 @@ void SvxMenuConfigPage::UpdateButtonStates() aMoveUpButton.Enable( false ); aMoveDownButton.Enable( false ); - pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); - pPopup->EnableItem( ID_RENAME, sal_False ); - pPopup->EnableItem( ID_DELETE, sal_False ); + pPopup->EnableItem( ID_BEGIN_GROUP, true ); + pPopup->EnableItem( ID_RENAME, false ); + pPopup->EnableItem( ID_DELETE, false ); aDescriptionField.Clear(); @@ -2376,17 +2376,17 @@ void SvxMenuConfigPage::UpdateButtonStates() if ( pEntryData->IsSeparator() ) { - pPopup->EnableItem( ID_DELETE, sal_True ); - pPopup->EnableItem( ID_BEGIN_GROUP, sal_False ); - pPopup->EnableItem( ID_RENAME, sal_False ); + pPopup->EnableItem( ID_DELETE, true ); + pPopup->EnableItem( ID_BEGIN_GROUP, false ); + pPopup->EnableItem( ID_RENAME, false ); aDescriptionField.Clear(); } else { - pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); - pPopup->EnableItem( ID_DELETE, sal_True ); - pPopup->EnableItem( ID_RENAME, sal_True ); + pPopup->EnableItem( ID_BEGIN_GROUP, true ); + pPopup->EnableItem( ID_DELETE, true ); + pPopup->EnableItem( ID_RENAME, true ); aDescriptionField.SetNewText( pEntryData->GetHelpText() ); } @@ -3086,11 +3086,11 @@ void SvxToolbarConfigPage::DeleteSelectedTopLevel() // subtract one from the entry count if ( nSelectionPos != aTopLevelListBox.GetEntryCount() - 1 ) { - aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, sal_True ); + aTopLevelListBox.SelectEntryPos( nSelectionPos + 1, true ); } else { - aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, sal_True ); + aTopLevelListBox.SelectEntryPos( nSelectionPos - 1, true ); } aTopLevelListBox.GetSelectHdl().Call( this ); @@ -3573,7 +3573,7 @@ void SvxToolbarConfigPage::Init() m_aURLToSelect += "standardbar"; } - aTopLevelListBox.SelectEntryPos(nPos, sal_True); + aTopLevelListBox.SelectEntryPos(nPos, true); aTopLevelListBox.GetSelectHdl().Call(this); } @@ -4404,15 +4404,15 @@ IMPL_LINK( SvxToolbarConfigPage, SelectToolbarEntry, Control *, pBox ) void SvxToolbarConfigPage::UpdateButtonStates() { PopupMenu* pPopup = aModifyCommandButton.GetPopupMenu(); - pPopup->EnableItem( ID_RENAME, sal_False ); - pPopup->EnableItem( ID_DELETE, sal_False ); - pPopup->EnableItem( ID_BEGIN_GROUP, sal_False ); - pPopup->EnableItem( ID_DEFAULT_COMMAND, sal_False ); - pPopup->EnableItem( ID_ICON_ONLY, sal_False ); - pPopup->EnableItem( ID_ICON_AND_TEXT, sal_False ); - pPopup->EnableItem( ID_TEXT_ONLY, sal_False ); - pPopup->EnableItem( ID_CHANGE_SYMBOL, sal_False ); - pPopup->EnableItem( ID_RESET_SYMBOL, sal_False ); + pPopup->EnableItem( ID_RENAME, false ); + pPopup->EnableItem( ID_DELETE, false ); + pPopup->EnableItem( ID_BEGIN_GROUP, false ); + pPopup->EnableItem( ID_DEFAULT_COMMAND, false ); + pPopup->EnableItem( ID_ICON_ONLY, false ); + pPopup->EnableItem( ID_ICON_AND_TEXT, false ); + pPopup->EnableItem( ID_TEXT_ONLY, false ); + pPopup->EnableItem( ID_CHANGE_SYMBOL, false ); + pPopup->EnableItem( ID_RESET_SYMBOL, false ); aDescriptionField.Clear(); @@ -4424,22 +4424,22 @@ void SvxToolbarConfigPage::UpdateButtonStates() SvxConfigEntry* pEntryData = (SvxConfigEntry*) selection->GetUserData(); if ( pEntryData->IsSeparator() ) - pPopup->EnableItem( ID_DELETE, sal_True ); + pPopup->EnableItem( ID_DELETE, true ); else { - pPopup->EnableItem( ID_BEGIN_GROUP, sal_True ); - pPopup->EnableItem( ID_DELETE, sal_True ); - pPopup->EnableItem( ID_RENAME, sal_True ); - pPopup->EnableItem( ID_ICON_ONLY, sal_True ); - pPopup->EnableItem( ID_ICON_AND_TEXT, sal_True ); - pPopup->EnableItem( ID_TEXT_ONLY, sal_True ); - pPopup->EnableItem( ID_CHANGE_SYMBOL, sal_True ); + pPopup->EnableItem( ID_BEGIN_GROUP, true ); + pPopup->EnableItem( ID_DELETE, true ); + pPopup->EnableItem( ID_RENAME, true ); + pPopup->EnableItem( ID_ICON_ONLY, true ); + pPopup->EnableItem( ID_ICON_AND_TEXT, true ); + pPopup->EnableItem( ID_TEXT_ONLY, true ); + pPopup->EnableItem( ID_CHANGE_SYMBOL, true ); if ( !pEntryData->IsUserDefined() ) - pPopup->EnableItem( ID_DEFAULT_COMMAND, sal_True ); + pPopup->EnableItem( ID_DEFAULT_COMMAND, true ); if ( pEntryData->IsIconModified() ) - pPopup->EnableItem( ID_RESET_SYMBOL, sal_True ); + pPopup->EnableItem( ID_RESET_SYMBOL, true ); aDescriptionField.SetNewText( pEntryData->GetHelpText() ); } @@ -4560,7 +4560,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) } pNameDialog->m_pSaveInListBox->SelectEntryPos( - aSaveInListBox.GetSelectEntryPos(), sal_True ); + aSaveInListBox.GetSelectEntryPos(), true ); if ( pNameDialog->Execute() == RET_OK ) { @@ -4573,7 +4573,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) if ( GetSaveInData() != pData ) { - aSaveInListBox.SelectEntryPos( nInsertPos, sal_True ); + aSaveInListBox.SelectEntryPos( nInsertPos, true ); aSaveInListBox.GetSelectHdl().Call(this); } @@ -4587,7 +4587,7 @@ IMPL_LINK( SvxToolbarConfigPage, NewToolbarHdl, Button *, pButton ) nInsertPos = aTopLevelListBox.InsertEntry( pToolbar->GetName() ); aTopLevelListBox.SetEntryData( nInsertPos, pToolbar ); - aTopLevelListBox.SelectEntryPos( nInsertPos, sal_True ); + aTopLevelListBox.SelectEntryPos( nInsertPos, true ); aTopLevelListBox.GetSelectHdl().Call(this); pData->SetModified( true ); @@ -4905,7 +4905,7 @@ SvxIconSelectorDialog::SvxIconSelectorDialog( Window *pWindow, OUStringHash, ::std::equal_to< OUString > > ImageInfo; - aTbSymbol.SetPageScroll( sal_True ); + aTbSymbol.SetPageScroll( true ); bool bLargeIcons = GetImageType() & css::ui::ImageType::SIZE_LARGE; m_nExpectedSize = bLargeIcons ? 26 : 16; @@ -5112,7 +5112,7 @@ IMPL_LINK( SvxIconSelectorDialog, SelectHdl, ToolBox *, pToolBox ) if ( aTbSymbol.IsItemChecked( nId ) ) { - aTbSymbol.CheckItem( nId, sal_False ); + aTbSymbol.CheckItem( nId, false ); } } @@ -5519,7 +5519,7 @@ SvxIconChangeDialog::SvxIconChangeDialog( aFImageInfo.SetImage(InfoBox::GetStandardImage()); aLineEditDescription.SetControlBackground( GetSettings().GetStyleSettings().GetDialogColor() ); aLineEditDescription.SetAutoScroll( sal_True ); - aLineEditDescription.EnableCursor( sal_False ); + aLineEditDescription.EnableCursor( false ); aLineEditDescription.SetText(aMessage); } diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx index dd61fc2e7884..397a493bfe1e 100644 --- a/cui/source/customize/eventdlg.cxx +++ b/cui/source/customize/eventdlg.cxx @@ -91,7 +91,7 @@ SvxEventConfigPage::SvxEventConfigPage( Window *pParent, const SfxItemSet& rSet, nPos = aSaveInListBox.InsertEntry( utl::ConfigManager::getProductName() ); aSaveInListBox.SetEntryData( nPos, new bool(true) ); - aSaveInListBox.SelectEntryPos( nPos, sal_True ); + aSaveInListBox.SelectEntryPos( nPos, true ); } // ----------------------------------------------------------------------- @@ -163,7 +163,7 @@ void SvxEventConfigPage::ImplInitDocument() sal_uInt16 nPos = aSaveInListBox.InsertEntry( aTitle ); aSaveInListBox.SetEntryData( nPos, new bool(false) ); - aSaveInListBox.SelectEntryPos( nPos, sal_True ); + aSaveInListBox.SelectEntryPos( nPos, true ); bAppConfig = false; } @@ -183,7 +183,7 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox ) bool* bApp = (bool*) aSaveInListBox.GetEntryData( aSaveInListBox.GetSelectEntryPos()); - mpImpl->pEventLB->SetUpdateMode( sal_False ); + mpImpl->pEventLB->SetUpdateMode( false ); bAppConfig = *bApp; if ( *bApp ) { @@ -217,7 +217,7 @@ IMPL_LINK( SvxEventConfigPage, SelectHdl_Impl, ListBox *, pBox ) _SvxMacroTabPage::DisplayAppEvents( false ); } - mpImpl->pEventLB->SetUpdateMode( sal_True ); + mpImpl->pEventLB->SetUpdateMode( true ); return sal_True; } diff --git a/cui/source/customize/macropg.cxx b/cui/source/customize/macropg.cxx index e81980986e99..e3fcb2b1ca64 100644 --- a/cui/source/customize/macropg.cxx +++ b/cui/source/customize/macropg.cxx @@ -511,7 +511,7 @@ void _SvxMacroTabPage::DisplayAppEvents( bool appEvents) bAppEvents = appEvents; SvHeaderTabListBox& rListBox = mpImpl->pEventLB->GetListBox(); - mpImpl->pEventLB->SetUpdateMode( sal_False ); + mpImpl->pEventLB->SetUpdateMode( false ); rListBox.Clear(); EventsHash* eventsHash; Reference< container::XNameReplace> nameReplace; @@ -711,7 +711,7 @@ long _SvxMacroTabPage::GenericHandler_Impl( _SvxMacroTabPage* pThis, PushButton* } // update the listbox entry - pImpl->pEventLB->SetUpdateMode( sal_False ); + pImpl->pEventLB->SetUpdateMode( false ); pE->ReplaceItem( new IconLBoxString( pE, 0, sEventURL, &pImpl->aMacroImg, &pImpl->aComponentImg ), LB_MACROS_ITEMPOS ); diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx index 1b984c5d23f3..c28f120ef5de 100644 --- a/cui/source/dialogs/SpellDialog.cxx +++ b/cui/source/dialogs/SpellDialog.cxx @@ -422,7 +422,7 @@ void SpellDialog::SpellContinue_Impl(bool bUseSavedSentence, bool bIgnoreCurrent */ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) { - pThis->SetUpdateMode( sal_False ); + pThis->SetUpdateMode( false ); //show or hide AutoCorrect depending on the modules abilities pThis->m_pAutoCorrPB->Show(pThis->rParent.HasAutoCorrection()); pThis->SpellContinue_Impl(); @@ -445,7 +445,7 @@ IMPL_STATIC_LINK( SpellDialog, InitHdl, SpellDialog *, EMPTYARG ) pThis->LockFocusChanges(false); //show grammar CheckBox depending on the modules abilities pThis->m_pCheckGrammarCB->Check( pThis->rParent.IsGrammarChecking() ); - pThis->SetUpdateMode( sal_True ); + pThis->SetUpdateMode( true ); pThis->Show(); return 0; }; @@ -742,12 +742,12 @@ IMPL_LINK_NOARG(SpellDialog, IgnoreHdl) // ----------------------------------------------------------------------- -sal_Bool SpellDialog::Close() +bool SpellDialog::Close() { GetBindings().GetDispatcher()-> Execute(rParent.GetType(), SFX_CALLMODE_ASYNCHRON|SFX_CALLMODE_RECORD); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1641,8 +1641,8 @@ bool SentenceEditWindow_Impl::MarkNextError( bool bIgnoreCurrentError, com::sun: void SentenceEditWindow_Impl::MoveErrorMarkTo(sal_uInt16 nStart, sal_uInt16 nEnd, bool bGrammarError) { TextEngine* pTextEngine = GetTextEngine(); - pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, sal_True ); - pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, sal_True ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, true ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, true ); pTextEngine->SetAttrib( TextAttribFontWeight(WEIGHT_BOLD), 0, nStart, nEnd ); pTextEngine->SetAttrib( TextAttribFontColor(bGrammarError ? COL_LIGHTBLUE : COL_LIGHTRED), 0, nStart, nEnd ); m_nErrorStart = nStart; @@ -1695,7 +1695,7 @@ void SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Languag pTextEngine->SetAttrib(*pNewBackground, 0, nStart, m_nErrorStart); delete pNewBackground; } - pTextEngine->SetModified(sal_True); + pTextEngine->SetModified(true); //adjust end position long nEndTemp = m_nErrorEnd; @@ -2012,8 +2012,8 @@ void SentenceEditWindow_Impl::SetUndoEditMode(bool bSet) //remove error marks TextEngine* pTextEngine = GetTextEngine(); - pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, sal_True ); - pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, sal_True ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTCOLOR, true ); + pTextEngine->RemoveAttribs( 0, (sal_uInt16)TEXTATTR_FONTWEIGHT, true ); //put the appropriate action on the Undo-stack SpellUndoAction_Impl* pAction = new SpellUndoAction_Impl( diff --git a/cui/source/dialogs/about.cxx b/cui/source/dialogs/about.cxx index e4bdbb540a98..f045590f0629 100644 --- a/cui/source/dialogs/about.cxx +++ b/cui/source/dialogs/about.cxx @@ -275,10 +275,10 @@ OUString AboutDialog::GetCopyrightString() return aCopyrightString; } -sal_Bool AboutDialog::Close() +bool AboutDialog::Close() { EndDialog( RET_OK ); - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index 952bf399c5c4..7c647f39d3b8 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -274,7 +274,7 @@ void SvxShowText::SetFont( const Font& rFont ) aFont.SetWeight( WEIGHT_NORMAL ); aFont.SetAlign( ALIGN_TOP ); aFont.SetSize( PixelToLogic( Size( 0, nWinHeight/2 ) ) ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); Control::SetFont( aFont ); mnY = ( nWinHeight - GetTextHeight() ) / 2; @@ -313,7 +313,7 @@ SvxShowText::~SvxShowText() void SvxCharacterMap::init() { aFont = GetFont(); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aFont.SetFamily( FAMILY_DONTKNOW ); aFont.SetPitch( PITCH_DONTKNOW ); aFont.SetCharSet( RTL_TEXTENCODING_DONTKNOW ); diff --git a/cui/source/dialogs/cuifmsearch.cxx b/cui/source/dialogs/cuifmsearch.cxx index 5893b9f68725..23e362a8507f 100644 --- a/cui/source/dialogs/cuifmsearch.cxx +++ b/cui/source/dialogs/cuifmsearch.cxx @@ -238,7 +238,7 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni m_lbField.SetSelectHdl(LINK(this, FmSearchDialog, OnFieldSelected)); m_cmbSearchText.SetModifyHdl(LINK(this, FmSearchDialog, OnSearchTextModified)); - m_cmbSearchText.EnableAutocomplete(sal_False); + m_cmbSearchText.EnableAutocomplete(false); m_cmbSearchText.SetGetFocusHdl(LINK(this, FmSearchDialog, OnFocusGrabbed)); m_cbUseFormat.SetToggleHdl(LINK(this, FmSearchDialog, OnCheckBoxToggled)); @@ -291,14 +291,14 @@ void FmSearchDialog::Init(const OUString& strVisibleFields, const OUString& sIni FreeResource(); } -sal_Bool FmSearchDialog::Close() +bool FmSearchDialog::Close() { // If the close button is disabled and ESC is pressed in a dialog, // then Frame will call Close anyway, which I don't want to happen // while I'm in the middle of a search (maybe one that's running // in its own thread) if (!m_pbClose.IsEnabled()) - return sal_False; + return false; return ModalDialog::Close(); } @@ -343,7 +343,7 @@ IMPL_LINK_NOARG(FmSearchDialog, OnClickedSearchAgain) if (m_cbStartOver.IsChecked()) { - m_cbStartOver.Check(sal_False); + m_cbStartOver.Check(false); EnableSearchUI(sal_False); if (m_rbSearchForText.IsChecked()) m_pSearchEngine->StartOver(strThisRoundText); @@ -815,15 +815,15 @@ void FmSearchDialog::LoadParams() // all fields/single field (AFTER selcting the field because OnClickedFieldRadios expects a valid value there) if (aParams.bAllFields) { - m_rbSingleField.Check(sal_False); - m_rbAllFields.Check(sal_True); + m_rbSingleField.Check(false); + m_rbAllFields.Check(true); LINK(this, FmSearchDialog, OnClickedFieldRadios).Call(&m_rbAllFields); // OnClickedFieldRadios also calls to RebuildUsedFields } else { - m_rbAllFields.Check(sal_False); - m_rbSingleField.Check(sal_True); + m_rbAllFields.Check(false); + m_rbSingleField.Check(true); LINK(this, FmSearchDialog, OnClickedFieldRadios).Call(&m_rbSingleField); } @@ -843,9 +843,9 @@ void FmSearchDialog::LoadParams() LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(&m_aHalfFullFormsCJK); LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(&m_aSoundsLikeCJK); - m_cbWildCard.Check(sal_False); - m_cbRegular.Check(sal_False); - m_cbApprox.Check(sal_False); + m_cbWildCard.Check(false); + m_cbRegular.Check(false); + m_cbApprox.Check(false); LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(&m_cbWildCard); LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(&m_cbRegular); LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(&m_cbApprox); @@ -861,7 +861,7 @@ void FmSearchDialog::LoadParams() pToCheck = &m_aSoundsLikeCJK; if (pToCheck) { - pToCheck->Check(sal_True); + pToCheck->Check(true); LINK(this, FmSearchDialog, OnCheckBoxToggled).Call(pToCheck); } @@ -873,14 +873,14 @@ void FmSearchDialog::LoadParams() m_pSearchEngine->SetTransliterationFlags( aParams.getTransliterationFlags( ) ); - m_rbSearchForText.Check(sal_False); - m_rbSearchForNull.Check(sal_False); - m_rbSearchForNotNull.Check(sal_False); + m_rbSearchForText.Check(false); + m_rbSearchForNull.Check(false); + m_rbSearchForNotNull.Check(false); switch (aParams.nSearchForType) { - case 1: m_rbSearchForNull.Check(sal_True); break; - case 2: m_rbSearchForNotNull.Check(sal_True); break; - default: m_rbSearchForText.Check(sal_True); break; + case 1: m_rbSearchForNull.Check(true); break; + case 2: m_rbSearchForNotNull.Check(true); break; + default: m_rbSearchForText.Check(true); break; } LINK(this, FmSearchDialog, OnClickedFieldRadios).Call(&m_rbSearchForText); } diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx index bff5ad288e55..dcd508d4f82d 100644 --- a/cui/source/dialogs/cuigaldlg.cxx +++ b/cui/source/dialogs/cuigaldlg.cxx @@ -379,7 +379,7 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) sal_uInt32 i, nCount; GetParent()->EnterWait(); - mpBrowser->aLbxFound.SetUpdateMode( sal_False ); + mpBrowser->aLbxFound.SetUpdateMode( false ); mpBrowser->aLbxFound.SetNoSelection(); // mark all taken positions in aRemoveEntries @@ -411,7 +411,7 @@ IMPL_LINK_NOARG(TakeProgress, CleanUpHdl) aRemainingVector.clear(); - mpBrowser->aLbxFound.SetUpdateMode( sal_True ); + mpBrowser->aLbxFound.SetUpdateMode( true ); mpBrowser->SelectFoundHdl( NULL ); GetParent()->LeaveWait(); @@ -768,7 +768,7 @@ void TPGalleryThemeProperties::SetXChgData( ExchangeData* _pData ) aBtnTakeAll.SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickTakeAllHdl)); aCbxPreview.SetClickHdl(LINK(this, TPGalleryThemeProperties, ClickPreviewHdl)); aCbbFileType.SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFileTypeHdl)); - aCbbFileType.EnableDDAutoWidth( sal_False ); + aCbbFileType.EnableDDAutoWidth( false ); aLbxFound.SetDoubleClickHdl(LINK(this, TPGalleryThemeProperties, DClickFoundHdl)); aLbxFound.SetSelectHdl(LINK(this, TPGalleryThemeProperties, SelectFoundHdl)); aLbxFound.InsertEntry(OUString(CUI_RES(RID_SVXSTR_GALLERY_NOFILES))); diff --git a/cui/source/dialogs/cuihyperdlg.cxx b/cui/source/dialogs/cuihyperdlg.cxx index de58b79976d7..0f1efdaf8b50 100644 --- a/cui/source/dialogs/cuihyperdlg.cxx +++ b/cui/source/dialogs/cuihyperdlg.cxx @@ -150,12 +150,12 @@ SvxHpLinkDlg::~SvxHpLinkDlg () |* |************************************************************************/ -sal_Bool SvxHpLinkDlg::Close() +bool SvxHpLinkDlg::Close() { GetDispatcher()->Execute( SID_HYPERLINK_DIALOG, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); - return sal_True; + return true; } /************************************************************************* diff --git a/cui/source/dialogs/cuitbxform.cxx b/cui/source/dialogs/cuitbxform.cxx index 3c1f7cfd6bf9..3a9f696a1316 100644 --- a/cui/source/dialogs/cuitbxform.cxx +++ b/cui/source/dialogs/cuitbxform.cxx @@ -38,7 +38,7 @@ FmInputRecordNoDialog::FmInputRecordNoDialog(Window * pParent) m_pRecordNo->SetMin(1); m_pRecordNo->SetMax(0x7FFFFFFF); - m_pRecordNo->SetStrictFormat(sal_True); + m_pRecordNo->SetStrictFormat(true); m_pRecordNo->SetDecimalDigits(0); } diff --git a/cui/source/dialogs/hangulhanjadlg.cxx b/cui/source/dialogs/hangulhanjadlg.cxx index e8e019b6bf07..ededbf44c363 100644 --- a/cui/source/dialogs/hangulhanjadlg.cxx +++ b/cui/source/dialogs/hangulhanjadlg.cxx @@ -731,7 +731,7 @@ namespace svx { sal_Bool bBoxChecked = pBox->IsChecked(); if (bBoxChecked) - pOtherBox->Check( sal_False ); + pOtherBox->Check( false ); pOtherBox->Enable( !bBoxChecked ); } @@ -830,7 +830,7 @@ namespace svx //------------------------------------------------------------------------- void HangulHanjaConversionDialog::SetByCharacter( bool _bByCharacter ) { - m_aReplaceByChar.Check( static_cast<sal_Bool>(_bByCharacter) ); + m_aReplaceByChar.Check( _bByCharacter ); m_aSuggestions.DisplayListBox( !_bByCharacter ); } @@ -840,16 +840,16 @@ namespace svx HHC::ConversionDirection _ePrimaryConversionDirection ) { // default state: try both direction - m_aHangulOnly.Check( sal_False ); + m_aHangulOnly.Check( false ); m_aHangulOnly.Enable( true ); - m_aHanjaOnly.Check( sal_False ); + m_aHanjaOnly.Check( false ); m_aHanjaOnly.Enable( true ); if (!_bTryBothDirections) { CheckBox *pBox = _ePrimaryConversionDirection == HHC::eHangulToHanja? &m_aHangulOnly : &m_aHanjaOnly; - pBox->Check( sal_True ); + pBox->Check( true ); OnConversionDirectionClicked( pBox ); } } diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx index c9a377d144c3..10850f2d52fd 100644 --- a/cui/source/dialogs/hldocntp.cxx +++ b/cui/source/dialogs/hldocntp.cxx @@ -111,7 +111,7 @@ SvxHyperlinkNewDocTp::SvxHyperlinkNewDocTp ( Window *pParent, const SfxItemSet& maLbDocTypes ( this, CUI_RES (LB_DOCUMENT_TYPES) ) { // Set HC bitmaps and disable display of bitmap names. - maBtCreate.EnableTextDisplay (sal_False); + maBtCreate.EnableTextDisplay (false); InitStdControls(); FreeResource(); diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx index 865b0e54239d..c216d25064c3 100644 --- a/cui/source/dialogs/hldoctp.cxx +++ b/cui/source/dialogs/hldoctp.cxx @@ -50,8 +50,8 @@ SvxHyperlinkDocTp::SvxHyperlinkDocTp ( Window *pParent, const SfxItemSet& rItemS mbMarkWndOpen ( sal_False ) { // Disable display of bitmap names. - maBtBrowse.EnableTextDisplay (sal_False); - maBtFileopen.EnableTextDisplay (sal_False); + maBtBrowse.EnableTextDisplay (false); + maBtFileopen.EnableTextDisplay (false); InitStdControls(); FreeResource(); diff --git a/cui/source/dialogs/hlinettp.cxx b/cui/source/dialogs/hlinettp.cxx index 35cf1ca3b069..379ba03a15db 100644 --- a/cui/source/dialogs/hlinettp.cxx +++ b/cui/source/dialogs/hlinettp.cxx @@ -53,7 +53,7 @@ SvxHyperlinkInternetTp::SvxHyperlinkInternetTp ( Window *pParent, mbMarkWndOpen ( sal_False ) { // Disable display of bitmap names. - maBtBrowse.EnableTextDisplay (sal_False); + maBtBrowse.EnableTextDisplay (false); InitStdControls(); FreeResource(); @@ -154,7 +154,7 @@ void SvxHyperlinkInternetTp::setFTPUser(const OUString& rUser, const OUString& r maFtPassword.Enable (); maEdLogin.Enable (); maEdPassword.Enable (); - maCbAnonymous.Check(sal_False); + maCbAnonymous.Check(false); } /************************************************************************* diff --git a/cui/source/dialogs/hlmailtp.cxx b/cui/source/dialogs/hlmailtp.cxx index 10ecdb06ec3d..08b2df329eda 100644 --- a/cui/source/dialogs/hlmailtp.cxx +++ b/cui/source/dialogs/hlmailtp.cxx @@ -52,7 +52,7 @@ SvxHyperlinkMailTp::SvxHyperlinkMailTp ( Window *pParent, const SfxItemSet& rIte maEdSubject ( this, CUI_RES (ED_SUBJECT) ) { // Disable display of bitmap names. - maBtAdrBook.EnableTextDisplay (sal_False); + maBtAdrBook.EnableTextDisplay (false); InitStdControls(); FreeResource(); diff --git a/cui/source/dialogs/hltpbase.cxx b/cui/source/dialogs/hltpbase.cxx index 198289f8c91c..12a45caf8f86 100644 --- a/cui/source/dialogs/hltpbase.cxx +++ b/cui/source/dialogs/hltpbase.cxx @@ -190,7 +190,7 @@ void SvxHyperlinkTabPageBase::InitStdControls () mpBtScript = new ImageButton ( this, ResId (BTN_SCRIPT, *m_pResMgr) ); mpBtScript->SetClickHdl ( LINK ( this, SvxHyperlinkTabPageBase, ClickScriptHdl_Impl ) ); - mpBtScript->EnableTextDisplay (sal_False); + mpBtScript->EnableTextDisplay (false); mpBtScript->SetAccessibleRelationMemberOf( mpGrpMore ); mpBtScript->SetAccessibleRelationLabeledBy( mpFtForm ); diff --git a/cui/source/dialogs/iconcdlg.cxx b/cui/source/dialogs/iconcdlg.cxx index 2e8b4462ef56..9b812960cfbe 100644 --- a/cui/source/dialogs/iconcdlg.cxx +++ b/cui/source/dialogs/iconcdlg.cxx @@ -134,16 +134,16 @@ void IconChoicePage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx index 458f310ff926..98df52dadfde 100644 --- a/cui/source/dialogs/insdlg.cxx +++ b/cui/source/dialogs/insdlg.cxx @@ -187,7 +187,7 @@ SvInsertOleDlg::SvInsertOleDlg Link aLink( LINK( this, SvInsertOleDlg, RadioHdl ) ); m_pRbNewObject->SetClickHdl( aLink ); m_pRbObjectFromfile->SetClickHdl( aLink ); - m_pRbNewObject->Check( sal_True ); + m_pRbNewObject->Check( true ); RadioHdl( NULL ); } @@ -204,10 +204,10 @@ short SvInsertOleDlg::Execute() // fill listbox and select default ListBox& rBox = GetObjectTypes(); - rBox.SetUpdateMode( sal_False ); + rBox.SetUpdateMode( false ); for ( sal_uLong i = 0; i < m_pServers->Count(); i++ ) rBox.InsertEntry( (*m_pServers)[i].GetHumanName() ); - rBox.SetUpdateMode( sal_True ); + rBox.SetUpdateMode( true ); SelectDefault(); OUString aName; @@ -546,7 +546,7 @@ short SfxInsertFloatingFrameDialog::Execute() if ( nSize == SIZE_NOT_SET ) { - m_pCBMarginWidthDefault->Check( sal_True ); + m_pCBMarginWidthDefault->Check( true ); m_pNMMarginWidth->SetText( OUString::number(DEFAULT_MARGIN_WIDTH) ); m_pFTMarginWidth->Enable( false ); m_pNMMarginWidth->Enable( false ); @@ -559,7 +559,7 @@ short SfxInsertFloatingFrameDialog::Execute() if ( nSize == SIZE_NOT_SET ) { - m_pCBMarginHeightDefault->Check( sal_True ); + m_pCBMarginHeightDefault->Check( true ); m_pNMMarginHeight->SetText( OUString::number(DEFAULT_MARGIN_HEIGHT) ); m_pFTMarginHeight->Enable( false ); m_pNMMarginHeight->Enable( false ); @@ -599,7 +599,7 @@ short SfxInsertFloatingFrameDialog::Execute() m_pRBFrameBorderOff->Check( !bSet ); } - SetUpdateMode( sal_True ); + SetUpdateMode( true ); bOK = sal_True; } catch ( uno::Exception& ) diff --git a/cui/source/dialogs/pastedlg.cxx b/cui/source/dialogs/pastedlg.cxx index 0e3886bc0b6e..0530383c38cb 100644 --- a/cui/source/dialogs/pastedlg.cxx +++ b/cui/source/dialogs/pastedlg.cxx @@ -107,7 +107,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, sal_uLong nSelFormat = 0; SvGlobalName aEmptyNm; - ObjectLB().SetUpdateMode( sal_False ); + ObjectLB().SetUpdateMode( false ); DataFlavorExVector::iterator aIter( ((DataFlavorExVector&)*pFormats).begin() ), aEnd( ((DataFlavorExVector&)*pFormats).end() ); @@ -183,7 +183,7 @@ sal_uLong SvPasteObjectDialog::GetFormat( const TransferableDataHelper& rHelper, } } - ObjectLB().SetUpdateMode( sal_True ); + ObjectLB().SetUpdateMode( true ); SelectObject(); if( !aSourceName.isEmpty() ) diff --git a/cui/source/dialogs/thesdlg.cxx b/cui/source/dialogs/thesdlg.cxx index 354eec47add1..36833f4a1bb4 100644 --- a/cui/source/dialogs/thesdlg.cxx +++ b/cui/source/dialogs/thesdlg.cxx @@ -64,7 +64,7 @@ LookUpComboBox::LookUpComboBox(Window *pParent) m_aModifyTimer.SetTimeoutHdl( LINK( this, LookUpComboBox, ModifyTimer_Hdl ) ); m_aModifyTimer.SetTimeout( 500 ); - EnableAutocomplete( sal_False ); + EnableAutocomplete( false ); } extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeLookUpComboBox(Window *pParent, VclBuilder::stringmap &) diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx index fc3645202f6d..019e43c0b46b 100644 --- a/cui/source/dialogs/zoom.cxx +++ b/cui/source/dialogs/zoom.cxx @@ -362,7 +362,7 @@ IMPL_LINK( SvxZoomDialog, ViewLayoutSpinHdl, NumericField *, pEdt ) m_pBookModeChk->Enable(); else { - m_pBookModeChk->Check( sal_False ); + m_pBookModeChk->Check( false ); m_pBookModeChk->Disable(); } diff --git a/cui/source/inc/SpellDialog.hxx b/cui/source/inc/SpellDialog.hxx index 2284176717da..fc65d37d9cc7 100644 --- a/cui/source/inc/SpellDialog.hxx +++ b/cui/source/inc/SpellDialog.hxx @@ -95,7 +95,7 @@ public: const SpellErrorDescription* GetAlternatives(); - void ResetModified() { GetTextEngine()->SetModified(sal_False); m_bIsUndoEditMode = false;} + void ResetModified() { GetTextEngine()->SetModified(false); m_bIsUndoEditMode = false;} virtual bool IsModified() const SAL_OVERRIDE { return GetTextEngine()->IsModified(); } bool IsUndoEditMode() const { return m_bIsUndoEditMode;} @@ -222,7 +222,7 @@ public: ~SpellDialog(); void SetLanguage( sal_uInt16 nLang ); - virtual sal_Bool Close(); + virtual bool Close(); void InvalidateDialog(); }; diff --git a/cui/source/inc/about.hxx b/cui/source/inc/about.hxx index a48d325a25f7..59f4d3618506 100644 --- a/cui/source/inc/about.hxx +++ b/cui/source/inc/about.hxx @@ -59,7 +59,7 @@ private: OUString GetCopyrightString(); protected: - virtual sal_Bool Close(); + virtual bool Close(); virtual void Paint( const Rectangle& rRect ); virtual void Resize(); diff --git a/cui/source/inc/cuifmsearch.hxx b/cui/source/inc/cuifmsearch.hxx index f2cc52e9db3e..4688403c92db 100644 --- a/cui/source/inc/cuifmsearch.hxx +++ b/cui/source/inc/cuifmsearch.hxx @@ -137,7 +137,7 @@ public: inline void SetActiveField(const OUString& strField); protected: - virtual sal_Bool Close(); + virtual bool Close(); void Init(const OUString& strVisibleFields, const OUString& strInitialText); // only to be used out of the constructors diff --git a/cui/source/inc/cuihyperdlg.hxx b/cui/source/inc/cuihyperdlg.hxx index a116b63ff7d5..ecc351a297b6 100644 --- a/cui/source/inc/cuihyperdlg.hxx +++ b/cui/source/inc/cuihyperdlg.hxx @@ -72,7 +72,7 @@ private: DECL_LINK (ClickCloseHdl_Impl, void * ); protected: - virtual sal_Bool Close(); + virtual bool Close(); virtual void Move(); public: diff --git a/cui/source/options/optasian.cxx b/cui/source/options/optasian.cxx index 4e3769423ea8..db9ac45911ef 100644 --- a/cui/source/options/optasian.cxx +++ b/cui/source/options/optasian.cxx @@ -265,9 +265,9 @@ void SvxAsianLayoutPage::Reset( const SfxItemSet& ) m_pHintFT->Enable(false); } if(bKernWesternText) - m_pCharKerningRB->Check(sal_True); + m_pCharKerningRB->Check(true); else - m_pCharPunctKerningRB->Check(sal_True); + m_pCharPunctKerningRB->Check(true); switch(nCompress) { case 0 : m_pNoCompressionRB->Check(); break; diff --git a/cui/source/options/optctl.cxx b/cui/source/options/optctl.cxx index 2ad83c561f13..7223e3972663 100644 --- a/cui/source/options/optctl.cxx +++ b/cui/source/options/optctl.cxx @@ -32,8 +32,8 @@ IMPL_LINK_NOARG(SvxCTLOptionsPage, SequenceCheckingCB_Hdl) // #i48117#: by default restricted and type&replace have to be switched on if(bIsSequenceChecking) { - m_pTypeReplaceCB->Check( sal_True ); - m_pRestrictedCB->Check( sal_True ); + m_pTypeReplaceCB->Check( true ); + m_pRestrictedCB->Check( true ); } return 0; } @@ -92,8 +92,8 @@ sal_Bool SvxCTLOptionsPage::FillItemSet( SfxItemSet& ) bModified = sal_True; } - sal_Bool bLogicalChecked = m_pMovementLogicalRB->IsChecked(); - sal_Bool bVisualChecked = m_pMovementVisualRB->IsChecked(); + bool bLogicalChecked = m_pMovementLogicalRB->IsChecked(); + bool bVisualChecked = m_pMovementVisualRB->IsChecked(); if ( bLogicalChecked != m_pMovementLogicalRB->GetSavedValue() || bVisualChecked != m_pMovementVisualRB->GetSavedValue() ) { diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx index e2544a61f11a..d8b456dfb128 100644 --- a/cui/source/options/optgdlg.cxx +++ b/cui/source/options/optgdlg.cxx @@ -1582,7 +1582,7 @@ void OfaLanguagesTabPage::Reset( const SfxItemSet& rSet ) { m_pWesternLanguageLB->GrabFocus(); m_pCurrentDocCB->Enable(true); - m_pCurrentDocCB->Check(sal_True); + m_pCurrentDocCB->Check(true); } } @@ -1618,7 +1618,7 @@ namespace void lcl_checkLanguageCheckBox(CheckBox* _rCB,sal_Bool _bNewValue,sal_Bool _bOldValue) { if ( _bNewValue ) - _rCB->Check(sal_True); + _rCB->Check(true); else _rCB->Check( _bOldValue ); // #i15082# do not call SaveValue() in running dialog... diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx index fe2d6b0423bb..31c37eb39783 100644 --- a/cui/source/options/optinet2.cxx +++ b/cui/source/options/optinet2.cxx @@ -648,7 +648,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) if ( xMasterPasswd->changeMasterPassword( Reference< task::XInteractionHandler >() ) ) { m_pMasterPasswordPB->Enable( true ); - m_pMasterPasswordCB->Check( sal_True ); + m_pMasterPasswordCB->Check( true ); m_pMasterPasswordCB->Enable( true ); m_pMasterPasswordFT->Enable( true ); m_pShowConnectionsPB->Enable( true ); @@ -656,7 +656,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) else { xMasterPasswd->allowPersistentStoring( bOldValue ); - m_pSavePasswordsCB->Check( sal_False ); + m_pSavePasswordsCB->Check( false ); } } else @@ -667,7 +667,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) if( RET_YES == nRet ) { xMasterPasswd->allowPersistentStoring( sal_False ); - m_pMasterPasswordCB->Check( sal_True ); + m_pMasterPasswordCB->Check( true ); m_pMasterPasswordPB->Enable( false ); m_pMasterPasswordCB->Enable( false ); m_pMasterPasswordFT->Enable( false ); @@ -675,7 +675,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, SavePasswordHdl) } else { - m_pSavePasswordsCB->Check( sal_True ); + m_pSavePasswordsCB->Check( true ); m_pMasterPasswordPB->Enable( true ); m_pShowConnectionsPB->Enable( true ); } @@ -721,7 +721,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordCBHdl) } else { - m_pMasterPasswordCB->Check( sal_False ); + m_pMasterPasswordCB->Check( false ); m_pMasterPasswordPB->Enable( true ); m_pMasterPasswordFT->Enable( true ); } @@ -735,7 +735,7 @@ IMPL_LINK_NOARG(SvxSecurityTabPage, MasterPasswordCBHdl) } else { - m_pMasterPasswordCB->Check( sal_True ); + m_pMasterPasswordCB->Check( true ); m_pMasterPasswordPB->Enable( true ); m_pShowConnectionsPB->Enable( true ); } @@ -823,7 +823,7 @@ void SvxSecurityTabPage::InitControls() m_pMasterPasswordPB->Enable( false ); m_pMasterPasswordCB->Enable( false ); - m_pMasterPasswordCB->Check( sal_True ); + m_pMasterPasswordCB->Check( true ); m_pMasterPasswordFT->Enable( false ); m_pShowConnectionsPB->Enable( false ); @@ -837,14 +837,14 @@ void SvxSecurityTabPage::InitControls() { m_pMasterPasswordCB->Enable( true ); m_pShowConnectionsPB->Enable( true ); - m_pSavePasswordsCB->Check( sal_True ); + m_pSavePasswordsCB->Check( true ); if ( xMasterPasswd->isDefaultMasterPasswordUsed() ) - m_pMasterPasswordCB->Check( sal_False ); + m_pMasterPasswordCB->Check( false ); else { m_pMasterPasswordPB->Enable( true ); - m_pMasterPasswordCB->Check( sal_True ); + m_pMasterPasswordCB->Check( true ); m_pMasterPasswordFT->Enable( true ); } } diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx index a697b9f39cb9..01a14d330f5c 100644 --- a/cui/source/options/optupdt.cxx +++ b/cui/source/options/optupdt.cxx @@ -172,19 +172,19 @@ sal_Bool SvxOnlineUpdateTabPage::FillItemSet( SfxItemSet& ) } nValue = 0; - if( sal_True == m_pEveryDayButton->IsChecked() ) + if( m_pEveryDayButton->IsChecked() ) { - if( sal_False == m_pEveryDayButton->GetSavedValue() ) + if( !m_pEveryDayButton->GetSavedValue() ) nValue = 86400; } - else if( sal_True == m_pEveryWeekButton->IsChecked() ) + else if( m_pEveryWeekButton->IsChecked() ) { - if( sal_False == m_pEveryWeekButton->GetSavedValue() ) + if( !m_pEveryWeekButton->GetSavedValue() ) nValue = 604800; } - else if( sal_True == m_pEveryMonthButton->IsChecked() ) + else if( m_pEveryMonthButton->IsChecked() ) { - if( sal_False == m_pEveryMonthButton->GetSavedValue() ) + if( !m_pEveryMonthButton->GetSavedValue() ) nValue = 2592000; } diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index 8016ee4b7258..9e6492aa1215 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -151,12 +151,12 @@ static sal_Bool lcl_FindEntry( ListBox& rLB, const OUString& rEntry, { if( 0 == rCmpClass.compareString(rEntry, rLB.GetEntry(i) )) { - rLB.SelectEntryPos(i, sal_True); + rLB.SelectEntryPos(i, true); return sal_True; } } if(LISTBOX_ENTRY_NOTFOUND != nSelPos) - rLB.SelectEntryPos(nSelPos, sal_False); + rLB.SelectEntryPos(nSelPos, false); return sal_False; } diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index b6d2e426ecef..842ddf042f98 100644 --- a/cui/source/tabpages/backgrnd.cxx +++ b/cui/source/tabpages/backgrnd.cxx @@ -707,7 +707,7 @@ void SvxBackgroundTabPage::ResetFromWallpaperItem( const SfxItemSet& rSet ) // We now have always a link to the background bLinkOnly = sal_True; - m_pBtnLink->Check( sal_True ); + m_pBtnLink->Check( true ); m_pBtnLink->Show( false ); delete pTemp; @@ -1536,7 +1536,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl) // activate preview, so that the user sees which // graphic he has chosen if ( !m_pBtnLink->IsChecked() && !m_pBtnPreview->IsChecked() ) - m_pBtnPreview->Check( sal_True ); + m_pBtnPreview->Check( true ); // timer-delayed loading of the graphic pPageImpl->pLoadTimer->Start(); } @@ -1844,8 +1844,8 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, aBgdGraphicPath = ""; if ( rUserData.isEmpty() ) - m_pBtnPreview->Check( sal_False ); - m_pBtnLink->Check( sal_False ); + m_pBtnPreview->Check( false ); + m_pBtnLink->Check( false ); m_pBtnLink->Disable(); m_pPreviewWin2->NotifyChange( NULL ); SetGraphicPosition_Impl( GPOS_TILED ); // tiles as default @@ -1866,13 +1866,13 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); #endif aBgdGraphicPath = aStrLink; - m_pBtnLink->Check( sal_True ); + m_pBtnLink->Check( true ); m_pBtnLink->Enable(); } else { aBgdGraphicPath = ""; - m_pBtnLink->Check( sal_False ); + m_pBtnLink->Check( false ); m_pBtnLink->Disable(); } @@ -1913,7 +1913,7 @@ void SvxBackgroundTabPage::FillControls_Impl( const SvxBrushItem& rBgdAttr, bIsGraphicValid = sal_False; if ( rUserData.isEmpty() ) - m_pBtnPreview->Check( sal_False ); + m_pBtnPreview->Check( false ); } } diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx index 1f12000cc884..10462b3f7617 100644 --- a/cui/source/tabpages/border.cxx +++ b/cui/source/tabpages/border.cxx @@ -290,14 +290,14 @@ SvxBorderTabPage::SvxBorderTabPage(Window* pParent, const SfxItemSet& rCoreAttrs if ( pColorTable.is() ) { // filling the line color box - m_pLbLineColor->SetUpdateMode( sal_False ); + m_pLbLineColor->SetUpdateMode( false ); for ( long i = 0; i < pColorTable->Count(); ++i ) { XColorEntry* pEntry = pColorTable->GetColor(i); m_pLbLineColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pLbLineColor->SetUpdateMode( sal_True ); + m_pLbLineColor->SetUpdateMode( true ); m_pLbShadowColor->CopyEntries(*m_pLbLineColor); } diff --git a/cui/source/tabpages/chardlg.cxx b/cui/source/tabpages/chardlg.cxx index 105324056ed0..011765ef774a 100644 --- a/cui/source/tabpages/chardlg.cxx +++ b/cui/source/tabpages/chardlg.cxx @@ -1353,9 +1353,9 @@ void SvxCharEffectsPage::Initialize() if ( !pColorTable.is() ) pColorTable = XColorList::CreateStdColorList(); - m_pUnderlineColorLB->SetUpdateMode( sal_False ); - m_pOverlineColorLB->SetUpdateMode( sal_False ); - m_pFontColorLB->SetUpdateMode( sal_False ); + m_pUnderlineColorLB->SetUpdateMode( false ); + m_pOverlineColorLB->SetUpdateMode( false ); + m_pFontColorLB->SetUpdateMode( false ); { SfxPoolItem* pDummy = NULL; @@ -1377,9 +1377,9 @@ void SvxCharEffectsPage::Initialize() m_pFontColorLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pUnderlineColorLB->SetUpdateMode( sal_True ); - m_pOverlineColorLB->SetUpdateMode( sal_True ); - m_pFontColorLB->SetUpdateMode( sal_True ); + m_pUnderlineColorLB->SetUpdateMode( true ); + m_pOverlineColorLB->SetUpdateMode( true ); + m_pFontColorLB->SetUpdateMode( true ); m_pFontColorLB->SetSelectHdl( LINK( this, SvxCharEffectsPage, ColorBoxSelectHdl_Impl ) ); // handler @@ -2044,7 +2044,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxContourItem& rItem = (SvxContourItem&)rSet.Get( nWhich ); m_pOutlineBtn->SetState( (TriState)rItem.GetValue() ); - m_pOutlineBtn->EnableTriState( sal_False ); + m_pOutlineBtn->EnableTriState( false ); break; } } @@ -2073,7 +2073,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxShadowedItem& rItem = (SvxShadowedItem&)rSet.Get( nWhich ); m_pShadowBtn->SetState( (TriState)rItem.GetValue() ); - m_pShadowBtn->EnableTriState( sal_False ); + m_pShadowBtn->EnableTriState( false ); break; } } @@ -2102,7 +2102,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxBlinkItem& rItem = (SvxBlinkItem&)rSet.Get( nWhich ); m_pBlinkingBtn->SetState( (TriState)rItem.GetValue() ); - m_pBlinkingBtn->EnableTriState( sal_False ); + m_pBlinkingBtn->EnableTriState( false ); break; } } @@ -2130,7 +2130,7 @@ void SvxCharEffectsPage::Reset( const SfxItemSet& rSet ) { const SvxCharHiddenItem& rItem = (SvxCharHiddenItem&)rSet.Get( nWhich ); m_pHiddenBtn->SetState( (TriState)rItem.GetValue() ); - m_pHiddenBtn->EnableTriState( sal_False ); + m_pHiddenBtn->EnableTriState( false ); break; } } @@ -2932,7 +2932,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) if ( nEsc > 0 ) { nFac = 1; - m_pHighPosBtn->Check( sal_True ); + m_pHighPosBtn->Check( true ); if ( nEsc == DFLT_ESC_AUTO_SUPER ) { nEsc = DFLT_ESC_SUPER; @@ -2942,7 +2942,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) else { nFac = -1; - m_pLowPosBtn->Check( sal_True ); + m_pLowPosBtn->Check( true ); if ( nEsc == DFLT_ESC_AUTO_SUB ) { nEsc = DFLT_ESC_SUB; @@ -2964,8 +2964,8 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_pNormalPosBtn->Check( sal_True ); - m_pHighLowRB->Check( sal_True ); + m_pNormalPosBtn->Check( true ); + m_pHighLowRB->Check( true ); PositionHdl_Impl( NULL ); } //the height has to be set after the handler is called to keep the value also if the escapement is zero @@ -2973,9 +2973,9 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) } else { - m_pHighPosBtn->Check( sal_False ); - m_pNormalPosBtn->Check( sal_False ); - m_pLowPosBtn->Check( sal_False ); + m_pHighPosBtn->Check( false ); + m_pNormalPosBtn->Check( false ); + m_pLowPosBtn->Check( false ); } // set BspFont @@ -3033,7 +3033,7 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) m_pPairKerningBtn->Check( rItem.GetValue() ); } else - m_pPairKerningBtn->Check( sal_False ); + m_pPairKerningBtn->Check( false ); // Scale Width nWhich = GetWhich( SID_ATTR_CHAR_SCALEWIDTH ); @@ -3072,13 +3072,13 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) const SvxCharRotateItem& rItem = (SvxCharRotateItem&) rSet.Get( nWhich ); if (rItem.IsBottomToTop()) - m_p90degRB->Check( sal_True ); + m_p90degRB->Check( true ); else if (rItem.IsTopToBotton()) - m_p270degRB->Check( sal_True ); + m_p270degRB->Check( true ); else { DBG_ASSERT( 0 == rItem.GetValue(), "incorrect value" ); - m_p0degRB->Check( sal_True ); + m_p0degRB->Check( true ); } m_pFitToLineCB->Check( rItem.IsFitToLine() ); } @@ -3086,14 +3086,14 @@ void SvxCharPositionPage::Reset( const SfxItemSet& rSet ) { if( eState == SFX_ITEM_DONTCARE ) { - m_p0degRB->Check( sal_False ); - m_p90degRB->Check( sal_False ); - m_p270degRB->Check( sal_False ); + m_p0degRB->Check( false ); + m_p90degRB->Check( false ); + m_p270degRB->Check( false ); } else - m_p0degRB->Check( sal_True ); + m_p0degRB->Check( true ); - m_pFitToLineCB->Check( sal_False ); + m_pFitToLineCB->Check( false ); } m_pFitToLineCB->SetClickHdl( aOldLink ); m_pFitToLineCB->Enable( !m_p0degRB->IsChecked() ); @@ -3304,7 +3304,7 @@ SvxCharTwoLinesPage::~SvxCharTwoLinesPage() void SvxCharTwoLinesPage::Initialize() { - m_pTwoLinesBtn->Check( sal_False ); + m_pTwoLinesBtn->Check( false ); TwoLinesHdl_Impl( NULL ); m_pTwoLinesBtn->SetClickHdl( LINK( this, SvxCharTwoLinesPage, TwoLinesHdl_Impl ) ); @@ -3443,7 +3443,7 @@ sal_uInt16* SvxCharTwoLinesPage::GetRanges() void SvxCharTwoLinesPage::Reset( const SfxItemSet& rSet ) { - m_pTwoLinesBtn->Check( sal_False ); + m_pTwoLinesBtn->Check( false ); sal_uInt16 nWhich = GetWhich( SID_ATTR_CHAR_TWO_LINES ); SfxItemState eState = rSet.GetItemState( nWhich ); diff --git a/cui/source/tabpages/dstribut.cxx b/cui/source/tabpages/dstribut.cxx index b35dcd40575c..44b39213d688 100644 --- a/cui/source/tabpages/dstribut.cxx +++ b/cui/source/tabpages/dstribut.cxx @@ -105,34 +105,34 @@ void SvxDistributePage::PointChanged(Window* /*pWindow*/, RECT_POINT /*eRP*/) void SvxDistributePage::Reset(const SfxItemSet& ) { - m_pBtnHorNone->SetState(sal_False); - m_pBtnHorLeft->SetState(sal_False); - m_pBtnHorCenter->SetState(sal_False); - m_pBtnHorDistance->SetState(sal_False); - m_pBtnHorRight->SetState(sal_False); + m_pBtnHorNone->SetState(false); + m_pBtnHorLeft->SetState(false); + m_pBtnHorCenter->SetState(false); + m_pBtnHorDistance->SetState(false); + m_pBtnHorRight->SetState(false); switch(m_eDistributeHor) { - case SvxDistributeHorizontalNone : m_pBtnHorNone->SetState(sal_True); break; - case SvxDistributeHorizontalLeft : m_pBtnHorLeft->SetState(sal_True); break; - case SvxDistributeHorizontalCenter : m_pBtnHorCenter->SetState(sal_True); break; - case SvxDistributeHorizontalDistance : m_pBtnHorDistance->SetState(sal_True); break; - case SvxDistributeHorizontalRight : m_pBtnHorRight->SetState(sal_True); break; + case SvxDistributeHorizontalNone : m_pBtnHorNone->SetState(true); break; + case SvxDistributeHorizontalLeft : m_pBtnHorLeft->SetState(true); break; + case SvxDistributeHorizontalCenter : m_pBtnHorCenter->SetState(true); break; + case SvxDistributeHorizontalDistance : m_pBtnHorDistance->SetState(true); break; + case SvxDistributeHorizontalRight : m_pBtnHorRight->SetState(true); break; } - m_pBtnVerNone->SetState(sal_False); - m_pBtnVerTop->SetState(sal_False); - m_pBtnVerCenter->SetState(sal_False); - m_pBtnVerDistance->SetState(sal_False); - m_pBtnVerBottom->SetState(sal_False); + m_pBtnVerNone->SetState(false); + m_pBtnVerTop->SetState(false); + m_pBtnVerCenter->SetState(false); + m_pBtnVerDistance->SetState(false); + m_pBtnVerBottom->SetState(false); switch(m_eDistributeVer) { - case SvxDistributeVerticalNone : m_pBtnVerNone->SetState(sal_True); break; - case SvxDistributeVerticalTop : m_pBtnVerTop->SetState(sal_True); break; - case SvxDistributeVerticalCenter : m_pBtnVerCenter->SetState(sal_True); break; - case SvxDistributeVerticalDistance : m_pBtnVerDistance->SetState(sal_True); break; - case SvxDistributeVerticalBottom : m_pBtnVerBottom->SetState(sal_True); break; + case SvxDistributeVerticalNone : m_pBtnVerNone->SetState(true); break; + case SvxDistributeVerticalTop : m_pBtnVerTop->SetState(true); break; + case SvxDistributeVerticalCenter : m_pBtnVerCenter->SetState(true); break; + case SvxDistributeVerticalDistance : m_pBtnVerDistance->SetState(true); break; + case SvxDistributeVerticalBottom : m_pBtnVerBottom->SetState(true); break; } } diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index e1c9d324345a..c2755669e835 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -331,7 +331,7 @@ IMPL_STATIC_LINK( _SfxMacroTabPage, AssignDeleteHdl_Impl, PushButton*, pBtn ) } } - pImpl->pEventLB->SetUpdateMode( sal_False ); + pImpl->pEventLB->SetUpdateMode( false ); pE->ReplaceItem( new SvLBoxString( pE, 0, sScriptURI ), LB_MACROS_ITEMPOS ); rListBox.GetModel()->InvalidateEntry( pE ); rListBox.Select( pE ); diff --git a/cui/source/tabpages/measure.cxx b/cui/source/tabpages/measure.cxx index 4c462c363ed5..96b0d0e580be 100644 --- a/cui/source/tabpages/measure.cxx +++ b/cui/source/tabpages/measure.cxx @@ -251,7 +251,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { m_pTsbBelowRefEdge->SetState( ( ( const SdrMeasureBelowRefEdgeItem& )rAttrs.Get( SDRATTR_MEASUREBELOWREFEDGE ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbBelowRefEdge->EnableTriState( sal_False ); + m_pTsbBelowRefEdge->EnableTriState( false ); } else { @@ -280,7 +280,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { m_pTsbParallel->SetState( ( ( const SdrMeasureTextRota90Item& )rAttrs.Get( SDRATTR_MEASURETEXTROTA90 ) ). GetValue() ? STATE_NOCHECK : STATE_CHECK ); - m_pTsbParallel->EnableTriState( sal_False ); + m_pTsbParallel->EnableTriState( false ); } else { @@ -293,7 +293,7 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { m_pTsbShowUnit->SetState( ( ( const SdrMeasureShowUnitItem& )rAttrs.Get( SDRATTR_MEASURESHOWUNIT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbShowUnit->EnableTriState( sal_False ); + m_pTsbShowUnit->EnableTriState( false ); } else { @@ -330,8 +330,8 @@ void SvxMeasurePage::Reset( const SfxItemSet& rAttrs ) { if ( rAttrs.GetItemState( SDRATTR_MEASURETEXTHPOS ) != SFX_ITEM_DONTCARE ) { - m_pTsbAutoPosV->EnableTriState( sal_False ); - m_pTsbAutoPosH->EnableTriState( sal_False ); + m_pTsbAutoPosV->EnableTriState( false ); + m_pTsbAutoPosH->EnableTriState( false ); SdrMeasureTextHPos eHPos = (SdrMeasureTextHPos) ( ( const SdrMeasureTextHPosItem& )rAttrs.Get( SDRATTR_MEASURETEXTHPOS ) ).GetValue(); diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx index 5fc426dc69e4..09fb9cd22953 100644 --- a/cui/source/tabpages/numfmt.cxx +++ b/cui/source/tabpages/numfmt.cxx @@ -80,7 +80,7 @@ SvxNumberPreview::SvxNumberPreview(Window* pParent, WinBits nStyle) , mnChar(0x0) { Font aFont( GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aFont.SetColor( Application::GetSettings().GetStyleSettings().GetFieldColor() ); SetFont( aFont ); InitSettings( sal_True, sal_True ); @@ -285,7 +285,7 @@ void SvxNumberFormatTabPage::Init_Impl() m_pEdComment->Hide(); - m_pCbSourceFormat->Check( sal_False ); + m_pCbSourceFormat->Check( false ); m_pCbSourceFormat->Disable(); m_pCbSourceFormat->Hide(); @@ -451,7 +451,7 @@ void SvxNumberFormatTabPage::Reset( const SfxItemSet& rSet ) if ( pBoolItem ) m_pCbSourceFormat->Check( pBoolItem->GetValue() ); else - m_pCbSourceFormat->Check( sal_False ); + m_pCbSourceFormat->Check( false ); m_pCbSourceFormat->Enable(); m_pCbSourceFormat->Show(); } @@ -614,8 +614,8 @@ void SvxNumberFormatTabPage::Obstructing() m_pFtOptions->Disable(); m_pEdDecimals->SetText( OUString() ); m_pEdLeadZeroes->SetText( OUString() ); - m_pBtnNegRed->Check( sal_False ); - m_pBtnThousand->Check( sal_False ); + m_pBtnNegRed->Check( false ); + m_pBtnThousand->Check( false ); m_pWndPreview->NotifyChange( OUString() ); m_pLbCategory->SelectEntryPos( 0 ); @@ -972,8 +972,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sa m_pBtnThousand->Disable(); m_pEdDecimals->SetText( OUString::number( 0 ) ); m_pEdLeadZeroes->SetText( OUString::number( 0 ) ); - m_pBtnNegRed->Check( sal_False ); - m_pBtnThousand->Check( sal_False ); + m_pBtnNegRed->Check( false ); + m_pBtnThousand->Check( false ); } } diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index d93450500c91..fa3917bdf13d 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -166,7 +166,7 @@ static Font& lcl_GetDefaultBulletFont() aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( sal_True ); + aDefBulletFont.SetTransparent( true ); bInit = sal_True; } return aDefBulletFont; @@ -723,7 +723,7 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl) aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetPitch( PITCH_DONTKNOW ); aCreateFont.SetWeight( WEIGHT_DONTKNOW ); - aCreateFont.SetTransparent( sal_True ); + aCreateFont.SetTransparent( true ); aFmt.SetBulletFont( &aCreateFont ); } } @@ -1170,17 +1170,17 @@ void SvxNumOptionsTabPage::ActivatePage(const SfxItemSet& rSet) { nActNumLvl = nTmpNumLvl; sal_uInt16 nMask = 1; - m_pLevelLB->SetUpdateMode(sal_False); + m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); m_pLevelLB->SelectEntryPos( pActNum->GetLevelCount(), nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - m_pLevelLB->SelectEntryPos( i, sal_True); + m_pLevelLB->SelectEntryPos( i, true); nMask <<= 1 ; } - m_pLevelLB->SetUpdateMode(sal_True); + m_pLevelLB->SetUpdateMode(true); *pActNum = *pSaveNum; InitControls(); } @@ -1246,20 +1246,20 @@ void SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet ) m_pLevelLB->SelectEntryPos(m_pLevelLB->GetEntryCount() - 1); sal_uInt16 nMask = 1; - m_pLevelLB->SetUpdateMode(sal_False); + m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), sal_True); + m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), true); } else for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - m_pLevelLB->SelectEntryPos( i, sal_True); + m_pLevelLB->SelectEntryPos( i, true); nMask <<= 1 ; } - m_pLevelLB->SetUpdateMode(sal_True); + m_pLevelLB->SetUpdateMode(true); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -1631,10 +1631,10 @@ IMPL_LINK( SvxNumOptionsTabPage, LevelHdl_Impl, ListBox *, pBox ) (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(sal_False); + pBox->SetUpdateMode(false); for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) - pBox->SelectEntryPos( i, sal_False ); - pBox->SetUpdateMode(sal_True); + pBox->SelectEntryPos( i, false ); + pBox->SetUpdateMode(true); } else if(pBox->GetSelectEntryCount()) { @@ -1645,7 +1645,7 @@ IMPL_LINK( SvxNumOptionsTabPage, LevelHdl_Impl, ListBox *, pBox ) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False ); + pBox->SelectEntryPos( pActNum->GetLevelCount(), false ); } else { @@ -2247,7 +2247,7 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, if(!aTmpSize.Height()) aTmpSize.Height() = 1; aFont.SetSize(aTmpSize); - aFont.SetTransparent(sal_True); + aFont.SetTransparent(true); Color aBulletColor = rFmt.GetBulletColor(); if(aBulletColor.GetColor() == COL_AUTO) aBulletColor = Color(pVDev->GetFillColor().IsDark() ? COL_WHITE : COL_BLACK); @@ -2934,11 +2934,11 @@ void SvxNumPositionTabPage::ActivatePage(const SfxItemSet& rSet) for(sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - m_pLevelLB->SelectEntryPos( i, sal_True); + m_pLevelLB->SelectEntryPos( i, true); nMask <<= 1 ; } m_pRelativeCB->Enable(nActNumLvl != 1); - m_pLevelLB->SetUpdateMode(sal_True); + m_pLevelLB->SetUpdateMode(true); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); @@ -3013,22 +3013,22 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet ) else m_pLevelLB->SelectEntryPos(m_pLevelLB->GetEntryCount() - 1); sal_uInt16 nMask = 1; - m_pLevelLB->SetUpdateMode(sal_False); + m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), sal_True); + m_pLevelLB->SelectEntryPos( pSaveNum->GetLevelCount(), true); } else { for(sal_uInt16 i = 0; i < pSaveNum->GetLevelCount(); i++) { if(nActNumLvl & nMask) - m_pLevelLB->SelectEntryPos( i, sal_True); + m_pLevelLB->SelectEntryPos( i, true); nMask <<= 1; } } - m_pLevelLB->SetUpdateMode(sal_True); + m_pLevelLB->SetUpdateMode(true); if(!pActNum) pActNum = new SvxNumRule(*pSaveNum); @@ -3158,10 +3158,10 @@ IMPL_LINK( SvxNumPositionTabPage, LevelHdl_Impl, ListBox *, pBox ) (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(sal_False); + pBox->SetUpdateMode(false); for( sal_uInt16 i = 0; i < pActNum->GetLevelCount(); i++ ) - pBox->SelectEntryPos( i, sal_False ); - pBox->SetUpdateMode(sal_True); + pBox->SelectEntryPos( i, false ); + pBox->SetUpdateMode(true); } else if(pBox->GetSelectEntryCount()) { @@ -3172,7 +3172,7 @@ IMPL_LINK( SvxNumPositionTabPage, LevelHdl_Impl, ListBox *, pBox ) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( pActNum->GetLevelCount(), sal_False ); + pBox->SelectEntryPos( pActNum->GetLevelCount(), false ); } else { diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx index 4134358200de..df72d04516b8 100644 --- a/cui/source/tabpages/page.cxx +++ b/cui/source/tabpages/page.cxx @@ -226,7 +226,7 @@ SvxPageDescPage::SvxPageDescPage( Window* pParent, const SfxItemSet& rAttr ) : get(m_pPrintRangeQueryText,"labelMsg"); bBorderModified = false; - m_pBspWin->EnableRTL( sal_False ); + m_pBspWin->EnableRTL( false ); // this page needs ExchangeSupport SetExchangeSupport(); @@ -743,7 +743,7 @@ sal_Bool SvxPageDescPage::FillItemSet( SfxItemSet& rSet ) nPos = m_pPaperSizeBox->GetSelectEntryPos(); Paper ePaper = (Paper)(sal_uLong)m_pPaperSizeBox->GetEntryData( nPos ); const sal_uInt16 nOld = m_pPaperSizeBox->GetSavedValue(); - sal_Bool bChecked = m_pLandscapeBtn->IsChecked(); + bool bChecked = m_pLandscapeBtn->IsChecked(); if ( PAPER_USER == ePaper ) { @@ -918,7 +918,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl) return 0; OUString aOldName = m_pPaperTrayBox->GetSelectEntry(); - m_pPaperTrayBox->SetUpdateMode( sal_False ); + m_pPaperTrayBox->SetUpdateMode( false ); m_pPaperTrayBox->Clear(); sal_uInt16 nEntryPos = m_pPaperTrayBox->InsertEntry( EE_RESSTR( RID_SVXSTR_PAPERBIN_SETTINGS ) ); @@ -941,7 +941,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl) m_pPaperTrayBox->SetEntryData( nEntryPos, (void*)(sal_uLong)i ); } m_pPaperTrayBox->SelectEntry( aOldName ); - m_pPaperTrayBox->SetUpdateMode( sal_True ); + m_pPaperTrayBox->SetUpdateMode( true ); return 0; } diff --git a/cui/source/tabpages/paragrph.cxx b/cui/source/tabpages/paragrph.cxx index 841d64f76ba8..e813985f278b 100644 --- a/cui/source/tabpages/paragrph.cxx +++ b/cui/source/tabpages/paragrph.cxx @@ -1182,10 +1182,10 @@ void SvxParaAlignTabPage::Reset( const SfxItemSet& rSet ) } else { - m_pLeft->Check( sal_False ); - m_pRight->Check( sal_False ); - m_pCenter->Check( sal_False ); - m_pJustify->Check( sal_False ); + m_pLeft->Check( false ); + m_pRight->Check( false ); + m_pCenter->Check( false ); + m_pJustify->Check( false ); } m_pLastLineLB->SelectEntryPos(nLBSelect); @@ -1262,8 +1262,8 @@ IMPL_LINK_NOARG(SvxParaAlignTabPage, TextDirectionHdl_Impl) switch ( eDir ) { // check the default alignment for this text direction - case FRMDIR_HORI_LEFT_TOP : m_pLeft->Check( sal_True ); break; - case FRMDIR_HORI_RIGHT_TOP : m_pRight->Check( sal_True ); break; + case FRMDIR_HORI_LEFT_TOP : m_pLeft->Check( true ); break; + case FRMDIR_HORI_RIGHT_TOP : m_pRight->Check( true ); break; case FRMDIR_ENVIRONMENT : /* do nothing */ break; default: { @@ -1537,7 +1537,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxHyphenZoneItem& rHyphen = (const SvxHyphenZoneItem&)rSet.Get( _nWhich ); - m_pHyphenBox->EnableTriState( sal_False ); + m_pHyphenBox->EnableTriState( false ); bIsHyphen = rHyphen.IsHyphen(); m_pHyphenBox->SetState( bIsHyphen ? STATE_CHECK : STATE_NOCHECK ); @@ -1576,7 +1576,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_SET ) { - m_pApplyCollBtn->EnableTriState( sal_False ); + m_pApplyCollBtn->EnableTriState( false ); const SvxPageModelItem& rModel = (const SvxPageModelItem&)rSet.Get( _nWhich ); @@ -1590,7 +1590,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) bIsPageModel = sal_True; m_pPageBreakBox->Enable(); - m_pPageBreakBox->EnableTriState( sal_False ); + m_pPageBreakBox->EnableTriState( false ); m_pBreakTypeFT->Enable(); m_pBreakTypeLB->Enable(); m_pBreakPositionFT->Enable(); @@ -1611,7 +1611,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) } else if ( SFX_ITEM_DONTCARE == eItemState ) { - m_pApplyCollBtn->EnableTriState( sal_True ); + m_pApplyCollBtn->EnableTriState( true ); m_pApplyCollBtn->SetState( STATE_DONTKNOW ); m_pApplyCollBox->SetNoSelection(); } @@ -1638,7 +1638,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) // PageBreak not via CTRL-RETURN, // then CheckBox can be freed m_pPageBreakBox->Enable(); - m_pPageBreakBox->EnableTriState( sal_False ); + m_pPageBreakBox->EnableTriState( false ); m_pBreakTypeFT->Enable(); m_pBreakTypeLB->Enable(); m_pBreakPositionFT->Enable(); @@ -1701,7 +1701,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) if ( eItemState >= SFX_ITEM_AVAILABLE ) { - m_pKeepParaBox->EnableTriState( sal_False ); + m_pKeepParaBox->EnableTriState( false ); const SvxFmtKeepItem& rKeep = (const SvxFmtKeepItem&)rSet.Get( _nWhich ); @@ -1722,7 +1722,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxFmtSplitItem& rSplit = (const SvxFmtSplitItem&)rSet.Get( _nWhich ); - m_pKeepTogetherBox->EnableTriState( sal_False ); + m_pKeepTogetherBox->EnableTriState( false ); if ( !rSplit.GetValue() ) m_pKeepTogetherBox->SetState( STATE_CHECK ); @@ -1739,7 +1739,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) { const SvxWidowsItem& rWidow = (const SvxWidowsItem&)rSet.Get( _nWhich ); - m_pWidowBox->EnableTriState( sal_False ); + m_pWidowBox->EnableTriState( false ); const sal_uInt16 nLines = rWidow.GetValue(); sal_Bool _bEnable = nLines > 0; @@ -1763,7 +1763,7 @@ void SvxExtParagraphTabPage::Reset( const SfxItemSet& rSet ) const SvxOrphansItem& rOrphan = (const SvxOrphansItem&)rSet.Get( _nWhich ); const sal_uInt16 nLines = rOrphan.GetValue(); - m_pOrphanBox->EnableTriState( sal_False ); + m_pOrphanBox->EnableTriState( false ); sal_Bool _bEnable = nLines > 0; m_pOrphanBox->SetState( _bEnable ? STATE_CHECK : STATE_NOCHECK); @@ -2189,7 +2189,7 @@ static void lcl_SetBox(const SfxItemSet& rSet, sal_uInt16 nSlotId, CheckBox& rBo rBox.Enable(false); else if(eState >= SFX_ITEM_AVAILABLE) { - rBox.EnableTriState( sal_False ); + rBox.EnableTriState( false ); rBox.Check(((const SfxBoolItem&)rSet.Get(_nWhich)).GetValue()); } else @@ -2208,7 +2208,7 @@ void SvxAsianTabPage::Reset( const SfxItemSet& rSet ) IMPL_LINK( SvxAsianTabPage, ClickHdl_Impl, CheckBox*, pBox ) { - pBox->EnableTriState( sal_False ); + pBox->EnableTriState( false ); return 0; } diff --git a/cui/source/tabpages/swpossizetabpage.cxx b/cui/source/tabpages/swpossizetabpage.cxx index 464ed484a210..263700c98d9f 100644 --- a/cui/source/tabpages/swpossizetabpage.cxx +++ b/cui/source/tabpages/swpossizetabpage.cxx @@ -919,7 +919,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); m_pPositionCB->SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - m_pPositionCB->EnableTriState( sal_False ); + m_pPositionCB->EnableTriState( false ); m_pSizeCB->Enable( !bProtected ); } else @@ -935,7 +935,7 @@ void SvxSwPosSizeTabPage::Reset( const SfxItemSet& rSet) { m_pSizeCB->SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pSizeCB->EnableTriState( sal_False ); + m_pSizeCB->EnableTriState( false ); } else m_pSizeCB->SetState( STATE_DONTKNOW ); diff --git a/cui/source/tabpages/tabstpge.cxx b/cui/source/tabpages/tabstpge.cxx index 8e10a774e103..0b487060437b 100644 --- a/cui/source/tabpages/tabstpge.cxx +++ b/cui/source/tabpages/tabstpge.cxx @@ -403,8 +403,8 @@ void SvxTabulatorTabPage::InitTabPos_Impl( sal_uInt16 nTabPos ) nTabPos = 0; // Switch off all RadioButtons for a start - m_pLeftTab->Check( sal_True ); - m_pNoFillChar->Check( sal_True ); + m_pLeftTab->Check( true ); + m_pNoFillChar->Check( true ); if( m_pTabBox->GetEntryCount() > 0 ) { diff --git a/cui/source/tabpages/textanim.cxx b/cui/source/tabpages/textanim.cxx index b09edd773916..fe5c827c7438 100644 --- a/cui/source/tabpages/textanim.cxx +++ b/cui/source/tabpages/textanim.cxx @@ -168,10 +168,10 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) } else { - m_pBtnUp->Check( sal_False ); - m_pBtnLeft->Check( sal_False ); - m_pBtnRight->Check( sal_False ); - m_pBtnDown->Check( sal_False ); + m_pBtnUp->Check( false ); + m_pBtnLeft->Check( false ); + m_pBtnRight->Check( false ); + m_pBtnDown->Check( false ); } m_pBtnUp->SaveValue(); m_pBtnLeft->SaveValue(); @@ -184,7 +184,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTARTINSIDE ); if( pItem ) { - m_pTsbStartInside->EnableTriState( sal_False ); + m_pTsbStartInside->EnableTriState( false ); sal_Bool bValue = ( ( const SdrTextAniStartInsideItem* )pItem )->GetValue(); if( bValue ) m_pTsbStartInside->SetState( STATE_CHECK ); @@ -201,7 +201,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANISTOPINSIDE ); if( pItem ) { - m_pTsbStopInside->EnableTriState( sal_False ); + m_pTsbStopInside->EnableTriState( false ); sal_Bool bValue = ( ( const SdrTextAniStopInsideItem* )pItem )->GetValue(); if( bValue ) m_pTsbStopInside->SetState( STATE_CHECK ); @@ -218,7 +218,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANICOUNT ); if( pItem ) { - m_pTsbEndless->EnableTriState( sal_False ); + m_pTsbEndless->EnableTriState( false ); long nValue = (long) ( ( const SdrTextAniCountItem* )pItem )->GetValue(); m_pNumFldCount->SetValue( nValue ); if( nValue == 0 ) @@ -251,7 +251,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIDELAY ); if( pItem ) { - m_pTsbAuto->EnableTriState( sal_False ); + m_pTsbAuto->EnableTriState( false ); long nValue = (long) ( ( const SdrTextAniDelayItem* )pItem )->GetValue(); m_pMtrFldDelay->SetValue( nValue ); if( nValue == 0 ) @@ -276,7 +276,7 @@ void SvxTextAnimationPage::Reset( const SfxItemSet& rAttrs ) pItem = &pPool->GetDefaultItem( SDRATTR_TEXT_ANIAMOUNT ); if( pItem ) { - m_pTsbPixel->EnableTriState( sal_False ); + m_pTsbPixel->EnableTriState( false ); long nValue = (long) ( ( const SdrTextAniAmountItem* )pItem )->GetValue(); if( nValue <= 0 ) { @@ -348,10 +348,10 @@ sal_Bool SvxTextAnimationPage::FillItemSet( SfxItemSet& rAttrs) } // animation direction - if( m_pBtnUp->GetSavedValue() != m_pBtnUp->IsChecked() || - m_pBtnLeft->GetSavedValue() != m_pBtnLeft->IsChecked() || - m_pBtnRight->GetSavedValue() != m_pBtnRight->IsChecked() || - m_pBtnDown->GetSavedValue() != m_pBtnDown->IsChecked() ) + if( m_pBtnUp->GetSavedValue() != TriState(m_pBtnUp->IsChecked()) || + m_pBtnLeft->GetSavedValue() != TriState(m_pBtnLeft->IsChecked()) || + m_pBtnRight->GetSavedValue() != TriState(m_pBtnRight->IsChecked()) || + m_pBtnDown->GetSavedValue() != TriState(m_pBtnDown->IsChecked()) ) { SdrTextAniDirection eValue = (SdrTextAniDirection) GetSelectedDirection(); rAttrs.Put( SdrTextAniDirectionItem( eValue ) ); diff --git a/cui/source/tabpages/textattr.cxx b/cui/source/tabpages/textattr.cxx index 9c4da32f62fc..5384fb4ef6f4 100644 --- a/cui/source/tabpages/textattr.cxx +++ b/cui/source/tabpages/textattr.cxx @@ -170,7 +170,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { m_pTsbAutoGrowHeight->SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbAutoGrowHeight->EnableTriState( sal_False ); + m_pTsbAutoGrowHeight->EnableTriState( false ); } else m_pTsbAutoGrowHeight->SetState( STATE_DONTKNOW ); @@ -181,7 +181,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { m_pTsbAutoGrowWidth->SetState( ( ( const SdrTextAutoGrowWidthItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWWIDTH ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbAutoGrowWidth->EnableTriState( sal_False ); + m_pTsbAutoGrowWidth->EnableTriState( false ); } else m_pTsbAutoGrowWidth->SetState( STATE_DONTKNOW ); @@ -192,7 +192,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { m_pTsbAutoGrowSize->SetState( ( ( const SdrTextAutoGrowHeightItem& )rAttrs.Get( SDRATTR_TEXT_AUTOGROWHEIGHT ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbAutoGrowSize->EnableTriState( sal_False ); + m_pTsbAutoGrowSize->EnableTriState( false ); } else m_pTsbAutoGrowSize->SetState( STATE_DONTKNOW ); @@ -203,7 +203,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { m_pTsbWordWrapText->SetState( ( ( const SdrTextWordWrapItem& )rAttrs.Get( SDRATTR_TEXT_WORDWRAP ) ). GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbWordWrapText->EnableTriState( sal_False ); + m_pTsbWordWrapText->EnableTriState( false ); } else m_pTsbWordWrapText->SetState( STATE_DONTKNOW ); @@ -222,7 +222,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrTextHorzAdjust eTHA = (SdrTextHorzAdjust)((const SdrTextHorzAdjustItem&)rAttrs.Get(SDRATTR_TEXT_HORZADJUST)).GetValue(); RECT_POINT eRP = RP_LB; - m_pTsbFullWidth->EnableTriState( sal_False ); + m_pTsbFullWidth->EnableTriState( false ); // Translate item values into local anchor position. switch (eTVA) @@ -295,7 +295,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) SdrFitToSizeType eFTS = (SdrFitToSizeType) ( ( const SdrTextFitToSizeTypeItem& )rAttrs.Get( SDRATTR_TEXT_FITTOSIZE ) ).GetValue(); m_pTsbFitToSize->SetState( eFTS == SDRTEXTFIT_NONE ? STATE_NOCHECK : STATE_CHECK ); - m_pTsbFitToSize->EnableTriState( sal_False ); + m_pTsbFitToSize->EnableTriState( false ); } else m_pTsbFitToSize->SetState( STATE_DONTKNOW ); @@ -305,7 +305,7 @@ void SvxTextAttrPage::Reset( const SfxItemSet& rAttrs ) { sal_Bool bContour = ( ( const SdrTextContourFrameItem& )rAttrs.Get( SDRATTR_TEXT_CONTOURFRAME ) ).GetValue(); m_pTsbContour->SetState( bContour ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbContour->EnableTriState( sal_False ); + m_pTsbContour->EnableTriState( false ); } else m_pTsbContour->SetState( STATE_DONTKNOW ); diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx index 7560d1f7fb01..8f6f3ad8335f 100644 --- a/cui/source/tabpages/tparea.cxx +++ b/cui/source/tabpages/tparea.cxx @@ -671,7 +671,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : // Controls for Hatch-Background m_pFlHatchBckgrd->Hide(); - m_pTsbOriginal->EnableTriState( sal_False ); + m_pTsbOriginal->EnableTriState( false ); // this page needs ExchangeSupport SetExchangeSupport(); @@ -728,7 +728,7 @@ SvxAreaTabPage::SvxAreaTabPage( Window* pParent, const SfxItemSet& rInAttrs ) : m_pTypeLB->SetSelectHdl( LINK( this, SvxAreaTabPage, SelectDialogTypeHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - m_pCtlXRectPreview->EnableRTL(sal_False); + m_pCtlXRectPreview->EnableRTL(false); // Calcualte size of dropdown listboxes Size aSize = LogicToPixel(Size(108, 103), MAP_APPFONT); @@ -1515,7 +1515,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) if( ( rAttrs.GetItemState( XATTR_GRADIENTSTEPCOUNT ) != SFX_ITEM_DONTCARE ) || ( rAttrs.GetItemState( XATTR_FILLSTYLE ) != SFX_ITEM_DONTCARE ) ) { - m_pTsbStepCount->EnableTriState( sal_False ); + m_pTsbStepCount->EnableTriState( false ); sal_uInt16 nValue = ( ( const XGradientStepCountItem& ) rAttrs.Get( XATTR_GRADIENTSTEPCOUNT ) ).GetValue(); if( nValue == 0 ) { @@ -1539,7 +1539,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) if( rAttrs.GetItemState( XATTR_FILLBMP_TILE ) != SFX_ITEM_DONTCARE ) { - m_pTsbTile->EnableTriState( sal_False ); + m_pTsbTile->EnableTriState( false ); if( ( ( const XFillBmpTileItem& ) rAttrs.Get( XATTR_FILLBMP_TILE ) ).GetValue() ) m_pTsbTile->SetState( STATE_CHECK ); @@ -1551,7 +1551,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) if( rAttrs.GetItemState( XATTR_FILLBMP_STRETCH ) != SFX_ITEM_DONTCARE ) { - m_pTsbStretch->EnableTriState( sal_False ); + m_pTsbStretch->EnableTriState( false ); if( ( ( const XFillBmpStretchItem& ) rAttrs.Get( XATTR_FILLBMP_STRETCH ) ).GetValue() ) m_pTsbStretch->SetState( STATE_CHECK ); @@ -1565,7 +1565,7 @@ void SvxAreaTabPage::Reset( const SfxItemSet& rAttrs ) //aTsbScale if( rAttrs.GetItemState( XATTR_FILLBMP_SIZELOG ) != SFX_ITEM_DONTCARE ) { - m_pTsbScale->EnableTriState( sal_False ); + m_pTsbScale->EnableTriState( false ); if( ( ( const XFillBmpSizeLogItem& ) rAttrs.Get( XATTR_FILLBMP_SIZELOG ) ).GetValue() ) m_pTsbScale->SetState( STATE_NOCHECK ); diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx index a2bc8d7f787a..8eaf6b698234 100644 --- a/cui/source/tabpages/tpgradnt.cxx +++ b/cui/source/tabpages/tpgradnt.cxx @@ -132,7 +132,7 @@ SvxGradientTabPage::SvxGradientTabPage LINK( this, SvxGradientTabPage, ClickSaveHdl_Impl ) ); // #i76307# always paint the preview in LTR, because this is what the document does - m_pCtlPreview->EnableRTL( sal_False ); + m_pCtlPreview->EnableRTL( false ); setPreviewsToSamePlace(pParent, this); } diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx index de6311b01b8d..a17a774884fb 100644 --- a/cui/source/tabpages/tpline.cxx +++ b/cui/source/tabpages/tpline.cxx @@ -205,7 +205,7 @@ SvxLineTabPage::SvxLineTabPage m_pSymbolHeightMF->SetModifyHdl(LINK(this, SvxLineTabPage, SizeHdl_Impl)); m_pSymbolRatioCB->SetClickHdl(LINK(this, SvxLineTabPage, RatioHdl_Impl)); - m_pSymbolRatioCB->Check(sal_True); + m_pSymbolRatioCB->Check(true); ShowSymbolControls(sal_False); nActLineWidth = -1; @@ -307,7 +307,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_GALLERY, pPopup ); if(aGrfNames.empty()) - m_pSymbolMB->GetPopupMenu()->EnableItem(MN_GALLERY, sal_False); + m_pSymbolMB->GetPopupMenu()->EnableItem(MN_GALLERY, false); } if(!pButton->GetPopupMenu()->GetPopupMenu( MN_SYMBOLS ) && pSymbolList) @@ -389,7 +389,7 @@ void SvxLineTabPage::InitSymbols(MenuButton* pButton) m_pSymbolMB->GetPopupMenu()->SetPopupMenu( MN_SYMBOLS, pPopup ); if(aGrfNames.empty()) - m_pSymbolMB->GetPopupMenu()->EnableItem(MN_SYMBOLS, sal_False); + m_pSymbolMB->GetPopupMenu()->EnableItem(MN_SYMBOLS, false); delete pView; delete pModel; @@ -1359,7 +1359,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINESTARTCENTER ) != SFX_ITEM_DONTCARE ) { - m_pTsbCenterStart->EnableTriState( sal_False ); + m_pTsbCenterStart->EnableTriState( false ); if( ( ( const XLineStartCenterItem& ) rAttrs.Get( XATTR_LINESTARTCENTER ) ).GetValue() ) m_pTsbCenterStart->SetState( STATE_CHECK ); @@ -1378,7 +1378,7 @@ void SvxLineTabPage::Reset( const SfxItemSet& rAttrs ) } else if( rAttrs.GetItemState( XATTR_LINEENDCENTER ) != SFX_ITEM_DONTCARE ) { - m_pTsbCenterEnd->EnableTriState( sal_False ); + m_pTsbCenterEnd->EnableTriState( false ); if( ( ( const XLineEndCenterItem& ) rAttrs.Get( XATTR_LINEENDCENTER ) ).GetValue() ) m_pTsbCenterEnd->SetState( STATE_CHECK ); diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx index 01893344ff19..e3b3de8f0b0f 100644 --- a/cui/source/tabpages/tplnedef.cxx +++ b/cui/source/tabpages/tplnedef.cxx @@ -869,7 +869,7 @@ void SvxLineDefTabPage::FillDialog_Impl() if( eXDS == XDASH_RECTRELATIVE ) m_pCbxSynchronize->Check(); else - m_pCbxSynchronize->Check( sal_False ); + m_pCbxSynchronize->Check( false ); m_pNumFldNumber1->SetValue( aDash.GetDots() ); SetMetricValue( *m_pMtrLength1, aDash.GetDotLen(), ePoolUnit ); diff --git a/cui/source/tabpages/tpshadow.cxx b/cui/source/tabpages/tpshadow.cxx index cfc24eed8d84..22c2d4fda335 100644 --- a/cui/source/tabpages/tpshadow.cxx +++ b/cui/source/tabpages/tpshadow.cxx @@ -363,7 +363,7 @@ void SvxShadowTabPage::Reset( const SfxItemSet& rAttrs ) // has a shadow been set? if( rAttrs.GetItemState( SDRATTR_SHADOW ) != SFX_ITEM_DONTCARE ) { - m_pTsbShowShadow->EnableTriState( sal_False ); + m_pTsbShowShadow->EnableTriState( false ); if( ( ( const SdrShadowItem& ) rAttrs.Get( SDRATTR_SHADOW ) ).GetValue() ) m_pTsbShowShadow->SetState( STATE_CHECK ); diff --git a/cui/source/tabpages/transfrm.cxx b/cui/source/tabpages/transfrm.cxx index 88334ca8de50..3a0b0ec7c73e 100644 --- a/cui/source/tabpages/transfrm.cxx +++ b/cui/source/tabpages/transfrm.cxx @@ -762,8 +762,8 @@ void SvxPositionSizeTabPage::Construct() m_pTsbAutoGrowHeight->SetClickHdl( LINK( this, SvxPositionSizeTabPage, ClickSizeProtectHdl ) ); // is used as flag to evaluate if its selectable - m_pTsbAutoGrowWidth->EnableTriState( sal_False ); - m_pTsbAutoGrowHeight->EnableTriState( sal_False ); + m_pTsbAutoGrowWidth->EnableTriState( false ); + m_pTsbAutoGrowHeight->EnableTriState( false ); } } @@ -932,7 +932,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { sal_Bool bProtected = ( ( const SfxBoolItem* )pItem )->GetValue(); m_pTsbPosProtect->SetState( bProtected ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbPosProtect->EnableTriState( sal_False ); + m_pTsbPosProtect->EnableTriState( false ); } else { @@ -975,7 +975,7 @@ void SvxPositionSizeTabPage::Reset( const SfxItemSet& ) { m_pTsbSizeProtect->SetState( ( (const SfxBoolItem*)pItem )->GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pTsbSizeProtect->EnableTriState( sal_False ); + m_pTsbSizeProtect->EnableTriState( false ); } else m_pTsbSizeProtect->SetState( STATE_DONTKNOW ); diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx index e14f0baf7204..cfe103dfa73b 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.cxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.cxx @@ -183,10 +183,10 @@ namespace dbmm return nResult; } - sal_Bool MacroMigrationDialog::Close() + bool MacroMigrationDialog::Close() { if ( m_pData->bMigrationIsRunning ) - return sal_False; + return false; return MacroMigrationDialog_Base::Close(); } diff --git a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx index c5c112249982..43e6e12012ae 100644 --- a/dbaccess/source/ext/macromigration/macromigrationdialog.hxx +++ b/dbaccess/source/ext/macromigration/macromigrationdialog.hxx @@ -56,7 +56,7 @@ namespace dbmm virtual sal_Bool onFinish(); // Dialog overridables - virtual sal_Bool Close(); + virtual bool Close(); virtual short Execute(); private: diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx index 001c174fcc5f..2e58d1ba6955 100644 --- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx +++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx @@ -1178,7 +1178,7 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/) m_aTBPreview.EndSelection(); // tell the toolbox that the item is pressed down - m_aTBPreview.SetItemDown( SID_DB_APP_DISABLE_PREVIEW, sal_True ); + m_aTBPreview.SetItemDown( SID_DB_APP_DISABLE_PREVIEW, true ); // simulate a mouse move (so the "down" state is really painted) Point aPoint = m_aTBPreview.GetItemRect( SID_DB_APP_DISABLE_PREVIEW ).TopLeft(); @@ -1210,7 +1210,7 @@ IMPL_LINK(OAppDetailPageHelper, OnDropdownClickHdl, ToolBox*, /*pToolBox*/) // "cleanup" the toolbox state MouseEvent aLeave( aPoint, 0, MOUSE_LEAVEWINDOW | MOUSE_SYNTHETIC ); m_aTBPreview.MouseMove( aLeave ); - m_aTBPreview.SetItemDown( SID_DB_APP_DISABLE_PREVIEW, sal_False); + m_aTBPreview.SetItemDown( SID_DB_APP_DISABLE_PREVIEW, false); if ( nSelectedAction ) { m_aTBPreview.SetItemText(SID_DB_APP_DISABLE_PREVIEW, aMenu->GetItemText(nSelectedAction)); diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx index 130a39c04721..f886d8d1207c 100644 --- a/dbaccess/source/ui/app/AppDetailView.cxx +++ b/dbaccess/source/ui/app/AppDetailView.cxx @@ -107,7 +107,7 @@ void OCreationList::PreparePaint( SvTreeListEntry* _pEntry ) { // draw a selection background bool bIsMouseDownEntry = ( _pEntry == m_pMouseDownEntry ); - DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, sal_False, sal_True, sal_False ); + DrawSelectionBackground( GetBoundingRect( _pEntry ), bIsMouseDownEntry ? 1 : 2, false, true, false ); if ( bIsMouseDownEntry ) { diff --git a/dbaccess/source/ui/browser/brwview.cxx b/dbaccess/source/ui/browser/brwview.cxx index edecf45dfa24..b0dc4f88cc6d 100644 --- a/dbaccess/source/ui/browser/brwview.cxx +++ b/dbaccess/source/ui/browser/brwview.cxx @@ -311,8 +311,8 @@ bool UnoDataBrowserView::PreNotify( NotifyEvent& rNEvt ) { const KeyEvent* pKeyEvt = rNEvt.GetKeyEvent(); const KeyCode& rKeyCode = pKeyEvt->GetKeyCode(); - if ( ( rKeyCode == KeyCode( KEY_E, sal_True, sal_True, sal_False, sal_False ) ) - || ( rKeyCode == KeyCode( KEY_TAB, sal_True, sal_False, sal_False, sal_False ) ) + if ( ( rKeyCode == KeyCode( KEY_E, true, true, false, false ) ) + || ( rKeyCode == KeyCode( KEY_TAB, true, false, false, false ) ) ) { if ( m_pTreeView && m_pVclControl && m_pTreeView->HasChildPathFocus() ) diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index b4d0e769eba1..7a5aa0baca72 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -635,16 +635,16 @@ void SbaGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rM if (bDBIsReadOnly) { - rMenu.EnableItem(SID_FM_HIDECOL, sal_False); + rMenu.EnableItem(SID_FM_HIDECOL, false); PopupMenu* pShowColsMenu = rMenu.GetPopupMenu(SID_FM_SHOWCOLS); if (pShowColsMenu) { // at most 16 items which mean "show column <name>" for (sal_uInt16 i=1; i<16; ++i) - pShowColsMenu->EnableItem(i, sal_False); + pShowColsMenu->EnableItem(i, false); // "show cols/more..." and "show cols/all" - pShowColsMenu->EnableItem(SID_FM_SHOWCOLS_MORE, sal_False); - pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, sal_False); + pShowColsMenu->EnableItem(SID_FM_SHOWCOLS_MORE, false); + pShowColsMenu->EnableItem(SID_FM_SHOWALLCOLS, false); } } diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index 44d08805bbbe..8dd70fb3c1db 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -585,7 +585,7 @@ void SbaTableQueryBrowser::initializePreviewMode() { if ( getBrowserView() && getBrowserView()->getVclControl() ) { - getBrowserView()->getVclControl()->AlwaysEnableInput( sal_False ); + getBrowserView()->getVclControl()->AlwaysEnableInput( false ); getBrowserView()->getVclControl()->EnableInput( false ); getBrowserView()->getVclControl()->ForceHideScrollbars( sal_True ); } @@ -1355,7 +1355,7 @@ void SbaTableQueryBrowser::implCheckExternalSlot( sal_uInt16 _nId ) // check if we have to hide this item from the toolbox if ( pToolbox ) { - sal_Bool bHaveDispatcher = m_aExternalFeatures[ _nId ].xDispatcher.is(); + bool bHaveDispatcher = m_aExternalFeatures[ _nId ].xDispatcher.is(); if ( bHaveDispatcher != pToolbox->IsItemVisible( _nId ) ) bHaveDispatcher ? pToolbox->ShowItem( _nId ) : pToolbox->HideItem( _nId ); } diff --git a/dbaccess/source/ui/control/FieldDescControl.cxx b/dbaccess/source/ui/control/FieldDescControl.cxx index a7c63001815d..06e2b2ddb772 100644 --- a/dbaccess/source/ui/control/FieldDescControl.cxx +++ b/dbaccess/source/ui/control/FieldDescControl.cxx @@ -1005,7 +1005,7 @@ OPropNumericEditCtrl* OFieldDescControl::CreateNumericControl(sal_uInt16 _nHelpS pControl->SetDecimalDigits(0); pControl->SetMin(0); pControl->SetMax(0x7FFFFFFF); // Should be changed outside, if needed - pControl->SetStrictFormat(sal_True); + pControl->SetStrictFormat(true); InitializeControl(pControl,_sHelpId,false); diff --git a/dbaccess/source/ui/control/TableGrantCtrl.cxx b/dbaccess/source/ui/control/TableGrantCtrl.cxx index baa120e64c1d..ef3d35738b64 100644 --- a/dbaccess/source/ui/control/TableGrantCtrl.cxx +++ b/dbaccess/source/ui/control/TableGrantCtrl.cxx @@ -123,7 +123,7 @@ void OTableGrantControl::Init() if(!m_pCheckCell) { m_pCheckCell = new CheckBoxControl( &GetDataWindow() ); - m_pCheckCell->GetBox().EnableTriState(sal_False); + m_pCheckCell->GetBox().EnableTriState(false); m_pEdit = new Edit( &GetDataWindow() ); m_pEdit->SetReadOnly(); diff --git a/dbaccess/source/ui/control/opendoccontrols.cxx b/dbaccess/source/ui/control/opendoccontrols.cxx index ed1e47beddb3..6ec27a9266a0 100644 --- a/dbaccess/source/ui/control/opendoccontrols.cxx +++ b/dbaccess/source/ui/control/opendoccontrols.cxx @@ -178,8 +178,8 @@ namespace dbaui // Place icon left of text and both centered in the button. SetModeImage( GetCommandIcon( ".uno:Open", m_sModule ) ); - EnableImageDisplay( sal_True ); - EnableTextDisplay( sal_True ); + EnableImageDisplay( true ); + EnableTextDisplay( true ); SetImageAlign( IMAGEALIGN_LEFT ); SetStyle( GetStyle() | WB_CENTER ); } diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx index 8f3938532b88..b1f377e04e4e 100644 --- a/dbaccess/source/ui/control/sqledit.cxx +++ b/dbaccess/source/ui/control/sqledit.cxx @@ -100,7 +100,7 @@ OSqlEdit::OSqlEdit( OQueryTextView* pParent, WinBits nWinStyle ) : m_ColorConfig.AddListener(this); //#i97044# - EnableFocusSelectionHide( sal_False ); + EnableFocusSelectionHide( false ); } OSqlEdit::~OSqlEdit() diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx index 9caceece2845..bb8683a84d70 100644 --- a/dbaccess/source/ui/control/toolboxcontroller.cxx +++ b/dbaccess/source/ui/control/toolboxcontroller.cxx @@ -240,7 +240,7 @@ namespace dbaui Point aPoint = pToolBox->GetItemRect( m_nToolBoxId ).TopLeft(); MouseEvent aLeave( aPoint, 0, MOUSE_LEAVEWINDOW | MOUSE_SYNTHETIC ); pToolBox->MouseMove( aLeave ); - pToolBox->SetItemDown( m_nToolBoxId, sal_False); + pToolBox->SetItemDown( m_nToolBoxId, false); if ( nSelected ) { diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index fa4782c6382c..24bec7cb8f6a 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -767,7 +767,7 @@ using namespace ::com::sun::star; m_pCBOpenAfterwards->SetClickHdl(LINK(this, OFinalDBPageSetup, OnOpenSelected)); m_pCBStartTableWizard->SetClickHdl(getControlModifiedLink()); - m_pRBRegisterDataSource->SetState(sal_True); + m_pRBRegisterDataSource->SetState(true); } OFinalDBPageSetup::~OFinalDBPageSetup() diff --git a/dbaccess/source/ui/dlg/RelationDlg.cxx b/dbaccess/source/ui/dlg/RelationDlg.cxx index 17be35bb6738..e92081eb4f13 100644 --- a/dbaccess/source/ui/dlg/RelationDlg.cxx +++ b/dbaccess/source/ui/dlg/RelationDlg.cxx @@ -105,18 +105,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD { case KeyRule::NO_ACTION: case KeyRule::RESTRICT: - aRB_NoCascUpd.Check( sal_True ); + aRB_NoCascUpd.Check( true ); break; case KeyRule::CASCADE: - aRB_CascUpd.Check( sal_True ); + aRB_CascUpd.Check( true ); break; case KeyRule::SET_NULL: - aRB_CascUpdNull.Check( sal_True ); + aRB_CascUpdNull.Check( true ); break; case KeyRule::SET_DEFAULT: - aRB_CascUpdDefault.Check( sal_True ); + aRB_CascUpdDefault.Check( true ); break; } @@ -125,18 +125,18 @@ void ORelationDialog::Init(const TTableConnectionData::value_type& _pConnectionD { case KeyRule::NO_ACTION: case KeyRule::RESTRICT: - aRB_NoCascDel.Check( sal_True ); + aRB_NoCascDel.Check( true ); break; case KeyRule::CASCADE: - aRB_CascDel.Check( sal_True ); + aRB_CascDel.Check( true ); break; case KeyRule::SET_NULL: - aRB_CascDelNull.Check( sal_True ); + aRB_CascDelNull.Check( true ); break; case KeyRule::SET_DEFAULT: - aRB_CascDelDefault.Check( sal_True ); + aRB_CascDelDefault.Check( true ); break; } } diff --git a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx index 3bf9c3f589f1..1d014a78dfe3 100644 --- a/dbaccess/source/ui/dlg/TextConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/TextConnectionHelper.cxx @@ -110,7 +110,7 @@ namespace dbaui m_aRBAccessTextFiles.SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); m_aRBAccessCSVFiles.SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); m_aRBAccessOtherFiles.SetToggleHdl(LINK(this, OTextConnectionHelper, OnSetExtensionHdl)); - m_aRBAccessCSVFiles.Check(sal_True); + m_aRBAccessCSVFiles.Check(true); struct SectionDescriptor { @@ -422,12 +422,12 @@ namespace dbaui void OTextConnectionHelper::SetExtension(const OUString& _rVal) { if (_rVal == "txt") - m_aRBAccessTextFiles.Check(sal_True); + m_aRBAccessTextFiles.Check(true); else if (_rVal == "csv") - m_aRBAccessCSVFiles.Check(sal_True); + m_aRBAccessCSVFiles.Check(true); else { - m_aRBAccessOtherFiles.Check(sal_True); + m_aRBAccessOtherFiles.Check(true); m_aFTExtensionExample.SetText(_rVal); } } diff --git a/dbaccess/source/ui/dlg/adtabdlg.cxx b/dbaccess/source/ui/dlg/adtabdlg.cxx index aabdbd9ecefc..e524794a0a23 100644 --- a/dbaccess/source/ui/dlg/adtabdlg.cxx +++ b/dbaccess/source/ui/dlg/adtabdlg.cxx @@ -371,15 +371,15 @@ void OAddTableDlg::impl_switchTo( ObjectList _eList ) switch ( _eList ) { case Tables: - m_pTableList->Show( true ); m_pCaseTables->Check( sal_True ); - m_pQueryList->Show( false ); m_pCaseQueries->Check( sal_False ); + m_pTableList->Show( true ); m_pCaseTables->Check( true ); + m_pQueryList->Show( false ); m_pCaseQueries->Check( false ); m_xCurrentList.reset( new TableListFacade( *m_pTableList, m_rContext.getConnection() ) ); m_pTableList->GrabFocus(); break; case Queries: - m_pTableList->Show( false ); m_pCaseTables->Check( sal_False ); - m_pQueryList->Show( true ); m_pCaseQueries->Check( sal_True ); + m_pTableList->Show( false ); m_pCaseTables->Check( false ); + m_pQueryList->Show( true ); m_pCaseQueries->Check( true ); m_xCurrentList.reset( new QueryListFacade( *m_pQueryList, m_rContext.getConnection() ) ); m_pQueryList->GrabFocus(); break; @@ -433,7 +433,7 @@ IMPL_LINK( OAddTableDlg, TableListSelectHdl, void*, /*EMPTY_ARG*/ ) IMPL_LINK( OAddTableDlg, CloseClickHdl, Button*, /*pButton*/ ) { - return Close(); + return int(Close()); } IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ ) @@ -445,7 +445,7 @@ IMPL_LINK( OAddTableDlg, OnTypeSelected, void*, /*EMPTY_ARG*/ ) return 0; } -sal_Bool OAddTableDlg::Close() +bool OAddTableDlg::Close() { m_rContext.onWindowClosing( this ); return ModelessDialog::Close(); diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 54d7c8227827..62780d7d536b 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -102,7 +102,7 @@ namespace dbaui // check whether this must be a tristate check box const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId ); if ( rItem.ISA( OptionalBoolItem ) ) - (*setting->ppControl)->EnableTriState( sal_True ); + (*setting->ppControl)->EnableTriState( true ); } } @@ -126,7 +126,7 @@ namespace dbaui get(m_pMaxRowScanLabel, "rowsft"); get(m_pMaxRowScan, "rows"); m_pMaxRowScan->SetModifyHdl(getControlModifiedLink()); - m_pMaxRowScan->SetUseThousandSep(sal_False); + m_pMaxRowScan->SetUseThousandSep(false); m_pMaxRowScanLabel->Show(); m_pMaxRowScan->Show(); } diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 257d850535b8..cd42dca4aa2f 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -174,7 +174,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou // reset the pages // prevent flicker - SetUpdateMode(sal_False); + SetUpdateMode(false); // remove all items which relate to indirect properties from the input set // (without this, the following may happen: select an arbitrary data source where some indirect properties @@ -213,7 +213,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou // if this is NULL, the page has not been created yet, which means we're called before the // dialog was displayed (probably from inside the ctor) - SetUpdateMode(sal_True); + SetUpdateMode(true); } void ODbAdminDialog::setTitle(const OUString& _sTitle) diff --git a/dbaccess/source/ui/dlg/detailpages.cxx b/dbaccess/source/ui/dlg/detailpages.cxx index b8d1dae72c2c..69f9bb241f16 100644 --- a/dbaccess/source/ui/dlg/detailpages.cxx +++ b/dbaccess/source/ui/dlg/detailpages.cxx @@ -705,7 +705,7 @@ namespace dbaui m_aNFPortNumber.SetModifyHdl(getControlModifiedLink()); m_aNFRowCount.SetModifyHdl(getControlModifiedLink()); - m_aNFRowCount.SetUseThousandSep(sal_False); + m_aNFRowCount.SetUseThousandSep(false); m_iNormalPort = 389; m_iSSLPort = 636; m_aCBUseSSL.SetClickHdl(LINK(this, OLDAPDetailsPage,OnCheckBoxClick)); diff --git a/dbaccess/source/ui/dlg/dlgsize.cxx b/dbaccess/source/ui/dlg/dlgsize.cxx index 757176a4ffdd..404c46c57bb7 100644 --- a/dbaccess/source/ui/dlg/dlgsize.cxx +++ b/dbaccess/source/ui/dlg/dlgsize.cxx @@ -40,7 +40,7 @@ DlgSize::DlgSize( Window* pParent, sal_Int32 nVal, sal_Bool bRow, sal_Int32 _nAl m_nStandard = _nAlternativeStandard; m_pCB_STANDARD->SetClickHdl(LINK(this,DlgSize,CbClickHdl)); - m_pMF_VALUE->EnableEmptyFieldValue(sal_True); + m_pMF_VALUE->EnableEmptyFieldValue(true); sal_Bool bDefault = -1 == nVal; m_pCB_STANDARD->Check(bDefault); if (bDefault) diff --git a/dbaccess/source/ui/dlg/dsselect.cxx b/dbaccess/source/ui/dlg/dsselect.cxx index 45c56059fce7..6342466c4320 100644 --- a/dbaccess/source/ui/dlg/dsselect.cxx +++ b/dbaccess/source/ui/dlg/dsselect.cxx @@ -81,7 +81,7 @@ IMPL_LINK( ODatasourceSelectDialog, ListDblClickHdl, ListBox *, pListBox ) return 0; } -sal_Bool ODatasourceSelectDialog::Close() +bool ODatasourceSelectDialog::Close() { #ifdef HAVE_ODBC_ADMINISTRATION if ( m_pODBCManagement.get() && m_pODBCManagement->isRunning() ) diff --git a/dbaccess/source/ui/dlg/dsselect.hxx b/dbaccess/source/ui/dlg/dsselect.hxx index 6623766a6a09..4d8b1a33f416 100644 --- a/dbaccess/source/ui/dlg/dsselect.hxx +++ b/dbaccess/source/ui/dlg/dsselect.hxx @@ -58,7 +58,7 @@ public: OUString GetSelected() const { return m_pDatasource->GetSelectEntry();} void Select( const OUString& _rEntry ) { m_pDatasource->SelectEntry(_rEntry); } - virtual sal_Bool Close(); + virtual bool Close(); protected: DECL_LINK( ListDblClickHdl, ListBox * ); diff --git a/dbaccess/source/ui/dlg/indexdialog.cxx b/dbaccess/source/ui/dlg/indexdialog.cxx index 3e089a7401af..b942f75c85d9 100644 --- a/dbaccess/source/ui/dlg/indexdialog.cxx +++ b/dbaccess/source/ui/dlg/indexdialog.cxx @@ -752,7 +752,7 @@ namespace dbaui } else { - m_aUnique.Check(sal_False); + m_aUnique.Check(false); m_pFields->initializeFrom(IndexFields()); m_aDescription.SetText(OUString()); } diff --git a/dbaccess/source/ui/dlg/queryorder.cxx b/dbaccess/source/ui/dlg/queryorder.cxx index 2fabcb4ca785..73dc464c9c0e 100644 --- a/dbaccess/source/ui/dlg/queryorder.cxx +++ b/dbaccess/source/ui/dlg/queryorder.cxx @@ -64,7 +64,7 @@ DlgOrderCrit::DlgOrderCrit(Window * pParent, AllSettings aSettings( GetSettings() ); StyleSettings aStyle( aSettings.GetStyleSettings() ); - aStyle.SetAutoMnemonic( sal_False ); + aStyle.SetAutoMnemonic( false ); aSettings.SetStyleSettings( aStyle ); SetSettings( aSettings ); diff --git a/dbaccess/source/ui/inc/adtabdlg.hxx b/dbaccess/source/ui/inc/adtabdlg.hxx index 947e582ef421..d38e0ca927fc 100644 --- a/dbaccess/source/ui/inc/adtabdlg.hxx +++ b/dbaccess/source/ui/inc/adtabdlg.hxx @@ -89,7 +89,7 @@ namespace dbaui IAddTableDialogContext& _rContext ); private: - virtual sal_Bool Close(); + virtual bool Close(); bool impl_isAddAllowed(); void impl_addTable(); diff --git a/dbaccess/source/ui/misc/WCPage.cxx b/dbaccess/source/ui/misc/WCPage.cxx index 608956e5176d..da553dbe4a63 100644 --- a/dbaccess/source/ui/misc/WCPage.cxx +++ b/dbaccess/source/ui/misc/WCPage.cxx @@ -76,7 +76,7 @@ OCopyTable::OCopyTable( Window * pParent ) if ( !m_pParent->supportsViews() ) m_aRB_View.Disable(); - m_aCB_UseHeaderLine.Check(sal_True); + m_aCB_UseHeaderLine.Check(true); m_bPKeyAllowed = m_pParent->supportsPrimaryKey(); m_aCB_PrimaryColumn.Enable(m_bPKeyAllowed); @@ -326,26 +326,26 @@ void OCopyTable::setCreateStyleAction() switch(m_pParent->getOperation()) { case CopyTableOperation::CopyDefinitionAndData: - m_aRB_DefData.Check(sal_True); + m_aRB_DefData.Check(true); RadioChangeHdl(&m_aRB_DefData); break; case CopyTableOperation::CopyDefinitionOnly: - m_aRB_Def.Check(sal_True); + m_aRB_Def.Check(true); RadioChangeHdl(&m_aRB_Def); break; case CopyTableOperation::AppendData: - m_aRB_AppendData.Check(sal_True); + m_aRB_AppendData.Check(true); SetAppendDataRadio(); break; case CopyTableOperation::CreateAsView: if ( m_aRB_View.IsEnabled() ) { - m_aRB_View.Check(sal_True); + m_aRB_View.Check(true); RadioChangeHdl(&m_aRB_View); } else { - m_aRB_DefData.Check(sal_True); + m_aRB_DefData.Check(true); RadioChangeHdl(&m_aRB_DefData); } } diff --git a/dbaccess/source/ui/misc/WColumnSelect.cxx b/dbaccess/source/ui/misc/WColumnSelect.cxx index 7b88e533f59c..99387266152c 100644 --- a/dbaccess/source/ui/misc/WColumnSelect.cxx +++ b/dbaccess/source/ui/misc/WColumnSelect.cxx @@ -67,8 +67,8 @@ OWizColumnSelect::OWizColumnSelect( Window* pParent) m_ibColumns_RH.SetClickHdl(LINK(this,OWizColumnSelect,ButtonClickHdl)); m_ibColumns_LH.SetClickHdl(LINK(this,OWizColumnSelect,ButtonClickHdl)); - m_lbOrgColumnNames.EnableMultiSelection(sal_True); - m_lbNewColumnNames.EnableMultiSelection(sal_True); + m_lbOrgColumnNames.EnableMultiSelection(true); + m_lbNewColumnNames.EnableMultiSelection(true); m_lbOrgColumnNames.SetDoubleClickHdl(LINK(this,OWizColumnSelect,ListDoubleClickHdl)); m_lbNewColumnNames.SetDoubleClickHdl(LINK(this,OWizColumnSelect,ListDoubleClickHdl)); diff --git a/dbaccess/source/ui/misc/WTypeSelect.cxx b/dbaccess/source/ui/misc/WTypeSelect.cxx index 30953491fa81..d1130fabb9a4 100644 --- a/dbaccess/source/ui/misc/WTypeSelect.cxx +++ b/dbaccess/source/ui/misc/WTypeSelect.cxx @@ -235,7 +235,7 @@ OWizTypeSelect::OWizTypeSelect( Window* pParent, SvStream* _pStream ) m_etAuto.SetText(OUString("10")); m_etAuto.SetDecimalDigits(0); m_pbAuto.SetClickHdl(LINK(this,OWizTypeSelect,ButtonClickHdl)); - m_lbColumnNames.EnableMultiSelection(sal_True); + m_lbColumnNames.EnableMultiSelection(true); try { diff --git a/dbaccess/source/ui/querydesign/JoinTableView.cxx b/dbaccess/source/ui/querydesign/JoinTableView.cxx index 75db5a29385c..203452c88915 100644 --- a/dbaccess/source/ui/querydesign/JoinTableView.cxx +++ b/dbaccess/source/ui/querydesign/JoinTableView.cxx @@ -968,7 +968,7 @@ sal_Bool OJoinTableView::ExistsAConn(const OTableWindow* pFrom) const void OJoinTableView::ClearAll() { - SetUpdateMode(sal_False); + SetUpdateMode(false); HideTabWins(); @@ -1474,7 +1474,7 @@ void OJoinTableView::StateChanged( StateChangedType nType ) void OJoinTableView::HideTabWins() { - SetUpdateMode(sal_False); + SetUpdateMode(false); OTableWindowMap* pTabWins = GetTabWinMap(); if ( pTabWins ) @@ -1489,7 +1489,7 @@ void OJoinTableView::HideTabWins() m_pView->getController().setModified(sal_True); - SetUpdateMode(sal_True); + SetUpdateMode(true); } diff --git a/dbaccess/source/ui/querydesign/LimitBox.cxx b/dbaccess/source/ui/querydesign/LimitBox.cxx index 5f4510dbe5fd..194f029c2d32 100644 --- a/dbaccess/source/ui/querydesign/LimitBox.cxx +++ b/dbaccess/source/ui/querydesign/LimitBox.cxx @@ -35,7 +35,7 @@ namespace dbaui LimitBox::LimitBox( Window* pParent, WinBits nStyle ) : NumericBox( pParent, nStyle ) { - SetShowTrailingZeros( sal_False ); + SetShowTrailingZeros( false ); SetDecimalDigits( 0 ); SetMin( -1 ); SetMax( SAL_MAX_INT64 ); diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx index f50aadb57207..1843379ff6c9 100644 --- a/dbaccess/source/ui/querydesign/QueryTableView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx @@ -318,7 +318,7 @@ void OQueryTableView::ClearAll() { OJoinTableView::ClearAll(); - SetUpdateMode(sal_True); + SetUpdateMode(true); m_pView->getController().setModified(sal_True); } diff --git a/dbaccess/source/ui/querydesign/QueryTextView.cxx b/dbaccess/source/ui/querydesign/QueryTextView.cxx index a63c6a4cb23d..4ebfebdd6d29 100644 --- a/dbaccess/source/ui/querydesign/QueryTextView.cxx +++ b/dbaccess/source/ui/querydesign/QueryTextView.cxx @@ -42,7 +42,7 @@ OQueryTextView::OQueryTextView(OQueryContainerWindow* _pParent) :Window(_pParent) { m_pEdit = new OSqlEdit(this); - m_pEdit->SetRightToLeft(sal_False); + m_pEdit->SetRightToLeft(false); m_pEdit->ClearModifyFlag(); m_pEdit->SaveValue(); m_pEdit->SetPosPixel( Point( 0, 0 ) ); diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 54754ad0e28a..4ce398c5c864 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -131,7 +131,7 @@ OSelectionBrowseBox::OSelectionBrowseBox( Window* pParent ) m_pFunctionCell->SetHelpId(HID_QRYDGN_ROW_FUNCTION); // switch off triState of ::com::sun::star::form::CheckBox - m_pVisibleCell->GetBox().EnableTriState( sal_False ); + m_pVisibleCell->GetBox().EnableTriState( false ); Font aTitleFont = OutputDevice::GetDefaultFont( DEFAULTFONT_SANS_UNICODE,Window::GetSettings().GetLanguageTag().getLanguageType(),DEFAULTFONT_FLAGS_ONLYONE); aTitleFont.SetSize(Size(0, 6)); @@ -323,7 +323,7 @@ void OSelectionBrowseBox::Init() // set the header bar BrowserHeader* pNewHeaderBar = CreateHeaderBar(this); - pNewHeaderBar->SetMouseTransparent(sal_False); + pNewHeaderBar->SetMouseTransparent(false); SetHeaderBar(pNewHeaderBar); SetMode(m_nMode); diff --git a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx index ae990328e79b..207f2fe484e8 100644 --- a/dbaccess/source/ui/querydesign/TableWindowTitle.cxx +++ b/dbaccess/source/ui/querydesign/TableWindowTitle.cxx @@ -49,7 +49,7 @@ OTableWindowTitle::OTableWindowTitle( OTableWindow* pParent ) : SetTextColor(aSystemStyle.GetButtonTextColor()); Font aFont( GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); SetFont( aFont ); } diff --git a/dbaccess/source/ui/querydesign/querydlg.cxx b/dbaccess/source/ui/querydesign/querydlg.cxx index 0782c3a4938f..085450e73d90 100644 --- a/dbaccess/source/ui/querydesign/querydlg.cxx +++ b/dbaccess/source/ui/querydesign/querydlg.cxx @@ -214,7 +214,7 @@ IMPL_LINK( DlgQryJoin, LBChangeHdl, ListBox*, /*pListBox*/ ) m_pConnData->ResetConnLines(); m_pTableControl->lateInit(); - m_pJoinControl->m_aCBNatural.Check(sal_False); + m_pJoinControl->m_aCBNatural.Check(false); m_pTableControl->enableRelation(false); OUString sEmpty; m_pConnData->AppendConnLine(sEmpty,sEmpty); diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index d4cd2274a7c0..fe794e2d9ac4 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -1412,8 +1412,8 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) SelectColumnId( nColId ); PopupMenu aContextMenu( ModuleRes( RID_QUERYCOLPOPUPMENU ) ); - aContextMenu.EnableItem( SID_DELETE, sal_False ); - aContextMenu.RemoveDisabledEntries(sal_True, sal_True); + aContextMenu.EnableItem( SID_DELETE, false ); + aContextMenu.RemoveDisabledEntries(true, true); switch ( aContextMenu.Execute( this, aMenuPos ) ) { case ID_BROWSER_COLWIDTH: @@ -1436,7 +1436,7 @@ void OTableEditorCtrl::Command(const CommandEvent& rEvt) aContextMenu.CheckItem( SID_TABLEDESIGN_TABED_PRIMARYKEY, IsRowSelected(GetCurRow()) && IsPrimaryKey() ); // remove all the disable entries - aContextMenu.RemoveDisabledEntries(sal_True, sal_True); + aContextMenu.RemoveDisabledEntries(true, true); if( SetDataPtr(m_nDataPos) ) pDescrWin->SaveData( pActRow->GetActFieldDescr() ); diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx index efe4edc4a4b9..58700919638e 100644 --- a/desktop/inc/app.hxx +++ b/desktop/inc/app.hxx @@ -76,7 +76,7 @@ class Desktop : public Application virtual void Init(); virtual void InitFinished(); virtual void DeInit(); - virtual sal_Bool QueryExit(); + virtual bool QueryExit(); virtual sal_uInt16 Exception(sal_uInt16 nError); virtual void OverrideSystemSettings( AllSettings& rSettings ); virtual void AppEvent( const ApplicationEvent& rAppEvent ); diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 316580e75f18..eb938930885e 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -703,7 +703,7 @@ void Desktop::DeInit() SAL_INFO( "desktop.app", "FINISHED WITH Destop::DeInit" ); } -sal_Bool Desktop::QueryExit() +bool Desktop::QueryExit() { try { diff --git a/desktop/source/deployment/gui/descedit.cxx b/desktop/source/deployment/gui/descedit.cxx index 7554c64b1154..0a30de2f0e0b 100644 --- a/desktop/source/deployment/gui/descedit.cxx +++ b/desktop/source/deployment/gui/descedit.cxx @@ -50,7 +50,7 @@ void DescriptionEdit::Init() // read-only SetReadOnly(); // no cursor - EnableCursor( sal_False ); + EnableCursor( false ); } // ----------------------------------------------------------------------- diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx index df4b1245fb64..66cdab2ed355 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx @@ -1176,7 +1176,7 @@ bool ExtMgrDialog::Notify( NotifyEvent& rNEvt ) } //------------------------------------------------------------------------------ -sal_Bool ExtMgrDialog::Close() +bool ExtMgrDialog::Close() { bool bRet = m_pManager->queryTermination(); if ( bRet ) @@ -1556,7 +1556,7 @@ void UpdateRequiredDialog::Resize() Rectangle aNativeControlRegion, aNativeContentRegion; if( GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, OUString(), - aNativeControlRegion, aNativeContentRegion ) != sal_False ) + aNativeControlRegion, aNativeContentRegion ) ) { nProgressHeight = aNativeControlRegion.GetHeight(); } @@ -1601,7 +1601,7 @@ short UpdateRequiredDialog::Execute() //------------------------------------------------------------------------------ // VCL::Dialog -sal_Bool UpdateRequiredDialog::Close() +bool UpdateRequiredDialog::Close() { ::osl::MutexGuard aGuard( m_aMutex ); diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.hxx b/desktop/source/deployment/gui/dp_gui_dialog2.hxx index b4817edb213b..39f122e16be7 100644 --- a/desktop/source/deployment/gui/dp_gui_dialog2.hxx +++ b/desktop/source/deployment/gui/dp_gui_dialog2.hxx @@ -142,7 +142,7 @@ public: virtual ~ExtMgrDialog(); virtual bool Notify( NotifyEvent& rNEvt ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void showProgress( bool bStart ); virtual void updateProgress( const OUString &rText, @@ -216,7 +216,7 @@ public: virtual short Execute(); virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void showProgress( bool bStart ); virtual void updateProgress( const OUString &rText, diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx index 3bae5ce8558a..d91dd066c15c 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.cxx @@ -578,7 +578,7 @@ UpdateDialog::~UpdateDialog() } //------------------------------------------------------------------------------ -sal_Bool UpdateDialog::Close() { +bool UpdateDialog::Close() { m_thread->stop(); return ModalDialog::Close(); } diff --git a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx index b19e575986cf..1fe77c521d5c 100644 --- a/desktop/source/deployment/gui/dp_gui_updatedialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updatedialog.hxx @@ -86,7 +86,7 @@ public: ~UpdateDialog(); - virtual sal_Bool Close(); + virtual bool Close(); virtual short Execute(); diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx index e76153b650bf..23e68f35abbd 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.cxx @@ -235,14 +235,14 @@ UpdateInstallDialog::UpdateInstallDialog( m_xExtensionManager = css::deployment::ExtensionManager::get( xCtx ); m_cancel.SetClickHdl(LINK(this, UpdateInstallDialog, cancelHandler)); - m_mle_info.EnableCursor(sal_False); + m_mle_info.EnableCursor(false); if ( ! dp_misc::office_is_running()) m_help.Disable(); } UpdateInstallDialog::~UpdateInstallDialog() {} -sal_Bool UpdateInstallDialog::Close() +bool UpdateInstallDialog::Close() { m_thread->stop(); return ModalDialog::Close(); diff --git a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx index 3a61fe033c03..2bd9daf6c328 100644 --- a/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx +++ b/desktop/source/deployment/gui/dp_gui_updateinstalldialog.hxx @@ -62,7 +62,7 @@ public: ~UpdateInstallDialog(); - sal_Bool Close(); + bool Close(); virtual short Execute(); private: diff --git a/desktop/source/splash/splash.cxx b/desktop/source/splash/splash.cxx index 755684be2bef..c85d3b7f87f4 100644 --- a/desktop/source/splash/splash.cxx +++ b/desktop/source/splash/splash.cxx @@ -169,7 +169,7 @@ void SAL_CALL SplashScreen::start(const OUString&, sal_Int32 nRange) _bProgressEnd = sal_False; SolarMutexGuard aSolarGuard; if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( sal_True ); + ShowFullScreenMode( true ); Show(); Paint(Rectangle()); Flush(); @@ -196,7 +196,7 @@ void SAL_CALL SplashScreen::reset() if (_bVisible && !_bProgressEnd ) { if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( sal_True ); + ShowFullScreenMode( true ); Show(); updateStatus(); } @@ -213,7 +213,7 @@ void SAL_CALL SplashScreen::setText(const OUString& rText) if (_bVisible && !_bProgressEnd) { if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( sal_True ); + ShowFullScreenMode( true ); Show(); updateStatus(); } @@ -229,7 +229,7 @@ void SAL_CALL SplashScreen::setValue(sal_Int32 nValue) SolarMutexGuard aSolarGuard; if (_bVisible && !_bProgressEnd) { if ( _eBitmapMode == BM_FULLSCREEN ) - ShowFullScreenMode( sal_True ); + ShowFullScreenMode( true ); Show(); if (nValue >= _iMax) _iProgress = _iMax; else _iProgress = nValue; diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index ca96b233c8d4..d091cf4b197d 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -106,8 +106,8 @@ namespace VirtualDevice aVirtualDeviceMask(*Application::GetDefaultDevice(), 1L); // Prepare VirtualDevices and their states - aVirtualDevice.EnableMapMode(sal_False); - aVirtualDeviceMask.EnableMapMode(sal_False); + aVirtualDevice.EnableMapMode(false); + aVirtualDeviceMask.EnableMapMode(false); aVirtualDevice.SetOutputSizePixel(maAnimation.GetDisplaySizePixel()); aVirtualDeviceMask.SetOutputSizePixel(maAnimation.GetDisplaySizePixel()); aVirtualDevice.Erase(); diff --git a/editeng/source/editeng/editattr.cxx b/editeng/source/editeng/editattr.cxx index d5e7e23f94bf..b764d47d8efc 100644 --- a/editeng/source/editeng/editattr.cxx +++ b/editeng/source/editeng/editattr.cxx @@ -244,7 +244,7 @@ EditCharAttribShadow::EditCharAttribShadow( const SvxShadowedItem& rAttr, sal_uI void EditCharAttribShadow::SetFont( SvxFont& rFont, OutputDevice* ) { - rFont.SetShadow( (sal_Bool)((const SvxShadowedItem*)GetItem())->GetValue() ); + rFont.SetShadow( ((const SvxShadowedItem*)GetItem())->GetValue() ); } // ------------------------------------------------------------------------- @@ -280,7 +280,7 @@ EditCharAttribOutline::EditCharAttribOutline( const SvxContourItem& rAttr, sal_u void EditCharAttribOutline::SetFont( SvxFont& rFont, OutputDevice* ) { - rFont.SetOutline( (sal_Bool)((const SvxContourItem*)GetItem())->GetValue() ); + rFont.SetOutline( ((const SvxContourItem*)GetItem())->GetValue() ); } // ------------------------------------------------------------------------- @@ -325,7 +325,7 @@ void EditCharAttribField::SetFont( SvxFont& rFont, OutputDevice* ) if ( pFldColor ) { rFont.SetFillColor( *pFldColor ); - rFont.SetTransparent( sal_False ); + rFont.SetTransparent( false ); } if ( pTxtColor ) rFont.SetColor( *pTxtColor ); diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx index 51ba58791968..0478e343fef8 100644 --- a/editeng/source/editeng/editdoc.cxx +++ b/editeng/source/editeng/editdoc.cxx @@ -1918,7 +1918,7 @@ void CreateFont( SvxFont& rFont, const SfxItemSet& rSet, bool bSearchInParent, s { Font aPrevFont( rFont ); rFont.SetAlign( ALIGN_BASELINE ); - rFont.SetTransparent( sal_True ); + rFont.SetTransparent( true ); sal_uInt16 nWhich_FontInfo = GetScriptItemId( EE_CHAR_FONTINFO, nScriptType ); sal_uInt16 nWhich_Language = GetScriptItemId( EE_CHAR_LANGUAGE, nScriptType ); diff --git a/editeng/source/editeng/editsel.cxx b/editeng/source/editeng/editsel.cxx index 23d13ba30032..1ef2fddd997d 100644 --- a/editeng/source/editeng/editsel.cxx +++ b/editeng/source/editeng/editsel.cxx @@ -44,20 +44,20 @@ void EditSelFunctionSet::DestroyAnchor() // Only with multiple selection } -sal_Bool EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool ) +bool EditSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool ) { if ( pCurView ) return pCurView->pImpEditView->SetCursorAtPoint( rPointPixel ); - return sal_False; + return false; } -sal_Bool EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +bool EditSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { if ( pCurView ) return pCurView->pImpEditView->IsSelectionAtPoint( rPointPixel ); - return sal_False; + return false; } void EditSelFunctionSet::DeselectAtPoint( const Point& ) @@ -85,7 +85,7 @@ void EditSelFunctionSet::DeselectAll() EditSelectionEngine::EditSelectionEngine() : SelectionEngine( (Window*)0 ) { SetSelectionMode( RANGE_SELECTION ); - EnableDrag( sal_True ); + EnableDrag( true ); } void EditSelectionEngine::SetCurView( EditView* pNewView ) diff --git a/editeng/source/editeng/editsel.hxx b/editeng/source/editeng/editsel.hxx index 769e832ffccf..c9073e5d4032 100644 --- a/editeng/source/editeng/editsel.hxx +++ b/editeng/source/editeng/editsel.hxx @@ -37,9 +37,9 @@ public: virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); + virtual bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); - virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); + virtual bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx index cd1badd6ab64..637a1c597374 100644 --- a/editeng/source/editeng/editview.cxx +++ b/editeng/source/editeng/editview.cxx @@ -901,11 +901,11 @@ void EditView::ExecuteSpellPopup( const Point& rPosPixel, Link* pCallBack ) } } if ( pInsertMenu->GetItemCount() != 1) - aPopupMenu.EnableItem( MN_INSERT_SINGLE, sal_False ); + aPopupMenu.EnableItem( MN_INSERT_SINGLE, false ); if ( pInsertMenu->GetItemCount() < 2 ) - aPopupMenu.EnableItem( MN_INSERT, sal_False ); + aPopupMenu.EnableItem( MN_INSERT, false ); - aPopupMenu.RemoveDisabledEntries( sal_True, sal_True ); + aPopupMenu.RemoveDisabledEntries( true, true ); Rectangle aTempRect = PIMPEE->PaMtoEditCursor( aPaM, GETCRSR_TXTONLY ); Point aScreenPos = pImpEditView->GetWindowPos( aTempRect.TopLeft() ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 7ab6412297a0..43d3f702482c 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -318,7 +318,7 @@ sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pVie if ( rMEvt.GetClicks() == 2 ) { // So that the SelectionEngine knows about the anchor. - aSelEngine.CursorPosChanging( sal_True, sal_False ); + aSelEngine.CursorPosChanging( true, false ); EditSelection aNewSelection( SelectWord( aCurSel ) ); pView->pImpEditView->DrawSelection(); @@ -329,7 +329,7 @@ sal_Bool ImpEditEngine::MouseButtonDown( const MouseEvent& rMEvt, EditView* pVie else if ( rMEvt.GetClicks() == 3 ) { // So that the SelectionEngine knows about the anchor. - aSelEngine.CursorPosChanging( sal_True, sal_False ); + aSelEngine.CursorPosChanging( true, false ); EditSelection aNewSelection( aCurSel ); aNewSelection.Min().SetIndex( 0 ); diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx index a6968724da5b..88337a915341 100644 --- a/editeng/source/editeng/impedit3.cxx +++ b/editeng/source/editeng/impedit3.cxx @@ -2763,7 +2763,7 @@ void ImpEditEngine::SeekCursor( ContentNode* pNode, sal_Int32 nPos, SvxFont& rFo const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); rFont.SetColor( rStyleSettings.GetHighlightTextColor() ); rFont.SetFillColor( rStyleSettings.GetHighlightColor() ); - rFont.SetTransparent( sal_False ); + rFont.SetTransparent( false ); } else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) { @@ -3004,7 +3004,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt ( GetBackgroundColor() != COL_AUTO ) && GetBackgroundColor().IsDark() && ( IsAutoColorEnabled() && ( pOutDev->GetOutDevType() != OUTDEV_PRINTER ) ) ) { - aTmpFont.SetTransparent( sal_True ); + aTmpFont.SetTransparent( true ); pOutDev->SetFillColor(); pOutDev->SetLineColor( GetAutoColor() ); bDrawFrame = true; @@ -3514,7 +3514,7 @@ void ImpEditEngine::Paint( OutputDevice* pOutDev, Rectangle aClipRect, Point aSt if ( pTextPortion->GetExtraValue() && ( pTextPortion->GetExtraValue() != ' ' ) ) { SeekCursor( pPortion->GetNode(), nIndex+1, aTmpFont, pOutDev ); - aTmpFont.SetTransparent( sal_False ); + aTmpFont.SetTransparent( false ); aTmpFont.SetEscapement( 0 ); aTmpFont.SetPhysFont( pOutDev ); long nCharWidth = aTmpFont.QuickGetTextSize( pOutDev, diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx index 9c64912139be..b9d687df002e 100644 --- a/editeng/source/items/bulitem.cxx +++ b/editeng/source/items/bulitem.cxx @@ -211,7 +211,7 @@ void SvxBulletItem::SetDefaultFont_Impl() { aFont = OutputDevice::GetDefaultFont( DEFAULTFONT_FIXED, LANGUAGE_SYSTEM, 0 ); aFont.SetAlign( ALIGN_BOTTOM); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); } // ----------------------------------------------------------------------- diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx index cf67643fc2f0..636c1535f366 100644 --- a/editeng/source/items/svxfont.cxx +++ b/editeng/source/items/svxfont.cxx @@ -678,8 +678,8 @@ void SvxDoDrawCapital::DoSpace( const sal_Bool bDraw ) { sal_Bool bWordWise = pFont->IsWordLineMode(); sal_Bool bTrans = pFont->IsTransparent(); - pFont->SetWordLineMode( sal_False ); - pFont->SetTransparent( sal_True ); + pFont->SetWordLineMode( false ); + pFont->SetTransparent( true ); pFont->SetPhysFont( pOut ); pOut->DrawStretchText( aSpacePos, nDiff, " ", 0, 2 ); pFont->SetWordLineMode( bWordWise ); diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx index 0ac6368c28a7..fd81eff75eda 100644 --- a/editeng/source/misc/swafopt.cxx +++ b/editeng/source/misc/swafopt.cxx @@ -68,7 +68,7 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags() aBulletFont.SetFamily( FAMILY_DONTKNOW ); aBulletFont.SetPitch( PITCH_DONTKNOW ); aBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aBulletFont.SetTransparent( sal_True ); + aBulletFont.SetTransparent( true ); cBullet = 0x2022; cByInputBullet = cBullet; diff --git a/extensions/source/abpilot/abpfinalpage.cxx b/extensions/source/abpilot/abpfinalpage.cxx index 9bb73f179a6d..62cacc19b6df 100644 --- a/extensions/source/abpilot/abpfinalpage.cxx +++ b/extensions/source/abpilot/abpfinalpage.cxx @@ -62,7 +62,7 @@ namespace abp m_aName.SetModifyHdl( LINK(this, FinalPage, OnNameModified) ); m_aLocation.SetModifyHdl( LINK(this, FinalPage, OnNameModified) ); m_aRegisterName.SetClickHdl( LINK( this, FinalPage, OnRegister ) ); - m_aRegisterName.Check(sal_True); + m_aRegisterName.Check(true); } //--------------------------------------------------------------------- diff --git a/extensions/source/abpilot/abspilot.cxx b/extensions/source/abpilot/abspilot.cxx index 012c23ba5561..0c3a07e2d3be 100644 --- a/extensions/source/abpilot/abspilot.cxx +++ b/extensions/source/abpilot/abspilot.cxx @@ -201,7 +201,7 @@ namespace abp } //--------------------------------------------------------------------- - sal_Bool OAddessBookSourcePilot::Close() + bool OAddessBookSourcePilot::Close() { implCleanup(); diff --git a/extensions/source/abpilot/abspilot.hxx b/extensions/source/abpilot/abspilot.hxx index 12bc60be5d4c..26a4135637c6 100644 --- a/extensions/source/abpilot/abspilot.hxx +++ b/extensions/source/abpilot/abspilot.hxx @@ -77,7 +77,7 @@ namespace abp // RoadmapWizard virtual OUString getStateDisplayName( WizardState _nState ) const; - virtual sal_Bool Close(); + virtual bool Close(); private: DECL_LINK( OnCancelClicked, void* ); diff --git a/extensions/source/bibliography/toolbar.cxx b/extensions/source/bibliography/toolbar.cxx index f306179fd779..0d524c60fb16 100644 --- a/extensions/source/bibliography/toolbar.cxx +++ b/extensions/source/bibliography/toolbar.cxx @@ -358,7 +358,7 @@ void BibToolBar::Click() { if(pDatMan) pDatMan->CreateMappingDialog(GetParent()); - CheckItem( nId, sal_False ); + CheckItem( nId, false ); } else if(nId == TBC_BT_CHANGESOURCE) { @@ -368,7 +368,7 @@ void BibToolBar::Click() if(!sNew.isEmpty()) pDatMan->setActiveDataSource(sNew); } - CheckItem( nId, sal_False ); + CheckItem( nId, false ); } } @@ -484,13 +484,13 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/) { EndSelection(); // vor SetDropMode (SetDropMode ruft SetItemImage) - SetItemDown(TBC_BT_AUTOFILTER,sal_True); + SetItemDown(TBC_BT_AUTOFILTER,true); nId = aPopupMenu.Execute(this, GetItemRect(TBC_BT_AUTOFILTER)); if(nId>0) { - aPopupMenu.CheckItem(nSelMenuItem,sal_False); + aPopupMenu.CheckItem(nSelMenuItem,false); aPopupMenu.CheckItem(nId); nSelMenuItem=nId; aQueryField = MnemonicGenerator::EraseAllMnemonicChars( aPopupMenu.GetItemText(nId) ); @@ -507,7 +507,7 @@ IMPL_LINK( BibToolBar, MenuHdl, ToolBox*, /*pToolbox*/) Point aPoint; MouseEvent aLeave( aPoint, 0, MOUSE_LEAVEWINDOW | MOUSE_SYNTHETIC ); MouseMove( aLeave ); - SetItemDown(TBC_BT_AUTOFILTER,sal_False); + SetItemDown(TBC_BT_AUTOFILTER,false); } diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx index 6df275e9d775..9f108883050e 100644 --- a/extensions/source/dbpilots/groupboxwiz.cxx +++ b/extensions/source/dbpilots/groupboxwiz.cxx @@ -218,7 +218,7 @@ namespace dbp m_aExistingRadios.SetSelectHdl(LINK(this, ORadioSelectionPage, OnEntrySelected)); implCheckMoveButtons(); - m_aExistingRadios.EnableMultiSelection(sal_True); + m_aExistingRadios.EnableMultiSelection(true); getDialog()->defaultButton(&m_aMoveRight); diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 79d35a90d022..3841a6430f80 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -371,7 +371,7 @@ namespace pcr m_aLinesPlayground.SetBackground( GetBackground() ); m_aLinesPlayground.SetPosPixel(Point(0,0)); - m_aLinesPlayground.SetPaintTransparent(sal_True); + m_aLinesPlayground.SetPaintTransparent(true); m_aLinesPlayground.Show(); m_aVScroll.Hide(); m_aVScroll.SetScrollHdl(LINK(this, OBrowserListBox, ScrollHdl)); @@ -490,9 +490,9 @@ namespace pcr m_aOutOfDateLines.insert( i ); // repaint - EnablePaint(sal_False); + EnablePaint(false); UpdatePlayGround(); - EnablePaint(sal_True); + EnablePaint(true); // show the scrollbar if ( bNeedScrollbar ) @@ -819,7 +819,7 @@ namespace pcr void OBrowserListBox::MoveThumbTo(sal_Int32 _nNewThumbPos) { // disable painting to prevent flicker - m_aLinesPlayground.EnablePaint(sal_False); + m_aLinesPlayground.EnablePaint(false); sal_Int32 nDelta = _nNewThumbPos - m_aVScroll.GetThumbPos(); // adjust the scrollbar @@ -848,7 +848,7 @@ namespace pcr UpdatePlayGround(); } - m_aLinesPlayground.EnablePaint(sal_True); + m_aLinesPlayground.EnablePaint(true); m_aLinesPlayground.Invalidate(INVALIDATE_CHILDREN); } @@ -859,7 +859,7 @@ namespace pcr (void)_pScrollBar; // disable painting to prevent flicker - m_aLinesPlayground.EnablePaint(sal_False); + m_aLinesPlayground.EnablePaint(false); sal_Int32 nThumbPos = m_aVScroll.GetThumbPos(); @@ -884,7 +884,7 @@ namespace pcr UpdatePlayGround(); } - m_aLinesPlayground.EnablePaint(sal_True); + m_aLinesPlayground.EnablePaint(true); return 0; } diff --git a/extensions/source/propctrlr/browserpage.cxx b/extensions/source/propctrlr/browserpage.cxx index 8378dc8472a5..a46c97c3b78f 100644 --- a/extensions/source/propctrlr/browserpage.cxx +++ b/extensions/source/propctrlr/browserpage.cxx @@ -38,7 +38,7 @@ namespace pcr ,m_aListBox(this) { m_aListBox.SetBackground(GetBackground()); - m_aListBox.SetPaintTransparent( sal_True ); + m_aListBox.SetPaintTransparent( true ); m_aListBox.Show(); } diff --git a/extensions/source/propctrlr/inspectorhelpwindow.cxx b/extensions/source/propctrlr/inspectorhelpwindow.cxx index dbff2de8a03f..397ffe6ce41b 100644 --- a/extensions/source/propctrlr/inspectorhelpwindow.cxx +++ b/extensions/source/propctrlr/inspectorhelpwindow.cxx @@ -35,14 +35,14 @@ namespace pcr ,m_nMaxLines( 8 ) { SetBackground(); - SetPaintTransparent(sal_True); + SetPaintTransparent(true); m_aSeparator.SetText( PcrRes(RID_STR_HELP_SECTION_LABEL).toString() ); m_aSeparator.SetBackground(); m_aSeparator.Show(); m_aHelpText.SetControlBackground( /*m_aSeparator.GetBackground().GetColor() */); m_aHelpText.SetBackground(); - m_aHelpText.SetPaintTransparent(sal_True); + m_aHelpText.SetPaintTransparent(true); m_aHelpText.Show(); } diff --git a/extensions/source/propctrlr/propertyeditor.cxx b/extensions/source/propctrlr/propertyeditor.cxx index 8f9e792c1609..e6f017d74215 100644 --- a/extensions/source/propctrlr/propertyeditor.cxx +++ b/extensions/source/propctrlr/propertyeditor.cxx @@ -56,7 +56,7 @@ namespace pcr m_aTabControl.SetDeactivatePageHdl(LINK(this, OPropertyEditor, OnPageDeactivate)); m_aTabControl.SetActivatePageHdl(LINK(this, OPropertyEditor, OnPageActivate)); m_aTabControl.SetBackground(GetBackground()); - m_aTabControl.SetPaintTransparent(sal_True); + m_aTabControl.SetPaintTransparent(true); } //------------------------------------------------------------------ diff --git a/extensions/source/propctrlr/selectlabeldialog.cxx b/extensions/source/propctrlr/selectlabeldialog.cxx index 1fc2b9ffe3ec..154c34e998a2 100644 --- a/extensions/source/propctrlr/selectlabeldialog.cxx +++ b/extensions/source/propctrlr/selectlabeldialog.cxx @@ -135,12 +135,12 @@ namespace pcr m_aControlTree.MakeVisible(m_aControlTree.First(), sal_True); if (m_aControlTree.FirstSelected()) m_aControlTree.Select(m_aControlTree.FirstSelected(), sal_False); - m_aNoAssignment.Check(sal_True); + m_aNoAssignment.Check(true); } if (!m_bHaveAssignableControl) { // no controls which can be assigned - m_aNoAssignment.Check(sal_True); + m_aNoAssignment.Check(true); m_aNoAssignment.Enable(false); } diff --git a/extensions/source/propctrlr/standardcontrol.cxx b/extensions/source/propctrlr/standardcontrol.cxx index caaaec807b83..d5e4e5371cd1 100644 --- a/extensions/source/propctrlr/standardcontrol.cxx +++ b/extensions/source/propctrlr/standardcontrol.cxx @@ -71,9 +71,9 @@ namespace pcr OTimeControl::OTimeControl( Window* pParent, WinBits nWinStyle ) :OTimeControl_Base( PropertyControlType::TimeField, pParent, nWinStyle ) { - getTypedControlWindow()->SetStrictFormat( sal_True ); + getTypedControlWindow()->SetStrictFormat( true ); getTypedControlWindow()->SetFormat( TIMEF_SEC ); - getTypedControlWindow()->EnableEmptyFieldValue( sal_True ); + getTypedControlWindow()->EnableEmptyFieldValue( true ); } //------------------------------------------------------------------ @@ -117,7 +117,7 @@ namespace pcr :ODateControl_Base( PropertyControlType::DateField, pParent, nWinStyle | WB_DROPDOWN ) { WindowType* pControlWindow = getTypedControlWindow(); - pControlWindow->SetStrictFormat(sal_True); + pControlWindow->SetStrictFormat(true); pControlWindow->SetMin( ::Date( 1,1,1600 ) ); pControlWindow->SetFirst( ::Date( 1,1,1600 ) ); @@ -125,7 +125,7 @@ namespace pcr pControlWindow->SetMax( ::Date( 1, 1, 9999 ) ); pControlWindow->SetExtDateFormat( XTDATEF_SYSTEM_SHORT_YYYY ); - pControlWindow->EnableEmptyFieldValue( sal_True ); + pControlWindow->EnableEmptyFieldValue( true ); } //------------------------------------------------------------------ @@ -484,8 +484,8 @@ namespace pcr { getTypedControlWindow()->SetDefaultUnit( FUNIT_NONE ); - getTypedControlWindow()->EnableEmptyFieldValue( sal_True ); - getTypedControlWindow()->SetStrictFormat( sal_True ); + getTypedControlWindow()->EnableEmptyFieldValue( true ); + getTypedControlWindow()->SetStrictFormat( true ); Optional< double > value( getMaxValue() ); value.Value = -value.Value; setMinValue( value ); @@ -695,7 +695,7 @@ namespace pcr getTypedControlWindow()->SetDropDownLineCount( LB_DEFAULT_COUNT ); if ( ( nWinStyle & WB_READONLY ) != 0 ) { - getTypedControlWindow()->SetReadOnly( sal_True ); + getTypedControlWindow()->SetReadOnly( true ); getTypedControlWindow()->Enable( true ); } } @@ -804,7 +804,7 @@ namespace pcr getTypedControlWindow()->SetDropDownLineCount( LB_DEFAULT_COUNT ); if ( ( nWinStyle & WB_READONLY ) != 0 ) { - getTypedControlWindow()->SetReadOnly( sal_True ); + getTypedControlWindow()->SetReadOnly( true ); getTypedControlWindow()->Enable( true ); } } @@ -1030,7 +1030,7 @@ namespace pcr ,m_nOperationMode( eStringList ) ,m_bDropdown( sal_False ) { - SetCompoundControl( sal_True ); + SetCompoundControl( true ); m_pImplEdit = new MultiLineEdit( this, WB_TABSTOP | WB_IGNORETAB | WB_NOBORDER | (_nStyle & WB_READONLY) ); SetSubEdit( m_pImplEdit ); diff --git a/filter/source/flash/swfwriter.cxx b/filter/source/flash/swfwriter.cxx index 673717622492..a6c3fbf511db 100644 --- a/filter/source/flash/swfwriter.cxx +++ b/filter/source/flash/swfwriter.cxx @@ -50,7 +50,7 @@ Writer::Writer( sal_Int32 nTWIPWidthOutput, sal_Int32 nTWIPHeightOutput, sal_Int mnJPEGCompressMode(nJPEGcompressMode) { mpVDev = new VirtualDevice; - mpVDev->EnableOutput( sal_False ); + mpVDev->EnableOutput( false ); maMovieTempFile.EnableKillingFile(); maFontsTempFile.EnableKillingFile(); diff --git a/filter/source/flash/swfwriter1.cxx b/filter/source/flash/swfwriter1.cxx index d5c07a6e0f2c..0448fe447974 100644 --- a/filter/source/flash/swfwriter1.cxx +++ b/filter/source/flash/swfwriter1.cxx @@ -521,7 +521,7 @@ void Writer::Impl_writeText( const Point& rPos, const OUString& rText, const sal { // todo: optimize me as this will generate a huge amount of duplicate polygons PolyPolygon aPolyPoygon; - mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (sal_uInt16)nLen, sal_True, nWidth, pDXArray ); + mpVDev->GetTextOutline( aPolyPoygon, rText, 0, 0, (sal_uInt16)nLen, true, nWidth, pDXArray ); aPolyPoygon.Translate( rPos ); Impl_writePolyPolygon( aPolyPoygon, sal_True, aTextColor, aTextColor ); } diff --git a/filter/source/graphic/GraphicExportFilter.cxx b/filter/source/graphic/GraphicExportFilter.cxx index 18db6b63810e..6cc22f91e2cb 100644 --- a/filter/source/graphic/GraphicExportFilter.cxx +++ b/filter/source/graphic/GraphicExportFilter.cxx @@ -84,7 +84,7 @@ void GraphicExportFilter::gatherProperties( const Sequence<PropertyValue>& rProp if ( !aInternalFilterName.isEmpty() ) { - GraphicFilter aGraphicFilter( sal_True ); + GraphicFilter aGraphicFilter( true ); sal_uInt16 nFilterCount = aGraphicFilter.GetExportFormatCount(); sal_uInt16 nFormat; diff --git a/filter/source/graphicfilter/epict/epict.cxx b/filter/source/graphicfilter/epict/epict.cxx index 54a02a99f233..5a6e8df4aece 100644 --- a/filter/source/graphicfilter/epict/epict.cxx +++ b/filter/source/graphicfilter/epict/epict.cxx @@ -464,8 +464,8 @@ void PictWriter::WriteOpcode_TxFace(const Font & rFont) eWeight==WEIGHT_BLACK) nFace|=0x01; if (rFont.GetItalic()!=ITALIC_NONE) nFace|=0x02; if (rFont.GetUnderline()!=UNDERLINE_NONE) nFace|=0x04; - if (rFont.IsOutline()==sal_True) nFace|=0x08; - if (rFont.IsShadow()==sal_True) nFace|=0x10; + if (rFont.IsOutline()) nFace|=0x08; + if (rFont.IsShadow()) nFace|=0x10; if (bDstTxFaceValid==sal_False || nDstTxFace!=nFace) { pPict->WriteUInt16( (sal_uInt16)0x0004 ).WriteUChar( nFace ).WriteUChar( (sal_uInt8)0 ); diff --git a/filter/source/graphicfilter/eps/eps.cxx b/filter/source/graphicfilter/eps/eps.cxx index 5793c9174d62..14731e1c46bc 100644 --- a/filter/source/graphicfilter/eps/eps.cxx +++ b/filter/source/graphicfilter/eps/eps.cxx @@ -2163,7 +2163,7 @@ void PSWriter::ImplText( const OUString& rUniString, const Point& rPos, const sa sal_Bool bOldLineColor = bLineColor; bLineColor = sal_False; std::vector<PolyPolygon> aPolyPolyVec; - if ( aVirDev.GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, -1, sal_True, nWidth, pDXArry ) ) + if ( aVirDev.GetTextOutlines( aPolyPolyVec, rUniString, 0, 0, -1, true, nWidth, pDXArry ) ) { // always adjust text position to match baseline alignment ImplWriteLine( "pum" ); diff --git a/filter/source/graphicfilter/idxf/dxf2mtf.cxx b/filter/source/graphicfilter/idxf/dxf2mtf.cxx index 2ee26ebce408..592eef5333f6 100644 --- a/filter/source/graphicfilter/idxf/dxf2mtf.cxx +++ b/filter/source/graphicfilter/idxf/dxf2mtf.cxx @@ -201,7 +201,7 @@ sal_Bool DXF2GDIMetaFile::SetFontAttribute(const DXFBasicEntity & rE, short nAng aColor=ConvertColor((sal_uInt8)nColor); aFont.SetColor(aColor); - aFont.SetTransparent(sal_True); + aFont.SetTransparent(true); aFont.SetFamily(FAMILY_SWISS); aFont.SetSize(Size(0,nHeight)); aFont.SetAlign(ALIGN_BASELINE); @@ -805,7 +805,7 @@ sal_Bool DXF2GDIMetaFile::Convert(const DXFRepresentation & rDXF, GDIMetaFile & aParentLayerDXFLineInfo.fDistance = 0; } - pVirDev->EnableOutput(sal_False); + pVirDev->EnableOutput(false); rMTF.Record(pVirDev); aActLineColor = pVirDev->GetLineColor(); diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx index 18896b063a79..a5f8b1455af2 100644 --- a/filter/source/graphicfilter/ieps/ieps.cxx +++ b/filter/source/graphicfilter/ieps/ieps.cxx @@ -135,7 +135,7 @@ static void MakeAsMeta(Graphic &rGraphic) aSize = Application::GetDefaultDevice()->LogicToLogic( aSize, aBmp.GetPrefMapMode(), MAP_100TH_MM ); - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); aMtf.Record( &aVDev ); aVDev.DrawBitmap( Point(), aSize, rGraphic.GetBitmap() ); aMtf.Stop(); @@ -395,7 +395,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead, VirtualDevice aVDev; Font aFont; - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); aMtf.Record( &aVDev ); aVDev.SetLineColor( Color( COL_RED ) ); aVDev.SetFillColor(); @@ -633,7 +633,7 @@ GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Boo VirtualDevice aVDev; GDIMetaFile aMtf; Size aSize; - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); aMtf.Record( &aVDev ); aSize = aBitmap.GetPrefSize(); if( !aSize.Width() || !aSize.Height() ) @@ -668,7 +668,7 @@ GraphicImport(SvStream & rStream, Graphic & rGraphic, FilterConfigItem*, sal_Boo if ( nSecurityCount) { bGraphicLinkCreated = sal_True; - GfxLink aGfxLink( pBuf, nPSSize, GFX_LINK_TYPE_EPS_BUFFER, sal_True ) ; + GfxLink aGfxLink( pBuf, nPSSize, GFX_LINK_TYPE_EPS_BUFFER, true ) ; GDIMetaFile aMtf; long nWidth = nNumb[2] - nNumb[0] + 1; diff --git a/filter/source/graphicfilter/ios2met/ios2met.cxx b/filter/source/graphicfilter/ios2met/ios2met.cxx index 9aa722c6f256..bb265fb1fcb4 100644 --- a/filter/source/graphicfilter/ios2met/ios2met.cxx +++ b/filter/source/graphicfilter/ios2met/ios2met.cxx @@ -2229,7 +2229,7 @@ void OS2METReader::ReadFont(sal_uInt16 nFieldSize) OSFont * pF=new OSFont; pF->pSucc=pFontList; pFontList=pF; pF->nID=0; - pF->aFont.SetTransparent(sal_True); + pF->aFont.SetTransparent(true); pF->aFont.SetAlign(ALIGN_BASELINE); nPos=pOS2MET->Tell(); @@ -2584,7 +2584,7 @@ void OS2METReader::ReadOS2MET( SvStream & rStreamOS2MET, GDIMetaFile & rGDIMetaF pOrdFile=NULL; pVirDev = new VirtualDevice(); - pVirDev->EnableOutput(sal_False); + pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); pOS2MET->SetNumberFormatInt(NUMBERFORMAT_INT_LITTLEENDIAN); diff --git a/filter/source/graphicfilter/ipict/ipict.cxx b/filter/source/graphicfilter/ipict/ipict.cxx index 920248ddb5a6..9cb8cf877fed 100644 --- a/filter/source/graphicfilter/ipict/ipict.cxx +++ b/filter/source/graphicfilter/ipict/ipict.cxx @@ -659,7 +659,7 @@ void PictReader::DrawingMethod(PictDrawingMethod eMethod) case PDM_TEXT: aActFont.SetColor(aActForeColor); aActFont.SetFillColor(aActBackColor); - aActFont.SetTransparent(sal_True); + aActFont.SetTransparent(true); pVirDev->SetFont(aActFont); pVirDev->SetRasterOp(ROP_OVERPAINT); break; @@ -1252,10 +1252,10 @@ sal_uLong PictReader::ReadData(sal_uInt16 nOpcode) else aActFont.SetItalic(ITALIC_NONE); if ( (nFace & 0x04)!=0 ) aActFont.SetUnderline(UNDERLINE_SINGLE); else aActFont.SetUnderline(UNDERLINE_NONE); - if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(sal_True); - else aActFont.SetOutline(sal_False); - if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(sal_True); - else aActFont.SetShadow(sal_False); + if ( (nFace & 0x08)!=0 ) aActFont.SetOutline(true); + else aActFont.SetOutline(false); + if ( (nFace & 0x10)!=0 ) aActFont.SetShadow(true); + else aActFont.SetShadow(false); eActMethod=PDM_UNDEFINED; nDataSize=1; break; @@ -1791,7 +1791,7 @@ void PictReader::ReadPict( SvStream & rStreamPict, GDIMetaFile & rGDIMetaFile ) aHRes = aVRes = Fraction( 1, 1 ); pVirDev = new VirtualDevice(); - pVirDev->EnableOutput(sal_False); + pVirDev->EnableOutput(false); rGDIMetaFile.Record(pVirDev); pPict->SetNumberFormatInt(NUMBERFORMAT_INT_BIGENDIAN); diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx index cf255a83f134..8340f844b700 100644 --- a/filter/source/msfilter/msdffimp.cxx +++ b/filter/source/msfilter/msdffimp.cxx @@ -3837,7 +3837,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons { BitmapEx aBitmapEx( aGraf.GetBitmapEx() ); if ( nBrightness || nContrast || ( nGamma != 0x10000 ) ) - aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False ); + aBitmapEx.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false ); if ( eDrawMode == GRAPHICDRAWMODE_GREYS ) aBitmapEx.Convert( BMP_CONVERSION_8BIT_GREYS ); else if ( eDrawMode == GRAPHICDRAWMODE_MONO ) @@ -3851,7 +3851,7 @@ SdrObject* SvxMSDffManager::ImportGraphic( SvStream& rSt, SfxItemSet& rSet, cons { GDIMetaFile aGdiMetaFile( aGraf.GetGDIMetaFile() ); if ( nBrightness || nContrast || ( nGamma != 0x10000 ) ) - aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, sal_False ); + aGdiMetaFile.Adjust( nBrightness, (sal_Int16)nContrast, 0, 0, 0, (double)nGamma / 0x10000, false ); if ( eDrawMode == GRAPHICDRAWMODE_GREYS ) aGdiMetaFile.Convert( MTF_CONVERSION_8BIT_GREYS ); else if ( eDrawMode == GRAPHICDRAWMODE_MONO ) diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx index 9d968a0465dc..a98e170c9d1d 100644 --- a/filter/source/pdf/impdialog.cxx +++ b/filter/source/pdf/impdialog.cxx @@ -183,48 +183,48 @@ ImpPDFTabDialog::ImpPDFTabDialog(Window* pParent, Sequence< PropertyValue >& rFi } //get the CTL (Complex Text Layout) from general options, returns sal_True if we have a CTL font on our hands. - mbUseCTLFont = maConfigI18N.ReadBool( "CTLFont", sal_False ); + mbUseCTLFont = maConfigI18N.ReadBool( "CTLFont", false ); - mbUseLosslessCompression = maConfigItem.ReadBool( "UseLosslessCompression", sal_False ); + mbUseLosslessCompression = maConfigItem.ReadBool( "UseLosslessCompression", false ); mnQuality = maConfigItem.ReadInt32( "Quality", 90 ); - mbReduceImageResolution = maConfigItem.ReadBool( "ReduceImageResolution", sal_False ); + mbReduceImageResolution = maConfigItem.ReadBool( "ReduceImageResolution", false ); mnMaxImageResolution = maConfigItem.ReadInt32( "MaxImageResolution", 300 ); - mbUseTaggedPDF = maConfigItem.ReadBool( "UseTaggedPDF", sal_False ); + mbUseTaggedPDF = maConfigItem.ReadBool( "UseTaggedPDF", false ); mnPDFTypeSelection = maConfigItem.ReadInt32( "SelectPdfVersion", 0 ); if ( mbIsPresentation ) - mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", sal_False ); - mbExportNotes = maConfigItem.ReadBool( "ExportNotes", sal_False ); - mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", sal_False ); + mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", false ); + mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false ); + mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false ); - mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", sal_True ); + mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", true ); if ( mbIsPresentation ) - mbExportHiddenSlides = maConfigItem.ReadBool( "ExportHiddenSlides", sal_False ); + mbExportHiddenSlides = maConfigItem.ReadBool( "ExportHiddenSlides", false ); mnOpenBookmarkLevels = maConfigItem.ReadInt32( "OpenBookmarkLevels", -1 ); - mbUseTransitionEffects = maConfigItem.ReadBool( "UseTransitionEffects", sal_True ); - mbIsSkipEmptyPages = maConfigItem.ReadBool( "IsSkipEmptyPages", sal_False ); - mbAddStream = maConfigItem.ReadBool( "IsAddStream", sal_False ); + mbUseTransitionEffects = maConfigItem.ReadBool( "UseTransitionEffects", true ); + mbIsSkipEmptyPages = maConfigItem.ReadBool( "IsSkipEmptyPages", false ); + mbAddStream = maConfigItem.ReadBool( "IsAddStream", false ); mnFormsType = maConfigItem.ReadInt32( "FormsType", 0 ); - mbExportFormFields = maConfigItem.ReadBool( "ExportFormFields", sal_True ); + mbExportFormFields = maConfigItem.ReadBool( "ExportFormFields", true ); if ( ( mnFormsType < 0 ) || ( mnFormsType > 3 ) ) mnFormsType = 0; - mbAllowDuplicateFieldNames = maConfigItem.ReadBool( "AllowDuplicateFieldNames", sal_False ); + mbAllowDuplicateFieldNames = maConfigItem.ReadBool( "AllowDuplicateFieldNames", false ); //prepare values for the Viewer tab page - mbHideViewerToolbar = maConfigItem.ReadBool( "HideViewerToolbar", sal_False ); - mbHideViewerMenubar = maConfigItem.ReadBool( "HideViewerMenubar", sal_False ); - mbHideViewerWindowControls = maConfigItem.ReadBool( "HideViewerWindowControls", sal_False ); - mbResizeWinToInit = maConfigItem.ReadBool( "ResizeWindowToInitialPage", sal_False ); - mbCenterWindow = maConfigItem.ReadBool( "CenterWindow", sal_False ); - mbOpenInFullScreenMode = maConfigItem.ReadBool( "OpenInFullScreenMode", sal_False ); - mbDisplayPDFDocumentTitle = maConfigItem.ReadBool( "DisplayPDFDocumentTitle", sal_True ); + mbHideViewerToolbar = maConfigItem.ReadBool( "HideViewerToolbar", false ); + mbHideViewerMenubar = maConfigItem.ReadBool( "HideViewerMenubar", false ); + mbHideViewerWindowControls = maConfigItem.ReadBool( "HideViewerWindowControls", false ); + mbResizeWinToInit = maConfigItem.ReadBool( "ResizeWindowToInitialPage", false ); + mbCenterWindow = maConfigItem.ReadBool( "CenterWindow", false ); + mbOpenInFullScreenMode = maConfigItem.ReadBool( "OpenInFullScreenMode", false ); + mbDisplayPDFDocumentTitle = maConfigItem.ReadBool( "DisplayPDFDocumentTitle", true ); mnInitialView = maConfigItem.ReadInt32( "InitialView", 0 ); mnMagnification = maConfigItem.ReadInt32( "Magnification", 0 ); mnZoom = maConfigItem.ReadInt32( "Zoom", 100 ); mnPageLayout = maConfigItem.ReadInt32( "PageLayout", 0 ); - mbFirstPageLeft = maConfigItem.ReadBool( "FirstPageOnLeft", sal_False ); + mbFirstPageLeft = maConfigItem.ReadBool( "FirstPageOnLeft", false ); mnInitialPage = maConfigItem.ReadInt32( "InitialPage", 1 ); if( mnInitialPage < 1 ) mnInitialPage = 1; @@ -232,19 +232,19 @@ ImpPDFTabDialog::ImpPDFTabDialog(Window* pParent, Sequence< PropertyValue >& rFi //prepare values for the security tab page mnPrint = maConfigItem.ReadInt32( "Printing", 2 ); mnChangesAllowed = maConfigItem.ReadInt32( "Changes", 4 ); - mbCanCopyOrExtract = maConfigItem.ReadBool( "EnableCopyingOfContent", sal_True ); - mbCanExtractForAccessibility = maConfigItem.ReadBool( "EnableTextAccessForAccessibilityTools", sal_True ); + mbCanCopyOrExtract = maConfigItem.ReadBool( "EnableCopyingOfContent", true ); + mbCanExtractForAccessibility = maConfigItem.ReadBool( "EnableTextAccessForAccessibilityTools", true ); //prepare values for relative links - mbExportRelativeFsysLinks = maConfigItem.ReadBool( "ExportLinksRelativeFsys", sal_False ); + mbExportRelativeFsysLinks = maConfigItem.ReadBool( "ExportLinksRelativeFsys", false ); mnViewPDFMode = maConfigItem.ReadInt32( "PDFViewSelection", 0 ); - mbConvertOOoTargets = maConfigItem.ReadBool( "ConvertOOoTargetToPDFTarget", sal_False ); - mbExportBmkToPDFDestination = maConfigItem.ReadBool( "ExportBookmarksToPDFDestination", sal_False ); + mbConvertOOoTargets = maConfigItem.ReadBool( "ConvertOOoTargetToPDFTarget", false ); + mbExportBmkToPDFDestination = maConfigItem.ReadBool( "ExportBookmarksToPDFDestination", false ); //prepare values for digital signatures - mbSignPDF = maConfigItem.ReadBool( "SignPDF", sal_False ); + mbSignPDF = maConfigItem.ReadBool( "SignPDF", false ); //queue the tab pages for later creation (created when first shown) mnSigningPageId = AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, 0); @@ -598,7 +598,7 @@ void ImpPDFTabGeneralPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent switch( paParent->mnPDFTypeSelection ) { default: - case 0: mpCbPDFA1b->Check( sal_False ); // PDF 1.4 + case 0: mpCbPDFA1b->Check( false ); // PDF 1.4 break; case 1: mpCbPDFA1b->Check(); // PDF/A-1a break; @@ -1056,12 +1056,12 @@ void ImpPDFTabViewerPage::SetFilterConfigItem( const ImpPDFTabDialog* paParent m_pCbTransitionEffects->Enable( mbIsPresentation ); if( paParent->mnOpenBookmarkLevels < 0 ) { - m_pRbAllBookmarkLevels->Check( sal_True ); + m_pRbAllBookmarkLevels->Check( true ); m_pNumBookmarkLevels->Enable( false ); } else { - m_pRbVisibleBookmarkLevels->Check( sal_True ); + m_pRbVisibleBookmarkLevels->Check( true ); m_pNumBookmarkLevels->Enable( true ); m_pNumBookmarkLevels->SetValue( paParent->mnOpenBookmarkLevels ); } diff --git a/filter/source/pdf/pdfexport.cxx b/filter/source/pdf/pdfexport.cxx index 13f4f4f32724..1105b17b9dd5 100644 --- a/filter/source/pdf/pdfexport.cxx +++ b/filter/source/pdf/pdfexport.cxx @@ -211,7 +211,7 @@ sal_Bool PDFExport::ExportSelection( vcl::PDFWriter& rPDFWriter, const Size aMtfSize( aPageSize.Width, aPageSize.Height ); pOut->Push(); - pOut->EnableOutput( sal_False ); + pOut->EnableOutput( false ); pOut->SetMapMode( aMapMode ); aMtf.SetPrefSize( aMtfSize ); diff --git a/filter/source/pdf/pdffilter.cxx b/filter/source/pdf/pdffilter.cxx index 77bd2a47e57e..b8406900d242 100644 --- a/filter/source/pdf/pdffilter.cxx +++ b/filter/source/pdf/pdffilter.cxx @@ -62,43 +62,43 @@ sal_Bool PDFFilter::implExport( const Sequence< PropertyValue >& rDescriptor ) if ( !aFilterData.getLength() ) { FilterConfigItem aCfgItem( "Office.Common/Filter/PDF/Export/" ); - aCfgItem.ReadBool( "UseLosslessCompression", sal_False ); + aCfgItem.ReadBool( "UseLosslessCompression", false ); aCfgItem.ReadInt32( "Quality", 90 ); - aCfgItem.ReadBool( "ReduceImageResolution", sal_False ); + aCfgItem.ReadBool( "ReduceImageResolution", false ); aCfgItem.ReadInt32( "MaxImageResolution", 300 ); - aCfgItem.ReadBool( "UseTaggedPDF", sal_False ); + aCfgItem.ReadBool( "UseTaggedPDF", false ); aCfgItem.ReadInt32( "SelectPdfVersion", 0 ); - aCfgItem.ReadBool( "ExportNotes", sal_False ); - aCfgItem.ReadBool( "ExportNotesPages", sal_False ); - aCfgItem.ReadBool( "UseTransitionEffects", sal_True ); - aCfgItem.ReadBool( "IsSkipEmptyPages", sal_False ); - aCfgItem.ReadBool( "ExportFormFields", sal_True ); + aCfgItem.ReadBool( "ExportNotes", false ); + aCfgItem.ReadBool( "ExportNotesPages", false ); + aCfgItem.ReadBool( "UseTransitionEffects", true ); + aCfgItem.ReadBool( "IsSkipEmptyPages", false ); + aCfgItem.ReadBool( "ExportFormFields", true ); aCfgItem.ReadInt32( "FormsType", 0 ); - aCfgItem.ReadBool( "HideViewerToolbar", sal_False ); - aCfgItem.ReadBool( "HideViewerMenubar", sal_False ); - aCfgItem.ReadBool( "HideViewerWindowControls", sal_False ); - aCfgItem.ReadBool( "ResizeWindowToInitialPage", sal_False ); - aCfgItem.ReadBool( "CenterWindow", sal_False ); - aCfgItem.ReadBool( "OpenInFullScreenMode", sal_False ); - aCfgItem.ReadBool( "DisplayPDFDocumentTitle", sal_True ); + aCfgItem.ReadBool( "HideViewerToolbar", false ); + aCfgItem.ReadBool( "HideViewerMenubar", false ); + aCfgItem.ReadBool( "HideViewerWindowControls", false ); + aCfgItem.ReadBool( "ResizeWindowToInitialPage", false ); + aCfgItem.ReadBool( "CenterWindow", false ); + aCfgItem.ReadBool( "OpenInFullScreenMode", false ); + aCfgItem.ReadBool( "DisplayPDFDocumentTitle", true ); aCfgItem.ReadInt32( "InitialView", 0 ); aCfgItem.ReadInt32( "Magnification", 0 ); aCfgItem.ReadInt32( "PageLayout", 0 ); - aCfgItem.ReadBool( "FirstPageOnLeft", sal_False ); - aCfgItem.ReadBool( "IsAddStream", sal_False ); + aCfgItem.ReadBool( "FirstPageOnLeft", false ); + aCfgItem.ReadBool( "IsAddStream", false ); // // the encryption is not available when exporting directly, since the encryption is off by default and the selection // (encrypt or not) is not persistent; it's available through macro though, // provided the correct property values are set, see help // // now, the relative link stuff - aCfgItem.ReadBool( "ExportLinksRelativeFsys", sal_False ); + aCfgItem.ReadBool( "ExportLinksRelativeFsys", false ); aCfgItem.ReadInt32("PDFViewSelection", 0 ); - aCfgItem.ReadBool( "ConvertOOoTargetToPDFTarget", sal_False ); - aCfgItem.ReadBool( "ExportBookmarksToPDFDestination", sal_False ); + aCfgItem.ReadBool( "ConvertOOoTargetToPDFTarget", false ); + aCfgItem.ReadBool( "ExportBookmarksToPDFDestination", false ); - aCfgItem.ReadBool( "ExportBookmarks", sal_True ); - aCfgItem.ReadBool( "ExportHiddenSlides", sal_False ); + aCfgItem.ReadBool( "ExportBookmarks", true ); + aCfgItem.ReadBool( "ExportHiddenSlides", false ); aCfgItem.ReadInt32( "OpenBookmarkLevels", -1 ); aFilterData = aCfgItem.GetFilterData(); } diff --git a/filter/source/svg/impsvgdialog.cxx b/filter/source/svg/impsvgdialog.cxx index efcb7635302e..c438cf5d6f00 100644 --- a/filter/source/svg/impsvgdialog.cxx +++ b/filter/source/svg/impsvgdialog.cxx @@ -66,9 +66,9 @@ ImpSVGDialog::ImpSVGDialog( Window* pParent, Sequence< PropertyValue >& rFilterD maCBUseNativeDecoration.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 41 ) ), Size( implMap( *this, 142 ), implMap( *this, 10 ) ) ); - maCBTinyProfile.Check( maConfigItem.ReadBool( OUString( SVG_PROP_TINYPROFILE ), sal_False ) ); - maCBEmbedFonts.Check( maConfigItem.ReadBool( OUString( SVG_PROP_EMBEDFONTS ), sal_True ) ); - maCBUseNativeDecoration.Check( maConfigItem.ReadBool( OUString( SVG_PROP_NATIVEDECORATION ), sal_True ) ); + maCBTinyProfile.Check( maConfigItem.ReadBool( OUString( SVG_PROP_TINYPROFILE ), false ) ); + maCBEmbedFonts.Check( maConfigItem.ReadBool( OUString( SVG_PROP_EMBEDFONTS ), true ) ); + maCBUseNativeDecoration.Check( maConfigItem.ReadBool( OUString( SVG_PROP_NATIVEDECORATION ), true ) ); maBTOK.SetPosSizePixel( Point( implMap( *this, 12 ), implMap( *this, 57 ) ), Size( implMap( *this, 50 ), implMap( *this, 14 ) ) ); @@ -118,7 +118,7 @@ IMPL_LINK( ImpSVGDialog, OnToggleCheckbox, CheckBox*, pBox ) { mbOldNativeDecoration = maCBUseNativeDecoration.IsChecked(); - maCBUseNativeDecoration.Check( sal_False ); + maCBUseNativeDecoration.Check( false ); maCBUseNativeDecoration.Disable(); } else diff --git a/filter/source/svg/svgfontexport.cxx b/filter/source/svg/svgfontexport.cxx index 39835a6f5d58..6dd28be6fcca 100644 --- a/filter/source/svg/svgfontexport.cxx +++ b/filter/source/svg/svgfontexport.cxx @@ -81,7 +81,7 @@ void SVGFontExport::implCollectGlyphs() VirtualDevice aVDev; ObjectVector::const_iterator aIter( maObjects.begin() ); - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); while( aIter != maObjects.end() ) { diff --git a/filter/source/svg/svgwriter.cxx b/filter/source/svg/svgwriter.cxx index ffdfe689f27b..a252d1267caa 100644 --- a/filter/source/svg/svgwriter.cxx +++ b/filter/source/svg/svgwriter.cxx @@ -1644,7 +1644,7 @@ SVGActionWriter::SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport mbClipAttrChanged( sal_False ) { mpVDev = new VirtualDevice; - mpVDev->EnableOutput( sal_False ); + mpVDev->EnableOutput( false ); maTargetMapMode = MAP_100TH_MM; maTextWriter.setVirtualDevice( mpVDev, maTargetMapMode ); } diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx index bf7d0b5c2da8..2367e51bdb85 100644 --- a/forms/source/richtext/richtextvclcontrol.cxx +++ b/forms/source/richtext/richtextvclcontrol.cxx @@ -61,7 +61,7 @@ namespace frm void RichTextControl::implInit( RichTextEngine* _pEngine, ITextAttributeListener* _pTextAttribListener, ITextSelectionListener* _pSelectionListener ) { m_pImpl = new RichTextControlImpl( this, _pEngine, _pTextAttribListener, _pSelectionListener ); - SetCompoundControl( sal_True ); + SetCompoundControl( true ); } //-------------------------------------------------------------------- @@ -209,7 +209,7 @@ namespace frm { // Ctrl-Tab is used to step out of the control // -> build a new key event without the Ctrl-key, and let the very base class handle it - KeyCode aNewCode( KEY_TAB, bShift, sal_False, sal_False, sal_False ); + KeyCode aNewCode( KEY_TAB, bShift, false, false, false ); ::KeyEvent aNewEvent( pKeyEvent->GetCharCode(), aNewCode ); Control::KeyInput( aNewEvent ); return true; // handled diff --git a/forms/source/solar/control/navtoolbar.cxx b/forms/source/solar/control/navtoolbar.cxx index 10685aee247f..a8127bde1f08 100644 --- a/forms/source/solar/control/navtoolbar.cxx +++ b/forms/source/solar/control/navtoolbar.cxx @@ -318,7 +318,7 @@ namespace frm { pItemWindow = new FixedText( m_pToolbar, WB_VCENTER ); pItemWindow->SetBackground(); - pItemWindow->SetPaintTransparent(sal_True); + pItemWindow->SetPaintTransparent(true); } m_aChildWins.push_back( pItemWindow ); @@ -663,7 +663,7 @@ namespace frm SetFirst( 1 ); SetSpinSize( 1 ); SetDecimalDigits( 0 ); - SetStrictFormat( sal_True ); + SetStrictFormat( true ); SetBorderStyle( WINDOW_BORDER_MONO ); } diff --git a/formula/source/ui/dlg/formula.cxx b/formula/source/ui/dlg/formula.cxx index a81d20a47dbd..1fb3bb14918b 100644 --- a/formula/source/ui/dlg/formula.cxx +++ b/formula/source/ui/dlg/formula.cxx @@ -337,7 +337,7 @@ FormulaDlg_Impl::FormulaDlg_Impl(Dialog* pParent aMEFormula.SetSelChangedHdl( LINK( this, FormulaDlg_Impl, FormulaCursorHdl ) ); aFntLight = aFtFormula.GetFont(); - aFntLight.SetTransparent( sal_True ); + aFntLight.SetTransparent( true ); aFntBold = aFntLight; aFntBold.SetWeight( WEIGHT_BOLD ); diff --git a/formula/source/ui/dlg/funcpage.cxx b/formula/source/ui/dlg/funcpage.cxx index eef85961bee5..6b4c49d97066 100644 --- a/formula/source/ui/dlg/funcpage.cxx +++ b/formula/source/ui/dlg/funcpage.cxx @@ -121,7 +121,7 @@ void FuncPage::UpdateFunctionList() (void)nCategory; aLbFunction.Clear(); - aLbFunction.SetUpdateMode( sal_False ); + aLbFunction.SetUpdateMode( false ); //------------------------------------------------------ if ( nSelPos > 0 ) @@ -156,7 +156,7 @@ void FuncPage::UpdateFunctionList() } //------------------------------------------------------ - aLbFunction.SetUpdateMode( sal_True ); + aLbFunction.SetUpdateMode( true ); aLbFunction.SelectEntryPos(0); if(IsVisible()) SelHdl(&aLbFunction); diff --git a/formula/source/ui/dlg/funcutl.cxx b/formula/source/ui/dlg/funcutl.cxx index 895fa67c767c..64813cc64aaf 100644 --- a/formula/source/ui/dlg/funcutl.cxx +++ b/formula/source/ui/dlg/funcutl.cxx @@ -36,7 +36,7 @@ namespace formula ValWnd::ValWnd( Window* pParent, const ResId& rId ) : Window( pParent, rId ) { Font aFnt( GetFont() ); - aFnt.SetTransparent( sal_True ); + aFnt.SetTransparent( true ); aFnt.SetWeight( WEIGHT_LIGHT ); if ( pParent->IsBackground() ) { diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 9792a865b0d2..f50209a6c9f6 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -2899,7 +2899,7 @@ void SvtFileDialog::AddControls_Impl( ) { _pImp->_pCbAutoExtension = new CheckBox( this, SvtResId( CB_AUTO_EXTENSION ) ); _pImp->_pCbAutoExtension->SetText( SvtResId( STR_SVT_FILEPICKER_AUTO_EXTENSION ) ); - _pImp->_pCbAutoExtension->Check( sal_True ); + _pImp->_pCbAutoExtension->Check( true ); AddControl( _pImp->_pCbAutoExtension ); ReleaseOwnership( _pImp->_pCbAutoExtension ); _pImp->_pCbAutoExtension->SetClickHdl( LINK( this, SvtFileDialog, AutoExtensionHdl_Impl ) ); diff --git a/fpicker/source/office/iodlgimp.hxx b/fpicker/source/office/iodlgimp.hxx index b024581c29e5..0193db3895c3 100644 --- a/fpicker/source/office/iodlgimp.hxx +++ b/fpicker/source/office/iodlgimp.hxx @@ -197,7 +197,7 @@ public: inline const ::com::sun::star::uno::Sequence< OUString >& GetBlackList() const { return _aBlackList; } void SetStandardDir( const OUString& _rDir ); inline const OUString& GetStandardDir() const { return _aStdDir; } - inline void DisableFilterBoxAutoWidth() { _pLbFilter->EnableDDAutoWidth( sal_False ); } + inline void DisableFilterBoxAutoWidth() { _pLbFilter->EnableDDAutoWidth( false ); } // ------------------------------------------ // access to the filter listbox only as Control* - we want to maintain the entries/userdata ourself diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 7f889605d9b3..6bacf4ed174f 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -813,7 +813,7 @@ IMPL_LINK( MenuManager, Activate, Menu *, pMenu ) xMenuItemDispatch->addStatusListener( (static_cast< XStatusListener* >(this)), aTargetURL ); } else - pMenu->EnableItem( pMenuItemHandler->nItemId, sal_False ); + pMenu->EnableItem( pMenuItemHandler->nItemId, false ); } } } diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index 2b570dd0410b..81fd7dd51548 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -1868,7 +1868,7 @@ throw (RuntimeException) MenuBar* pMenuBar = pSysWindow->GetMenuBar(); if ( pMenuBar ) { - pMenuBar->SetDisplayable( sal_False ); + pMenuBar->SetDisplayable( false ); bNotify = true; } } @@ -2592,7 +2592,7 @@ sal_Bool LayoutManager::implts_resetMenuBar() if ( pSysWindow && bMenuVisible && pSetMenuBar ) { pSysWindow->SetMenuBar( pSetMenuBar ); - pSetMenuBar->SetDisplayable( sal_True ); + pSetMenuBar->SetDisplayable( true ); return sal_True; } diff --git a/framework/source/layoutmanager/toolbarlayoutmanager.cxx b/framework/source/layoutmanager/toolbarlayoutmanager.cxx index 3a82a28621d3..cb3c844f28c3 100644 --- a/framework/source/layoutmanager/toolbarlayoutmanager.cxx +++ b/framework/source/layoutmanager/toolbarlayoutmanager.cxx @@ -962,7 +962,7 @@ OUString ToolbarLayoutManager::implts_generateGenericAddonToolbarTitle( sal_Int3 OUString aAddonGenericTitle(FWK_RESSTR(STR_TOOLBAR_TITLE_ADDON)); const vcl::I18nHelper& rI18nHelper = Application::GetSettings().GetUILocaleI18nHelper(); - OUString aNumStr = rI18nHelper.GetNum( nNumber, 0, sal_False, sal_False ); + OUString aNumStr = rI18nHelper.GetNum( nNumber, 0, false, false ); aAddonGenericTitle = aAddonGenericTitle.replaceFirst( "%num%", aNumStr ); return OUString( aAddonGenericTitle ); diff --git a/framework/source/uielement/fontsizemenucontroller.cxx b/framework/source/uielement/fontsizemenucontroller.cxx index e90bbaf8ce3c..22752cd2686d 100644 --- a/framework/source/uielement/fontsizemenucontroller.cxx +++ b/framework/source/uielement/fontsizemenucontroller.cxx @@ -225,7 +225,7 @@ void FontSizeMenuController::fillPopupMenu( Reference< css::awt::XPopupMenu >& r { m_pHeightArray[nPos] = *pTempAry; nPos++; // Id is nPos+1 - pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK ); + pVCLPopupMenu->InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, true, false ), MIB_RADIOCHECK | MIB_AUTOCHECK ); fPoint = float( m_pHeightArray[nPos-1] ) / 10; // Create dispatchable .uno command and set it diff --git a/framework/source/uielement/headermenucontroller.cxx b/framework/source/uielement/headermenucontroller.cxx index cb37064d5612..1854b8761d90 100644 --- a/framework/source/uielement/headermenucontroller.cxx +++ b/framework/source/uielement/headermenucontroller.cxx @@ -147,7 +147,7 @@ void HeaderMenuController::fillPopupMenu( const Reference< ::com::sun::star::fra pVCLPopupMenu->SetItemCommand( nId, aCommand ); if ( bHeaderIsOn ) - pVCLPopupMenu->CheckItem( nId, sal_True ); + pVCLPopupMenu->CheckItem( nId, true ); ++nId; // Check if all entries have the same state diff --git a/framework/source/uielement/langselectionmenucontroller.cxx b/framework/source/uielement/langselectionmenucontroller.cxx index 7a687814e36d..5749f0013257 100644 --- a/framework/source/uielement/langselectionmenucontroller.cxx +++ b/framework/source/uielement/langselectionmenucontroller.cxx @@ -253,7 +253,7 @@ void LanguageSelectionMenuController::fillPopupMenu( Reference< css::awt::XPopup if (rStr == m_aCurLang && eMode == MODE_SetLanguageSelectionMenu ) { //make a sign for the current language - pPopupMenu->CheckItem( nItemId, sal_True ); + pPopupMenu->CheckItem( nItemId, true ); } ++nItemId; } diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 61b1aaa6fd28..ec6e8469257e 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -486,7 +486,7 @@ throw ( RuntimeException ) if ( Event.State >>= bCheckmark ) { // Checkmark or RadioButton - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, true ); m_pVCLMenu->CheckItem( pMenuItemHandler->nItemId, bCheckmark ); MenuItemBits nBits = m_pVCLMenu->GetItemBits( pMenuItemHandler->nItemId ); @@ -517,7 +517,7 @@ throw ( RuntimeException ) aItemText = aTmp; } - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, true ); m_pVCLMenu->SetItemText( pMenuItemHandler->nItemId, aItemText ); } else if ( Event.State >>= aVisibilityStatus ) @@ -526,7 +526,7 @@ throw ( RuntimeException ) m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, aVisibilityStatus.bVisible ); } else - m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, sal_True ); + m_pVCLMenu->ShowItem( pMenuItemHandler->nItemId, true ); } if ( Event.Requery ) @@ -949,7 +949,7 @@ IMPL_LINK( MenuBarManager, Activate, Menu *, pMenu ) } } else if ( !bPopupMenu ) - pMenu->EnableItem( pMenuItemHandler->nItemId, sal_False ); + pMenu->EnableItem( pMenuItemHandler->nItemId, false ); } } else if ( pMenuItemHandler->xPopupMenuController.is() ) @@ -1727,7 +1727,7 @@ void MenuBarManager::FillMenu( pMenu->HideItem( nId ); if ( !bEnabled) - pMenu->EnableItem( nId, sal_False ); + pMenu->EnableItem( nId, false ); if ( xIndexContainer.is() ) { diff --git a/framework/source/uielement/popuptoolbarcontroller.cxx b/framework/source/uielement/popuptoolbarcontroller.cxx index 36c38e209ba8..f16bf43fc9e0 100644 --- a/framework/source/uielement/popuptoolbarcontroller.cxx +++ b/framework/source/uielement/popuptoolbarcontroller.cxx @@ -182,12 +182,12 @@ PopupMenuToolbarController::createPopupWindow() if ( !pToolBox ) return xRet; - pToolBox->SetItemDown( m_nToolBoxId, sal_True ); + pToolBox->SetItemDown( m_nToolBoxId, true ); sal_uInt16 nId = m_xPopupMenu->execute( css::uno::Reference< css::awt::XWindowPeer >( getParent(), css::uno::UNO_QUERY ), VCLUnoHelper::ConvertToAWTRect( pToolBox->GetItemRect( m_nToolBoxId ) ), css::awt::PopupMenuDirection::EXECUTE_DEFAULT ); - pToolBox->SetItemDown( m_nToolBoxId, sal_False ); + pToolBox->SetItemDown( m_nToolBoxId, false ); if ( nId ) functionExecuted( m_xPopupMenu->getCommand( nId ) ); diff --git a/framework/source/uielement/progressbarwrapper.cxx b/framework/source/uielement/progressbarwrapper.cxx index 98c8df144e03..9669cf7364ea 100644 --- a/framework/source/uielement/progressbarwrapper.cxx +++ b/framework/source/uielement/progressbarwrapper.cxx @@ -113,11 +113,11 @@ throw (uno::RuntimeException) pStatusBar->StartProgressMode( Text ); else { - pStatusBar->SetUpdateMode( sal_False ); + pStatusBar->SetUpdateMode( false ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); pStatusBar->SetProgressValue( sal_uInt16( nValue )); - pStatusBar->SetUpdateMode( sal_True ); + pStatusBar->SetUpdateMode( true ); } pStatusBar->Show( true, SHOW_NOFOCUSCHANGE | SHOW_NOACTIVATE ); } @@ -179,11 +179,11 @@ throw (uno::RuntimeException) StatusBar* pStatusBar = (StatusBar *)pWindow; if( pStatusBar->IsProgressMode() ) { - pStatusBar->SetUpdateMode( sal_False ); + pStatusBar->SetUpdateMode( false ); pStatusBar->EndProgressMode(); pStatusBar->StartProgressMode( Text ); pStatusBar->SetProgressValue( sal_uInt16( nValue )); - pStatusBar->SetUpdateMode( sal_True ); + pStatusBar->SetUpdateMode( true ); } else pStatusBar->SetText( Text ); diff --git a/framework/source/uielement/statusbaritem.cxx b/framework/source/uielement/statusbaritem.cxx index 0bfe4c58d5e4..4a15b3a33495 100644 --- a/framework/source/uielement/statusbaritem.cxx +++ b/framework/source/uielement/statusbaritem.cxx @@ -236,7 +236,7 @@ throw (RuntimeException) if ( !m_pStatusBar ) return; - if ( bVisible != m_pStatusBar->IsItemVisible( m_nId ) ) + if ( bool(bVisible) != m_pStatusBar->IsItemVisible( m_nId ) ) { if ( bVisible ) m_pStatusBar->ShowItem( m_nId ); diff --git a/framework/source/uielement/togglebuttontoolbarcontroller.cxx b/framework/source/uielement/togglebuttontoolbarcontroller.cxx index 58bddcecfb67..03068017932d 100644 --- a/framework/source/uielement/togglebuttontoolbarcontroller.cxx +++ b/framework/source/uielement/togglebuttontoolbarcontroller.cxx @@ -119,15 +119,15 @@ throw (::com::sun::star::uno::RuntimeException) OUString aLabel( m_aDropdownMenuList[i] ); aPopup.InsertItem( sal_uInt16( i+1 ), aLabel ); if ( aLabel == m_aCurrentSelection ) - aPopup.CheckItem( sal_uInt16( i+1 ), sal_True ); + aPopup.CheckItem( sal_uInt16( i+1 ), true ); else - aPopup.CheckItem( sal_uInt16( i+1 ), sal_False ); + aPopup.CheckItem( sal_uInt16( i+1 ), false ); } - m_pToolbar->SetItemDown( m_nID, sal_True ); + m_pToolbar->SetItemDown( m_nID, true ); aPopup.SetSelectHdl( LINK( this, ToggleButtonToolbarController, MenuSelectHdl )); aPopup.Execute( m_pToolbar, m_pToolbar->GetItemRect( m_nID )); - m_pToolbar->SetItemDown( m_nID, sal_False ); + m_pToolbar->SetItemDown( m_nID, false ); } return xWindow; diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index 810fdf81b0b3..cecbb66ab78e 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -403,7 +403,7 @@ void ToolBarManager::UpdateImageOrientation() { if ( pIter->second.bRotated ) { - m_pToolBar->SetItemImageMirrorMode( nId, sal_False ); + m_pToolBar->SetItemImageMirrorMode( nId, false ); m_pToolBar->SetItemImageAngle( nId, m_lImageRotation ); } if ( pIter->second.bMirrored ) @@ -1708,25 +1708,25 @@ bool ToolBarManager::MenuItemAllowed( sal_uInt16 ) const if ( !bIsFloating ) { - aPopupMenu.EnableItem( MENUITEM_TOOLBAR_DOCKTOOLBAR, sal_False ); - aPopupMenu.EnableItem( MENUITEM_TOOLBAR_DOCKALLTOOLBAR, sal_False ); + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_DOCKTOOLBAR, false ); + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_DOCKALLTOOLBAR, false ); Reference< XDockableWindow > xDockable( VCLUnoHelper::GetInterface( m_pToolBar ), UNO_QUERY ); if( xDockable.is() ) aPopupMenu.CheckItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, xDockable->isLocked() ); } else - aPopupMenu.EnableItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, sal_False ); + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, false ); if ( SvtMiscOptions().DisableUICustomization() ) { - aPopupMenu.EnableItem( MENUITEM_TOOLBAR_VISIBLEBUTTON, sal_False ); - aPopupMenu.EnableItem( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, sal_False ); - aPopupMenu.EnableItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, sal_False ); + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_VISIBLEBUTTON, false ); + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_CUSTOMIZETOOLBAR, false ); + aPopupMenu.EnableItem( MENUITEM_TOOLBAR_LOCKTOOLBARPOSITION, false ); } // Disable menu item CLOSE if the toolbar has no closer if( !(pToolBar->GetFloatStyle() & WB_CLOSEABLE) ) - aPopupMenu.EnableItem(MENUITEM_TOOLBAR_CLOSE, sal_False); + aPopupMenu.EnableItem(MENUITEM_TOOLBAR_CLOSE, false); for ( nPos = 0; nPos < m_pToolBar->GetItemCount(); ++nPos ) { diff --git a/include/sfx2/basedlgs.hxx b/include/sfx2/basedlgs.hxx index c90effc9cb40..e486242670b1 100644 --- a/include/sfx2/basedlgs.hxx +++ b/include/sfx2/basedlgs.hxx @@ -105,7 +105,7 @@ protected: SfxModelessDialog( SfxBindings*, SfxChildWindow*, Window*, const OString& rID, const OUString& rUIXMLDescription ); ~SfxModelessDialog(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual void Move(); virtual void StateChanged( StateChangedType nStateChange ); @@ -144,7 +144,7 @@ protected: ~SfxFloatingWindow(); virtual void StateChanged( StateChangedType nStateChange ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual void Move(); virtual bool Notify( NotifyEvent& rNEvt ); diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx index f13514d21dc3..3d572b341884 100644 --- a/include/sfx2/dinfdlg.hxx +++ b/include/sfx2/dinfdlg.hxx @@ -372,7 +372,7 @@ public: inline void CheckYes() { m_aYesButton.Check(); } inline void CheckNo() { m_aNoButton.Check(); } - inline bool IsYesChecked() const { return m_aYesButton.IsChecked() != sal_False; } + inline bool IsYesChecked() const { return m_aYesButton.IsChecked(); } }; // struct CustomPropertyLine --------------------------------------------- diff --git a/include/sfx2/dockwin.hxx b/include/sfx2/dockwin.hxx index 333bdc455891..b8dd5826cbb8 100644 --- a/include/sfx2/dockwin.hxx +++ b/include/sfx2/dockwin.hxx @@ -58,14 +58,14 @@ protected: CheckAlignment(SfxChildAlignment,SfxChildAlignment); virtual void Resize(); - virtual sal_Bool PrepareToggleFloatingMode(); + virtual bool PrepareToggleFloatingMode(); virtual void ToggleFloatingMode(); virtual void StartDocking(); - virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect ); + virtual bool Docking( const Point& rPos, Rectangle& rRect ); virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ); virtual void Resizing( Size& rSize ); virtual void Paint( const Rectangle& rRect ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Move(); SAL_DLLPRIVATE SfxChildWindow* GetChildWindow_Impl() { return pMgr; } diff --git a/include/sfx2/navigat.hxx b/include/sfx2/navigat.hxx index 8ae93a8ef088..dec3c734ac0a 100644 --- a/include/sfx2/navigat.hxx +++ b/include/sfx2/navigat.hxx @@ -47,7 +47,7 @@ public: virtual void Resize(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); }; #endif diff --git a/include/sfx2/sfxhelp.hxx b/include/sfx2/sfxhelp.hxx index 78090270af91..cc7ad04c2845 100644 --- a/include/sfx2/sfxhelp.hxx +++ b/include/sfx2/sfxhelp.hxx @@ -36,8 +36,8 @@ class SFX2_DLLPUBLIC SfxHelp : public Help private: SAL_DLLPRIVATE sal_Bool Start_Impl( const OUString& rURL, const Window* pWindow, const OUString& rKeyword ); - SAL_DLLPRIVATE virtual sal_Bool SearchKeyword( const OUString& rKeyWord ); - SAL_DLLPRIVATE virtual sal_Bool Start( const OUString& rURL, const Window* pWindow ); + SAL_DLLPRIVATE virtual bool SearchKeyword( const OUString& rKeyWord ); + SAL_DLLPRIVATE virtual bool Start( const OUString& rURL, const Window* pWindow ); SAL_DLLPRIVATE OUString GetHelpModuleName_Impl(); SAL_DLLPRIVATE OUString CreateHelpURL_Impl( const OUString& aCommandURL, const OUString& rModuleName ); diff --git a/include/sfx2/tbxctrl.hxx b/include/sfx2/tbxctrl.hxx index c859d1a2f7c0..ac7d66a51768 100644 --- a/include/sfx2/tbxctrl.hxx +++ b/include/sfx2/tbxctrl.hxx @@ -120,7 +120,7 @@ private: protected: virtual void PopupModeEnd(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void DeleteFloatingWindow(); sal_uInt16 GetId() const { return m_nId; } diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx index 7290d36a53e0..9b60912bb38b 100644 --- a/include/svtools/calendar.hxx +++ b/include/svtools/calendar.hxx @@ -420,7 +420,7 @@ public: virtual void Select(); - virtual sal_Bool ShowDropDown( sal_Bool bShow ); + virtual bool ShowDropDown( sal_Bool bShow ); virtual Calendar* CreateCalendar( Window* pParent ); Calendar* GetCalendar(); diff --git a/include/svtools/helpopt.hxx b/include/svtools/helpopt.hxx index 35244183228a..75ea3b89faa2 100644 --- a/include/svtools/helpopt.hxx +++ b/include/svtools/helpopt.hxx @@ -36,9 +36,9 @@ public: virtual ~SvtHelpOptions(); void SetExtendedHelp( sal_Bool b ); - sal_Bool IsExtendedHelp() const; + bool IsExtendedHelp() const; void SetHelpTips( sal_Bool b ); - sal_Bool IsHelpTips() const; + bool IsHelpTips() const; const OUString& GetHelpStyleSheet()const; void SetHelpStyleSheet(const OUString& rStyleSheet); diff --git a/include/svx/bmpmask.hxx b/include/svx/bmpmask.hxx index c7613ae3c5b4..9e7bad264ec2 100644 --- a/include/svx/bmpmask.hxx +++ b/include/svx/bmpmask.hxx @@ -120,7 +120,7 @@ class SVX_DLLPUBLIC SvxBmpMask : public SfxDockingWindow Image maImgPipette; - virtual sal_Bool Close(); + virtual bool Close(); #ifdef BMPMASK_PRIVATE diff --git a/include/svx/colrctrl.hxx b/include/svx/colrctrl.hxx index cf5b596e5099..631a1c9fd24a 100644 --- a/include/svx/colrctrl.hxx +++ b/include/svx/colrctrl.hxx @@ -95,7 +95,7 @@ private: virtual void GetFocus (void); protected: - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual void Resizing( Size& rSize ); diff --git a/include/svx/galbrws.hxx b/include/svx/galbrws.hxx index 1a1c574df883..8ee5db519559 100644 --- a/include/svx/galbrws.hxx +++ b/include/svx/galbrws.hxx @@ -58,7 +58,7 @@ private: /// bitfield void InitSettings(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual void GetFocus(); diff --git a/include/svx/imapdlg.hxx b/include/svx/imapdlg.hxx index 0515a22f4c49..d6877356cc36 100644 --- a/include/svx/imapdlg.hxx +++ b/include/svx/imapdlg.hxx @@ -99,7 +99,7 @@ class SVX_DLLPUBLIC SvxIMapDlg : public SfxModelessDialog // SfxFloatingWindow SvxIMapDlgItem aIMapItem; virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); DECL_LINK( TbxClickHdl, ToolBox* ); DECL_LINK( InfoHdl, IMapWindow* ); diff --git a/include/svx/linectrl.hxx b/include/svx/linectrl.hxx index d15ce37a8116..2e34aadec167 100644 --- a/include/svx/linectrl.hxx +++ b/include/svx/linectrl.hxx @@ -118,7 +118,7 @@ private: protected: virtual void Resizing( Size& rSize ); virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void PopupModeEnd(); /** This function is called when the window gets the focus. It grabs diff --git a/include/svx/rubydialog.hxx b/include/svx/rubydialog.hxx index 149f73aefa52..b8010ac79155 100644 --- a/include/svx/rubydialog.hxx +++ b/include/svx/rubydialog.hxx @@ -143,7 +143,7 @@ class SvxRubyDialog : public SfxModelessDialog void AssertOneEntry(); void Update(); - virtual sal_Bool Close(); + virtual bool Close(); long GetLastPos() const {return nLastPos;} void SetLastPos(long nSet) {nLastPos = nSet;} diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx index 07cf33028b6c..319727e57b66 100644 --- a/include/svx/srchdlg.hxx +++ b/include/svx/srchdlg.hxx @@ -122,7 +122,7 @@ public: SvxSearchDialog( Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind ); ~SvxSearchDialog(); - virtual sal_Bool Close(); + virtual bool Close(); // Window virtual void Activate(); diff --git a/include/svx/tbxcolorupdate.hxx b/include/svx/tbxcolorupdate.hxx index 8f73740a688a..4c6b87815e9e 100644 --- a/include/svx/tbxcolorupdate.hxx +++ b/include/svx/tbxcolorupdate.hxx @@ -57,7 +57,7 @@ namespace svx Color maCurColor; Rectangle maUpdRect; Size maBmpSize; - sal_Bool mbWasHiContrastMode; + bool mbWasHiContrastMode; }; //........................................................................ diff --git a/include/toolkit/awt/vclxwindows.hxx b/include/toolkit/awt/vclxwindows.hxx index 641383d1c50a..97e27861ad39 100644 --- a/include/toolkit/awt/vclxwindows.hxx +++ b/include/toolkit/awt/vclxwindows.hxx @@ -287,7 +287,7 @@ private: OUString maActionCommand; protected: - void ImplClickedOrToggled( sal_Bool bToggled ); + void ImplClickedOrToggled( bool bToggled ); void ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > CreateAccessibleContext(); diff --git a/include/vcl/FilterConfigItem.hxx b/include/vcl/FilterConfigItem.hxx index 091b6b2f7be6..13d2beff9cb9 100644 --- a/include/vcl/FilterConfigItem.hxx +++ b/include/vcl/FilterConfigItem.hxx @@ -38,12 +38,12 @@ class VCL_DLLPUBLIC FilterConfigItem ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > xPropSet; ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > aFilterData; - sal_Bool bModified; + bool bModified; - sal_Bool ImplGetPropertyValue( ::com::sun::star::uno::Any& rAny, + bool ImplGetPropertyValue( ::com::sun::star::uno::Any& rAny, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& rXPropSet, const OUString& rPropName, - sal_Bool bTestPropertyAvailability ); + bool bTestPropertyAvailability ); void ImpInitTree( const OUString& rTree ); @@ -51,7 +51,7 @@ class VCL_DLLPUBLIC FilterConfigItem static ::com::sun::star::beans::PropertyValue* GetPropertyValue( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rPropSeq, const OUString& rName ); - static sal_Bool WritePropertyValue( + static bool WritePropertyValue( ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rPropSeq, const ::com::sun::star::beans::PropertyValue& rPropValue ); @@ -66,14 +66,14 @@ public : // 1. FilterData PropertySequence // 2. configuration // 3. given default - sal_Bool ReadBool( const OUString& rKey, sal_Bool bDefault ); + bool ReadBool( const OUString& rKey, bool bDefault ); sal_Int32 ReadInt32( const OUString& rKey, sal_Int32 nDefault ); OUString ReadString( const OUString& rKey, const OUString& rDefault ); // try to store to configuration // and always stores into the FilterData sequence - void WriteBool( const OUString& rKey, sal_Bool bValue ); + void WriteBool( const OUString& rKey, bool bValue ); void WriteInt32( const OUString& rKey, sal_Int32 nValue ); ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > GetFilterData() const; diff --git a/include/vcl/accel.hxx b/include/vcl/accel.hxx index 44f5041b3756..b61506ebcf8d 100644 --- a/include/vcl/accel.hxx +++ b/include/vcl/accel.hxx @@ -44,14 +44,14 @@ private: KeyCode maCurKeyCode; sal_uInt16 mnCurId; sal_uInt16 mnCurRepeat; - sal_Bool mbIsCancel; + bool mbIsCancel; sal_Bool* mpDel; SAL_DLLPRIVATE void ImplInit(); SAL_DLLPRIVATE void ImplCopyData( ImplAccelData& rAccelData ); SAL_DLLPRIVATE void ImplDeleteData(); SAL_DLLPRIVATE void ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, - sal_Bool bEnable, Accelerator* pAutoAccel ); + bool bEnable, Accelerator* pAutoAccel ); SAL_DLLPRIVATE ImplAccelEntry* ImplGetAccelData( const KeyCode& rKeyCode ) const; @@ -74,7 +74,7 @@ public: sal_uInt16 GetCurItemId() const { return mnCurId; } const KeyCode& GetCurKeyCode() const { return maCurKeyCode; } sal_uInt16 GetCurRepeat() const { return mnCurRepeat; } - sal_Bool IsCancel() const { return mbIsCancel; } + bool IsCancel() const { return mbIsCancel; } sal_uInt16 GetItemCount() const; sal_uInt16 GetItemId( sal_uInt16 nPos ) const; diff --git a/include/vcl/alpha.hxx b/include/vcl/alpha.hxx index acbb70b7d911..282074f8d73e 100644 --- a/include/vcl/alpha.hxx +++ b/include/vcl/alpha.hxx @@ -54,17 +54,17 @@ public: return (AlphaMask&) Bitmap::operator=( rAlphaMask ); } - sal_Bool operator!() const + bool operator!() const { return Bitmap::operator!(); } - sal_Bool operator==( const AlphaMask& rAlphaMask ) const + bool operator==( const AlphaMask& rAlphaMask ) const { return Bitmap::operator==( rAlphaMask ); } - sal_Bool operator!=( const AlphaMask& rAlphaMask ) const + bool operator!=( const AlphaMask& rAlphaMask ) const { return Bitmap::operator!=( rAlphaMask ); } @@ -105,12 +105,12 @@ public: Bitmap GetBitmap() const; - sal_Bool CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, + bool CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const AlphaMask* pAlphaSrc = NULL); - sal_Bool Erase( sal_uInt8 cTransparency ); - sal_Bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency ); - sal_Bool Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, + bool Erase( sal_uInt8 cTransparency ); + bool Replace( const Bitmap& rMask, sal_uInt8 rReplaceTransparency ); + bool Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong nTol = 0UL ); BitmapReadAccess* AcquireReadAccess() diff --git a/include/vcl/animate.hxx b/include/vcl/animate.hxx index 7d5c7310d7b0..7c3b8e43e438 100644 --- a/include/vcl/animate.hxx +++ b/include/vcl/animate.hxx @@ -50,7 +50,7 @@ struct VCL_DLLPUBLIC AnimationBitmap Size aSizePix; long nWait; Disposal eDisposal; - sal_Bool bUserInput; + bool bUserInput; AnimationBitmap() {} AnimationBitmap( @@ -65,7 +65,7 @@ struct VCL_DLLPUBLIC AnimationBitmap aSizePix ( rSizePix ), nWait ( _nWait ), eDisposal ( _eDisposal ), - bUserInput ( sal_False ) + bUserInput ( false ) {} bool operator==( const AnimationBitmap& rAnimBmp ) const @@ -81,7 +81,7 @@ struct VCL_DLLPUBLIC AnimationBitmap bool operator!=( const AnimationBitmap& rAnimBmp ) const { return !( *this == rAnimBmp ); } - sal_Bool IsEqual( const AnimationBitmap& rAnimBmp ) const + bool IsEqual( const AnimationBitmap& rAnimBmp ) const { return( rAnimBmp.aPosPix == aPosPix && rAnimBmp.aSizePix == aSizePix && @@ -106,14 +106,14 @@ struct AInfo OutputDevice* pOutDev; void* pViewData; long nExtraData; - sal_Bool bWithSize; - sal_Bool bPause; + bool bWithSize; + bool bPause; AInfo() : pOutDev( NULL ), pViewData( NULL ), nExtraData( 0L ), - bWithSize( sal_False ), - bPause( sal_False ) {} + bWithSize( false ), + bPause( false ) {} }; class ImplAnimView; @@ -136,11 +136,11 @@ class VCL_DLLPUBLIC Animation size_t mnPos; Disposal meLastDisposal; CycleMode meCycleMode; - sal_Bool mbFirst; - sal_Bool mbIsInAnimation; - sal_Bool mbWithSize; - sal_Bool mbLoopTerminated; - sal_Bool mbIsWaiting; + bool mbFirst; + bool mbIsInAnimation; + bool mbWithSize; + bool mbLoopTerminated; + bool mbIsWaiting; SAL_DLLPRIVATE void ImplRestartTimer( sal_uLong nTimeout ); @@ -165,7 +165,7 @@ public: void Clear(); - sal_Bool Start( + bool Start( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz, @@ -177,9 +177,9 @@ public: void Draw( OutputDevice* pOutDev, const Point& rDestPt ) const; void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSz ) const; - sal_Bool IsInAnimation() const { return mbIsInAnimation; } - sal_Bool IsTransparent() const; - sal_Bool IsTerminated() const { return mbLoopTerminated; } + bool IsInAnimation() const { return mbIsInAnimation; } + bool IsTransparent() const; + bool IsTerminated() const { return mbLoopTerminated; } const Size& GetDisplaySizePixel() const { return maGlobalSize; } void SetDisplaySizePixel( const Size& rSize ) { maGlobalSize = rSize; } @@ -198,7 +198,7 @@ public: const Link& GetNotifyHdl() const { return maNotifyLink; } size_t Count() const { return maList.size(); } - sal_Bool Insert( const AnimationBitmap& rAnimationBitmap ); + bool Insert( const AnimationBitmap& rAnimationBitmap ); const AnimationBitmap& Get( sal_uInt16 nAnimation ) const; void Replace( const AnimationBitmap& rNewAnimationBmp, sal_uInt16 nAnimation ); @@ -207,23 +207,23 @@ public: public: - sal_Bool Convert( BmpConversion eConversion ); - sal_Bool ReduceColors( + bool Convert( BmpConversion eConversion ); + bool ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce = BMP_REDUCE_SIMPLE ); - sal_Bool Invert(); - sal_Bool Mirror( sal_uLong nMirrorFlags ); - sal_Bool Adjust( + bool Invert(); + bool Mirror( sal_uLong nMirrorFlags ); + bool Adjust( short nLuminancePercent = 0, short nContrastPercent = 0, short nChannelRPercent = 0, short nChannelGPercent = 0, short nChannelBPercent = 0, double fGamma = 1.0, - sal_Bool bInvert = sal_False + bool bInvert = false ); - sal_Bool Filter( + bool Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam = NULL, const Link* pProgress = NULL diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx index 9003be4b995e..3e64da7657ad 100644 --- a/include/vcl/bitmap.hxx +++ b/include/vcl/bitmap.hxx @@ -328,38 +328,38 @@ public: SAL_DLLPRIVATE void ImplAssignWithSize( const Bitmap& rBitmap ); SAL_DLLPRIVATE void ImplAdaptBitCount(Bitmap& rNew) const; - SAL_DLLPRIVATE sal_Bool ImplScaleFast( const double& rScaleX, const double& rScaleY ); - SAL_DLLPRIVATE sal_Bool ImplScaleInterpolate( const double& rScaleX, const double& rScaleY ); - SAL_DLLPRIVATE sal_Bool ImplScaleSuper( const double& rScaleX, const double& rScaleY ); - SAL_DLLPRIVATE sal_Bool ImplScaleConvolution( const double& rScaleX, const double& rScaleY, const Kernel& aKernel); + SAL_DLLPRIVATE bool ImplScaleFast( const double& rScaleX, const double& rScaleY ); + SAL_DLLPRIVATE bool ImplScaleInterpolate( const double& rScaleX, const double& rScaleY ); + SAL_DLLPRIVATE bool ImplScaleSuper( const double& rScaleX, const double& rScaleY ); + SAL_DLLPRIVATE bool ImplScaleConvolution( const double& rScaleX, const double& rScaleY, const Kernel& aKernel); SAL_DLLPRIVATE bool ImplConvolutionPass( Bitmap& aNewBitmap, const int nNewSize, BitmapReadAccess* pReadAcc, int aNumberOfContributions, double* pWeights, int* pPixels, int* pCount ); - SAL_DLLPRIVATE sal_Bool ImplMakeMono( sal_uInt8 cThreshold ); - SAL_DLLPRIVATE sal_Bool ImplMakeMonoDither(); - SAL_DLLPRIVATE sal_Bool ImplMakeGreyscales( sal_uInt16 nGreyscales ); - SAL_DLLPRIVATE sal_Bool ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor = NULL ); - SAL_DLLPRIVATE sal_Bool ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor = NULL ); - SAL_DLLPRIVATE sal_Bool ImplConvertGhosted(); - SAL_DLLPRIVATE sal_Bool ImplDitherMatrix(); - SAL_DLLPRIVATE sal_Bool ImplDitherFloyd(); - SAL_DLLPRIVATE sal_Bool ImplDitherFloyd16(); - SAL_DLLPRIVATE sal_Bool ImplReduceSimple( sal_uInt16 nColorCount ); - SAL_DLLPRIVATE sal_Bool ImplReducePopular( sal_uInt16 nColorCount ); - SAL_DLLPRIVATE sal_Bool ImplReduceMedian( sal_uInt16 nColorCount ); + SAL_DLLPRIVATE bool ImplMakeMono( sal_uInt8 cThreshold ); + SAL_DLLPRIVATE bool ImplMakeMonoDither(); + SAL_DLLPRIVATE bool ImplMakeGreyscales( sal_uInt16 nGreyscales ); + SAL_DLLPRIVATE bool ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor = NULL ); + SAL_DLLPRIVATE bool ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor = NULL ); + SAL_DLLPRIVATE bool ImplConvertGhosted(); + SAL_DLLPRIVATE bool ImplDitherMatrix(); + SAL_DLLPRIVATE bool ImplDitherFloyd(); + SAL_DLLPRIVATE bool ImplDitherFloyd16(); + SAL_DLLPRIVATE bool ImplReduceSimple( sal_uInt16 nColorCount ); + SAL_DLLPRIVATE bool ImplReducePopular( sal_uInt16 nColorCount ); + SAL_DLLPRIVATE bool ImplReduceMedian( sal_uInt16 nColorCount ); SAL_DLLPRIVATE void ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, long nR1, long nR2, long nG1, long nG2, long nB1, long nB2, long nColors, long nPixels, long& rIndex ); - SAL_DLLPRIVATE sal_Bool ImplConvolute3( const long* pMatrix, long nDivisor, + SAL_DLLPRIVATE bool ImplConvolute3( const long* pMatrix, long nDivisor, const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplMedianFilter( const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplSobelGrey( const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplSolarize( const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplSepia( const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress ); - SAL_DLLPRIVATE sal_Bool ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplMedianFilter( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplSobelGrey( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplSolarize( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplSepia( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplMosaic( const BmpFilterParam* pFilterParam, const Link* pProgress ); + SAL_DLLPRIVATE bool ImplPopArt( const BmpFilterParam* pFilterParam, const Link* pProgress ); SAL_DLLPRIVATE bool ImplSeparableBlurFilter( const double aRadius = 0.7 ); SAL_DLLPRIVATE bool ImplSeparableUnsharpenFilter( const double aRadius = 0.7 ); @@ -376,14 +376,14 @@ public: virtual ~Bitmap(); Bitmap& operator=( const Bitmap& rBitmap ); - inline sal_Bool operator!() const; - inline sal_Bool operator==( const Bitmap& rBitmap ) const; - inline sal_Bool operator!=( const Bitmap& rBitmap ) const; + inline bool operator!() const; + inline bool operator==( const Bitmap& rBitmap ) const; + inline bool operator!=( const Bitmap& rBitmap ) const; - inline sal_Bool IsSameInstance( const Bitmap& rBmp ) const; - sal_Bool IsEqual( const Bitmap& rBmp ) const; + inline bool IsSameInstance( const Bitmap& rBmp ) const; + bool IsEqual( const Bitmap& rBmp ) const; - inline sal_Bool IsEmpty() const; + inline bool IsEmpty() const; void SetEmpty(); inline const MapMode& GetPrefMapMode() const; @@ -397,7 +397,7 @@ public: sal_uInt16 GetBitCount() const; inline sal_uLong GetColorCount() const; inline sal_uLong GetSizeBytes() const; - sal_Bool HasGreyPalette() const; + bool HasGreyPalette() const; /** get system dependent bitmap data @param rData @@ -416,7 +416,7 @@ public: public: - sal_Bool MakeMono( sal_uInt8 cThreshold ); + bool MakeMono( sal_uInt8 cThreshold ); /** Convert bitmap format @@ -426,7 +426,7 @@ public: @return sal_True, if the conversion was completed successfully. */ - sal_Bool Convert( BmpConversion eConversion ); + bool Convert( BmpConversion eConversion ); /** Reduce number of colors for the bitmap @@ -438,7 +438,7 @@ public: @return sal_True, if the color reduction operation was completed successfully. */ - sal_Bool ReduceColors( sal_uInt16 nNewColorCount, + bool ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce = BMP_REDUCE_SIMPLE ); /** Apply a dither algorithm to the bitmap @@ -450,7 +450,7 @@ public: @param nDitherFlags The algorithm to be used for dithering */ - sal_Bool Dither( sal_uLong nDitherFlags = BMP_DITHER_MATRIX ); + bool Dither( sal_uLong nDitherFlags = BMP_DITHER_MATRIX ); /** Crop the bitmap @@ -466,7 +466,7 @@ public: nothing had to be cropped, because e.g. the crop rectangle included the bitmap, sal_False is returned, too! */ - sal_Bool Crop( const Rectangle& rRectPixel ); + bool Crop( const Rectangle& rRectPixel ); /** Expand the bitmap by pixel padding @@ -483,7 +483,7 @@ public: not only returned when the operation failed, but also if nothing had to be done, e.g. because nDX and nDY were zero. */ - sal_Bool Expand( sal_uLong nDX, sal_uLong nDY, + bool Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor = NULL ); /** Copy a rectangular area from another bitmap @@ -508,7 +508,7 @@ public: nothing had to be done, e.g. because one of the rectangles are empty. */ - sal_Bool CopyPixel( const Rectangle& rRectDst, + bool CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const Bitmap* pBmpSrc = NULL ); @@ -522,7 +522,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool CombineSimple( const Bitmap& rMask, + bool CombineSimple( const Bitmap& rMask, BmpCombine eCombine ); /** Alpha-blend the given bitmap against a specified uniform @@ -541,7 +541,7 @@ public: @return sal_True, if blending was successful, sal_False otherwise */ - sal_Bool Blend( const AlphaMask& rAlpha, + bool Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ); /** Fill the entire bitmap with the given color @@ -551,13 +551,13 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Erase( const Color& rFillColor ); + bool Erase( const Color& rFillColor ); /** Perform the Invert operation on every pixel @return sal_True, if the operation was completed successfully. */ - sal_Bool Invert(); + bool Invert(); /** Mirror the bitmap @@ -566,7 +566,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Mirror( sal_uLong nMirrorFlags ); + bool Mirror( sal_uLong nMirrorFlags ); /** Scale the bitmap @@ -578,7 +578,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Scale( const Size& rNewSize, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); + bool Scale( const Size& rNewSize, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); /** Scale the bitmap @@ -593,7 +593,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); + bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); // Adapt the BitCount of rNew to BitCount of lolal, including grey or color paltette // Can be used to create alpha/mask bitmaps after their processing in 24bit @@ -612,7 +612,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Rotate( long nAngle10, const Color& rFillColor ); + bool Rotate( long nAngle10, const Color& rFillColor ); /** Create on-off mask from bitmap @@ -655,7 +655,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Replace( const Bitmap& rMask, const Color& rReplaceColor ); + bool Replace( const Bitmap& rMask, const Color& rReplaceColor ); /** Merge bitmap with given background color according to specified alpha mask @@ -667,7 +667,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Replace( const AlphaMask& rAlpha, const Color& rMergeColor ); + bool Replace( const AlphaMask& rAlpha, const Color& rMergeColor ); /** Replace all pixel having the search color with the specified color @@ -684,7 +684,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol = 0 ); + bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol = 0 ); /** Replace all pixel having one the search colors with the corresponding replace color @@ -704,7 +704,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Replace( const Color* pSearchColors, const Color* rReplaceColors, + bool Replace( const Color* pSearchColors, const Color* rReplaceColors, sal_uLong nColorCount, sal_uLong* pTols = NULL ); /** Convert the bitmap to a PolyPolygon @@ -724,7 +724,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Vectorize( PolyPolygon& rPolyPoly, + bool Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags = BMP_VECTORIZE_OUTER, const Link* pProgress = NULL ); @@ -749,7 +749,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce = 0, + bool Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce = 0, sal_uLong nFlags = BMP_VECTORIZE_INNER, const Link* pProgress = NULL ); @@ -780,13 +780,13 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Adjust( short nLuminancePercent = 0, + bool Adjust( short nLuminancePercent = 0, short nContrastPercent = 0, short nChannelRPercent = 0, short nChannelGPercent = 0, short nChannelBPercent = 0, double fGamma = 1.0, - sal_Bool bInvert = sal_False ); + bool bInvert = false ); /** Apply specified filter to the bitmap @@ -801,7 +801,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Filter( BmpFilter eFilter, + bool Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam = NULL, const Link* pProgress = NULL ); @@ -817,27 +817,27 @@ public: ScopedWriteAccess; }; -inline sal_Bool Bitmap::operator!() const +inline bool Bitmap::operator!() const { return( mpImpBmp == NULL ); } -inline sal_Bool Bitmap::operator==( const Bitmap& rBitmap ) const +inline bool Bitmap::operator==( const Bitmap& rBitmap ) const { return( rBitmap.mpImpBmp == mpImpBmp ); } -inline sal_Bool Bitmap::operator!=( const Bitmap& rBitmap ) const +inline bool Bitmap::operator!=( const Bitmap& rBitmap ) const { return( rBitmap.mpImpBmp != mpImpBmp ); } -inline sal_Bool Bitmap::IsSameInstance( const Bitmap& rBitmap ) const +inline bool Bitmap::IsSameInstance( const Bitmap& rBitmap ) const { return( rBitmap.mpImpBmp == mpImpBmp ); } -inline sal_Bool Bitmap::IsEmpty() const +inline bool Bitmap::IsEmpty() const { return( mpImpBmp == NULL ); } diff --git a/include/vcl/bitmapex.hxx b/include/vcl/bitmapex.hxx index 7306856bd779..506a38bc7fcb 100644 --- a/include/vcl/bitmapex.hxx +++ b/include/vcl/bitmapex.hxx @@ -58,7 +58,7 @@ private: Size aBitmapSize; Color aTransparentColor; TransparentType eTransparent; - sal_Bool bAlpha; + bool bAlpha; public: @@ -77,13 +77,13 @@ public: ~BitmapEx(); BitmapEx& operator=( const BitmapEx& rBitmapEx ); - sal_Bool operator==( const BitmapEx& rBitmapEx ) const; - sal_Bool operator!=( const BitmapEx& rBitmapEx ) const { return !(*this==rBitmapEx); } - sal_Bool operator!() const { return !aBitmap; } + bool operator==( const BitmapEx& rBitmapEx ) const; + bool operator!=( const BitmapEx& rBitmapEx ) const { return !(*this==rBitmapEx); } + bool operator!() const { return !aBitmap; } - sal_Bool IsEqual( const BitmapEx& rBmpEx ) const; + bool IsEqual( const BitmapEx& rBmpEx ) const; - sal_Bool IsEmpty() const; + bool IsEmpty() const; void SetEmpty(); void Clear(); @@ -92,7 +92,7 @@ public: void Draw( OutputDevice* pOutDev, const Point& rDestPt, const Size& rDestSize ) const; - sal_Bool IsTransparent() const; + bool IsTransparent() const; TransparentType GetTransparentType() const { return eTransparent; } Bitmap GetBitmap( const Color* pTransReplaceColor = NULL ) const; @@ -100,7 +100,7 @@ public: BitmapEx GetColorTransformedBitmapEx() const; - sal_Bool IsAlpha() const; + bool IsAlpha() const; AlphaMask GetAlpha() const; const Size& GetSizePixel() const { return aBitmapSize; } @@ -128,7 +128,7 @@ public: @return sal_True, if the conversion was completed successfully. */ - sal_Bool Convert( BmpConversion eConversion ); + bool Convert( BmpConversion eConversion ); /** Reduce number of colors for the bitmap @@ -140,7 +140,7 @@ public: @return sal_True, if the color reduction operation was completed successfully. */ - sal_Bool ReduceColors( sal_uInt16 nNewColorCount, + bool ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce = BMP_REDUCE_SIMPLE ); /** Apply a dither algorithm to the bitmap @@ -152,7 +152,7 @@ public: @param nDitherFlags The algorithm to be used for dithering */ - sal_Bool Dither( sal_uLong nDitherFlags = BMP_DITHER_MATRIX ); + bool Dither( sal_uLong nDitherFlags = BMP_DITHER_MATRIX ); /** Crop the bitmap @@ -168,7 +168,7 @@ public: nothing had to be cropped, because e.g. the crop rectangle included the bitmap, sal_False is returned, too! */ - sal_Bool Crop( const Rectangle& rRectPixel ); + bool Crop( const Rectangle& rRectPixel ); /** Expand the bitmap by pixel padding @@ -188,9 +188,9 @@ public: not only returned when the operation failed, but also if nothing had to be done, e.g. because nDX and nDY were zero. */ - sal_Bool Expand( sal_uLong nDX, sal_uLong nDY, + bool Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor = NULL, - sal_Bool bExpandTransparent = sal_False ); + bool bExpandTransparent = false ); /** Copy a rectangular area from another bitmap @@ -214,7 +214,7 @@ public: nothing had to be done, e.g. because one of the rectangles are empty. */ - sal_Bool CopyPixel( const Rectangle& rRectDst, + bool CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const BitmapEx* pBmpExSrc = NULL ); @@ -226,13 +226,13 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Erase( const Color& rFillColor ); + bool Erase( const Color& rFillColor ); /** Perform the Invert operation on every pixel @return sal_True, if the operation was completed successfully. */ - sal_Bool Invert(); + bool Invert(); /** Mirror the bitmap @@ -241,7 +241,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Mirror( sal_uLong nMirrorFlags ); + bool Mirror( sal_uLong nMirrorFlags ); /** Scale the bitmap @@ -253,7 +253,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Scale( const Size& rNewSize, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); + bool Scale( const Size& rNewSize, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); /** Scale the bitmap @@ -268,7 +268,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); + bool Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag = BMP_SCALE_DEFAULT ); /** Rotate bitmap by the specified angle @@ -283,7 +283,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Rotate( long nAngle10, const Color& rFillColor ); + bool Rotate( long nAngle10, const Color& rFillColor ); /** Replace all pixel having the search color with the specified color @@ -300,7 +300,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol = 0 ); + bool Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol = 0 ); /** Replace all pixel having one the search colors with the corresponding replace color @@ -320,7 +320,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Replace( const Color* pSearchColors, const Color* pReplaceColors, + bool Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols = NULL ); /** Change various global color characteristics @@ -350,13 +350,13 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Adjust( short nLuminancePercent = 0, + bool Adjust( short nLuminancePercent = 0, short nContrastPercent = 0, short nChannelRPercent = 0, short nChannelGPercent = 0, short nChannelBPercent = 0, double fGamma = 1.0, - sal_Bool bInvert = sal_False ); + bool bInvert = false ); /** Apply specified filter to the bitmap @@ -371,7 +371,7 @@ public: @return sal_True, if the operation was completed successfully. */ - sal_Bool Filter( BmpFilter eFilter, + bool Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam = NULL, const Link* pProgress = NULL ); diff --git a/include/vcl/bmpacc.hxx b/include/vcl/bmpacc.hxx index f4cf36c978f0..a233e9624820 100644 --- a/include/vcl/bmpacc.hxx +++ b/include/vcl/bmpacc.hxx @@ -88,12 +88,12 @@ protected: ColorMask maColorMask; FncGetPixel mFncGetPixel; FncSetPixel mFncSetPixel; - sal_Bool mbModify; + bool mbModify; SAL_DLLPRIVATE void ImplCreate( Bitmap& rBitmap ); SAL_DLLPRIVATE void ImplDestroy(); -SAL_DLLPRIVATE sal_Bool ImplSetAccessPointers( sal_uLong nFormat ); +SAL_DLLPRIVATE bool ImplSetAccessPointers( sal_uLong nFormat ); public: @@ -117,21 +117,21 @@ SAL_DLLPRIVATE BitmapBuffer* ImplGetBitmapBuffer() const { return mpBuffer; } DECL_FORMAT( _32BIT_TC_RGBA ) DECL_FORMAT( _32BIT_TC_MASK ) protected: - BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ); + BitmapReadAccess( Bitmap& rBitmap, bool bModify ); public: BitmapReadAccess( Bitmap& rBitmap ); virtual ~BitmapReadAccess(); - inline sal_Bool operator!() const; + inline bool operator!() const; inline long Width() const; inline long Height() const; inline Point TopLeft() const; inline Point BottomRight() const; - inline sal_Bool IsTopDown() const; - inline sal_Bool IsBottomUp() const; + inline bool IsTopDown() const; + inline bool IsBottomUp() const; inline sal_uLong GetScanlineFormat() const; inline sal_uLong GetScanlineSize() const; @@ -142,14 +142,14 @@ public: inline Scanline GetBuffer() const; inline Scanline GetScanline( long nY ) const; - inline sal_Bool HasPalette() const; + inline bool HasPalette() const; inline const BitmapPalette& GetPalette() const; inline sal_uInt16 GetPaletteEntryCount() const; inline const BitmapColor& GetPaletteColor( sal_uInt16 nColor ) const; inline const BitmapColor& GetBestPaletteColor( const BitmapColor& rBitmapColor ) const; sal_uInt16 GetBestPaletteIndex( const BitmapColor& rBitmapColor ) const; - inline sal_Bool HasColorMask() const; + inline bool HasColorMask() const; inline ColorMask& GetColorMask() const; inline BitmapColor GetPixelFromData( const sal_uInt8* pData, long nX ) const; @@ -216,7 +216,7 @@ private: // - Inlines - // ----------- -inline sal_Bool BitmapReadAccess::operator!() const +inline bool BitmapReadAccess::operator!() const { return( mpBuffer == NULL ); } @@ -251,7 +251,7 @@ inline Point BitmapReadAccess::BottomRight() const // ------------------------------------------------------------------ -inline sal_Bool BitmapReadAccess::IsTopDown() const +inline bool BitmapReadAccess::IsTopDown() const { DBG_ASSERT( mpBuffer, "Access is not valid!" ); return( mpBuffer ? sal::static_int_cast<sal_Bool>( BMP_SCANLINE_ADJUSTMENT( mpBuffer->mnFormat ) == BMP_FORMAT_TOP_DOWN ) : sal_False ); @@ -259,7 +259,7 @@ inline sal_Bool BitmapReadAccess::IsTopDown() const // ------------------------------------------------------------------ -inline sal_Bool BitmapReadAccess::IsBottomUp() const +inline bool BitmapReadAccess::IsBottomUp() const { return !IsTopDown(); } @@ -317,7 +317,7 @@ inline Scanline BitmapReadAccess::GetScanline( long nY ) const // ------------------------------------------------------------------ -inline sal_Bool BitmapReadAccess::HasPalette() const +inline bool BitmapReadAccess::HasPalette() const { DBG_ASSERT( mpBuffer, "Access is not valid!" ); return( mpBuffer && !!mpBuffer->maPalette ); @@ -357,7 +357,7 @@ inline const BitmapColor& BitmapReadAccess::GetBestPaletteColor( const BitmapCol // ------------------------------------------------------------------ -inline sal_Bool BitmapReadAccess::HasColorMask() const +inline bool BitmapReadAccess::HasColorMask() const { DBG_ASSERT( mpBuffer, "Access is not valid!" ); const sal_uLong nFormat = BMP_SCANLINE_FORMAT( mpBuffer->mnFormat ); diff --git a/include/vcl/btndlg.hxx b/include/vcl/btndlg.hxx index 0239157302c2..4575cee5e803 100644 --- a/include/vcl/btndlg.hxx +++ b/include/vcl/btndlg.hxx @@ -44,7 +44,7 @@ private: long mnButtonSize; sal_uInt16 mnCurButtonId; sal_uInt16 mnFocusButtonId; - sal_Bool mbFormat; + bool mbFormat; Link maClickHdl; SAL_DLLPRIVATE void ImplInitButtonDialogData(); diff --git a/include/vcl/button.hxx b/include/vcl/button.hxx index 863d25f88e57..6c3fe18e8585 100644 --- a/include/vcl/button.hxx +++ b/include/vcl/button.hxx @@ -52,7 +52,7 @@ public: SAL_DLLPRIVATE sal_uInt16& ImplGetButtonState(); SAL_DLLPRIVATE sal_uInt16 ImplGetTextStyle( OUString& rText, WinBits nWinStyle, sal_uLong nDrawFlags ); SAL_DLLPRIVATE void ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, Size& rSize, - sal_Bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags, + bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags, sal_uInt16 nTextStyle, Rectangle *pSymbolRect=NULL, bool bAddImageSep = false ); SAL_DLLPRIVATE void ImplSetFocusRect( const Rectangle &rFocusRect ); SAL_DLLPRIVATE const Rectangle& ImplGetFocusRect() const; @@ -74,14 +74,14 @@ public: static OUString GetStandardText( StandardButtonType eButton ); - sal_Bool SetModeImage( const Image& rImage ); + bool SetModeImage( const Image& rImage ); const Image GetModeImage( ) const; - sal_Bool HasImage() const; + bool HasImage() const; void SetImageAlign( ImageAlign eAlign ); ImageAlign GetImageAlign() const; - void EnableImageDisplay( sal_Bool bEnable ); - void EnableTextDisplay( sal_Bool bEnable ); + void EnableImageDisplay( bool bEnable ); + void EnableTextDisplay( bool bEnable ); void SetFocusRect( const Rectangle& rFocusRect ); bool IsSmallSymbol() const; @@ -107,20 +107,20 @@ protected: TriState meState; TriState meSaveValue; sal_uInt16 mnDDStyle; - sal_Bool mbPressed; - sal_Bool mbInUserDraw; + bool mbPressed; + bool mbInUserDraw; Link maToggleHdl; SAL_DLLPRIVATE void ImplInitPushButtonData(); SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDrawPushButtonContent( OutputDevice* pDev, sal_uLong nDrawFlags, const Rectangle& rRect, bool bLayout, bool bMenuBtnSep ); SAL_DLLPRIVATE void ImplDrawPushButton( bool bLayout = false ); using Button::ImplGetTextStyle; SAL_DLLPRIVATE sal_uInt16 ImplGetTextStyle( sal_uLong nDrawFlags ) const; - SAL_DLLPRIVATE sal_Bool IsSymbol() const { return ( (meSymbol != SYMBOL_NOSYMBOL) && (meSymbol != SYMBOL_IMAGE) ); } - SAL_DLLPRIVATE sal_Bool IsImage() const { return Button::HasImage(); } + SAL_DLLPRIVATE bool IsSymbol() const { return ( (meSymbol != SYMBOL_NOSYMBOL) && (meSymbol != SYMBOL_IMAGE) ); } + SAL_DLLPRIVATE bool IsImage() const { return Button::HasImage(); } // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE PushButton( const PushButton & ); @@ -131,10 +131,10 @@ protected: using Control::ImplInitSettings; using Window::ImplInit; public: - SAL_DLLPRIVATE void ImplSetDefButton( sal_Bool bSet ); + SAL_DLLPRIVATE void ImplSetDefButton( bool bSet ); SAL_DLLPRIVATE static void ImplDrawPushButtonFrame( Window* pDev, Rectangle& rRect, sal_uInt16 nStyle ); - SAL_DLLPRIVATE static sal_Bool ImplHitTestPushButton( Window* pDev, const Point& rPos ); - SAL_DLLPRIVATE sal_Bool ImplIsDefButton() const; + SAL_DLLPRIVATE static bool ImplHitTestPushButton( Window* pDev, const Point& rPos ); + SAL_DLLPRIVATE bool ImplIsDefButton() const; protected: explicit PushButton( WindowType nType ); @@ -175,11 +175,11 @@ public: void SetState( TriState eState ); TriState GetState() const { return meState; } - void Check( sal_Bool bCheck = sal_True ); - sal_Bool IsChecked() const; + void Check( bool bCheck = true ); + bool IsChecked() const; - void SetPressed( sal_Bool bPressed ); - sal_Bool IsPressed() const { return mbPressed; } + void SetPressed( bool bPressed ); + bool IsPressed() const { return mbPressed; } void EndSelection(); @@ -194,12 +194,12 @@ public: virtual bool set_property(const OString &rKey, const OString &rValue); }; -inline void PushButton::Check( sal_Bool bCheck ) +inline void PushButton::Check( bool bCheck ) { SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK ); } -inline sal_Bool PushButton::IsChecked() const +inline bool PushButton::IsChecked() const { return (GetState() == STATE_CHECK); } @@ -288,10 +288,10 @@ private: Rectangle maStateRect; Rectangle maMouseRect; Image maImage; - sal_Bool mbChecked; - sal_Bool mbSaveValue; - sal_Bool mbRadioCheck; - sal_Bool mbStateChanged; + bool mbChecked; + bool mbSaveValue; + bool mbRadioCheck; + bool mbStateChanged; Link maToggleHdl; // when mbLegacyNoTextAlign is set then the old behaviour where // the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement @@ -300,7 +300,7 @@ private: bool mbLegacyNoTextAlign; SAL_DLLPRIVATE void ImplInitRadioButtonData(); SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDrawRadioButtonState(); SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, @@ -323,7 +323,7 @@ protected: SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); public: - SAL_DLLPRIVATE void ImplCallClick( sal_Bool bGrabFocus = sal_False, sal_uInt16 nFocusFlags = 0 ); + SAL_DLLPRIVATE void ImplCallClick( bool bGrabFocus = false, sal_uInt16 nFocusFlags = 0 ); SAL_DLLPRIVATE void ImplSetMinimumNWFSize(); protected: @@ -362,20 +362,20 @@ public: virtual void Toggle(); - sal_Bool IsStateChanged() const { return mbStateChanged; } + bool IsStateChanged() const { return mbStateChanged; } - void EnableRadioCheck( sal_Bool bRadioCheck = sal_True ) { mbRadioCheck = bRadioCheck; } - sal_Bool IsRadioCheckEnabled() const { return mbRadioCheck; } + void EnableRadioCheck( bool bRadioCheck = true ) { mbRadioCheck = bRadioCheck; } + bool IsRadioCheckEnabled() const { return mbRadioCheck; } - sal_Bool SetModeRadioImage( const Image& rImage ); + bool SetModeRadioImage( const Image& rImage ); const Image& GetModeRadioImage( ) const; - void SetState( sal_Bool bCheck ); - void Check( sal_Bool bCheck = sal_True ); - sal_Bool IsChecked() const { return mbChecked; } + void SetState( bool bCheck ); + void Check( bool bCheck = true ); + bool IsChecked() const { return mbChecked; } void SaveValue() { mbSaveValue = IsChecked(); } - sal_Bool GetSavedValue() const { return mbSaveValue; } + bool GetSavedValue() const { return mbSaveValue; } static Image GetRadioImage( const AllSettings& rSettings, sal_uInt16 nFlags ); @@ -419,7 +419,7 @@ private: Rectangle maMouseRect; TriState meState; TriState meSaveValue; - sal_Bool mbTriState; + bool mbTriState; Link maToggleHdl; // when mbLegacyNoTextAlign is set then the old behaviour where // the WB_LEFT, WB_RIGHT & WB_CENTER affect the image placement @@ -428,7 +428,7 @@ private: bool mbLegacyNoTextAlign; SAL_DLLPRIVATE void ImplInitCheckBoxData(); SAL_DLLPRIVATE WinBits ImplInitStyle( const Window* pPrevWindow, WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplInvalidateOrDrawCheckBoxState(); SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, @@ -480,11 +480,11 @@ public: void SetState( TriState eState ); TriState GetState() const { return meState; } - void Check( sal_Bool bCheck = sal_True ); + void Check( bool bCheck = true ); bool IsChecked() const; - void EnableTriState( sal_Bool bTriState = sal_True ); - sal_Bool IsTriStateEnabled() const { return mbTriState; } + void EnableTriState( bool bTriState = true ); + bool IsTriStateEnabled() const { return mbTriState; } void SaveValue() { meSaveValue = GetState(); } TriState GetSavedValue() const { return meSaveValue; } @@ -502,7 +502,7 @@ public: virtual bool set_property(const OString &rKey, const OString &rValue); }; -inline void CheckBox::Check( sal_Bool bCheck ) +inline void CheckBox::Check( bool bCheck ) { SetState( (bCheck) ? STATE_CHECK : STATE_NOCHECK ); } diff --git a/include/vcl/combobox.hxx b/include/vcl/combobox.hxx index fd49eaab8ad6..86b37ee4a72a 100644 --- a/include/vcl/combobox.hxx +++ b/include/vcl/combobox.hxx @@ -44,9 +44,9 @@ private: ImplListBoxFloatingWindow* mpFloatWin; sal_uInt16 mnDDHeight; sal_Unicode mcMultiSep; - sal_Bool mbDDAutoSize : 1; - sal_Bool mbSyntheticModify : 1; - sal_Bool mbMatchCase : 1; + bool mbDDAutoSize : 1; + bool mbSyntheticModify : 1; + bool mbMatchCase : 1; sal_Int32 m_nMaxWidthChars; Link maSelectHdl; Link maDoubleClickHdl; @@ -86,7 +86,7 @@ protected: protected: explicit ComboBox( WindowType nType ); - sal_Bool IsDropDownBox() const { return mpFloatWin ? sal_True : sal_False; } + bool IsDropDownBox() const { return mpFloatWin ? sal_True : sal_False; } virtual void FillLayoutData() const; public: @@ -122,9 +122,9 @@ public: sal_uInt16 GetDropDownLineCount() const; void EnableAutoSize( bool bAuto ); - sal_Bool IsAutoSizeEnabled() const { return mbDDAutoSize; } + bool IsAutoSizeEnabled() const { return mbDDAutoSize; } - void EnableDDAutoWidth( sal_Bool b ); + void EnableDDAutoWidth( bool b ); virtual void SetText( const OUString& rStr ); virtual void SetText( const OUString& rStr, const Selection& rNewSelection ); @@ -142,25 +142,25 @@ public: OUString GetEntry( sal_uInt16 nPos ) const; sal_uInt16 GetEntryCount() const; - sal_Bool IsTravelSelect() const; - sal_Bool IsInDropDown() const; + bool IsTravelSelect() const; + bool IsInDropDown() const; void ToggleDropDown(); long CalcWindowSizePixel( sal_uInt16 nLines ) const; void SetUserItemSize( const Size& rSz ); - void EnableUserDraw( sal_Bool bUserDraw ); + void EnableUserDraw( bool bUserDraw ); - void DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False ); + void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false ); void SetBorderStyle( sal_uInt16 nBorderStyle ); void SetSeparatorPos( sal_uInt16 n = LISTBOX_ENTRY_NOTFOUND ); - void EnableAutocomplete( sal_Bool bEnable, sal_Bool bMatchCase = sal_False ); - sal_Bool IsAutocompleteEnabled() const; + void EnableAutocomplete( bool bEnable, bool bMatchCase = false ); + bool IsAutocompleteEnabled() const; - void EnableMultiSelection( sal_Bool bMulti ); - sal_Bool IsMultiSelectionEnabled() const; + void EnableMultiSelection( bool bMulti ); + bool IsMultiSelectionEnabled() const; void SetMultiSelectionSeparator( sal_Unicode cSep ) { mcMultiSep = cSep; } sal_Unicode GetMultiSelectionSeparator() const { return mcMultiSep; } @@ -191,8 +191,8 @@ public: sal_uInt16 GetSelectEntryCount() const; sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const; - sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const; - void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True ); + bool IsEntryPosSelected( sal_uInt16 nPos ) const; + void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true ); void SetNoSelection(); Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const; diff --git a/include/vcl/ctrl.hxx b/include/vcl/ctrl.hxx index fb29c7168889..8b3bc14d27df 100644 --- a/include/vcl/ctrl.hxx +++ b/include/vcl/ctrl.hxx @@ -79,7 +79,7 @@ protected: @return if the Control instance has been destroyed in any of the call */ - sal_Bool ImplCallEventListenersAndHandler( + bool ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& rHandler, void* pCaller ); @@ -100,7 +100,7 @@ protected: virtual const Color& GetCanonicalTextColor( const StyleSettings& _rStyle ) const; - void ImplInitSettings( const sal_Bool _bFont, const sal_Bool _bForeground ); + void ImplInitSettings( const bool _bFont, const bool _bForeground ); public: SAL_DLLPRIVATE void ImplClearLayoutData() const; diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index 04279b6fb1b0..59a886227526 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -47,10 +47,10 @@ private: Dialog* mpPrevExecuteDlg; DialogImpl* mpDialogImpl; long mnMousePositioned; - sal_Bool mbInExecute; - sal_Bool mbOldSaveBack; - sal_Bool mbInClose; - sal_Bool mbModalMode; + bool mbInExecute; + bool mbOldSaveBack; + bool mbInClose; + bool mbModalMode; bool mbIsDefferedInit; bool mbIsCalculatingInitialLayoutSize; Timer maLayoutTimer; @@ -75,7 +75,7 @@ protected: SAL_DLLPRIVATE void setPosSizeOnContainee(Size aSize, VclContainer &rBox); public: - SAL_DLLPRIVATE sal_Bool IsInClose() const { return mbInClose; } + SAL_DLLPRIVATE bool IsInClose() const { return mbInClose; } SAL_DLLPRIVATE bool hasPendingLayout() const { return maLayoutTimer.IsActive(); } SAL_DLLPRIVATE void doDeferredInit(bool bResizable); SAL_DLLPRIVATE bool isDeferredInit() const { return mbIsDefferedInit; } @@ -109,10 +109,10 @@ public: VclButtonBox* get_action_area(); VclBox* get_content_area(); - virtual sal_Bool Close(); + virtual bool Close(); virtual short Execute(); - sal_Bool IsInExecute() const { return mbInExecute; } + bool IsInExecute() const { return mbInExecute; } virtual void SetText( const OUString& rStr ); virtual OUString GetText() const; @@ -124,7 +124,7 @@ public: virtual void StartExecuteModal( const Link& rEndDialogHdl ); long GetResult() const; private: - sal_Bool ImplStartExecuteModal(); + bool ImplStartExecuteModal(); void ImplEndExecuteModal(); public: @@ -137,9 +137,9 @@ public: void GetDrawWindowBorder( sal_Int32& rLeftBorder, sal_Int32& rTopBorder, sal_Int32& rRightBorder, sal_Int32& rBottomBorder ) const; - void SetModalInputMode( sal_Bool bModal ); - void SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs ); - sal_Bool IsModalInputMode() const { return mbModalMode; } + void SetModalInputMode( bool bModal ); + void SetModalInputMode( bool bModal, bool bSubModalDialogs ); + bool IsModalInputMode() const { return mbModalMode; } void GrabFocusToFirstControl(); }; @@ -172,7 +172,7 @@ public: protected: using Window::Show; - void Show( sal_Bool bVisible = sal_True ); + void Show( bool bVisible = true ); using Window::Hide; void Hide(); diff --git a/include/vcl/dockingarea.hxx b/include/vcl/dockingarea.hxx index 3ba3f8077bb1..6d88ca02d06f 100644 --- a/include/vcl/dockingarea.hxx +++ b/include/vcl/dockingarea.hxx @@ -41,7 +41,7 @@ public: void SetAlign( WindowAlign eNewAlign ); WindowAlign GetAlign() const; - sal_Bool IsHorizontal() const; + bool IsHorizontal() const; virtual void Paint( const Rectangle& rRect ); virtual void Resize(); diff --git a/include/vcl/dockwin.hxx b/include/vcl/dockwin.hxx index 9d9c6f4d385a..f1f3fbd5e2f4 100644 --- a/include/vcl/dockwin.hxx +++ b/include/vcl/dockwin.hxx @@ -30,24 +30,24 @@ struct DockingData { Point maMousePos; // in Rectangle maTrackRect; // in/out - sal_Bool mbFloating; // out - sal_Bool mbLivemode; // in - sal_Bool mbInteractive; // in + bool mbFloating; // out + bool mbLivemode; // in + bool mbInteractive; // in DockingData() {}; - DockingData( const Point& rPt, const Rectangle& rRect, sal_Bool b) : - maMousePos( rPt ), maTrackRect( rRect ), mbFloating( b ), mbLivemode( sal_False ), mbInteractive( sal_True ) + DockingData( const Point& rPt, const Rectangle& rRect, bool b) : + maMousePos( rPt ), maTrackRect( rRect ), mbFloating( b ), mbLivemode( false ), mbInteractive( true ) {}; }; struct EndDockingData { Rectangle maWindowRect; // in - sal_Bool mbFloating; // in - sal_Bool mbCancelled; // in + bool mbFloating; // in + bool mbCancelled; // in EndDockingData() {}; - EndDockingData( const Rectangle& rRect, sal_Bool b, sal_Bool bCancelled ) : + EndDockingData( const Rectangle& rRect, bool b, bool bCancelled ) : maWindowRect( rRect ), mbFloating( b ), mbCancelled( bCancelled ) {}; }; @@ -55,10 +55,10 @@ struct EndDockingData struct EndPopupModeData { Point maFloatingPos; // in - sal_Bool mbTearoff; // in + bool mbTearoff; // in EndPopupModeData() {}; - EndPopupModeData( const Point& rPos, sal_Bool bTearoff ) : + EndPopupModeData( const Point& rPos, bool bTearoff ) : maFloatingPos( rPos ), mbTearoff( bTearoff ) {}; }; @@ -102,7 +102,7 @@ private: sal_Int32 mnDockRight; sal_Int32 mnDockBottom; WinBits mnFloatBits; - sal_Bool mbDockCanceled:1, + bool mbDockCanceled:1, mbFloatPrevented:1, mbDockable:1, mbDocking:1, @@ -120,21 +120,21 @@ private: void ImplInitData(); DECL_LINK( PopupModeEnd, void* ); - void ImplEnableStartDocking( sal_Bool bEnable = sal_True ) { mbStartDockingEnabled = bEnable; } - sal_Bool ImplStartDockingEnabled() { return mbStartDockingEnabled; } + void ImplEnableStartDocking( bool bEnable = true ) { mbStartDockingEnabled = bEnable; } + bool ImplStartDockingEnabled() { return mbStartDockingEnabled; } public: ImplDockingWindowWrapper( const Window *pWindow ); virtual ~ImplDockingWindowWrapper(); Window* GetWindow() { return mpDockingWindow; } - sal_Bool ImplStartDocking( const Point& rPos ); + bool ImplStartDocking( const Point& rPos ); // those methods actually call the corresponding handlers void StartDocking( const Point& rPos, Rectangle& rRect ); - sal_Bool Docking( const Point& rPos, Rectangle& rRect ); - void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ); - sal_Bool PrepareToggleFloatingMode(); + bool Docking( const Point& rPos, Rectangle& rRect ); + void EndDocking( const Rectangle& rRect, bool bFloatMode ); + bool PrepareToggleFloatingMode(); void ToggleFloatingMode(); void SetDragArea( const Rectangle& rRect ); @@ -142,33 +142,33 @@ public: void Lock(); void Unlock(); - sal_Bool IsLocked() const; + bool IsLocked() const; void StartPopupMode( ToolBox* pParentToolBox, sal_uLong nPopupModeFlags ); - sal_Bool IsInPopupMode() const; + bool IsInPopupMode() const; void TitleButtonClick( sal_uInt16 nButton ); void Pin(); void Roll(); void PopupModeEnd(); void Resizing( Size& rSize ); - sal_Bool Close(); + bool Close(); void Tracking( const TrackingEvent& rTEvt ); long Notify( NotifyEvent& rNEvt ); - void ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True ); + void ShowTitleButton( sal_uInt16 nButton, bool bVisible = true ); void SetMinOutputSizePixel( const Size& rSize ); void SetMaxOutputSizePixel( const Size& rSize ); - sal_Bool IsDocking() const { return mbDocking; } - sal_Bool IsDockable() const { return mbDockable; } - sal_Bool IsDockingCanceled() const { return mbDockCanceled; } - sal_Bool IsFloatingPrevented() const { return mbFloatPrevented; } + bool IsDocking() const { return mbDocking; } + bool IsDockable() const { return mbDockable; } + bool IsDockingCanceled() const { return mbDockCanceled; } + bool IsFloatingPrevented() const { return mbFloatPrevented; } - void SetFloatingMode( sal_Bool bFloatMode = sal_False ); - sal_Bool IsFloatingMode() const; + void SetFloatingMode( bool bFloatMode = false ); + bool IsFloatingMode() const; FloatingWindow* GetFloatingWindow() const { return mpFloatWin; } void SetFloatStyle( WinBits nWinStyle ); @@ -197,19 +197,19 @@ public: void RemoveWindow( const Window *pWin ); ImplDockingWindowWrapper* GetDockingWindowWrapper( const Window *pWin ); - sal_Bool IsDockable( const Window *pWin ); + bool IsDockable( const Window *pWin ); - sal_Bool IsFloating( const Window *pWin ); - void SetFloatingMode( const Window *pWin, sal_Bool bFloating ); + bool IsFloating( const Window *pWin ); + void SetFloatingMode( const Window *pWin, bool bFloating ); void Lock( const Window *pWin ); void Unlock( const Window *pWin ); - sal_Bool IsLocked( const Window *pWin ); + bool IsLocked( const Window *pWin ); void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin ); void StartPopupMode( ToolBox *pParentToolBox, const Window *pWin, sal_uLong nPopupModeFlags ); - sal_Bool IsInPopupMode( const Window *pWin ); + bool IsInPopupMode( const Window *pWin ); void EndPopupMode( const Window *pWin ); // required because those methods are not virtual in Window (!!!) and must @@ -246,7 +246,7 @@ private: sal_Int32 mnDockRight; sal_Int32 mnDockBottom; WinBits mnFloatBits; - sal_Bool mbDockCanceled:1, + bool mbDockCanceled:1, mbDockPrevented:1, mbFloatPrevented:1, mbDockable:1, @@ -273,7 +273,7 @@ protected: SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); public: - SAL_DLLPRIVATE sal_Bool ImplStartDocking( const Point& rPos ); + SAL_DLLPRIVATE bool ImplStartDocking( const Point& rPos ); protected: DockingWindow( WindowType nType ); @@ -284,9 +284,9 @@ public: ~DockingWindow(); virtual void StartDocking(); - virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect ); + virtual bool Docking( const Point& rPos, Rectangle& rRect ); virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ); - virtual sal_Bool PrepareToggleFloatingMode(); + virtual bool PrepareToggleFloatingMode(); virtual void ToggleFloatingMode(); virtual void TitleButtonClick( sal_uInt16 nButton ); @@ -294,18 +294,18 @@ public: virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Tracking( const TrackingEvent& rTEvt ); virtual bool Notify( NotifyEvent& rNEvt ); virtual void StateChanged( StateChangedType nType ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - void SetPin( sal_Bool bPin ); - sal_Bool IsPined() const; + void SetPin( bool bPin ); + bool IsPined() const; void RollUp(); void RollDown(); - sal_Bool IsRollUp() const; + bool IsRollUp() const; void SetRollUpOutputSizePixel( const Size& rSize ); Size GetRollUpOutputSizePixel() const; @@ -315,14 +315,14 @@ public: void SetMaxOutputSizePixel( const Size& rSize ); - sal_Bool IsDocking() const { return mbDocking; } - sal_Bool IsDockable() const { return mbDockable; } - sal_Bool IsDockingCanceled() const { return mbDockCanceled; } - sal_Bool IsDockingPrevented() const { return mbDockPrevented; } - sal_Bool IsFloatingPrevented() const { return mbFloatPrevented; } + bool IsDocking() const { return mbDocking; } + bool IsDockable() const { return mbDockable; } + bool IsDockingCanceled() const { return mbDockCanceled; } + bool IsDockingPrevented() const { return mbDockPrevented; } + bool IsFloatingPrevented() const { return mbFloatPrevented; } - void SetFloatingMode( sal_Bool bFloatMode = sal_False ); - sal_Bool IsFloatingMode() const; + void SetFloatingMode( bool bFloatMode = false ); + bool IsFloatingMode() const; FloatingWindow* GetFloatingWindow() const { return mpFloatWin; } void SetFloatingPos( const Point& rNewPos ); @@ -343,14 +343,14 @@ public: Size GetOutputSizePixel() const; }; -inline void DockingWindow::SetPin( sal_Bool bPin ) +inline void DockingWindow::SetPin( bool bPin ) { if ( mpFloatWin ) mpFloatWin->SetPin( bPin ); mbPined = bPin; } -inline sal_Bool DockingWindow::IsPined() const +inline bool DockingWindow::IsPined() const { if ( mpFloatWin ) return mpFloatWin->IsPined(); @@ -361,17 +361,17 @@ inline void DockingWindow::RollUp() { if ( mpFloatWin ) mpFloatWin->RollUp(); - mbRollUp = sal_True; + mbRollUp = true; } inline void DockingWindow::RollDown() { if ( mpFloatWin ) mpFloatWin->RollDown(); - mbRollUp = sal_False; + mbRollUp = false; } -inline sal_Bool DockingWindow::IsRollUp() const +inline bool DockingWindow::IsRollUp() const { if ( mpFloatWin ) return mpFloatWin->IsRollUp(); diff --git a/include/vcl/edit.hxx b/include/vcl/edit.hxx index 4d6566acdf1f..927db6b3dcfd 100644 --- a/include/vcl/edit.hxx +++ b/include/vcl/edit.hxx @@ -74,7 +74,7 @@ private: sal_Int32 mnMaxWidthChars; AutocompleteAction meAutocompleteAction; sal_Unicode mcEchoChar; - sal_Bool mbModified:1, + bool mbModified:1, mbInternModified:1, mbReadOnly:1, mbInsertMode:1, @@ -98,18 +98,18 @@ private: SAL_DLLPRIVATE void ImplInvalidateOrRepaint(); SAL_DLLPRIVATE void ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uInt8 nMode ); SAL_DLLPRIVATE void ImplSetText( const OUString& rStr, const Selection* pNewSelection = 0 ); - SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = 0, sal_Bool bIsUserInput = sal_False ); + SAL_DLLPRIVATE void ImplInsertText( const OUString& rStr, const Selection* pNewSelection = 0, bool bIsUserInput = false ); SAL_DLLPRIVATE OUString ImplGetValidString( const OUString& rString ) const; SAL_DLLPRIVATE void ImplClearBackground( long nXStart, long nXEnd ); SAL_DLLPRIVATE void ImplPaintBorder( long nXStart, long nXEnd ); - SAL_DLLPRIVATE void ImplShowCursor( sal_Bool bOnlyIfVisible = sal_True ); + SAL_DLLPRIVATE void ImplShowCursor( bool bOnlyIfVisible = true ); SAL_DLLPRIVATE void ImplAlign(); SAL_DLLPRIVATE void ImplAlignAndPaint(); SAL_DLLPRIVATE sal_Int32 ImplGetCharPos( const Point& rWindowPos ) const; - SAL_DLLPRIVATE void ImplSetCursorPos( sal_Int32 nChar, sal_Bool bSelect ); + SAL_DLLPRIVATE void ImplSetCursorPos( sal_Int32 nChar, bool bSelect ); SAL_DLLPRIVATE void ImplShowDDCursor(); SAL_DLLPRIVATE void ImplHideDDCursor(); - SAL_DLLPRIVATE sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvt ); + SAL_DLLPRIVATE bool ImplHandleKeyEvent( const KeyEvent& rKEvt ); SAL_DLLPRIVATE void ImplCopyToSelectionClipboard(); SAL_DLLPRIVATE void ImplCopy( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard ); SAL_DLLPRIVATE void ImplPaste( ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard >& rxClipboard ); @@ -122,9 +122,9 @@ protected: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE void ImplSetSelection( const Selection& rSelection, sal_Bool bPaint = sal_True ); + SAL_DLLPRIVATE void ImplSetSelection( const Selection& rSelection, bool bPaint = true ); SAL_DLLPRIVATE int ImplGetNativeControlType() const; SAL_DLLPRIVATE long ImplGetExtraOffset() const; static SAL_DLLPRIVATE void ImplInvalidateOutermostBorder( Window* pWin ); @@ -171,7 +171,7 @@ public: virtual void Modify(); virtual void UpdateData(); - static sal_Bool IsCharInput( const KeyEvent& rKEvt ); + static bool IsCharInput( const KeyEvent& rKEvt ); virtual void SetModifyFlag(); virtual void ClearModifyFlag(); @@ -184,10 +184,10 @@ public: sal_Unicode GetEchoChar() const { return mcEchoChar; } virtual void SetReadOnly( sal_Bool bReadOnly = sal_True ); - virtual sal_Bool IsReadOnly() const { return mbReadOnly; } + virtual bool IsReadOnly() const { return mbReadOnly; } - void SetInsertMode( sal_Bool bInsert ); - sal_Bool IsInsertMode() const; + void SetInsertMode( bool bInsert ); + bool IsInsertMode() const; virtual void SetMaxTextLen( sal_Int32 nMaxLen = EDIT_NOLIMIT ); virtual sal_Int32 GetMaxTextLen() const { return mnMaxTextLen; } diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 1453ce4a9f6f..bdb983d19853 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -130,33 +130,33 @@ public: sal_uInt16 GetClicks() const { return mnClicks; } - sal_Bool IsEnterWindow() const + bool IsEnterWindow() const { return ((mnMode & MOUSE_ENTERWINDOW) != 0); } - sal_Bool IsLeaveWindow() const + bool IsLeaveWindow() const { return ((mnMode & MOUSE_LEAVEWINDOW) != 0); } - sal_Bool IsSynthetic() const + bool IsSynthetic() const { return ((mnMode & MOUSE_SYNTHETIC) != 0); } - sal_Bool IsModifierChanged() const + bool IsModifierChanged() const { return ((mnMode & MOUSE_MODIFIERCHANGED) != 0); } sal_uInt16 GetButtons() const { return (mnCode & (MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT)); } - sal_Bool IsLeft() const + bool IsLeft() const { return ((mnCode & MOUSE_LEFT) != 0); } - sal_Bool IsMiddle() const + bool IsMiddle() const { return ((mnCode & MOUSE_MIDDLE) != 0); } - sal_Bool IsRight() const + bool IsRight() const { return ((mnCode & MOUSE_RIGHT) != 0); } sal_uInt16 GetModifier() const { return (mnCode & (KEY_SHIFT | KEY_MOD1 | KEY_MOD2)); } bool IsShift() const { return ((mnCode & KEY_SHIFT) != 0); } - sal_Bool IsMod1() const + bool IsMod1() const { return ((mnCode & KEY_MOD1) != 0); } - sal_Bool IsMod2() const + bool IsMod2() const { return ((mnCode & KEY_MOD2) != 0); } - sal_Bool IsMod3() const + bool IsMod3() const { return ((mnCode & KEY_MOD3) != 0); } }; @@ -251,7 +251,7 @@ class VCL_DLLPUBLIC HelpEvent private: Point maPos; sal_uInt16 mnMode; - sal_Bool mbKeyboardActivated; + bool mbKeyboardActivated; public: explicit HelpEvent(); @@ -260,27 +260,27 @@ public: const Point& GetMousePosPixel() const; sal_uInt16 GetMode() const { return mnMode; } - sal_Bool KeyboardActivated() const { return mbKeyboardActivated; } - void SetKeyboardActivated( sal_Bool bKeyboard ) { mbKeyboardActivated = bKeyboard; } + bool KeyboardActivated() const { return mbKeyboardActivated; } + void SetKeyboardActivated( bool bKeyboard ) { mbKeyboardActivated = bKeyboard; } }; inline HelpEvent::HelpEvent() { mnMode = HELPMODE_CONTEXT; - mbKeyboardActivated = sal_True; + mbKeyboardActivated = true; } inline HelpEvent::HelpEvent( const Point& rMousePos, sal_uInt16 nHelpMode ) : maPos( rMousePos ) { mnMode = nHelpMode; - mbKeyboardActivated = sal_False; + mbKeyboardActivated = false; } inline HelpEvent::HelpEvent( sal_uInt16 nHelpMode ) { mnMode = nHelpMode; - mbKeyboardActivated = sal_True; + mbKeyboardActivated = true; } // ----------------- @@ -353,12 +353,12 @@ public: const MouseEvent& GetMouseEvent() const { return maMEvt; } - sal_Bool IsTrackingRepeat() const + bool IsTrackingRepeat() const { return ((mnFlags & TRACKING_REPEAT) != 0); } - sal_Bool IsTrackingEnded() const + bool IsTrackingEnded() const { return ((mnFlags & ENDTRACK_END) != 0); } - sal_Bool IsTrackingCanceled() const + bool IsTrackingCanceled() const { return ((mnFlags & ENDTRACK_CANCEL) != 0); } sal_uInt16 GetTrackingFlags() const { return mnFlags; } }; diff --git a/include/vcl/field.hxx b/include/vcl/field.hxx index db6f8589fe3d..01f6c2f8d4fa 100644 --- a/include/vcl/field.hxx +++ b/include/vcl/field.hxx @@ -44,20 +44,20 @@ private: Edit* mpField; LocaleDataWrapper* mpLocaleDataWrapper; Link maErrorLink; - sal_Bool mbReformat; - sal_Bool mbStrictFormat; - sal_Bool mbEmptyFieldValue; - sal_Bool mbEmptyFieldValueEnabled; - sal_Bool mbDefaultLocale; + bool mbReformat; + bool mbStrictFormat; + bool mbEmptyFieldValue; + bool mbEmptyFieldValueEnabled; + bool mbDefaultLocale; protected: SAL_DLLPRIVATE void ImplSetText( const OUString& rText, Selection* pNewSel = NULL ); - SAL_DLLPRIVATE sal_Bool ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; } + SAL_DLLPRIVATE bool ImplGetEmptyFieldValue() const { return mbEmptyFieldValue; } - void SetEmptyFieldValueData( sal_Bool bValue ) { mbEmptyFieldValue = bValue; } + void SetEmptyFieldValueData( bool bValue ) { mbEmptyFieldValue = bValue; } SAL_DLLPRIVATE LocaleDataWrapper& ImplGetLocaleDataWrapper() const; - sal_Bool IsDefaultLocale() const { return mbDefaultLocale; } + bool IsDefaultLocale() const { return mbDefaultLocale; } public: explicit FormatterBase( Edit* pField = NULL ); @@ -68,11 +68,11 @@ public: void SetField( Edit* pField ) { mpField = pField; } Edit* GetField() const { return mpField; } - sal_Bool MustBeReformatted() const { return mbReformat; } - void MarkToBeReformatted( sal_Bool b ) { mbReformat = b; } + bool MustBeReformatted() const { return mbReformat; } + void MarkToBeReformatted( bool b ) { mbReformat = b; } - void SetStrictFormat( sal_Bool bStrict ); - sal_Bool IsStrictFormat() const { return mbStrictFormat; } + void SetStrictFormat( bool bStrict ); + bool IsStrictFormat() const { return mbStrictFormat; } virtual void Reformat(); virtual void ReformatAll(); @@ -87,10 +87,10 @@ public: const Link& GetErrorHdl() const { return maErrorLink; } void SetEmptyFieldValue(); - sal_Bool IsEmptyFieldValue() const; + bool IsEmptyFieldValue() const; - void EnableEmptyFieldValue( sal_Bool bEnable ) { mbEmptyFieldValueEnabled = bEnable; } - sal_Bool IsEmptyFieldValueEnabled() const { return mbEmptyFieldValueEnabled; } + void EnableEmptyFieldValue( bool bEnable ) { mbEmptyFieldValueEnabled = bEnable; } + bool IsEmptyFieldValueEnabled() const { return mbEmptyFieldValueEnabled; } }; @@ -108,7 +108,7 @@ private: OUString maLiteralMask; sal_uInt16 mnFormatFlags; bool mbSameMask; - sal_Bool mbInPattKeyInput; + bool mbInPattKeyInput; protected: PatternFormatter(); @@ -116,7 +116,7 @@ protected: SAL_DLLPRIVATE void ImplSetMask(const OString& rEditMask, const OUString& rLiteralMask); SAL_DLLPRIVATE bool ImplIsSameMask() const { return mbSameMask; } - SAL_DLLPRIVATE sal_Bool& ImplGetInPattKeyInput() { return mbInPattKeyInput; } + SAL_DLLPRIVATE bool& ImplGetInPattKeyInput() { return mbInPattKeyInput; } public: virtual ~PatternFormatter(); @@ -132,7 +132,7 @@ public: void SetString( const OUString& rStr ); OUString GetString() const; - sal_Bool IsStringModified() const { return !(GetString() == maFieldString ); } + bool IsStringModified() const { return !(GetString() == maFieldString ); } }; // -------------------- @@ -152,8 +152,8 @@ protected: sal_Int64 mnCorrectedValue; sal_uInt16 mnType; sal_uInt16 mnDecimalDigits; - sal_Bool mbThousandSep; - sal_Bool mbShowTrailingZeros; + bool mbThousandSep; + bool mbShowTrailingZeros; // the members below are used in all derivatives of NumericFormatter // not in NumericFormatter itself. @@ -170,7 +170,7 @@ protected: void FieldLast(); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE sal_Bool ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr ); + SAL_DLLPRIVATE bool ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr ); SAL_DLLPRIVATE void ImplNewFieldValue( sal_Int64 nNewValue ); SAL_DLLPRIVATE void ImplSetUserValue( sal_Int64 nNewValue, Selection* pNewSelection = NULL ); @@ -194,18 +194,18 @@ public: void SetDecimalDigits( sal_uInt16 nDigits ); sal_uInt16 GetDecimalDigits() const; - void SetUseThousandSep( sal_Bool b ); - sal_Bool IsUseThousandSep() const { return mbThousandSep; } + void SetUseThousandSep( bool b ); + bool IsUseThousandSep() const { return mbThousandSep; } - void SetShowTrailingZeros( sal_Bool bShowTrailingZeros ); - sal_Bool IsShowTrailingZeros() const { return mbShowTrailingZeros; } + void SetShowTrailingZeros( bool bShowTrailingZeros ); + bool IsShowTrailingZeros() const { return mbShowTrailingZeros; } void SetUserValue( sal_Int64 nNewValue ); virtual void SetValue( sal_Int64 nNewValue ); virtual sal_Int64 GetValue() const; virtual OUString CreateFieldText( sal_Int64 nValue ) const; - sal_Bool IsValueModified() const; + bool IsValueModified() const; sal_Int64 GetCorrectedValue() const { return mnCorrectedValue; } sal_Int64 Normalize( sal_Int64 nValue ) const; @@ -232,7 +232,7 @@ protected: MetricFormatter(); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE sal_Bool ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ); + SAL_DLLPRIVATE bool ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ); public: virtual ~MetricFormatter(); @@ -283,7 +283,7 @@ private: protected: CurrencyFormatter(); - SAL_DLLPRIVATE sal_Bool ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ); + SAL_DLLPRIVATE bool ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ); public: virtual ~CurrencyFormatter(); @@ -311,11 +311,11 @@ private: Date maMin; Date maMax; Date maCorrectedDate; - sal_Bool mbLongFormat; - sal_Bool mbShowDateCentury; + bool mbLongFormat; + bool mbShowDateCentury; sal_uInt16 mnDateFormat; sal_uLong mnExtDateFormat; - sal_Bool mbEnforceValidValue; + bool mbEnforceValidValue; SAL_DLLPRIVATE void ImplInit(); @@ -324,7 +324,7 @@ protected: SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE const Date& ImplGetFieldDate() const { return maFieldDate; } - SAL_DLLPRIVATE sal_Bool ImplDateReformat( const OUString& rStr, OUString& rOutStr, + SAL_DLLPRIVATE bool ImplDateReformat( const OUString& rStr, OUString& rOutStr, const AllSettings& rSettings ); SAL_DLLPRIVATE void ImplSetUserDate( const Date& rNewDate, Selection* pNewSelection = NULL ); @@ -333,7 +333,7 @@ protected: SAL_DLLPRIVATE void ImplNewFieldValue( const Date& rDate ); CalendarWrapper& GetCalendarWrapper() const; - SAL_DLLPRIVATE sal_Bool ImplAllowMalformedInput() const; + SAL_DLLPRIVATE bool ImplAllowMalformedInput() const; public: virtual ~DateFormatter(); @@ -345,7 +345,7 @@ public: void SetExtDateFormat( ExtDateFieldFormat eFormat ); - ExtDateFieldFormat GetExtDateFormat( sal_Bool bResolveSystemFormat = sal_False ) const; + ExtDateFieldFormat GetExtDateFormat( bool bResolveSystemFormat = false ) const; void SetMin( const Date& rNewMin ); const Date& GetMin() const { return maMin; } @@ -358,17 +358,17 @@ public: // MT: Remove these methods too, ExtDateFormat should be enough! // What should happen if using DDMMYYYY, but ShowCentury=sal_False? // -------------------------------------------------------------- - void SetLongFormat( sal_Bool bLong ); - sal_Bool IsLongFormat() const { return mbLongFormat; } - void SetShowDateCentury( sal_Bool bShowCentury ); - sal_Bool IsShowDateCentury() const { return mbShowDateCentury; } + void SetLongFormat( bool bLong ); + bool IsLongFormat() const { return mbLongFormat; } + void SetShowDateCentury( bool bShowCentury ); + bool IsShowDateCentury() const { return mbShowDateCentury; } // -------------------------------------------------------------- void SetDate( const Date& rNewDate ); void SetUserDate( const Date& rNewDate ); Date GetDate() const; void SetEmptyDate(); - sal_Bool IsEmptyDate() const; + bool IsEmptyDate() const; Date GetCorrectedDate() const { return maCorrectedDate; } void ResetLastDate() { maLastDate = Date( 0, 0, 0 ); } @@ -390,8 +390,8 @@ public: In addition, if this is set to false, the text in the field will \em not be corrected when the control loses the focus - instead, the invalid input will be preserved. */ - void EnforceValidValue( sal_Bool _bEnforce ) { mbEnforceValidValue = _bEnforce; } - inline sal_Bool IsEnforceValidValue( ) const { return mbEnforceValidValue; } + void EnforceValidValue( bool _bEnforce ) { mbEnforceValidValue = _bEnforce; } + inline bool IsEnforceValidValue( ) const { return mbEnforceValidValue; } }; @@ -408,8 +408,8 @@ private: Time maCorrectedTime; TimeFieldFormat meFormat; sal_uInt16 mnTimeFormat; - sal_Bool mbDuration; - sal_Bool mbEnforceValidValue; + bool mbDuration; + bool mbEnforceValidValue; SAL_DLLPRIVATE void ImplInit(); @@ -419,10 +419,10 @@ protected: TimeFormatter(); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE sal_Bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); + SAL_DLLPRIVATE bool ImplTimeReformat( const OUString& rStr, OUString& rOutStr ); SAL_DLLPRIVATE void ImplNewFieldValue( const Time& rTime ); SAL_DLLPRIVATE void ImplSetUserTime( const Time& rNewTime, Selection* pNewSelection = NULL ); - SAL_DLLPRIVATE sal_Bool ImplAllowMalformedInput() const; + SAL_DLLPRIVATE bool ImplAllowMalformedInput() const; public: @@ -447,14 +447,14 @@ public: void SetFormat( TimeFieldFormat eNewFormat ); TimeFieldFormat GetFormat() const { return meFormat; } - void SetDuration( sal_Bool mbDuration ); - sal_Bool IsDuration() const { return mbDuration; } + void SetDuration( bool mbDuration ); + bool IsDuration() const { return mbDuration; } void SetTime( const Time& rNewTime ); void SetUserTime( const Time& rNewTime ); Time GetTime() const; void SetEmptyTime() { FormatterBase::SetEmptyFieldValue(); } - sal_Bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); } + bool IsEmptyTime() const { return FormatterBase::IsEmptyFieldValue(); } Time GetCorrectedTime() const { return maCorrectedTime; } static Time GetInvalidTime() { return Time( 99, 99, 99 ); } @@ -471,8 +471,8 @@ public: In addition, if this is set to false, the text in the field will <em>not</em> be corrected when the control loses the focus - instead, the invalid input will be preserved. */ - void EnforceValidValue( sal_Bool _bEnforce ) { mbEnforceValidValue = _bEnforce; } - inline sal_Bool IsEnforceValidValue( ) const { return mbEnforceValidValue; } + void EnforceValidValue( bool _bEnforce ) { mbEnforceValidValue = _bEnforce; } + inline bool IsEnforceValidValue( ) const { return mbEnforceValidValue; } }; @@ -628,7 +628,7 @@ private: Date maLast; protected: - SAL_DLLPRIVATE void ImplDateSpinArea( sal_Bool bUp ); + SAL_DLLPRIVATE void ImplDateSpinArea( bool bUp ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); public: @@ -664,7 +664,7 @@ private: Time maLast; protected: - SAL_DLLPRIVATE void ImplTimeSpinArea( sal_Bool bUp ); + SAL_DLLPRIVATE void ImplTimeSpinArea( bool bUp ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); public: diff --git a/include/vcl/fixed.hxx b/include/vcl/fixed.hxx index 629c3c5818ee..8eba420ac504 100644 --- a/include/vcl/fixed.hxx +++ b/include/vcl/fixed.hxx @@ -44,7 +44,7 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, bool bFillLayout = false ) const; public: @@ -101,7 +101,7 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDraw( bool bLayout = false ); protected: @@ -168,7 +168,7 @@ class VCL_DLLPUBLIC FixedImage : public Control { private: Image maImage; - sal_Bool mbInUserDraw; + bool mbInUserDraw; private: using Control::ImplInitSettings; @@ -198,7 +198,7 @@ public: void SetImage( const Image& rImage ); const Image& GetImage() const { return maImage; } - sal_Bool SetModeImage( const Image& rImage ); + bool SetModeImage( const Image& rImage ); const Image& GetModeImage( ) const; virtual bool set_property(const OString &rKey, const OString &rValue); diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx index a3ece25dfe8b..fcc47519a7cb 100644 --- a/include/vcl/floatwin.hxx +++ b/include/vcl/floatwin.hxx @@ -76,14 +76,14 @@ private: sal_uLong mnPopupModeFlags; sal_uInt16 mnTitle; sal_uInt16 mnOldTitle; - sal_Bool mbInPopupMode; - sal_Bool mbPopupMode; - sal_Bool mbPopupModeCanceled; - sal_Bool mbPopupModeTearOff; - sal_Bool mbMouseDown; - sal_Bool mbOldSaveBackMode; - sal_Bool mbGrabFocus; // act as key input window, although focus is not set - sal_Bool mbInCleanUp; + bool mbInPopupMode; + bool mbPopupMode; + bool mbPopupModeCanceled; + bool mbPopupModeTearOff; + bool mbMouseDown; + bool mbOldSaveBackMode; + bool mbGrabFocus; // act as key input window, although focus is not set + bool mbInCleanUp; Link maPopupModeEndHdl; SAL_DLLPRIVATE void ImplCallPopupModeEnd(); @@ -105,15 +105,15 @@ public: #define IMPL_FLOATWIN_HITTEST_RECT ((sal_uInt16)0x0004) SAL_DLLPRIVATE FloatingWindow* ImplFloatHitTest( Window* pReference, const Point& rPos, sal_uInt16& rHitTest ); SAL_DLLPRIVATE FloatingWindow* ImplFindLastLevelFloat(); - SAL_DLLPRIVATE sal_Bool ImplIsFloatPopupModeWindow( const Window* pWindow ); - SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = sal_True; } - SAL_DLLPRIVATE sal_Bool ImplIsMouseDown() const { return mbMouseDown; } + SAL_DLLPRIVATE bool ImplIsFloatPopupModeWindow( const Window* pWindow ); + SAL_DLLPRIVATE void ImplSetMouseDown() { mbMouseDown = true; } + SAL_DLLPRIVATE bool ImplIsMouseDown() const { return mbMouseDown; } SAL_DLLPRIVATE static Point ImplCalcPos( Window* pWindow, const Rectangle& rRect, sal_uLong nFlags, sal_uInt16& rArrangeIndex ); SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 ); SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect(); - SAL_DLLPRIVATE sal_Bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } + SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; } public: explicit FloatingWindow( Window* pParent, WinBits nStyle = WB_STDFLOATWIN ); @@ -135,15 +135,15 @@ public: void AddPopupModeWindow( Window* pWindow ); sal_uLong GetPopupModeFlags() const { return mnPopupModeFlags; } void SetPopupModeFlags( sal_uLong nFlags ) { mnPopupModeFlags = nFlags; } - sal_Bool IsInPopupMode() const { return mbPopupMode; } - sal_Bool IsInCleanUp() const { return mbInCleanUp; } - sal_Bool IsPopupModeCanceled() const { return mbPopupModeCanceled; } - sal_Bool IsPopupModeTearOff() const { return mbPopupModeTearOff; } + bool IsInPopupMode() const { return mbPopupMode; } + bool IsInCleanUp() const { return mbInCleanUp; } + bool IsPopupModeCanceled() const { return mbPopupModeCanceled; } + bool IsPopupModeTearOff() const { return mbPopupModeTearOff; } void SetPopupModeEndHdl( const Link& rLink ) { maPopupModeEndHdl = rLink; } const Link& GetPopupModeEndHdl() const { return maPopupModeEndHdl; } - sal_Bool GrabsFocus() const { return mbGrabFocus; } + bool GrabsFocus() const { return mbGrabFocus; } static Point CalcFloatingPosition( Window* pWindow, const Rectangle& rRect, sal_uLong nFlags, sal_uInt16& rArrangeIndex ); }; diff --git a/include/vcl/font.hxx b/include/vcl/font.hxx index d49d647f3655..dbd44fcddaf5 100644 --- a/include/vcl/font.hxx +++ b/include/vcl/font.hxx @@ -59,8 +59,8 @@ public: const Color& GetColor() const; void SetFillColor( const Color& ); const Color& GetFillColor() const; - void SetTransparent( sal_Bool bTransparent ); - sal_Bool IsTransparent() const; + void SetTransparent( bool bTransparent ); + bool IsTransparent() const; void SetAlign( FontAlign ); FontAlign GetAlign() const; @@ -93,11 +93,11 @@ public: void SetOrientation( short nLineOrientation ); short GetOrientation() const; - void SetVertical( sal_Bool bVertical ); + void SetVertical( bool bVertical ); bool IsVertical() const; void SetKerning( FontKerning nKerning ); FontKerning GetKerning() const; - sal_Bool IsKerning() const; + bool IsKerning() const; void SetWeight( FontWeight ); FontWeight GetWeight() const; @@ -105,10 +105,10 @@ public: FontWidth GetWidthType() const; void SetItalic( FontItalic ); FontItalic GetItalic() const; - void SetOutline( sal_Bool bOutline ); - sal_Bool IsOutline() const; - void SetShadow( sal_Bool bShadow ); - sal_Bool IsShadow() const; + void SetOutline( bool bOutline ); + bool IsOutline() const; + void SetShadow( bool bShadow ); + bool IsShadow() const; void SetRelief( FontRelief ); FontRelief GetRelief() const; void SetUnderline( FontUnderline ); @@ -119,8 +119,8 @@ public: FontStrikeout GetStrikeout() const; void SetEmphasisMark( FontEmphasisMark ); FontEmphasisMark GetEmphasisMark() const; - void SetWordLineMode( sal_Bool bWordLine ); - sal_Bool IsWordLineMode() const; + void SetWordLineMode( bool bWordLine ); + bool IsWordLineMode() const; void Merge( const Font& rFont ); void GetFontAttributes( ImplFontAttributes& rAttrs ) const; @@ -129,7 +129,7 @@ public: bool operator==( const Font& ) const; bool operator!=( const Font& rFont ) const { return !(Font::operator==( rFont )); } - sal_Bool IsSameInstance( const Font& ) const; + bool IsSameInstance( const Font& ) const; friend VCL_DLLPUBLIC SvStream& ReadFont( SvStream& rIStm, Font& ); friend VCL_DLLPUBLIC SvStream& WriteFont( SvStream& rOStm, const Font& ); diff --git a/include/vcl/gdimtf.hxx b/include/vcl/gdimtf.hxx index a322f8e2cf4f..fcb095ab6bba 100644 --- a/include/vcl/gdimtf.hxx +++ b/include/vcl/gdimtf.hxx @@ -81,9 +81,9 @@ private: GDIMetaFile* pPrev; GDIMetaFile* pNext; OutputDevice* pOutDev; - sal_Bool bPause; - sal_Bool bRecord; - sal_Bool bUseCanvas; + bool bPause; + bool bRecord; + bool bUseCanvas; SAL_DLLPRIVATE static Color ImplColAdjustFnc( const Color& rColor, const void* pColParam ); @@ -126,11 +126,11 @@ public: virtual ~GDIMetaFile(); GDIMetaFile& operator=( const GDIMetaFile& rMtf ); - sal_Bool operator==( const GDIMetaFile& rMtf ) const; - sal_Bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); } + bool operator==( const GDIMetaFile& rMtf ) const; + bool operator!=( const GDIMetaFile& rMtf ) const { return !( *this == rMtf ); } void Clear(); - sal_Bool Mirror( sal_uLong nMirrorFlags ); + bool Mirror( sal_uLong nMirrorFlags ); void Move( long nX, long nY ); // additional Move method getting specifics how to handle MapMode( MAP_PIXEL ) void Move( long nX, long nY, long nDPIX, long nDPIY ); @@ -150,7 +150,7 @@ public: void Adjust( short nLuminancePercent = 0, short nContrastPercent = 0, short nChannelRPercent = 0, short nChannelGPercent = 0, short nChannelBPercent = 0, double fGamma = 1.0, - sal_Bool bInvert = sal_False + bool bInvert = false ); void Convert( MtfConversion eConversion ); @@ -160,15 +160,15 @@ public: GDIMetaFile GetMonochromeMtf( const Color& rCol ) const; void Record( OutputDevice* pOutDev ); - sal_Bool IsRecord() const { return bRecord; } + bool IsRecord() const { return bRecord; } void Play( GDIMetaFile& rMtf, size_t nPos = GDI_METAFILE_END ); void Play( OutputDevice* pOutDev, size_t nPos = GDI_METAFILE_END ); void Play( OutputDevice* pOutDev, const Point& rPos, const Size& rSize, size_t nPos = GDI_METAFILE_END ); - void Pause( sal_Bool bPause ); - sal_Bool IsPause() const { return bPause; } + void Pause( bool bPause ); + bool IsPause() const { return bPause; } void Stop(); @@ -214,10 +214,10 @@ public: friend VCL_DLLPUBLIC SvStream& WriteGDIMetaFile( SvStream& rOStm, const GDIMetaFile& rGDIMetaFile ); /// Creates an antialiased thumbnail, with maximum width or height of nMaximumExtent. - sal_Bool CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumSize = 256) const; + bool CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumSize = 256) const; - void UseCanvas( sal_Bool _bUseCanvas ); - sal_Bool GetUseCanvas() const { return bUseCanvas; } + void UseCanvas( bool _bUseCanvas ); + bool GetUseCanvas() const { return bUseCanvas; } }; /** Create a special metaaction that delegates rendering to specified diff --git a/include/vcl/gfxlink.hxx b/include/vcl/gfxlink.hxx index 1bf3f68e2691..9ecde74de55d 100644 --- a/include/vcl/gfxlink.hxx +++ b/include/vcl/gfxlink.hxx @@ -61,7 +61,7 @@ struct ImpSwap sal_uInt8* GetData() const; - sal_Bool IsSwapped() const { return maURL.getLength() > 0; } + bool IsSwapped() const { return maURL.getLength() > 0; } void WriteTo( SvStream& rOStm ) const; }; @@ -137,11 +137,11 @@ public: GfxLink(); GfxLink( const GfxLink& ); GfxLink( const OUString& rPath, GfxLinkType nType ); - GfxLink( sal_uInt8* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, sal_Bool bOwns ); + GfxLink( sal_uInt8* pBuf, sal_uInt32 nBufSize, GfxLinkType nType, bool bOwns ); ~GfxLink(); GfxLink& operator=( const GfxLink& ); - sal_Bool IsEqual( const GfxLink& ) const; + bool IsEqual( const GfxLink& ) const; GfxLinkType GetType() const; @@ -149,7 +149,7 @@ public: sal_uInt32 GetUserId() const { return mnUserId; } sal_uInt32 GetDataSize() const; - void SetData( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns ); + void SetData( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ); const sal_uInt8* GetData() const; const Size& GetPrefSize() const; @@ -160,16 +160,16 @@ public: void SetPrefMapMode( const MapMode& rPrefMapMode ); bool IsPrefMapModeValid(); - sal_Bool IsNative() const; - sal_Bool IsUser() const { return( GFX_LINK_TYPE_USER == meType ); } + bool IsNative() const; + bool IsUser() const { return( GFX_LINK_TYPE_USER == meType ); } - sal_Bool LoadNative( Graphic& rGraphic ); + bool LoadNative( Graphic& rGraphic ); - sal_Bool ExportNative( SvStream& rOStream ) const; + bool ExportNative( SvStream& rOStream ) const; void SwapOut(); void SwapIn(); - sal_Bool IsSwappedOut() const { return( mpSwap != NULL ); } + bool IsSwappedOut() const { return( mpSwap != NULL ); } public: diff --git a/include/vcl/gradient.hxx b/include/vcl/gradient.hxx index 3a10dc083ee3..9b044f0f103d 100644 --- a/include/vcl/gradient.hxx +++ b/include/vcl/gradient.hxx @@ -103,10 +103,10 @@ public: void GetBoundRect( const Rectangle& rRect, Rectangle &rBoundRect, Point& rCenter ) const; Gradient& operator=( const Gradient& rGradient ); - sal_Bool operator==( const Gradient& rGradient ) const; - sal_Bool operator!=( const Gradient& rGradient ) const + bool operator==( const Gradient& rGradient ) const; + bool operator!=( const Gradient& rGradient ) const { return !(Gradient::operator==( rGradient )); } - sal_Bool IsSameInstance( const Gradient& rGradient ) const + bool IsSameInstance( const Gradient& rGradient ) const { return (mpImplGradient == rGradient.mpImplGradient); } friend VCL_DLLPUBLIC SvStream& ReadGradient( SvStream& rIStm, Gradient& rGradient ); diff --git a/include/vcl/graph.h b/include/vcl/graph.h index abc7aa50275a..30f4230a11d4 100644 --- a/include/vcl/graph.h +++ b/include/vcl/graph.h @@ -39,7 +39,7 @@ protected: OUString maUpperName; ReaderData* mpReaderData; - sal_Bool mbIsReading; + bool mbIsReading; GraphicReader() : mpReaderData( NULL ), @@ -51,7 +51,7 @@ public: const OUString& GetUpperFilterName() const { return maUpperName; } ReaderData* GetReaderData() const { return mpReaderData; } - sal_Bool IsReading() const { return mbIsReading; } + bool IsReading() const { return mbIsReading; } // TODO: when incompatible changes are possible again // the preview size hint should be redone diff --git a/include/vcl/graph.hxx b/include/vcl/graph.hxx index ec04cd7dcf57..3d19705f0aa0 100644 --- a/include/vcl/graph.hxx +++ b/include/vcl/graph.hxx @@ -103,20 +103,20 @@ public: virtual ~Graphic(); Graphic& operator=( const Graphic& rGraphic ); - sal_Bool operator==( const Graphic& rGraphic ) const; - sal_Bool operator!=( const Graphic& rGraphic ) const; - sal_Bool operator!() const; + bool operator==( const Graphic& rGraphic ) const; + bool operator!=( const Graphic& rGraphic ) const; + bool operator!() const; void Clear(); GraphicType GetType() const; void SetDefaultType(); - sal_Bool IsSupportedGraphic() const; + bool IsSupportedGraphic() const; - sal_Bool IsTransparent() const; - sal_Bool IsAlpha() const; - sal_Bool IsAnimated() const; - sal_Bool IsEPS() const; + bool IsTransparent() const; + bool IsAlpha() const; + bool IsAnimated() const; + bool IsEPS() const; // #i102089# Access of Bitmap potentially will have to rasterconvert the Graphic // if it is a MetaFile. To be able to control this conversion it is necessary to @@ -176,17 +176,17 @@ public: const OUString& GetDocFileName() const; sal_uLong GetDocFilePos() const; - sal_Bool SwapOut(); - sal_Bool SwapOut( SvStream* pOStm ); - sal_Bool SwapIn(); - sal_Bool SwapIn( SvStream* pIStm ); - sal_Bool IsSwapOut() const; + bool SwapOut(); + bool SwapOut( SvStream* pOStm ); + bool SwapIn(); + bool SwapIn( SvStream* pIStm ); + bool IsSwapOut() const; void SetLink( const GfxLink& ); GfxLink GetLink() const; - sal_Bool IsLink() const; + bool IsLink() const; - sal_Bool ExportNative( SvStream& rOStream ) const; + bool ExportNative( SvStream& rOStream ) const; friend VCL_DLLPUBLIC SvStream& WriteGraphic( SvStream& rOStream, const Graphic& rGraphic ); friend VCL_DLLPUBLIC SvStream& ReadGraphic( SvStream& rIStream, Graphic& rGraphic ); diff --git a/include/vcl/graphicfilter.hxx b/include/vcl/graphicfilter.hxx index 24d7057d62cc..d62cf40a3f69 100644 --- a/include/vcl/graphicfilter.hxx +++ b/include/vcl/graphicfilter.hxx @@ -132,37 +132,37 @@ class VCL_DLLPUBLIC GraphicDescriptor sal_uInt16 nBitsPerPixel; sal_uInt16 nPlanes; sal_uInt16 nFormat; - sal_Bool bCompressed; - sal_Bool bOwnStream; + bool bCompressed; + bool bOwnStream; void ImpConstruct(); - sal_Bool ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPCD( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectXBM( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectXPM( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPBM( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPGM( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPPM( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectRAS( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectTGA( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectEPS( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectDXF( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectMET( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectPCT( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectSGF( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectWMF( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectSGV( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectEMF( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectSVG( SvStream& rStm, sal_Bool bExtendedInfo ); - sal_Bool ImpDetectMOV( SvStream& rStm, sal_Bool bExtendedInfo ); + bool ImpDetectBMP( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectGIF( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectJPG( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPCD( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPCX( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectTIF( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectXBM( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectXPM( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPBM( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPGM( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPPM( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectRAS( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectTGA( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPSD( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectEPS( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectDXF( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectMET( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectPCT( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectSGF( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectSVM( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectWMF( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectSGV( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectEMF( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectSVG( SvStream& rStm, bool bExtendedInfo ); + bool ImpDetectMOV( SvStream& rStm, bool bExtendedInfo ); GraphicDescriptor( const GraphicDescriptor& ); GraphicDescriptor& operator=( const GraphicDescriptor& ); @@ -189,7 +189,7 @@ public: if bExtendedInfo == sal_True the file header is used to derive as many properties as possible (size, color, etc.) */ - virtual sal_Bool Detect( sal_Bool bExtendedInfo = sal_False ); + virtual bool Detect( sal_Bool bExtendedInfo = sal_False ); /** @return the file format, GFF_NOT if no format was recognized */ sal_uInt16 GetFileFormat() const { return nFormat; } @@ -207,7 +207,7 @@ public: sal_uInt16 GetPlanes() const { return nPlanes; } /** @return true if the graphic is compressed */ - sal_Bool IsCompressed() const { return bCompressed; } + bool IsCompressed() const { return bCompressed; } /** @return filter number that is needed by the GraphFilter to read this format */ static OUString GetImportFormatShortName( sal_uInt16 nFormat ); @@ -238,13 +238,13 @@ protected: OUString aFilterPath; FilterConfigCache* pConfig; FilterErrorEx* pErrorEx; - sal_Bool bAbort; - sal_Bool bUseConfig; + bool bAbort; + bool bUseConfig; long nExpGraphHint; public: - GraphicFilter( sal_Bool bUseConfig = sal_True ); + GraphicFilter( bool bUseConfig = true ); ~GraphicFilter(); void SetFilterPath( const OUString& rFilterPath ) { aFilterPath = rFilterPath; }; @@ -260,7 +260,7 @@ public: OUString GetImportFormatShortName( sal_uInt16 nFormat ); OUString GetImportOSFileType( sal_uInt16 nFormat ); OUString GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); - sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); + bool IsImportPixelFormat( sal_uInt16 nFormat ); sal_uInt16 GetExportFormatCount(); sal_uInt16 GetExportFormatNumber( const OUString& rFormatName ); @@ -274,7 +274,7 @@ public: OUString GetExportFormatShortName( sal_uInt16 nFormat ); OUString GetExportOSFileType( sal_uInt16 nFormat ); OUString GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry = 0 ); - sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); + bool IsExportPixelFormat( sal_uInt16 nFormat ); sal_uInt16 ExportGraphic( const Graphic& rGraphic, const INetURLObject& rPath, sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW, @@ -309,7 +309,7 @@ public: com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >* pFilterData, WMF_EXTERNALHEADER *pExtHeader = NULL ); - void Abort() { bAbort = sal_True; } + void Abort() { bAbort = true; } const FilterErrorEx& GetLastError() const; void ResetLastError(); diff --git a/include/vcl/group.hxx b/include/vcl/group.hxx index 1da4aa461173..6deb4978d913 100644 --- a/include/vcl/group.hxx +++ b/include/vcl/group.hxx @@ -35,7 +35,7 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, const Point& rPos, const Size& rSize, bool bLayout = false ); diff --git a/include/vcl/hatch.hxx b/include/vcl/hatch.hxx index 7ba89eb46598..3b9b578b92d0 100644 --- a/include/vcl/hatch.hxx +++ b/include/vcl/hatch.hxx @@ -65,9 +65,9 @@ public: ~Hatch(); Hatch& operator=( const Hatch& rHatch ); - sal_Bool operator==( const Hatch& rHatch ) const; - sal_Bool operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); } - sal_Bool IsSameInstance( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch ); } + bool operator==( const Hatch& rHatch ) const; + bool operator!=( const Hatch& rHatch ) const { return !(Hatch::operator==( rHatch ) ); } + bool IsSameInstance( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch ); } HatchStyle GetStyle() const { return mpImplHatch->meStyle; } diff --git a/include/vcl/help.hxx b/include/vcl/help.hxx index 10ebd520fbe3..fee319685088 100644 --- a/include/vcl/help.hxx +++ b/include/vcl/help.hxx @@ -62,40 +62,40 @@ public: Help(); virtual ~Help(); - virtual sal_Bool Start( const OUString& rHelpId, const Window* pWindow ); - virtual sal_Bool SearchKeyword( const OUString& rKeyWord ); + virtual bool Start( const OUString& rHelpId, const Window* pWindow ); + virtual bool SearchKeyword( const OUString& rKeyWord ); virtual OUString GetHelpText( const OUString& aHelpURL, const Window* pWindow ); static void EnableContextHelp(); static void DisableContextHelp(); - static sal_Bool IsContextHelpEnabled(); + static bool IsContextHelpEnabled(); static void EnableExtHelp(); static void DisableExtHelp(); - static sal_Bool IsExtHelpEnabled(); - static sal_Bool StartExtHelp(); - static sal_Bool EndExtHelp(); + static bool IsExtHelpEnabled(); + static bool StartExtHelp(); + static bool EndExtHelp(); static void EnableBalloonHelp(); static void DisableBalloonHelp(); - static sal_Bool IsBalloonHelpEnabled(); - static sal_Bool ShowBalloon( Window* pParent, + static bool IsBalloonHelpEnabled(); + static bool ShowBalloon( Window* pParent, const Point& rScreenPos, const OUString& rHelpText ); - static sal_Bool ShowBalloon( Window* pParent, + static bool ShowBalloon( Window* pParent, const Point& rScreenPos, const Rectangle&, const OUString& rHelpText ); static void EnableQuickHelp(); static void DisableQuickHelp(); - static sal_Bool IsQuickHelpEnabled(); - static sal_Bool ShowQuickHelp( Window* pParent, + static bool IsQuickHelpEnabled(); + static bool ShowQuickHelp( Window* pParent, const Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, sal_uInt16 nStyle = 0 ); - static sal_Bool ShowQuickHelp( Window* pParent, + static bool ShowQuickHelp( Window* pParent, const Rectangle& rScreenRect, const OUString& rHelpText, sal_uInt16 nStyle = 0 ) diff --git a/include/vcl/i18nhelp.hxx b/include/vcl/i18nhelp.hxx index 4263fa481291..71ca315544ce 100644 --- a/include/vcl/i18nhelp.hxx +++ b/include/vcl/i18nhelp.hxx @@ -55,7 +55,7 @@ private: LocaleDataWrapper* mpLocaleDataWrapper; utl::TransliterationWrapper* mpTransliterationWrapper; - sal_Bool mbTransliterateIgnoreCase; + bool mbTransliterateIgnoreCase; SAL_DLLPRIVATE void ImplDestroyWrappers(); @@ -72,10 +72,10 @@ public: sal_Int32 CompareString( const OUString& rStr1, const OUString& rStr2 ) const; - sal_Bool MatchString( const OUString& rStr1, const OUString& rStr2 ) const; - sal_Bool MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const; + bool MatchString( const OUString& rStr1, const OUString& rStr2 ) const; + bool MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const; - OUString GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep = sal_True, sal_Bool bTrailingZeros = sal_True ) const; + OUString GetNum( long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep = true, bool bTrailingZeros = true ) const; static OUString filterFormattingChars( const OUString& ); }; diff --git a/include/vcl/image.hxx b/include/vcl/image.hxx index c0853f255b9d..fb618d1a21d7 100644 --- a/include/vcl/image.hxx +++ b/include/vcl/image.hxx @@ -68,10 +68,10 @@ public: Image GetColorTransformedImage( ImageColorTransform eColorTransform ) const; - sal_Bool operator!() const { return( !mpImplData ? true : false ); } + bool operator!() const { return( !mpImplData ? true : false ); } Image& operator=( const Image& rImage ); - sal_Bool operator==( const Image& rImage ) const; - sal_Bool operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); } + bool operator==( const Image& rImage ) const; + bool operator!=( const Image& rImage ) const { return !(Image::operator==( rImage )); } private: @@ -122,8 +122,8 @@ public: void GetImageNames( ::std::vector< OUString >& rNames ) const; ImageList& operator=( const ImageList& rImageList ); - sal_Bool operator==( const ImageList& rImageList ) const; - sal_Bool operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); } + bool operator==( const ImageList& rImageList ) const; + bool operator!=( const ImageList& rImageList ) const { return !(ImageList::operator==( rImageList )); } private: diff --git a/include/vcl/inputctx.hxx b/include/vcl/inputctx.hxx index 71b565fa8f43..76a35480f4d4 100644 --- a/include/vcl/inputctx.hxx +++ b/include/vcl/inputctx.hxx @@ -59,8 +59,8 @@ public: sal_uLong GetOptions() const { return mnOptions; } InputContext& operator=( const InputContext& rInputContext ); - sal_Bool operator==( const InputContext& rInputContext ) const; - sal_Bool operator!=( const InputContext& rInputContext ) const + bool operator==( const InputContext& rInputContext ) const; + bool operator!=( const InputContext& rInputContext ) const { return !(InputContext::operator==( rInputContext )); } }; @@ -71,7 +71,7 @@ inline InputContext& InputContext::operator=( const InputContext& rInputContext return *this; } -inline sal_Bool InputContext::operator==( const InputContext& rInputContext ) const +inline bool InputContext::operator==( const InputContext& rInputContext ) const { return ((mnOptions == rInputContext.mnOptions) && (maFont == rInputContext.maFont)); diff --git a/include/vcl/jobset.hxx b/include/vcl/jobset.hxx index 180b4ba369f2..75f48ca36d55 100644 --- a/include/vcl/jobset.hxx +++ b/include/vcl/jobset.hxx @@ -55,8 +55,8 @@ public: JobSetup& operator=( const JobSetup& rJob ); - sal_Bool operator==( const JobSetup& rJobSetup ) const; - sal_Bool operator!=( const JobSetup& rJobSetup ) const + bool operator==( const JobSetup& rJobSetup ) const; + bool operator!=( const JobSetup& rJobSetup ) const { return !(JobSetup::operator==( rJobSetup )); } friend VCL_DLLPUBLIC SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ); diff --git a/include/vcl/keycod.hxx b/include/vcl/keycod.hxx index 7b547ae811c3..4e8cf1f5111b 100644 --- a/include/vcl/keycod.hxx +++ b/include/vcl/keycod.hxx @@ -39,12 +39,12 @@ public: KeyCode( const ResId& rResId ); KeyCode( sal_uInt16 nKey, sal_uInt16 nModifier = 0 ) { nCode = nKey | nModifier; eFunc = KEYFUNC_DONTKNOW; } - KeyCode( sal_uInt16 nKey, sal_Bool bShift, sal_Bool bMod1, sal_Bool bMod2, sal_Bool bMod3 ); + KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMod2, bool bMod3 ); KeyCode( KeyFuncType eFunction ); sal_uInt16 GetFullCode() const { return nCode; } KeyFuncType GetFullFunction() const { return eFunc; } - sal_Bool IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const; + bool IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const; sal_uInt16 GetCode() const { return (nCode & KEY_CODE); } @@ -53,30 +53,30 @@ public: { return (nCode & KEY_MODTYPE); } sal_uInt16 GetAllModifier() const { return (nCode & KEY_ALLMODTYPE); } - sal_Bool IsShift() const + bool IsShift() const { return ((nCode & KEY_SHIFT) != 0); } - sal_Bool IsMod1() const + bool IsMod1() const { return ((nCode & KEY_MOD1) != 0); } - sal_Bool IsMod2() const + bool IsMod2() const { return ((nCode & KEY_MOD2) != 0); } - sal_Bool IsMod3() const + bool IsMod3() const { return ((nCode & KEY_MOD3) != 0); } sal_uInt16 GetGroup() const { return (nCode & KEYGROUP_TYPE); } OUString GetName( Window* pWindow = NULL ) const; - sal_Bool IsFunction() const + bool IsFunction() const { return ((eFunc != KEYFUNC_DONTKNOW) ? sal_True : sal_False); } KeyFuncType GetFunction() const; KeyCode& operator = ( const KeyCode& rKeyCode ); - sal_Bool operator ==( const KeyCode& rKeyCode ) const; - sal_Bool operator !=( const KeyCode& rKeyCode ) const; + bool operator ==( const KeyCode& rKeyCode ) const; + bool operator !=( const KeyCode& rKeyCode ) const; }; -inline KeyCode::KeyCode( sal_uInt16 nKey, sal_Bool bShift, sal_Bool bMod1, sal_Bool bMod2, sal_Bool bMod3 ) +inline KeyCode::KeyCode( sal_uInt16 nKey, bool bShift, bool bMod1, bool bMod2, bool bMod3 ) { nCode = nKey; if( bShift ) @@ -90,7 +90,7 @@ inline KeyCode::KeyCode( sal_uInt16 nKey, sal_Bool bShift, sal_Bool bMod1, sal_B eFunc = KEYFUNC_DONTKNOW; } -inline sal_Bool KeyCode::operator ==( const KeyCode& rKeyCode ) const +inline bool KeyCode::operator ==( const KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) return (nCode == rKeyCode.nCode); @@ -98,7 +98,7 @@ inline sal_Bool KeyCode::operator ==( const KeyCode& rKeyCode ) const return (GetFunction() == rKeyCode.GetFunction()); } -inline sal_Bool KeyCode::operator !=( const KeyCode& rKeyCode ) const +inline bool KeyCode::operator !=( const KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) return (nCode != rKeyCode.nCode); @@ -106,7 +106,7 @@ inline sal_Bool KeyCode::operator !=( const KeyCode& rKeyCode ) const return (GetFunction() != rKeyCode.GetFunction()); } -inline sal_Bool KeyCode::IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const +inline bool KeyCode::IsDefinedKeyCodeEqual( const KeyCode& rKeyCode ) const { if ( (eFunc == KEYFUNC_DONTKNOW) && (rKeyCode.eFunc == KEYFUNC_DONTKNOW) ) return (GetFullCode() == rKeyCode.GetFullCode()); diff --git a/include/vcl/lineinfo.hxx b/include/vcl/lineinfo.hxx index 9f72675786e3..d6a9028320f2 100644 --- a/include/vcl/lineinfo.hxx +++ b/include/vcl/lineinfo.hxx @@ -75,9 +75,9 @@ public: ~LineInfo(); LineInfo& operator=( const LineInfo& rLineInfo ); - sal_Bool operator==( const LineInfo& rLineInfo ) const; - sal_Bool operator!=( const LineInfo& rLineInfo ) const { return !(LineInfo::operator==( rLineInfo ) ); } - sal_Bool IsSameInstance( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo ); } + bool operator==( const LineInfo& rLineInfo ) const; + bool operator!=( const LineInfo& rLineInfo ) const { return !(LineInfo::operator==( rLineInfo ) ); } + bool IsSameInstance( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo ); } void SetStyle( LineStyle eStyle ); LineStyle GetStyle() const { return mpImplLineInfo->meStyle; } @@ -106,7 +106,7 @@ public: void SetLineCap(com::sun::star::drawing::LineCap eLineCap); com::sun::star::drawing::LineCap GetLineCap() const { return mpImplLineInfo->meLineCap; } - sal_Bool IsDefault() const; + bool IsDefault() const; friend VCL_DLLPUBLIC SvStream& ReadLineInfo( SvStream& rIStm, LineInfo& rLineInfo ); friend VCL_DLLPUBLIC SvStream& WriteLineInfo( SvStream& rOStm, const LineInfo& rLineInfo ); diff --git a/include/vcl/longcurr.hxx b/include/vcl/longcurr.hxx index cc08b9518a1d..f837d5d4d341 100644 --- a/include/vcl/longcurr.hxx +++ b/include/vcl/longcurr.hxx @@ -45,7 +45,7 @@ protected: OUString maCurrencySymbol; sal_uInt16 mnType; sal_uInt16 mnDecimalDigits; - sal_Bool mbThousandSep; + bool mbThousandSep; LongCurrencyFormatter(); public: @@ -54,8 +54,8 @@ public: virtual void Reformat(); virtual void ReformatAll(); - void SetUseThousandSep( sal_Bool b ); - sal_Bool IsUseThousandSep() const { return mbThousandSep; } + void SetUseThousandSep( bool b ); + bool IsUseThousandSep() const { return mbThousandSep; } void SetCurrencySymbol( const OUString& rStr ); OUString GetCurrencySymbol() const; @@ -70,7 +70,7 @@ public: void SetValue( BigInt nNewValue ); void SetUserValue( BigInt nNewValue ); BigInt GetValue() const; - sal_Bool IsEmptyValue() const { return GetField()->GetText().isEmpty(); } + bool IsEmptyValue() const { return GetField()->GetText().isEmpty(); } BigInt GetCorrectedValue() const { return mnCorrectedValue; } }; diff --git a/include/vcl/lstbox.hxx b/include/vcl/lstbox.hxx index c918d1e598ae..8f986fcbc63b 100644 --- a/include/vcl/lstbox.hxx +++ b/include/vcl/lstbox.hxx @@ -70,7 +70,7 @@ protected: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE WinBits ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - sal_Bool IsDropDownBox() const { return mpFloatWin ? sal_True : sal_False; } + bool IsDropDownBox() const { return mpFloatWin ? sal_True : sal_False; } protected: explicit ListBox( WindowType nType ); @@ -113,7 +113,7 @@ public: void EnableAutoSize( bool bAuto ); bool IsAutoSizeEnabled() const { return mbDDAutoSize; } - void EnableDDAutoWidth( sal_Bool b ); + void EnableDDAutoWidth( bool b ); sal_uInt16 InsertEntry( const OUString& rStr, sal_uInt16 nPos = LISTBOX_APPEND ); sal_uInt16 InsertEntry( const OUString& rStr, const Image& rImage, sal_uInt16 nPos = LISTBOX_APPEND ); @@ -128,15 +128,15 @@ public: OUString GetEntry( sal_uInt16 nPos ) const; sal_uInt16 GetEntryCount() const; - void SelectEntry( const OUString& rStr, sal_Bool bSelect = sal_True ); - void SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect = sal_True ); + void SelectEntry( const OUString& rStr, bool bSelect = true ); + void SelectEntryPos( sal_uInt16 nPos, bool bSelect = true ); sal_uInt16 GetSelectEntryCount() const; OUString GetSelectEntry( sal_uInt16 nSelIndex = 0 ) const; sal_uInt16 GetSelectEntryPos( sal_uInt16 nSelIndex = 0 ) const; bool IsEntrySelected(const OUString& rStr) const; - sal_Bool IsEntryPosSelected( sal_uInt16 nPos ) const; + bool IsEntryPosSelected( sal_uInt16 nPos ) const; void SetNoSelection(); void SetEntryData( sal_uInt16 nPos, void* pNewData ); @@ -168,24 +168,24 @@ public: void SetSeparatorPos( sal_uInt16 n = LISTBOX_ENTRY_NOTFOUND ); sal_uInt16 GetSeparatorPos() const; - sal_Bool IsTravelSelect() const; - sal_Bool IsInDropDown() const; + bool IsTravelSelect() const; + bool IsInDropDown() const; void ToggleDropDown(); - void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackSelection ); - void EnableMultiSelection( sal_Bool bMulti ); - sal_Bool IsMultiSelectionEnabled() const; + void EnableMultiSelection( bool bMulti, bool bStackSelection ); + void EnableMultiSelection( bool bMulti ); + bool IsMultiSelectionEnabled() const; - void SetReadOnly( sal_Bool bReadOnly = sal_True ); - sal_Bool IsReadOnly() const; + void SetReadOnly( bool bReadOnly = true ); + bool IsReadOnly() const; Rectangle GetBoundingRectangle( sal_uInt16 nItem ) const; void SetUserItemSize( const Size& rSz ); - void EnableUserDraw( sal_Bool bUserDraw ); + void EnableUserDraw( bool bUserDraw ); - void DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False ); + void DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false ); void SetSelectHdl( const Link& rLink ) { maSelectHdl = rLink; } const Link& GetSelectHdl() const { return maSelectHdl; } diff --git a/include/vcl/mapmod.hxx b/include/vcl/mapmod.hxx index bfdc284fb35e..c95a11f22f82 100644 --- a/include/vcl/mapmod.hxx +++ b/include/vcl/mapmod.hxx @@ -46,7 +46,7 @@ private: Point maOrigin; Fraction maScaleX; Fraction maScaleY; - sal_Bool mbSimple; + bool mbSimple; friend SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rMapMode ); friend SvStream& WriteImplMapMode( SvStream& rOStm, const ImplMapMode& rMapMode ); @@ -94,11 +94,11 @@ public: { return mpImplMapMode->maScaleY; } MapMode& operator=( const MapMode& rMapMode ); - sal_Bool operator==( const MapMode& rMapMode ) const; - sal_Bool operator!=( const MapMode& rMapMode ) const + bool operator==( const MapMode& rMapMode ) const; + bool operator!=( const MapMode& rMapMode ) const { return !(MapMode::operator==( rMapMode )); } - sal_Bool IsDefault() const; - sal_Bool IsSameInstance( const MapMode& rMapMode ) const + bool IsDefault() const; + bool IsSameInstance( const MapMode& rMapMode ) const { return (mpImplMapMode == rMapMode.mpImplMapMode); } friend VCL_DLLPUBLIC SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode ); diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 513187233039..7e0774668965 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -140,7 +140,7 @@ private: sal_uInt16 nImgOrChkPos; sal_uInt16 nTextPos; - sal_Bool bIsMenuBar : 1, // Is this a menubar? + bool bIsMenuBar : 1, // Is this a menubar? bCanceled : 1, // Terminated during a callback bInCallback : 1, // In Activate/Deactivate bKilled : 1; // Killed... @@ -156,13 +156,13 @@ protected: SAL_DLLPRIVATE Menu* ImplFindSelectMenu(); SAL_DLLPRIVATE Menu* ImplFindMenu( sal_uInt16 nId ); SAL_DLLPRIVATE Size ImplCalcSize( const Window* pWin ); - SAL_DLLPRIVATE sal_Bool ImplIsVisible( sal_uInt16 nPos ) const; - SAL_DLLPRIVATE sal_Bool ImplIsSelectable( sal_uInt16 nPos ) const; + SAL_DLLPRIVATE bool ImplIsVisible( sal_uInt16 nPos ) const; + SAL_DLLPRIVATE bool ImplIsSelectable( sal_uInt16 nPos ) const; SAL_DLLPRIVATE sal_uInt16 ImplGetVisibleItemCount() const; SAL_DLLPRIVATE sal_uInt16 ImplGetFirstVisible() const; SAL_DLLPRIVATE sal_uInt16 ImplGetPrevVisible( sal_uInt16 nPos ) const; SAL_DLLPRIVATE sal_uInt16 ImplGetNextVisible( sal_uInt16 nPos ) const; - SAL_DLLPRIVATE void ImplPaint( Window* pWin, sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, sal_Bool bHighlighted = sal_False, bool bLayout = false, bool bRollover = false ) const; + SAL_DLLPRIVATE void ImplPaint( Window* pWin, sal_uInt16 nBorder, long nOffY = 0, MenuItemData* pThisDataOnly = 0, bool bHighlighted = false, bool bLayout = false, bool bRollover = false ) const; SAL_DLLPRIVATE void ImplSelect(); SAL_DLLPRIVATE void ImplCallHighlight( sal_uInt16 nHighlightItem ); SAL_DLLPRIVATE void ImplCallEventListeners( sal_uLong nEvent, sal_uInt16 nPos ); @@ -179,7 +179,7 @@ protected: // returns native submenu arrow size and spacing from right border // return value is whether it's supported natively - SAL_DLLPRIVATE sal_Bool ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const; + SAL_DLLPRIVATE bool ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const; SAL_DLLPRIVATE void ImplAddDel( ImplMenuDelData &rDel ); SAL_DLLPRIVATE void ImplRemoveDel( ImplMenuDelData &rDel ); @@ -188,7 +188,7 @@ public: SAL_DLLPRIVATE Menu* ImplGetStartedFrom() const { return pStartedFrom; } Menu(); - explicit Menu( sal_Bool bMenuBar ); + explicit Menu( bool bMenuBar ); SAL_DLLPRIVATE Window* ImplGetWindow() const { return pWindow; } void ImplSelectWithStart( Menu* pStartMenu = NULL ); @@ -241,7 +241,7 @@ public: OUString GetItemAccKeyStrFromPos(sal_uInt16 nPos) const; - sal_Bool IsTemporaryItemFromPos(sal_uInt16 nPos) const; + bool IsTemporaryItemFromPos(sal_uInt16 nPos) const; void SetDefaultItem( sal_uInt16 nItemId ) { nDefaultItem = nItemId; } sal_uInt16 GetDefaultItem() const { return nDefaultItem; } @@ -258,28 +258,28 @@ public: void SetAccelKey( sal_uInt16 nItemId, const KeyCode& rKeyCode ); KeyCode GetAccelKey( sal_uInt16 nItemId ) const; - void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck = sal_True ); - sal_Bool IsItemChecked( sal_uInt16 nItemId ) const; + void CheckItem( sal_uInt16 nItemId, bool bCheck = true ); + bool IsItemChecked( sal_uInt16 nItemId ) const; void SelectItem( sal_uInt16 nItemId ); void DeSelect() { SelectItem( 0xFFFF ); } // MENUITEMPOS_INVALID - void EnableItem( sal_uInt16 nItemId, sal_Bool bEnable = sal_True ); + void EnableItem( sal_uInt16 nItemId, bool bEnable = true ); void EnableItem(const OString &rIdent, bool bEnable = true) { EnableItem(GetItemId(rIdent), bEnable); } - sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const; + bool IsItemEnabled( sal_uInt16 nItemId ) const; - void ShowItem( sal_uInt16 nItemId, sal_Bool bVisible = sal_True ); - void HideItem( sal_uInt16 nItemId ) { ShowItem( nItemId, sal_False ); } + void ShowItem( sal_uInt16 nItemId, bool bVisible = true ); + void HideItem( sal_uInt16 nItemId ) { ShowItem( nItemId, false ); } - sal_Bool IsItemPosVisible( sal_uInt16 nItemPos ) const; - sal_Bool IsMenuVisible() const; - sal_Bool IsMenuBar() const { return bIsMenuBar; } + bool IsItemPosVisible( sal_uInt16 nItemPos ) const; + bool IsMenuVisible() const; + bool IsMenuBar() const { return bIsMenuBar; } - void RemoveDisabledEntries( sal_Bool bCheckPopups = sal_True, sal_Bool bRemoveEmptyPopups = sal_False ); - sal_Bool HasValidEntries( sal_Bool bCheckPopups = sal_True ); + void RemoveDisabledEntries( bool bCheckPopups = true, bool bRemoveEmptyPopups = false ); + bool HasValidEntries( bool bCheckPopups = true ); void SetItemText( sal_uInt16 nItemId, const OUString& rStr ); OUString GetItemText( sal_uInt16 nItemId ) const; @@ -287,7 +287,7 @@ public: void SetItemImage( sal_uInt16 nItemId, const Image& rImage ); Image GetItemImage( sal_uInt16 nItemId ) const; void SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ); - void SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ); + void SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ); void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ); OUString GetItemCommand( sal_uInt16 nItemId ) const; @@ -316,7 +316,7 @@ public: void SetSelectHdl( const Link& rLink ) { aSelectHdl = rLink; } const Link& GetSelectHdl() const { return aSelectHdl; } - sal_Bool HasLogo() const { return pLogo ? sal_True : sal_False; } + bool HasLogo() const { return pLogo ? sal_True : sal_False; } void AddEventListener( const Link& rEventListener ); void RemoveEventListener( const Link& rEventListener ); @@ -330,7 +330,7 @@ public: // returns the system's menu handle if native menus are supported // pData must point to a SystemMenuData structure - sal_Bool GetSystemMenuData( SystemMenuData* pData ) const; + bool GetSystemMenuData( SystemMenuData* pData ) const; // accessibility helpers @@ -371,10 +371,10 @@ class VCL_DLLPUBLIC MenuBar : public Menu Link maCloserHdl; Link maFloatHdl; Link maHideHdl; - sal_Bool mbCloserVisible; - sal_Bool mbFloatBtnVisible; - sal_Bool mbHideBtnVisible; - sal_Bool mbDisplayable; + bool mbCloserVisible; + bool mbFloatBtnVisible; + bool mbHideBtnVisible; + bool mbDisplayable; friend class Application; friend class Menu; @@ -383,8 +383,8 @@ class VCL_DLLPUBLIC MenuBar : public Menu friend class SystemWindow; SAL_DLLPRIVATE static Window* ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu ); - SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, sal_Bool bDelete ); - SAL_DLLPRIVATE sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu = sal_True ); + SAL_DLLPRIVATE static void ImplDestroy( MenuBar* pMenu, bool bDelete ); + SAL_DLLPRIVATE bool ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu = true ); public: MenuBar(); @@ -393,18 +393,18 @@ public: MenuBar& operator =( const MenuBar& rMenu ); - void ShowCloser( sal_Bool bShow = sal_True ); - sal_Bool HasCloser() const { return mbCloserVisible; } - sal_Bool HasFloatButton() const { return mbFloatBtnVisible; } - sal_Bool HasHideButton() const { return mbHideBtnVisible; } - void ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ); + void ShowCloser( bool bShow = true ); + bool HasCloser() const { return mbCloserVisible; } + bool HasFloatButton() const { return mbFloatBtnVisible; } + bool HasHideButton() const { return mbHideBtnVisible; } + void ShowButtons( bool bClose, bool bFloat, bool bHide ); void SelectEntry( sal_uInt16 nId ); - sal_Bool HandleMenuActivateEvent( Menu *pMenu ) const; - sal_Bool HandleMenuDeActivateEvent( Menu *pMenu ) const; - sal_Bool HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nEventId ) const; - sal_Bool HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nEventId ) const; - sal_Bool HandleMenuButtonEvent( Menu *pMenu, sal_uInt16 nEventId ) const; + bool HandleMenuActivateEvent( Menu *pMenu ) const; + bool HandleMenuDeActivateEvent( Menu *pMenu ) const; + bool HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nEventId ) const; + bool HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nEventId ) const; + bool HandleMenuButtonEvent( Menu *pMenu, sal_uInt16 nEventId ) const; void SetCloserHdl( const Link& rLink ) { maCloserHdl = rLink; } const Link& GetCloserHdl() const { return maCloserHdl; } @@ -417,8 +417,8 @@ public: // - if a menubar is not displayable, its MenuBarWindow will never be shown // and it will be hidden if it was visible before // - note: if a menubar is diplayable, this does not necessarily mean that it is currently visible - void SetDisplayable( sal_Bool bDisplayable ); - sal_Bool IsDisplayable() const { return mbDisplayable; } + void SetDisplayable( bool bDisplayable ); + bool IsDisplayable() const { return mbDisplayable; } struct MenuBarButtonCallbackArg { @@ -465,7 +465,7 @@ private: SAL_DLLPRIVATE MenuFloatingWindow* ImplGetFloatingWindow() const { return (MenuFloatingWindow*)Menu::ImplGetWindow(); } protected: - SAL_DLLPRIVATE sal_uInt16 ImplExecute( Window* pWindow, const Rectangle& rRect, sal_uLong nPopupFlags, Menu* pStaredFrom, sal_Bool bPreSelectFirst ); + SAL_DLLPRIVATE sal_uInt16 ImplExecute( Window* pWindow, const Rectangle& rRect, sal_uLong nPopupFlags, Menu* pStaredFrom, bool bPreSelectFirst ); SAL_DLLPRIVATE long ImplCalcHeight( sal_uInt16 nEntries ) const; SAL_DLLPRIVATE sal_uInt16 ImplCalcVisEntries( long nMaxHeight, sal_uInt16 nStartEntry = 0, sal_uInt16* pLastVisible = NULL ) const; @@ -486,7 +486,7 @@ public: void SelectEntry( sal_uInt16 nId ); void SetSelectedEntry( sal_uInt16 nId ); // for use by native submenu only - static sal_Bool IsInExecute(); + static bool IsInExecute(); static PopupMenu* GetActivePopupMenu(); PopupMenu& operator =( const PopupMenu& rMenu ); diff --git a/include/vcl/metaact.hxx b/include/vcl/metaact.hxx index b331100e100a..1720b4148d27 100644 --- a/include/vcl/metaact.hxx +++ b/include/vcl/metaact.hxx @@ -134,7 +134,7 @@ private: sal_uLong mnRefCount; sal_uInt16 mnType; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; protected: virtual ~MetaAction(); @@ -169,7 +169,7 @@ private: Point maPt; Color maColor; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Pixel, META_PIXEL_ACTION ) @@ -188,7 +188,7 @@ class VCL_DLLPUBLIC MetaPointAction : public MetaAction private: Point maPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Point, META_POINT_ACTION ) @@ -209,7 +209,7 @@ private: Point maStartPt; Point maEndPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Line, META_LINE_ACTION ) @@ -232,7 +232,7 @@ private: Rectangle maRect; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Rect, META_RECT_ACTION ) @@ -252,7 +252,7 @@ private: sal_uInt32 mnHorzRound; sal_uInt32 mnVertRound; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( RoundRect, META_ROUNDRECT_ACTION ) @@ -274,7 +274,7 @@ private: Rectangle maRect; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Ellipse, META_ELLIPSE_ACTION ) @@ -295,7 +295,7 @@ private: Point maStartPt; Point maEndPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Arc, META_ARC_ACTION ) @@ -319,7 +319,7 @@ private: Point maStartPt; Point maEndPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Pie, META_PIE_ACTION ) @@ -343,7 +343,7 @@ private: Point maStartPt; Point maEndPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Chord, META_CHORD_ACTION ) @@ -366,7 +366,7 @@ private: LineInfo maLineInfo; Polygon maPoly; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( PolyLine, META_POLYLINE_ACTION ) @@ -387,7 +387,7 @@ private: Polygon maPoly; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Polygon, META_POLYGON_ACTION ) @@ -406,7 +406,7 @@ private: PolyPolygon maPolyPoly; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( PolyPolygon, META_POLYPOLYGON_ACTION ) @@ -428,7 +428,7 @@ private: sal_Int32 mnIndex; sal_Int32 mnLen; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Text, META_TEXT_ACTION ) @@ -455,7 +455,7 @@ private: sal_Int32 mnIndex; sal_Int32 mnLen; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; protected: virtual ~MetaTextArrayAction(); @@ -494,7 +494,7 @@ private: sal_Int32 mnIndex; sal_Int32 mnLen; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( StretchText, META_STRETCHTEXT_ACTION ) @@ -521,7 +521,7 @@ private: OUString maStr; sal_uInt16 mnStyle; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextRect, META_TEXTRECT_ACTION ) @@ -547,7 +547,7 @@ private: FontUnderline meUnderline; FontUnderline meOverline; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextLine, META_TEXTLINE_ACTION ) @@ -573,7 +573,7 @@ private: Bitmap maBmp; Point maPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Bmp, META_BMP_ACTION ) @@ -595,7 +595,7 @@ private: Point maPt; Size maSz; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( BmpScale, META_BMPSCALE_ACTION ) @@ -621,7 +621,7 @@ private: Point maSrcPt; Size maSrcSz; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( BmpScalePart, META_BMPSCALEPART_ACTION ) @@ -647,7 +647,7 @@ private: BitmapEx maBmpEx; Point maPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( BmpEx, META_BMPEX_ACTION ) @@ -669,7 +669,7 @@ private: Point maPt; Size maSz; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( BmpExScale, META_BMPEXSCALE_ACTION ) @@ -695,7 +695,7 @@ private: Point maSrcPt; Size maSrcSz; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( BmpExScalePart, META_BMPEXSCALEPART_ACTION ) @@ -722,7 +722,7 @@ private: Color maColor; Point maPt; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Mask, META_MASK_ACTION ) @@ -748,7 +748,7 @@ private: Point maPt; Size maSz; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( MaskScale, META_MASKSCALE_ACTION ) @@ -777,7 +777,7 @@ private: Point maSrcPt; Size maSrcSz; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( MaskScalePart, META_MASKSCALEPART_ACTION ) @@ -805,7 +805,7 @@ private: Rectangle maRect; Gradient maGradient; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Gradient, META_GRADIENT_ACTION ) @@ -826,7 +826,7 @@ private: PolyPolygon maPolyPoly; Gradient maGradient; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( GradientEx, META_GRADIENTEX_ACTION ) @@ -847,7 +847,7 @@ private: PolyPolygon maPolyPoly; Hatch maHatch; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Hatch, META_HATCH_ACTION ) @@ -868,7 +868,7 @@ private: Rectangle maRect; Wallpaper maWallpaper; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Wallpaper, META_WALLPAPER_ACTION ) @@ -888,20 +888,20 @@ class VCL_DLLPUBLIC MetaClipRegionAction : public MetaAction private: Region maRegion; - sal_Bool mbClip; + bool mbClip; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION ) - MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ); + MetaClipRegionAction( const Region& rRegion, bool bClip ); virtual void Move( long nHorzMove, long nVertMove ); virtual void Scale( double fScaleX, double fScaleY ); const Region& GetRegion() const { return maRegion; } - sal_Bool IsClipping() const { return mbClip; } + bool IsClipping() const { return mbClip; } }; class VCL_DLLPUBLIC MetaISectRectClipRegionAction : public MetaAction @@ -910,7 +910,7 @@ private: Rectangle maRect; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( ISectRectClipRegion, META_ISECTRECTCLIPREGION_ACTION ) @@ -929,7 +929,7 @@ private: Region maRegion; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( ISectRegionClipRegion, META_ISECTREGIONCLIPREGION_ACTION ) @@ -949,7 +949,7 @@ private: long mnHorzMove; long mnVertMove; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( MoveClipRegion, META_MOVECLIPREGION_ACTION ) @@ -967,17 +967,17 @@ class VCL_DLLPUBLIC MetaLineColorAction : public MetaAction private: Color maColor; - sal_Bool mbSet; + bool mbSet; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( LineColor, META_LINECOLOR_ACTION ) - MetaLineColorAction( const Color& rColor, sal_Bool bSet ); + MetaLineColorAction( const Color& rColor, bool bSet ); const Color& GetColor() const { return maColor; } - sal_Bool IsSetting() const { return mbSet; } + bool IsSetting() const { return mbSet; } }; class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction @@ -985,17 +985,17 @@ class VCL_DLLPUBLIC MetaFillColorAction : public MetaAction private: Color maColor; - sal_Bool mbSet; + bool mbSet; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( FillColor, META_FILLCOLOR_ACTION ) - MetaFillColorAction( const Color& rColor, sal_Bool bSet ); + MetaFillColorAction( const Color& rColor, bool bSet ); const Color& GetColor() const { return maColor; } - sal_Bool IsSetting() const { return mbSet; } + bool IsSetting() const { return mbSet; } }; class VCL_DLLPUBLIC MetaTextColorAction : public MetaAction @@ -1004,7 +1004,7 @@ private: Color maColor; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextColor, META_TEXTCOLOR_ACTION ) @@ -1019,17 +1019,17 @@ class VCL_DLLPUBLIC MetaTextFillColorAction : public MetaAction private: Color maColor; - sal_Bool mbSet; + bool mbSet; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION ) - MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ); + MetaTextFillColorAction( const Color& rColor, bool bSet ); const Color& GetColor() const { return maColor; } - sal_Bool IsSetting() const { return mbSet; } + bool IsSetting() const { return mbSet; } }; class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction @@ -1037,17 +1037,17 @@ class VCL_DLLPUBLIC MetaTextLineColorAction : public MetaAction private: Color maColor; - sal_Bool mbSet; + bool mbSet; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION ) - MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ); + MetaTextLineColorAction( const Color& rColor, bool bSet ); const Color& GetColor() const { return maColor; } - sal_Bool IsSetting() const { return mbSet; } + bool IsSetting() const { return mbSet; } }; class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction @@ -1055,17 +1055,17 @@ class VCL_DLLPUBLIC MetaOverlineColorAction : public MetaAction private: Color maColor; - sal_Bool mbSet; + bool mbSet; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION ) - MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ); + MetaOverlineColorAction( const Color& rColor, bool bSet ); const Color& GetColor() const { return maColor; } - sal_Bool IsSetting() const { return mbSet; } + bool IsSetting() const { return mbSet; } }; class VCL_DLLPUBLIC MetaTextAlignAction : public MetaAction @@ -1074,7 +1074,7 @@ private: TextAlign maAlign; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextAlign, META_TEXTALIGN_ACTION ) @@ -1090,7 +1090,7 @@ private: MapMode maMapMode; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( MapMode, META_MAPMODE_ACTION ) @@ -1108,7 +1108,7 @@ private: Font maFont; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Font, META_FONT_ACTION ) @@ -1126,7 +1126,7 @@ private: sal_uInt16 mnFlags; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Push, META_PUSH_ACTION ) @@ -1149,7 +1149,7 @@ private: RasterOp meRasterOp; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( RasterOp, META_RASTEROP_ACTION ) @@ -1166,7 +1166,7 @@ private: PolyPolygon maPolyPoly; sal_uInt16 mnTransPercent; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( Transparent, META_TRANSPARENT_ACTION ) @@ -1189,7 +1189,7 @@ private: Size maSize; Gradient maGradient; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( FloatTransparent, META_FLOATTRANSPARENT_ACTION ) @@ -1215,7 +1215,7 @@ private: Point maPoint; Size maSize; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( EPS, META_EPS_ACTION ) @@ -1237,17 +1237,17 @@ class VCL_DLLPUBLIC MetaRefPointAction : public MetaAction private: Point maRefPoint; - sal_Bool mbSet; + bool mbSet; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( RefPoint, META_REFPOINT_ACTION ) - MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ); + MetaRefPointAction( const Point& rRefPoint, bool bSet ); const Point& GetRefPoint() const { return maRefPoint; } - sal_Bool IsSetting() const { return mbSet; } + bool IsSetting() const { return mbSet; } }; class VCL_DLLPUBLIC MetaCommentAction : public MetaAction @@ -1260,7 +1260,7 @@ private: sal_uInt8* mpData; SAL_DLLPRIVATE void ImplInitDynamicData( const sal_uInt8* pData, sal_uInt32 nDataSize ); - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; protected: virtual ~MetaCommentAction(); @@ -1289,7 +1289,7 @@ class VCL_DLLPUBLIC MetaLayoutModeAction : public MetaAction private: sal_uInt32 mnLayoutMode; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( LayoutMode, META_LAYOUTMODE_ACTION ) @@ -1304,7 +1304,7 @@ class VCL_DLLPUBLIC MetaTextLanguageAction : public MetaAction private: LanguageType meTextLanguage; - virtual sal_Bool Compare( const MetaAction& ) const; + virtual bool Compare( const MetaAction& ) const; public: DECL_META_ACTION( TextLanguage, META_TEXTLANGUAGE_ACTION ) diff --git a/include/vcl/metric.hxx b/include/vcl/metric.hxx index b557c2518929..244171f9786e 100644 --- a/include/vcl/metric.hxx +++ b/include/vcl/metric.hxx @@ -47,8 +47,8 @@ public: FontType GetType() const; FontInfo& operator=( const FontInfo& ); - sal_Bool operator==( const FontInfo& ) const; - sal_Bool operator!=( const FontInfo& rInfo ) const + bool operator==( const FontInfo& ) const; + bool operator!=( const FontInfo& rInfo ) const { return !operator==( rInfo ); } }; @@ -71,8 +71,8 @@ public: long GetSlant() const; FontMetric& operator=( const FontMetric& rMetric ); - sal_Bool operator==( const FontMetric& rMetric ) const; - sal_Bool operator!=( const FontMetric& rMetric ) const + bool operator==( const FontMetric& rMetric ) const; + bool operator!=( const FontMetric& rMetric ) const { return !operator==( rMetric ); } }; @@ -123,20 +123,20 @@ class VCL_DLLPUBLIC TextRectInfo private: long mnMaxWidth; sal_uInt16 mnLineCount; - sal_Bool mbEllipsis; + bool mbEllipsis; public: TextRectInfo(); sal_uInt16 GetLineCount() const { return mnLineCount; } long GetMaxLineWidth() const { return mnMaxWidth; } - sal_Bool IsEllipses() const { return mbEllipsis; } + bool IsEllipses() const { return mbEllipsis; } - sal_Bool operator ==( const TextRectInfo& rInfo ) const + bool operator ==( const TextRectInfo& rInfo ) const { return ((mnMaxWidth == rInfo.mnMaxWidth) && (mnLineCount == rInfo.mnLineCount) && (mbEllipsis == rInfo.mbEllipsis)); } - sal_Bool operator !=( const TextRectInfo& rInfo ) const + bool operator !=( const TextRectInfo& rInfo ) const { return !(TextRectInfo::operator==( rInfo )); } }; @@ -144,7 +144,7 @@ inline TextRectInfo::TextRectInfo() { mnMaxWidth = 0; mnLineCount = 0; - mbEllipsis = sal_False; + mbEllipsis = false; } #endif // INCLUDED_VCL_METRIC_HXX diff --git a/include/vcl/morebtn.hxx b/include/vcl/morebtn.hxx index 2408caa92122..99b54a6090b2 100644 --- a/include/vcl/morebtn.hxx +++ b/include/vcl/morebtn.hxx @@ -37,7 +37,7 @@ private: ImplMoreButtonData* mpMBData; sal_uLong mnDelta; MapUnit meUnit; - sal_Bool mbState; + bool mbState; // Copy assignment is forbidden and not implemented. SAL_DLLPRIVATE MoreButton( const MoreButton & ); @@ -65,8 +65,8 @@ public: MapUnit GetMapUnit() const { return meUnit; } using PushButton::SetState; - void SetState( sal_Bool bNewState = sal_True ); - sal_Bool GetState() const { return mbState; } + void SetState( bool bNewState = true ); + bool GetState() const { return mbState; } void SetText( const OUString& rNewText ); OUString GetText() const; @@ -75,7 +75,7 @@ public: void SetLessText( const OUString& rNewText ); }; -inline void MoreButton::SetState( sal_Bool bNewState ) +inline void MoreButton::SetState( bool bNewState ) { if ( mbState != bNewState ) Click(); diff --git a/include/vcl/msgbox.hxx b/include/vcl/msgbox.hxx index 081141b56cbc..93a296494452 100644 --- a/include/vcl/msgbox.hxx +++ b/include/vcl/msgbox.hxx @@ -36,10 +36,10 @@ protected: FixedImage* mpFixedImage; OUString maMessText; Image maImage; - sal_Bool mbHelpBtn; + bool mbHelpBtn; CheckBox* mpCheckBox; OUString maCheckBoxText; - sal_Bool mbCheck; + bool mbCheck; SAL_DLLPRIVATE void ImplInitMessBoxData(); SAL_DLLPRIVATE void ImplInitButtons(); @@ -64,8 +64,8 @@ public: void SetCheckBoxText( const OUString& rText ) { maCheckBoxText = rText;} const OUString& GetCheckBoxText() const { return maCheckBoxText;} - void SetCheckBoxState( sal_Bool bCheck ); - sal_Bool GetCheckBoxState() const; + void SetCheckBoxState( bool bCheck ); + bool GetCheckBoxState() const; virtual Size GetOptimalSize() const; }; diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 52eb6b52edd2..1e5659a0a35a 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -374,7 +374,7 @@ public: @param bRelease Determines whether to release the fonts of the physically released graphics device. */ - SAL_DLLPRIVATE void ImplReleaseGraphics( sal_Bool bRelease = sal_True ); + SAL_DLLPRIVATE void ImplReleaseGraphics( bool bRelease = true ); /** Initialize the graphics device's data structures. */ @@ -600,9 +600,9 @@ public: const OUString& rOrigStr, sal_uInt16 nStyle, MetricVector* pVector, OUString* pDisplayText, ::vcl::ITextLayout& _rLayout ); SAL_DLLPRIVATE void ImplDrawTextBackground( const SalLayout& ); - SAL_DLLPRIVATE void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove ); + SAL_DLLPRIVATE void ImplDrawTextLines( SalLayout&, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bWordLine, bool bUnderlineAbove ); SAL_DLLPRIVATE bool ImplDrawRotateText( SalLayout& ); - SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, sal_Bool bTextLines ); + SAL_DLLPRIVATE void ImplDrawTextDirect( SalLayout&, bool bTextLines ); SAL_DLLPRIVATE void ImplDrawSpecialText( SalLayout& ); SAL_DLLPRIVATE void ImplDrawText( SalLayout& ); SAL_DLLPRIVATE Rectangle ImplGetTextBoundRect( const SalLayout& ); @@ -616,17 +616,17 @@ public: SAL_DLLPRIVATE void ImplInitTextLineSize(); SAL_DLLPRIVATE void ImplInitAboveTextLineSize(); SAL_DLLPRIVATE void ImplDrawWaveLine( long nBaseX, long nBaseY, long nStartX, long nStartY, long nWidth, long nHeight, long nLineWidth, short nOrientation, const Color& rColor ); - SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, sal_Bool bIsAbove ); - SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, sal_Bool bIsAbove ); + SAL_DLLPRIVATE void ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ); + SAL_DLLPRIVATE void ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontUnderline eTextLine, Color aColor, bool bIsAbove ); SAL_DLLPRIVATE void ImplDrawStrikeoutLine( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); SAL_DLLPRIVATE void ImplDrawStrikeoutChar( long nBaseX, long nBaseY, long nX, long nY, long nWidth, FontStrikeout eStrikeout, Color aColor ); - SAL_DLLPRIVATE void ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bUnderlineAbove ); + SAL_DLLPRIVATE void ImplDrawTextLine( long nBaseX, long nX, long nY, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bUnderlineAbove ); SAL_DLLPRIVATE void ImplDrawMnemonicLine( long nX, long nY, long nWidth ); - SAL_DLLPRIVATE static sal_Bool ImplIsUnderlineAbove( const Font& ); + SAL_DLLPRIVATE static bool ImplIsUnderlineAbove( const Font& ); SAL_DLLPRIVATE static FontEmphasisMark ImplGetEmphasisMarkStyle( const Font& rFont ); - SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient ); - SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); + SAL_DLLPRIVATE void ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, long nHeight, short nOrient ); + SAL_DLLPRIVATE void ImplDrawEmphasisMark( long nBaseX, long nX, long nY, const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); static SAL_DLLPRIVATE long ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, long nWidth, const OUString& rStr, sal_uInt16 nStyle, const ::vcl::ITextLayout& _rLayout ); SAL_DLLPRIVATE void ImplInitFontList() const; @@ -675,16 +675,16 @@ public: /** @name Gradient functions */ ///@{ - SAL_DLLPRIVATE void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ); - SAL_DLLPRIVATE void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ); + SAL_DLLPRIVATE void ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const PolyPolygon* pClipPolyPoly ); + SAL_DLLPRIVATE void ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, bool bMtf, const PolyPolygon* pClipPolyPoly ); ///@} /** @name Hatch functions */ ///@{ - SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf ); + SAL_DLLPRIVATE void ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf ); SAL_DLLPRIVATE void ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_uInt16 nAngle10, Point& rPt1, Point& rPt2, Size& rInc, Point& rEndPt1 ); - SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, sal_Bool bMtf ); + SAL_DLLPRIVATE void ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, Point* pPtBuffer, bool bMtf ); ///@} /** @name Wallpaper functions @@ -757,7 +757,7 @@ public: /** @name Layout functions */ ///@{ - SAL_DLLPRIVATE sal_Bool ImplIsRecordLayout() const; + SAL_DLLPRIVATE bool ImplIsRecordLayout() const; virtual bool HasMirroredGraphics() const; SAL_DLLPRIVATE void ReMirror( Point &rPoint ) const; SAL_DLLPRIVATE void ReMirror( Rectangle &rRect ) const; @@ -812,7 +812,7 @@ public: FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove = sal_False ); + bool bUnderlineAbove = false ); void DrawText( const Point& rStartPt, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, @@ -830,7 +830,7 @@ public: bool GetCaretPositions( const OUString&, sal_Int32* pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, sal_Int32* pDXAry = NULL, long nWidth = 0, - sal_Bool bCellBreaking = sal_True ) const; + bool bCellBreaking = true ) const; void DrawStretchText( const Point& rStartPt, sal_uLong nWidth, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1 ); @@ -873,26 +873,26 @@ public: static OUString GetNonMnemonicString( const OUString& rStr ) { sal_Int32 nDummy; return GetNonMnemonicString( rStr, nDummy ); } - sal_Bool GetTextBoundRect( Rectangle& rRect, + bool GetTextBoundRect( Rectangle& rRect, const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, sal_Int32 nLen = -1, sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const; - sal_Bool GetTextOutline( PolyPolygon&, + bool GetTextOutline( PolyPolygon&, const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, - sal_Int32 nLen = -1, sal_Bool bOptimize = sal_True, + sal_Int32 nLen = -1, bool bOptimize = true, sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const; - sal_Bool GetTextOutlines( PolyPolyVector&, + bool GetTextOutlines( PolyPolyVector&, const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, - sal_Int32 nLen = -1, sal_Bool bOptimize = sal_True, + sal_Int32 nLen = -1, bool bOptimize = true, sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const; - sal_Bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector &rVector, + bool GetTextOutlines( ::basegfx::B2DPolyPolygonVector &rVector, const OUString& rStr, sal_Int32 nBase = 0, sal_Int32 nIndex = 0, - sal_Int32 nLen = -1, sal_Bool bOptimize = sal_True, + sal_Int32 nLen = -1, bool bOptimize = true, sal_uLong nLayoutWidth = 0, const sal_Int32* pDXArray = NULL ) const; - sal_Bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, + bool GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ); void DrawPixel( const Point& rPt ); @@ -1078,26 +1078,26 @@ public: */ BitmapEx GetBitmapEx( const Point& rSrcPt, const Size& rSize ) const; - void EnableMapMode( sal_Bool bEnable = sal_True ); - sal_Bool IsMapModeEnabled() const { return mbMap; } + void EnableMapMode( bool bEnable = true ); + bool IsMapModeEnabled() const { return mbMap; } // Enabling/disabling RTL only makes sense for OutputDevices that use a mirroring SalGraphisLayout - void EnableRTL( sal_Bool bEnable = sal_True); - sal_Bool IsRTLEnabled() const { return mbEnableRTL; } + void EnableRTL( bool bEnable = true); + bool IsRTLEnabled() const { return mbEnableRTL; } void SetConnectMetaFile( GDIMetaFile* pMtf ); GDIMetaFile* GetConnectMetaFile() const { return mpMetaFile; } - void EnableOutput( sal_Bool bEnable = sal_True ); - sal_Bool IsOutputEnabled() const { return mbOutput; } - sal_Bool IsDeviceOutput() const { return mbDevOutput; } - sal_Bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); } - sal_Bool IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); } + void EnableOutput( bool bEnable = true ); + bool IsOutputEnabled() const { return mbOutput; } + bool IsDeviceOutput() const { return mbDevOutput; } + bool IsDeviceOutputNecessary() const { return (mbOutput && mbDevOutput); } + bool IsOutputNecessary() const { return ((mbOutput && mbDevOutput) || (mpMetaFile != NULL)); } void SetClipRegion(); void SetClipRegion( const Region& rRegion ); Region GetClipRegion() const; - sal_Bool IsClipRegion() const { return mbClipRegion; } + bool IsClipRegion() const { return mbClipRegion; } Region GetActiveClipRegion() const; void MoveClipRegion( long nHorzMove, long nVertMove ); @@ -1132,18 +1132,18 @@ public: void SetLineColor(); void SetLineColor( const Color& rColor ); const Color& GetLineColor() const { return maLineColor; } - sal_Bool IsLineColor() const { return mbLineColor; } + bool IsLineColor() const { return mbLineColor; } void SetFillColor(); void SetFillColor( const Color& rColor ); const Color& GetFillColor() const { return maFillColor; } - sal_Bool IsFillColor() const { return mbFillColor; } + bool IsFillColor() const { return mbFillColor; } void SetBackground(); void SetBackground( const Wallpaper& rBackground ); const Wallpaper& GetBackground() const { return maBackground; } - sal_Bool IsBackground() const { return mbBackground; } + bool IsBackground() const { return mbBackground; } void SetFont( const Font& rNewFont ); const Font& GetFont() const { return maFont; } @@ -1159,15 +1159,15 @@ public: void SetTextFillColor( const Color& rColor ); Color GetTextFillColor() const; - sal_Bool IsTextFillColor() const { return !maFont.IsTransparent(); } + bool IsTextFillColor() const { return !maFont.IsTransparent(); } void SetTextLineColor(); void SetTextLineColor( const Color& rColor ); const Color& GetTextLineColor() const { return maTextLineColor; } - sal_Bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); } + bool IsTextLineColor() const { return (maTextLineColor.GetTransparency() == 0); } void SetOverlineColor(); void SetOverlineColor( const Color& rColor ); const Color& GetOverlineColor() const { return maOverlineColor; } - sal_Bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); } + bool IsOverlineColor() const { return (maOverlineColor.GetTransparency() == 0); } void SetTextAlign( TextAlign eAlign ); TextAlign GetTextAlign() const { return maFont.GetAlign(); } @@ -1181,12 +1181,12 @@ public: virtual void SetMapMode( const MapMode& rNewMapMode ); virtual void SetRelativeMapMode( const MapMode& rNewMapMode ); const MapMode& GetMapMode() const { return maMapMode; } - sal_Bool IsMapMode() const { return mbMap; } + bool IsMapMode() const { return mbMap; } void SetRefPoint(); void SetRefPoint( const Point& rRefPoint ); const Point& GetRefPoint() const { return maRefPoint; } - sal_Bool IsRefPoint() const { return mbRefPoint; } + bool IsRefPoint() const { return mbRefPoint; } // #i75163# basegfx::B2DHomMatrix GetViewTransformation() const; @@ -1321,16 +1321,16 @@ public: void Erase(); void Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); } - sal_Bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); + bool AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ); int GetDevFontCount() const; FontInfo GetDevFont( int nDevFontIndex ) const; int GetDevFontSizeCount( const Font& ) const; Size GetDevFontSize( const Font& rFont, int nSizeIndex ) const; - sal_Bool IsFontAvailable( const OUString& rFontName ) const; + bool IsFontAvailable( const OUString& rFontName ) const; FontMetric GetFontMetric() const; FontMetric GetFontMetric( const Font& rFont ) const; - sal_Bool GetFontCharMap( FontCharMap& rFontCharMap ) const; + bool GetFontCharMap( FontCharMap& rFontCharMap ) const; bool GetFontCapabilities( vcl::FontCapabilities& rFontCapabilities ) const; sal_Int32 HasGlyphs( const Font& rFont, const OUString& rStr, @@ -1349,7 +1349,7 @@ public: sal_uInt16 GetBitCount() const; - sal_Bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const; + bool GetTextIsRTL( const OUString&, sal_Int32 nIndex, sal_Int32 nLen ) const; /** Query the existence and depth of the alpha channel @@ -1370,7 +1370,7 @@ public: @return sal_True, if this device has an alpha channel. */ - sal_Bool HasAlpha(); + bool HasAlpha(); /// request XCanvas render interface for this OutputDevice css::uno::Reference< css::rendering::XCanvas > @@ -1429,17 +1429,17 @@ public: // These all just call through to the private mpGraphics functions of the same name. // Query the platform layer for control support - sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const; + bool IsNativeControlSupported( ControlType nType, ControlPart nPart ) const; // Query the native control to determine if it was acted upon - sal_Bool HitTestNativeControl( ControlType nType, + bool HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) const; // Request rendering of a particular control and/or part - sal_Bool DrawNativeControl( ControlType nType, + bool DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -1447,7 +1447,7 @@ public: OUString aCaption ); // Query the native control's actual drawing region (including adornment) - sal_Bool GetNativeControlRegion( ControlType nType, + bool GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, diff --git a/include/vcl/pdfextoutdevdata.hxx b/include/vcl/pdfextoutdevdata.hxx index b6314edc7495..2ebdfdd4b59c 100644 --- a/include/vcl/pdfextoutdevdata.hxx +++ b/include/vcl/pdfextoutdevdata.hxx @@ -75,16 +75,16 @@ class VCL_DLLPUBLIC PDFExtOutDevData : public ExtOutDevData const OutputDevice& mrOutDev; - sal_Bool mbTaggedPDF; - sal_Bool mbExportNotes; - sal_Bool mbExportNotesPages; - sal_Bool mbTransitionEffects; - sal_Bool mbUseLosslessCompression; - sal_Bool mbReduceImageResolution; - sal_Bool mbExportFormFields; - sal_Bool mbExportBookmarks; - sal_Bool mbExportHiddenSlides; - sal_Bool mbExportNDests; //i56629 + bool mbTaggedPDF; + bool mbExportNotes; + bool mbExportNotesPages; + bool mbTransitionEffects; + bool mbUseLosslessCompression; + bool mbReduceImageResolution; + bool mbExportFormFields; + bool mbExportBookmarks; + bool mbExportHiddenSlides; + bool mbExportNDests; //i56629 sal_Int32 mnFormsFormat; sal_Int32 mnPage; com::sun::star::lang::Locale maDocLocale; @@ -100,48 +100,48 @@ public : PDFExtOutDevData( const OutputDevice& rOutDev ); virtual ~PDFExtOutDevData(); - sal_Bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction ); + bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction ); void ResetSyncData(); void PlayGlobalActions( PDFWriter& rWriter ); - sal_Bool GetIsExportNotes() const; - void SetIsExportNotes( const sal_Bool bExportNotes ); + bool GetIsExportNotes() const; + void SetIsExportNotes( const bool bExportNotes ); - sal_Bool GetIsExportNotesPages() const; - void SetIsExportNotesPages( const sal_Bool bExportNotesPages ); + bool GetIsExportNotesPages() const; + void SetIsExportNotesPages( const bool bExportNotesPages ); - sal_Bool GetIsExportTaggedPDF() const; - void SetIsExportTaggedPDF( const sal_Bool bTaggedPDF ); + bool GetIsExportTaggedPDF() const; + void SetIsExportTaggedPDF( const bool bTaggedPDF ); - sal_Bool GetIsExportTransitionEffects() const; - void SetIsExportTransitionEffects( const sal_Bool bTransitionalEffects ); + bool GetIsExportTransitionEffects() const; + void SetIsExportTransitionEffects( const bool bTransitionalEffects ); - sal_Bool GetIsExportFormFields() const; - void SetIsExportFormFields( const sal_Bool bExportFormFields ); + bool GetIsExportFormFields() const; + void SetIsExportFormFields( const bool bExportFormFields ); void SetFormsFormat( const sal_Int32 nFormsFormat ); - sal_Bool GetIsExportBookmarks() const; - void SetIsExportBookmarks( const sal_Bool bExportBookmarks ); + bool GetIsExportBookmarks() const; + void SetIsExportBookmarks( const bool bExportBookmarks ); - sal_Bool GetIsExportHiddenSlides() const; - void SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides ); + bool GetIsExportHiddenSlides() const; + void SetIsExportHiddenSlides( const bool bExportHiddenSlides ); - sal_Bool GetIsExportNamedDestinations() const; //i56629 - void SetIsExportNamedDestinations( const sal_Bool bExportNDests ); //i56629 + bool GetIsExportNamedDestinations() const; //i56629 + void SetIsExportNamedDestinations( const bool bExportNDests ); //i56629 // PageNumber, Compression is being set by the PDFExport sal_Int32 GetCurrentPageNumber() const; void SetCurrentPageNumber( const sal_Int32 nPage ); - sal_Bool GetIsLosslessCompression() const; - void SetIsLosslessCompression( const sal_Bool bLosslessCompression ); + bool GetIsLosslessCompression() const; + void SetIsLosslessCompression( const bool bLosslessCompression ); - sal_Bool GetIsReduceImageResolution() const; - void SetIsReduceImageResolution( const sal_Bool bReduceImageResolution ); + bool GetIsReduceImageResolution() const; + void SetIsReduceImageResolution( const bool bReduceImageResolution ); const com::sun::star::lang::Locale& GetDocumentLocale() const; void SetDocumentLocale( const com::sun::star::lang::Locale& rLoc ); diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx index d7f61fb5ae34..81e5be62ac33 100644 --- a/include/vcl/pdfwriter.hxx +++ b/include/vcl/pdfwriter.hxx @@ -767,7 +767,7 @@ The following structure describes the permissions used in PDF security FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove = sal_False ); + bool bUnderlineAbove = false ); void DrawTextArray( const Point& rStartPt, const OUString& rStr, const sal_Int32* pDXAry, sal_Int32 nIndex, diff --git a/include/vcl/pngwrite.hxx b/include/vcl/pngwrite.hxx index a6140676cdec..89b218b75725 100644 --- a/include/vcl/pngwrite.hxx +++ b/include/vcl/pngwrite.hxx @@ -44,7 +44,7 @@ namespace vcl const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL ); ~PNGWriter(); - sal_Bool Write( SvStream& rStm ); + bool Write( SvStream& rStm ); // additional method to be able to modify all chunk before they are stored struct ChunkData diff --git a/include/vcl/pointr.hxx b/include/vcl/pointr.hxx index 44f7430b44a7..751739714dad 100644 --- a/include/vcl/pointr.hxx +++ b/include/vcl/pointr.hxx @@ -37,9 +37,9 @@ public: PointerStyle GetStyle() const { return meStyle; } - sal_Bool operator==( const Pointer& rPointer ) const + bool operator==( const Pointer& rPointer ) const { return (meStyle == rPointer.meStyle); } - sal_Bool operator!=( const Pointer& rPointer ) const + bool operator!=( const Pointer& rPointer ) const { return !(Pointer::operator==( rPointer )); } }; diff --git a/include/vcl/prgsbar.hxx b/include/vcl/prgsbar.hxx index 03b1790e2048..f1c189930a66 100644 --- a/include/vcl/prgsbar.hxx +++ b/include/vcl/prgsbar.hxx @@ -63,11 +63,11 @@ private: long mnPrgsHeight; sal_uInt16 mnPercent; sal_uInt16 mnPercentCount; - sal_Bool mbCalcNew; + bool mbCalcNew; using Window::ImplInit; SAL_DLLPRIVATE void ImplInit(); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc ); public: diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx index 672b1fd62ae2..386f43fc4a0c 100644 --- a/include/vcl/print.hxx +++ b/include/vcl/print.hxx @@ -69,18 +69,18 @@ class VCL_DLLPUBLIC PrinterPage { GDIMetaFile* mpMtf; JobSetup maJobSetup; - sal_uInt16 mbNewJobSetup; + bool mbNewJobSetup; public: PrinterPage() : mpMtf( new GDIMetaFile() ) {} - PrinterPage( GDIMetaFile* pMtf, sal_Bool bNewJobSetup, const JobSetup& rSetup ) : + PrinterPage( GDIMetaFile* pMtf, bool bNewJobSetup, const JobSetup& rSetup ) : mpMtf( pMtf ), maJobSetup( rSetup ), mbNewJobSetup( bNewJobSetup ) {} ~PrinterPage() { delete mpMtf; } GDIMetaFile* GetGDIMetaFile() const { return mpMtf; } const JobSetup& GetJobSetup() const { return maJobSetup; } - sal_Bool IsNewJobSetup() const { return (mbNewJobSetup != 0); } + bool IsNewJobSetup() const { return mbNewJobSetup; } }; @@ -151,31 +151,31 @@ class VCL_DLLPUBLIC PrinterOptions { private: - sal_Bool mbReduceTransparency; + bool mbReduceTransparency; PrinterTransparencyMode meReducedTransparencyMode; - sal_Bool mbReduceGradients; + bool mbReduceGradients; PrinterGradientMode meReducedGradientsMode; sal_uInt16 mnReducedGradientStepCount; - sal_Bool mbReduceBitmaps; + bool mbReduceBitmaps; PrinterBitmapMode meReducedBitmapMode; sal_uInt16 mnReducedBitmapResolution; - sal_Bool mbReducedBitmapsIncludeTransparency; - sal_Bool mbConvertToGreyscales; - sal_Bool mbPDFAsStandardPrintJobFormat; + bool mbReducedBitmapsIncludeTransparency; + bool mbConvertToGreyscales; + bool mbPDFAsStandardPrintJobFormat; public: PrinterOptions(); ~PrinterOptions(); - sal_Bool IsReduceTransparency() const { return mbReduceTransparency; } - void SetReduceTransparency( sal_Bool bSet ) { mbReduceTransparency = bSet; } + bool IsReduceTransparency() const { return mbReduceTransparency; } + void SetReduceTransparency( bool bSet ) { mbReduceTransparency = bSet; } PrinterTransparencyMode GetReducedTransparencyMode() const { return meReducedTransparencyMode; } void SetReducedTransparencyMode( PrinterTransparencyMode eMode ) { meReducedTransparencyMode = eMode; } - sal_Bool IsReduceGradients() const { return mbReduceGradients; } - void SetReduceGradients( sal_Bool bSet ) { mbReduceGradients = bSet; } + bool IsReduceGradients() const { return mbReduceGradients; } + void SetReduceGradients( bool bSet ) { mbReduceGradients = bSet; } PrinterGradientMode GetReducedGradientMode() const { return meReducedGradientsMode; } void SetReducedGradientMode( PrinterGradientMode eMode ) { meReducedGradientsMode = eMode; } @@ -183,8 +183,8 @@ public: sal_uInt16 GetReducedGradientStepCount() const { return mnReducedGradientStepCount; } void SetReducedGradientStepCount( sal_uInt16 nStepCount ) { mnReducedGradientStepCount = nStepCount; } - sal_Bool IsReduceBitmaps() const { return mbReduceBitmaps; } - void SetReduceBitmaps( sal_Bool bSet ) { mbReduceBitmaps = bSet; } + bool IsReduceBitmaps() const { return mbReduceBitmaps; } + void SetReduceBitmaps( bool bSet ) { mbReduceBitmaps = bSet; } PrinterBitmapMode GetReducedBitmapMode() const { return meReducedBitmapMode; } void SetReducedBitmapMode( PrinterBitmapMode eMode ) { meReducedBitmapMode = eMode; } @@ -192,14 +192,14 @@ public: sal_uInt16 GetReducedBitmapResolution() const { return mnReducedBitmapResolution; } void SetReducedBitmapResolution( sal_uInt16 nResolution ) { mnReducedBitmapResolution = nResolution; } - sal_Bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; } - void SetReducedBitmapIncludesTransparency( sal_Bool bSet ) { mbReducedBitmapsIncludeTransparency = bSet; } + bool IsReducedBitmapIncludesTransparency() const { return mbReducedBitmapsIncludeTransparency; } + void SetReducedBitmapIncludesTransparency( bool bSet ) { mbReducedBitmapsIncludeTransparency = bSet; } - sal_Bool IsConvertToGreyscales() const { return mbConvertToGreyscales; } - void SetConvertToGreyscales( sal_Bool bSet ) { mbConvertToGreyscales = bSet; } + bool IsConvertToGreyscales() const { return mbConvertToGreyscales; } + void SetConvertToGreyscales( bool bSet ) { mbConvertToGreyscales = bSet; } - sal_Bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat; } - void SetPDFAsStandardPrintJobFormat( sal_Bool bSet ) { mbPDFAsStandardPrintJobFormat = bSet; } + bool IsPDFAsStandardPrintJobFormat() const { return mbPDFAsStandardPrintJobFormat; } + void SetPDFAsStandardPrintJobFormat( bool bSet ) { mbPDFAsStandardPrintJobFormat = bSet; } // read printer options from configuration, parameter decides whether the set for // print "to printer" or "to file" should be read. @@ -235,16 +235,16 @@ private: sal_uInt16 mnCurPrintPage; sal_uInt16 mnPageQueueSize; sal_uInt16 mnCopyCount; - sal_Bool mbDefPrinter; - sal_Bool mbPrinting; - sal_Bool mbJobActive; - sal_Bool mbCollateCopy; - sal_Bool mbPrintFile; - sal_Bool mbInPrintPage; - sal_Bool mbNewJobSetup; - sal_Bool mbIsQueuePrinter; - sal_Bool mbUserSetupCompleted; - sal_Bool mbUserSetupResult; + bool mbDefPrinter; + bool mbPrinting; + bool mbJobActive; + bool mbCollateCopy; + bool mbPrintFile; + bool mbInPrintPage; + bool mbNewJobSetup; + bool mbIsQueuePrinter; + bool mbUserSetupCompleted; + bool mbUserSetupResult; Link maErrorHdl; SAL_DLLPRIVATE void ImplInitData(); @@ -261,7 +261,7 @@ private: static SAL_DLLPRIVATE sal_uLong ImplSalPrinterErrorCodeToVCL( sal_uLong nError ); private: - SAL_DLLPRIVATE sal_Bool EndJob(); + SAL_DLLPRIVATE bool EndJob(); SAL_DLLPRIVATE Printer( const Printer& rPrinter ); SAL_DLLPRIVATE Printer& operator =( const Printer& rPrinter ); public: @@ -272,8 +272,8 @@ public: protected: - void SetSelfAsQueuePrinter( sal_Bool bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; } - sal_Bool IsQueuePrinter() const { return mbIsQueuePrinter; } + void SetSelfAsQueuePrinter( bool bQueuePrinter ) { mbIsQueuePrinter = bQueuePrinter; } + bool IsQueuePrinter() const { return mbIsQueuePrinter; } public: Printer(); @@ -290,19 +290,19 @@ public: const OUString& GetName() const { return maPrinterName; } const OUString& GetDriverName() const { return maDriver; } - sal_Bool IsDefPrinter() const { return mbDefPrinter; } - sal_Bool IsDisplayPrinter() const { return mpDisplayDev != NULL; } - sal_Bool IsValid() const { return !IsDisplayPrinter(); } + bool IsDefPrinter() const { return mbDefPrinter; } + bool IsDisplayPrinter() const { return mpDisplayDev != NULL; } + bool IsValid() const { return !IsDisplayPrinter(); } sal_uLong GetCapabilities( sal_uInt16 nType ) const; - sal_Bool HasSupport( PrinterSupport eFeature ) const; + bool HasSupport( PrinterSupport eFeature ) const; - sal_Bool SetJobSetup( const JobSetup& rSetup ); + bool SetJobSetup( const JobSetup& rSetup ); const JobSetup& GetJobSetup() const { return maJobSetup; } void SetJobValue( const OUString& rKey, const OUString& rValue ) { maJobSetup.SetValue( rKey, rValue ); } - sal_Bool Setup( Window* pWindow = NULL ); - sal_Bool SetPrinterProps( const Printer* pPrinter ); + bool Setup( Window* pWindow = NULL ); + bool SetPrinterProps( const Printer* pPrinter ); // SetPrinterOptions is used internally only now // in earlier times it was used only to set the options loaded directly from the configuration @@ -312,18 +312,18 @@ public: SAL_DLLPRIVATE void SetPrinterOptions( const PrinterOptions& rOptions ); const PrinterOptions& GetPrinterOptions() const { return( *mpPrinterOptions ); } - sal_Bool SetOrientation( Orientation eOrient ); + bool SetOrientation( Orientation eOrient ); Orientation GetOrientation() const; - sal_Bool SetDuplexMode( DuplexMode ); + bool SetDuplexMode( DuplexMode ); // returns the angle that a landscape page will be turned counterclockwise // wrt to portrait. The return value may be only valid for // the current paper int GetLandscapeAngle() const; - sal_Bool SetPaperBin( sal_uInt16 nPaperBin ); + bool SetPaperBin( sal_uInt16 nPaperBin ); sal_uInt16 GetPaperBin() const; - sal_Bool SetPaper( Paper ePaper ); - sal_Bool SetPaperSizeUser( const Size& rSize ); - sal_Bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest ); + bool SetPaper( Paper ePaper ); + bool SetPaperSizeUser( const Size& rSize ); + bool SetPaperSizeUser( const Size& rSize, bool bMatchNearest ); Paper GetPaper() const; static OUString GetPaperName( Paper ePaper ); // return a UI string for the current paper; i_bPaperUser == false means an empty string for PAPER_USER @@ -341,15 +341,15 @@ public: const Point& GetPageOffsetPixel() const { return maPageOffset; } Point GetPageOffset() const { return PixelToLogic( maPageOffset ); } - sal_Bool SetCopyCount( sal_uInt16 nCopy, sal_Bool bCollate = sal_False ); + bool SetCopyCount( sal_uInt16 nCopy, bool bCollate = false ); sal_uInt16 GetCopyCount() const { return mnCopyCount; } - sal_Bool IsCollateCopy() const { return mbCollateCopy; } + bool IsCollateCopy() const { return mbCollateCopy; } - sal_Bool IsPrinting() const { return mbPrinting; } + bool IsPrinting() const { return mbPrinting; } const OUString& GetCurJobName() const { return maJobName; } sal_uInt16 GetCurPage() const { return mnCurPage; } - sal_Bool IsJobActive() const { return mbJobActive; } + bool IsJobActive() const { return mbJobActive; } sal_uLong GetError() const { return ERRCODE_TOERROR(mnError); } sal_uLong GetErrorCode() const { return mnError; } @@ -450,7 +450,7 @@ public: /* get a bool property in case the property is unknown or not convertible to bool, i_bFallback is returned */ - sal_Bool getBoolProperty( const OUString& i_rPropertyName, sal_Bool i_bFallback ) const; + bool getBoolProperty( const OUString& i_rPropertyName, bool i_bFallback ) const; /* get an int property in case the property is unknown or not convertible to bool, i_nFallback is returned */ @@ -520,10 +520,10 @@ public: VCL_PLUGIN_PUBLIC bool isProgressCanceled() const; SAL_DLLPRIVATE void setMultipage( const MultiPageSetup& ); SAL_DLLPRIVATE const MultiPageSetup& getMultipage() const; - VCL_PLUGIN_PUBLIC void setLastPage( sal_Bool i_bLastPage ); - SAL_DLLPRIVATE void setReversePrint( sal_Bool i_bReverse ); + VCL_PLUGIN_PUBLIC void setLastPage( bool i_bLastPage ); + SAL_DLLPRIVATE void setReversePrint( bool i_bReverse ); SAL_DLLPRIVATE bool getReversePrint() const; - SAL_DLLPRIVATE void setPapersizeFromSetup( sal_Bool i_bPapersizeFromSetup ); + SAL_DLLPRIVATE void setPapersizeFromSetup( bool i_bPapersizeFromSetup ); SAL_DLLPRIVATE bool getPapersizeFromSetup() const; SAL_DLLPRIVATE void pushPropertiesToPrinter(); SAL_DLLPRIVATE void resetPaperToLastConfigured(); @@ -566,9 +566,9 @@ class VCL_DLLPUBLIC PrinterOptionsHelper // returns an empty Any for not existing properties css::uno::Any getValue( const OUString& i_rPropertyName ) const; - sal_Bool getBoolValue( const OUString& i_rPropertyName, sal_Bool i_bDefault = sal_False ) const; + bool getBoolValue( const OUString& i_rPropertyName, bool i_bDefault = false ) const; // convenience for fixed strings - sal_Bool getBoolValue( const char* i_pPropName, sal_Bool i_bDefault = sal_False ) const + bool getBoolValue( const char* i_pPropName, bool i_bDefault = false ) const { return getBoolValue( OUString::createFromAscii( i_pPropName ), i_bDefault ); } sal_Int64 getIntValue( const OUString& i_rPropertyName, sal_Int64 i_nDefault = 0 ) const; @@ -586,18 +586,18 @@ class VCL_DLLPUBLIC PrinterOptionsHelper { OUString maDependsOnName; sal_Int32 mnDependsOnEntry; - sal_Bool mbAttachToDependency; + bool mbAttachToDependency; OUString maGroupHint; - sal_Bool mbInternalOnly; - sal_Bool mbEnabled; + bool mbInternalOnly; + bool mbEnabled; css::uno::Sequence< css::beans::PropertyValue > maAddProps; UIControlOptions( const OUString& i_rDependsOnName = OUString(), sal_Int32 i_nDependsOnEntry = -1, - sal_Bool i_bAttachToDependency = sal_False, + bool i_bAttachToDependency = false, const OUString& i_rGroupHint = OUString(), - sal_Bool i_bInternalOnly = sal_False, - sal_Bool i_bEnabled = sal_True + bool i_bInternalOnly = false, + bool i_bEnabled = true ) : maDependsOnName( i_rDependsOnName ) , mnDependsOnEntry( i_nDependsOnEntry ) @@ -638,7 +638,7 @@ class VCL_DLLPUBLIC PrinterOptionsHelper const OUString& i_rTitle, const OUString& i_rHelpId, const OUString& i_rProperty, - sal_Bool i_bValue, + bool i_bValue, const UIControlOptions& i_rControlOptions = UIControlOptions()); // Show a set of choices in a list box diff --git a/include/vcl/salbtype.hxx b/include/vcl/salbtype.hxx index bdf9543263ac..6e92484f4827 100644 --- a/include/vcl/salbtype.hxx +++ b/include/vcl/salbtype.hxx @@ -121,11 +121,11 @@ public: inline ~BitmapColor() {}; - inline sal_Bool operator==( const BitmapColor& rBitmapColor ) const; - inline sal_Bool operator!=( const BitmapColor& rBitmapColor ) const; + inline bool operator==( const BitmapColor& rBitmapColor ) const; + inline bool operator!=( const BitmapColor& rBitmapColor ) const; inline BitmapColor& operator=( const BitmapColor& rBitmapColor ); - inline sal_Bool IsIndex() const; + inline bool IsIndex() const; inline sal_uInt8 GetRed() const; inline void SetRed( sal_uInt8 cRed ); @@ -184,9 +184,9 @@ public: inline ~BitmapPalette(); inline BitmapPalette& operator=( const BitmapPalette& rBitmapPalette ); - inline sal_Bool operator==( const BitmapPalette& rBitmapPalette ) const; - inline sal_Bool operator!=( const BitmapPalette& rBitmapPalette ) const; - inline sal_Bool operator!(); + inline bool operator==( const BitmapPalette& rBitmapPalette ) const; + inline bool operator!=( const BitmapPalette& rBitmapPalette ) const; + inline bool operator!(); inline sal_uInt16 GetEntryCount() const; inline void SetEntryCount( sal_uInt16 nCount ); @@ -323,7 +323,7 @@ inline BitmapColor::BitmapColor( sal_uInt8 cIndex ) : // ------------------------------------------------------------------ -inline sal_Bool BitmapColor::operator==( const BitmapColor& rBitmapColor ) const +inline bool BitmapColor::operator==( const BitmapColor& rBitmapColor ) const { return( ( mcBlueOrIndex == rBitmapColor.mcBlueOrIndex ) && ( mbIndex ? rBitmapColor.mbIndex : @@ -332,7 +332,7 @@ inline sal_Bool BitmapColor::operator==( const BitmapColor& rBitmapColor ) const // ------------------------------------------------------------------ -inline sal_Bool BitmapColor::operator!=( const BitmapColor& rBitmapColor ) const +inline bool BitmapColor::operator!=( const BitmapColor& rBitmapColor ) const { return !( *this == rBitmapColor ); } @@ -351,7 +351,7 @@ inline BitmapColor& BitmapColor::operator=( const BitmapColor& rBitmapColor ) // ------------------------------------------------------------------ -inline sal_Bool BitmapColor::IsIndex() const +inline bool BitmapColor::IsIndex() const { return mbIndex; } @@ -580,19 +580,19 @@ inline BitmapPalette& BitmapPalette::operator=( const BitmapPalette& rBitmapPale // ------------------------------------------------------------------ -inline sal_Bool BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) const +inline bool BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( rBitmapPalette.mnCount == mnCount ) { - bRet = sal_True; + bRet = true; for( sal_uInt16 i = 0; i < mnCount; i++ ) { if( mpBitmapColor[ i ] != rBitmapPalette.mpBitmapColor[ i ] ) { - bRet = sal_False; + bRet = false; break; } } @@ -603,14 +603,14 @@ inline sal_Bool BitmapPalette::operator==( const BitmapPalette& rBitmapPalette ) // ------------------------------------------------------------------ -inline sal_Bool BitmapPalette::operator!=( const BitmapPalette& rBitmapPalette ) const +inline bool BitmapPalette::operator!=( const BitmapPalette& rBitmapPalette ) const { return !( *this == rBitmapPalette ); } // ------------------------------------------------------------------ -inline sal_Bool BitmapPalette::operator!() +inline bool BitmapPalette::operator!() { return( !mnCount || !mpBitmapColor ); } @@ -678,11 +678,11 @@ inline sal_uInt16 BitmapPalette::GetBestIndex( const BitmapColor& rCol ) const if( mpBitmapColor && mnCount ) { - sal_Bool bFound = sal_False; + bool bFound = false; for( long j = 0L; ( j < mnCount ) && !bFound; j++ ) if( rCol == mpBitmapColor[ j ] ) - nRetIndex = ( (sal_uInt16) j ), bFound = sal_True; + nRetIndex = ( (sal_uInt16) j ), bFound = true; if( !bFound ) { diff --git a/include/vcl/salnativewidgets.hxx b/include/vcl/salnativewidgets.hxx index ba568f9cd91e..6f540c74f31e 100644 --- a/include/vcl/salnativewidgets.hxx +++ b/include/vcl/salnativewidgets.hxx @@ -371,12 +371,12 @@ class VCL_DLLPUBLIC TabitemValue : public ImplControlValue virtual ~TabitemValue(); virtual TabitemValue* clone() const; - sal_Bool isLeftAligned() const { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; } - sal_Bool isRightAligned() const { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; } - sal_Bool isBothAligned() const { return isLeftAligned() && isRightAligned(); } - sal_Bool isNotAligned() const { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; } - sal_Bool isFirst() const { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; } - sal_Bool isLast() const { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; } + bool isLeftAligned() const { return (mnAlignment & TABITEM_LEFTALIGNED) != 0; } + bool isRightAligned() const { return (mnAlignment & TABITEM_RIGHTALIGNED) != 0; } + bool isBothAligned() const { return isLeftAligned() && isRightAligned(); } + bool isNotAligned() const { return (mnAlignment & (TABITEM_LEFTALIGNED | TABITEM_RIGHTALIGNED)) == 0; } + bool isFirst() const { return (mnAlignment & TABITEM_FIRST_IN_GROUP) != 0; } + bool isLast() const { return (mnAlignment & TABITEM_LAST_IN_GROUP) != 0; } }; /* SpinbuttonValue: @@ -412,11 +412,11 @@ class VCL_DLLPUBLIC ToolbarValue : public ImplControlValue { public: ToolbarValue() : ImplControlValue( CTRL_TOOLBAR, BUTTONVALUE_DONTKNOW, 0 ) - { mbIsTopDockingArea = sal_False; } + { mbIsTopDockingArea = false; } virtual ~ToolbarValue(); virtual ToolbarValue* clone() const; Rectangle maGripRect; - sal_Bool mbIsTopDockingArea; // indicates that this is the top aligned dockingarea + bool mbIsTopDockingArea; // indicates that this is the top aligned dockingarea // adjacent to the menubar }; diff --git a/include/vcl/scrbar.hxx b/include/vcl/scrbar.hxx index e17042cd2210..28c891c15cde 100644 --- a/include/vcl/scrbar.hxx +++ b/include/vcl/scrbar.hxx @@ -63,8 +63,8 @@ private: sal_uInt16 mnStateFlags; ScrollType meScrollType; ScrollType meDDScrollType; - sal_Bool mbCalcSize; - sal_Bool mbFullDrag; + bool mbCalcSize; + bool mbFullDrag; Link maScrollHdl; Link maEndScrollHdl; @@ -73,17 +73,17 @@ private: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitStyle( WinBits nStyle ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); - SAL_DLLPRIVATE void ImplUpdateRects( sal_Bool bUpdate = sal_True ); + SAL_DLLPRIVATE void ImplUpdateRects( bool bUpdate = true ); SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos ); SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos ); - SAL_DLLPRIVATE void ImplCalc( sal_Bool bUpdate = sal_True ); + SAL_DLLPRIVATE void ImplCalc( bool bUpdate = true ); SAL_DLLPRIVATE void ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev ); using Window::ImplScroll; - SAL_DLLPRIVATE long ImplScroll( long nNewPos, sal_Bool bCallEndScroll ); - SAL_DLLPRIVATE long ImplDoAction( sal_Bool bCallEndScroll ); - SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, sal_Bool bCallAction = sal_True ); + SAL_DLLPRIVATE long ImplScroll( long nNewPos, bool bCallEndScroll ); + SAL_DLLPRIVATE long ImplDoAction( bool bCallEndScroll ); + SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, bool bCallAction = true ); SAL_DLLPRIVATE void ImplInvert(); - SAL_DLLPRIVATE sal_Bool ImplDrawNative( sal_uInt16 nDrawFlags ); + SAL_DLLPRIVATE bool ImplDrawNative( sal_uInt16 nDrawFlags ); SAL_DLLPRIVATE void ImplDragThumb( const Point& rMousePos ); SAL_DLLPRIVATE Size getCurrentCalcSize() const; DECL_DLLPRIVATE_LINK( ImplTimerHdl, Timer* ); @@ -113,9 +113,9 @@ public: long DoScroll( long nNewPos ); long DoScrollAction( ScrollType eScrollType ); - void EnableDrag( sal_Bool bEnable = sal_True ) + void EnableDrag( bool bEnable = true ) { mbFullDrag = bEnable; } - sal_Bool IsDragEnabled() const { return mbFullDrag; } + bool IsDragEnabled() const { return mbFullDrag; } void SetRangeMin( long nNewRange ); long GetRangeMin() const { return mnMinRange; } diff --git a/include/vcl/seleng.hxx b/include/vcl/seleng.hxx index 0b3d6975b75f..d6bb2d3cd955 100644 --- a/include/vcl/seleng.hxx +++ b/include/vcl/seleng.hxx @@ -51,10 +51,10 @@ public: // move cursor, at the same time match cursor position to the selection // starting at anchor. sal_True == Ok - virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, + virtual bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ) = 0; - virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ) = 0; + virtual bool IsSelectionAtPoint( const Point& rPointPixel ) = 0; virtual void DeselectAtPoint( const Point& rPointPixel ) = 0; // delete anchor & deselect all virtual void DeselectAll() = 0; @@ -87,7 +87,7 @@ private: sal_uInt16 nFlags; DECL_DLLPRIVATE_LINK( ImpWatchDog, void* ); - inline sal_Bool ShouldDeselect( sal_Bool bModifierKey1 ) const; + inline bool ShouldDeselect( bool bModifierKey1 ) const; // determines to deselect or not when Ctrl-key is pressed on CursorPosChanging public: @@ -97,12 +97,12 @@ public: ~SelectionEngine(); // sal_True: Event was processed by Selection Engine - sal_Bool SelMouseButtonDown( const MouseEvent& rMEvt ); - sal_Bool SelMouseButtonUp( const MouseEvent& rMEvt ); - sal_Bool SelMouseMove( const MouseEvent& rMEvt ); + bool SelMouseButtonDown( const MouseEvent& rMEvt ); + bool SelMouseButtonUp( const MouseEvent& rMEvt ); + bool SelMouseMove( const MouseEvent& rMEvt ); // Keyboard - void CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ); + void CursorPosChanging( bool bShift, bool bMod1 ); // is needed to generate a Move event via a Timer // when the mouse is outside the area @@ -110,13 +110,13 @@ public: { aArea = rNewArea; } const Rectangle& GetVisibleArea() const { return aArea; } - void SetAddMode( sal_Bool); - sal_Bool IsAddMode() const; + void SetAddMode( bool); + bool IsAddMode() const; - void AddAlways( sal_Bool bOn ); - sal_Bool IsAlwaysAdding() const; + void AddAlways( bool bOn ); + bool IsAlwaysAdding() const; - void EnableDrag( sal_Bool bOn ); + void EnableDrag( bool bOn ); void SetSelectionMode( SelectionMode eMode ); SelectionMode GetSelectionMode() const { return eSelMode; } @@ -136,18 +136,18 @@ public: { nLockedMods = nModifiers; } sal_uInt16 GetLockedModifiers() const { return nLockedMods; } - sal_Bool IsInSelection() const; + bool IsInSelection() const; void Reset(); void Command( const CommandEvent& rCEvt ); - sal_Bool HasAnchor() const; - void SetAnchor( sal_Bool bAnchor ); + bool HasAnchor() const; + void SetAnchor( bool bAnchor ); void SetUpdateInterval( sal_uLong nInterval ); // wird im Ctor eingeschaltet - void ExpandSelectionOnMouseMove( sal_Bool bExpand = sal_True ) + void ExpandSelectionOnMouseMove( bool bExpand = true ) { if( bExpand ) nFlags |= SELENG_EXPANDONMOVE; @@ -156,15 +156,15 @@ public: } }; -inline sal_Bool SelectionEngine::IsAddMode() const +inline bool SelectionEngine::IsAddMode() const { if ( nFlags & (SELENG_IN_ADD | SELENG_ADD_ALW) ) - return sal_True; + return true; else - return sal_False; + return false; } -inline void SelectionEngine::SetAddMode( sal_Bool bNewMode ) +inline void SelectionEngine::SetAddMode( bool bNewMode ) { if ( bNewMode ) nFlags |= SELENG_IN_ADD; @@ -172,7 +172,7 @@ inline void SelectionEngine::SetAddMode( sal_Bool bNewMode ) nFlags &= (~SELENG_IN_ADD); } -inline void SelectionEngine::EnableDrag( sal_Bool bOn ) +inline void SelectionEngine::EnableDrag( bool bOn ) { if ( bOn ) nFlags |= SELENG_DRG_ENAB; @@ -180,7 +180,7 @@ inline void SelectionEngine::EnableDrag( sal_Bool bOn ) nFlags &= (~SELENG_DRG_ENAB); } -inline void SelectionEngine::AddAlways( sal_Bool bOn ) +inline void SelectionEngine::AddAlways( bool bOn ) { if( bOn ) nFlags |= SELENG_ADD_ALW; @@ -188,31 +188,31 @@ inline void SelectionEngine::AddAlways( sal_Bool bOn ) nFlags &= (~SELENG_ADD_ALW); } -inline sal_Bool SelectionEngine::IsAlwaysAdding() const +inline bool SelectionEngine::IsAlwaysAdding() const { if ( nFlags & SELENG_ADD_ALW ) - return sal_True; + return true; else - return sal_False; + return false; } -inline sal_Bool SelectionEngine::IsInSelection() const +inline bool SelectionEngine::IsInSelection() const { if ( nFlags & SELENG_IN_SEL ) - return sal_True; + return true; else - return sal_False; + return false; } -inline sal_Bool SelectionEngine::HasAnchor() const +inline bool SelectionEngine::HasAnchor() const { if ( nFlags & SELENG_HAS_ANCH ) - return sal_True; + return true; else - return sal_False; + return false; } -inline void SelectionEngine::SetAnchor( sal_Bool bAnchor ) +inline void SelectionEngine::SetAnchor( bool bAnchor ) { if ( bAnchor ) nFlags |= SELENG_HAS_ANCH; diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx index d9711de3eb15..0173b31ca240 100644 --- a/include/vcl/settings.hxx +++ b/include/vcl/settings.hxx @@ -62,7 +62,7 @@ private: sal_uInt16 mnDragLinkCode; sal_uInt16 mnContextMenuCode; sal_uInt16 mnContextMenuClicks; - sal_Bool mbContextMenuDown; + bool mbContextMenuDown; sal_uLong mnScrollRepeat; sal_uLong mnButtonStartRepeat; sal_uLong mnButtonRepeat; @@ -155,9 +155,9 @@ public: { CopyData(); mpData->mnContextMenuClicks = nClicks; } sal_uInt16 GetContextMenuClicks() const { return mpData->mnContextMenuClicks; } - void SetContextMenuDown( sal_Bool bDown ) + void SetContextMenuDown( bool bDown ) { CopyData(); mpData->mbContextMenuDown = bDown; } - sal_Bool GetContextMenuDown() const + bool GetContextMenuDown() const { return mpData->mbContextMenuDown; } void SetScrollRepeat( sal_uLong nRepeat ) @@ -198,8 +198,8 @@ public: const MouseSettings& operator =( const MouseSettings& rSet ); - sal_Bool operator ==( const MouseSettings& rSet ) const; - sal_Bool operator !=( const MouseSettings& rSet ) const + bool operator ==( const MouseSettings& rSet ) const; + bool operator !=( const MouseSettings& rSet ) const { return !(*this == rSet); } }; @@ -231,6 +231,8 @@ struct FrameStyle {} }; +enum AutoState { AUTO_STATE_OFF, AUTO_STATE_ON, AUTO_STATE_AUTO }; + // ----------------- // - ImplStyleData - // ----------------- @@ -327,25 +329,25 @@ private: sal_uLong mnLogoDisplayTime; sal_uLong mnDisplayOptions; sal_uLong mnToolbarIconSize; - sal_uLong mnUseFlatMenus; + bool mnUseFlatMenus; sal_uLong mnOptions; sal_uInt16 mnScreenZoom; sal_uInt16 mnScreenFontZoom; - sal_uInt16 mnHighContrast; - sal_uInt16 mnUseSystemUIFonts; + bool mnHighContrast; + bool mnUseSystemUIFonts; sal_uInt16 mnAutoMnemonic; - sal_uInt16 mnUseImagesInMenus; - sal_uLong mnUseFlatBorders; - sal_Bool mbPreferredUseImagesInMenus; + AutoState mnUseImagesInMenus; + bool mnUseFlatBorders; + bool mbPreferredUseImagesInMenus; long mnMinThumbSize; sal_uLong mnSymbolsStyle; sal_uLong mnPreferredSymbolsStyle; - sal_uInt16 mnSkipDisabledInMenus; - sal_Bool mbHideDisabledMenuItems; - sal_Bool mbAcceleratorsInContextMenus; + bool mnSkipDisabledInMenus; + bool mbHideDisabledMenuItems; + bool mbAcceleratorsInContextMenus; //mbPrimaryButtonWarpsSlider == true for "jump to here" behavior for primary button, otherwise //primary means scroll by single page. Secondary button takes the alternative behaviour - sal_Bool mbPrimaryButtonWarpsSlider; + bool mbPrimaryButtonWarpsSlider; Wallpaper maWorkspaceGradient; DialogStyle maDialogStyle; FrameStyle maFrameStyle; @@ -360,7 +362,7 @@ private: Size maListBoxPreviewDefaultLogicSize; Size maListBoxPreviewDefaultPixelSize; sal_uInt16 mnListBoxPreviewDefaultLineWidth; - sal_Bool mbPreviewUsesCheckeredBackground; + bool mbPreviewUsesCheckeredBackground; OUString maPersonaHeaderFooter; ///< Cache the settings to detect changes. @@ -425,10 +427,6 @@ private: #define STYLE_SYMBOLS_TANGO_TESTING ((sal_uLong)10) #define STYLE_SYMBOLS_THEMES_MAX ((sal_uLong)11) -#define STYLE_MENUIMAGES_OFF ((sal_uInt16)0) -#define STYLE_MENUIMAGES_ON ((sal_uInt16)1) -#define STYLE_MENUIMAGES_AUTO ((sal_uInt16)2) - #define STYLE_CURSOR_NOBLINKTIME ((sal_uLong)0xFFFFFFFF) class VCL_DLLPUBLIC StyleSettings @@ -642,44 +640,44 @@ public: const Color& GetInactiveTabColor() const { return mpData->maInactiveTabColor; } - void SetHighContrastMode( sal_Bool bHighContrast ) + void SetHighContrastMode( bool bHighContrast ) { CopyData(); mpData->mnHighContrast = bHighContrast; } - sal_Bool GetHighContrastMode() const - { return (sal_Bool) mpData->mnHighContrast; } - void SetUseSystemUIFonts( sal_Bool bUseSystemUIFonts ) + bool GetHighContrastMode() const + { return mpData->mnHighContrast; } + void SetUseSystemUIFonts( bool bUseSystemUIFonts ) { CopyData(); mpData->mnUseSystemUIFonts = bUseSystemUIFonts; } - sal_Bool GetUseSystemUIFonts() const - { return (sal_Bool) mpData->mnUseSystemUIFonts; } - void SetUseFlatBorders( sal_Bool bUseFlatBorders ) + bool GetUseSystemUIFonts() const + { return mpData->mnUseSystemUIFonts; } + void SetUseFlatBorders( bool bUseFlatBorders ) { CopyData(); mpData->mnUseFlatBorders = bUseFlatBorders; } - sal_Bool GetUseFlatBorders() const - { return (sal_Bool) mpData->mnUseFlatBorders; } - void SetUseFlatMenus( sal_Bool bUseFlatMenus ) + bool GetUseFlatBorders() const + { return mpData->mnUseFlatBorders; } + void SetUseFlatMenus( bool bUseFlatMenus ) { CopyData(); mpData->mnUseFlatMenus = bUseFlatMenus; } - sal_Bool GetUseFlatMenus() const - { return (sal_Bool) mpData->mnUseFlatMenus; } - void SetUseImagesInMenus( sal_Bool bUseImagesInMenus ) - { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus; } - sal_Bool GetUseImagesInMenus() const; - void SetPreferredUseImagesInMenus( sal_Bool bPreferredUseImagesInMenus ) + bool GetUseFlatMenus() const + { return mpData->mnUseFlatMenus; } + void SetUseImagesInMenus( bool bUseImagesInMenus ) + { CopyData(); mpData->mnUseImagesInMenus = bUseImagesInMenus ? AUTO_STATE_ON : AUTO_STATE_OFF; } + bool GetUseImagesInMenus() const; + void SetPreferredUseImagesInMenus( bool bPreferredUseImagesInMenus ) { CopyData(); mpData->mbPreferredUseImagesInMenus = bPreferredUseImagesInMenus; } - sal_Bool GetPreferredUseImagesInMenus() const + bool GetPreferredUseImagesInMenus() const { return mpData->mbPreferredUseImagesInMenus; } - void SetSkipDisabledInMenus( sal_Bool bSkipDisabledInMenus ) + void SetSkipDisabledInMenus( bool bSkipDisabledInMenus ) { CopyData(); mpData->mnSkipDisabledInMenus = bSkipDisabledInMenus; } - sal_Bool GetSkipDisabledInMenus() const - { return (sal_Bool) mpData->mnSkipDisabledInMenus; } - void SetHideDisabledMenuItems( sal_Bool bHideDisabledMenuItems ) + bool GetSkipDisabledInMenus() const + { return mpData->mnSkipDisabledInMenus; } + void SetHideDisabledMenuItems( bool bHideDisabledMenuItems ) { CopyData(); mpData->mbHideDisabledMenuItems = bHideDisabledMenuItems; } - sal_Bool GetHideDisabledMenuItems() const + bool GetHideDisabledMenuItems() const { return mpData->mbHideDisabledMenuItems; } - void SetAcceleratorsInContextMenus( sal_Bool bAcceleratorsInContextMenus ) + void SetAcceleratorsInContextMenus( bool bAcceleratorsInContextMenus ) { CopyData(); mpData->mbAcceleratorsInContextMenus = bAcceleratorsInContextMenus; } - sal_Bool GetAcceleratorsInContextMenus() const + bool GetAcceleratorsInContextMenus() const { return mpData->mbAcceleratorsInContextMenus; } - void SetPrimaryButtonWarpsSlider( sal_Bool bPrimaryButtonWarpsSlider ) + void SetPrimaryButtonWarpsSlider( bool bPrimaryButtonWarpsSlider ) { CopyData(); mpData->mbPrimaryButtonWarpsSlider = bPrimaryButtonWarpsSlider; } - sal_Bool GetPrimaryButtonWarpsSlider() const + bool GetPrimaryButtonWarpsSlider() const { return mpData->mbPrimaryButtonWarpsSlider; } void SetCairoFontOptions( const void *pOptions ) @@ -837,9 +835,9 @@ public: { CopyData(); mpData->mnOptions = nOptions; } sal_uLong GetOptions() const { return mpData->mnOptions; } - void SetAutoMnemonic( sal_Bool bAutoMnemonic ) + void SetAutoMnemonic( bool bAutoMnemonic ) { CopyData(); mpData->mnAutoMnemonic = (sal_uInt16)bAutoMnemonic; } - sal_Bool GetAutoMnemonic() const + bool GetAutoMnemonic() const { return mpData->mnAutoMnemonic ? sal_True : sal_False; } void SetFontColor( const Color& rColor ) @@ -944,8 +942,8 @@ public: const StyleSettings& operator =( const StyleSettings& rSet ); - sal_Bool operator ==( const StyleSettings& rSet ) const; - sal_Bool operator !=( const StyleSettings& rSet ) const + bool operator ==( const StyleSettings& rSet ) const; + bool operator !=( const StyleSettings& rSet ) const { return !(*this == rSet); } protected: @@ -966,9 +964,9 @@ class ImplMiscData private: sal_uLong mnRefCount; - sal_uInt16 mnEnableATT; - sal_Bool mbEnableLocalizedDecimalSep; - sal_uInt16 mnDisablePrinting; + AutoState mnEnableATT; + bool mbEnableLocalizedDecimalSep; + AutoState mnDisablePrinting; }; // ---------------- @@ -990,14 +988,14 @@ public: #ifdef WNT void SetEnableATToolSupport( sal_Bool bEnable ); #endif - sal_Bool GetEnableATToolSupport() const; - sal_Bool GetDisablePrinting() const; - void SetEnableLocalizedDecimalSep( sal_Bool bEnable ); - sal_Bool GetEnableLocalizedDecimalSep() const; + bool GetEnableATToolSupport() const; + bool GetDisablePrinting() const; + void SetEnableLocalizedDecimalSep( bool bEnable ); + bool GetEnableLocalizedDecimalSep() const; const MiscSettings& operator =( const MiscSettings& rSet ); - sal_Bool operator ==( const MiscSettings& rSet ) const; - sal_Bool operator !=( const MiscSettings& rSet ) const + bool operator ==( const MiscSettings& rSet ) const; + bool operator !=( const MiscSettings& rSet ) const { return !(*this == rSet); } }; @@ -1055,8 +1053,8 @@ public: const HelpSettings& operator =( const HelpSettings& rSet ); - sal_Bool operator ==( const HelpSettings& rSet ) const; - sal_Bool operator !=( const HelpSettings& rSet ) const + bool operator ==( const HelpSettings& rSet ) const; + bool operator !=( const HelpSettings& rSet ) const { return !(*this == rSet); } }; @@ -1165,8 +1163,8 @@ public: const AllSettings& operator =( const AllSettings& rSet ); - sal_Bool operator ==( const AllSettings& rSet ) const; - sal_Bool operator !=( const AllSettings& rSet ) const + bool operator ==( const AllSettings& rSet ) const; + bool operator !=( const AllSettings& rSet ) const { return !(*this == rSet); } static void LocaleSettingsChanged( sal_uInt32 nHint ); SvtSysLocale& GetSysLocale() { return mpData->maSysLocale; } diff --git a/include/vcl/slider.hxx b/include/vcl/slider.hxx index ef24221db227..ca11facf2b1e 100644 --- a/include/vcl/slider.hxx +++ b/include/vcl/slider.hxx @@ -49,8 +49,8 @@ private: sal_uInt16 mnDragDraw; sal_uInt16 mnStateFlags; ScrollType meScrollType; - sal_Bool mbCalcSize; - sal_Bool mbFullDrag; + bool mbCalcSize; + bool mbFullDrag; Link maSlideHdl; Link maEndSlideHdl; @@ -58,16 +58,16 @@ private: using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); SAL_DLLPRIVATE void ImplInitSettings(); - SAL_DLLPRIVATE void ImplUpdateRects( sal_Bool bUpdate = sal_True ); + SAL_DLLPRIVATE void ImplUpdateRects( bool bUpdate = true ); SAL_DLLPRIVATE long ImplCalcThumbPos( long nPixPos ); SAL_DLLPRIVATE long ImplCalcThumbPosPix( long nPos ); - SAL_DLLPRIVATE void ImplCalc( sal_Bool bUpdate = sal_True ); + SAL_DLLPRIVATE void ImplCalc( bool bUpdate = true ); SAL_DLLPRIVATE void ImplDraw( sal_uInt16 nDrawFlags ); - SAL_DLLPRIVATE sal_Bool ImplIsPageUp( const Point& rPos ); - SAL_DLLPRIVATE sal_Bool ImplIsPageDown( const Point& rPos ); - SAL_DLLPRIVATE long ImplSlide( long nNewPos, sal_Bool bCallEndSlide ); - SAL_DLLPRIVATE long ImplDoAction( sal_Bool bCallEndSlide ); - SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, sal_Bool bCallAction = sal_True ); + SAL_DLLPRIVATE bool ImplIsPageUp( const Point& rPos ); + SAL_DLLPRIVATE bool ImplIsPageDown( const Point& rPos ); + SAL_DLLPRIVATE long ImplSlide( long nNewPos, bool bCallEndSlide ); + SAL_DLLPRIVATE long ImplDoAction( bool bCallEndSlide ); + SAL_DLLPRIVATE void ImplDoMouseAction( const Point& rPos, bool bCallAction = true ); SAL_DLLPRIVATE long ImplDoSlide( long nNewPos ); SAL_DLLPRIVATE long ImplDoSlideAction( ScrollType eScrollType ); @@ -87,9 +87,9 @@ public: virtual void Slide(); virtual void EndSlide(); - void EnableDrag( sal_Bool bEnable = sal_True ) + void EnableDrag( bool bEnable = true ) { mbFullDrag = bEnable; } - sal_Bool IsDragEnabled() const { return mbFullDrag; } + bool IsDragEnabled() const { return mbFullDrag; } long GetRangeMin() const { return mnMinRange; } long GetRangeMax() const { return mnMaxRange; } diff --git a/include/vcl/spin.h b/include/vcl/spin.h index a53e04b54d37..98ac18b2fd6c 100644 --- a/include/vcl/spin.h +++ b/include/vcl/spin.h @@ -26,10 +26,10 @@ class OutputDevice; void ImplDrawSpinButton( OutputDevice* pOutDev, const Rectangle& rUpperRect, const Rectangle& rLowerRect, - sal_Bool bUpperIn, sal_Bool bLowerIn, - sal_Bool bUpperEnabled = sal_True, - sal_Bool bLowerEnabled = sal_True, - sal_Bool bHorz = sal_False, sal_Bool bMirrorHorz = sal_False ); + bool bUpperIn, bool bLowerIn, + bool bUpperEnabled = sal_True, + bool bLowerEnabled = sal_True, + bool bHorz = sal_False, bool bMirrorHorz = sal_False ); #endif // INCLUDED_VCL_SPIN_H diff --git a/include/vcl/spin.hxx b/include/vcl/spin.hxx index dedff1495a0b..a48ae89d4b7d 100644 --- a/include/vcl/spin.hxx +++ b/include/vcl/spin.hxx @@ -36,13 +36,13 @@ private: Rectangle maUpperRect; Rectangle maLowerRect; Rectangle maFocusRect; - sal_Bool mbRepeat : 1; - sal_Bool mbUpperIn : 1; - sal_Bool mbLowerIn : 1; - sal_Bool mbInitialUp : 1; - sal_Bool mbInitialDown : 1; - sal_Bool mbHorz : 1; - sal_Bool mbUpperIsFocused : 1; + bool mbRepeat : 1; + bool mbUpperIn : 1; + bool mbLowerIn : 1; + bool mbInitialUp : 1; + bool mbInitialDown : 1; + bool mbHorz : 1; + bool mbUpperIsFocused : 1; Link maUpHdlLink; Link maDownHdlLink; long mnMinRange; @@ -92,14 +92,14 @@ public: private: // moves the focus to the upper or lower rect. Return sal_True if the focus rect actually changed. - SAL_DLLPRIVATE sal_Bool ImplMoveFocus( sal_Bool _bUpper ); - SAL_DLLPRIVATE void ImplCalcFocusRect( sal_Bool _bUpper ); + SAL_DLLPRIVATE bool ImplMoveFocus( bool _bUpper ); + SAL_DLLPRIVATE void ImplCalcFocusRect( bool _bUpper ); - SAL_DLLPRIVATE inline sal_Bool ImplIsUpperEnabled( ) const + SAL_DLLPRIVATE inline bool ImplIsUpperEnabled( ) const { return mnValue + mnValueStep <= mnMaxRange; } - SAL_DLLPRIVATE inline sal_Bool ImplIsLowerEnabled( ) const + SAL_DLLPRIVATE inline bool ImplIsLowerEnabled( ) const { return mnValue >= mnMinRange + mnValueStep; } diff --git a/include/vcl/spinfld.hxx b/include/vcl/spinfld.hxx index 06e31e4c446d..bfb69b6431e1 100644 --- a/include/vcl/spinfld.hxx +++ b/include/vcl/spinfld.hxx @@ -41,7 +41,7 @@ protected: Link maDownHdlLink; Link maFirstHdlLink; Link maLastHdlLink; - sal_Bool mbRepeat:1, + bool mbRepeat:1, mbSpin:1, mbInitialUp:1, mbInitialDown:1, @@ -74,7 +74,7 @@ public: explicit SpinField( Window* pParent, const ResId& ); virtual ~SpinField(); - virtual sal_Bool ShowDropDown( sal_Bool bShow ); + virtual bool ShowDropDown( sal_Bool bShow ); virtual void Up(); virtual void Down(); diff --git a/include/vcl/split.hxx b/include/vcl/split.hxx index 3e868828f402..ab60906564bd 100644 --- a/include/vcl/split.hxx +++ b/include/vcl/split.hxx @@ -34,9 +34,9 @@ private: long mnStartSplitPos; Point maDragPos; Rectangle maDragRect; - sal_Bool mbHorzSplit; - sal_Bool mbDragFull; - sal_Bool mbKbdSplitting; + bool mbHorzSplit; + bool mbDragFull; + bool mbKbdSplitting; long mbInKeyEvent; long mnKeyboardStepSize; Link maStartSplitHdl; @@ -48,7 +48,7 @@ private: SAL_DLLPRIVATE void ImplSplitMousePos( Point& rPos ); SAL_DLLPRIVATE void ImplStartKbdSplitting(); SAL_DLLPRIVATE void ImplKbdTracking( KeyCode aKeyCode ); - SAL_DLLPRIVATE sal_Bool ImplSplitterActive(); + SAL_DLLPRIVATE bool ImplSplitterActive(); SAL_DLLPRIVATE Splitter* ImplFindSibling(); SAL_DLLPRIVATE void ImplRestoreSplitter(); SAL_DLLPRIVATE void ImplInitHorVer(bool bNew); @@ -93,7 +93,7 @@ public: virtual void SetSplitPosPixel( long nPos ); long GetSplitPosPixel() const { return mnSplitPos; } - sal_Bool IsHorizontal() const { return mbHorzSplit; } + bool IsHorizontal() const { return mbHorzSplit; } void SetHorizontal(bool bNew); // set the stepsize of the splitter for cursor movement diff --git a/include/vcl/splitwin.hxx b/include/vcl/splitwin.hxx index 07f3407f46ce..a2d715006c16 100644 --- a/include/vcl/splitwin.hxx +++ b/include/vcl/splitwin.hxx @@ -60,7 +60,7 @@ private: sal_uInt16 mnSplitTest; sal_uInt16 mnSplitPos; sal_uInt16 mnMouseModifier; - sal_Bool mbDragFull:1, + bool mbDragFull:1, mbHorz:1, mbBottomRight:1, mbCalc:1, @@ -94,29 +94,29 @@ private: SAL_DLLPRIVATE void ImplUpdate(); SAL_DLLPRIVATE void ImplSetWindowSize( long nDelta ); SAL_DLLPRIVATE void ImplSplitMousePos( Point& rMousePos ); - SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const; - SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest = sal_False ) const; - SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest = sal_False ) const; - SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, sal_Bool bTest = sal_False ) const; + SAL_DLLPRIVATE void ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const; + SAL_DLLPRIVATE void ImplGetAutoHideRect( Rectangle& rRect, bool bTest = false ) const; + SAL_DLLPRIVATE void ImplGetFadeInRect( Rectangle& rRect, bool bTest = false ) const; + SAL_DLLPRIVATE void ImplGetFadeOutRect( Rectangle& rRect, bool bTest = false ) const; SAL_DLLPRIVATE void ImplDrawButtonRect( const Rectangle& rRect, long nSize ); - SAL_DLLPRIVATE void ImplDrawAutoHide( sal_Bool bInPaint ); - SAL_DLLPRIVATE void ImplDrawFadeIn( sal_Bool bInPaint ); - SAL_DLLPRIVATE void ImplDrawFadeOut( sal_Bool bInPaint ); + SAL_DLLPRIVATE void ImplDrawAutoHide( bool bInPaint ); + SAL_DLLPRIVATE void ImplDrawFadeIn( bool bInPaint ); + SAL_DLLPRIVATE void ImplDrawFadeOut( bool bInPaint ); SAL_DLLPRIVATE void ImplNewAlign(); - SAL_DLLPRIVATE void ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool bLeft ); - SAL_DLLPRIVATE void ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft ); + SAL_DLLPRIVATE void ImplDrawGrip( const Rectangle& rRect, bool bHorz, bool bLeft ); + SAL_DLLPRIVATE void ImplDrawFadeArrow( const Point& rPt, bool bHorz, bool bLeft ); SAL_DLLPRIVATE void ImplStartSplit( const MouseEvent& rMEvt ); static SAL_DLLPRIVATE void ImplDrawBorder( SplitWindow* pWin ); static SAL_DLLPRIVATE void ImplDrawBorderLine( SplitWindow* pWin ); - static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide, - sal_Bool bRows, sal_Bool bDown = sal_True ); + static SAL_DLLPRIVATE void ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide, + bool bRows, bool bDown = true ); static SAL_DLLPRIVATE void ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ); static SAL_DLLPRIVATE void ImplDrawBack( SplitWindow* pWindow, const Rectangle& rRect, const Wallpaper* pWall, const Bitmap* pBitmap ); static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, - sal_Bool bRows, sal_Bool bDown = sal_True ); + bool bRows, bool bDown = true ); static SAL_DLLPRIVATE sal_uInt16 ImplTestSplit( SplitWindow* pWindow, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos ); static SAL_DLLPRIVATE void ImplDrawSplitTracking( SplitWindow* pThis, const Point& rPos ); @@ -152,12 +152,12 @@ public: void InsertItem( sal_uInt16 nId, long nSize, sal_uInt16 nPos = SPLITWINDOW_APPEND, sal_uInt16 nSetId = 0, SplitWindowItemBits nBits = 0 ); - void RemoveItem( sal_uInt16 nId, sal_Bool bHide = sal_True ); + void RemoveItem( sal_uInt16 nId, bool bHide = true ); void Clear(); void SplitItem( sal_uInt16 nId, long nNewSize, - sal_Bool bPropSmall = sal_False, - sal_Bool bPropGreat = sal_False ); + bool bPropSmall = false, + bool bPropGreat = false ); void SetItemSize( sal_uInt16 nId, long nNewSize ); long GetItemSize( sal_uInt16 nId ) const; /** Set a range that limits the (variable part of the) size with an @@ -178,32 +178,32 @@ public: sal_uInt16 GetItemPos( sal_uInt16 nId, sal_uInt16 nSetId = 0 ) const; sal_uInt16 GetItemId( sal_uInt16 nPos, sal_uInt16 nSetId = 0 ) const; sal_uInt16 GetItemCount( sal_uInt16 nSetId = 0 ) const; - sal_Bool IsItemValid( sal_uInt16 nId ) const; + bool IsItemValid( sal_uInt16 nId ) const; - sal_Bool IsNoAlign() const { return mbNoAlign; } + bool IsNoAlign() const { return mbNoAlign; } void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP ); WindowAlign GetAlign() const { return meAlign; } - sal_Bool IsHorizontal() const { return mbHorz; } + bool IsHorizontal() const { return mbHorz; } - sal_Bool IsSplitting() const { return IsTracking(); } + bool IsSplitting() const { return IsTracking(); } void SetMaxSizePixel( long nNewMaxSize ) { mnMaxSize = nNewMaxSize; } long GetMaxSizePixel() const { return mnMaxSize; } Size CalcLayoutSizePixel( const Size& aNewSize ); - void ShowAutoHideButton( sal_Bool bShow = sal_True ); - sal_Bool IsAutoHideButtonVisible() const { return mbAutoHide; } - void ShowFadeInHideButton( sal_Bool bShow = sal_True ); - void ShowFadeInButton( sal_Bool bShow = sal_True ) { ShowFadeInHideButton( bShow ); } - sal_Bool IsFadeInButtonVisible() const { return mbFadeIn; } - void ShowFadeOutButton( sal_Bool bShow = sal_True ); - sal_Bool IsFadeOutButtonVisible() const { return mbFadeOut; } + void ShowAutoHideButton( bool bShow = true ); + bool IsAutoHideButtonVisible() const { return mbAutoHide; } + void ShowFadeInHideButton( bool bShow = true ); + void ShowFadeInButton( bool bShow = true ) { ShowFadeInHideButton( bShow ); } + bool IsFadeInButtonVisible() const { return mbFadeIn; } + void ShowFadeOutButton( bool bShow = true ); + bool IsFadeOutButtonVisible() const { return mbFadeOut; } long GetFadeInSize() const; - sal_Bool IsFadeNoButtonMode() const { return mbFadeNoButtonMode; } + bool IsFadeNoButtonMode() const { return mbFadeNoButtonMode; } - void SetAutoHideState( sal_Bool bAutoHide ); - sal_Bool GetAutoHideState() const { return mbAutoHideIn; } + void SetAutoHideState( bool bAutoHide ); + bool GetAutoHideState() const { return mbAutoHideIn; } void SetStartSplitHdl( const Link& rLink ) { maStartSplitHdl = rLink; } const Link& GetStartSplitHdl() const { return maStartSplitHdl; } diff --git a/include/vcl/status.hxx b/include/vcl/status.hxx index 3f424e69ac6b..1d9271645092 100644 --- a/include/vcl/status.hxx +++ b/include/vcl/status.hxx @@ -88,22 +88,22 @@ private: sal_uInt16 mnCurItemId; sal_uInt16 mnPercent; sal_uInt16 mnPercentCount; - sal_Bool mbVisibleItems; - sal_Bool mbFormat; - sal_Bool mbProgressMode; - sal_Bool mbInUserDraw; + bool mbVisibleItems; + bool mbFormat; + bool mbProgressMode; + bool mbInUserDraw; Link maClickHdl; Link maDoubleClickHdl; using Window::ImplInit; SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplFormat(); - SAL_DLLPRIVATE sal_Bool ImplIsItemUpdate(); + SAL_DLLPRIVATE bool ImplIsItemUpdate(); using OutputDevice::ImplDrawText; - SAL_DLLPRIVATE void ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth ); - SAL_DLLPRIVATE void ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDrawText, sal_Bool bDrawFrame ); - SAL_DLLPRIVATE void ImplDrawProgress( sal_Bool bPaint, + SAL_DLLPRIVATE void ImplDrawText( bool bOffScreen, long nOldTextWidth ); + SAL_DLLPRIVATE void ImplDrawItem( bool bOffScreen, sal_uInt16 nPos, bool bDrawText, bool bDrawFrame ); + SAL_DLLPRIVATE void ImplDrawProgress( bool bPaint, sal_uInt16 nOldPerc, sal_uInt16 nNewPerc ); SAL_DLLPRIVATE void ImplCalcProgressRect(); SAL_DLLPRIVATE Rectangle ImplGetItemRectPos( sal_uInt16 nPos ) const; @@ -134,9 +134,9 @@ public: void ShowItem( sal_uInt16 nItemId ); void HideItem( sal_uInt16 nItemId ); - sal_Bool IsItemVisible( sal_uInt16 nItemId ) const; + bool IsItemVisible( sal_uInt16 nItemId ) const; - sal_Bool AreItemsVisible() const { return mbVisibleItems; } + bool AreItemsVisible() const { return mbVisibleItems; } void RedrawItem( sal_uInt16 nItemId ); @@ -178,7 +178,7 @@ public: void StartProgressMode( const OUString& rText ); void SetProgressValue( sal_uInt16 nPercent ); void EndProgressMode(); - sal_Bool IsProgressMode() const { return mbProgressMode; } + bool IsProgressMode() const { return mbProgressMode; } void SetText( const OUString& rText ); diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx index 3f86d1c54f3e..1b8f6e1deab0 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -348,7 +348,7 @@ public: @returns true if exited successfully, false if not able to fully exit */ - virtual sal_Bool QueryExit(); + virtual bool QueryExit(); /** Send user event. @@ -626,7 +626,7 @@ public: @see IsInExecute, IsInModalMode */ - static sal_Bool IsInMain(); + static bool IsInMain(); /** Queries whether the application is in the event loop @@ -634,7 +634,7 @@ public: @see IsInMain, IsInModalMode */ - static sal_Bool IsInExecute(); + static bool IsInExecute(); /** Queries whether application has a modal dialog active. @@ -642,7 +642,7 @@ public: @see IsInMain, IsInExecute */ - static sal_Bool IsInModalMode(); + static bool IsInModalMode(); /** Return how many events are being dispatched. @@ -679,7 +679,7 @@ public: @returns true if UI is captured, false if not */ - static sal_Bool IsUICaptured(); + static bool IsUICaptured(); /** @name Settings @@ -836,7 +836,7 @@ public: @see PostKeyEvent */ - static sal_Bool HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent ); + static bool HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent ); /** Send keypress event @@ -902,7 +902,7 @@ public: @return true if there is a default window and the event could be posted to it successfully. */ - static sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL ); + static bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL ); /** Remove user event based on event ID @@ -920,7 +920,7 @@ public: @return true if the handler was inserted successfully, false if it couldn't be inserted. */ - static sal_Bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ); + static bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ); /** Remove an idle handler from the application. @@ -1173,7 +1173,7 @@ public: @see RemoveAccel */ - static sal_Bool InsertAccel( Accelerator* pAccel ); + static bool InsertAccel( Accelerator* pAccel ); /** Remove accelerator @@ -1189,7 +1189,7 @@ public: @see IsAutoMnemonicEnabled */ - static void EnableAutoMnemonic( sal_Bool bEnabled = sal_True ); + static void EnableAutoMnemonic( bool bEnabled = true ); /** Determines if auto-mnemonics are enabled. @@ -1197,7 +1197,7 @@ public: @see EnableAutoMnemonic */ - static sal_Bool IsAutoMnemonicEnabled(); + static bool IsAutoMnemonicEnabled(); /** Get the number of reserved key codes used by the application. @@ -1250,7 +1250,7 @@ public: @see EnableAutoHelpId */ - static void EnableAutoHelpId( sal_Bool bEnabled = sal_True ); + static void EnableAutoHelpId( bool bEnabled = true ); /** Determines if auto-help is enabled or disabled. @@ -1258,7 +1258,7 @@ public: @see EnableAutoHelpId */ - static sal_Bool IsAutoHelpIdEnabled(); + static bool IsAutoHelpIdEnabled(); ///@} @@ -1316,7 +1316,7 @@ public: @see GetDialogCancelMode, SetDialogCancelMode */ - static sal_Bool IsDialogCancelEnabled(); + static bool IsDialogCancelEnabled(); /** Make a dialog box a system window or not. @@ -1371,7 +1371,7 @@ public: @return UNO wrapper object. */ - static UnoWrapperBase* GetUnoWrapper( sal_Bool bCreateIfNotExists = sal_True ); + static UnoWrapperBase* GetUnoWrapper( bool bCreateIfNotExists = true ); /** Sets the application's UNO Wrapper object. @@ -1419,7 +1419,7 @@ public: @see EnableHeadlessMode, IsHeadlessModeRequested */ - static sal_Bool IsHeadlessModeEnabled(); + static bool IsHeadlessModeEnabled(); /** Check command line arguments for \code --headless \endcode diff --git a/include/vcl/syschild.hxx b/include/vcl/syschild.hxx index 0238da24333b..1fe833eda532 100644 --- a/include/vcl/syschild.hxx +++ b/include/vcl/syschild.hxx @@ -30,7 +30,7 @@ class VCL_DLLPUBLIC SystemChildWindow : public Window { private: using Window::ImplInit; - SAL_DLLPRIVATE void ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow = sal_False ); + SAL_DLLPRIVATE void ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow = false ); SAL_DLLPRIVATE void ImplTestJavaException( void* pEnv ); // Copy assignment is forbidden and not implemented. @@ -40,19 +40,19 @@ private: public: explicit SystemChildWindow( Window* pParent, WinBits nStyle = 0 ); // create a SystemChildWindow using the given SystemWindowData - explicit SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow = sal_True ); + explicit SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow = true ); virtual ~SystemChildWindow(); const SystemEnvData* GetSystemData() const; // per default systemchildwindows erase their background for better plugin support // however, this might not always be required - void EnableEraseBackground( sal_Bool bEnable = sal_True ); - void SetForwardKey( sal_Bool bEnable ); + void EnableEraseBackground( bool bEnable = true ); + void SetForwardKey( bool bEnable ); // return the platform specific handle/id of this window; // in case the flag bUseJava is set, a java compatible overlay window // is created on which other java windows can be created (plugin interface) - sal_IntPtr GetParentWindowHandle( sal_Bool bUseJava = sal_False ); + sal_IntPtr GetParentWindowHandle( bool bUseJava = false ); }; #endif // INCLUDED_VCL_SYSCHILD_HXX diff --git a/include/vcl/syswin.hxx b/include/vcl/syswin.hxx index 8223483cbac3..9b25c950a522 100644 --- a/include/vcl/syswin.hxx +++ b/include/vcl/syswin.hxx @@ -143,19 +143,19 @@ private: Size maOrgSize; Size maRollUpOutSize; Size maMinOutSize; - sal_Bool mbPined; - sal_Bool mbRollUp; - sal_Bool mbRollFunc; - sal_Bool mbDockBtn; - sal_Bool mbHideBtn; - sal_Bool mbSysChild; + bool mbPined; + bool mbRollUp; + bool mbRollFunc; + bool mbDockBtn; + bool mbHideBtn; + bool mbSysChild; sal_uInt16 mnMenuBarMode; sal_uInt16 mnIcon; ImplData* mpImplData; public: using Window::ImplIsInTaskPaneList; - SAL_DLLPRIVATE sal_Bool ImplIsInTaskPaneList( Window* pWin ); + SAL_DLLPRIVATE bool ImplIsInTaskPaneList( Window* pWin ); private: // Default construction is forbidden and not implemented. @@ -178,7 +178,7 @@ public: virtual bool Notify( NotifyEvent& rNEvt ); virtual bool PreNotify( NotifyEvent& rNEvt ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void TitleButtonClick( sal_uInt16 nButton ); virtual void Pin(); virtual void Roll(); @@ -190,18 +190,18 @@ public: // separately from the window title void SetRepresentedURL( const OUString& ); - void EnableSaveBackground( sal_Bool bSave = sal_True ); - sal_Bool IsSaveBackgroundEnabled() const; + void EnableSaveBackground( bool bSave = true ); + bool IsSaveBackgroundEnabled() const; - void ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible = sal_True ); - sal_Bool IsTitleButtonVisible( sal_uInt16 nButton ) const; + void ShowTitleButton( sal_uInt16 nButton, bool bVisible = true ); + bool IsTitleButtonVisible( sal_uInt16 nButton ) const; - void SetPin( sal_Bool bPin ); - sal_Bool IsPined() const { return mbPined; } + void SetPin( bool bPin ); + bool IsPined() const { return mbPined; } void RollUp(); void RollDown(); - sal_Bool IsRollUp() const { return mbRollUp; } + bool IsRollUp() const { return mbRollUp; } void SetRollUpOutputSizePixel( const Size& rSize ) { maRollUpOutSize = rSize; } Size GetRollUpOutputSizePixel() const { return maRollUpOutSize; } diff --git a/include/vcl/tabctrl.hxx b/include/vcl/tabctrl.hxx index 663c746018f2..ba483b82e622 100644 --- a/include/vcl/tabctrl.hxx +++ b/include/vcl/tabctrl.hxx @@ -44,22 +44,22 @@ private: long mnMaxPageWidth; sal_uInt16 mnActPageId; sal_uInt16 mnCurPageId; - sal_Bool mbFormat; - sal_Bool mbRestoreHelpId; - sal_Bool mbRestoreUnqId; - sal_Bool mbSmallInvalidate; + bool mbFormat; + bool mbRestoreHelpId; + bool mbRestoreUnqId; + bool mbSmallInvalidate; bool mbLayoutDirty; Link maActivateHdl; Link maDeactivateHdl; using Control::ImplInitSettings; - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE ImplTabItem* ImplGetItem( sal_uInt16 nId ) const; SAL_DLLPRIVATE Size ImplGetItemSize( ImplTabItem* pItem, long nMaxWidth ); SAL_DLLPRIVATE Rectangle ImplGetTabRect( sal_uInt16 nPos, long nWidth = -1, long nHeight = -1 ); SAL_DLLPRIVATE void ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ); - SAL_DLLPRIVATE sal_Bool ImplPosCurTabPage(); - SAL_DLLPRIVATE void ImplActivateTabPage( sal_Bool bNext ); + SAL_DLLPRIVATE bool ImplPosCurTabPage(); + SAL_DLLPRIVATE void ImplActivateTabPage( bool bNext ); SAL_DLLPRIVATE void ImplShowFocus(); SAL_DLLPRIVATE void ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bool bLayout = false, bool bFirstInGroup = false, bool bLastInGroup = false, bool bIsCurrentItem = false ); SAL_DLLPRIVATE void ImplPaint( const Rectangle& rRect, bool bLayout = false ); @@ -134,7 +134,7 @@ public: void SetMaxPageWidth( long nMaxWidth ) { mnMaxPageWidth = nMaxWidth; } long GetMaxPageWidth() const { return mnMaxPageWidth; } void ResetMaxPageWidth() { SetMaxPageWidth( 0 ); } - sal_Bool IsMaxPageWidth() const { return mnMaxPageWidth != 0; } + bool IsMaxPageWidth() const { return mnMaxPageWidth != 0; } void SetTabPage( sal_uInt16 nPageId, TabPage* pPage ); TabPage* GetTabPage( sal_uInt16 nPageId ) const; diff --git a/include/vcl/tabdlg.hxx b/include/vcl/tabdlg.hxx index 27651d8209dc..096d5053e66b 100644 --- a/include/vcl/tabdlg.hxx +++ b/include/vcl/tabdlg.hxx @@ -32,7 +32,7 @@ private: FixedLine* mpFixedLine; Window* mpViewWindow; WindowAlign meViewAlign; - sal_Bool mbPosControls; + bool mbPosControls; SAL_DLLPRIVATE void ImplInitTabDialogData(); SAL_DLLPRIVATE void ImplPosControls(); diff --git a/include/vcl/taskpanelist.hxx b/include/vcl/taskpanelist.hxx index 5e4fb2dd48b0..8910ca2873c3 100644 --- a/include/vcl/taskpanelist.hxx +++ b/include/vcl/taskpanelist.hxx @@ -28,11 +28,11 @@ class VCL_DLLPUBLIC TaskPaneList { ::std::vector<Window *> mTaskPanes; - Window *FindNextFloat( Window *pWindow, sal_Bool bForward = sal_True ); - Window *FindNextSplitter( Window *pWindow, sal_Bool bForward = sal_True ); + Window *FindNextFloat( Window *pWindow, bool bForward = true ); + Window *FindNextSplitter( Window *pWindow, bool bForward = true ); public: - sal_Bool IsInList( Window *pWindow ); + bool IsInList( Window *pWindow ); public: TaskPaneList(); @@ -40,7 +40,7 @@ public: void AddWindow( Window *pWindow ); void RemoveWindow( Window *pWindow ); - sal_Bool HandleKeyEvent( KeyEvent aKeyEvent ); + bool HandleKeyEvent( KeyEvent aKeyEvent ); }; #endif diff --git a/include/vcl/textdata.hxx b/include/vcl/textdata.hxx index d05f2f7170b6..f4bf40815e19 100644 --- a/include/vcl/textdata.hxx +++ b/include/vcl/textdata.hxx @@ -44,29 +44,29 @@ public: sal_uInt16 GetIndex() const { return mnIndex; } sal_uInt16& GetIndex() { return mnIndex; } - inline sal_Bool operator == ( const TextPaM& rPaM ) const; - inline sal_Bool operator != ( const TextPaM& rPaM ) const; - inline sal_Bool operator < ( const TextPaM& rPaM ) const; - inline sal_Bool operator > ( const TextPaM& rPaM ) const; + inline bool operator == ( const TextPaM& rPaM ) const; + inline bool operator != ( const TextPaM& rPaM ) const; + inline bool operator < ( const TextPaM& rPaM ) const; + inline bool operator > ( const TextPaM& rPaM ) const; }; -inline sal_Bool TextPaM::operator == ( const TextPaM& rPaM ) const +inline bool TextPaM::operator == ( const TextPaM& rPaM ) const { return ( ( mnPara == rPaM.mnPara ) && ( mnIndex == rPaM.mnIndex ) ) ? sal_True : sal_False; } -inline sal_Bool TextPaM::operator != ( const TextPaM& rPaM ) const +inline bool TextPaM::operator != ( const TextPaM& rPaM ) const { return !( *this == rPaM ); } -inline sal_Bool TextPaM::operator < ( const TextPaM& rPaM ) const +inline bool TextPaM::operator < ( const TextPaM& rPaM ) const { return ( ( mnPara < rPaM.mnPara ) || ( ( mnPara == rPaM.mnPara ) && mnIndex < rPaM.mnIndex ) ) ? sal_True : sal_False; } -inline sal_Bool TextPaM::operator > ( const TextPaM& rPaM ) const +inline bool TextPaM::operator > ( const TextPaM& rPaM ) const { return ( ( mnPara > rPaM.mnPara ) || ( ( mnPara == rPaM.mnPara ) && mnIndex > rPaM.mnIndex ) ) ? sal_True : sal_False; @@ -91,18 +91,18 @@ public: void Justify(); - sal_Bool HasRange() const { return maStartPaM != maEndPaM; } + bool HasRange() const { return maStartPaM != maEndPaM; } - inline sal_Bool operator == ( const TextSelection& rSel ) const; - inline sal_Bool operator != ( const TextSelection& rSel ) const; + inline bool operator == ( const TextSelection& rSel ) const; + inline bool operator != ( const TextSelection& rSel ) const; }; -inline sal_Bool TextSelection::operator == ( const TextSelection& rSel ) const +inline bool TextSelection::operator == ( const TextSelection& rSel ) const { return ( ( maStartPaM == rSel.maStartPaM ) && ( maEndPaM == rSel.maEndPaM ) ); } -inline sal_Bool TextSelection::operator != ( const TextSelection& rSel ) const +inline bool TextSelection::operator != ( const TextSelection& rSel ) const { return !( *this == rSel ); } diff --git a/include/vcl/texteng.hxx b/include/vcl/texteng.hxx index fd6afcf13cb6..700def50dbda 100644 --- a/include/vcl/texteng.hxx +++ b/include/vcl/texteng.hxx @@ -124,15 +124,15 @@ private: TxtAlign meAlign; - sal_Bool mbIsFormatting : 1; // semaphore for the Hook's - sal_Bool mbFormatted : 1; - sal_Bool mbUpdate : 1; - sal_Bool mbModified : 1; - sal_Bool mbUndoEnabled : 1; - sal_Bool mbIsInUndo : 1; - sal_Bool mbDowning : 1; - sal_Bool mbRightToLeft : 1; - sal_Bool mbHasMultiLineParas : 1; + bool mbIsFormatting : 1; // semaphore for the Hook's + bool mbFormatted : 1; + bool mbUpdate : 1; + bool mbModified : 1; + bool mbUndoEnabled : 1; + bool mbIsInUndo : 1; + bool mbDowning : 1; + bool mbRightToLeft : 1; + bool mbHasMultiLineParas : 1; TextEngine( const TextEngine& ) : SfxBroadcaster() {} TextEngine& operator=( const TextEngine& ) { return *this; } @@ -145,10 +145,10 @@ protected: void ImpInitDoc(); void ImpRemoveText(); TextPaM ImpDeleteText( const TextSelection& rSel ); - TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, sal_Bool bOverwrite = sal_False ); + TextPaM ImpInsertText( const TextSelection& rSel, sal_Unicode c, bool bOverwrite = false ); TextPaM ImpInsertText( const TextSelection& rSel, const OUString& rText ); - TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, sal_Bool bKeepEndingAttribs = sal_True ); - TextPaM ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs = sal_True ); + TextPaM ImpInsertParaBreak( const TextSelection& rTextSelection, bool bKeepEndingAttribs = true ); + TextPaM ImpInsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs = true ); void ImpRemoveChars( const TextPaM& rPaM, sal_uInt16 nChars, SfxUndoAction* pCurUndo = 0 ); TextPaM ImpConnectParagraphs( sal_uLong nLeft, sal_uLong nRight ); void ImpRemoveParagraph( sal_uLong nPara ); @@ -158,10 +158,10 @@ protected: // to remain compatible in the minor release we copy the above ImpInsertText // function and add the extra parameter we need but make sure this function // gets not exported. First and seconf parameter swapped to have a different signatur. - SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, sal_Bool bOverwrite = sal_False, sal_Bool bIsUserInput = sal_False ); + SAL_DLLPRIVATE TextPaM ImpInsertText( sal_Unicode c, const TextSelection& rSel, bool bOverwrite = false, bool bIsUserInput = false ); // some other new functions needed that must not be exported to remain compatible SAL_DLLPRIVATE ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XExtendedInputSequenceChecker > GetInputSequenceChecker(); - SAL_DLLPRIVATE sal_Bool IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const; + SAL_DLLPRIVATE bool IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const; // broadcast or adjust selections void ImpParagraphInserted( sal_uLong nPara ); @@ -176,7 +176,7 @@ protected: void CheckIdleFormatter(); void IdleFormatAndUpdate( TextView* pCurView = 0, sal_uInt16 nMaxTimerRestarts = 5 ); - sal_Bool CreateLines( sal_uLong nPara ); + bool CreateLines( sal_uLong nPara ); void CreateAndInsertEmptyLine( sal_uLong nPara ); void ImpBreakLine( sal_uLong nPara, TextLine* pLine, TETextPortion* pPortion, sal_uInt16 nPortionStart, long nRemainingWidth ); sal_uInt16 SplitTextPortion( sal_uLong nPara, sal_uInt16 nPos ); @@ -187,23 +187,23 @@ protected: void FormatDoc(); void FormatFullDoc(); void FormatAndUpdate( TextView* pCurView = 0 ); - sal_Bool IsFormatting() const { return mbIsFormatting; } + bool IsFormatting() const { return mbIsFormatting; } void UpdateViews( TextView* pCurView = 0 ); void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 ); void UpdateSelections(); - sal_Bool IsFormatted() const { return mbFormatted; } + bool IsFormatted() const { return mbFormatted; } - sal_uInt16 GetCharPos( sal_uLong nPara, sal_uInt16 nLine, long nDocPosX, sal_Bool bSmart = sal_False ); - Rectangle GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart = sal_False ); - sal_uInt16 ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart ); + sal_uInt16 GetCharPos( sal_uLong nPara, sal_uInt16 nLine, long nDocPosX, bool bSmart = false ); + Rectangle GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart = false ); + sal_uInt16 ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart ); long ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nTextPortion ); - long ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart = sal_False ); + long ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, bool bPreferPortionStart = false ); long ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_uInt16 nIndex2 ); sal_uInt8 ImpGetRightToLeft( sal_uLong nPara, sal_uInt16 nPos, sal_uInt16* pStart = NULL, sal_uInt16* pEnd = NULL ); - void ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion = sal_False ); + void ImpInitLayoutMode( OutputDevice* pOutDev, bool bDrawingR2LPortion = false ); TxtAlign ImpGetAlign() const; sal_uLong CalcTextHeight(); @@ -242,8 +242,8 @@ public: void SetLeftMargin( sal_uInt16 n ); sal_uInt16 GetLeftMargin() const; - void SetUpdateMode( sal_Bool bUpdate ); - sal_Bool GetUpdateMode() const { return mbUpdate; } + void SetUpdateMode( bool bUpdate ); + bool GetUpdateMode() const { return mbUpdate; } sal_uInt16 GetViewCount() const; TextView* GetView( sal_uInt16 nView ) const; @@ -270,41 +270,41 @@ public: sal_uInt16 GetLineCount( sal_uLong nParagraph ) const; sal_uInt16 GetLineLen( sal_uLong nParagraph, sal_uInt16 nLine ) const; - void SetRightToLeft( sal_Bool bR2L ); - sal_Bool IsRightToLeft() const { return mbRightToLeft; } + void SetRightToLeft( bool bR2L ); + bool IsRightToLeft() const { return mbRightToLeft; } - sal_Bool HasUndoManager() const { return mpUndoManager ? sal_True : sal_False; } + bool HasUndoManager() const { return mpUndoManager ? sal_True : sal_False; } ::svl::IUndoManager& GetUndoManager(); void UndoActionStart( sal_uInt16 nId = 0 ); void UndoActionEnd(); - void InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge = sal_False ); - sal_Bool IsInUndo() { return mbIsInUndo; } - void SetIsInUndo( sal_Bool bInUndo ) { mbIsInUndo = bInUndo; } + void InsertUndo( TextUndo* pUndo, bool bTryMerge = false ); + bool IsInUndo() { return mbIsInUndo; } + void SetIsInUndo( bool bInUndo ) { mbIsInUndo = bInUndo; } void ResetUndo(); - void EnableUndo( sal_Bool bEnable ); - sal_Bool IsUndoEnabled() { return mbUndoEnabled; } + void EnableUndo( bool bEnable ); + bool IsUndoEnabled() { return mbUndoEnabled; } - void SetModified( sal_Bool bModified ) { mbModified = bModified; } - sal_Bool IsModified() const { return mbModified; } + void SetModified( bool bModified ) { mbModified = bModified; } + bool IsModified() const { return mbModified; } - sal_Bool Read( SvStream& rInput, const TextSelection* pSel = NULL ); + bool Read( SvStream& rInput, const TextSelection* pSel = NULL ); - sal_Bool Write( SvStream& rOutput, const TextSelection* pSel = NULL, sal_Bool bHTML = sal_False ); + bool Write( SvStream& rOutput, const TextSelection* pSel = NULL, bool bHTML = false ); - TextPaM GetPaM( const Point& rDocPos, sal_Bool bSmart = sal_True ); - Rectangle PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial = sal_False ); + TextPaM GetPaM( const Point& rDocPos, bool bSmart = true ); + Rectangle PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial = false ); OUString GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord = 0 ); - sal_Bool HasAttrib( sal_uInt16 nWhich ) const; + bool HasAttrib( sal_uInt16 nWhich ) const; const TextAttrib* FindAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const; const TextCharAttrib* FindCharAttrib( const TextPaM& rPaM, sal_uInt16 nWhich ) const; - void RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate ); + void RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, bool bIdleFormatAndUpdate ); void RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib ); - void RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate = sal_True ); - void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate = sal_True ); + void RemoveAttribs( sal_uLong nPara, bool bIdleFormatAndUpdate = true ); + void SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, bool bIdleFormatAndUpdate = true ); TxtAlign GetTextAlign() const { return meAlign; } void SetTextAlign( TxtAlign eAlign ); @@ -315,8 +315,8 @@ public: ::com::sun::star::lang::Locale GetLocale(); ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XBreakIterator > GetBreakIterator(); - static sal_Bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); - static sal_Bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); + static bool DoesKeyChangeText( const KeyEvent& rKeyEvent ); + static bool IsSimpleCharInput( const KeyEvent& rKeyEvent ); Color GetTextColor() const { return maTextColor; } }; diff --git a/include/vcl/textview.hxx b/include/vcl/textview.hxx index 63835ad9e963..f7dea8126093 100644 --- a/include/vcl/textview.hxx +++ b/include/vcl/textview.hxx @@ -66,16 +66,16 @@ protected: void ShowSelection(); void HideSelection(); void ShowSelection( const TextSelection& rSel ); - void ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange = NULL ); + void ImpShowHideSelection( bool bShow, const TextSelection* pRange = NULL ); TextSelection ImpMoveCursor( const KeyEvent& rKeyEvent ); TextPaM ImpDelete( sal_uInt8 nMode, sal_uInt8 nDelMode ); - void ImpSetSelection( const TextSelection& rNewSel, sal_Bool bUI ); - sal_Bool IsInSelection( const TextPaM& rPaM ); + void ImpSetSelection( const TextSelection& rNewSel, bool bUI ); + bool IsInSelection( const TextPaM& rPaM ); void ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle const* pPaintArea, TextSelection const* pPaintRange = 0, TextSelection const* pSelection = 0 ); - void ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev ); - void ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bEndKey ); + void ImpPaint( const Rectangle& rRect, bool bUseVirtDev ); + void ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bEndKey ); void ImpHighlight( const TextSelection& rSel ); void ImpSetSelection( const TextSelection& rSelection ); Point ImpGetOutputStartPos( const Point& rStartDocPos ) const; @@ -84,7 +84,7 @@ protected: void ImpShowDDCursor(); bool ImplTruncateNewText( OUString& rNewText ) const; - sal_Bool ImplCheckTextLen( const OUString& rNewText ); + bool ImplCheckTextLen( const OUString& rNewText ); VirtualDevice* GetVirtualDevice(); @@ -110,25 +110,25 @@ public: void Invalidate(); void Scroll( long nHorzScroll, long nVertScroll ); - void ShowCursor( sal_Bool bGotoCursor = sal_True, sal_Bool bForceVisCursor = sal_True ); + void ShowCursor( bool bGotoCursor = true, bool bForceVisCursor = true ); void HideCursor(); - void EnableCursor( sal_Bool bEnable ); - sal_Bool IsCursorEnabled() const; + void EnableCursor( bool bEnable ); + bool IsCursorEnabled() const; const TextSelection& GetSelection() const; TextSelection& GetSelection(); void SetSelection( const TextSelection& rNewSel ); - void SetSelection( const TextSelection& rNewSel, sal_Bool bGotoCursor ); - sal_Bool HasSelection() const; + void SetSelection( const TextSelection& rNewSel, bool bGotoCursor ); + bool HasSelection() const; OUString GetSelected(); OUString GetSelected( LineEnd aSeparator ); void DeleteSelected(); - void InsertText( const OUString& rNew, sal_Bool bSelect = sal_False ); + void InsertText( const OUString& rNew, bool bSelect = false ); - sal_Bool KeyInput( const KeyEvent& rKeyEvent ); + bool KeyInput( const KeyEvent& rKeyEvent ); void Paint( const Rectangle& rRect ); void MouseButtonUp( const MouseEvent& rMouseEvent ); void MouseButtonDown( const MouseEvent& rMouseEvent ); @@ -145,7 +145,7 @@ public: void Undo(); void Redo(); - sal_Bool Read( SvStream& rInput ); + bool Read( SvStream& rInput ); void SetStartDocPos( const Point& rPos ); const Point& GetStartDocPos() const; @@ -153,21 +153,21 @@ public: Point GetDocPos( const Point& rWindowPos ) const; Point GetWindowPos( const Point& rDocPos ) const; - void SetInsertMode( sal_Bool bInsert ); - sal_Bool IsInsertMode() const; + void SetInsertMode( bool bInsert ); + bool IsInsertMode() const; - void SetAutoIndentMode( sal_Bool bAutoIndent ); + void SetAutoIndentMode( bool bAutoIndent ); - void SetReadOnly( sal_Bool bReadOnly ); - sal_Bool IsReadOnly() const; + void SetReadOnly( bool bReadOnly ); + bool IsReadOnly() const; - void SetAutoScroll( sal_Bool bAutoScroll ); - sal_Bool IsAutoScroll() const; + void SetAutoScroll( bool bAutoScroll ); + bool IsAutoScroll() const; - sal_Bool SetCursorAtPoint( const Point& rPointPixel ); - sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); + bool SetCursorAtPoint( const Point& rPointPixel ); + bool IsSelectionAtPoint( const Point& rPointPixel ); - void SetPaintSelection( sal_Bool bPaint); + void SetPaintSelection( bool bPaint); void EraseVirtualDevice(); @@ -193,7 +193,7 @@ public: TEXTATTR_PROTECTED set as one entitity. Drag and dropped text is automatically attibuted as protected. */ - void SupportProtectAttribute(sal_Bool bSupport); + void SupportProtectAttribute(bool bSupport); /** Returns the number in paragraph of the line in which the cursor is blinking diff --git a/include/vcl/throbber.hxx b/include/vcl/throbber.hxx index 78bcbf98862b..80c9d7dd764a 100644 --- a/include/vcl/throbber.hxx +++ b/include/vcl/throbber.hxx @@ -54,8 +54,8 @@ public: void setStepTime( sal_Int32 nStepTime ) { mnStepTime = nStepTime; } sal_Int32 getStepTime() const { return mnStepTime; } - void setRepeat( sal_Bool bRepeat ) { mbRepeat = bRepeat; } - sal_Bool getRepeat() const { return mbRepeat; } + void setRepeat( bool bRepeat ) { mbRepeat = bRepeat; } + bool getRepeat() const { return mbRepeat; } // animation control void start(); @@ -79,7 +79,7 @@ private: private: ::std::vector< Image > maImageList; - sal_Bool mbRepeat; + bool mbRepeat; sal_Int32 mnStepTime; sal_Int32 mnCurStep; sal_Int32 mnStepCount; diff --git a/include/vcl/timer.hxx b/include/vcl/timer.hxx index a5b1c95b21fa..474036b1aab2 100644 --- a/include/vcl/timer.hxx +++ b/include/vcl/timer.hxx @@ -49,7 +49,7 @@ public: /// set the timeout in milliseconds void SetTimeout( sal_uLong nTimeoutMs ); sal_uLong GetTimeout() const { return mnTimeout; } - sal_Bool IsActive() const { return mbActive ? sal_True : sal_False; } + bool IsActive() const { return mbActive ? sal_True : sal_False; } void SetTimeoutHdl( const Link& rLink ) { maTimeoutHdl = rLink; } const Link& GetTimeoutHdl() const { return maTimeoutHdl; } diff --git a/include/vcl/toolbox.hxx b/include/vcl/toolbox.hxx index 8d421bbd8c62..d595191c9d32 100644 --- a/include/vcl/toolbox.hxx +++ b/include/vcl/toolbox.hxx @@ -61,7 +61,7 @@ public: sal_uInt16 GetTargetPos() const { return mnPosTo; } sal_uInt16 GetSourceId() const { return mnIdFrom; } void* GetData() const { return mpData; } - sal_Bool IsResized() const; + bool IsResized() const; }; inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent() @@ -82,12 +82,12 @@ inline ToolBoxCustomizeEvent::ToolBoxCustomizeEvent( ToolBox* pDropBox, mpData = pUserData; } -inline sal_Bool ToolBoxCustomizeEvent::IsResized() const +inline bool ToolBoxCustomizeEvent::IsResized() const { if ( mnPosTo == TOOLBOX_CUSTOMIZE_RESIZE ) - return sal_True; + return true; else - return sal_False; + return false; } #define TOOLBOX_STYLE_FLAT ((sal_uInt16)0x0004) @@ -204,39 +204,39 @@ private: private: SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle ); using DockingWindow::ImplInitSettings; - SAL_DLLPRIVATE void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + SAL_DLLPRIVATE void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE ImplToolItem* ImplGetItem( sal_uInt16 nId ) const; - SAL_DLLPRIVATE sal_Bool ImplCalcItem(); - SAL_DLLPRIVATE sal_uInt16 ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz ); - SAL_DLLPRIVATE void ImplFormat( sal_Bool bResize = sal_False ); - SAL_DLLPRIVATE void ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn ); + SAL_DLLPRIVATE bool ImplCalcItem(); + SAL_DLLPRIVATE sal_uInt16 ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz ); + SAL_DLLPRIVATE void ImplFormat( bool bResize = false ); + SAL_DLLPRIVATE void ImplDrawSpin( bool bUpperIn, bool bLowerIn ); SAL_DLLPRIVATE void ImplDrawSeparator( sal_uInt16 nPos, Rectangle rRect ); - SAL_DLLPRIVATE void ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight = 0, sal_Bool bPaint = sal_False, sal_Bool bLayout = sal_False ); + SAL_DLLPRIVATE void ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight = 0, bool bPaint = false, bool bLayout = false ); using Window::ImplInvalidate; - SAL_DLLPRIVATE void ImplInvalidate( sal_Bool bNewCalc = sal_False, sal_Bool bFullPaint = sal_False ); + SAL_DLLPRIVATE void ImplInvalidate( bool bNewCalc = false, bool bFullPaint = false ); SAL_DLLPRIVATE void ImplUpdateItem( sal_uInt16 nIndex = 0xFFFF ); SAL_DLLPRIVATE const OUString ImplConvertMenuString( const OUString& rStr ); - SAL_DLLPRIVATE sal_Bool ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat = sal_False ); - SAL_DLLPRIVATE sal_Bool ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel = sal_False ); - SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus = sal_False ); - SAL_DLLPRIVATE sal_Bool ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle = sal_False ); + SAL_DLLPRIVATE bool ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat = false ); + SAL_DLLPRIVATE bool ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel = false ); + SAL_DLLPRIVATE void ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus = false ); + SAL_DLLPRIVATE bool ImplChangeHighlightUpDn( bool bUp, bool bNoCycle = false ); SAL_DLLPRIVATE sal_uInt16 ImplGetItemLine( ImplToolItem* pCurrentItem ); SAL_DLLPRIVATE ImplToolItem* ImplGetFirstValidItem( sal_uInt16 nLine ); - SAL_DLLPRIVATE sal_Bool ImplOpenItem( KeyCode aKeyCode ); - SAL_DLLPRIVATE sal_Bool ImplActivateItem( KeyCode aKeyCode ); + SAL_DLLPRIVATE bool ImplOpenItem( KeyCode aKeyCode ); + SAL_DLLPRIVATE bool ImplActivateItem( KeyCode aKeyCode ); SAL_DLLPRIVATE void ImplShowFocus(); SAL_DLLPRIVATE void ImplHideFocus(); SAL_DLLPRIVATE void ImplUpdateInputEnable(); SAL_DLLPRIVATE void ImplFillLayoutData() const; - SAL_DLLPRIVATE sal_Bool ImplHasClippedItems(); + SAL_DLLPRIVATE bool ImplHasClippedItems(); SAL_DLLPRIVATE Point ImplGetPopupPosition( const Rectangle& rRect, const Size& rSize ) const; SAL_DLLPRIVATE void ImplExecuteCustomMenu(); - SAL_DLLPRIVATE sal_Bool ImplIsFloatingMode() const; - SAL_DLLPRIVATE sal_Bool ImplIsInPopupMode() const; + SAL_DLLPRIVATE bool ImplIsFloatingMode() const; + SAL_DLLPRIVATE bool ImplIsInPopupMode() const; SAL_DLLPRIVATE const OUString& ImplGetHelpText( sal_uInt16 nItemId ) const; SAL_DLLPRIVATE Size ImplGetOptimalFloatingSize(); - SAL_DLLPRIVATE sal_Bool ImplHasExternalMenubutton(); + SAL_DLLPRIVATE bool ImplHasExternalMenubutton(); SAL_DLLPRIVATE void ImplDrawFloatwinBorder( ImplToolItem* pItem ); DECL_DLLPRIVATE_LINK( ImplCallExecuteCustomMenu, void* ); @@ -251,7 +251,7 @@ private: SAL_DLLPRIVATE void ImplUpdateImageList(); // called if StateChanged public: - SAL_DLLPRIVATE void ImplFloatControl( sal_Bool bStart, FloatingWindow* pWindow = NULL ); + SAL_DLLPRIVATE void ImplFloatControl( bool bStart, FloatingWindow* pWindow = NULL ); SAL_DLLPRIVATE void ImplDisableFlatButtons(); static SAL_DLLPRIVATE int ImplGetDragWidth( ToolBox* pThis ); @@ -260,11 +260,11 @@ public: long& rRight, long& rBottom, const ToolBox *pThis ); static SAL_DLLPRIVATE void ImplDrawGrip( ToolBox* pThis ); static SAL_DLLPRIVATE void ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapper *pWrapper ); - static SAL_DLLPRIVATE sal_Bool ImplDrawNativeBackground( ToolBox* pThis, const Region &rRegion ); + static SAL_DLLPRIVATE bool ImplDrawNativeBackground( ToolBox* pThis, const Region &rRegion ); static SAL_DLLPRIVATE void ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegion ); - static SAL_DLLPRIVATE void ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, sal_Bool bIsInPopupMode ); + static SAL_DLLPRIVATE void ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, bool bIsInPopupMode ); static SAL_DLLPRIVATE void ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ); - static SAL_DLLPRIVATE void ImplErase( ToolBox* pThis, const Rectangle &rRect, sal_Bool bHighlight = sal_False, sal_Bool bHasOpenPopup = sal_False ); + static SAL_DLLPRIVATE void ImplErase( ToolBox* pThis, const Rectangle &rRect, bool bHighlight = false, bool bHasOpenPopup = false ); static SAL_DLLPRIVATE void ImplDrawBorder( ToolBox* pWin ); static SAL_DLLPRIVATE const ImplToolItem *ImplGetFirstClippedItem( const ToolBox* pThis ); static SAL_DLLPRIVATE Size ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uInt16 nCalcMode = 0 ); @@ -277,7 +277,7 @@ public: static SAL_DLLPRIVATE void ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode ); static SAL_DLLPRIVATE sal_uInt16 ImplFindItemPos( ToolBox* pBox, const Point& rPos ); static SAL_DLLPRIVATE sal_uInt16 ImplFindItemPos( const ImplToolItem* pItem, const std::vector< ImplToolItem >& rList ); - static SAL_DLLPRIVATE void ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ); + static SAL_DLLPRIVATE void ImplDrawMenubutton( ToolBox *pThis, bool bHighlight ); static SAL_DLLPRIVATE sal_uInt16 ImplCountLineBreaks( const ToolBox *pThis ); SAL_DLLPRIVATE ImplToolBoxPrivateData* ImplGetToolBoxPrivateData() const { return mpData; } @@ -315,10 +315,10 @@ public: virtual void LoseFocus(); virtual void KeyInput( const KeyEvent& rKEvt ); - virtual sal_Bool PrepareToggleFloatingMode(); + virtual bool PrepareToggleFloatingMode(); virtual void ToggleFloatingMode(); virtual void StartDocking(); - virtual sal_Bool Docking( const Point& rPos, Rectangle& rRect ); + virtual bool Docking( const Point& rPos, Rectangle& rRect ); virtual void EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ); virtual void Resizing( Size& rSize ); virtual Size GetOptimalSize() const; @@ -365,15 +365,15 @@ public: void SetAlign( WindowAlign eNewAlign = WINDOWALIGN_TOP ); WindowAlign GetAlign() const { return meAlign; } - sal_Bool IsHorizontal() const { return mbHorz; } + bool IsHorizontal() const { return mbHorz; } void SetLineCount( sal_uInt16 nNewLines ); sal_uInt16 GetLineCount() const { return mnLines; } sal_uInt16 GetCurLine() const { return mnCurLine; } - void ShowLine( sal_Bool bNext ); + void ShowLine( bool bNext ); // Used to enable/disable scrolling one page at a time for toolbar - void SetPageScroll( sal_Bool b ); + void SetPageScroll( bool b ); sal_uInt16 GetItemCount() const; ToolBoxItemType GetItemType( sal_uInt16 nPos ) const; @@ -410,7 +410,7 @@ public: void SetItemImage( sal_uInt16 nItemId, const Image& rImage ); Image GetItemImage( sal_uInt16 nItemId ) const; void SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ); - void SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ); + void SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ); void SetItemText( sal_uInt16 nItemId, const OUString& rText ); const OUString& GetItemText( sal_uInt16 nItemId ) const; void SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ); @@ -420,18 +420,18 @@ public: void StartSelection(); void EndSelection(); - void SetItemDown( sal_uInt16 nItemId, sal_Bool bDown, sal_Bool bRelease = sal_True ); + void SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease = true ); void SetItemState( sal_uInt16 nItemId, TriState eState ); TriState GetItemState( sal_uInt16 nItemId ) const; - void CheckItem( sal_uInt16 nItemId, sal_Bool bCheck = sal_True ); - sal_Bool IsItemChecked( sal_uInt16 nItemId ) const; + void CheckItem( sal_uInt16 nItemId, bool bCheck = true ); + bool IsItemChecked( sal_uInt16 nItemId ) const; void EnableItem( sal_uInt16 nItemId, bool bEnable = true ); - sal_Bool IsItemEnabled( sal_uInt16 nItemId ) const; + bool IsItemEnabled( sal_uInt16 nItemId ) const; - void TriggerItem( sal_uInt16 nItemId, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False ); + void TriggerItem( sal_uInt16 nItemId, bool bShift = false, bool bCtrl = false ); /// Shows or hides items. void ShowItem(sal_uInt16 nItemId, bool bVisible = true); @@ -443,8 +443,8 @@ public: /// Overload to provide HideItem via command id. void HideItem(const OUString& rCommand) { ShowItem(rCommand, false); } - sal_Bool IsItemVisible( sal_uInt16 nItemId ) const; - sal_Bool IsItemReallyVisible( sal_uInt16 nItemId ) const; + bool IsItemVisible( sal_uInt16 nItemId ) const; + bool IsItemReallyVisible( sal_uInt16 nItemId ) const; void SetItemCommand( sal_uInt16 nItemId, const OUString& rCommand ); const OUString GetItemCommand( sal_uInt16 nItemId ) const; @@ -485,20 +485,20 @@ public: WinBits GetStyle() const { return mnWinStyle; } // enable/disable undocking - void Lock( sal_Bool bLock = sal_True ); + void Lock( bool bLock = true ); // read configuration to determine locking behaviour - static sal_Bool AlwaysLocked(); + static bool AlwaysLocked(); void EnableMenuStrings( bool bEnable = true ) { mbMenuStrings = bEnable; } - sal_Bool IsMenuStringsEnabled() const { return mbMenuStrings; } + bool IsMenuStringsEnabled() const { return mbMenuStrings; } void SetOutStyle( sal_uInt16 nNewStyle ); sal_uInt16 GetOutStyle() const { return mnOutStyle; } void EnableCustomize( bool bEnable = true ); - sal_Bool IsCustomize() { return mbCustomize; } - sal_Bool IsInCustomizeMode() const { return mbCustomizeMode; } + bool IsCustomize() { return mbCustomize; } + bool IsInCustomizeMode() const { return mbCustomizeMode; } void SetHelpText( const OUString& rText ) { DockingWindow::SetHelpText( rText ); } @@ -540,7 +540,7 @@ public: // when the menu button was clicked and before the menu is executed void SetMenuType( sal_uInt16 aType = TOOLBOX_MENUTYPE_CUSTOMIZE ); sal_uInt16 GetMenuType() const; - sal_Bool IsMenuEnabled() const; + bool IsMenuEnabled() const; PopupMenu* GetMenu() const; void UpdateCustomMenu(); void SetMenuButtonHdl( const Link& rLink ); @@ -551,11 +551,11 @@ public: // allow Click Handler to detect special key bool IsShift() const { return mbIsShift; } // allow Click Handler to distinguish between mouse and key input - sal_Bool IsKeyEvent() const { return mbIsKeyEvent; } + bool IsKeyEvent() const { return mbIsKeyEvent; } // allows framework to set/query the planned popupmode - sal_Bool WillUsePopupMode() const; - void WillUsePopupMode( sal_Bool b); + bool WillUsePopupMode() const; + void WillUsePopupMode( bool b); // accessibility helpers @@ -577,12 +577,12 @@ public: void SetToolbarLayoutMode( ToolBoxLayoutMode eLayout ); }; -inline void ToolBox::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) +inline void ToolBox::CheckItem( sal_uInt16 nItemId, bool bCheck ) { SetItemState( nItemId, (bCheck) ? STATE_CHECK : STATE_NOCHECK ); } -inline sal_Bool ToolBox::IsItemChecked( sal_uInt16 nItemId ) const +inline bool ToolBox::IsItemChecked( sal_uInt16 nItemId ) const { return (GetItemState( nItemId ) == STATE_CHECK); } diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx index e2bf0ec9c1f7..be0d3bd0024e 100644 --- a/include/vcl/txtattr.hxx +++ b/include/vcl/txtattr.hxx @@ -169,9 +169,9 @@ public: inline void Expand( sal_uInt16 nDiff ); inline void Collaps( sal_uInt16 nDiff ); - inline sal_Bool IsIn( sal_uInt16 nIndex ); - inline sal_Bool IsInside( sal_uInt16 nIndex ); - inline sal_Bool IsEmpty(); + inline bool IsIn( sal_uInt16 nIndex ); + inline bool IsInside( sal_uInt16 nIndex ); + inline bool IsEmpty(); }; @@ -207,17 +207,17 @@ inline void TextCharAttrib::Collaps( sal_uInt16 nDiff ) mnEnd = mnEnd - nDiff; } -inline sal_Bool TextCharAttrib::IsIn( sal_uInt16 nIndex ) +inline bool TextCharAttrib::IsIn( sal_uInt16 nIndex ) { return ( ( mnStart <= nIndex ) && ( mnEnd >= nIndex ) ); } -inline sal_Bool TextCharAttrib::IsInside( sal_uInt16 nIndex ) +inline bool TextCharAttrib::IsInside( sal_uInt16 nIndex ) { return ( ( mnStart < nIndex ) && ( mnEnd > nIndex ) ); } -inline sal_Bool TextCharAttrib::IsEmpty() +inline bool TextCharAttrib::IsEmpty() { return mnStart == mnEnd; } diff --git a/include/vcl/unohelp.hxx b/include/vcl/unohelp.hxx index ab23d9477cba..3368856e651f 100644 --- a/include/vcl/unohelp.hxx +++ b/include/vcl/unohelp.hxx @@ -52,7 +52,7 @@ namespace unohelper { VCL_DLLPUBLIC ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XBreakIterator > CreateBreakIterator(); VCL_DLLPUBLIC ::com::sun::star::uno::Reference < ::com::sun::star::i18n::XCharacterClassification> CreateCharacterClassification(); -VCL_DLLPUBLIC OUString CreateLibraryName( const sal_Char* pModName, sal_Bool bSUPD ); +VCL_DLLPUBLIC OUString CreateLibraryName( const sal_Char* pModName, bool bSUPD ); VCL_DLLPUBLIC void NotifyAccessibleStateEventGlobally( const ::com::sun::star::accessibility::AccessibleEventObject& rEventObject ); }} // namespace vcl::unohelper diff --git a/include/vcl/vclevent.hxx b/include/vcl/vclevent.hxx index a4f4e29b0868..55ea3304b562 100644 --- a/include/vcl/vclevent.hxx +++ b/include/vcl/vclevent.hxx @@ -263,7 +263,7 @@ public: // stops notifying when any handler has processed the event // and returns sal_True in that case // a handler must return sal_True to signal that it has processed the event - sal_Bool Process( VclSimpleEvent* pEvent ) const; + bool Process( VclSimpleEvent* pEvent ) const; void addListener( const Link& rListener ); void removeListener( const Link& rListener ); private: diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx index 097d9e862680..b0bbf97000b5 100644 --- a/include/vcl/vclmedit.hxx +++ b/include/vcl/vclmedit.hxx @@ -50,7 +50,7 @@ protected: virtual bool PreNotify( NotifyEvent& rNEvt ); virtual bool Notify( NotifyEvent& rNEvt ); using Control::ImplInitSettings; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); WinBits ImplInitStyle( WinBits nStyle ); ExtTextEngine* GetTextEngine() const; @@ -76,9 +76,9 @@ public: virtual void DisableUpdateData() { delete pUpdateDataTimer; pUpdateDataTimer = NULL; } virtual void SetReadOnly( sal_Bool bReadOnly = sal_True ); - virtual sal_Bool IsReadOnly() const; + virtual bool IsReadOnly() const; - void EnableFocusSelectionHide( sal_Bool bHide ); + void EnableFocusSelectionHide( bool bHide ); virtual void SetMaxTextLen(sal_Int32 nMaxLen = 0); virtual sal_Int32 GetMaxTextLen() const; @@ -104,8 +104,8 @@ public: OUString GetText( LineEnd aSeparator ) const; OUString GetTextLines( LineEnd aSeparator ) const; - void SetRightToLeft( sal_Bool bRightToLeft ); - sal_Bool IsRightToLeft() const; + void SetRightToLeft( bool bRightToLeft ); + bool IsRightToLeft() const; void SaveValue() { aSaveValue = GetText(); } const OUString& GetSavedValue() const { return aSaveValue; } @@ -130,7 +130,7 @@ public: void DisableSelectionOnFocus(); void SetTextSelectable( bool bTextSelectable ); - void EnableCursor( sal_Bool bEnable ); + void EnableCursor( bool bEnable ); virtual bool set_property(const OString &rKey, const OString &rValue); }; diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx index d668bcb01d23..3450509c96d8 100644 --- a/include/vcl/virdev.hxx +++ b/include/vcl/virdev.hxx @@ -37,13 +37,13 @@ private: VirtualDevice* mpPrev; VirtualDevice* mpNext; sal_uInt16 mnBitCount; - sal_Bool mbScreenComp; + bool mbScreenComp; sal_Int8 mnAlphaDepth; sal_uInt8 meRefDevMode; SAL_DLLPRIVATE void ImplInitVirDev( const OutputDevice* pOutDev, long nDX, long nDY, sal_uInt16 nBitCount, const SystemGraphicsData *pData = NULL ); - SAL_DLLPRIVATE sal_Bool InnerImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase, const basebmp::RawMemorySharedArray &pBuffer ); - SAL_DLLPRIVATE sal_Bool ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase, const basebmp::RawMemorySharedArray &pBuffer ); + SAL_DLLPRIVATE bool InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, const basebmp::RawMemorySharedArray &pBuffer ); + SAL_DLLPRIVATE bool ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, const basebmp::RawMemorySharedArray &pBuffer ); // Copy assignment is forbidden and not implemented. VirtualDevice (const VirtualDevice &); @@ -108,9 +108,9 @@ public: virtual ~VirtualDevice(); - sal_Bool SetOutputSizePixel( const Size& rNewSize, sal_Bool bErase = sal_True ); - sal_Bool SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer ); - sal_Bool SetOutputSize( const Size& rNewSize, sal_Bool bErase = sal_True ) + bool SetOutputSizePixel( const Size& rNewSize, bool bErase = true ); + bool SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer ); + bool SetOutputSize( const Size& rNewSize, bool bErase = true ) { return SetOutputSizePixel( LogicToPixel( rNewSize ), bErase ); } // reference device modes for different compatibility levels diff --git a/include/vcl/wall.hxx b/include/vcl/wall.hxx index 4f4113f8a444..cc4a8366ba27 100644 --- a/include/vcl/wall.hxx +++ b/include/vcl/wall.hxx @@ -72,7 +72,7 @@ class VCL_DLLPUBLIC Wallpaper private: ImplWallpaper* mpImplWallpaper; - SAL_DLLPRIVATE void ImplMakeUnique( sal_Bool bReleaseCache = sal_True ); + SAL_DLLPRIVATE void ImplMakeUnique( bool bReleaseCache = true ); SAL_DLLPRIVATE Gradient ImplGetApplicationGradient() const; public: @@ -95,24 +95,24 @@ public: void SetBitmap( const BitmapEx& rBitmap ); BitmapEx GetBitmap() const; - sal_Bool IsBitmap() const; + bool IsBitmap() const; void SetGradient( const Gradient& rGradient ); Gradient GetGradient() const; - sal_Bool IsGradient() const; + bool IsGradient() const; void SetRect( const Rectangle& rRect ); Rectangle GetRect() const; - sal_Bool IsRect() const; + bool IsRect() const; - sal_Bool IsFixed() const; - sal_Bool IsScrollable() const; + bool IsFixed() const; + bool IsScrollable() const; Wallpaper& operator=( const Wallpaper& rWallpaper ); - sal_Bool operator==( const Wallpaper& rWallpaper ) const; - sal_Bool operator!=( const Wallpaper& rWallpaper ) const + bool operator==( const Wallpaper& rWallpaper ) const; + bool operator!=( const Wallpaper& rWallpaper ) const { return !(Wallpaper::operator==( rWallpaper )); } - sal_Bool IsSameInstance( const Wallpaper& rWallpaper ) const + bool IsSameInstance( const Wallpaper& rWallpaper ) const { return (mpImplWallpaper == rWallpaper.mpImplWallpaper); } friend VCL_DLLPUBLIC SvStream& ReadWallpaper( SvStream& rIStm, Wallpaper& rWallpaper ); diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx index 51cd179760ef..ac4154cc57e4 100644 --- a/include/vcl/window.hxx +++ b/include/vcl/window.hxx @@ -379,7 +379,7 @@ public: SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId ); SAL_DLLPRIVATE void ImplSetFrameParent( const Window* pParent ); SAL_DLLPRIVATE void ImplInsertWindow( Window* pParent ); - SAL_DLLPRIVATE void ImplRemoveWindow( sal_Bool bRemoveFrameData ); + SAL_DLLPRIVATE void ImplRemoveWindow( bool bRemoveFrameData ); SAL_DLLPRIVATE Window* ImplGetWindow(); SAL_DLLPRIVATE ImplFrameData* ImplGetFrameData(); SalFrame* ImplGetFrame() const; @@ -394,15 +394,15 @@ public: SAL_DLLPRIVATE Window* ImplGetFirstOverlapWindow(); SAL_DLLPRIVATE const Window* ImplGetFirstOverlapWindow() const; SAL_DLLPRIVATE Window* ImplGetFrameWindow() const; - SAL_DLLPRIVATE sal_Bool ImplIsRealParentPath( const Window* pWindow ) const; - SAL_DLLPRIVATE sal_Bool ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; - SAL_DLLPRIVATE sal_Bool ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; - SAL_DLLPRIVATE sal_Bool ImplIsDockingWindow() const; - SAL_DLLPRIVATE sal_Bool ImplIsFloatingWindow() const; - SAL_DLLPRIVATE sal_Bool ImplIsSplitter() const; - SAL_DLLPRIVATE sal_Bool ImplIsPushButton() const; - SAL_DLLPRIVATE sal_Bool ImplIsOverlapWindow() const; - SAL_DLLPRIVATE void ImplSetMouseTransparent( sal_Bool bTransparent ); + SAL_DLLPRIVATE bool ImplIsRealParentPath( const Window* pWindow ) const; + SAL_DLLPRIVATE bool ImplIsChild( const Window* pWindow, bool bSystemWindow = false ) const; + SAL_DLLPRIVATE bool ImplIsWindowOrChild( const Window* pWindow, bool bSystemWindow = false ) const; + SAL_DLLPRIVATE bool ImplIsDockingWindow() const; + SAL_DLLPRIVATE bool ImplIsFloatingWindow() const; + SAL_DLLPRIVATE bool ImplIsSplitter() const; + SAL_DLLPRIVATE bool ImplIsPushButton() const; + SAL_DLLPRIVATE bool ImplIsOverlapWindow() const; + SAL_DLLPRIVATE void ImplSetMouseTransparent( bool bTransparent ); SAL_DLLPRIVATE int ImplTestMousePointerSet(); SAL_DLLPRIVATE PointerStyle ImplGetMousePointer() const; SAL_DLLPRIVATE void ImplResetReallyVisible(); @@ -415,20 +415,20 @@ public: SAL_DLLPRIVATE void ImplLogicToPoint( Font& rFont ) const; SAL_DLLPRIVATE Point ImplOutputToFrame( const Point& rPos ); SAL_DLLPRIVATE Point ImplFrameToOutput( const Point& rPos ); - SAL_DLLPRIVATE sal_Bool ImplSysObjClip( const Region* pOldRegion ); + SAL_DLLPRIVATE bool ImplSysObjClip( const Region* pOldRegion ); SAL_DLLPRIVATE void ImplUpdateSysObjChildrenClip(); SAL_DLLPRIVATE void ImplUpdateSysObjOverlapsClip(); SAL_DLLPRIVATE void ImplUpdateSysObjClip(); - SAL_DLLPRIVATE sal_Bool ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller = sal_False ); - SAL_DLLPRIVATE sal_Bool ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller = sal_False ); - SAL_DLLPRIVATE sal_Bool ImplSetClipFlag( sal_Bool bSysObjOnlySmaller = sal_False ); + SAL_DLLPRIVATE bool ImplSetClipFlagChildren( bool bSysObjOnlySmaller = false ); + SAL_DLLPRIVATE bool ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller = false ); + SAL_DLLPRIVATE bool ImplSetClipFlag( bool bSysObjOnlySmaller = false ); SAL_DLLPRIVATE void ImplIntersectWindowClipRegion( Region& rRegion ); SAL_DLLPRIVATE void ImplIntersectWindowRegion( Region& rRegion ); SAL_DLLPRIVATE void ImplExcludeWindowRegion( Region& rRegion ); SAL_DLLPRIVATE void ImplExcludeOverlapWindows( Region& rRegion ); SAL_DLLPRIVATE void ImplExcludeOverlapWindows2( Region& rRegion ); - SAL_DLLPRIVATE void ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps ); - SAL_DLLPRIVATE sal_Bool ImplClipChildren( Region& rRegion ); + SAL_DLLPRIVATE void ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ); + SAL_DLLPRIVATE bool ImplClipChildren( Region& rRegion ); SAL_DLLPRIVATE void ImplClipAllChildren( Region& rRegion ); SAL_DLLPRIVATE void ImplClipSiblings( Region& rRegion ); SAL_DLLPRIVATE void ImplInitWinClipRegion(); @@ -438,7 +438,7 @@ public: SAL_DLLPRIVATE void ImplIntersectAndUnionOverlapWindows2( const Region& rInterRegion, Region& rRegion ); SAL_DLLPRIVATE void ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& rRegion ); SAL_DLLPRIVATE void ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, - sal_Bool bChildren, sal_Bool bParent, sal_Bool bSiblings ); + bool bChildren, bool bParent, bool bSiblings ); SAL_DLLPRIVATE void ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ); SAL_DLLPRIVATE void ImplCallOverlapPaint(); SAL_DLLPRIVATE void ImplPostPaint(); @@ -448,14 +448,14 @@ public: SAL_DLLPRIVATE void ImplInvalidate( const Region* rRegion, sal_uInt16 nFlags ); SAL_DLLPRIVATE void ImplValidateFrameRegion( const Region* rRegion, sal_uInt16 nFlags ); SAL_DLLPRIVATE void ImplValidate( const Region* rRegion, sal_uInt16 nFlags ); - SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_Bool bChildren ); - SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_Bool bChildren ); + SAL_DLLPRIVATE void ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ); + SAL_DLLPRIVATE void ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, bool bChildren ); SAL_DLLPRIVATE void ImplScroll( const Rectangle& rRect, long nHorzScroll, long nVertScroll, sal_uInt16 nFlags ); - SAL_DLLPRIVATE void ImplUpdateAll( sal_Bool bOverlapWindows = sal_True ); + SAL_DLLPRIVATE void ImplUpdateAll( bool bOverlapWindows = true ); SAL_DLLPRIVATE void ImplUpdateWindowPtr( Window* pWindow ); SAL_DLLPRIVATE void ImplUpdateWindowPtr(); - SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ); - SAL_DLLPRIVATE sal_Bool ImplUpdatePos(); + SAL_DLLPRIVATE void ImplUpdateOverlapWindowPtr( bool bNewFrame ); + SAL_DLLPRIVATE bool ImplUpdatePos(); SAL_DLLPRIVATE void ImplUpdateSysObjPos(); SAL_DLLPRIVATE WindowImpl* ImplGetWindowImpl() const { return mpWindowImpl; } @@ -473,34 +473,34 @@ public: False if the font is unsuitable as UI font */ SAL_DLLPRIVATE bool ImplCheckUIFont( const Font& rFont ); - SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl = sal_True ); + SAL_DLLPRIVATE void ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl = true ); SAL_DLLPRIVATE void ImplAlignChildren(); SAL_DLLPRIVATE void ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ); SAL_DLLPRIVATE void ImplToBottomChild(); SAL_DLLPRIVATE void ImplCalcToTop( ImplCalcToTopData* pPrevData ); SAL_DLLPRIVATE void ImplToTop( sal_uInt16 nFlags ); SAL_DLLPRIVATE void ImplStartToTop( sal_uInt16 nFlags ); - SAL_DLLPRIVATE void ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ); + SAL_DLLPRIVATE void ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible ); SAL_DLLPRIVATE void ImplShowAllOverlaps(); SAL_DLLPRIVATE void ImplHideAllOverlaps(); SAL_DLLPRIVATE void ImplNotifyKeyMouseCommandEventListeners( NotifyEvent& rNEvt ); - SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged = sal_False ); + SAL_DLLPRIVATE void ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged = false ); SAL_DLLPRIVATE void ImplGenerateMouseMove(); SAL_DLLPRIVATE void ImplGrabFocus( sal_uInt16 nFlags ); SAL_DLLPRIVATE void ImplGrabFocusToDocument( sal_uInt16 nFlags ); SAL_DLLPRIVATE void ImplInvertFocus( const Rectangle& rRect ); SAL_DLLPRIVATE void ImplControlFocus( sal_uInt16 nFlags = 0 ); SAL_DLLPRIVATE Window* ImplGetDlgWindow( sal_uInt16 n, sal_uInt16 nType, sal_uInt16 nStart = 0, sal_uInt16 nEnd = 0xFFFF, sal_uInt16* pIndex = NULL ); - SAL_DLLPRIVATE sal_Bool ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ); - SAL_DLLPRIVATE sal_Bool ImplHasDlgCtrl(); + SAL_DLLPRIVATE bool ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ); + SAL_DLLPRIVATE bool ImplHasDlgCtrl(); SAL_DLLPRIVATE void ImplDlgCtrlNextWindow(); - SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus ); + SAL_DLLPRIVATE void ImplDlgCtrlFocusChanged( Window* pWindow, bool bGetFocus ); SAL_DLLPRIVATE Window* ImplFindDlgCtrlWindow( Window* pWindow ); SAL_DLLPRIVATE long ImplLogicUnitToPixelX( long nX, MapUnit eUnit ); SAL_DLLPRIVATE long ImplLogicUnitToPixelY( long nY, MapUnit eUnit ); - SAL_DLLPRIVATE sal_Bool ImplIsWindowInFront( const Window* pTestWindow ) const; + SAL_DLLPRIVATE bool ImplIsWindowInFront( const Window* pTestWindow ) const; SAL_DLLPRIVATE void ImplSaveOverlapBackground(); - SAL_DLLPRIVATE sal_Bool ImplRestoreOverlapBackground( Region& rInvRegion ); + SAL_DLLPRIVATE bool ImplRestoreOverlapBackground( Region& rInvRegion ); SAL_DLLPRIVATE void ImplDeleteOverlapBackground(); SAL_DLLPRIVATE void ImplInvalidateAllOverlapBackgrounds(); SAL_DLLPRIVATE static void ImplNewInputContext(); @@ -515,11 +515,11 @@ public: SAL_DLLPRIVATE static void ImplCalcSymbolRect( Rectangle& rRect ); SAL_DLLPRIVATE void ImplHandleScroll( ScrollBar* pHScrl, long nX, ScrollBar* pVScrl, long nY ); - SAL_DLLPRIVATE sal_Bool ImplIsAccessibleCandidate() const; - SAL_DLLPRIVATE sal_Bool ImplIsAccessibleNativeFrame() const; + SAL_DLLPRIVATE bool ImplIsAccessibleCandidate() const; + SAL_DLLPRIVATE bool ImplIsAccessibleNativeFrame() const; SAL_DLLPRIVATE sal_uInt16 ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const; - SAL_DLLPRIVATE Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel = sal_True ) const; - SAL_DLLPRIVATE sal_Bool ImplRegisterAccessibleNativeFrame(); + SAL_DLLPRIVATE Window* ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel = true ) const; + SAL_DLLPRIVATE bool ImplRegisterAccessibleNativeFrame(); SAL_DLLPRIVATE void ImplRevokeAccessibleNativeFrame(); SAL_DLLPRIVATE void ImplCallResize(); SAL_DLLPRIVATE void ImplCallMove(); @@ -533,15 +533,15 @@ public: SAL_DLLPRIVATE ::std::vector<Window *>& ImplGetOwnerDrawList(); SAL_DLLPRIVATE Window* ImplGetTopmostFrameWindow(); - SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const; - SAL_DLLPRIVATE void ImplNotifyIconifiedState( sal_Bool bIconified ); + SAL_DLLPRIVATE Rectangle ImplGetWindowExtentsRelative( Window *pRelativeWindow, bool bClientOnly ) const; + SAL_DLLPRIVATE void ImplNotifyIconifiedState( bool bIconified ); SAL_DLLPRIVATE bool ImplStopDnd(); SAL_DLLPRIVATE void ImplStartDnd(); SAL_DLLPRIVATE static void ImplInitAppFontData( Window* pWindow ); SAL_DLLPRIVATE void ImplPaintToDevice( OutputDevice* pTargetOutDev, const Point& rPos ); - SAL_DLLPRIVATE void ImplIsInTaskPaneList( sal_Bool mbIsInTaskList ); + SAL_DLLPRIVATE void ImplIsInTaskPaneList( bool mbIsInTaskList ); SAL_DLLPRIVATE ::com::sun::star::uno::Reference< ::com::sun::star::rendering::XCanvas > ImplGetCanvas( const Size& rFullscreenSize, bool bFullscreen, bool bSpriteCanvas ) const; @@ -557,7 +557,7 @@ protected: // Single argument ctors shall be explicit. explicit Window( WindowType nType ); - void SetCompoundControl( sal_Bool bCompound ); + void SetCompoundControl( bool bCompound ); void ImplCallEventListeners( sal_uLong nEvent, void* pData = NULL ); void CallEventListeners( sal_uLong nEvent, void* pData = NULL ); @@ -621,12 +621,12 @@ public: /*virtual*/ void RemoveChildEventListener( const Link& rEventListener ); sal_uLong PostUserEvent( const Link& rLink, void* pCaller = NULL ); - sal_Bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL ); + bool PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller = NULL ); void RemoveUserEvent( sal_uLong nUserEvent ); void IncrementLockCount(); void DecrementLockCount(); - sal_Bool IsLocked( sal_Bool bChildren = sal_False ) const; + bool IsLocked( bool bChildren = false ) const; // returns the input language used for the last key stroke // may be LANGUAGE_DONTKNOW if not supported by the OS @@ -639,14 +639,14 @@ public: WinBits GetExtendedStyle() const; void SetType( WindowType nType ); WindowType GetType() const; - sal_Bool IsSystemWindow() const; - sal_Bool IsDialog() const; - sal_Bool IsMenuFloatingWindow() const; - sal_Bool IsToolbarFloatingWindow() const; - sal_Bool IsTopWindow() const; + bool IsSystemWindow() const; + bool IsDialog() const; + bool IsMenuFloatingWindow() const; + bool IsToolbarFloatingWindow() const; + bool IsTopWindow() const; SystemWindow* GetSystemWindow() const; - void EnableAllResize( sal_Bool bEnable = sal_True ); + void EnableAllResize( bool bEnable = true ); void SetBorderStyle( sal_uInt16 nBorderStyle ); sal_uInt16 GetBorderStyle() const; @@ -656,17 +656,17 @@ public: Size CalcOutputSize( const Size& rWinSz ) const; long CalcTitleWidth() const; - void EnableClipSiblings( sal_Bool bClipSiblings = sal_True ); + void EnableClipSiblings( bool bClipSiblings = true ); - void EnableChildTransparentMode( sal_Bool bEnable = sal_True ); - sal_Bool IsChildTransparentModeEnabled() const; + void EnableChildTransparentMode( bool bEnable = true ); + bool IsChildTransparentModeEnabled() const; - void SetMouseTransparent( sal_Bool bTransparent ); - sal_Bool IsMouseTransparent() const; - void SetPaintTransparent( sal_Bool bTransparent ); - sal_Bool IsPaintTransparent() const; - void SetDialogControlStart( sal_Bool bStart ); - sal_Bool IsDialogControlStart() const; + void SetMouseTransparent( bool bTransparent ); + bool IsMouseTransparent() const; + void SetPaintTransparent( bool bTransparent ); + bool IsPaintTransparent() const; + void SetDialogControlStart( bool bStart ); + bool IsDialogControlStart() const; void SetDialogControlFlags( sal_uInt16 nFlags ); sal_uInt16 GetDialogControlFlags() const; @@ -676,7 +676,7 @@ public: Point maPos; // mouse position in output coordinates }; PointerState GetPointerState(); - sal_Bool IsMouseOver(); + bool IsMouseOver(); sal_uLong GetCurrentModButtons(); @@ -687,12 +687,12 @@ public: const Rectangle* GetCursorRect() const; long GetCursorExtTextInputWidth() const; - void SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, sal_Bool bVertical = sal_False ); + void SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical = false ); using OutputDevice::SetSettings; virtual void SetSettings( const AllSettings& rSettings ); virtual void SetSettings( const AllSettings& rSettings, sal_Bool bChild ); - void UpdateSettings( const AllSettings& rSettings, sal_Bool bChild = sal_False ); + void UpdateSettings( const AllSettings& rSettings, bool bChild = false ); void NotifyAllChildren( DataChangedEvent& rDCEvt ); void SetPointFont( const Font& rFont ); @@ -704,15 +704,15 @@ public: void SetControlFont(); void SetControlFont( const Font& rFont ); Font GetControlFont() const; - sal_Bool IsControlFont() const; + bool IsControlFont() const; void SetControlForeground(); void SetControlForeground( const Color& rColor ); Color GetControlForeground() const; - sal_Bool IsControlForeground() const; + bool IsControlForeground() const; void SetControlBackground(); void SetControlBackground( const Color& rColor ); Color GetControlBackground() const; - sal_Bool IsControlBackground() const; + bool IsControlBackground() const; void SetParentClipMode( sal_uInt16 nMode = 0 ); sal_uInt16 GetParentClipMode() const; @@ -720,10 +720,10 @@ public: void SetWindowRegionPixel(); void SetWindowRegionPixel( const Region& rRegion ); const Region& GetWindowRegionPixel() const; - sal_Bool IsWindowRegionPixel() const; + bool IsWindowRegionPixel() const; Region GetWindowClipRegionPixel( sal_uInt16 nFlags = 0 ) const; Region GetPaintRegion() const; - sal_Bool IsInPaint() const; + bool IsInPaint() const; // while IsInPaint returns true ExpandPaintClipRegion adds the // submitted region to the paint clip region so you can // paint additional parts of your window if necessary @@ -736,19 +736,19 @@ public: void Show( bool bVisible = true, sal_uInt16 nFlags = 0 ); void Hide() { Show( false ); } - sal_Bool IsVisible() const; - sal_Bool IsReallyVisible() const; - sal_Bool IsReallyShown() const; - sal_Bool IsInInitShow() const; + bool IsVisible() const; + bool IsReallyVisible() const; + bool IsReallyShown() const; + bool IsInInitShow() const; void Enable( bool bEnable = true, bool bChild = true ); void Disable( bool bChild = true ) { Enable( false, bChild ); } - sal_Bool IsEnabled() const; + bool IsEnabled() const; - void EnableInput( bool bEnable = true, sal_Bool bChild = sal_True ); - void EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, + void EnableInput( bool bEnable = true, bool bChild = true ); + void EnableInput( bool bEnable, bool bChild, bool bSysWin, const Window* pExcludeWindow = NULL ); - sal_Bool IsInputEnabled() const; + bool IsInputEnabled() const; /** Override <code>EnableInput</code>. This can be necessary due to other people using EnableInput for whole window hierarchies. @@ -762,12 +762,12 @@ public: @param bChild if true children are recursively set to AlwaysEnableInput */ - void AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild = sal_True ); + void AlwaysEnableInput( bool bAlways, bool bChild = true ); /** returns the current AlwaysEnableInput state @return true if window is in AlwaysEnableInput state */ - sal_Bool IsAlwaysEnableInput() const; + bool IsAlwaysEnableInput() const; /** Override <code>EnableInput</code>, counterpart to AlwaysEnableInput. Windows with AlwaysDisableInput will not get key events even if enabled and input enabled.This can be necessary due to other people using EnableInput @@ -782,7 +782,7 @@ public: @param bChild if true children are recursively set to AlwaysDisableInput */ - void AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild = sal_True ); + void AlwaysDisableInput( bool bAlways, bool bChild = true ); /** usually event handlers (see AddEventListener and AddChildEventListener) are not called on disabled, modal or input disabled windows. There are however rare cases @@ -811,7 +811,7 @@ public: @returns sal_True if a child or subchild is a running modal window */ - sal_Bool IsInModalMode() const; + bool IsInModalMode() const; /** * Necessary for calc ref input handling from modal dialogs @@ -823,8 +823,8 @@ public: void ToTop( sal_uInt16 nFlags = 0 ); void SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ); - void EnableAlwaysOnTop( sal_Bool bEnable = sal_True ); - sal_Bool IsAlwaysOnTopEnabled() const; + void EnableAlwaysOnTop( bool bEnable = true ); + bool IsAlwaysOnTopEnabled() const; virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, @@ -836,8 +836,8 @@ public: virtual void SetPosSizePixel( const Point& rNewPos, const Size& rNewSize ); virtual void SetOutputSizePixel( const Size& rNewSize ); - sal_Bool IsDefaultPos() const; - sal_Bool IsDefaultSize() const; + bool IsDefaultPos() const; + bool IsDefaultSize() const; // those conversion routines might deliver different results during UI mirroring Point OutputToScreenPixel( const Point& rPos ) const; @@ -853,7 +853,7 @@ public: // window extents of the client window, coordinates to be used in SetPosPixel Rectangle GetClientWindowExtentsRelative( Window *pRelativeWindow ) const; - virtual sal_Bool IsScrollable() const; + virtual bool IsScrollable() const; virtual void Scroll( long nHorzScroll, long nVertScroll, sal_uInt16 nFlags = 0 ); virtual void Scroll( long nHorzScroll, long nVertScroll, @@ -862,27 +862,27 @@ public: virtual void Invalidate( const Rectangle& rRect, sal_uInt16 nFlags = 0 ); virtual void Invalidate( const Region& rRegion, sal_uInt16 nFlags = 0 ); void Validate( sal_uInt16 nFlags = 0 ); - sal_Bool HasPaintEvent() const; + bool HasPaintEvent() const; void Update(); void Flush(); void Sync(); // toggles new docking support, enabled via toolkit - void EnableDocking( sal_Bool bEnable = sal_True ); + void EnableDocking( bool bEnable = true ); // retrieves the single dockingmanager instance static DockingManager* GetDockingManager(); - void EnablePaint( sal_Bool bEnable ); - sal_Bool IsPaintEnabled() const; - void SetUpdateMode( sal_Bool bUpdate ); - sal_Bool IsUpdateMode() const; - void SetParentUpdateMode( sal_Bool bUpdate ); + void EnablePaint( bool bEnable ); + bool IsPaintEnabled() const; + void SetUpdateMode( bool bUpdate ); + bool IsUpdateMode() const; + void SetParentUpdateMode( bool bUpdate ); void GrabFocus(); - sal_Bool HasFocus() const; - sal_Bool HasChildPathFocus( sal_Bool bSystemWindow = sal_False ) const; - sal_Bool IsActive() const; - sal_Bool HasActiveChildFrame(); + bool HasFocus() const; + bool HasChildPathFocus( bool bSystemWindow = false ) const; + bool IsActive() const; + bool HasActiveChildFrame(); sal_uInt16 GetGetFocusFlags() const; void GrabFocusToDocument(); @@ -893,14 +893,14 @@ public: */ void SetFakeFocus( bool bFocus ); - sal_Bool IsCompoundControl() const; + bool IsCompoundControl() const; static sal_uIntPtr SaveFocus(); - static sal_Bool EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore = sal_True ); + static bool EndSaveFocus( sal_uIntPtr nSaveId, bool bRestore = true ); void CaptureMouse(); void ReleaseMouse(); - sal_Bool IsMouseCaptured() const; + bool IsMouseCaptured() const; void SetPointer( const Pointer& rPointer ); const Pointer& GetPointer() const; @@ -908,17 +908,17 @@ public: void SetPointerPosPixel( const Point& rPos ); Point GetPointerPosPixel(); Point GetLastPointerPosPixel(); - void ShowPointer( sal_Bool bVisible ); + void ShowPointer( bool bVisible ); void EnterWait(); void LeaveWait(); - sal_Bool IsWait() const; + bool IsWait() const; void SetCursor( Cursor* pCursor ); Cursor* GetCursor() const; void SetZoom( const Fraction& rZoom ); const Fraction& GetZoom() const; - sal_Bool IsZoom() const; + bool IsZoom() const; long CalcZoom( long n ) const; virtual void SetText( const OUString& rStr ); @@ -949,8 +949,8 @@ public: sal_uInt16 GetChildCount() const; Window* GetChild( sal_uInt16 nChild ) const; Window* GetWindow( sal_uInt16 nType ) const; - sal_Bool IsChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; - sal_Bool IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow = sal_False ) const; + bool IsChild( const Window* pWindow, bool bSystemWindow = false ) const; + bool IsWindowOrChild( const Window* pWindow, bool bSystemWindow = false ) const; void SetData( void* pNewData ); void* GetData() const; @@ -962,11 +962,11 @@ public: void Invert( const Polygon& rPoly, sal_uInt16 nFlags = 0 ); // transparent background for selected or checked items in toolboxes etc. - void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly ); + void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly ); // the same, but fills a passed Color with a text color complementing the selection background - void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor ); + void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor ); // support rounded edges in the selection rect - void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor ); + void DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor ); void ShowTracking( const Rectangle& rRect, sal_uInt16 nFlags = SHOWTRACK_SMALL ); @@ -977,12 +977,12 @@ public: void StartTracking( sal_uInt16 nFlags = 0 ); void EndTracking( sal_uInt16 nFlags = 0 ); - sal_Bool IsTracking() const; + bool IsTracking() const; void StartAutoScroll( sal_uInt16 nFlags ); void EndAutoScroll(); - sal_Bool HandleScrollCommand( const CommandEvent& rCmd, + bool HandleScrollCommand( const CommandEvent& rCmd, ScrollBar* pHScrl = NULL, ScrollBar* pVScrl = NULL ); @@ -997,7 +997,7 @@ public: virtual void SetComponentInterface( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xIFace ); // Accessibility - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( sal_Bool bCreate = sal_True ); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > GetAccessible( bool bCreate = true ); virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); void SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ); @@ -1026,8 +1026,8 @@ public: // to avoid sending accessibility events in cases like closing dialogs // by default checks complete parent path - sal_Bool IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath = sal_True ); - void SetAccessibilityEventsSuppressed(sal_Bool bSuppressed); + bool IsAccessibilityEventsSuppressed( bool bTraverseParentPath = true ); + void SetAccessibilityEventsSuppressed(bool bSuppressed); /// request XCanvas render interface for this window ::com::sun::star::uno::Reference< @@ -1046,8 +1046,8 @@ public: void SetWindowPeer( ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer > xPeer, VCLXWindow* pVCLXWindow ); // remember if it was generated by Toolkit - sal_Bool IsCreatedWithToolkit() const; - void SetCreatedWithToolkit( sal_Bool b ); + bool IsCreatedWithToolkit() const; + void SetCreatedWithToolkit( bool b ); // Deprecated - can use SetAccessibleRelationLabelFor/By nowadys virtual Window* GetParentLabelFor( const Window* pLabel ) const; @@ -1259,8 +1259,8 @@ public: //------------------------------------- // form controls must never use native widgets, this can be toggled here - void EnableNativeWidget( sal_Bool bEnable = sal_True ); - sal_Bool IsNativeWidgetEnabled() const; + void EnableNativeWidget( bool bEnable = true ); + bool IsNativeWidgetEnabled() const; // a helper method for a Control's Draw method void PaintToDevice( OutputDevice* pDevice, const Point& rPos, const Size& rSize ); diff --git a/include/vcl/wmf.hxx b/include/vcl/wmf.hxx index fe50fe60e07d..cdadbbc2949f 100644 --- a/include/vcl/wmf.hxx +++ b/include/vcl/wmf.hxx @@ -55,13 +55,13 @@ struct WMF_EXTERNALHEADER } }; -sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL, WMF_EXTERNALHEADER *pExtHeader = NULL ); +bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem = NULL, WMF_EXTERNALHEADER *pExtHeader = NULL ); -VCL_DLLPUBLIC sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem ); +VCL_DLLPUBLIC bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pConfigItem ); VCL_DLLPUBLIC bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL, bool bPlaceable = true ); -sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL ); +bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem = NULL ); VCL_DLLPUBLIC bool WriteWindowMetafileBits( SvStream& rStream, const GDIMetaFile& rMTF ); diff --git a/include/vcl/wrkwin.hxx b/include/vcl/wrkwin.hxx index 942ed10c9c76..be494afd49c1 100644 --- a/include/vcl/wrkwin.hxx +++ b/include/vcl/wrkwin.hxx @@ -44,7 +44,7 @@ class VCL_DLLPUBLIC WorkWindow : public SystemWindow { private: sal_uInt16 mnPresentationFlags; - sal_Bool mbPresentationMode:1, + bool mbPresentationMode:1, mbPresentationVisible:1, mbPresentationFull:1, mbFullScreenMode:1; @@ -67,37 +67,37 @@ public: explicit WorkWindow( SystemParentData* pParent ); // Not in the REMOTE-Version virtual ~WorkWindow(); - virtual sal_Bool Close(); + virtual bool Close(); - void ShowFullScreenMode( sal_Bool bFullScreenMode, + void ShowFullScreenMode( bool bFullScreenMode, sal_Int32 nDisplayScreen ); /** @overload void ShowFullScreenMode(sal_Bool bFullScreenMode, sal_Int32 nDisplayScreen) */ - void ShowFullScreenMode( sal_Bool bFullScreenMode = sal_True ); - void EndFullScreenMode() { ShowFullScreenMode( sal_False ); } - sal_Bool IsFullScreenMode() const { return mbFullScreenMode; } + void ShowFullScreenMode( bool bFullScreenMode = true ); + void EndFullScreenMode() { ShowFullScreenMode( false ); } + bool IsFullScreenMode() const { return mbFullScreenMode; } - void StartPresentationMode( sal_Bool bPresentation, + void StartPresentationMode( bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplayScreen ); /** @overload void StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_uInt32 nDisplayScreen) */ - void StartPresentationMode( sal_Bool bPresentation = sal_True, + void StartPresentationMode( bool bPresentation = true, sal_uInt16 nFlags = 0 ); - void EndPresentationMode() { StartPresentationMode( sal_False ); } - sal_Bool IsPresentationMode() const { return mbPresentationMode; } + void EndPresentationMode() { StartPresentationMode( false ); } + bool IsPresentationMode() const { return mbPresentationMode; } - sal_Bool IsMinimized() const; + bool IsMinimized() const; - sal_Bool SetPluginParent( SystemParentData* pParent ); + bool SetPluginParent( SystemParentData* pParent ); void Minimize(); void Restore(); - void Maximize( sal_Bool bMaximize = sal_True ); - sal_Bool IsMaximized() const; + void Maximize( bool bMaximize = true ); + bool IsMaximized() const; }; #endif // INCLUDED_VCL_WRKWIN_HXX diff --git a/include/vcl/xtextedt.hxx b/include/vcl/xtextedt.hxx index 812eb98bfa51..2f046138af52 100644 --- a/include/vcl/xtextedt.hxx +++ b/include/vcl/xtextedt.hxx @@ -43,25 +43,25 @@ public: void SetGroupChars( const OUString& r ) { maGroupChars = r; } TextSelection MatchGroup( const TextPaM& rCursor ) const; - sal_Bool Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward = sal_True ); + bool Search( TextSelection& rSel, const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bForward = true ); }; class VCL_DLLPUBLIC ExtTextView : public TextView { protected: - sal_Bool ImpIndentBlock( sal_Bool bRight ); + bool ImpIndentBlock( bool bRight ); public: ExtTextView( ExtTextEngine* pEng, Window* pWindow ); ~ExtTextView(); - sal_Bool MatchGroup(); + bool MatchGroup(); - sal_Bool Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bForward ); - sal_uInt16 Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward ); + bool Search( const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bForward ); + sal_uInt16 Replace( const ::com::sun::star::util::SearchOptions& rSearchOptions, bool bAll, bool bForward ); - sal_Bool IndentBlock(); - sal_Bool UnindentBlock(); + bool IndentBlock(); + bool UnindentBlock(); }; #endif // INCLUDED_VCL_XTEXTEDT_HXX diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx index 9066d44fac31..ce29a0c62085 100644 --- a/oox/source/drawingml/shape.cxx +++ b/oox/source/drawingml/shape.cxx @@ -1018,7 +1018,7 @@ Reference < XShape > Shape::renderDiagramToGraphic( XmlFilterBase& rFilterBase ) mpTempStream.Seek( STREAM_SEEK_TO_BEGIN ); Graphic aGraphic; - GraphicFilter aFilter( sal_False ); + GraphicFilter aFilter( false ); if ( aFilter.ImportGraphic( aGraphic, "", mpTempStream, GRFILTER_FORMAT_NOTFOUND, NULL, 0, static_cast < Sequence < PropertyValue >* > ( NULL ), NULL ) != GRFILTER_OK ) { SAL_WARN( "oox.drawingml", OSL_THIS_FUNC diff --git a/padmin/source/adddlg.cxx b/padmin/source/adddlg.cxx index c57a84c420de..8943f367cf07 100644 --- a/padmin/source/adddlg.cxx +++ b/padmin/source/adddlg.cxx @@ -55,16 +55,16 @@ APChooseDevicePage::APChooseDevicePage( AddPrinterDialog* pParent ) : m_aOverTxt( this, PaResId( RID_ADDP_CHDEV_TXT_OVER ) ) { FreeResource(); - m_aPrinterBtn.Check( sal_True ); - m_aFaxBtn.Check( sal_False ); - m_aPDFBtn.Check( sal_False ); - m_aOldBtn.Check( sal_False ); + m_aPrinterBtn.Check( true ); + m_aFaxBtn.Check( false ); + m_aPDFBtn.Check( false ); + m_aOldBtn.Check( false ); if( AddPrinterDialog::getOldPrinterLocation().isEmpty() ) m_aOldBtn.Enable( false ); if( ! PrinterInfoManager::get().addOrRemovePossible() ) { - m_aPrinterBtn.Check( sal_False ); - m_aFaxBtn.Check( sal_True ); + m_aPrinterBtn.Check( false ); + m_aFaxBtn.Check( true ); m_aPrinterBtn.Enable( false ); m_aOldBtn.Enable( false ); } @@ -334,8 +334,8 @@ APNamePage::APNamePage( AddPrinterDialog* pParent, const OUString& rInitName, De m_aFaxSwallowBox.Show( false ); m_aNameEdt.SetText( AddPrinterDialog::uniquePrinterName( m_aNameEdt.GetText() ) ); - m_aDefaultBox.Check( sal_False ); - m_aFaxSwallowBox.Check( sal_False ); + m_aDefaultBox.Check( false ); + m_aFaxSwallowBox.Check( false ); } APNamePage::~APNamePage() @@ -666,8 +666,8 @@ APFaxDriverPage::APFaxDriverPage( AddPrinterDialog* pParent ) { FreeResource(); - m_aDefBtn.Check( sal_True ); - m_aSelectBtn.Check( sal_False ); + m_aDefBtn.Check( true ); + m_aSelectBtn.Check( false ); m_aSelectBtn.SetStyle( m_aSelectBtn.GetStyle() | WB_WORDBREAK ); } @@ -699,9 +699,9 @@ APPdfDriverPage::APPdfDriverPage( AddPrinterDialog* pParent ) { FreeResource(); - m_aDefBtn.Check( sal_True ); - m_aDistBtn.Check( sal_False ); - m_aSelectBtn.Check( sal_False ); + m_aDefBtn.Check( true ); + m_aDistBtn.Check( false ); + m_aSelectBtn.Check( false ); m_aSelectBtn.SetStyle( m_aSelectBtn.GetStyle() | WB_WORDBREAK ); } diff --git a/padmin/source/padialog.cxx b/padmin/source/padialog.cxx index 4794388798a8..93788e49c382 100644 --- a/padmin/source/padialog.cxx +++ b/padmin/source/padialog.cxx @@ -614,7 +614,7 @@ void PADialog::RemDevice() { if (m_aDevicesLB.GetEntry(i).equals(aDefPrinter)) { - m_aDevicesLB.SelectEntryPos( i, sal_True ); + m_aDevicesLB.SelectEntryPos( i, true ); UpdateText(); break; } diff --git a/padmin/source/prtsetup.cxx b/padmin/source/prtsetup.cxx index 952a11bbdd25..67ab55740003 100644 --- a/padmin/source/prtsetup.cxx +++ b/padmin/source/prtsetup.cxx @@ -526,10 +526,10 @@ RTSOtherPage::RTSOtherPage( RTSDialog* pParent ) : { FreeResource(); - m_aTopLB.EnableEmptyFieldValue( sal_True ); - m_aBottomLB.EnableEmptyFieldValue( sal_True ); - m_aLeftLB.EnableEmptyFieldValue( sal_True ); - m_aRightLB.EnableEmptyFieldValue( sal_True ); + m_aTopLB.EnableEmptyFieldValue( true ); + m_aBottomLB.EnableEmptyFieldValue( true ); + m_aLeftLB.EnableEmptyFieldValue( true ); + m_aRightLB.EnableEmptyFieldValue( true ); m_aDefaultBtn.SetClickHdl( LINK( this, RTSOtherPage, ClickBtnHdl ) ); diff --git a/reportdesign/source/ui/dlg/AddField.cxx b/reportdesign/source/ui/dlg/AddField.cxx index 9849b2ab2a48..2084035a1894 100644 --- a/reportdesign/source/ui/dlg/AddField.cxx +++ b/reportdesign/source/ui/dlg/AddField.cxx @@ -523,7 +523,7 @@ IMPL_LINK( OAddFieldWindow, OnSortAction, ToolBox*, /*NOTINTERESTEDIN*/ ) { const sal_uInt16 nItemId = m_aActions.GetItemId(j); if ( nCurItem != nItemId ) - m_aActions.CheckItem(nItemId,sal_False); + m_aActions.CheckItem(nItemId,false); } SvSortMode eSortMode = SortNone; if ( SID_FM_REMOVE_FILTER_SORT != nCurItem ) diff --git a/reportdesign/source/ui/dlg/CondFormat.cxx b/reportdesign/source/ui/dlg/CondFormat.cxx index 1035917934b1..70cf99736b50 100644 --- a/reportdesign/source/ui/dlg/CondFormat.cxx +++ b/reportdesign/source/ui/dlg/CondFormat.cxx @@ -72,11 +72,11 @@ namespace rptui UpdateLocker( Window& _rWindow ) :m_rWindow( _rWindow ) { - _rWindow.SetUpdateMode( sal_False ); + _rWindow.SetUpdateMode( false ); } ~UpdateLocker() { - m_rWindow.SetUpdateMode( sal_True ); + m_rWindow.SetUpdateMode( true ); } }; diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx index 873c7b50f165..2d3e23eaa270 100644 --- a/reportdesign/source/ui/dlg/Condition.cxx +++ b/reportdesign/source/ui/dlg/Condition.cxx @@ -62,7 +62,7 @@ ConditionField::ConditionField( Condition* _pParent, const ResId& _rResId ) : Ed { m_pSubEdit = new Edit(this,0); SetSubEdit(m_pSubEdit); - m_pSubEdit->EnableRTL( sal_False ); + m_pSubEdit->EnableRTL( false ); m_pSubEdit->SetPosPixel( Point() ); m_aFormula.SetText(OUString("...")); diff --git a/reportdesign/source/ui/inc/DesignView.hxx b/reportdesign/source/ui/inc/DesignView.hxx index 3ad28623e8e9..dc01dbbb5eaf 100644 --- a/reportdesign/source/ui/inc/DesignView.hxx +++ b/reportdesign/source/ui/inc/DesignView.hxx @@ -181,7 +181,7 @@ namespace rptui */ void toggleGrid(sal_Bool _bGridVisible); - void togglePropertyBrowser(sal_Bool _bToogleOn); + void togglePropertyBrowser(bool _bToogleOn); sal_Bool isAddFieldVisible() const; void toggleAddField(); diff --git a/reportdesign/source/ui/inc/propbrw.hxx b/reportdesign/source/ui/inc/propbrw.hxx index aae98d424d7e..54fb3981d26c 100644 --- a/reportdesign/source/ui/inc/propbrw.hxx +++ b/reportdesign/source/ui/inc/propbrw.hxx @@ -67,7 +67,7 @@ private: protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> > CreateCompPropSet(const SdrMarkList& rMarkList); diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 17bdb834151f..8a2a7260af32 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -455,7 +455,7 @@ void ODesignView::unmarkAllObjects(OSectionView* _pSectionView) m_aScrollWindow.unmarkAllObjects(_pSectionView); } //----------------------------------------------------------------------------- -void ODesignView::togglePropertyBrowser(sal_Bool _bToogleOn) +void ODesignView::togglePropertyBrowser(bool _bToogleOn) { if ( !m_pPropWin && _bToogleOn ) { diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index bdd0318aeecd..54b0c39b61f6 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -78,9 +78,9 @@ void OEndMarker::Paint( const Rectangle& /*rRect*/ ) // ----------------------------------------------------------------------- void OEndMarker::ImplInitSettings() { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground( Wallpaper( svtools::ColorConfig().GetColorValue(::svtools::APPBACKGROUND).nColor) ); SetFillColor( Application::GetSettings().GetStyleSettings().GetShadowColor() ); diff --git a/reportdesign/source/ui/report/ReportSection.cxx b/reportdesign/source/ui/report/ReportSection.cxx index 11789631455c..905ba74f4a07 100644 --- a/reportdesign/source/ui/report/ReportSection.cxx +++ b/reportdesign/source/ui/report/ReportSection.cxx @@ -95,8 +95,8 @@ OReportSection::OReportSection(OSectionWindow* _pParent,const uno::Reference< re SetHelpId(HID_REPORTSECTION); SetMapMode( MapMode( MAP_100TH_MM ) ); SetParentClipMode( PARENTCLIPMODE_CLIP ); - EnableChildTransparentMode( sal_False ); - SetPaintTransparent( sal_False ); + EnableChildTransparentMode( false ); + SetPaintTransparent( false ); try { diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 23c76c6c979b..87469429ab49 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -122,11 +122,11 @@ void OSectionWindow::_propertyChanged(const beans::PropertyChangeEvent& _rEvent) const uno::Reference< report::XSection> xCurrentSection = m_aReportSection.getSection(); if ( _rEvent.PropertyName.equals(PROPERTY_HEIGHT) ) { - m_pParent->getView()->SetUpdateMode(sal_False); + m_pParent->getView()->SetUpdateMode(false); //Resize(); m_pParent->getView()->notifySizeChanged(); m_pParent->resize(*this); - m_pParent->getView()->SetUpdateMode(sal_True); + m_pParent->getView()->SetUpdateMode(true); // getViewsWindow()->getView()->getReportView()->getController().resetZoomType(); } else if ( _rEvent.PropertyName.equals(PROPERTY_NAME) && !xSection->getGroup().is() ) @@ -196,9 +196,9 @@ void OSectionWindow::ImplInitSettings() static bool t = false; if ( t ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); } SetBackground( ); } diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 5e36a05a0be9..e13d0d984777 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -60,7 +60,7 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const OUString& _sColorEntry initDefaultNodeImages(); ImplInitSettings(); m_aText.SetHelpId(HID_RPT_START_TITLE); - m_aText.SetPaintTransparent(sal_True); + m_aText.SetPaintTransparent(true); m_aImage.SetHelpId(HID_RPT_START_IMAGE); m_aText.Show(); m_aImage.Show(); @@ -73,9 +73,9 @@ OStartMarker::OStartMarker(OSectionWindow* _pParent,const OUString& _sColorEntry m_aVRuler.SetMargin2(); const MeasurementSystem eSystem = SvtSysLocale().GetLocaleData().getMeasurementSystemEnum(); m_aVRuler.SetUnit(MEASURE_METRIC == eSystem ? FUNIT_CM : FUNIT_INCH); - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); } // ----------------------------------------------------------------------------- OStartMarker::~OStartMarker() @@ -194,10 +194,10 @@ void OStartMarker::initDefaultNodeImages() Image* pImage = m_bCollapsed ? s_pDefCollapsed : s_pDefExpanded; m_aImage.SetImage(*pImage); - m_aImage.SetMouseTransparent(sal_True); + m_aImage.SetMouseTransparent(true); m_aImage.SetBackground(); m_aText.SetBackground(); - m_aText.SetMouseTransparent(sal_True); + m_aText.SetMouseTransparent(true); } // ----------------------------------------------------------------------- void OStartMarker::ImplInitSettings() diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 46625a3d864a..e0a4b8bc2a63 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -175,7 +175,7 @@ OViewsWindow::OViewsWindow( OReportWindow* _pReportWindow) ,m_pParent(_pReportWindow) ,m_bInUnmark(sal_False) { - SetPaintTransparent(sal_True); + SetPaintTransparent(true); SetUniqueId(UID_RPT_VIEWSWINDOW); SetMapMode( MapMode( MAP_100TH_MM ) ); m_aColorConfig.AddListener(this); @@ -275,7 +275,7 @@ void OViewsWindow::Paint( const Rectangle& rRect ) //------------------------------------------------------------------------------ void OViewsWindow::ImplInitSettings() { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetBackground( ); SetFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); SetTextFillColor( Application::GetSettings().GetStyleSettings().GetDialogColor() ); diff --git a/reportdesign/source/ui/report/propbrw.cxx b/reportdesign/source/ui/report/propbrw.cxx index 2a9689529aa1..5c550a7a8294 100644 --- a/reportdesign/source/ui/report/propbrw.cxx +++ b/reportdesign/source/ui/report/propbrw.cxx @@ -249,7 +249,7 @@ OUString PropBrw::getCurrentPage() const } //---------------------------------------------------------------------------- -sal_Bool PropBrw::Close() +bool PropBrw::Close() { m_xLastSection.clear(); // suspend the controller (it is allowed to veto) @@ -259,7 +259,7 @@ sal_Bool PropBrw::Close() { Reference< XController > xController( m_xMeAsFrame->getController() ); if ( xController.is() && !xController->suspend( sal_True ) ) - return sal_False; + return false; } catch( const Exception& ) { @@ -273,7 +273,7 @@ sal_Bool PropBrw::Close() m_pDesignView->getController().executeUnChecked(SID_PROPERTYBROWSER_LAST_PAGE,uno::Sequence< beans::PropertyValue>()); - return sal_True; + return true; } //---------------------------------------------------------------------------- diff --git a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx index 0dc997113eb7..571702ec61d5 100644 --- a/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/AnalysisOfVarianceDialog.cxx @@ -92,7 +92,7 @@ ScAnalysisOfVarianceDialog::ScAnalysisOfVarianceDialog( ScAnalysisOfVarianceDialog::~ScAnalysisOfVarianceDialog() {} -sal_Bool ScAnalysisOfVarianceDialog::Close() +bool ScAnalysisOfVarianceDialog::Close() { return DoClose( ScAnalysisOfVarianceDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx index 4b8b1de76310..2591b9f47322 100644 --- a/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/CorrelationDialog.cxx @@ -28,7 +28,7 @@ ScCorrelationDialog::ScCorrelationDialog( "CorrelationDialog", "modules/scalc/ui/correlationdialog.ui" ) {} -sal_Bool ScCorrelationDialog::Close() +bool ScCorrelationDialog::Close() { return DoClose( ScCorrelationDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx index 1054d77447e1..b4ed14e74564 100644 --- a/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/CovarianceDialog.cxx @@ -33,7 +33,7 @@ sal_Int16 ScCovarianceDialog::GetUndoNameId() return STR_COVARIANCE_UNDO_NAME; } -sal_Bool ScCovarianceDialog::Close() +bool ScCovarianceDialog::Close() { return DoClose( ScCovarianceDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx index 168777346c72..84d493ae5029 100644 --- a/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/DescriptiveStatisticsDialog.cxx @@ -71,7 +71,7 @@ ScDescriptiveStatisticsDialog::ScDescriptiveStatisticsDialog( ScDescriptiveStatisticsDialog::~ScDescriptiveStatisticsDialog() {} -sal_Bool ScDescriptiveStatisticsDialog::Close() +bool ScDescriptiveStatisticsDialog::Close() { return DoClose( ScDescriptiveStatisticsDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx index 6b20afd2ccc5..a97a48cc1c69 100644 --- a/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/ExponentialSmoothingDialog.cxx @@ -40,7 +40,7 @@ ScExponentialSmoothingDialog::ScExponentialSmoothingDialog( ScExponentialSmoothingDialog::~ScExponentialSmoothingDialog() {} -sal_Bool ScExponentialSmoothingDialog::Close() +bool ScExponentialSmoothingDialog::Close() { return DoClose( ScExponentialSmoothingDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx index 85466deb5d84..fe0cf52aaf44 100644 --- a/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/MovingAverageDialog.cxx @@ -40,7 +40,7 @@ ScMovingAverageDialog::ScMovingAverageDialog( ScMovingAverageDialog::~ScMovingAverageDialog() {} -sal_Bool ScMovingAverageDialog::Close() +bool ScMovingAverageDialog::Close() { return DoClose( ScMovingAverageDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx index 86fa779f8a26..250de89b2ac9 100644 --- a/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/RandomNumberGeneratorDialog.cxx @@ -136,7 +136,7 @@ void ScRandomNumberGeneratorDialog::SetActive() RefInputDone(); } -sal_Bool ScRandomNumberGeneratorDialog::Close() +bool ScRandomNumberGeneratorDialog::Close() { return DoClose( ScRandomNumberGeneratorDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx index e67b1c610bc2..a252ba8bdc0c 100644 --- a/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/SamplingDialog.cxx @@ -123,7 +123,7 @@ void ScSamplingDialog::SetActive() RefInputDone(); } -sal_Bool ScSamplingDialog::Close() +bool ScSamplingDialog::Close() { return DoClose( ScSamplingDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx index 59c249ca03c9..8a06d946c5ef 100644 --- a/sc/source/ui/StatisticsDialogs/TTestDialog.cxx +++ b/sc/source/ui/StatisticsDialogs/TTestDialog.cxx @@ -48,7 +48,7 @@ ScTTestDialog::ScTTestDialog( ScTTestDialog::~ScTTestDialog() {} -sal_Bool ScTTestDialog::Close() +bool ScTTestDialog::Close() { return DoClose( ScTTestDialogWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx index 375cd2000f7e..02cb95cc5d87 100644 --- a/sc/source/ui/app/inputwin.cxx +++ b/sc/source/ui/app/inputwin.cxx @@ -1485,7 +1485,7 @@ ScTextWnd::ScTextWnd( Window* pParent, ScTabViewShell* pViewSh ) Color aBgColor= rStyleSettings.GetWindowColor(); Color aTxtColor= rStyleSettings.GetWindowTextColor(); - aTextFont.SetTransparent ( sal_True ); + aTextFont.SetTransparent ( true ); aTextFont.SetFillColor ( aBgColor ); //aTextFont.SetColor ( COL_FIELDTEXT ); aTextFont.SetColor (aTxtColor); diff --git a/sc/source/ui/condformat/colorformat.cxx b/sc/source/ui/condformat/colorformat.cxx index b126174d8991..6de2470aa2dd 100644 --- a/sc/source/ui/condformat/colorformat.cxx +++ b/sc/source/ui/condformat/colorformat.cxx @@ -140,9 +140,9 @@ void ScDataBarSettingsDlg::Init() if(pEntry->GetColor() == Color(COL_LIGHTBLUE)) mpLbPos->SelectEntryPos(i); } - mpLbPos->SetUpdateMode( sal_True ); - mpLbNeg->SetUpdateMode( sal_True ); - mpLbAxisCol->SetUpdateMode( sal_True ); + mpLbPos->SetUpdateMode( true ); + mpLbNeg->SetUpdateMode( true ); + mpLbAxisCol->SetUpdateMode( true ); } mpBtnOk->SetClickHdl( LINK( this, ScDataBarSettingsDlg, OkBtnHdl ) ); diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx index 10984b133417..2720893f1552 100644 --- a/sc/source/ui/condformat/condformatdlgentry.cxx +++ b/sc/source/ui/condformat/condformatdlgentry.cxx @@ -791,8 +791,8 @@ void ScColorScale2FrmtEntry::Init() if(pEntry->GetColor() == Color(COL_LIGHTBLUE)) maLbColMax.SelectEntryPos(i); } - maLbColMin.SetUpdateMode( sal_True ); - maLbColMax.SetUpdateMode( sal_True ); + maLbColMin.SetUpdateMode( true ); + maLbColMax.SetUpdateMode( true ); } } @@ -954,9 +954,9 @@ void ScColorScale3FrmtEntry::Init() if(pEntry->GetColor() == Color(COL_LIGHTBLUE)) maLbColMax.SelectEntryPos(i); } - maLbColMin.SetUpdateMode( sal_True ); - maLbColMiddle.SetUpdateMode( sal_True ); - maLbColMax.SetUpdateMode( sal_True ); + maLbColMin.SetUpdateMode( true ); + maLbColMiddle.SetUpdateMode( true ); + maLbColMax.SetUpdateMode( true ); } } diff --git a/sc/source/ui/dbgui/consdlg.cxx b/sc/source/ui/dbgui/consdlg.cxx index 79ea06e4ed5a..c6854e782ebc 100644 --- a/sc/source/ui/dbgui/consdlg.cxx +++ b/sc/source/ui/dbgui/consdlg.cxx @@ -145,7 +145,7 @@ void ScConsolidateDlg::Init() // Hack: pLbConsAreas used to be MultiLB. We don't have VCL builder equivalent // of it yet. So enable selecting multiple items here - pLbConsAreas->EnableMultiSelection( sal_True ); + pLbConsAreas->EnableMultiSelection( true ); pLbConsAreas->set_width_request(pLbConsAreas->approximate_char_width() * 16); pLbConsAreas->SetDropDownLineCount(5); @@ -263,7 +263,7 @@ void ScConsolidateDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) } -sal_Bool ScConsolidateDlg::Close() +bool ScConsolidateDlg::Close() { return DoClose( ScConsolidateDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx index 03972fd6338e..485021dfe540 100644 --- a/sc/source/ui/dbgui/csvgrid.cxx +++ b/sc/source/ui/dbgui/csvgrid.cxx @@ -893,8 +893,8 @@ void ScCsvGrid::KeyInput( const KeyEvent& rKEvt ) { const KeyCode& rKCode = rKEvt.GetKeyCode(); sal_uInt16 nCode = rKCode.GetCode(); - bool bShift = rKCode.IsShift() == sal_True; - bool bMod1 = rKCode.IsMod1() == sal_True; + bool bShift = rKCode.IsShift(); + bool bMod1 = rKCode.IsMod1(); if( !rKCode.IsMod2() ) { diff --git a/sc/source/ui/dbgui/dbnamdlg.cxx b/sc/source/ui/dbgui/dbnamdlg.cxx index 1895270842e2..715a6b9e310a 100644 --- a/sc/source/ui/dbgui/dbnamdlg.cxx +++ b/sc/source/ui/dbgui/dbnamdlg.cxx @@ -176,9 +176,9 @@ ScDbNameDlg::~ScDbNameDlg() void ScDbNameDlg::Init() { - m_pBtnHeader->Check( sal_True ); // Default: mit Spaltenkoepfen - m_pBtnDoSize->Check( sal_True ); - m_pBtnKeepFmt->Check( sal_True ); + m_pBtnHeader->Check( true ); // Default: mit Spaltenkoepfen + m_pBtnDoSize->Check( true ); + m_pBtnKeepFmt->Check( true ); m_pBtnOk->SetClickHdl ( LINK( this, ScDbNameDlg, OkBtnHdl ) ); m_pBtnCancel->SetClickHdl ( LINK( this, ScDbNameDlg, CancelBtnHdl ) ); @@ -297,7 +297,7 @@ void ScDbNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -sal_Bool ScDbNameDlg::Close() +bool ScDbNameDlg::Close() { return DoClose( ScDbNameDlgWrapper::GetChildWindowId() ); } @@ -341,7 +341,7 @@ void ScDbNameDlg::UpdateNames() m_pBtnRemove->Disable(); } //----------------------------------------------------------- - m_pEdName->SetUpdateMode( sal_True ); + m_pEdName->SetUpdateMode( true ); m_pEdName->Invalidate(); } @@ -471,7 +471,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, AddBtnHdl) m_pBtnAdd->Disable(); m_pBtnRemove->Disable(); m_pEdAssign->SetText( EMPTY_OUSTRING ); - m_pBtnHeader->Check( sal_True ); // Default: mit Spaltenkoepfen + m_pBtnHeader->Check( true ); // Default: mit Spaltenkoepfen m_pBtnDoSize->Check( false ); m_pBtnKeepFmt->Check( false ); m_pBtnStripData->Check( false ); @@ -551,7 +551,7 @@ IMPL_LINK_NOARG(ScDbNameDlg, RemoveBtnHdl) m_pBtnRemove->Disable(); m_pEdAssign->SetText( EMPTY_OUSTRING ); theCurArea = ScRange(); - m_pBtnHeader->Check( sal_True ); // Default: mit Spaltenkoepfen + m_pBtnHeader->Check( true ); // Default: mit Spaltenkoepfen m_pBtnDoSize->Check( false ); m_pBtnKeepFmt->Check( false ); m_pBtnStripData->Check( false ); diff --git a/sc/source/ui/dbgui/dpgroupdlg.cxx b/sc/source/ui/dbgui/dpgroupdlg.cxx index adfb9dbccf78..252803b600e3 100644 --- a/sc/source/ui/dbgui/dpgroupdlg.cxx +++ b/sc/source/ui/dbgui/dpgroupdlg.cxx @@ -246,8 +246,8 @@ ScDPDateGroupDlg::ScDPDateGroupDlg( Window* pParent, for( size_t nIdx = 0 ; nIdx < nCount; ++nIdx ) maLbUnits.InsertEntry( ScGlobal::GetRscString( nDatePartResIds[nIdx] ) ); - maEdStart.SetShowDateCentury( sal_True ); - maEdEnd.SetShowDateCentury( sal_True ); + maEdStart.SetShowDateCentury( true ); + maEdEnd.SetShowDateCentury( true ); maStartHelper.SetValue( rInfo.mbAutoStart, rInfo.mfStart ); maEndHelper.SetValue( rInfo.mbAutoEnd, rInfo.mfEnd ); diff --git a/sc/source/ui/dbgui/filtdlg.cxx b/sc/source/ui/dbgui/filtdlg.cxx index c9db0d3baf71..982bcdcd69f6 100644 --- a/sc/source/ui/dbgui/filtdlg.cxx +++ b/sc/source/ui/dbgui/filtdlg.cxx @@ -391,7 +391,7 @@ void ScFilterDlg::Init( const SfxItemSet& rArgSet ) //---------------------------------------------------------------------------- -sal_Bool ScFilterDlg::Close() +bool ScFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); diff --git a/sc/source/ui/dbgui/foptmgr.cxx b/sc/source/ui/dbgui/foptmgr.cxx index 7fa0993b4cd7..6af9cfe5e391 100644 --- a/sc/source/ui/dbgui/foptmgr.cxx +++ b/sc/source/ui/dbgui/foptmgr.cxx @@ -129,7 +129,7 @@ void ScFilterOptionsMgr::Init() pLbCopyArea->SetEntryData( nInsert, new OUString( aRefStr ) ); } - pBtnDestPers->Check( sal_True ); // beim Aufruf immer an + pBtnDestPers->Check( true ); // beim Aufruf immer an pLbCopyArea->SelectEntryPos( 0 ); pEdCopyArea->SetText( EMPTY_OUSTRING ); @@ -182,7 +182,7 @@ void ScFilterOptionsMgr::Init() rQueryData.nDestTab ).Format(SCA_ABS_3D, pDoc, eConv); - pBtnCopyResult->Check( sal_True ); + pBtnCopyResult->Check( true ); pEdCopyArea->SetText( aString ); EdAreaModifyHdl( pEdCopyArea ); pLbCopyArea->Enable(); diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index c0850f7ec7bc..8cbbcdf270ff 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -284,7 +284,7 @@ ScPivotLayoutDlg::~ScPivotLayoutDlg() { } -sal_Bool ScPivotLayoutDlg::Close() +bool ScPivotLayoutDlg::Close() { return DoClose( ScPivotLayoutWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/dbgui/scendlg.cxx b/sc/source/ui/dbgui/scendlg.cxx index 9b3701ee615f..8c389ab4428d 100644 --- a/sc/source/ui/dbgui/scendlg.cxx +++ b/sc/source/ui/dbgui/scendlg.cxx @@ -79,7 +79,7 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const OUString& rName, bool XColorEntry* pEntry = pColorList->GetColor(n); m_pLbColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pLbColor->SetUpdateMode( sal_True ); + m_pLbColor->SetUpdateMode( true ); } } } @@ -99,10 +99,10 @@ ScNewScenarioDlg::ScNewScenarioDlg( Window* pParent, const OUString& rName, bool m_pCbShowFrame->SetClickHdl( LINK( this, ScNewScenarioDlg, EnableHdl ) ); m_pLbColor->SelectEntry( Color( COL_LIGHTGRAY ) ); - m_pCbShowFrame->Check(sal_True); - m_pCbTwoWay->Check(sal_True); + m_pCbShowFrame->Check(true); + m_pCbTwoWay->Check(true); m_pCbCopyAll->Check(false); - m_pCbProtect->Check(sal_True); + m_pCbProtect->Check(true); if (bIsEdit) m_pCbCopyAll->Enable(false); diff --git a/sc/source/ui/dbgui/scuiimoptdlg.cxx b/sc/source/ui/dbgui/scuiimoptdlg.cxx index 233ac4f7d964..1deb7dbb62e5 100644 --- a/sc/source/ui/dbgui/scuiimoptdlg.cxx +++ b/sc/source/ui/dbgui/scuiimoptdlg.cxx @@ -215,7 +215,7 @@ ScImportOptionsDlg::ScImportOptionsDlg( m_pCbFixed->SetClickHdl( LINK( this, ScImportOptionsDlg, FixedWidthHdl ) ); m_pCbFixed->Check( false ); m_pCbShown->Show(); - m_pCbShown->Check( sal_True ); + m_pCbShown->Check( true ); m_pCbQuoteAll->Show(); m_pCbQuoteAll->Check( false ); m_pCbFormulas->Show(); diff --git a/sc/source/ui/dbgui/sfiltdlg.cxx b/sc/source/ui/dbgui/sfiltdlg.cxx index fc71e9e5d9b2..6f2b983b3f91 100644 --- a/sc/source/ui/dbgui/sfiltdlg.cxx +++ b/sc/source/ui/dbgui/sfiltdlg.cxx @@ -206,7 +206,7 @@ void ScSpecialFilterDlg::Init( const SfxItemSet& rArgSet ) //---------------------------------------------------------------------------- -sal_Bool ScSpecialFilterDlg::Close() +bool ScSpecialFilterDlg::Close() { if (pViewData) pViewData->GetDocShell()->CancelAutoDBRange(); diff --git a/sc/source/ui/dbgui/sortkeydlg.cxx b/sc/source/ui/dbgui/sortkeydlg.cxx index 9b2bd5fb6ca6..8302b4f42925 100644 --- a/sc/source/ui/dbgui/sortkeydlg.cxx +++ b/sc/source/ui/dbgui/sortkeydlg.cxx @@ -110,7 +110,7 @@ void ScSortKeyCtrl::checkAutoVScroll() return; if (nBits & WB_AUTOVSCROLL) { - sal_Bool bShow = m_rVertScroll.GetRangeMax() > m_rVertScroll.GetVisibleSize(); + bool bShow = m_rVertScroll.GetRangeMax() > m_rVertScroll.GetVisibleSize(); if (bShow != m_rVertScroll.IsVisible()) m_rVertScroll.Show(bShow); } diff --git a/sc/source/ui/dbgui/tpsort.cxx b/sc/source/ui/dbgui/tpsort.cxx index 93359481c577..14ca4e67af40 100644 --- a/sc/source/ui/dbgui/tpsort.cxx +++ b/sc/source/ui/dbgui/tpsort.cxx @@ -655,7 +655,7 @@ void ScTabPageSortOptions::Reset( const SfxItemSet& /* rArgSet */ ) { if ( aSortData.bUserDef ) { - m_pBtnSortUser->Check( sal_True ); + m_pBtnSortUser->Check( true ); m_pLbSortUser->Enable(); m_pLbSortUser->SelectEntryPos( aSortData.nUserIndex ); } @@ -781,7 +781,7 @@ void ScTabPageSortOptions::ActivatePage( const SfxItemSet& rSet ) m_pBtnHeader->Check( pDlg->GetHeaders() ); } - if ( m_pBtnTopDown->IsChecked() != (pDlg->GetByRows() ? 1 : 0) ) + if ( m_pBtnTopDown->IsChecked() != pDlg->GetByRows() ) { m_pBtnTopDown->Check( pDlg->GetByRows() ); m_pBtnLeftRight->Check( !pDlg->GetByRows() ); @@ -991,7 +991,7 @@ IMPL_LINK_NOARG(ScTabPageSortOptions, FillAlgorHdl) m_pLbAlgorithm->Enable( nCount > 1 ); // enable only if there is a choice } - m_pLbAlgorithm->SetUpdateMode( sal_True ); + m_pLbAlgorithm->SetUpdateMode( true ); return 0; } diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx index d7d5abcaa19f..386f942afda3 100644 --- a/sc/source/ui/dbgui/validate.cxx +++ b/sc/source/ui/dbgui/validate.cxx @@ -149,7 +149,7 @@ void ScTPValidationValue::RefInputDonePostHdl() } -sal_Bool ScValidationDlg::Close() +bool ScValidationDlg::Close() { if( m_bOwnRefHdlr ) { diff --git a/sc/source/ui/formdlg/dwfunctr.cxx b/sc/source/ui/formdlg/dwfunctr.cxx index 8538a80121c2..1aa9df2b6603 100644 --- a/sc/source/ui/formdlg/dwfunctr.cxx +++ b/sc/source/ui/formdlg/dwfunctr.cxx @@ -113,7 +113,7 @@ ScFunctionDockWin::ScFunctionDockWin( SfxBindings* pBindingsP, else eSfxNewAlignment=SFX_ALIGN_RIGHT; eSfxOldAlignment=eSfxNewAlignment; - aFiFuncDesc.SetUpdateMode(sal_True); + aFiFuncDesc.SetUpdateMode(true); pAllFuncList=&aFuncList; aDDFuncList.Disable(); aDDFuncList.Hide(); @@ -630,7 +630,7 @@ void ScFunctionDockWin::Resizing( Size& rNewSize ) #* #************************************************************************/ -sal_Bool ScFunctionDockWin::Close() +bool ScFunctionDockWin::Close() { SfxBoolItem aItem( FID_FUNCTION_BOX, false ); @@ -640,7 +640,7 @@ sal_Bool ScFunctionDockWin::Close() SfxDockingWindow::Close(); - return( sal_True ); + return true; } @@ -802,7 +802,7 @@ void ScFunctionDockWin::UpdateFunctionList() //------------------------------------------------------ - pAllFuncList->SetUpdateMode( sal_True ); + pAllFuncList->SetUpdateMode( true ); if ( pAllFuncList->GetEntryCount() > 0 ) { diff --git a/sc/source/ui/formdlg/formula.cxx b/sc/source/ui/formdlg/formula.cxx index 2c6fd2278ad9..f509e2db1e3c 100644 --- a/sc/source/ui/formdlg/formula.cxx +++ b/sc/source/ui/formdlg/formula.cxx @@ -299,10 +299,10 @@ ScInputHandler* ScFormulaDlg::GetNextInputHandler(ScDocShell* pDocShell,PtrTabVi } -sal_Bool ScFormulaDlg::Close() +bool ScFormulaDlg::Close() { DoEnter(false); - return sal_True; + return true; } // -------------------------------------------------------------------------- diff --git a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx index 85ebc3848ba9..be0216f3887d 100644 --- a/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx +++ b/sc/source/ui/inc/AnalysisOfVarianceDialog.hxx @@ -33,7 +33,7 @@ public: virtual ~ScAnalysisOfVarianceDialog(); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual sal_Int16 GetUndoNameId(); diff --git a/sc/source/ui/inc/CorrelationDialog.hxx b/sc/source/ui/inc/CorrelationDialog.hxx index cefc60d43569..24c2aa309302 100644 --- a/sc/source/ui/inc/CorrelationDialog.hxx +++ b/sc/source/ui/inc/CorrelationDialog.hxx @@ -20,7 +20,7 @@ public: SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow, Window* pParent, ScViewData* pViewData); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual const OUString getLabel(); diff --git a/sc/source/ui/inc/CovarianceDialog.hxx b/sc/source/ui/inc/CovarianceDialog.hxx index 8361cd1a12f1..5c4b06311231 100644 --- a/sc/source/ui/inc/CovarianceDialog.hxx +++ b/sc/source/ui/inc/CovarianceDialog.hxx @@ -20,7 +20,7 @@ public: SfxBindings* pSfxBindings, SfxChildWindow* pChildWindow, Window* pParent, ScViewData* pViewData); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual const OUString getLabel(); diff --git a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx index a31180a31da5..1ec90687809a 100644 --- a/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx +++ b/sc/source/ui/inc/DescriptiveStatisticsDialog.hxx @@ -30,7 +30,7 @@ public: virtual ~ScDescriptiveStatisticsDialog(); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual sal_Int16 GetUndoNameId(); diff --git a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx index 3aa2dd5c39a4..feefaba236cf 100644 --- a/sc/source/ui/inc/ExponentialSmoothingDialog.hxx +++ b/sc/source/ui/inc/ExponentialSmoothingDialog.hxx @@ -33,7 +33,7 @@ public: virtual ~ScExponentialSmoothingDialog(); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual sal_Int16 GetUndoNameId(); diff --git a/sc/source/ui/inc/MovingAverageDialog.hxx b/sc/source/ui/inc/MovingAverageDialog.hxx index ed41600d1f1d..0bf6b7aac7f7 100644 --- a/sc/source/ui/inc/MovingAverageDialog.hxx +++ b/sc/source/ui/inc/MovingAverageDialog.hxx @@ -33,7 +33,7 @@ public: virtual ~ScMovingAverageDialog(); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual sal_Int16 GetUndoNameId(); diff --git a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx index b20ce912ea7f..7b0ebb41fa2b 100644 --- a/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx +++ b/sc/source/ui/inc/RandomNumberGeneratorDialog.hxx @@ -31,7 +31,7 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: // Widgets diff --git a/sc/source/ui/inc/SamplingDialog.hxx b/sc/source/ui/inc/SamplingDialog.hxx index 02f07cd1ea51..804309b8948b 100644 --- a/sc/source/ui/inc/SamplingDialog.hxx +++ b/sc/source/ui/inc/SamplingDialog.hxx @@ -30,7 +30,7 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: // Widgets diff --git a/sc/source/ui/inc/TTestDialog.hxx b/sc/source/ui/inc/TTestDialog.hxx index 38007d7c49b0..6677a9191243 100644 --- a/sc/source/ui/inc/TTestDialog.hxx +++ b/sc/source/ui/inc/TTestDialog.hxx @@ -22,7 +22,7 @@ public: virtual ~ScTTestDialog(); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual sal_Int16 GetUndoNameId(); diff --git a/sc/source/ui/inc/areasdlg.hxx b/sc/source/ui/inc/areasdlg.hxx index 33280e5f0255..7a344ab2f172 100644 --- a/sc/source/ui/inc/areasdlg.hxx +++ b/sc/source/ui/inc/areasdlg.hxx @@ -45,7 +45,7 @@ public: virtual void SetActive(); virtual void Deactivate(); - virtual sal_Bool Close(); + virtual bool Close(); private: ListBox* pLbPrintArea; diff --git a/sc/source/ui/inc/consdlg.hxx b/sc/source/ui/inc/consdlg.hxx index 8692f919b523..51e432588b88 100644 --- a/sc/source/ui/inc/consdlg.hxx +++ b/sc/source/ui/inc/consdlg.hxx @@ -48,7 +48,7 @@ public: virtual bool IsRefInputMode() const { return true; } virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); protected: virtual void Deactivate(); diff --git a/sc/source/ui/inc/crnrdlg.hxx b/sc/source/ui/inc/crnrdlg.hxx index cc606fbfba30..929ef05d6744 100644 --- a/sc/source/ui/inc/crnrdlg.hxx +++ b/sc/source/ui/inc/crnrdlg.hxx @@ -44,7 +44,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: ListBox* pLbRange; diff --git a/sc/source/ui/inc/dbnamdlg.hxx b/sc/source/ui/inc/dbnamdlg.hxx index 238f4da0c0cb..e893fd4cd47f 100644 --- a/sc/source/ui/inc/dbnamdlg.hxx +++ b/sc/source/ui/inc/dbnamdlg.hxx @@ -46,7 +46,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: ComboBox* m_pEdName; diff --git a/sc/source/ui/inc/dwfunctr.hxx b/sc/source/ui/inc/dwfunctr.hxx index b5095b81411f..14d6fa79b669 100644 --- a/sc/source/ui/inc/dwfunctr.hxx +++ b/sc/source/ui/inc/dwfunctr.hxx @@ -90,7 +90,7 @@ private: protected: - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual void Resizing( Size& rSize ); virtual void SetSize(); diff --git a/sc/source/ui/inc/filtdlg.hxx b/sc/source/ui/inc/filtdlg.hxx index eb1a6d2eb05a..8677bbafe231 100644 --- a/sc/source/ui/inc/filtdlg.hxx +++ b/sc/source/ui/inc/filtdlg.hxx @@ -64,7 +64,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); void SliderMoved(); size_t GetSliderPos(); void RefreshEditRow( size_t nOffset ); @@ -172,7 +172,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: ListBox* pLbFilterArea; diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx index fcaffcba74ad..46d829822177 100644 --- a/sc/source/ui/inc/formula.hxx +++ b/sc/source/ui/inc/formula.hxx @@ -83,7 +83,7 @@ public: virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XFormulaOpCodeMapper> getFormulaOpCodeMapper() const; virtual ::com::sun::star::table::CellAddress getReferencePosition() const; - virtual sal_Bool Close(); + virtual bool Close(); // sc::IAnyRefDialog virtual void ShowReference(const OUString& _sRef); diff --git a/sc/source/ui/inc/highred.hxx b/sc/source/ui/inc/highred.hxx index 25a940e9bfc7..1927159bfed4 100644 --- a/sc/source/ui/inc/highred.hxx +++ b/sc/source/ui/inc/highred.hxx @@ -88,7 +88,7 @@ public: virtual void SetActive(); virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); - virtual sal_Bool Close(); + virtual bool Close(); virtual bool IsRefInputMode() const; }; diff --git a/sc/source/ui/inc/namedefdlg.hxx b/sc/source/ui/inc/namedefdlg.hxx index 18164a7582fa..825d0e779ea6 100644 --- a/sc/source/ui/inc/namedefdlg.hxx +++ b/sc/source/ui/inc/namedefdlg.hxx @@ -83,7 +83,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); void GetNewData( OUString& rName, OUString& rScope ); }; diff --git a/sc/source/ui/inc/namedlg.hxx b/sc/source/ui/inc/namedlg.hxx index 2ef08a1b01b4..266133fe703a 100644 --- a/sc/source/ui/inc/namedlg.hxx +++ b/sc/source/ui/inc/namedlg.hxx @@ -131,7 +131,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); void GetRangeNames(boost::ptr_map<OUString, ScRangeName>& rRangeMap); void SetEntry(const OUString& rName, const OUString& rScope); diff --git a/sc/source/ui/inc/optsolver.hxx b/sc/source/ui/inc/optsolver.hxx index 3056a3060290..a41c2ba06ea7 100644 --- a/sc/source/ui/inc/optsolver.hxx +++ b/sc/source/ui/inc/optsolver.hxx @@ -103,7 +103,7 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: FixedText* m_pFtObjectiveCell; diff --git a/sc/source/ui/inc/pvlaydlg.hxx b/sc/source/ui/inc/pvlaydlg.hxx index a56bc7bb483b..a39f62c8322c 100644 --- a/sc/source/ui/inc/pvlaydlg.hxx +++ b/sc/source/ui/inc/pvlaydlg.hxx @@ -142,7 +142,7 @@ protected: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: /** Returns the localized function name for the specified resource index. */ diff --git a/sc/source/ui/inc/select.hxx b/sc/source/ui/inc/select.hxx index de313c0d0da1..81a1db51b8f4 100644 --- a/sc/source/ui/inc/select.hxx +++ b/sc/source/ui/inc/select.hxx @@ -69,8 +69,8 @@ public: virtual void BeginDrag(); virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false ); - virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); + virtual bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false ); + virtual bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); @@ -100,8 +100,8 @@ public: virtual void BeginDrag(); virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false ); - virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); + virtual bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = false ); + virtual bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); diff --git a/sc/source/ui/inc/simpref.hxx b/sc/source/ui/inc/simpref.hxx index 09b3ead8557d..45074f973556 100644 --- a/sc/source/ui/inc/simpref.hxx +++ b/sc/source/ui/inc/simpref.hxx @@ -79,7 +79,7 @@ public: virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); void StartRefInput(); diff --git a/sc/source/ui/inc/solvrdlg.hxx b/sc/source/ui/inc/solvrdlg.hxx index f54ca3f485f7..cb23af64d664 100644 --- a/sc/source/ui/inc/solvrdlg.hxx +++ b/sc/source/ui/inc/solvrdlg.hxx @@ -52,7 +52,7 @@ public: virtual void SetReference( const ScRange& rRef, ScDocument* pDoc ); virtual bool IsRefInputMode() const; virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: FixedText* m_pFtFormulaCell; diff --git a/sc/source/ui/inc/tabopdlg.hxx b/sc/source/ui/inc/tabopdlg.hxx index 3b3b52f51e2d..8d87cfb27c08 100644 --- a/sc/source/ui/inc/tabopdlg.hxx +++ b/sc/source/ui/inc/tabopdlg.hxx @@ -54,7 +54,7 @@ public: virtual bool IsRefInputMode() const { return true; } virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: FixedText* m_pFtFormulaRange; diff --git a/sc/source/ui/inc/validate.hxx b/sc/source/ui/inc/validate.hxx index 6faa2d0734e0..e6a0a04654f0 100644 --- a/sc/source/ui/inc/validate.hxx +++ b/sc/source/ui/inc/validate.hxx @@ -172,7 +172,7 @@ public: enum { SLOTID = SID_VALIDITY_REFERENCE }; - sal_Bool Close(); + bool Close(); }; diff --git a/sc/source/ui/inc/xmlsourcedlg.hxx b/sc/source/ui/inc/xmlsourcedlg.hxx index 556637168da9..30d5a66094eb 100644 --- a/sc/source/ui/inc/xmlsourcedlg.hxx +++ b/sc/source/ui/inc/xmlsourcedlg.hxx @@ -62,7 +62,7 @@ public: virtual void SetReference(const ScRange& rRange, ScDocument* pDoc); virtual void Deactivate(); virtual void SetActive(); - virtual sal_Bool Close(); + virtual bool Close(); private: diff --git a/sc/source/ui/miscdlgs/autofmt.cxx b/sc/source/ui/miscdlgs/autofmt.cxx index 726bc8129b97..9dec29a779c6 100644 --- a/sc/source/ui/miscdlgs/autofmt.cxx +++ b/sc/source/ui/miscdlgs/autofmt.cxx @@ -146,7 +146,7 @@ rFont.MethodName( Value ); rCJKFont.MethodName( Value ); rCTLFont.MethodName( Va SETONALLFONTS( SetShadow, pShadowedItem->GetValue() ) SETONALLFONTS( SetColor, aColor ) SETONALLFONTS( SetSize, aFontSize ) - SETONALLFONTS( SetTransparent, sal_True ) + SETONALLFONTS( SetTransparent, true ) #undef SETONALLFONTS } @@ -520,7 +520,7 @@ void ScAutoFmtPreview::DoPaint( const Rectangle& /* rRect */ ) Point aTmpPoint; Rectangle aRect( aTmpPoint, aWndSize ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aVD.SetFont( aFont ); aVD.SetLineColor(); aVD.SetFillColor( aBackCol ); diff --git a/sc/source/ui/miscdlgs/crnrdlg.cxx b/sc/source/ui/miscdlgs/crnrdlg.cxx index f1c7b7509695..e0c53ea02492 100644 --- a/sc/source/ui/miscdlgs/crnrdlg.cxx +++ b/sc/source/ui/miscdlgs/crnrdlg.cxx @@ -179,7 +179,7 @@ void ScColRowNameRangesDlg::Init() } else { - pBtnColHead->Check( sal_True ); + pBtnColHead->Check( true ); pBtnRowHead->Check( false ); pEdAssign->SetText( EMPTY_OUSTRING ); pEdAssign2->SetText( EMPTY_OUSTRING ); @@ -222,7 +222,7 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange, bool bRef SCROW nRow2 = theCurArea.aEnd.Row(); if ( (static_cast<SCCOLROW>(nCol2 - nCol1) >= nRow2 - nRow1) || (nCol1 == 0 && nCol2 == MAXCOL) ) { // Spaltenkoepfe und Grenzfall gesamte Tabelle - pBtnColHead->Check( sal_True ); + pBtnColHead->Check( true ); pBtnRowHead->Check( false ); if ( nRow2 == MAXROW ) { @@ -242,7 +242,7 @@ void ScColRowNameRangesDlg::SetColRowData( const ScRange& rLabelRange, bool bRef } else { // Zeilenkoepfe - pBtnRowHead->Check( sal_True ); + pBtnRowHead->Check( true ); pBtnColHead->Check( false ); if ( nCol2 == MAXCOL ) { // Head rechts, Data links @@ -421,7 +421,7 @@ void ScColRowNameRangesDlg::SetReference( const ScRange& rRef, ScDocument* /* pD #* #************************************************************************/ -sal_Bool ScColRowNameRangesDlg::Close() +bool ScColRowNameRangesDlg::Close() { return DoClose( ScColRowNameRangesDlgWrapper::GetChildWindowId() ); } @@ -591,7 +591,7 @@ void ScColRowNameRangesDlg::UpdateNames() delete [] ppSortArray; } //----------------------------------------------------------- - pLbRange->SetUpdateMode( sal_True ); + pLbRange->SetUpdateMode( true ); pLbRange->Invalidate(); } @@ -779,7 +779,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, AddBtnHdl) pBtnAdd->Disable(); pBtnRemove->Disable(); pEdAssign->SetText( EMPTY_OUSTRING ); - pBtnColHead->Check( sal_True ); + pBtnColHead->Check( true ); pBtnRowHead->Check( false ); pEdAssign2->SetText( EMPTY_OUSTRING ); theCurArea = ScRange(); @@ -866,7 +866,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RemoveBtnHdl) pBtnRemove->Disable(); pEdAssign->SetText( EMPTY_OUSTRING ); theCurArea = theCurData = ScRange(); - pBtnColHead->Check( sal_True ); + pBtnColHead->Check( true ); pBtnRowHead->Check( false ); pEdAssign2->SetText( EMPTY_OUSTRING ); Range1SelectHdl( 0 ); @@ -1068,7 +1068,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, ColClickHdl) { if ( !pBtnColHead->GetSavedValue() ) { - pBtnColHead->Check( sal_True ); + pBtnColHead->Check( true ); pBtnRowHead->Check( false ); if ( theCurArea.aStart.Row() == 0 && theCurArea.aEnd.Row() == MAXROW ) { @@ -1105,7 +1105,7 @@ IMPL_LINK_NOARG(ScColRowNameRangesDlg, RowClickHdl) { if ( !pBtnRowHead->GetSavedValue() ) { - pBtnRowHead->Check( sal_True ); + pBtnRowHead->Check( true ); pBtnColHead->Check( false ); if ( theCurArea.aStart.Col() == 0 && theCurArea.aEnd.Col() == MAXCOL ) { diff --git a/sc/source/ui/miscdlgs/highred.cxx b/sc/source/ui/miscdlgs/highred.cxx index f57e5deff296..aa915d4d1a15 100644 --- a/sc/source/ui/miscdlgs/highred.cxx +++ b/sc/source/ui/miscdlgs/highred.cxx @@ -150,7 +150,7 @@ void ScHighlightChgDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) } //---------------------------------------------------------------------------- -sal_Bool ScHighlightChgDlg::Close() +bool ScHighlightChgDlg::Close() { return DoClose( ScHighlightChgDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/miscdlgs/inscodlg.cxx b/sc/source/ui/miscdlgs/inscodlg.cxx index 52c740aa44ab..5213cad3f49a 100644 --- a/sc/source/ui/miscdlgs/inscodlg.cxx +++ b/sc/source/ui/miscdlgs/inscodlg.cxx @@ -98,18 +98,18 @@ ScInsertContentsDlg::ScInsertContentsDlg( Window* pParent, switch( ScInsertContentsDlg::nPreviousFormulaChecks ) { - case PASTE_NOFUNC: mpRbNoOp->Check(sal_True); break; - case PASTE_ADD: mpRbAdd->Check(sal_True); break; - case PASTE_SUB: mpRbSub->Check(sal_True); break; - case PASTE_MUL: mpRbMul->Check(sal_True); break; - case PASTE_DIV: mpRbDiv->Check(sal_True); break; + case PASTE_NOFUNC: mpRbNoOp->Check(true); break; + case PASTE_ADD: mpRbAdd->Check(true); break; + case PASTE_SUB: mpRbSub->Check(true); break; + case PASTE_MUL: mpRbMul->Check(true); break; + case PASTE_DIV: mpRbDiv->Check(true); break; } switch( ScInsertContentsDlg::nPreviousMoveMode ) { - case INS_NONE: mpRbMoveNone->Check(sal_True); break; - case INS_CELLSDOWN: mpRbMoveDown->Check(sal_True); break; - case INS_CELLSRIGHT: mpRbMoveRight->Check(sal_True); break; + case INS_NONE: mpRbMoveNone->Check(true); break; + case INS_CELLSDOWN: mpRbMoveDown->Check(true); break; + case INS_CELLSRIGHT: mpRbMoveRight->Check(true); break; } mpBtnSkipEmptyCells->Check( ( ScInsertContentsDlg::nPreviousChecks2 & INS_CONT_NOEMPTY ) != 0); @@ -242,7 +242,7 @@ void ScInsertContentsDlg::SetOtherDoc( bool bSet ) bOtherDoc = bSet; TestModes(); if ( bSet ) - mpRbMoveNone->Check(sal_True); + mpRbMoveNone->Check(true); } } @@ -253,7 +253,7 @@ void ScInsertContentsDlg::SetFillMode( bool bSet ) bFillMode = bSet; TestModes(); if ( bSet ) - mpRbMoveNone->Check(sal_True); + mpRbMoveNone->Check(true); } } @@ -264,7 +264,7 @@ void ScInsertContentsDlg::SetChangeTrack( bool bSet ) bChangeTrack = bSet; TestModes(); if ( bSet ) - mpRbMoveNone->Check(sal_True); + mpRbMoveNone->Check(true); } } @@ -278,9 +278,9 @@ void ScInsertContentsDlg::SetCellShiftDisabled( int nDisable ) bMoveRightDisabled = bRight; TestModes(); if ( bMoveDownDisabled && mpRbMoveDown->IsChecked() ) - mpRbMoveNone->Check(sal_True); + mpRbMoveNone->Check(true); if ( bMoveRightDisabled && mpRbMoveRight->IsChecked() ) - mpRbMoveNone->Check(sal_True); + mpRbMoveNone->Check(true); } } diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx index 0ed012d27afc..86367d7c49b5 100644 --- a/sc/source/ui/miscdlgs/instbdlg.cxx +++ b/sc/source/ui/miscdlgs/instbdlg.cxx @@ -203,7 +203,7 @@ void ScInsertTableDlg::FillTables_Impl( ScDocument* pSrcDoc ) } } - m_pLbTables->SetUpdateMode( sal_True ); + m_pLbTables->SetUpdateMode( true ); if(m_pLbTables->GetEntryCount()==1) m_pLbTables->SelectEntryPos(0); diff --git a/sc/source/ui/miscdlgs/mvtabdlg.cxx b/sc/source/ui/miscdlgs/mvtabdlg.cxx index 89d53a5b24ef..32c75cee5fe0 100644 --- a/sc/source/ui/miscdlgs/mvtabdlg.cxx +++ b/sc/source/ui/miscdlgs/mvtabdlg.cxx @@ -266,7 +266,7 @@ void ScMoveTableDlg::InitDocListBox() pSh = SfxObjectShell::GetNext( *pSh ); } - pLbDoc->SetUpdateMode( sal_True ); + pLbDoc->SetUpdateMode( true ); pLbDoc->InsertEntry(msNewDoc); pLbDoc->SelectEntryPos( nSelPos ); } @@ -336,7 +336,7 @@ IMPL_LINK( ScMoveTableDlg, SelHdl, ListBox *, pLb ) } } pLbTable->InsertEntry( ScGlobal::GetRscString(STR_MOVE_TO_END) ); - pLbTable->SetUpdateMode( sal_True ); + pLbTable->SetUpdateMode( true ); pLbTable->SelectEntryPos( 0 ); ResetRenameInput(); } diff --git a/sc/source/ui/miscdlgs/optsolver.cxx b/sc/source/ui/miscdlgs/optsolver.cxx index 3aad81c1bb52..df8fb341c65d 100644 --- a/sc/source/ui/miscdlgs/optsolver.cxx +++ b/sc/source/ui/miscdlgs/optsolver.cxx @@ -451,7 +451,7 @@ void ScOptSolverDlg::EnableButtons() //---------------------------------------------------------------------------- -sal_Bool ScOptSolverDlg::Close() +bool ScOptSolverDlg::Close() { return DoClose( ScOptSolverDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/miscdlgs/simpref.cxx b/sc/source/ui/miscdlgs/simpref.cxx index 8f67f2eeb25b..f44668da4134 100644 --- a/sc/source/ui/miscdlgs/simpref.cxx +++ b/sc/source/ui/miscdlgs/simpref.cxx @@ -127,10 +127,10 @@ void ScSimpleRefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) //---------------------------------------------------------------------------- -sal_Bool ScSimpleRefDlg::Close() +bool ScSimpleRefDlg::Close() { CancelBtnHdl(m_pBtnCancel); - return sal_True; + return true; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/miscdlgs/solvrdlg.cxx b/sc/source/ui/miscdlgs/solvrdlg.cxx index 8f98d41ab605..6762b599a028 100644 --- a/sc/source/ui/miscdlgs/solvrdlg.cxx +++ b/sc/source/ui/miscdlgs/solvrdlg.cxx @@ -109,7 +109,7 @@ void ScSolverDlg::Init() //---------------------------------------------------------------------------- -sal_Bool ScSolverDlg::Close() +bool ScSolverDlg::Close() { return DoClose( ScSolverDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/miscdlgs/tabopdlg.cxx b/sc/source/ui/miscdlgs/tabopdlg.cxx index 141b67095600..67c08135fdd6 100644 --- a/sc/source/ui/miscdlgs/tabopdlg.cxx +++ b/sc/source/ui/miscdlgs/tabopdlg.cxx @@ -116,7 +116,7 @@ void ScTabOpDlg::Init() //---------------------------------------------------------------------------- -sal_Bool ScTabOpDlg::Close() +bool ScTabOpDlg::Close() { return DoClose( ScTabOpDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/namedlg/namedefdlg.cxx b/sc/source/ui/namedlg/namedefdlg.cxx index bde1f16718c1..83ed95ee9672 100644 --- a/sc/source/ui/namedlg/namedefdlg.cxx +++ b/sc/source/ui/namedlg/namedefdlg.cxx @@ -295,7 +295,7 @@ void ScNameDefDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) } } -sal_Bool ScNameDefDlg::Close() +bool ScNameDefDlg::Close() { return DoClose( ScNameDefDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/namedlg/namedlg.cxx b/sc/source/ui/namedlg/namedlg.cxx index 583325185863..1fb8a11f8412 100644 --- a/sc/source/ui/namedlg/namedlg.cxx +++ b/sc/source/ui/namedlg/namedlg.cxx @@ -179,7 +179,7 @@ void ScNameDlg::SetReference( const ScRange& rRef, ScDocument* pDocP ) } } -sal_Bool ScNameDlg::Close() +bool ScNameDlg::Close() { if (mbDataChanged && !mbCloseWithoutUndo) mpViewData->GetDocFunc().ModifyAllRangeNames(maRangeMap); diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx index a181b5150199..e145143b87d0 100644 --- a/sc/source/ui/navipi/content.cxx +++ b/sc/source/ui/navipi/content.cxx @@ -239,7 +239,7 @@ void ScContentTree::ClearAll() //the InitRoot() method won't be called. Then if a user click or press key to update the navigator tree, crash happens. //So the solution is to disable the UpdateMode of Control, then call Clear(), then recover the update mode sal_Bool bOldUpdate = Control::IsUpdateMode(); - Control::SetUpdateMode(sal_False); + Control::SetUpdateMode(false); Clear(); Control::SetUpdateMode(bOldUpdate); for (sal_uInt16 i=1; i<SC_CONTENT_COUNT; i++) diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx index df0863f2ddfa..0e8319242828 100644 --- a/sc/source/ui/navipi/navipi.cxx +++ b/sc/source/ui/navipi/navipi.cxx @@ -1356,7 +1356,7 @@ void ScNavigatorDlg::GetDocNames( const OUString* pManualSel ) aSelEntry = aEntry; } - aLbDocuments.SetUpdateMode( sal_True ); + aLbDocuments.SetUpdateMode( true ); aLbDocuments.SelectEntry( aSelEntry ); } diff --git a/sc/source/ui/navipi/scenwnd.cxx b/sc/source/ui/navipi/scenwnd.cxx index 8e1b0383eb77..d97aeeee4da9 100644 --- a/sc/source/ui/navipi/scenwnd.cxx +++ b/sc/source/ui/navipi/scenwnd.cxx @@ -40,7 +40,7 @@ ScScenarioListBox::ScScenarioListBox( ScScenarioWindow& rParent ) : mrParent( rParent ) { Font aFont( GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aFont.SetWeight( WEIGHT_LIGHT ); SetFont( aFont ); } @@ -91,7 +91,7 @@ void ScScenarioListBox::UpdateEntries( const std::vector<OUString> &aNewEntryLis maEntries.push_back( aEntry ); InsertEntry( aEntry.maName, LISTBOX_APPEND ); } - SetUpdateMode( sal_True ); + SetUpdateMode( true ); SetNoSelection(); mrParent.SetComment( EMPTY_OUSTRING ); } @@ -205,7 +205,7 @@ ScScenarioWindow::ScScenarioWindow( Window* pParent, const OUString& aQH_List, aEdComment ( this, WB_BORDER | WB_LEFT | WB_READONLY | WB_VSCROLL | WB_TABSTOP ) { Font aFont( GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aFont.SetWeight( WEIGHT_LIGHT ); aEdComment.SetFont( aFont ); aEdComment.SetMaxTextLen( 512 ); diff --git a/sc/source/ui/optdlg/opredlin.cxx b/sc/source/ui/optdlg/opredlin.cxx index 385cef932f46..9fcfee9f4e1e 100644 --- a/sc/source/ui/optdlg/opredlin.cxx +++ b/sc/source/ui/optdlg/opredlin.cxx @@ -159,10 +159,10 @@ void ScRedlineOptionsTabPage::Reset( const SfxItemSet& /* rSet */ ) m_pInsertColorLB->InsertEntry( aColor, sName ); m_pRemoveColorLB->InsertEntry( aColor, sName ); } - m_pContentColorLB->SetUpdateMode( sal_True ); - m_pMoveColorLB->SetUpdateMode( sal_True ); - m_pInsertColorLB->SetUpdateMode( sal_True ); - m_pRemoveColorLB->SetUpdateMode( sal_True ); + m_pContentColorLB->SetUpdateMode( true ); + m_pMoveColorLB->SetUpdateMode( true ); + m_pInsertColorLB->SetUpdateMode( true ); + m_pRemoveColorLB->SetUpdateMode( true ); ScAppOptions aAppOptions=SC_MOD()->GetAppOptions(); diff --git a/sc/source/ui/optdlg/tpview.cxx b/sc/source/ui/optdlg/tpview.cxx index 1180bdcb1b91..568daece00af 100644 --- a/sc/source/ui/optdlg/tpview.cxx +++ b/sc/source/ui/optdlg/tpview.cxx @@ -329,7 +329,7 @@ void ScTpContentOptions::InitGridOpt() pColorLB->GetEntryPos( aStdCol ) ) pColorLB->InsertEntry( aStdCol, ScGlobal::GetRscString( STR_GRIDCOLOR ) ); - pColorLB->SetUpdateMode( sal_True ); + pColorLB->SetUpdateMode( true ); Invalidate(); } diff --git a/sc/source/ui/pagedlg/areasdlg.cxx b/sc/source/ui/pagedlg/areasdlg.cxx index a18a86b2be37..cfe2ed3c0534 100644 --- a/sc/source/ui/pagedlg/areasdlg.cxx +++ b/sc/source/ui/pagedlg/areasdlg.cxx @@ -163,7 +163,7 @@ ScPrintAreasDlg::~ScPrintAreasDlg() //---------------------------------------------------------------------------- -sal_Bool ScPrintAreasDlg::Close() +bool ScPrintAreasDlg::Close() { return DoClose( ScPrintAreasDlgWrapper::GetChildWindowId() ); } diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx index 7bd3fca375f6..dc0b9d03d531 100644 --- a/sc/source/ui/pagedlg/tphfedit.cxx +++ b/sc/source/ui/pagedlg/tphfedit.cxx @@ -424,7 +424,7 @@ void ScExtIButton::StartPopup() if(pPopupMenu!=NULL) { - SetPressed( sal_True ); + SetPressed( true ); EndSelection(); Point aPoint(0,0); aPoint.Y()=GetOutputSizePixel().Height(); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index a767733668f4..dcdd27036ea0 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -271,7 +271,7 @@ ScPrintUIOptions::ScPrintUIOptions() aChoices, nContent ); // show Subgroup for print range - aPrintRangeOpt.mbInternalOnly = sal_True; + aPrintRangeOpt.mbInternalOnly = true; m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("fromwhich", OUString(aStrings.GetString(6)), OUString(), aPrintRangeOpt); @@ -294,7 +294,7 @@ ScPrintUIOptions::ScPrintUIOptions() 0 ); // create a an Edit dependent on "Pages" selected - vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true ); m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(), ".HelpID:vcl:PrintDialog:PageRange:Edit", "PageRange", OUString(), aPageRangeOpt); diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 3e04371c3525..3449885204ca 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -1049,7 +1049,7 @@ void ScGridWindow::DoScenarioMenu( const ScRange& rScenRange ) pFilterFloat->SetOutputSizePixel( aSize ); pFilterFloat->StartPopupMode( aCellRect, FLOATWIN_POPUPMODE_DOWN|FLOATWIN_POPUPMODE_GRABFOCUS ); - pFilterBox->SetUpdateMode(sal_True); + pFilterBox->SetUpdateMode(true); pFilterBox->GrabFocus(); sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx index 182eec707c49..f039502a6c30 100644 --- a/sc/source/ui/view/gridwin5.cxx +++ b/sc/source/ui/view/gridwin5.cxx @@ -449,7 +449,7 @@ void ScGridWindow::HideNoteMarker() com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > ScGridWindow::CreateAccessible() { - com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc= GetAccessible(sal_False); + com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc= GetAccessible(false); if (xAcc.is()) { return xAcc; @@ -472,7 +472,7 @@ com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > // please update the code to use that event mechanism void ScGridWindow::SwitchView() { - ScAccessibleDocumentBase* pAccDoc = static_cast<ScAccessibleDocumentBase*>(GetAccessible(sal_False).get()); + ScAccessibleDocumentBase* pAccDoc = static_cast<ScAccessibleDocumentBase*>(GetAccessible(false).get()); if (pAccDoc) { pAccDoc->SwitchViewFireFocus(); diff --git a/sc/source/ui/view/hdrcont.cxx b/sc/source/ui/view/hdrcont.cxx index 239f25f1de6e..9ce482b73659 100644 --- a/sc/source/ui/view/hdrcont.cxx +++ b/sc/source/ui/view/hdrcont.cxx @@ -68,7 +68,7 @@ ScHeaderControl::ScHeaderControl( Window* pParent, SelectionEngine* pSelectionEn EnableRTL( false ); aNormFont = GetFont(); - aNormFont.SetTransparent( sal_True ); //! WEIGHT_NORMAL hart setzen ??? + aNormFont.SetTransparent( true ); //! WEIGHT_NORMAL hart setzen ??? aBoldFont = aNormFont; aBoldFont.SetWeight( WEIGHT_BOLD ); @@ -454,7 +454,7 @@ void ScHeaderControl::Paint( const Rectangle& rRect ) else aTransRect = Rectangle( nTransStart, 0, nTransEnd, nBarSize-1 ); SetBackground( Color( rStyleSettings.GetFaceColor() ) ); - DrawSelectionBackground( aTransRect, 0, sal_True, false, false ); + DrawSelectionBackground( aTransRect, 0, true, false, false ); SetBackground(); } break; diff --git a/sc/source/ui/view/hintwin.cxx b/sc/source/ui/view/hintwin.cxx index b1d725a49849..a4d662a5c91e 100644 --- a/sc/source/ui/view/hintwin.cxx +++ b/sc/source/ui/view/hintwin.cxx @@ -36,7 +36,7 @@ ScHintWindow::ScHintWindow( Window* pParent, const OUString& rTit, const OUStrin SetBackground( aYellow ); aTextFont = GetFont(); - aTextFont.SetTransparent( sal_True ); + aTextFont.SetTransparent( true ); aTextFont.SetWeight( WEIGHT_NORMAL ); aHeadFont = aTextFont; aHeadFont.SetWeight( WEIGHT_BOLD ); diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 38b9b90ce5a7..fbcc0fbc440a 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -1471,7 +1471,7 @@ void ScPreview::LoseFocus() com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPreview::CreateAccessible() { - com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> xAcc= GetAccessible(sal_False); + com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> xAcc= GetAccessible(false); if (xAcc.is()) { return xAcc; @@ -1490,7 +1490,7 @@ com::sun::star::uno::Reference<com::sun::star::accessibility::XAccessible> ScPre // There are other notifications for this when the active view has chnaged, so please update the code to use that event mechanism void ScPreview::SwitchView() { - ScAccessibleDocumentBase* pAccDoc = static_cast<ScAccessibleDocumentBase*>(GetAccessible(sal_False).get()); + ScAccessibleDocumentBase* pAccDoc = static_cast<ScAccessibleDocumentBase*>(GetAccessible(false).get()); if (pAccDoc) { pAccDoc->SwitchViewFireFocus(); diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx index 008954f60554..616c0e8f4a97 100644 --- a/sc/source/ui/view/select.cxx +++ b/sc/source/ui/view/select.cxx @@ -296,7 +296,7 @@ void ScViewFunctionSet::SetAnchorFlag( bool bSet ) bAnchor = bSet; } -sal_Bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ ) +bool ScViewFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ ) { if ( bDidSwitch ) { @@ -692,7 +692,7 @@ bool ScViewFunctionSet::SetCursorAtCell( SCsCOL nPosX, SCsROW nPosY, bool bScrol return true; } -sal_Bool ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +bool ScViewFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { bool bRefMode = SC_MOD()->IsFormulaMode(); if (bRefMode) @@ -806,7 +806,7 @@ void ScHeaderFunctionSet::DestroyAnchor() bAnchor = false; } -sal_Bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ ) +bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool /* bDontSelectAtCursor */ ) { if ( bDidSwitch ) { @@ -907,7 +907,7 @@ sal_Bool ScHeaderFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bo return true; } -sal_Bool ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +bool ScHeaderFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { SCsCOL nPosX; SCsROW nPosY; diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 3e20b56f68ec..128897396a41 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -160,7 +160,7 @@ void ScXMLSourceDlg::SetActive() RefInputDone(); } -sal_Bool ScXMLSourceDlg::Close() +bool ScXMLSourceDlg::Close() { return DoClose(ScXMLSourceDlgWrapper::GetChildWindowId()); } diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx index eb5f338c5f76..52107528eaa5 100644 --- a/sd/source/core/stlpool.cxx +++ b/sd/source/core/stlpool.cxx @@ -1154,10 +1154,10 @@ Font SdStyleSheetPool::GetBulletFont() const aBulletFont.SetOverline(UNDERLINE_NONE); aBulletFont.SetStrikeout(STRIKEOUT_NONE); aBulletFont.SetItalic(ITALIC_NONE); - aBulletFont.SetOutline(sal_False); - aBulletFont.SetShadow(sal_False); + aBulletFont.SetOutline(false); + aBulletFont.SetShadow(false); aBulletFont.SetColor(Color(COL_AUTO)); - aBulletFont.SetTransparent(sal_True); + aBulletFont.SetTransparent(true); return aBulletFont; } diff --git a/sd/source/filter/html/pubdlg.cxx b/sd/source/filter/html/pubdlg.cxx index fdb812e92b9d..ffbba781393e 100644 --- a/sd/source/filter/html/pubdlg.cxx +++ b/sd/source/filter/html/pubdlg.cxx @@ -724,8 +724,8 @@ void SdPublishingDlg::SetDefaults() SdPublishingDesign aDefault; SetDesign(&aDefault); - pPage1_NewDesign->Check(sal_True); - pPage1_OldDesign->Check(sal_False); + pPage1_NewDesign->Check(true); + pPage1_OldDesign->Check(false); UpdatePage(); } @@ -905,8 +905,8 @@ IMPL_LINK( SdPublishingDlg, DesignHdl, RadioButton *, pButton ) { if(pButton == pPage1_NewDesign) { - pPage1_NewDesign->Check(sal_True); // because of DesignDeleteHdl - pPage1_OldDesign->Check(sal_False); + pPage1_NewDesign->Check(true); // because of DesignDeleteHdl + pPage1_OldDesign->Check(false); pPage1_Designs->Disable(); pPage1_DelDesign->Disable(); m_pDesign = NULL; @@ -916,7 +916,7 @@ IMPL_LINK( SdPublishingDlg, DesignHdl, RadioButton *, pButton ) } else { - pPage1_NewDesign->Check(sal_False); + pPage1_NewDesign->Check(false); pPage1_Designs->Enable(); pPage1_DelDesign->Enable(); @@ -1038,7 +1038,7 @@ IMPL_LINK( SdPublishingDlg, ResolutionHdl, RadioButton *, pButton ) IMPL_LINK_NOARG(SdPublishingDlg, ButtonsHdl) { // if one bitmap-button is chosen, then disable TextOnly - pPage5_TextOnly->Check(sal_False); + pPage5_TextOnly->Check(false); return 0; } @@ -1078,7 +1078,7 @@ IMPL_LINK( SdPublishingDlg, ColorHdl, PushButton *, pButton) m_aALinkColor = aDlg.GetColor(); } - pPage6_User->Check(sal_True); + pPage6_User->Check(true); pPage6_Preview->SetColors( m_aBackColor, m_aTextColor, m_aLinkColor, m_aVLinkColor, m_aALinkColor ); pPage6_Preview->Invalidate(); diff --git a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx index fcc0c17bf50c..cb838dbc3f28 100644 --- a/sd/source/ui/animations/CustomAnimationCreateDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationCreateDialog.cxx @@ -92,7 +92,7 @@ private: CategoryListBox::CategoryListBox( Window* pParent ) : ListBox( pParent, WB_TABSTOP | WB_BORDER ) { - EnableUserDraw( sal_True ); + EnableUserDraw( true ); SetDoubleClickHdl( LINK( this, CategoryListBox, implDoubleClickHdl ) ); } @@ -142,7 +142,7 @@ void CategoryListBox::UserDraw( const UserDrawEvent& rUDEvt ) } else { - DrawEntry( rUDEvt, sal_True, sal_True ); + DrawEntry( rUDEvt, true, true ); } } diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx index ee6763c7eda7..60135d8b0ad4 100644 --- a/sd/source/ui/animations/CustomAnimationDialog.cxx +++ b/sd/source/ui/animations/CustomAnimationDialog.cxx @@ -1195,7 +1195,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con if ( !pColorList.is() ) pColorList = XColorList::CreateStdColorList(); - mpCLBDimColor->SetUpdateMode( sal_False ); + mpCLBDimColor->SetUpdateMode( false ); for ( long i = 0; i < pColorList->Count(); i++ ) { @@ -1203,7 +1203,7 @@ CustomAnimationEffectTabPage::CustomAnimationEffectTabPage( Window* pParent, con mpCLBDimColor->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - mpCLBDimColor->SetUpdateMode( sal_True ); + mpCLBDimColor->SetUpdateMode( true ); // only show settings if all selected effects have the same preset-id if( pSet->getPropertyState( nHandlePresetId ) != STLPropertyState_AMBIGUOUS ) @@ -1658,7 +1658,7 @@ void CustomAnimationEffectTabPage::openSoundFileDialog() OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE)); aStrWarning = aStrWarning.replaceFirst("%", aFile); WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ); - aWarningBox.SetModalInputMode (sal_True); + aWarningBox.SetModalInputMode (true); bQuitLoop = aWarningBox.Execute()==RET_RETRY ? sal_False : sal_True; bValidSoundFile=false; @@ -1900,8 +1900,8 @@ IMPL_LINK( CustomAnimationDurationTabPage, implControlHdl, Control*, pControl ) { if( pControl == mpLBTrigger ) { - mpRBClickSequence->Check( sal_False ); - mpRBInteractive->Check( sal_True ); + mpRBClickSequence->Check( false ); + mpRBInteractive->Check( true ); } return 0; @@ -2234,7 +2234,7 @@ void CustomAnimationTextAnimTabPage::updateControlStates() if( !mbHasVisibleShapes && nPos > 0 ) { - maCBXAnimateForm->Check(sal_False); + maCBXAnimateForm->Check(false); maCBXAnimateForm->Enable(false); } else diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx index 958b86d17532..677ddd7f2587 100644 --- a/sd/source/ui/animations/SlideTransitionPane.cxx +++ b/sd/source/ui/animations/SlideTransitionPane.cxx @@ -662,8 +662,8 @@ void SlideTransitionPane::updateControls() if( aEffect.mbPresChangeAmbiguous ) { - mpRB_ADVANCE_ON_MOUSE->Check( sal_False ); - mpRB_ADVANCE_AUTO->Check( sal_False ); + mpRB_ADVANCE_ON_MOUSE->Check( false ); + mpRB_ADVANCE_AUTO->Check( false ); } else { @@ -749,7 +749,7 @@ void SlideTransitionPane::openSoundFileDialog() OUString aStrWarning(SD_RESSTR(STR_WARNING_NOSOUNDFILE)); aStrWarning = aStrWarning.replaceFirst("%", aFile); WarningBox aWarningBox( NULL, WB_3DLOOK | WB_RETRY_CANCEL, aStrWarning ); - aWarningBox.SetModalInputMode (sal_True); + aWarningBox.SetModalInputMode (true); bQuitLoop = (aWarningBox.Execute() != RET_RETRY); bValidSoundFile = false; diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx index ec998abda243..3da2764a151b 100644 --- a/sd/source/ui/annotations/annotationmanager.cxx +++ b/sd/source/ui/annotations/annotationmanager.cxx @@ -989,11 +989,11 @@ void AnnotationManagerImpl::ExecuteAnnotationContextMenu( Reference< XAnnotation { if( pAnnotationWindow->IsProtected() || bReadOnly ) { - pMenu->EnableItem( SID_ATTR_CHAR_WEIGHT, sal_False ); - pMenu->EnableItem( SID_ATTR_CHAR_POSTURE, sal_False ); - pMenu->EnableItem( SID_ATTR_CHAR_UNDERLINE, sal_False ); - pMenu->EnableItem( SID_ATTR_CHAR_STRIKEOUT, sal_False ); - pMenu->EnableItem( SID_PASTE, sal_False ); + pMenu->EnableItem( SID_ATTR_CHAR_WEIGHT, false ); + pMenu->EnableItem( SID_ATTR_CHAR_POSTURE, false ); + pMenu->EnableItem( SID_ATTR_CHAR_UNDERLINE, false ); + pMenu->EnableItem( SID_ATTR_CHAR_STRIKEOUT, false ); + pMenu->EnableItem( SID_PASTE, false ); } else { diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index d25d45ce0c62..857ff1a09bb6 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -598,7 +598,7 @@ BitmapEx AnnotationTag::CreateAnnotationBitmap( bool bSelected ) const int BORDER_Y = 4; // pixels maSize = Size( aVDev.GetTextWidth( sAuthor ) + 2*BORDER_X, aVDev.GetTextHeight() + 2*BORDER_Y ); - aVDev.SetOutputSizePixel( maSize, sal_False ); + aVDev.SetOutputSizePixel( maSize, false ); Color aBorderColor( maColor ); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 412ca0cce32c..ee1ab02d015b 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -328,7 +328,7 @@ void AnnotationWindow::InitControls() mpOutliner->SetRefDevice( pDev ); } - mpTextWindow->EnableRTL( sal_False ); + mpTextWindow->EnableRTL( false ); mpOutlinerView = new OutlinerView ( mpOutliner, mpTextWindow ); mpOutliner->InsertView(mpOutlinerView ); mpTextWindow->SetOutlinerView(mpOutlinerView); diff --git a/sd/source/ui/app/tbxww.cxx b/sd/source/ui/app/tbxww.cxx index 8a8204526801..5669e44a9c16 100644 --- a/sd/source/ui/app/tbxww.cxx +++ b/sd/source/ui/app/tbxww.cxx @@ -144,7 +144,7 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId, if( nImage == 0 ) { if( rTbx.IsItemChecked( nSId ) ) - rTbx.CheckItem( nSId, sal_False ); + rTbx.CheckItem( nSId, false ); } else { @@ -168,28 +168,28 @@ void SdTbxControl::StateChanged( sal_uInt16 nSId, { if( nSId != SID_OBJECT_CHOOSE_MODE && rTbx.IsItemChecked( SID_OBJECT_CHOOSE_MODE ) ) - rTbx.CheckItem( SID_OBJECT_CHOOSE_MODE, sal_False ); + rTbx.CheckItem( SID_OBJECT_CHOOSE_MODE, false ); if( nSId != SID_DRAWTBX_TEXT && rTbx.IsItemChecked( SID_DRAWTBX_TEXT ) ) - rTbx.CheckItem( SID_DRAWTBX_TEXT, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_TEXT, false ); if( nSId != SID_DRAWTBX_RECTANGLES && rTbx.IsItemChecked( SID_DRAWTBX_RECTANGLES ) ) - rTbx.CheckItem( SID_DRAWTBX_RECTANGLES, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_RECTANGLES, false ); if( nSId != SID_DRAWTBX_ELLIPSES && rTbx.IsItemChecked( SID_DRAWTBX_ELLIPSES ) ) - rTbx.CheckItem( SID_DRAWTBX_ELLIPSES, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_ELLIPSES, false ); if( nSId != SID_DRAWTBX_LINES && rTbx.IsItemChecked( SID_DRAWTBX_LINES ) ) - rTbx.CheckItem( SID_DRAWTBX_LINES, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_LINES, false ); if( nSId != SID_DRAWTBX_ARROWS && rTbx.IsItemChecked( SID_DRAWTBX_ARROWS ) ) - rTbx.CheckItem( SID_DRAWTBX_ARROWS, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_ARROWS, false ); if( nSId != SID_DRAWTBX_3D_OBJECTS && rTbx.IsItemChecked( SID_DRAWTBX_3D_OBJECTS ) ) - rTbx.CheckItem( SID_DRAWTBX_3D_OBJECTS, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_3D_OBJECTS, false ); if( nSId != SID_DRAWTBX_CONNECTORS && rTbx.IsItemChecked( SID_DRAWTBX_CONNECTORS ) ) - rTbx.CheckItem( SID_DRAWTBX_CONNECTORS, sal_False ); + rTbx.CheckItem( SID_DRAWTBX_CONNECTORS, false ); } } } diff --git a/sd/source/ui/dlg/LayerDialogContent.cxx b/sd/source/ui/dlg/LayerDialogContent.cxx index 552a59207e65..0e43d289f574 100644 --- a/sd/source/ui/dlg/LayerDialogContent.cxx +++ b/sd/source/ui/dlg/LayerDialogContent.cxx @@ -76,7 +76,7 @@ LayerDialogContent::~LayerDialogContent (void) -sal_Bool LayerDialogContent::Close (void) +bool LayerDialogContent::Close (void) { return SfxDockingWindow::Close(); } diff --git a/sd/source/ui/dlg/animobjs.cxx b/sd/source/ui/dlg/animobjs.cxx index 79f23a01980d..b81471c1c584 100644 --- a/sd/source/ui/dlg/animobjs.cxx +++ b/sd/source/ui/dlg/animobjs.cxx @@ -811,11 +811,11 @@ void AnimationWindow::Resize() // ----------------------------------------------------------------------- -sal_Bool AnimationWindow::Close() +bool AnimationWindow::Close() { if( maPlayLock.isLocked() ) { - return sal_False; + return false; } else { @@ -826,7 +826,7 @@ sal_Bool AnimationWindow::Close() SfxDockingWindow::Close(); - return sal_True; + return true; } } @@ -1132,7 +1132,7 @@ void AnimationWindow::CreateAnimObj (::sd::View& rView ) aAnimBmp.aSizePix = aBitmapSize; aAnimBmp.nWait = nTime; aAnimBmp.eDisposal = DISPOSE_BACK; - aAnimBmp.bUserInput = sal_False; + aAnimBmp.bUserInput = false; aAnimation.Insert( aAnimBmp ); aAnimation.SetDisplaySizePixel( aMaxSizePix ); diff --git a/sd/source/ui/dlg/custsdlg.cxx b/sd/source/ui/dlg/custsdlg.cxx index d047cb06fad6..049924b63e7b 100644 --- a/sd/source/ui/dlg/custsdlg.cxx +++ b/sd/source/ui/dlg/custsdlg.cxx @@ -304,7 +304,7 @@ SdDefineCustomShowDlg::SdDefineCustomShowDlg( Window* pWindow, // Hack: m_pLbPages used to be MultiLB. We don't have VCL builder equivalent // of it yet. So enable selecting multiple items here - m_pLbPages->EnableMultiSelection( sal_True ); + m_pLbPages->EnableMultiSelection( true ); // shape 'em a bit m_pLbPages->set_width_request(m_pLbPages->approximate_char_width() * 16); diff --git a/sd/source/ui/dlg/dlgass.cxx b/sd/source/ui/dlg/dlgass.cxx index a6f667427beb..ef79fdb83a6b 100644 --- a/sd/source/ui/dlg/dlgass.cxx +++ b/sd/source/ui/dlg/dlgass.cxx @@ -430,8 +430,8 @@ AssistentDlgImpl::AssistentDlgImpl( ::Window* pWindow, const Link& rFinishLink, mpPage1OpenPB->SetModeImage( GetUiIconForCommand(".uno:Open") ); - mpPage1OpenPB->EnableImageDisplay(sal_True); - mpPage1OpenPB->EnableTextDisplay(sal_True); + mpPage1OpenPB->EnableImageDisplay(true); + mpPage1OpenPB->EnableTextDisplay(true); mpPage1OpenPB->SetImageAlign(IMAGEALIGN_LEFT); mpPage1OpenPB->SetStyle(mpPage1OpenPB->GetStyle() | WB_CENTER); } diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx index 6a93c8d11606..3d42a5272d7c 100644 --- a/sd/source/ui/dlg/docprev.cxx +++ b/sd/source/ui/dlg/docprev.cxx @@ -227,7 +227,7 @@ void SdDocPreviewWin::updateViewSettings() aVDev.SetMapMode( aMap ); // Disable output, as we only want to record a metafile - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); pMtf->Record( &aVDev ); diff --git a/sd/source/ui/dlg/ins_paste.cxx b/sd/source/ui/dlg/ins_paste.cxx index 109fb757ebf3..acf843651910 100644 --- a/sd/source/ui/dlg/ins_paste.cxx +++ b/sd/source/ui/dlg/ins_paste.cxx @@ -25,7 +25,7 @@ SdInsertPasteDlg::SdInsertPasteDlg(Window* pWindow) { get(m_pRbBefore, "before"); get(m_pRbAfter, "after"); - m_pRbAfter->Check( sal_True ); + m_pRbAfter->Check( true ); } bool SdInsertPasteDlg::IsInsertBefore() const diff --git a/sd/source/ui/dlg/inspagob.cxx b/sd/source/ui/dlg/inspagob.cxx index 1c1ed12d9cc2..b400ca9d68cc 100644 --- a/sd/source/ui/dlg/inspagob.cxx +++ b/sd/source/ui/dlg/inspagob.cxx @@ -80,7 +80,7 @@ void SdInsertPagesObjsDlg::Reset() m_pLbTree->InsertEntry( rName, aImgText, aImgText ); } - m_pCbxMasters->Check( sal_True ); + m_pCbxMasters->Check( true ); } std::vector<OUString> SdInsertPagesObjsDlg::GetList( const sal_uInt16 nType ) diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 1950ddb0d6b1..71781cbe8425 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -350,8 +350,8 @@ IMPL_LINK( SdNavigatorWin, DropdownClickToolBoxHdl, ToolBox*, pBox ) if( ( pInfo && !pInfo->HasName() ) || !maTlbObjects.IsLinkableSelected() ) { - pMenu->EnableItem( NAVIGATOR_DRAGTYPE_LINK, sal_False ); - pMenu->EnableItem( NAVIGATOR_DRAGTYPE_URL, sal_False ); + pMenu->EnableItem( NAVIGATOR_DRAGTYPE_LINK, false ); + pMenu->EnableItem( NAVIGATOR_DRAGTYPE_URL, false ); meDragType = NAVIGATOR_DRAGTYPE_EMBEDDED; } @@ -912,7 +912,7 @@ void SdNavigatorControllerItem::StateChanged( sal_uInt16 nSId, pNavigatorWin->maToolbox.CheckItem( TBI_PEN ); if( nState & NAVBTN_PEN_UNCHECKED && pNavigatorWin->maToolbox.IsItemChecked( TBI_PEN ) ) - pNavigatorWin->maToolbox.CheckItem( TBI_PEN, sal_False ); + pNavigatorWin->maToolbox.CheckItem( TBI_PEN, false ); // only if doc in LB is the active NavDocInfo* pInfo = pNavigatorWin->GetDocInfo(); diff --git a/sd/source/ui/dlg/paragr.cxx b/sd/source/ui/dlg/paragr.cxx index 296961974343..689fec1cf7e0 100644 --- a/sd/source/ui/dlg/paragr.cxx +++ b/sd/source/ui/dlg/paragr.cxx @@ -115,7 +115,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet ) { const SfxBoolItem& rStart = (const SfxBoolItem&)rSet.Get(ATTR_NUMBER_NEWSTART); m_pNewStartCB->SetState( rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pNewStartCB->EnableTriState(sal_False); + m_pNewStartCB->EnableTriState(false); } else { @@ -133,7 +133,7 @@ void SdParagraphNumTabPage::Reset( const SfxItemSet& rSet ) nNewStart = 1; m_pNewStartNF->SetValue(nNewStart); - m_pNewStartNumberCB->EnableTriState(sal_False); + m_pNewStartNumberCB->EnableTriState(false); } else { diff --git a/sd/source/ui/dlg/present.cxx b/sd/source/ui/dlg/present.cxx index eb4f671bab9c..b7c14fefc02d 100644 --- a/sd/source/ui/dlg/present.cxx +++ b/sd/source/ui/dlg/present.cxx @@ -137,11 +137,11 @@ SdStartPresentationDlg::SdStartPresentationDlg( Window* pWindow, aCbxAutoLogo->Check( ( ( const SfxBoolItem& ) rOutAttrs.Get( ATTR_PRESENT_SHOW_PAUSELOGO ) ).GetValue() ); if( bWindow ) - aRbtWindow->Check( sal_True ); + aRbtWindow->Check( true ); else if( bEndless ) - aRbtAuto->Check( sal_True ); + aRbtAuto->Check( true ); else - aRbtStandard->Check( sal_True ); + aRbtStandard->Check( true ); InitMonitorSettings(); @@ -317,7 +317,7 @@ IMPL_LINK_NOARG(SdStartPresentationDlg, ClickWindowPresentationHdl) if( bWindow ) { aCbxAlwaysOnTop->Enable( false ); - aCbxAlwaysOnTop->Check( sal_False ); + aCbxAlwaysOnTop->Check( false ); } else aCbxAlwaysOnTop->Enable(); diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx index 0fc9320534e1..cc57f68fc360 100644 --- a/sd/source/ui/dlg/sdabstdlg.cxx +++ b/sd/source/ui/dlg/sdabstdlg.cxx @@ -43,7 +43,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create() #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING static ::osl::Module aDialogLibrary; - static const OUString sLibName(::vcl::unohelper::CreateLibraryName("sdui", sal_True)); + static const OUString sLibName(::vcl::unohelper::CreateLibraryName("sdui", true)); if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) ) fp = ( SdAbstractDialogFactory* (SAL_CALL*)() ) aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" ); diff --git a/sd/source/ui/dlg/sdpreslt.cxx b/sd/source/ui/dlg/sdpreslt.cxx index bfa60140132e..c7bd85c4ad89 100644 --- a/sd/source/ui/dlg/sdpreslt.cxx +++ b/sd/source/ui/dlg/sdpreslt.cxx @@ -74,7 +74,7 @@ void SdPresLayoutDlg::Reset() } // remove not used master pages - m_pCbxCheckMasters->Check(sal_False); + m_pCbxCheckMasters->Check(false); if(mrOutAttrs.GetItemState(ATTR_PRESLAYOUT_NAME, true, &pPoolItem) == SFX_ITEM_SET) maName = ((const SfxStringItem*)pPoolItem)->GetValue(); diff --git a/sd/source/ui/dlg/vectdlg.cxx b/sd/source/ui/dlg/vectdlg.cxx index bd159e99555b..7ad6dc631ae2 100644 --- a/sd/source/ui/dlg/vectdlg.cxx +++ b/sd/source/ui/dlg/vectdlg.cxx @@ -240,8 +240,8 @@ void SdVectorizeDlg::AddTile( BitmapReadAccess* pRAcc, GDIMetaFile& rMtf, if( aRect.Bottom() > ( rMaxSize.Height() - 1L ) ) aRect.Bottom() = rMaxSize.Height() - 1L; - rMtf.AddAction( new MetaLineColorAction( aColor, sal_True ) ); - rMtf.AddAction( new MetaFillColorAction( aColor, sal_True ) ); + rMtf.AddAction( new MetaLineColorAction( aColor, true ) ); + rMtf.AddAction( new MetaFillColorAction( aColor, true ) ); rMtf.AddAction( new MetaRectAction( aRect ) ); } diff --git a/sd/source/ui/framework/factories/FullScreenPane.cxx b/sd/source/ui/framework/factories/FullScreenPane.cxx index 281c4650b5d5..abe7232bbf26 100644 --- a/sd/source/ui/framework/factories/FullScreenPane.cxx +++ b/sd/source/ui/framework/factories/FullScreenPane.cxx @@ -62,7 +62,7 @@ FullScreenPane::FullScreenPane ( return; // Create a new top-leve window that is displayed full screen. - mpWorkWindow->ShowFullScreenMode(sal_True, nScreenNumber); + mpWorkWindow->ShowFullScreenMode(true, nScreenNumber); // For debugging (non-fullscreen) use mpWorkWindow->SetScreenNumber(nScreenNumber); mpWorkWindow->SetMenuBarMode(MENUBAR_MODE_HIDE); mpWorkWindow->SetBorderStyle(WINDOW_BORDER_REMOVEBORDER); @@ -167,7 +167,7 @@ Reference<css::accessibility::XAccessible> SAL_CALL FullScreenPane::getAccessibl ThrowIfDisposed(); if (mpWorkWindow != 0) - return mpWorkWindow->GetAccessible(sal_False); + return mpWorkWindow->GetAccessible(false); else return NULL; } diff --git a/sd/source/ui/framework/factories/Pane.cxx b/sd/source/ui/framework/factories/Pane.cxx index 30bcaa0f9c9f..42cb84cfc84d 100644 --- a/sd/source/ui/framework/factories/Pane.cxx +++ b/sd/source/ui/framework/factories/Pane.cxx @@ -149,7 +149,7 @@ Reference<css::accessibility::XAccessible> SAL_CALL Pane::getAccessible (void) ThrowIfDisposed(); ::Window* pWindow = GetWindow(); if (pWindow != NULL) - return pWindow->GetAccessible(sal_False); + return pWindow->GetAccessible(false); else return NULL; } diff --git a/sd/source/ui/inc/LayerDialogContent.hxx b/sd/source/ui/inc/LayerDialogContent.hxx index 4e1d9ef2779e..3a9331528a70 100644 --- a/sd/source/ui/inc/LayerDialogContent.hxx +++ b/sd/source/ui/inc/LayerDialogContent.hxx @@ -41,7 +41,7 @@ public: virtual ~LayerDialogContent (void); protected: - virtual sal_Bool Close (void); + virtual bool Close (void); virtual void Resize (void); private: diff --git a/sd/source/ui/inc/animobjs.hxx b/sd/source/ui/inc/animobjs.hxx index 1a6a94551536..fc156511a50d 100644 --- a/sd/source/ui/inc/animobjs.hxx +++ b/sd/source/ui/inc/animobjs.hxx @@ -98,7 +98,7 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ); protected: - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual void FillInfo( SfxChildWinInfo& ) const; diff --git a/sd/source/ui/presenter/PresenterHelper.cxx b/sd/source/ui/presenter/PresenterHelper.cxx index 52cce1468653..a8622a091b0a 100644 --- a/sd/source/ui/presenter/PresenterHelper.cxx +++ b/sd/source/ui/presenter/PresenterHelper.cxx @@ -129,7 +129,7 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow ( // Make the frame window transparent and make the parent able to // draw behind it. if (pParentWindow != NULL) - pParentWindow->EnableChildTransparentMode(sal_True); + pParentWindow->EnableChildTransparentMode(true); } if (pWindow != NULL) @@ -141,12 +141,12 @@ Reference<awt::XWindow> SAL_CALL PresenterHelper::createWindow ( if ( ! bEnableParentClip) { pWindow->SetParentClipMode(PARENTCLIPMODE_NOCLIP); - pWindow->SetPaintTransparent(sal_True); + pWindow->SetPaintTransparent(true); } else { pWindow->SetParentClipMode(PARENTCLIPMODE_CLIP); - pWindow->SetPaintTransparent(sal_False); + pWindow->SetPaintTransparent(false); } } diff --git a/sd/source/ui/presenter/PresenterTextView.cxx b/sd/source/ui/presenter/PresenterTextView.cxx index ae8627ecf312..a8be21fed460 100644 --- a/sd/source/ui/presenter/PresenterTextView.cxx +++ b/sd/source/ui/presenter/PresenterTextView.cxx @@ -561,7 +561,7 @@ Reference<rendering::XBitmap> PresenterTextView::Implementation::GetBitmap (void delete mpOutputDevice; mpOutputDevice = new VirtualDevice(*Application::GetDefaultDevice(), 0, 0); mpOutputDevice->SetMapMode(MAP_PIXEL); - mpOutputDevice->SetOutputSizePixel(maSize, sal_True); + mpOutputDevice->SetOutputSizePixel(maSize, true); mpOutputDevice->SetLineColor(); mpOutputDevice->SetFillColor(); mpOutputDevice->SetBackground(Wallpaper()); diff --git a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx index 9fc151d163ec..b590a2b6214f 100644 --- a/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/CurrentMasterPagesSelector.cxx @@ -260,7 +260,7 @@ void CurrentMasterPagesSelector::ProcessPopupMenu (Menu& rMenu) if (mrDocument.GetMasterPageUserCount(GetSelectedMasterPage()) > 0) { if (rMenu.GetItemPos(SID_DELETE_MASTER_PAGE) != MENU_ITEM_NOTFOUND) - rMenu.EnableItem(SID_DELETE_MASTER_PAGE, sal_False); + rMenu.EnableItem(SID_DELETE_MASTER_PAGE, false); } ::boost::shared_ptr<DrawViewShell> pDrawViewShell ( @@ -269,7 +269,7 @@ void CurrentMasterPagesSelector::ProcessPopupMenu (Menu& rMenu) && pDrawViewShell->GetEditMode() == EM_MASTERPAGE) { if (rMenu.GetItemPos(SID_TP_EDIT_MASTER) != MENU_ITEM_NOTFOUND) - rMenu.EnableItem(SID_TP_EDIT_MASTER, sal_False); + rMenu.EnableItem(SID_TP_EDIT_MASTER, false); } MasterPagesSelector::ProcessPopupMenu(rMenu); diff --git a/sd/source/ui/sidebar/LayoutMenu.cxx b/sd/source/ui/sidebar/LayoutMenu.cxx index d842e9df3b92..2cbeb8680e65 100644 --- a/sd/source/ui/sidebar/LayoutMenu.cxx +++ b/sd/source/ui/sidebar/LayoutMenu.cxx @@ -679,7 +679,7 @@ void LayoutMenu::Command (const CommandEvent& rEvent) const SfxItemState aState ( mrBase.GetViewFrame()->GetDispatcher()->QueryState(SID_INSERTPAGE, pItem)); if (aState == SFX_ITEM_DISABLED) - pMenu->EnableItem(SID_INSERTPAGE_LAYOUT_MENU, sal_False); + pMenu->EnableItem(SID_INSERTPAGE_LAYOUT_MENU, false); // Show the menu. pMenu->Execute(this, Rectangle(aMenuPosition,Size(1,1)), POPUPMENU_EXECUTE_DOWN); diff --git a/sd/source/ui/sidebar/MasterPagesSelector.cxx b/sd/source/ui/sidebar/MasterPagesSelector.cxx index cf79711aa856..ded2f3a028a8 100644 --- a/sd/source/ui/sidebar/MasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/MasterPagesSelector.cxx @@ -292,9 +292,9 @@ void MasterPagesSelector::ProcessPopupMenu (Menu& rMenu) { // Disable some entries. if (mpContainer->GetPreviewSize() == MasterPageContainer::SMALL) - rMenu.EnableItem(SID_TP_SHOW_SMALL_PREVIEW, sal_False); + rMenu.EnableItem(SID_TP_SHOW_SMALL_PREVIEW, false); else - rMenu.EnableItem(SID_TP_SHOW_LARGE_PREVIEW, sal_False); + rMenu.EnableItem(SID_TP_SHOW_LARGE_PREVIEW, false); } diff --git a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx index 6bf653058c87..0e1a423ea17f 100644 --- a/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx +++ b/sd/source/ui/sidebar/RecentMasterPagesSelector.cxx @@ -165,7 +165,7 @@ void RecentMasterPagesSelector::AssignMasterPageToPageList ( void RecentMasterPagesSelector::ProcessPopupMenu (Menu& rMenu) { if (rMenu.GetItemPos(SID_TP_EDIT_MASTER) != MENU_ITEM_NOTFOUND) - rMenu.EnableItem(SID_TP_EDIT_MASTER, sal_False); + rMenu.EnableItem(SID_TP_EDIT_MASTER, false); } diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx index bfd795bd0e4e..2093c96a27e7 100644 --- a/sd/source/ui/slideshow/showwin.cxx +++ b/sd/source/ui/slideshow/showwin.cxx @@ -60,7 +60,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, :: // Do never mirror the preview window. This explicitly includes right // to left writing environments. - EnableRTL (sal_False); + EnableRTL (false); MapMode aMap(GetMapMode()); aMap.SetMapUnit(MAP_100TH_MM); @@ -197,7 +197,7 @@ void ShowWindow::MouseMove(const MouseEvent& /*rMEvt*/) sal_uLong nTime = Time::GetSystemTicks(); if( (nTime - mnFirstMouseMove) >= SHOW_MOUSE_TIMEOUT ) { - ShowPointer( sal_True ); + ShowPointer( true ); mnFirstMouseMove = 0; mbMouseCursorHidden = false; maMouseTimer.SetTimeout( HIDE_MOUSE_TIMEOUT ); @@ -614,7 +614,7 @@ IMPL_LINK_NOARG(ShowWindow, MouseTimeoutHdl) else { // mouse has been idle to long, hide pointer - ShowPointer( sal_False ); + ShowPointer( false ); mbMouseCursorHidden = true; } return 0L; @@ -663,7 +663,7 @@ void ShowWindow::AddWindowToPaintView() ::com::sun::star::accessibility::XAccessible> ShowWindow::CreateAccessible (void) { - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(false); if (xAcc.get()) { return xAcc; diff --git a/sd/source/ui/slideshow/slideshow.cxx b/sd/source/ui/slideshow/slideshow.cxx index 8453275cd097..6795f92e8fb4 100644 --- a/sd/source/ui/slideshow/slideshow.cxx +++ b/sd/source/ui/slideshow/slideshow.cxx @@ -718,7 +718,7 @@ void SAL_CALL SlideShow::end() throw(RuntimeException) WorkWindow* pWorkWindow = dynamic_cast<WorkWindow*>(pShell->GetViewFrame()->GetTopFrame().GetWindow().GetParent()); if( pWorkWindow ) { - pWorkWindow->StartPresentationMode( sal_False, isAlwaysOnTop() ? PRESENTATION_HIDEALLAPPS : 0 ); + pWorkWindow->StartPresentationMode( false, isAlwaysOnTop() ? PRESENTATION_HIDEALLAPPS : 0 ); } } } @@ -1237,7 +1237,7 @@ void SlideShow::StartFullscreenPresentation( ) const sal_Int32 nDisplay (GetDisplay()); WorkWindow* pWorkWindow = new FullScreenWorkWindow(this, mpCurrentViewShellBase); pWorkWindow->SetBackground(Wallpaper(COL_BLACK)); - pWorkWindow->StartPresentationMode( sal_True, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PRESENTATION_HIDEALLAPPS : 0, nDisplay); + pWorkWindow->StartPresentationMode( true, mpDoc->getPresentationSettings().mbAlwaysOnTop ? PRESENTATION_HIDEALLAPPS : 0, nDisplay); // pWorkWindow->ShowFullScreenMode(sal_False, nDisplay); if (pWorkWindow->IsVisible()) diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx index be0c76628829..d04c43228261 100644 --- a/sd/source/ui/slideshow/slideshowimpl.cxx +++ b/sd/source/ui/slideshow/slideshowimpl.cxx @@ -2204,7 +2204,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl) const sal_Int32 nPageNumberCount = mpSlideController->getSlideNumberCount(); if( nPageNumberCount <= 1 ) { - pMenu->EnableItem( CM_GOTO, sal_False ); + pMenu->EnableItem( CM_GOTO, false ); } else { @@ -2274,7 +2274,7 @@ IMPL_LINK_NOARG(SlideshowImpl, ContextMenuHdl) break; } - pWidthMenu->EnableItem( (sal_uInt16)(CM_WIDTH_PEN + nIterator), sal_True); + pWidthMenu->EnableItem( (sal_uInt16)(CM_WIDTH_PEN + nIterator), true); if( nWidth == mdUserPaintStrokeWidth) pWidthMenu->CheckItem( (sal_uInt16)(CM_WIDTH_PEN + nIterator) ); } diff --git a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx index 265ffac5673a..8f1542ae7498 100644 --- a/sd/source/ui/slidesorter/controller/SlideSorterController.cxx +++ b/sd/source/ui/slidesorter/controller/SlideSorterController.cxx @@ -982,7 +982,7 @@ void SlideSorterController::PageNameHasChanged (int nPageIndex, const OUString& return; ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > - xAccessible (pWindow->GetAccessible(sal_False)); + xAccessible (pWindow->GetAccessible(false)); if ( ! xAccessible.is()) return; diff --git a/sd/source/ui/slidesorter/shell/SlideSorter.cxx b/sd/source/ui/slidesorter/shell/SlideSorter.cxx index 5dacf9fd87f3..9e9c189aa6ee 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorter.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorter.cxx @@ -491,11 +491,11 @@ void SlideSorter::ArrangeGUIElements ( // Prevent untimely redraws while the view is not yet correctly // resized. view::SlideSorterView::DrawLock aLock (*this); - GetContentWindow()->EnablePaint (sal_False); + GetContentWindow()->EnablePaint (false); mpSlideSorterController->Resize (Rectangle(aOrigin, rSize)); - GetContentWindow()->EnablePaint (sal_True); + GetContentWindow()->EnablePaint (true); mbLayoutPending = false; } diff --git a/sd/source/ui/slidesorter/view/SlsTheme.cxx b/sd/source/ui/slidesorter/view/SlsTheme.cxx index 397d45b08e91..c38951c4856a 100644 --- a/sd/source/ui/slidesorter/view/SlsTheme.cxx +++ b/sd/source/ui/slidesorter/view/SlsTheme.cxx @@ -149,13 +149,13 @@ void Theme::Update (const ::boost::shared_ptr<controller::Properties>& rpPropert { case Font_PageNumber: pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont())); - pFont->SetTransparent(sal_True); + pFont->SetTransparent(true); pFont->SetWeight(WEIGHT_BOLD); break; case Font_PageCount: pFont.reset(new Font(Application::GetSettings().GetStyleSettings().GetAppFont())); - pFont->SetTransparent(sal_True); + pFont->SetTransparent(true); pFont->SetWeight(WEIGHT_NORMAL); { const Size aSize (pFont->GetSize()); diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index de318e410411..0810b0374dd1 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -201,12 +201,12 @@ Image PreviewRenderer::RenderSubstitution ( const Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); - mpPreviewDevice->EnableMapMode(sal_False); + mpPreviewDevice->EnableMapMode(false); mpPreviewDevice->SetLineColor(); svtools::ColorConfig aColorConfig; mpPreviewDevice->SetFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); mpPreviewDevice->DrawRect (aPaintRectangle); - mpPreviewDevice->EnableMapMode(sal_True); + mpPreviewDevice->EnableMapMode(true); // Paint substitution text and a frame around it. PaintSubstitutionText (rSubstitutionText); @@ -393,11 +393,11 @@ void PreviewRenderer::PaintFrame (void) Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); - mpPreviewDevice->EnableMapMode(sal_False); + mpPreviewDevice->EnableMapMode(false); mpPreviewDevice->SetLineColor(maFrameColor); mpPreviewDevice->SetFillColor(); mpPreviewDevice->DrawRect(aPaintRectangle); - mpPreviewDevice->EnableMapMode(sal_True); + mpPreviewDevice->EnableMapMode(true); } } diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 3acd004ae46f..42cca8620c0d 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -1083,7 +1083,7 @@ Any SAL_CALL SdGenericDrawPage::getPropertyValue( const OUString& PropertyName ) { Point aPoint; Size aSize( GetPage()->GetSize() ); - pMetaFile->AddAction( (MetaAction*) new MetaFillColorAction( COL_WHITE, sal_True ), 0 ); + pMetaFile->AddAction( (MetaAction*) new MetaFillColorAction( COL_WHITE, true ), 0 ); pMetaFile->AddAction( (MetaAction*) new MetaRectAction( Rectangle( aPoint, aSize ) ), 1 ); pMetaFile->SetPrefMapMode( MAP_100TH_MM ); pMetaFile->SetPrefSize( aSize ); diff --git a/sd/source/ui/view/DocumentRenderer.cxx b/sd/source/ui/view/DocumentRenderer.cxx index 25341b1c636e..50afc78a77e1 100644 --- a/sd/source/ui/view/DocumentRenderer.cxx +++ b/sd/source/ui/view/DocumentRenderer.cxx @@ -425,7 +425,7 @@ namespace { ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:SlidesPerPageOrder:ListBox" ; - vcl::PrinterOptionsHelper::UIControlOptions aSlidesPerPageOpt( "SlidesPerPage" , -1, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aSlidesPerPageOpt( "SlidesPerPage" , -1, true ); AddDialogControl( vcl::PrinterOptionsHelper::setChoiceListControlOpt( "slidesperpageorder", SD_RESSTR(_STR_IMPRESS_PRINT_UI_ORDER), @@ -448,7 +448,7 @@ namespace { SD_RESSTR(_STR_IMPRESS_PRINT_UI_IS_PRINT_NAME), ".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" , "IsPrintName" , - sal_False + false ) ); } @@ -458,7 +458,7 @@ namespace { SD_RESSTR(_STR_DRAW_PRINT_UI_IS_PRINT_NAME), ".HelpID:vcl:PrintDialog:IsPrintName:CheckBox" , "IsPrintName" , - sal_False + false ) ); } @@ -467,7 +467,7 @@ namespace { SD_RESSTR(_STR_IMPRESS_PRINT_UI_IS_PRINT_DATE), ".HelpID:vcl:PrintDialog:IsPrintDateTime:CheckBox" , "IsPrintDateTime" , - sal_False + false ) ); @@ -477,7 +477,7 @@ namespace { SD_RESSTR(_STR_IMPRESS_PRINT_UI_IS_PRINT_HIDDEN), ".HelpID:vcl:PrintDialog:IsPrintHidden:CheckBox" , "IsPrintHidden" , - sal_False + false ) ); } @@ -558,13 +558,13 @@ namespace { SD_RESSTR(_STR_IMPRESS_PRINT_UI_BROCHURE), ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox" , "PrintProspect" , - sal_False, + false, aBrochureOpt ) ); vcl::PrinterOptionsHelper::UIControlOptions - aIncludeOpt( "PrintProspect" , -1, sal_False ); + aIncludeOpt( "PrintProspect" , -1, false ); aIncludeOpt.maGroupHint = "LayoutPage" ; aHelpIds.realloc( 1 ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintProspectInclude:ListBox" ; @@ -587,13 +587,13 @@ namespace { SD_RESSTR(_STR_IMPRESS_PRINT_UI_PAPER_TRAY), ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox" , "PrintPaperFromSetup" , - sal_False, + false, aPaperTrayOpt ) ); // print range selection vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; - aPrintRangeOpt.mbInternalOnly = sal_True; + aPrintRangeOpt.mbInternalOnly = true; aPrintRangeOpt.maGroupHint = "PrintRange" ; AddDialogControl( vcl::PrinterOptionsHelper::setSubgroupControlOpt("printrange", SD_RESSTR(_STR_IMPRESS_PRINT_UI_PAGE_RANGE), @@ -620,7 +620,7 @@ namespace { 0 ) ); // create a an Edit dependent on "Pages" selected - vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true ); AddDialogControl(vcl::PrinterOptionsHelper::setEditControlOpt("pagerange", "", ".HelpID:vcl:PrintDialog:PageRange:Edit", "PageRange", OUString::number(mnCurPage + 1), aPageRangeOpt)); diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx index faafb29a74b4..a34406f0a9d9 100644 --- a/sd/source/ui/view/Outliner.cxx +++ b/sd/source/ui/view/Outliner.cxx @@ -1713,13 +1713,13 @@ sal_uInt16 Outliner::ShowModalMessageBox (Dialog& rMessageBox) if (pChildWindow != NULL) pSearchDialog = pChildWindow->GetWindow(); if (pSearchDialog != NULL) - pSearchDialog->EnableInput(false,sal_True); + pSearchDialog->EnableInput(false,true); sal_uInt16 nResult = rMessageBox.Execute(); // Unlock the search dialog. if (pSearchDialog != NULL) - pSearchDialog->EnableInput(true,sal_True); + pSearchDialog->EnableInput(true,true); return nResult; } diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 91a694e60380..c585ca44bb5d 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -1212,7 +1212,7 @@ void ViewShellBase::Implementation::ProcessRestoreEditingViewSlot (void) void ViewShellBase::Implementation::ShowViewTabBar (bool bShow) { if (mpViewTabBar.is() - && (mpViewTabBar->GetTabControl()->IsVisible()==sal_True) != bShow) + && mpViewTabBar->GetTabControl()->IsVisible() != bShow) { mpViewTabBar->GetTabControl()->Show(bShow ? sal_True : sal_False); mrBase.Rearrange(); diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx index 24b89fa2f968..21a8b4fb04b1 100644 --- a/sd/source/ui/view/drviews4.cxx +++ b/sd/source/ui/view/drviews4.cxx @@ -914,7 +914,7 @@ void DrawViewShell::ShowSnapLineContextMenu ( SD_RESSTR(STR_POPUP_DELETE_SNAPLINE)); } - pMenu->RemoveDisabledEntries(sal_False, sal_False); + pMenu->RemoveDisabledEntries(false, false); const sal_uInt16 nResult = pMenu->Execute( GetActiveWindow(), diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index 5589cf7e83e0..a12427f8bd03 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -151,8 +151,8 @@ OutlineView::OutlineView( DrawDocShell& rDocSh, ::Window* pWindow, OutlineViewSh maBulletFont.SetUnderline(UNDERLINE_NONE); maBulletFont.SetStrikeout(STRIKEOUT_NONE); maBulletFont.SetItalic(ITALIC_NONE); - maBulletFont.SetOutline(sal_False); - maBulletFont.SetShadow(sal_False); + maBulletFont.SetOutline(false); + maBulletFont.SetShadow(false); Reference<XFrame> xFrame (mrOutlineViewShell.GetViewShellBase().GetFrame()->GetTopFrame().GetFrameInterface(), UNO_QUERY); diff --git a/sd/source/ui/view/sdwindow.cxx b/sd/source/ui/view/sdwindow.cxx index 8af9d12a5506..a23c31c840be 100644 --- a/sd/source/ui/view/sdwindow.cxx +++ b/sd/source/ui/view/sdwindow.cxx @@ -91,7 +91,7 @@ Window::Window(::Window* pParent) SetUniqueId(HID_SD_WIN_DOCUMENT); // #i78183# Added after discussed with AF - EnableRTL(sal_False); + EnableRTL(false); } @@ -1039,7 +1039,7 @@ void Window::DropScroll(const Point& rMousePos) { return ::Window::CreateAccessible (); } - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(sal_False); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible(false); if (xAcc.get()) { return xAcc; @@ -1064,7 +1064,7 @@ void Window::SwitchView() { if (mpViewShell) { - mpViewShell->SwitchViewFireFocus(GetAccessible(sal_False)); + mpViewShell->SwitchViewFireFocus(GetAccessible(false)); } } diff --git a/sd/source/ui/view/viewoverlaymanager.cxx b/sd/source/ui/view/viewoverlaymanager.cxx index 70da4bea74d4..6eae63a9cf6e 100644 --- a/sd/source/ui/view/viewoverlaymanager.cxx +++ b/sd/source/ui/view/viewoverlaymanager.cxx @@ -390,7 +390,7 @@ BitmapEx ChangePlaceholderTag::createOverlayImage( int nHighlight ) const Rectangle aRectSrc( Point( 0, 0 ), aSize ); aRet = *(getButtonImage((nHighlight == 0) ? 4 : 0, bLarge)); - aRet.Expand( aSize.Width(), aSize.Height(), NULL, sal_True ); + aRet.Expand( aSize.Width(), aSize.Height(), NULL, true ); aRet.CopyPixel( Rectangle( Point( aSize.Width(), 0 ), aSize ), aRectSrc, getButtonImage((nHighlight == 1) ? 5 : 1, bLarge) ); aRet.CopyPixel( Rectangle( Point( 0, aSize.Height() ), aSize ), aRectSrc, getButtonImage((nHighlight == 2) ? 6 : 2, bLarge) ); diff --git a/sd/source/ui/view/viewshel.cxx b/sd/source/ui/view/viewshel.cxx index 030e56fb43c9..46f60850f70f 100644 --- a/sd/source/ui/view/viewshel.cxx +++ b/sd/source/ui/view/viewshel.cxx @@ -211,7 +211,7 @@ void ViewShell::construct(void) { // Create scroll bars and the filler between the scroll bars. mpHorizontalScrollBar.reset (new ScrollBar(GetParentWindow(), WinBits(WB_HSCROLL | WB_DRAG))); - mpHorizontalScrollBar->EnableRTL (sal_False); + mpHorizontalScrollBar->EnableRTL (false); mpHorizontalScrollBar->SetRange(Range(0, 32000)); mpHorizontalScrollBar->SetScrollHdl(LINK(this, ViewShell, HScrollHdl)); @@ -705,7 +705,7 @@ bool ViewShell::HandleScrollCommand(const CommandEvent& rCEvt, ::sd::Window* pWi rCEvt.IsMouseEvent(),(const void *) &aWheelData ); bDone = pWin->HandleScrollCommand( aReWrite, mpHorizontalScrollBar.get(), - mpVerticalScrollBar.get()) == sal_True; + mpVerticalScrollBar.get()); } } } @@ -1550,7 +1550,7 @@ void ViewShell::SwitchActiveViewFireFocus() { if (mpContentWindow) { - SwitchViewFireFocus(mpContentWindow->GetAccessible(sal_False)); + SwitchViewFireFocus(mpContentWindow->GetAccessible(false)); } } // move these two methods from DrawViewShell. diff --git a/sfx2/inc/srchdlg.hxx b/sfx2/inc/srchdlg.hxx index 1e6bd3bb2f02..3adfb9f2bb17 100644 --- a/sfx2/inc/srchdlg.hxx +++ b/sfx2/inc/srchdlg.hxx @@ -73,7 +73,7 @@ public: void SetFocusOnEdit(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Move(); virtual void StateChanged( StateChangedType nStateChange ); }; diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index a8dba1d974c7..2a1ebe90f8a0 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -470,8 +470,8 @@ IndexBox_Impl::IndexBox_Impl( Window* pParent, const ResId& rResId ) : ComboBox( pParent, rResId ) { - EnableAutocomplete( sal_True ); - EnableUserDraw( sal_True ); + EnableAutocomplete( true ); + EnableUserDraw( true ); } // ----------------------------------------------------------------------- @@ -490,7 +490,7 @@ void IndexBox_Impl::UserDraw( const UserDrawEvent& rUDEvt ) rUDEvt.GetDevice()->DrawText( aPos, ( nPos !=-1 ) ? aEntry.copy( nPos + 1 ) : aEntry ); } else - DrawEntry( rUDEvt, sal_False, sal_True, sal_True ); + DrawEntry( rUDEvt, false, true, true ); } // ----------------------------------------------------------------------- @@ -617,7 +617,7 @@ void IndexTabPage_Impl::InitializeIndex() append[k] = ' '; sfx2::KeywordInfo aInfo; - aIndexCB.SetUpdateMode( sal_False ); + aIndexCB.SetUpdateMode( false ); try { @@ -714,7 +714,7 @@ void IndexTabPage_Impl::InitializeIndex() OSL_FAIL( "IndexTabPage_Impl::InitializeIndex(): unexpected exception" ); } - aIndexCB.SetUpdateMode( sal_True ); + aIndexCB.SetUpdateMode( true ); if ( !sKeyword.isEmpty() ) aKeywordLink.Call( this ); diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 209de19721b3..59005019f08b 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -494,12 +494,12 @@ static bool impl_hasHelpInstalled( const OUString &rLang = OUString() ) return !aFactories.empty(); } -sal_Bool SfxHelp::SearchKeyword( const OUString& rKeyword ) +bool SfxHelp::SearchKeyword( const OUString& rKeyword ) { return Start_Impl( OUString(), NULL, rKeyword ); } -sal_Bool SfxHelp::Start( const OUString& rURL, const Window* pWindow ) +bool SfxHelp::Start( const OUString& rURL, const Window* pWindow ) { return Start_Impl( rURL, pWindow, OUString() ); } diff --git a/sfx2/source/control/thumbnailview.cxx b/sfx2/source/control/thumbnailview.cxx index 300fc9f658b3..12a458f8c338 100644 --- a/sfx2/source/control/thumbnailview.cxx +++ b/sfx2/source/control/thumbnailview.cxx @@ -64,7 +64,7 @@ ThumbnailView::ThumbnailView (Window *pParent, WinBits nWinStyle, bool bDisableT ThumbnailView::~ThumbnailView() { com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> - xComponent(GetAccessible(sal_False), + xComponent(GetAccessible(false), com::sun::star::uno::UNO_QUERY); if (xComponent.is()) @@ -497,7 +497,7 @@ ThumbnailViewItem* ThumbnailView::ImplGetVisibleItem( sal_uInt16 nVisiblePos ) void ThumbnailView::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ) { - ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( sal_False ) ); + ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( false ) ); if( pAcc ) pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue ); @@ -505,7 +505,7 @@ void ThumbnailView::ImplFireAccessibleEvent( short nEventId, const ::com::sun::s bool ThumbnailView::ImplHasAccessibleListeners() { - ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( sal_False ) ); + ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( false ) ); return( pAcc && pAcc->HasAccessibleListeners() ); } @@ -899,7 +899,7 @@ void ThumbnailView::GetFocus() } // Tell the accessible object that we got the focus. - ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( sal_False ) ); + ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( false ) ); if( pAcc ) pAcc->GetFocus(); @@ -913,7 +913,7 @@ void ThumbnailView::LoseFocus() Control::LoseFocus(); // Tell the accessible object that we lost the focus. - ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( sal_False ) ); + ThumbnailViewAcc* pAcc = ThumbnailViewAcc::getImplementation( GetAccessible( false ) ); if( pAcc ) pAcc->LoseFocus(); } diff --git a/sfx2/source/dialog/backingcomp.cxx b/sfx2/source/dialog/backingcomp.cxx index 1e0e19bba4ac..e515b1483bfb 100644 --- a/sfx2/source/dialog/backingcomp.cxx +++ b/sfx2/source/dialog/backingcomp.cxx @@ -422,7 +422,7 @@ void SAL_CALL BackingComp::attachFrame( /*IN*/ const css::uno::Reference< css::f // disable full screen mode of the frame! if (pParent && pParent->IsFullScreenMode()) { - pParent->ShowFullScreenMode(sal_False); + pParent->ShowFullScreenMode(false); pParent->SetMenuBarMode(MENUBAR_MODE_NORMAL); } diff --git a/sfx2/source/dialog/basedlgs.cxx b/sfx2/source/dialog/basedlgs.cxx index 609f81af92b6..1e3f6d12f692 100644 --- a/sfx2/source/dialog/basedlgs.cxx +++ b/sfx2/source/dialog/basedlgs.cxx @@ -382,7 +382,7 @@ SfxModelessDialog::~SfxModelessDialog() //------------------------------------------------------------------------- -sal_Bool SfxModelessDialog::Close() +bool SfxModelessDialog::Close() /* [Description] @@ -398,7 +398,7 @@ sal_Bool SfxModelessDialog::Close() pBindings->GetDispatcher_Impl()->Execute( pImp->pMgr->GetType(), SFX_CALLMODE_RECORD|SFX_CALLMODE_SYNCHRON, &aValue, 0L ); - return sal_True; + return true; } //------------------------------------------------------------------------- @@ -497,7 +497,7 @@ SfxFloatingWindow::SfxFloatingWindow( SfxBindings *pBindinx, //------------------------------------------------------------------------- -sal_Bool SfxFloatingWindow::Close() +bool SfxFloatingWindow::Close() /* [Description] @@ -513,7 +513,7 @@ sal_Bool SfxFloatingWindow::Close() pBindings->GetDispatcher_Impl()->Execute( pImp->pMgr->GetType(), SFX_CALLMODE_RECORD|SFX_CALLMODE_SYNCHRON, &aValue, 0L ); - return sal_True; + return true; } // ----------------------------------------------------------------------- diff --git a/sfx2/source/dialog/dinfdlg.cxx b/sfx2/source/dialog/dinfdlg.cxx index 7ee19bf4d9ef..e27c15fa072c 100644 --- a/sfx2/source/dialog/dinfdlg.cxx +++ b/sfx2/source/dialog/dinfdlg.cxx @@ -1118,7 +1118,7 @@ void SfxDocumentPage::Reset( const SfxItemSet& rSet ) TriState eState = (TriState)m_bUseUserData; if ( STATE_DONTKNOW == eState ) - m_pUseUserDataCB->EnableTriState( sal_True ); + m_pUseUserDataCB->EnableTriState( true ); m_pUseUserDataCB->SetState( eState ); m_pUseUserDataCB->SaveValue(); @@ -2486,7 +2486,7 @@ void CmisPropertiesControl::checkAutoVScroll() return; if (nBits & WB_AUTOVSCROLL) { - sal_Bool bShow = m_rVertScroll.GetRangeMax() > m_rVertScroll.GetVisibleSize(); + bool bShow = m_rVertScroll.GetRangeMax() > m_rVertScroll.GetVisibleSize(); if (bShow != m_rVertScroll.IsVisible()) m_rVertScroll.Show(bShow); } diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx index 35c160776e40..be4ff1b51937 100644 --- a/sfx2/source/dialog/dockwin.cxx +++ b/sfx2/source/dialog/dockwin.cxx @@ -82,7 +82,7 @@ public: virtual bool Notify( NotifyEvent& rNEvt ); virtual void Resize(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); }; namespace @@ -303,7 +303,7 @@ void SfxTitleDockingWindow::Resizing( Size &rSize ) m_pWrappedWindow->SetSizePixel( GetOutputSizePixel() ); } -sal_Bool SfxTitleDockingWindow::Close() +bool SfxTitleDockingWindow::Close() { return SfxDockingWindow::Close(); } @@ -485,7 +485,7 @@ void SfxDockingWindow::Resize() //------------------------------------------------------------------------- -sal_Bool SfxDockingWindow::PrepareToggleFloatingMode() +bool SfxDockingWindow::PrepareToggleFloatingMode() /* [Description] @@ -498,19 +498,19 @@ sal_Bool SfxDockingWindow::PrepareToggleFloatingMode() { if (!pImp->bConstructed) - return sal_True; + return true; if ( (Application::IsInModalMode() && IsFloatingMode()) || !pMgr ) - return sal_False; + return false; if ( pImp->bDockingPrevented ) - return sal_False; + return false; if (!IsFloatingMode()) { // Test, if FloatingMode is permitted. if ( CheckAlignment(GetAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT ) - return sal_False; + return false; if ( pImp->pSplitWin ) { @@ -525,15 +525,15 @@ sal_Bool SfxDockingWindow::PrepareToggleFloatingMode() // Test if it is allowed to dock, if (CheckAlignment(GetAlignment(),pImp->GetLastAlignment()) == SFX_ALIGN_NOALIGNMENT) - return sal_False; + return false; // Test, if the Workwindow allows for docking at the moment. SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); if ( !pWorkWin->IsDockingAllowed() || !pWorkWin->IsInternalDockingAllowed() ) - return sal_False; + return false; } - return sal_True; + return true; } //------------------------------------------------------------------------- @@ -656,7 +656,7 @@ void SfxDockingWindow::StartDocking() //------------------------------------------------------------------------- -sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) +bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) /* [Description] @@ -667,7 +667,7 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) */ { if ( Application::IsInModalMode() ) - return sal_True; + return true; if ( !pImp->bConstructed || !pMgr ) { @@ -677,7 +677,7 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) SfxWorkWindow *pWorkWin = pBindings->GetWorkWindow_Impl(); if ( pImp->bDockingPrevented || !pWorkWin->IsInternalDockingAllowed() ) - return sal_False; + return false; sal_Bool bFloatMode = sal_False; @@ -694,7 +694,7 @@ sal_Bool SfxDockingWindow::Docking( const Point& rPos, Rectangle& rRect ) // Mouse is not within OuterRect: must be FloatingWindow // Is this allowed? if (CheckAlignment(pImp->GetDockAlignment(),SFX_ALIGN_NOALIGNMENT) != SFX_ALIGN_NOALIGNMENT) - return sal_False; + return false; bFloatMode = sal_True; if ( SFX_ALIGN_NOALIGNMENT != pImp->GetDockAlignment() ) { @@ -1667,7 +1667,7 @@ SfxChildAlignment SfxDockingWindow::CheckAlignment(SfxChildAlignment, //------------------------------------------------------------------------- -sal_Bool SfxDockingWindow::Close() +bool SfxDockingWindow::Close() /* [Description] @@ -1679,12 +1679,12 @@ sal_Bool SfxDockingWindow::Close() { // Execute with Parameters, since Toggle is ignored by some ChildWindows. if ( !pMgr ) - return sal_True; + return true; SfxBoolItem aValue( pMgr->GetType(), false); pBindings->GetDispatcher_Impl()->Execute( pMgr->GetType(), SFX_CALLMODE_RECORD | SFX_CALLMODE_ASYNCHRON, &aValue, 0L ); - return sal_True; + return true; } //------------------------------------------------------------------------- diff --git a/sfx2/source/dialog/navigat.cxx b/sfx2/source/dialog/navigat.cxx index 423df7d9758e..31cebecbddef 100644 --- a/sfx2/source/dialog/navigat.cxx +++ b/sfx2/source/dialog/navigat.cxx @@ -72,14 +72,14 @@ void SfxNavigator::Resizing( Size &rSize ) pCon->Resizing( rSize ); } -sal_Bool SfxNavigator::Close() +bool SfxNavigator::Close() { SfxChildWindowContext *pCon = GetChildWindow_Impl()->GetContext_Impl(); DBG_ASSERT( pCon, "No Context!" ); if ( !pCon || pCon->Close() ) return SfxDockingWindow::Close(); else - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sfx2/source/dialog/printopt.cxx b/sfx2/source/dialog/printopt.cxx index dcd496c5998e..8a01e66b2505 100644 --- a/sfx2/source/dialog/printopt.cxx +++ b/sfx2/source/dialog/printopt.cxx @@ -66,11 +66,11 @@ SfxCommonPrintOptionsTabPage::SfxCommonPrintOptionsTabPage( Window* pParent, con if( bOutputForPrinter ) { - m_pPrinterOutputRB->Check( sal_True ); + m_pPrinterOutputRB->Check( true ); } else { - m_pPrintFileOutputRB->Check( sal_True ); + m_pPrintFileOutputRB->Check( true ); m_pPDFCB->Disable(); } @@ -172,27 +172,27 @@ void SfxCommonPrintOptionsTabPage::ImplUpdateControls( const PrinterOptions* pCu m_pReduceTransparencyCB->Check( pCurrentOptions->IsReduceTransparency() ); if( pCurrentOptions->GetReducedTransparencyMode() == PRINTER_TRANSPARENCY_AUTO ) - m_pReduceTransparencyAutoRB->Check( sal_True ); + m_pReduceTransparencyAutoRB->Check( true ); else - m_pReduceTransparencyNoneRB->Check( sal_True ); + m_pReduceTransparencyNoneRB->Check( true ); m_pReduceGradientsCB->Check( pCurrentOptions->IsReduceGradients() ); if( pCurrentOptions->GetReducedGradientMode() == PRINTER_GRADIENT_STRIPES ) - m_pReduceGradientsStripesRB->Check( sal_True ); + m_pReduceGradientsStripesRB->Check( true ); else - m_pReduceGradientsColorRB->Check( sal_True ); + m_pReduceGradientsColorRB->Check( true ); m_pReduceGradientsStepCountNF->SetValue( pCurrentOptions->GetReducedGradientStepCount() ); m_pReduceBitmapsCB->Check( pCurrentOptions->IsReduceBitmaps() ); if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_OPTIMAL ) - m_pReduceBitmapsOptimalRB->Check( sal_True ); + m_pReduceBitmapsOptimalRB->Check( true ); else if( pCurrentOptions->GetReducedBitmapMode() == PRINTER_BITMAP_NORMAL ) - m_pReduceBitmapsNormalRB->Check( sal_True ); + m_pReduceBitmapsNormalRB->Check( true ); else - m_pReduceBitmapsResolutionRB->Check( sal_True ); + m_pReduceBitmapsResolutionRB->Check( true ); const sal_uInt16 nDPI = pCurrentOptions->GetReducedBitmapResolution(); diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index b60e37848f4d..a9d91171ac6e 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -216,7 +216,7 @@ SfxRecordingFloat_Impl::~SfxRecordingFloat_Impl() } } -sal_Bool SfxRecordingFloat_Impl::Close() +bool SfxRecordingFloat_Impl::Close() { sal_Bool bRet = SfxFloatingWindow::Close(); return bRet; diff --git a/sfx2/source/dialog/securitypage.cxx b/sfx2/source/dialog/securitypage.cxx index 4b45f68d3829..33ac0bda80ca 100644 --- a/sfx2/source/dialog/securitypage.cxx +++ b/sfx2/source/dialog/securitypage.cxx @@ -314,10 +314,10 @@ void SfxSecurityPage_Impl::Reset_Impl( const SfxItemSet & ) // A Calc document that is shared will have 'm_eRedlingMode == RL_NONE' // In shared documents change recording and protection must be disabled, // similar to documents that do not support change recording at all. - m_pRecordChangesCB->Check( sal_False ); + m_pRecordChangesCB->Check( false ); m_pRecordChangesCB->Disable(); - m_pProtectPB->Check( sal_False ); - m_pUnProtectPB->Check( sal_False ); + m_pProtectPB->Check( false ); + m_pUnProtectPB->Check( false ); m_pProtectPB->Disable(); m_pUnProtectPB->Disable(); } diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index f229df6e8fe5..2b9847da4f63 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -60,7 +60,7 @@ namespace { { if ( mbUpdateMode ) { - mrSplitWindow.SetUpdateMode( sal_False ); + mrSplitWindow.SetUpdateMode( false ); } } @@ -68,7 +68,7 @@ namespace { { if ( mbUpdateMode ) { - mrSplitWindow.SetUpdateMode( sal_True ); + mrSplitWindow.SetUpdateMode( true ); } } @@ -132,7 +132,7 @@ friend class SfxSplitWindow; SetAlign( pOwner->GetAlign() ); Actualize(); ShowAutoHideButton( pOwner->IsAutoHideButtonVisible() ); - ShowFadeInHideButton( sal_True ); + ShowFadeInHideButton( true ); } ~SfxEmptySplitWin_Impl() @@ -227,8 +227,8 @@ SfxSplitWindow::SfxSplitWindow( Window* pParent, SfxChildAlignment eAl, { if ( bWithButtons ) { - ShowAutoHideButton( sal_False ); // no autohide button (pin) anymore - ShowFadeOutButton( sal_True ); + ShowAutoHideButton( false ); // no autohide button (pin) anymore + ShowFadeOutButton( true ); } // Set SV-Alignment @@ -1014,7 +1014,7 @@ IMPL_LINK( SfxSplitWindow, TimerHdl, Timer*, pTimer) pEmptyWin->bEndAutoHide = sal_False; if ( !Application::IsInModalMode() && !PopupMenu::IsInExecute() && - !pEmptyWin->bSplit && !HasChildPathFocus( sal_True ) ) + !pEmptyWin->bSplit && !HasChildPathFocus( true ) ) { // While a modal dialog or a popup menu is open or while the // Splitting is done, in any case, do not close. Even as long @@ -1139,7 +1139,7 @@ void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn ) Point aPos( GetPosPixel() ); aPos = GetParent()->OutputToScreenPixel( aPos ); SetFloatingPos( aPos ); - SetFloatingMode( sal_True ); + SetFloatingMode( true ); GetFloatingWindow()->SetOutputSizePixel( GetOutputSizePixel() ); if ( pEmptyWin->bFadeIn ) @@ -1149,7 +1149,7 @@ void SfxSplitWindow::SetPinned_Impl( sal_Bool bOn ) { pEmptyWin->nState &= ~1; SetOutputSizePixel( GetFloatingWindow()->GetOutputSizePixel() ); - SetFloatingMode( sal_False ); + SetFloatingMode( false ); if ( pEmptyWin->bFadeIn ) { diff --git a/sfx2/source/dialog/srchdlg.cxx b/sfx2/source/dialog/srchdlg.cxx index 6fe71ea9cfe0..324de6c3b269 100644 --- a/sfx2/source/dialog/srchdlg.cxx +++ b/sfx2/source/dialog/srchdlg.cxx @@ -92,7 +92,7 @@ void SearchDialog::LoadConfig() } } else - m_pWrapAroundBox->Check( sal_True ); + m_pWrapAroundBox->Check( true ); } void SearchDialog::SaveConfig() @@ -139,7 +139,7 @@ void SearchDialog::SetFocusOnEdit() m_pSearchEdit->GrabFocus(); } -sal_Bool SearchDialog::Close() +bool SearchDialog::Close() { sal_Bool bRet = ModelessDialog::Close(); m_aCloseHdl.Call( this ); diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index b7307f8da04a..48db4d06e10b 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -1021,11 +1021,11 @@ namespace sfx2 switch ( i_pMenu->GetCurItemId() ) { case MID_UNLOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( sal_True ); + m_rDockingWindow.SetFloatingMode( true ); break; case MID_LOCK_TASK_PANEL: - m_rDockingWindow.SetFloatingMode( sal_False ); + m_rDockingWindow.SetFloatingMode( false ); break; case MID_LAYOUT_DRAWERS: @@ -1246,7 +1246,7 @@ namespace sfx2 SfxResId( STR_SFX_UNDOCK ).toString() ); - pMenu->RemoveDisabledEntries( sal_False, sal_False ); + pMenu->RemoveDisabledEntries( false, false ); return pMenu; } diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index 764661ddcc30..fbb51f8844b5 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -1298,7 +1298,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) if((nFlags & UPDATE_FAMILY) == UPDATE_FAMILY) // Update view type list (Hierarchical, All, etc. { CheckItem(nActFamily, sal_True); // check Button in Toolbox - aFilterLb.SetUpdateMode(sal_False); + aFilterLb.SetUpdateMode(false); aFilterLb.Clear(); //insert hierarchical at the beginning sal_uInt16 nPos = aFilterLb.InsertEntry(SfxResId(STR_STYLE_FILTER_HIERARCHICAL).toString(), 0); @@ -1330,7 +1330,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags) // show maximum 14 entries aFilterLb.SetDropDownLineCount( MAX_FILTER_ENTRIES ); - aFilterLb.SetUpdateMode(sal_True); + aFilterLb.SetUpdateMode(true); } else { diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index 47f44a3b5f48..32d1c5773371 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -1713,7 +1713,7 @@ sal_Bool SfxStoringHelper::GUIStoreModel( uno::Reference< frame::XModel > xModel // Launch PDF viewer if ( nStoreMode & PDFEXPORT_REQUESTED ) { FilterConfigItem aItem( "Office.Common/Filter/PDF/Export/" ); - sal_Bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", sal_False ); + sal_Bool aViewPDF = aItem.ReadBool( "ViewPDFAfterExport", false ); if ( aViewPDF==sal_True ) { uno::Reference<XSystemShellExecute> xSystemShellExecute(SystemShellExecute::create( ::comphelper::getProcessComponentContext() ) ); diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index efb8bc5eb099..13417a5d5265 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -282,7 +282,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox ) const sal_uInt16 nRegion = pBox->GetSelectEntryPos(); const sal_uInt16 nCount = aTemplates.GetRegionCount()? aTemplates.GetCount(nRegion): 0; - aTemplateLb.SetUpdateMode(sal_False); + aTemplateLb.SetUpdateMode(false); aTemplateLb.Clear(); OUString aSel = aRegionLb.GetSelectEntry(); sal_Int32 nc = aSel.indexOf('('); @@ -293,7 +293,7 @@ IMPL_LINK( SfxNewFileDialog_Impl, RegionSelect, ListBox *, pBox ) for (sal_uInt16 i = 0; i < nCount; ++i) aTemplateLb.InsertEntry(aTemplates.GetName(nRegion, i)); aTemplateLb.SelectEntryPos(0); - aTemplateLb.SetUpdateMode(sal_True); + aTemplateLb.SetUpdateMode(true); aTemplateLb.Invalidate(); aTemplateLb.Update(); TemplateSelect(&aTemplateLb); diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 250976621077..31bb6c819372 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -127,7 +127,7 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const ::boost::shared_ptr<GDIMetaFile> pFile(new GDIMetaFile); VirtualDevice aDevice; - aDevice.EnableOutput( sal_False ); + aDevice.EnableOutput( false ); MapMode aMode( ((SfxObjectShell*)this)->GetMapUnit() ); aDevice.SetMapMode( aMode ); diff --git a/sfx2/source/inc/recfloat.hxx b/sfx2/source/inc/recfloat.hxx index 18b7f9bd644a..dfb3a59ac56d 100644 --- a/sfx2/source/inc/recfloat.hxx +++ b/sfx2/source/inc/recfloat.hxx @@ -46,7 +46,7 @@ public: SfxChildWindow* pChildWin , Window* pParent ); virtual ~SfxRecordingFloat_Impl(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void FillInfo( SfxChildWinInfo& rInfo ) const; virtual void StateChanged( StateChangedType nStateChange ); diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 507b647572b8..8f1a3a1319e3 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -101,7 +101,7 @@ void SfxMenuImageControl_Impl::Update() const SfxSlot* pSlot = pPool->GetSlot( nslotId ); if ( pSlot && pSlot->IsMode( SFX_SLOT_IMAGEROTATION ) ) { - pSVMenu->SetItemImageMirrorMode( nslotId, sal_False ); + pSVMenu->SetItemImageMirrorMode( nslotId, false ); pSVMenu->SetItemImageAngle( nslotId, lRotation ); } diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx index 8d86e65132c1..cac4b7ea8d3a 100644 --- a/sfx2/source/sidebar/SidebarController.cxx +++ b/sfx2/source/sidebar/SidebarController.cxx @@ -913,7 +913,7 @@ void SidebarController::ShowPopupMenu ( { // Don't allow the currently visible deck to be disabled. pCustomizationMenu->InsertItem(nSubMenuIndex, iItem->msDisplayName, MIB_RADIOCHECK); - pCustomizationMenu->CheckItem(nSubMenuIndex, sal_True); + pCustomizationMenu->CheckItem(nSubMenuIndex, true); } else { @@ -936,7 +936,7 @@ void SidebarController::ShowPopupMenu ( pMenu->InsertItem(MID_CUSTOMIZATION, SFX2_RESSTR(STRING_CUSTOMIZATION)); pMenu->SetPopupMenu(MID_CUSTOMIZATION, pCustomizationMenu); - pMenu->RemoveDisabledEntries(sal_False, sal_False); + pMenu->RemoveDisabledEntries(false, false); return pMenu; } @@ -957,11 +957,11 @@ IMPL_LINK(SidebarController, OnMenuItemSelected, Menu*, pMenu) switch (nIndex) { case MID_UNLOCK_TASK_PANEL: - mpParentWindow->SetFloatingMode(sal_True); + mpParentWindow->SetFloatingMode(true); break; case MID_LOCK_TASK_PANEL: - mpParentWindow->SetFloatingMode(sal_False); + mpParentWindow->SetFloatingMode(false); break; case MID_RESTORE_DEFAULT: diff --git a/sfx2/source/sidebar/SidebarDockingWindow.cxx b/sfx2/source/sidebar/SidebarDockingWindow.cxx index 9a87d6791082..a8c0441c41c0 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.cxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.cxx @@ -87,16 +87,16 @@ SfxChildWindow* SidebarDockingWindow::GetChildWindow (void) -sal_Bool SidebarDockingWindow::Close (void) +bool SidebarDockingWindow::Close (void) { if (mpSidebarController.is()) { // Do not close the floating window. // Dock it and close just the deck instead. - SetFloatingMode(sal_False); + SetFloatingMode(false); mpSidebarController->RequestCloseDeck(); mpSidebarController->NotifyResize(); - return sal_False; + return false; } else return SfxDockingWindow::Close(); diff --git a/sfx2/source/sidebar/SidebarDockingWindow.hxx b/sfx2/source/sidebar/SidebarDockingWindow.hxx index d8078de68806..5a1aea82d534 100644 --- a/sfx2/source/sidebar/SidebarDockingWindow.hxx +++ b/sfx2/source/sidebar/SidebarDockingWindow.hxx @@ -40,7 +40,7 @@ public: WinBits nBits); virtual ~SidebarDockingWindow (void); - virtual sal_Bool Close (void); + virtual bool Close (void); SfxChildWindow* GetChildWindow (void); diff --git a/sfx2/source/sidebar/TabBar.cxx b/sfx2/source/sidebar/TabBar.cxx index 1a81b6d293df..29b377fdccc8 100644 --- a/sfx2/source/sidebar/TabBar.cxx +++ b/sfx2/source/sidebar/TabBar.cxx @@ -242,9 +242,9 @@ void TabBar::HighlightDeck (const ::rtl::OUString& rsDeckId) ++iItem) { if (iItem->msDeckId.equals(rsDeckId)) - iItem->mpButton->Check(sal_True); + iItem->mpButton->Check(true); else - iItem->mpButton->Check(sal_False); + iItem->mpButton->Check(false); } } @@ -404,7 +404,7 @@ IMPL_LINK(TabBar, OnToolboxClicked, void*, EMPTYARG) mpMenuButton->GetPosPixel(), mpMenuButton->GetSizePixel()), aMenuData); - mpMenuButton->Check(sal_False); + mpMenuButton->Check(false); return 0; } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index 99dc1f0b7a6d..b51353c97617 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1285,13 +1285,13 @@ void SfxPopupWindow::AddStatusListener( const OUString& rCommandURL ) //-------------------------------------------------------------------- -sal_Bool SfxPopupWindow::Close() +bool SfxPopupWindow::Close() { m_bFloating = sal_False; FloatingWindow::Close(); Delete(); - return sal_True; + return true; } //-------------------------------------------------------------------- @@ -1448,13 +1448,13 @@ SfxPopupWindow* SfxRecentFilesToolBoxControl::CreatePopupWindow() { xPopupController->setPopupMenu( xPopupMenu ); - rBox.SetItemDown( nItemId, sal_True ); + rBox.SetItemDown( nItemId, true ); Reference< awt::XWindowPeer > xPeer( getParent(), uno::UNO_QUERY ); if ( xPeer.is() ) xPopupMenu->execute( xPeer, VCLUnoHelper::ConvertToAWTRect( aRect ), 0 ); - rBox.SetItemDown( nItemId, sal_False ); + rBox.SetItemDown( nItemId, false ); } return 0; diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx index 19d61a51304f..98c61b4c8902 100644 --- a/sfx2/source/view/ipclient.cxx +++ b/sfx2/source/view/ipclient.cxx @@ -1046,7 +1046,7 @@ void SfxInPlaceClient::DeactivateObject() if ( xController.is() ) { Window* pWindow = VCLUnoHelper::GetWindow( xController->getFrame()->getContainerWindow() ); - bHasFocus = pWindow->HasChildPathFocus( sal_True ); + bHasFocus = pWindow->HasChildPathFocus( true ); } } diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 4fdea3d050a7..2d39b8805e69 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -1079,7 +1079,7 @@ void SfxViewFrame::ReleaseObjectShell_Impl() DBG_ASSERT( xObjSh.Is(), "no SfxObjectShell to release!" ); GetFrame().ReleasingComponent_Impl( sal_True ); - if ( GetWindow().HasChildPathFocus( sal_True ) ) + if ( GetWindow().HasChildPathFocus( true ) ) { DBG_ASSERT( !GetActiveChildFrame_Impl(), "Wrong active child frame!" ); GetWindow().GrabFocus(); @@ -1708,7 +1708,7 @@ void SfxViewFrame::Enable( sal_Bool bEnable ) if ( !bEnable ) pImp->bWindowWasEnabled = pWindow->IsInputEnabled(); if ( !bEnable || pImp->bWindowWasEnabled ) - pWindow->EnableInput( bEnable, sal_True ); + pWindow->EnableInput( bEnable, true ); } // cursor and focus @@ -2916,7 +2916,7 @@ void SfxViewFrame::MiscExec_Impl( SfxRequest& rReq ) } } - sal_Bool bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode(); + bool bNewFullScreenMode = pItem ? pItem->GetValue() : !pWork->IsFullScreenMode(); if ( bNewFullScreenMode != pWork->IsFullScreenMode() ) { Reference< ::com::sun::star::beans::XPropertySet > xLMPropSet( xLayoutManager, UNO_QUERY ); diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 10d58803375b..f7a83e3319a8 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1206,13 +1206,13 @@ void SfxViewShell::SetWindow DiscardClients_Impl(); // Switch View-Port - sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( sal_True ) : sal_False; + sal_Bool bHadFocus = pWindow ? pWindow->HasChildPathFocus( true ) : sal_False; pWindow = pViewPort; if( pWindow ) { // Disable automatic GUI mirroring (right-to-left) for document windows - pWindow->EnableRTL( sal_False ); + pWindow->EnableRTL( false ); } if ( bHadFocus && pWindow ) diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx index c5d086e13e7f..0e991645fda4 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx @@ -428,7 +428,7 @@ lcl_createSystemWindow( winData.nSize = sizeof(winData); SAL_INFO("slideshow.opengl", "using VisualID " << pXVisual->visualid); winData.pVisual = (void*)(pXVisual->visual); - SystemChildWindow* pWindow = new SystemChildWindow(pParentWindow, 0, &winData, sal_False); + SystemChildWindow* pWindow = new SystemChildWindow(pParentWindow, 0, &winData, false); SystemEnvData const* const pChildSysData = pWindow->GetSystemData(); if( !pChildSysData ) { delete pWindow, pWindow=NULL; @@ -615,12 +615,12 @@ bool OGLTransitionerImpl::createWindow( Window* pPWindow ) if( pWindow ) { - pWindow->SetMouseTransparent( sal_True ); + pWindow->SetMouseTransparent( true ); pWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - pWindow->EnableEraseBackground( sal_False ); + pWindow->EnableEraseBackground( false ); pWindow->SetControlForeground(); pWindow->SetControlBackground(); - pWindow->EnablePaint(sal_False); + pWindow->EnablePaint(false); #if defined( _WIN32 ) GLWin.hWnd = sysData->hWnd; #elif defined( UNX ) diff --git a/slideshow/source/engine/shapes/gdimtftools.cxx b/slideshow/source/engine/shapes/gdimtftools.cxx index 21c60e716913..1a185908a0e8 100644 --- a/slideshow/source/engine/shapes/gdimtftools.cxx +++ b/slideshow/source/engine/shapes/gdimtftools.cxx @@ -290,12 +290,12 @@ bool getAnimationFromGraphic( VectorOfMtfAnimationFrames& o_rFrames, // update modes) VirtualDevice aVDev; aVDev.SetOutputSizePixel( aAnimSize ); - aVDev.EnableMapMode( sal_False ); + aVDev.EnableMapMode( false ); // setup mask VDev (alpha VDev is currently rather slow) VirtualDevice aVDevMask; aVDevMask.SetOutputSizePixel( aAnimSize ); - aVDevMask.EnableMapMode( sal_False ); + aVDevMask.EnableMapMode( false ); switch( aAnimation.GetCycleMode() ) { diff --git a/slideshow/source/engine/shapes/viewmediashape.cxx b/slideshow/source/engine/shapes/viewmediashape.cxx index 1b4ed43421c3..e4138c3230db 100644 --- a/slideshow/source/engine/shapes/viewmediashape.cxx +++ b/slideshow/source/engine/shapes/viewmediashape.cxx @@ -460,10 +460,10 @@ namespace slideshow mpMediaWindow->SetPosSizePixel( Point( aAWTRect.X, aAWTRect.Y ), Size( aAWTRect.Width, aAWTRect.Height ) ); mpMediaWindow->SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - mpMediaWindow->EnableEraseBackground( sal_False ); - mpMediaWindow->EnablePaint( sal_False ); - mpMediaWindow->SetForwardKey( sal_True ); - mpMediaWindow->SetMouseTransparent( sal_True ); + mpMediaWindow->EnableEraseBackground( false ); + mpMediaWindow->EnablePaint( false ); + mpMediaWindow->SetForwardKey( true ); + mpMediaWindow->SetMouseTransparent( true ); mpMediaWindow->Show(); if( mxPlayer.is() ) diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx index 19361d8da640..c4d7a6142533 100644 --- a/starmath/inc/toolbox.hxx +++ b/starmath/inc/toolbox.hxx @@ -39,7 +39,7 @@ protected: ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */ sal_uInt16 nActiveCategoryRID; - virtual sal_Bool Close(); + virtual bool Close(); virtual void GetFocus(); void ApplyImageLists( sal_uInt16 nCategoryRID ); diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index ded70748944e..767c1ea761ce 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -268,7 +268,7 @@ void SmToolBoxWindow::AdjustPosSize( bool bSetPos ) } -sal_Bool SmToolBoxWindow::Close() +bool SmToolBoxWindow::Close() { SmViewShell *pViewSh = GetView(); if (pViewSh) diff --git a/starmath/source/unomodel.cxx b/starmath/source/unomodel.cxx index 994e9ebb5d42..5519b1759b0e 100644 --- a/starmath/source/unomodel.cxx +++ b/starmath/source/unomodel.cxx @@ -137,7 +137,7 @@ SmPrintUIOptions::SmPrintUIOptions() ); // create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM) - vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, true ); m_aUIProperties[nIdx++].Value = setRangeControlOpt("scalingspin", OUString(), ".HelpID:vcl:PrintDialog:PrintScale:NumericField", PRTUIOPT_PRINT_SCALE, @@ -1106,7 +1106,7 @@ void SAL_CALL SmModel::render( // release SmPrintUIOptions when everything is done. // That way, when SmPrintUIOptions is needed again it will read the latest configuration settings in its c-tor. - if (m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False )) + if (m_pPrintUIOptions->getBoolValue( "IsLastPage", false )) { delete m_pPrintUIOptions; m_pPrintUIOptions = 0; } diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index eb9df3af59bb..f7e51242bc28 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1198,9 +1198,9 @@ void SmViewShell::Impl_Print( { SAL_INFO( "starmath", "SmViewShell::Impl_Print" ); - const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, sal_True ); - const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, sal_True ); - const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, sal_True ); + const bool bIsPrintTitle = rPrintUIOptions.getBoolValue( PRTUIOPT_TITLE_ROW, true ); + const bool bIsPrintFrame = rPrintUIOptions.getBoolValue( PRTUIOPT_BORDER, true ); + const bool bIsPrintFormulaText = rPrintUIOptions.getBoolValue( PRTUIOPT_FORMULA_TEXT, true ); SmPrintSize ePrintSize( static_cast< SmPrintSize >( rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_FORMAT, PRINT_SIZE_NORMAL ) )); const sal_uInt16 nZoomFactor = static_cast< sal_uInt16 >(rPrintUIOptions.getIntValue( PRTUIOPT_PRINT_SCALE, 100 )); @@ -1291,7 +1291,7 @@ void SmViewShell::Impl_Print( MapMode OutputMapMode; // PDF export should always use PRINT_SIZE_NORMAL ... - if (!rPrintUIOptions.getBoolValue( "IsPrinter", sal_False ) ) + if (!rPrintUIOptions.getBoolValue( "IsPrinter", false ) ) ePrintSize = PRINT_SIZE_NORMAL; switch (ePrintSize) { diff --git a/svtools/source/brwbox/datwin.cxx b/svtools/source/brwbox/datwin.cxx index 1ed74e3bf5d3..77eed29b9917 100644 --- a/svtools/source/brwbox/datwin.cxx +++ b/svtools/source/brwbox/datwin.cxx @@ -47,7 +47,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) { Window *pWin = (Window*) &rDev; if( bPressed ) - pWin->DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False ); + pWin->DrawSelectionBackground( aRect, 0, true, false, false ); } else { @@ -67,7 +67,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) sal_Bool bOldTransp = aFont.IsTransparent(); if ( !bOldTransp ) { - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); rDev.SetFont( aFont ); } @@ -82,7 +82,7 @@ void ButtonFrame::Draw( OutputDevice& rDev ) // restore settings if ( !bOldTransp ) { - aFont.SetTransparent(sal_False); + aFont.SetTransparent(false); rDev.SetFont( aFont ); } if (m_bDrawDisabled) diff --git a/svtools/source/brwbox/ebbcontrols.cxx b/svtools/source/brwbox/ebbcontrols.cxx index 8407828a664a..57c951ac6e26 100644 --- a/svtools/source/brwbox/ebbcontrols.cxx +++ b/svtools/source/brwbox/ebbcontrols.cxx @@ -45,7 +45,7 @@ namespace svt :ComboBox(pParent, nWinStyle|WB_DROPDOWN|WB_NOBORDER) { EnableAutoSize(false); - EnableAutocomplete(sal_True); + EnableAutocomplete(true); SetDropDownLineCount(5); } @@ -152,7 +152,7 @@ namespace svt :ListBox(pParent, nWinStyle|WB_DROPDOWN|WB_NOBORDER) { EnableAutoSize(false); - EnableMultiSelection(sal_False); + EnableMultiSelection(false); SetDropDownLineCount(20); } @@ -252,7 +252,7 @@ namespace svt SetBackground( rParentBackground ); else { - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } @@ -261,7 +261,7 @@ namespace svt pBox = new TriStateBox(this,WB_CENTER|WB_VCENTER); pBox->SetLegacyNoTextAlign( true ); pBox->EnableChildTransparentMode(); - pBox->SetPaintTransparent( sal_True ); + pBox->SetPaintTransparent( true ); pBox->SetClickHdl( LINK( this, CheckBoxControl, OnClick ) ); pBox->Show(); } @@ -535,7 +535,7 @@ namespace svt //------------------------------------------------------------------ void MultiLineTextCell::Modify() { - GetTextEngine()->SetModified( sal_True ); + GetTextEngine()->SetModified( true ); MultiLineEdit::Modify(); } diff --git a/svtools/source/brwbox/editbrowsebox.cxx b/svtools/source/brwbox/editbrowsebox.cxx index 98949a0527bd..135740c2f518 100644 --- a/svtools/source/brwbox/editbrowsebox.cxx +++ b/svtools/source/brwbox/editbrowsebox.cxx @@ -123,13 +123,13 @@ namespace svt { m_aImpl.reset(new EditBrowseBoxImpl()); - SetCompoundControl(sal_True); + SetCompoundControl(true); SetGridLineColor( Color( COL_LIGHTGRAY ) ); ImplInitSettings(sal_True, sal_True, sal_True); pCheckBoxPaint = new CheckBoxControl(&GetDataWindow()); - pCheckBoxPaint->SetPaintTransparent( sal_True ); + pCheckBoxPaint->SetPaintTransparent( true ); pCheckBoxPaint->SetBackground(); } @@ -210,7 +210,7 @@ namespace svt { pHeader = imp_CreateHeaderBar(pParent); if (!IsUpdateMode()) - pHeader->SetUpdateMode(sal_False); + pHeader->SetUpdateMode(false); return pHeader; } @@ -932,18 +932,18 @@ namespace svt } // don't paint during row change - rWindow.EnablePaint(sal_False); + rWindow.EnablePaint(false); // the last veto chance for derived classes if (!pTHIS->CursorMoving(nNewRow, nNewColId)) { pTHIS->InvalidateStatusCell(nEditRow); - rWindow.EnablePaint(sal_True); + rWindow.EnablePaint(true); return sal_False; } else { - rWindow.EnablePaint(sal_True); + rWindow.EnablePaint(true); return sal_True; } } @@ -988,7 +988,7 @@ namespace svt nEditRow = nNewRow; } ActivateCell(); - GetDataWindow().EnablePaint(sal_True); + GetDataWindow().EnablePaint(true); // should not be called here because the descant event is not needed here //BrowseBox::CursorMoved(); } @@ -1295,10 +1295,10 @@ namespace svt */ pCheckBoxPaint->GetBox().Enable(_bEnabled); pCheckBoxPaint->Show(); - pCheckBoxPaint->SetParentUpdateMode( sal_False ); + pCheckBoxPaint->SetParentUpdateMode( false ); pCheckBoxPaint->Update(); pCheckBoxPaint->Hide(); - pCheckBoxPaint->SetParentUpdateMode( sal_True ); + pCheckBoxPaint->SetParentUpdateMode( true ); } //------------------------------------------------------------------------------ diff --git a/svtools/source/config/accessibilityoptions.cxx b/svtools/source/config/accessibilityoptions.cxx index 79b646e3600c..986ef274626b 100644 --- a/svtools/source/config/accessibilityoptions.cxx +++ b/svtools/source/config/accessibilityoptions.cxx @@ -81,7 +81,7 @@ public: sal_Bool GetIsAllowAnimatedGraphics() const; sal_Bool GetIsAllowAnimatedText() const; sal_Bool GetIsAutomaticFontColor() const; - sal_Bool GetIsSystemFont() const; + bool GetIsSystemFont() const; sal_Int16 GetHelpTipSeconds() const; sal_Bool IsSelectionInReadonly() const; sal_Int16 GetEdgeBlending() const; @@ -252,7 +252,7 @@ sal_Bool SvtAccessibilityOptions_Impl::GetIsAutomaticFontColor() const return bRet; } -sal_Bool SvtAccessibilityOptions_Impl::GetIsSystemFont() const +bool SvtAccessibilityOptions_Impl::GetIsSystemFont() const { css::uno::Reference< css::beans::XPropertySet > xNode(m_xCfg, css::uno::UNO_QUERY); sal_Bool bRet = sal_True; diff --git a/svtools/source/config/helpopt.cxx b/svtools/source/config/helpopt.cxx index c3839a81fdbd..6ca2548cb6aa 100644 --- a/svtools/source/config/helpopt.cxx +++ b/svtools/source/config/helpopt.cxx @@ -69,9 +69,9 @@ public: virtual void Commit(); void SetExtendedHelp( sal_Bool b ) { bExtendedHelp= b; SetModified(); } - sal_Bool IsExtendedHelp() const { return bExtendedHelp; } + bool IsExtendedHelp() const { return bExtendedHelp; } void SetHelpTips( sal_Bool b ) { bHelpTips = b; SetModified(); } - sal_Bool IsHelpTips() const { return bHelpTips; } + bool IsHelpTips() const { return bHelpTips; } void SetWelcomeScreen( sal_Bool b ) { bWelcomeScreen = b; SetModified(); } sal_Bool IsWelcomeScreen() const { return bWelcomeScreen; } @@ -291,7 +291,7 @@ void SvtHelpOptions::SetExtendedHelp( sal_Bool b ) pImp->SetExtendedHelp( b ); } -sal_Bool SvtHelpOptions::IsExtendedHelp() const +bool SvtHelpOptions::IsExtendedHelp() const { return pImp->IsExtendedHelp(); } @@ -301,7 +301,7 @@ void SvtHelpOptions::SetHelpTips( sal_Bool b ) pImp->SetHelpTips( b ); } -sal_Bool SvtHelpOptions::IsHelpTips() const +bool SvtHelpOptions::IsHelpTips() const { return pImp->IsHelpTips(); } diff --git a/svtools/source/contnr/fileview.cxx b/svtools/source/contnr/fileview.cxx index 7723df81c477..4dc16d761463 100644 --- a/svtools/source/contnr/fileview.cxx +++ b/svtools/source/contnr/fileview.cxx @@ -866,7 +866,7 @@ PopupMenu* ViewTabListBox_Impl::CreateContextMenu( void ) = new PopupMenu( SvtResId( RID_FILEVIEW_CONTEXTMENU ) ); pRet->EnableItem( MID_FILEVIEW_DELETE, bEnableDelete ); pRet->EnableItem( MID_FILEVIEW_RENAME, bEnableRename ); - pRet->RemoveDisabledEntries( sal_True, sal_True ); + pRet->RemoveDisabledEntries( true, true ); return pRet; } diff --git a/svtools/source/contnr/imivctl1.cxx b/svtools/source/contnr/imivctl1.cxx index f38925475c4f..42664629d06f 100644 --- a/svtools/source/contnr/imivctl1.cxx +++ b/svtools/source/contnr/imivctl1.cxx @@ -1862,7 +1862,7 @@ void SvxIconChoiceCtrl_Impl::PaintEntry( SvxIconChoiceCtrlEntry* pEntry, const P if ( bShowSelection ) pView->DrawSelectionBackground( CalcFocusRect( pEntry ), - bActiveSelection ? 1 : 2 /* highlight */, sal_False /* check */, sal_True /* border */, sal_False /* ext border only */ ); + bActiveSelection ? 1 : 2 /* highlight */, false /* check */, true /* border */, false /* ext border only */ ); PaintItem( aBmpRect, IcnViewFieldTypeImage, pEntry, nBmpPaintFlags, pOut ); @@ -3322,7 +3322,7 @@ IcnViewEdit_Impl::IcnViewEdit_Impl( SvtIconChoiceCtrl* pParent, const Point& rPo bGrabFocus( sal_False ) { Font aFont( pParent->GetPointFont() ); - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); SetControlFont( aFont ); if( !pParent->HasFontFillColor() ) { diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index ca90c8453a81..ff8b5944277a 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -2656,7 +2656,7 @@ void ImpLBSelEng::DestroyAnchor() pImp->pAnchor = 0; } -sal_Bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor) +bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor) { SvTreeListEntry* pNewCursor = pImp->MakePointVisible( rPoint ); if( pNewCursor != pImp->pCursor ) @@ -2674,7 +2674,7 @@ sal_Bool ImpLBSelEng::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelect return false; } -sal_Bool ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint ) +bool ImpLBSelEng::IsSelectionAtPoint( const Point& rPoint ) { SvTreeListEntry* pEntry = pImp->MakePointVisible( rPoint ); if( pEntry ) diff --git a/svtools/source/contnr/templwin.cxx b/svtools/source/contnr/templwin.cxx index ec0311da59c2..7fda4016df9f 100644 --- a/svtools/source/contnr/templwin.cxx +++ b/svtools/source/contnr/templwin.cxx @@ -717,7 +717,7 @@ void SvtFrameWindow_Impl::OpenFile( const OUString& rURL, sal_Bool bPreview, sal // disabling must be done here, does not work in ctor because // execute of the dialog will overwrite it // ( own execute method would help ) - pTextWin->EnableInput( false, sal_True ); + pTextWin->EnableInput( false, true ); if ( pTextWin->IsReallyVisible() ) { sal_Bool b = sal_True; @@ -1319,7 +1319,7 @@ void SvtTemplateWindow::ReadViewSettings() // the selected view (details or preview) pFrameWin->ToggleView( TI_DOCTEMPLATE_DOCINFO == nSelectedView ); - aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, sal_True ); + aFrameWinTB.CheckItem( (sal_uInt16)nSelectedView, true ); // the split ratio sal_Int32 nSplitFileAndFrameSize = aSplitWin.GetItemSize( FILEWIN_ID ) + aSplitWin.GetItemSize( FRAMEWIN_ID ); diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 2e27e1718ddb..89aa4e250fa6 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -138,7 +138,7 @@ SvInplaceEdit2::SvInplaceEdit2 pEdit = new MyEdit_Impl( pParent, this ); Font aFont( pParent->GetFont() ); - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); Color aColor( pParent->GetBackground().GetColor() ); aFont.SetFillColor(aColor ); pEdit->SetFont( aFont ); @@ -1392,7 +1392,7 @@ void SvTreeListBox::StartDrag( sal_Int8, const Point& rPosPixel ) pDDTarget = 0; sal_Bool bOldUpdateMode = Control::IsUpdateMode(); - Control::SetUpdateMode( sal_True ); + Control::SetUpdateMode( true ); Update(); Control::SetUpdateMode( bOldUpdateMode ); @@ -2693,7 +2693,7 @@ void SvTreeListBox::SetFont( const Font& rFont ) Font aTempFont( rFont ); Font aOrigFont( GetFont() ); - aTempFont.SetTransparent( sal_True ); + aTempFont.SetTransparent( true ); if (aTempFont == aOrigFont) return; Control::SetFont( aTempFont ); diff --git a/svtools/source/control/calendar.cxx b/svtools/source/control/calendar.cxx index d1708d60b5e9..f9589b89bd4c 100644 --- a/svtools/source/control/calendar.cxx +++ b/svtools/source/control/calendar.cxx @@ -2485,7 +2485,7 @@ void CalendarField::Select() // ----------------------------------------------------------------------- -sal_Bool CalendarField::ShowDropDown( sal_Bool bShow ) +bool CalendarField::ShowDropDown( sal_Bool bShow ) { if ( bShow ) { @@ -2530,7 +2530,7 @@ sal_Bool CalendarField::ShowDropDown( sal_Bool bShow ) mpCalendar->EndSelection(); EndDropDown(); } - return sal_True; + return true; } // ----------------------------------------------------------------------- diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx index a75e2d555593..5997da3ed221 100644 --- a/svtools/source/control/ctrlbox.cxx +++ b/svtools/source/control/ctrlbox.cxx @@ -88,7 +88,7 @@ void ColorListBox::ImplInit() const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); aImageSize = rStyleSettings.GetListBoxPreviewDefaultPixelSize(); - EnableUserDraw( sal_True ); + EnableUserDraw( true ); SetUserItemSize( aImageSize ); } @@ -308,13 +308,13 @@ void ColorListBox::UserDraw( const UserDrawEvent& rUDEvt ) } } - ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_False ); + ListBox::DrawEntry( rUDEvt, false, true, false ); } else - ListBox::DrawEntry( rUDEvt, sal_False, sal_True, sal_True ); + ListBox::DrawEntry( rUDEvt, false, true, true ); } else - ListBox::DrawEntry( rUDEvt, sal_True, sal_True, sal_False ); + ListBox::DrawEntry( rUDEvt, true, true, false ); } // ======================================================================= @@ -921,7 +921,7 @@ sal_Bool LineListBox::UpdatePaintLineColor( void ) void LineListBox::UpdateEntries( long nOldWidth ) { - SetUpdateMode( sal_False ); + SetUpdateMode( false ); UpdatePaintLineColor( ); @@ -960,7 +960,7 @@ void LineListBox::UpdateEntries( long nOldWidth ) n++; } - SetUpdateMode( sal_True ); + SetUpdateMode( true ); Invalidate(); } @@ -1391,11 +1391,11 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt ) } rUDEvt.GetDevice()->SetFont( aOldFont ); - DrawEntry( rUDEvt, sal_False, sal_False); // draw separator + DrawEntry( rUDEvt, false, false); // draw separator } else { - DrawEntry( rUDEvt, sal_True, sal_True ); + DrawEntry( rUDEvt, true, true ); } } @@ -1669,7 +1669,7 @@ FontSizeBox::~FontSizeBox() void FontSizeBox::ImplInit() { - EnableAutocomplete( sal_False ); + EnableAutocomplete( false ); bRelativeMode = sal_False; bPtRelative = sal_False; @@ -1677,7 +1677,7 @@ void FontSizeBox::ImplInit() bStdSize = sal_False; pFontList = NULL; - SetShowTrailingZeros( sal_False ); + SetShowTrailingZeros( false ); SetDecimalDigits( 1 ); SetMin( 20 ); SetMax( 9999 ); @@ -1957,7 +1957,7 @@ void FontSizeBox::SetValue( sal_Int64 nNewValue, FieldUnit eInUnit ) mnLastValue = nTempValue; SetText( aName ); mnFieldValue = mnLastValue; - SetEmptyFieldValueData( sal_False ); + SetEmptyFieldValueData( false ); return; } } diff --git a/svtools/source/control/filectrl.cxx b/svtools/source/control/filectrl.cxx index 19856d2c8d75..75c38696eb86 100644 --- a/svtools/source/control/filectrl.cxx +++ b/svtools/source/control/filectrl.cxx @@ -48,7 +48,7 @@ FileControl::FileControl( Window* pParent, WinBits nStyle, FileControlMode nFlag maButton.Show(); maEdit.Show(); - SetCompoundControl( sal_True ); + SetCompoundControl( true ); SetStyle( ImplInitStyle( GetStyle() ) ); } diff --git a/svtools/source/control/headbar.cxx b/svtools/source/control/headbar.cxx index 1a25cbe05f8c..7df2ec124bf0 100644 --- a/svtools/source/control/headbar.cxx +++ b/svtools/source/control/headbar.cxx @@ -385,9 +385,9 @@ void HeaderBar::ImplDrawItem( OutputDevice* pDev, // draw ButtonStyle // avoid 3D borders if( bHigh ) - DrawSelectionBackground( aRect, 1, sal_True, sal_False, sal_False, &aSelectionTextColor ); + DrawSelectionBackground( aRect, 1, true, false, false, &aSelectionTextColor ); else if ( !mbButtonStyle || (nBits & HIB_FLAT) ) - DrawSelectionBackground( aRect, 0, sal_True, sal_False, sal_False, &aSelectionTextColor ); + DrawSelectionBackground( aRect, 0, true, false, false, &aSelectionTextColor ); } // do not draw if there is no space diff --git a/svtools/source/control/inettbc.cxx b/svtools/source/control/inettbc.cxx index d527408ce235..ac0529c6399a 100644 --- a/svtools/source/control/inettbc.cxx +++ b/svtools/source/control/inettbc.cxx @@ -895,7 +895,7 @@ void SvtURLBox::Init(bool bSetDefaultHelpID) if (bSetDefaultHelpID && GetHelpId().isEmpty()) SetHelpId( ".uno:OpenURL" ); - EnableAutocomplete( sal_False ); + EnableAutocomplete( false ); SetText( OUString() ); diff --git a/svtools/source/control/roadmap.cxx b/svtools/source/control/roadmap.cxx index d75d61456b50..dc4ea873e5d3 100644 --- a/svtools/source/control/roadmap.cxx +++ b/svtools/source/control/roadmap.cxx @@ -228,7 +228,7 @@ namespace svt // on this with calculating a new bold font. // Unfortunately, the OutputDevice does not offer a notify mechanism for a changed font. // So settings the font from outside is simply a forbidded scenario at the moment - EnableMapMode( sal_False ); + EnableMapMode( false ); } //--------------------------------------------------------------------- @@ -617,7 +617,7 @@ namespace svt // draw it DrawText( Rectangle( aTextPos, aOutputSize ), GetText(), TEXT_DRAW_LEFT | TEXT_DRAW_TOP | TEXT_DRAW_MULTILINE | TEXT_DRAW_WORDBREAK ); - DrawTextLine( aTextPos, aOutputSize.Width(), STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, sal_False ); + DrawTextLine( aTextPos, aOutputSize.Width(), STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, false ); const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); SetLineColor( rStyleSettings.GetFieldTextColor()); SetTextColor(rStyleSettings.GetFieldTextColor()); diff --git a/svtools/source/control/ruler.cxx b/svtools/source/control/ruler.cxx index 0778237b06d0..115eea59abe4 100644 --- a/svtools/source/control/ruler.cxx +++ b/svtools/source/control/ruler.cxx @@ -216,7 +216,7 @@ void Ruler::ImplInit( WinBits nWinBits ) // --- RTL --- no UI mirroring for horizontal rulers, because // the document is also not mirrored - EnableRTL( sal_False ); + EnableRTL( false ); } // Variablen initialisieren @@ -1133,7 +1133,7 @@ void Ruler::ImplFormat() aVirDevSize.Width() = mnVirHeight; } if ( aVirDevSize != maVirDev.GetOutputSizePixel() ) - maVirDev.SetOutputSizePixel( aVirDevSize, sal_True ); + maVirDev.SetOutputSizePixel( aVirDevSize, true ); else maVirDev.Erase(); diff --git a/svtools/source/control/stdmenu.cxx b/svtools/source/control/stdmenu.cxx index 04fbe3e0da7c..a8c08377619d 100644 --- a/svtools/source/control/stdmenu.cxx +++ b/svtools/source/control/stdmenu.cxx @@ -106,13 +106,13 @@ void FontNameMenu::SetCurName(const OUString& rName) OUString aText = GetItemText( nItemId ); if ( aText == maCurName ) { - CheckItem( nItemId, sal_True ); + CheckItem( nItemId, true ); return; } } if ( nChecked ) - CheckItem( nChecked, sal_False ); + CheckItem( nChecked, false ); } // ======================================================================== @@ -219,7 +219,7 @@ void FontSizeMenu::Fill( const FontInfo& rInfo, const FontList* pList ) { mpHeightAry[nPos] = *pTempAry; nPos++; // Id is nPos+1 - InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, sal_True, sal_False ), MIB_RADIOCHECK | MIB_AUTOCHECK ); + InsertItem( nPos, rI18nHelper.GetNum( *pTempAry, 1, true, false ), MIB_RADIOCHECK | MIB_AUTOCHECK ); pTempAry++; } @@ -241,7 +241,7 @@ void FontSizeMenu::SetCurHeight( long nHeight ) if ( mpHeightAry[i] == nHeight ) { - CheckItem( nItemId, sal_True ); + CheckItem( nItemId, true ); return; } @@ -250,7 +250,7 @@ void FontSizeMenu::SetCurHeight( long nHeight ) } if ( nChecked ) - CheckItem( nChecked, sal_False ); + CheckItem( nChecked, false ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/svtools/source/control/tabbar.cxx b/svtools/source/control/tabbar.cxx index 16d7c7a4a0a6..382ca95c879b 100644 --- a/svtools/source/control/tabbar.cxx +++ b/svtools/source/control/tabbar.cxx @@ -334,7 +334,7 @@ IMPL_LINK( TabBarEdit, ImplEndEditHdl, void*, pCancel ) // We need this query, because the edit get a losefous event, // when it shows the context menu or the insert symbol dialog - if ( !HasFocus() && HasChildPathFocus( sal_True ) ) + if ( !HasFocus() && HasChildPathFocus( true ) ) { maLoseFocusTimer.SetTimeout( 30 ); maLoseFocusTimer.SetTimeoutHdl( LINK( this, TabBarEdit, ImplEndTimerHdl ) ); @@ -355,7 +355,7 @@ IMPL_LINK_NOARG(TabBarEdit, ImplEndTimerHdl) // We need this query, because the edit get a losefous event, // when it shows the context menu or the insert symbol dialog - if ( HasChildPathFocus( sal_True ) ) + if ( HasChildPathFocus( true ) ) maLoseFocusTimer.Start(); else GetParent()->EndEditMode( sal_True ); diff --git a/svtools/source/control/toolbarmenu.cxx b/svtools/source/control/toolbarmenu.cxx index 9c394116c310..a6965112c8e8 100644 --- a/svtools/source/control/toolbarmenu.cxx +++ b/svtools/source/control/toolbarmenu.cxx @@ -140,7 +140,7 @@ const Reference< XAccessibleContext >& ToolbarMenuEntry::GetAccessible( bool bCr { if( mpControl ) { - mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( sal_True ), UNO_QUERY ); + mxAccContext = Reference< XAccessibleContext >( mpControl->GetAccessible( true ), UNO_QUERY ); } else { @@ -920,7 +920,7 @@ void ToolbarMenu::implHighlightEntry( int nHighlightEntry, bool bHighlight ) if( bHighlight && IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) ) { bDrawItemRect = false; - if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, + if( !DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect, CTRL_STATE_SELECTED | ( pEntry->mbEnabled? CTRL_STATE_ENABLED: 0 ), ImplControlValue(), @@ -1308,7 +1308,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec { const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings(); Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() ); - i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor ); + i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, true, false, 2, NULL, &aColor ); } } diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 934dba08407a..c661b268189e 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -130,7 +130,7 @@ ValueSet::ValueSet( Window* pParent, const ResId& rResId, bool bDisableTransient ValueSet::~ValueSet() { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent> - xComponent (GetAccessible(sal_False), ::com::sun::star::uno::UNO_QUERY); + xComponent (GetAccessible(false), ::com::sun::star::uno::UNO_QUERY); if (xComponent.is()) xComponent->dispose (); @@ -505,7 +505,7 @@ void ValueSet::Format() // Init VirDev maVirDev.SetSettings( GetSettings() ); maVirDev.SetBackground( GetBackground() ); - maVirDev.SetOutputSizePixel( aWinSize, sal_True ); + maVirDev.SetOutputSizePixel( aWinSize, true ); // nothing is changed in case of too small items if ( (mnItemWidth <= 0) || @@ -1126,7 +1126,7 @@ sal_uInt16 ValueSet::ImplGetVisibleItemCount() const void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star::uno::Any& rOldValue, const ::com::sun::star::uno::Any& rNewValue ) { - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( false ) ); if( pAcc ) pAcc->FireAccessibleEvent( nEventId, rOldValue, rNewValue ); @@ -1136,7 +1136,7 @@ void ValueSet::ImplFireAccessibleEvent( short nEventId, const ::com::sun::star:: bool ValueSet::ImplHasAccessibleListeners() { - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( false ) ); return( pAcc && pAcc->HasAccessibleListeners() ); } @@ -1498,7 +1498,7 @@ void ValueSet::GetFocus() Control::GetFocus(); // Tell the accessible object that we got the focus. - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( false ) ); if( pAcc ) pAcc->GetFocus(); } @@ -1515,7 +1515,7 @@ void ValueSet::LoseFocus() Control::LoseFocus(); // Tell the accessible object that we lost the focus. - ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( sal_False ) ); + ValueSetAcc* pAcc = ValueSetAcc::getImplementation( GetAccessible( false ) ); if( pAcc ) pAcc->LoseFocus(); } diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index 75ee7d760030..c623be09debe 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -668,8 +668,8 @@ void AssignmentPersistentData::Commit() // some knittings m_pFieldScroller->SetScrollHdl(LINK(this, AddressBookSourceDialog, OnFieldScroll)); m_pAdministrateDatasources->SetClickHdl(LINK(this, AddressBookSourceDialog, OnAdministrateDatasources)); - m_pDatasource->EnableAutocomplete(sal_True); - m_pTable->EnableAutocomplete(sal_True); + m_pDatasource->EnableAutocomplete(true); + m_pTable->EnableAutocomplete(true); m_pTable->SetGetFocusHdl(LINK(this, AddressBookSourceDialog, OnComboGetFocus)); m_pDatasource->SetGetFocusHdl(LINK(this, AddressBookSourceDialog, OnComboGetFocus)); m_pTable->SetLoseFocusHdl(LINK(this, AddressBookSourceDialog, OnComboLoseFocus)); diff --git a/svtools/source/dialogs/wizdlg.cxx b/svtools/source/dialogs/wizdlg.cxx index 51bbd19e605c..48440f2fefb6 100644 --- a/svtools/source/dialogs/wizdlg.cxx +++ b/svtools/source/dialogs/wizdlg.cxx @@ -462,8 +462,8 @@ bool WizardDialog::Notify( NotifyEvent& rNEvt ) if ( mpPrevBtn->IsVisible() && mpPrevBtn->IsEnabled() && mpPrevBtn->IsInputEnabled() ) { - mpPrevBtn->SetPressed( sal_True ); - mpPrevBtn->SetPressed( sal_False ); + mpPrevBtn->SetPressed( true ); + mpPrevBtn->SetPressed( false ); mpPrevBtn->Click(); } return true; @@ -476,8 +476,8 @@ bool WizardDialog::Notify( NotifyEvent& rNEvt ) if ( mpNextBtn->IsVisible() && mpNextBtn->IsEnabled() && mpNextBtn->IsInputEnabled() ) { - mpNextBtn->SetPressed( sal_True ); - mpNextBtn->SetPressed( sal_False ); + mpNextBtn->SetPressed( true ); + mpNextBtn->SetPressed( false ); mpNextBtn->Click(); } return true; diff --git a/svtools/source/edit/editsyntaxhighlighter.cxx b/svtools/source/edit/editsyntaxhighlighter.cxx index f62a428fcad4..94030456e41b 100644 --- a/svtools/source/edit/editsyntaxhighlighter.cxx +++ b/svtools/source/edit/editsyntaxhighlighter.cxx @@ -97,10 +97,10 @@ void MultiLineEditSyntaxHighlight::DoBracketHilight(sal_uInt16 nKey) { if (!nCount) { - GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nPara, i, i+1, sal_True ); - GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nPara, i, i+1, sal_True ); - GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, nStartPos, nStartPos, sal_True ); - GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, nStartPos, nStartPos, sal_True ); + GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nPara, i, i+1, true ); + GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nPara, i, i+1, true ); + GetTextEngine()->SetAttrib( TextAttribFontWeight( WEIGHT_ULTRABOLD ), nStartPara, nStartPos, nStartPos, true ); + GetTextEngine()->SetAttrib( TextAttribFontColor( Color(0,0,0) ), nStartPara, nStartPos, nStartPos, true ); return; } else @@ -170,13 +170,13 @@ void MultiLineEditSyntaxHighlight::UpdateData() for (unsigned int nLine=0; nLine < GetTextEngine()->GetParagraphCount(); nLine++) { OUString aLine( GetTextEngine()->GetText( nLine ) ); - GetTextEngine()->RemoveAttribs( nLine, sal_True ); + GetTextEngine()->RemoveAttribs( nLine, true ); std::vector<HighlightPortion> aPortions; aHighlighter.getHighlightPortions( aLine, aPortions ); for (std::vector<HighlightPortion>::iterator i(aPortions.begin()); i != aPortions.end(); ++i) { - GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(i->tokenType) ), nLine, i->nBegin, i->nEnd, sal_True ); + GetTextEngine()->SetAttrib( TextAttribFontColor( GetColorValue(i->tokenType) ), nLine, i->nBegin, i->nEnd, true ); } } GetTextView()->ShowCursor( false, true ); diff --git a/svtools/source/edit/svmedit2.cxx b/svtools/source/edit/svmedit2.cxx index 2e71b0d48c43..56d4c5e568ce 100644 --- a/svtools/source/edit/svmedit2.cxx +++ b/svtools/source/edit/svmedit2.cxx @@ -41,7 +41,7 @@ ExtMultiLineEdit::~ExtMultiLineEdit() void ExtMultiLineEdit::InsertText( const OUString& rNew, sal_Bool ) { - GetTextView()->InsertText( rNew, sal_False ); + GetTextView()->InsertText( rNew, false ); } void ExtMultiLineEdit::SetAutoScroll( sal_Bool bAutoScroll ) diff --git a/svtools/source/filter/SvFilterOptionsDialog.cxx b/svtools/source/filter/SvFilterOptionsDialog.cxx index 1f9c0cc33d60..0893e64c5f9a 100644 --- a/svtools/source/filter/SvFilterOptionsDialog.cxx +++ b/svtools/source/filter/SvFilterOptionsDialog.cxx @@ -236,7 +236,7 @@ sal_Int16 SvFilterOptionsDialog::execute() } if ( !aInternalFilterName.isEmpty() ) { - GraphicFilter aGraphicFilter( sal_True ); + GraphicFilter aGraphicFilter( true ); sal_uInt16 nFormat, nFilterCount = aGraphicFilter.GetExportFormatCount(); for ( nFormat = 0; nFormat < nFilterCount; nFormat++ ) diff --git a/svtools/source/filter/exportdialog.cxx b/svtools/source/filter/exportdialog.cxx index f880b125a82f..e8d359cfa6e9 100644 --- a/svtools/source/filter/exportdialog.cxx +++ b/svtools/source/filter/exportdialog.cxx @@ -504,7 +504,7 @@ Bitmap ExportDialog::GetGraphicBitmap( SvStream& rInputStream ) { Bitmap aRet; Graphic aGraphic; - GraphicFilter aFilter( sal_False ); + GraphicFilter aFilter( false ); if ( aFilter.ImportGraphic( aGraphic, "", rInputStream, GRFILTER_FORMAT_NOTFOUND, NULL, 0, static_cast<com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >*>(NULL), NULL ) == GRFILTER_OK ) { aRet = aGraphic.GetBitmap(); @@ -767,7 +767,7 @@ void ExportDialog::createFilterOptions() mpNfCompression->SetMin( 1 ); mpNfCompression->SetMax( 100 ); mpNfCompression->SetValue( nQuality ); - mpNfCompression->SetStrictFormat( sal_True ); + mpNfCompression->SetStrictFormat( true ); } break; case FORMAT_PNG : @@ -785,7 +785,7 @@ void ExportDialog::createFilterOptions() mpNfCompression->SetMin( 1 ); mpNfCompression->SetMax( 9 ); mpNfCompression->SetValue( 9 ); - mpNfCompression->SetStrictFormat( sal_True ); + mpNfCompression->SetStrictFormat( true ); // Interlaced mpMode->Show(); @@ -815,7 +815,7 @@ void ExportDialog::createFilterOptions() // RLE coding mpBMPCompression->Show(); - mpCbRLEEncoding->Check(mpFilterOptionsItem->ReadBool(OUString("RLE_Coding"), sal_True)); + mpCbRLEEncoding->Check(mpFilterOptionsItem->ReadBool(OUString("RLE_Coding"), true)); } break; case FORMAT_GIF : @@ -974,7 +974,7 @@ void ExportDialog::updateControls() // EPS if ( mpRbEPSLevel1->IsVisible() ) { - sal_Bool bEnabled = mpRbEPSLevel1->IsChecked() == sal_False; + sal_Bool bEnabled = !mpRbEPSLevel1->IsChecked(); mpRbEPSColorFormat1->Enable( bEnabled ); mpRbEPSColorFormat2->Enable( bEnabled ); mpRbEPSCompressionLZW->Enable( bEnabled ); diff --git a/svtools/source/graphic/grfmgr2.cxx b/svtools/source/graphic/grfmgr2.cxx index de9fee5c9d7b..ea953e9ea18b 100644 --- a/svtools/source/graphic/grfmgr2.cxx +++ b/svtools/source/graphic/grfmgr2.cxx @@ -1629,7 +1629,7 @@ bool GraphicObject::ImplRenderTempTile( VirtualDevice& rVDev, int nExponent, // #105229# Switch off mapping (converting to logic and back to // pixel might cause roundoff errors) sal_Bool bOldMap( rVDev.IsMapModeEnabled() ); - rVDev.EnableMapMode( sal_False ); + rVDev.EnableMapMode( false ); bool bRet( ImplRenderTileRecursive( rVDev, nExponent, nMSBFactor, nNumTilesX, nNumTilesY, nNumTilesX, nNumTilesY, rTileSizePixel, pAttr, nFlags, aTileInfo ) ); @@ -1947,7 +1947,7 @@ bool GraphicObject::ImplDrawTiled( OutputDevice& rOut, const Point& rPosPixel, bool bOldMap( rOut.IsMapModeEnabled() ); if( bDrawInPixel ) - rOut.EnableMapMode( sal_False ); + rOut.EnableMapMode( false ); for( nY=0; nY < nNumTilesY; ++nY ) { diff --git a/svtools/source/graphic/provider.cxx b/svtools/source/graphic/provider.cxx index 1abe65c55433..f4030333ff78 100644 --- a/svtools/source/graphic/provider.cxx +++ b/svtools/source/graphic/provider.cxx @@ -649,7 +649,7 @@ void ImplApplyFilterData( ::Graphic& rGraphic, uno::Sequence< beans::PropertyVal MapMode aNewMapMode( MAP_100TH_MM ); aNewMapMode.SetScaleX( static_cast< double >( aLogicalSize.Width ) / static_cast< double >( aMtfSize.Width() ) ); aNewMapMode.SetScaleY( static_cast< double >( aLogicalSize.Height ) / static_cast< double >( aMtfSize.Height() ) ); - aDummyVDev.EnableOutput( sal_False ); + aDummyVDev.EnableOutput( false ); aDummyVDev.SetMapMode( aNewMapMode ); for( size_t i = 0, nObjCount = aMtf.GetActionSize(); i < nObjCount; i++ ) diff --git a/svtools/source/hatchwindow/ipwin.cxx b/svtools/source/hatchwindow/ipwin.cxx index 2b10a72a0597..ee7ba35e401f 100644 --- a/svtools/source/hatchwindow/ipwin.cxx +++ b/svtools/source/hatchwindow/ipwin.cxx @@ -632,7 +632,7 @@ bool SvResizeWindow::Notify( NotifyEvent& rEvt ) { if ( rEvt.GetType() == EVENT_LOSEFOCUS && m_bActive ) { - sal_Bool bHasFocus = HasChildPathFocus(sal_True); + sal_Bool bHasFocus = HasChildPathFocus(true); if ( !bHasFocus ) { m_bActive = sal_False; diff --git a/svtools/source/inc/svimpbox.hxx b/svtools/source/inc/svimpbox.hxx index c0c00a927826..3a407d3d0e38 100644 --- a/svtools/source/inc/svimpbox.hxx +++ b/svtools/source/inc/svimpbox.hxx @@ -56,9 +56,9 @@ public: void BeginDrag(); void CreateAnchor(); void DestroyAnchor(); - sal_Bool SetCursorAtPoint( const Point& rPoint, + bool SetCursorAtPoint( const Point& rPoint, sal_Bool bDontSelectAtCursor=sal_False ); - sal_Bool IsSelectionAtPoint( const Point& rPoint ); + bool IsSelectionAtPoint( const Point& rPoint ); void DeselectAtPoint( const Point& rPoint ); void DeselectAll(); }; diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index eb1237af43f7..81334babb123 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -1774,7 +1774,7 @@ namespace svt { namespace table invalidateRow( m_nCurRow ); } } - m_pSelEngine->SetAnchor(sal_True); + m_pSelEngine->SetAnchor(true); m_nAnchor = m_nCurRow; ensureVisible(m_nCurColumn, m_nCurRow, false); selectionChanged = true; @@ -1855,7 +1855,7 @@ namespace svt { namespace table invalidateRow( m_nCurRow ); } } - m_pSelEngine->SetAnchor(sal_True); + m_pSelEngine->SetAnchor(true); m_nAnchor = m_nCurRow; ensureVisible(m_nCurColumn, m_nCurRow, false); selectionChanged = true; @@ -1884,7 +1884,7 @@ namespace svt { namespace table } m_nCurRow = 0; m_nAnchor = m_nCurRow; - m_pSelEngine->SetAnchor(sal_True); + m_pSelEngine->SetAnchor(true); ensureVisible(m_nCurColumn, 0, false); selectionChanged = true; bSuccess = true; @@ -1910,7 +1910,7 @@ namespace svt { namespace table } m_nCurRow = m_nRowCount-1; m_nAnchor = m_nCurRow; - m_pSelEngine->SetAnchor(sal_True); + m_pSelEngine->SetAnchor(true); ensureVisible(m_nCurColumn, m_nRowCount-1, false); selectionChanged = true; bSuccess = true; @@ -2780,7 +2780,7 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - sal_Bool TableFunctionSet::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor) + bool TableFunctionSet::SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor) { sal_Bool bHandled = sal_False; // newRow is the row which includes the point, getCurRow() is the last selected row, before the mouse click @@ -2793,12 +2793,12 @@ namespace svt { namespace table newCol = m_pTableControl->getLeftColumn(); if ( ( newRow == ROW_INVALID ) || ( newCol == COL_INVALID ) ) - return sal_False; + return false; if ( bDontSelectAtCursor ) { if ( m_pTableControl->getSelectedRowCount() > 1 ) - m_pTableControl->getSelEngine()->AddAlways(sal_True); + m_pTableControl->getSelEngine()->AddAlways(true); bHandled = sal_True; } else if ( m_pTableControl->getAnchor() == m_pTableControl->getCurRow() ) @@ -2849,7 +2849,7 @@ namespace svt { namespace table } } if ( m_pTableControl->getSelectedRowCount() > 1 && m_pTableControl->getSelEngine()->GetSelectionMode() != SINGLE_SELECTION ) - m_pTableControl->getSelEngine()->AddAlways(sal_True); + m_pTableControl->getSelEngine()->AddAlways(true); m_pTableControl->invalidateRow( newRow ); bHandled = sal_True; @@ -2858,11 +2858,11 @@ namespace svt { namespace table return bHandled; } //------------------------------------------------------------------------------------------------------------------ - sal_Bool TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) + bool TableFunctionSet::IsSelectionAtPoint( const Point& rPoint ) { - m_pTableControl->getSelEngine()->AddAlways(sal_False); + m_pTableControl->getSelEngine()->AddAlways(false); if ( !m_pTableControl->hasRowSelection() ) - return sal_False; + return false; else { RowPos curRow = m_pTableControl->getRowAtPoint( rPoint ); diff --git a/svtools/source/table/tablecontrol_impl.hxx b/svtools/source/table/tablecontrol_impl.hxx index 9d43ea3e8825..58c7ec9cf7c1 100644 --- a/svtools/source/table/tablecontrol_impl.hxx +++ b/svtools/source/table/tablecontrol_impl.hxx @@ -496,8 +496,8 @@ namespace svt { namespace table virtual void BeginDrag(); virtual void CreateAnchor(); virtual void DestroyAnchor(); - virtual sal_Bool SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor); - virtual sal_Bool IsSelectionAtPoint( const Point& rPoint ); + virtual bool SetCursorAtPoint(const Point& rPoint, sal_Bool bDontSelectAtCursor); + virtual bool IsSelectionAtPoint( const Point& rPoint ); virtual void DeselectAtPoint( const Point& rPoint ); virtual void DeselectAll(); }; diff --git a/svtools/source/toolpanel/drawerlayouter.cxx b/svtools/source/toolpanel/drawerlayouter.cxx index af1aaeb89927..ce92da80cc72 100644 --- a/svtools/source/toolpanel/drawerlayouter.cxx +++ b/svtools/source/toolpanel/drawerlayouter.cxx @@ -137,10 +137,10 @@ namespace svt const PToolPanelDrawer pDrawer( m_aDrawers[ i_nChildIndex ] ); - Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( sal_False ); + Reference< XAccessible > xItemAccessible = pDrawer->GetAccessible( false ); if ( !xItemAccessible.is() ) { - xItemAccessible = pDrawer->GetAccessible( sal_True ); + xItemAccessible = pDrawer->GetAccessible( true ); ENSURE_OR_RETURN( xItemAccessible.is(), "illegal accessible provided by the drawer implementation!", NULL ); OSL_VERIFY( ::comphelper::OAccessibleImplementationAccess::setAccessibleParent( xItemAccessible->getAccessibleContext(), i_rParentAccessible ) ); diff --git a/svtools/source/toolpanel/paneltabbar.cxx b/svtools/source/toolpanel/paneltabbar.cxx index 40c6adff240f..f041b33057f3 100644 --- a/svtools/source/toolpanel/paneltabbar.cxx +++ b/svtools/source/toolpanel/paneltabbar.cxx @@ -165,8 +165,8 @@ namespace svt aSelectionRect, ( bHovered || bFocused ) ? ( bActive ? 1 : 2 ) : 0 /* hilight */, bActive /* check */, - sal_True /* border */, - sal_False /* ext border only */, + true /* border */, + false /* ext border only */, 0 /* corner radius */, NULL, NULL @@ -686,7 +686,7 @@ namespace svt Font aFont( m_rTabBar.GetFont() ); aFont.SetOrientation( 2700 ); - aFont.SetVertical( sal_True ); + aFont.SetVertical( true ); m_rTabBar.SetFont( aFont ); aTextPos.X() += aTextSize.Height(); @@ -788,7 +788,7 @@ namespace svt return; } - m_rTabBar.SetUpdateMode( sal_False ); + m_rTabBar.SetUpdateMode( false ); // the aligned bounding and content rect const Rectangle aActualBounds = m_aNormalizer.getTransformed( aNormalizedBounds, m_eTabAlignment ); @@ -806,7 +806,7 @@ namespace svt // render item "foreground" layer m_pRenderer->postRenderItem( m_rTabBar, aActualBounds, nItemFlags ); - m_rTabBar.SetUpdateMode( sal_True ); + m_rTabBar.SetUpdateMode( true ); } //------------------------------------------------------------------------------------------------------------------ diff --git a/svtools/source/toolpanel/tablayouter.cxx b/svtools/source/toolpanel/tablayouter.cxx index bd38da4e4592..2d7cafa89a44 100644 --- a/svtools/source/toolpanel/tablayouter.cxx +++ b/svtools/source/toolpanel/tablayouter.cxx @@ -200,7 +200,7 @@ namespace svt if ( lcl_checkDisposed( *m_pData ) ) return NULL; - return m_pData->pTabBar->GetAccessible( sal_True ); + return m_pData->pTabBar->GetAccessible( true ); } //........................................................................ diff --git a/svtools/source/toolpanel/toolpaneldrawer.cxx b/svtools/source/toolpanel/toolpaneldrawer.cxx index c39462f27e80..bd1fef83d577 100644 --- a/svtools/source/toolpanel/toolpaneldrawer.cxx +++ b/svtools/source/toolpanel/toolpaneldrawer.cxx @@ -50,7 +50,7 @@ namespace svt :Window( &i_rParent ) ,m_rDrawer( i_rParent ) { - SetMouseTransparent( sal_True ); + SetMouseTransparent( true ); Show(); SetAccessibleRole( AccessibleRole::LABEL ); } @@ -78,7 +78,7 @@ namespace svt ,m_bFocused( false ) ,m_bExpanded( false ) { - EnableMapMode( sal_False ); + EnableMapMode( false ); SetBackground( Wallpaper() ); SetPointer( POINTER_REFHAND ); @@ -198,7 +198,7 @@ namespace svt { const Rectangle aTextPixelBox( m_pPaintDevice->LogicToPixel( i_rTextBox ) ); - m_pPaintDevice->EnableMapMode( sal_False ); + m_pPaintDevice->EnableMapMode( false ); m_pPaintDevice->SetFillColor(); Rectangle aBox( i_rTextBox ); @@ -215,7 +215,7 @@ namespace svt m_pPaintDevice->SetLineColor( COL_BLACK ); m_pPaintDevice->DrawPolyLine( Polygon( aTextPixelBox ), aDottedStyle ); - m_pPaintDevice->EnableMapMode( sal_False ); + m_pPaintDevice->EnableMapMode( false ); } else HideFocus(); diff --git a/svtools/source/uno/unoiface.cxx b/svtools/source/uno/unoiface.cxx index 2793e1226d88..ae3270b6ccb0 100644 --- a/svtools/source/uno/unoiface.cxx +++ b/svtools/source/uno/unoiface.cxx @@ -110,7 +110,7 @@ SAL_DLLPUBLIC_EXPORT Window* CreateWindow( VCLXWindow** ppNewComp, const ::com:: pWindow = new CalendarField( pParent, nWinBits); static_cast<CalendarField*>(pWindow)->EnableToday(); static_cast<CalendarField*>(pWindow)->EnableNone(); - static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( sal_True ); + static_cast<CalendarField*>(pWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new SVTXDateField; ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pWindow ); } diff --git a/svx/source/accessibility/AccessibleFrameSelector.cxx b/svx/source/accessibility/AccessibleFrameSelector.cxx index 4dfbf8c363b2..6a920a7e6c53 100644 --- a/svx/source/accessibility/AccessibleFrameSelector.cxx +++ b/svx/source/accessibility/AccessibleFrameSelector.cxx @@ -147,7 +147,7 @@ Reference< XAccessible > AccFrameSelector::getAccessibleParent( ) IsValid(); Reference< XAccessible > xRet; if(meBorder == FRAMEBORDER_NONE) - xRet = mpFrameSel->GetParent()->GetAccessible( sal_True ); + xRet = mpFrameSel->GetParent()->GetAccessible( true ); else xRet = mpFrameSel->CreateAccessible(); return xRet; diff --git a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx index 398d3835f659..7f63a4cbfde0 100644 --- a/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx +++ b/svx/source/accessibility/svxpixelctlaccessiblecontext.cxx @@ -115,7 +115,7 @@ uno::Reference< XAccessible > SvxPixelCtlAccessible::getAccessibleParent( ) IsValid(); uno::Reference< XAccessible > xRet; if(pPixelCtl) - xRet = pPixelCtl->GetParent()->GetAccessible( sal_True ); + xRet = pPixelCtl->GetParent()->GetAccessible( true ); return xRet; } diff --git a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx index 112c544a0970..14b4685ffe81 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFontWork.cxx @@ -261,7 +261,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F VirtualDevice aVirDev( 1 ); aVirDev.SetMapMode( MAP_100TH_MM ); aVirDev.SetFont( aFont ); - aVirDev.EnableRTL( sal_True ); + aVirDev.EnableRTL( true ); if ( aParagraphIter->nFrameDirection == FRMDIR_HORI_RIGHT_TOP ) aVirDev.SetLayoutMode( TEXT_LAYOUT_BIDI_RTL ); @@ -281,7 +281,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F { FWCharacterData aCharacterData; OUString aCharText( (sal_Unicode)rText[ i ] ); - if ( aVirDev.GetTextOutlines( aCharacterData.vOutlines, aCharText, 0, 0, -1, sal_True, nWidth, pDXArry ) ) + if ( aVirDev.GetTextOutlines( aCharacterData.vOutlines, aCharText, 0, 0, -1, true, nWidth, pDXArry ) ) { sal_Int32 nTextWidth = aVirDev.GetTextWidth( aCharText); std::vector< PolyPolygon >::iterator aOutlineIter = aCharacterData.vOutlines.begin(); @@ -339,7 +339,7 @@ void GetTextAreaOutline( const FWData& rFWData, const SdrObject* pCustomShape, F aVirDev.SetFont( aFont ); } FWCharacterData aCharacterData; - if ( aVirDev.GetTextOutlines( aCharacterData.vOutlines, rText, 0, 0, -1, sal_True, nWidth, pDXArry ) ) + if ( aVirDev.GetTextOutlines( aCharacterData.vOutlines, rText, 0, 0, -1, true, nWidth, pDXArry ) ) { aParagraphIter->vCharacters.push_back( aCharacterData ); } diff --git a/svx/source/dialog/_bmpmask.cxx b/svx/source/dialog/_bmpmask.cxx index 4f91aaa17027..80d2bfe80460 100644 --- a/svx/source/dialog/_bmpmask.cxx +++ b/svx/source/dialog/_bmpmask.cxx @@ -239,7 +239,7 @@ IMPL_LINK( MaskData, CbxHdl, CheckBox*, pCbx ) pSet->SelectItem( 1 ); pSet->Select(); - pMask->aTbxPipette.CheckItem( TBI_PIPETTE, sal_True ); + pMask->aTbxPipette.CheckItem( TBI_PIPETTE, true ); PipetteHdl( &( pMask->aTbxPipette ) ); } @@ -567,7 +567,7 @@ void SvxBmpMask::onSelect( MaskSet* pSet ) //------------------------------------------------------------------------- -sal_Bool SvxBmpMask::Close() +bool SvxBmpMask::Close() { SfxBoolItem aItem2( SID_BMPMASK_PIPETTE, false ); GetBindings().GetDispatcher()->Execute( SID_BMPMASK_PIPETTE, OWN_CALLMODE, &aItem2, 0L ); @@ -627,30 +627,30 @@ void SvxBmpMask::PipetteClicked() { if( pQSet1->GetSelectItemId() == 1 ) { - aCbx1.Check( sal_True ); + aCbx1.Check( true ); pData->CbxHdl( &aCbx1 ); pQSet1->SetItemColor( 1, aPipetteColor ); } else if( pQSet2->GetSelectItemId() == 1 ) { - aCbx2.Check( sal_True ); + aCbx2.Check( true ); pData->CbxHdl( &aCbx2 ); pQSet2->SetItemColor( 1, aPipetteColor ); } else if( pQSet3->GetSelectItemId() == 1 ) { - aCbx3.Check( sal_True ); + aCbx3.Check( true ); pData->CbxHdl( &aCbx3 ); pQSet3->SetItemColor( 1, aPipetteColor ); } else if( pQSet4->GetSelectItemId() == 1 ) { - aCbx4.Check( sal_True ); + aCbx4.Check( true ); pData->CbxHdl( &aCbx4 ); pQSet4->SetItemColor( 1, aPipetteColor ); } - aTbxPipette.CheckItem( TBI_PIPETTE, sal_False ); + aTbxPipette.CheckItem( TBI_PIPETTE, false ); pData->PipetteHdl( &aTbxPipette ); } @@ -1067,7 +1067,7 @@ GDIMetaFile SvxBmpMask::ImpReplaceTransparency( const GDIMetaFile& rMtf, const C const Size& rPrefSize = rMtf.GetPrefSize(); const size_t nActionCount = rMtf.GetActionSize(); - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); aMtf.Record( &aVDev ); aMtf.SetPrefSize( rPrefSize ); aMtf.SetPrefMapMode( rPrefMap ); diff --git a/svx/source/dialog/_contdlg.cxx b/svx/source/dialog/_contdlg.cxx index 49bd85526c85..c5c23530a6b4 100644 --- a/svx/source/dialog/_contdlg.cxx +++ b/svx/source/dialog/_contdlg.cxx @@ -298,7 +298,7 @@ void SvxSuperContourDlg::Resize() // Close methods -sal_Bool SvxSuperContourDlg::Close() +bool SvxSuperContourDlg::Close() { sal_Bool bRet = sal_True; @@ -444,7 +444,7 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) if ( !aContourWnd.IsContourChanged() || ( aQBox.Execute() == RET_YES ) ) aContourWnd.SetWorkplaceMode( sal_True ); else - aTbx1.CheckItem( TBI_WORKPLACE, sal_False ); + aTbx1.CheckItem( TBI_WORKPLACE, false ); } else aContourWnd.SetWorkplaceMode( sal_False ); @@ -453,21 +453,21 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) case( TBI_SELECT ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); aContourWnd.SetEditMode( sal_True ); } break; case( TBI_RECT ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); aContourWnd.SetObjKind( OBJ_RECT ); } break; case( TBI_CIRCLE ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); aContourWnd.SetObjKind( OBJ_CIRC ); } @@ -475,14 +475,14 @@ IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx ) case( TBI_POLY ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); aContourWnd.SetObjKind( OBJ_POLY ); } break; case( TBI_FREEPOLY ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); aContourWnd.SetObjKind( OBJ_FREEFILL ); } break; @@ -675,13 +675,13 @@ IMPL_LINK( SvxSuperContourDlg, StateHdl, ContourWindow*, pWnd ) break; } - aTbx1.CheckItem( nId, sal_True ); + aTbx1.CheckItem( nId, true ); } else { - aTbx1.CheckItem( TBI_POLYEDIT, sal_False ); - aTbx1.CheckItem( TBI_POLYMOVE, sal_True ); - aTbx1.CheckItem( TBI_POLYINSERT, sal_False ); + aTbx1.CheckItem( TBI_POLYEDIT, false ); + aTbx1.CheckItem( TBI_POLYMOVE, true ); + aTbx1.CheckItem( TBI_POLYINSERT, false ); pWnd->SetPolyEditMode( 0 ); } @@ -752,7 +752,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd ) LeaveWait(); } - aTbx1.CheckItem( TBI_PIPETTE, sal_False ); + aTbx1.CheckItem( TBI_PIPETTE, false ); pWnd->SetPipetteMode( sal_False ); aStbStatus.Invalidate(); @@ -761,8 +761,8 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow*, pWnd ) IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow*, pWnd ) { - aTbx1.CheckItem( TBI_WORKPLACE, sal_False ); - aTbx1.CheckItem( TBI_SELECT, sal_True ); + aTbx1.CheckItem( TBI_WORKPLACE, false ); + aTbx1.CheckItem( TBI_SELECT, true ); pWnd->SetWorkplaceMode( sal_False ); return 0L; diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx index 0339bee020be..51b270f35dd5 100644 --- a/svx/source/dialog/charmap.cxx +++ b/svx/source/dialog/charmap.cxx @@ -81,7 +81,7 @@ void SvxShowCharSet::init() SetStyle( GetStyle() | WB_CLIPCHILDREN ); aVscrollSB.SetScrollHdl( LINK( this, SvxShowCharSet, VscrollHdl ) ); - aVscrollSB.EnableDrag( sal_True ); + aVscrollSB.EnableDrag( true ); // other settings like aVscroll depend on selected font => see SetFont bDrag = sal_False; @@ -532,7 +532,7 @@ void SvxShowCharSet::SetFont( const Font& rFont ) aFont.SetAlign( ALIGN_TOP ); int nFontHeight = (aSize.Height() - 5) * 2 / (3 * ROW_COUNT); aFont.SetSize( PixelToLogic( Size( 0, nFontHeight ) ) ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); Control::SetFont( aFont ); GetFontCharMap( maFontCharMap ); diff --git a/svx/source/dialog/contimp.hxx b/svx/source/dialog/contimp.hxx index c66a5ed7d7cf..6f756cff9dac 100644 --- a/svx/source/dialog/contimp.hxx +++ b/svx/source/dialog/contimp.hxx @@ -52,7 +52,7 @@ class SvxSuperContourDlg : public SvxContourDlg ImageList maImageList; virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); DECL_LINK( Tbx1ClickHdl, ToolBox* ); DECL_LINK( MousePosHdl, ContourWindow* ); diff --git a/svx/source/dialog/ctredlin.cxx b/svx/source/dialog/ctredlin.cxx index 0ce12531dd7e..0057afc771e3 100644 --- a/svx/source/dialog/ctredlin.cxx +++ b/svx/source/dialog/ctredlin.cxx @@ -580,8 +580,8 @@ SvxTPFilter::SvxTPFilter( Window * pParent) m_pLbAuthor->SetAccessibleName(m_pCbAuthor->GetText()); m_pEdComment->SetAccessibleName(m_pCbComment->GetText()); - m_pDfDate->SetShowDateCentury( sal_True ); - m_pDfDate2->SetShowDateCentury( sal_True ); + m_pDfDate->SetShowDateCentury( true ); + m_pDfDate2->SetShowDateCentury( true ); m_pLbDate->SelectEntryPos(0); m_pLbDate->SetSelectHdl( LINK( this, SvxTPFilter, SelDateHdl ) ); diff --git a/svx/source/dialog/dialcontrol.cxx b/svx/source/dialog/dialcontrol.cxx index 2680fa396fb8..fa2ed6eb18f1 100644 --- a/svx/source/dialog/dialcontrol.cxx +++ b/svx/source/dialog/dialcontrol.cxx @@ -45,7 +45,7 @@ DialControlBmp::DialControlBmp( Window& rParent ) : mnCenterX(0), mnCenterY(0) { - EnableRTL( sal_False ); + EnableRTL( false ); } void DialControlBmp::InitBitmap(const Font& rFont) @@ -170,7 +170,7 @@ void DialControlBmp::DrawBackground() SetFillColor(); Erase(); - EnableRTL( sal_True ); // draw 3D effect in correct direction + EnableRTL( true ); // draw 3D effect in correct direction sal_uInt8 nDiff = mbEnabled ? 0x18 : 0x10; Color aColor; @@ -197,7 +197,7 @@ void DialControlBmp::DrawBackground() SetFillColor( aColor ); DrawPie( maRect, maRect.TopLeft(), maRect.LeftCenter() ); - EnableRTL( sal_False ); + EnableRTL( false ); // *** calibration *** @@ -432,7 +432,7 @@ void DialControl::SetModifyHdl( const Link& rLink ) void DialControl::Init( const Size& rWinSize, const Font& rWinFont ) { mpImpl->Init( rWinSize, rWinFont ); - EnableRTL( sal_False ); // don't mirror mouse handling + EnableRTL( false ); // don't mirror mouse handling SetOutputSizePixel( mpImpl->maWinSize ); SetBackground(); } diff --git a/svx/source/dialog/dlgctl3d.cxx b/svx/source/dialog/dlgctl3d.cxx index 61563c735e8e..376897ba74a7 100644 --- a/svx/source/dialog/dlgctl3d.cxx +++ b/svx/source/dialog/dlgctl3d.cxx @@ -83,7 +83,7 @@ void Svx3DPreviewControl::Construct() { // Do never mirror the preview window. This explicitly includes right // to left writing environments. - EnableRTL (sal_False); + EnableRTL (false); SetMapMode( MAP_100TH_MM ); // Model diff --git a/svx/source/dialog/dlgctrl.cxx b/svx/source/dialog/dlgctrl.cxx index 430642f1141d..b0614b70d67d 100644 --- a/svx/source/dialog/dlgctrl.cxx +++ b/svx/source/dialog/dlgctrl.cxx @@ -1159,7 +1159,7 @@ void ColorLB::Fill( const XColorListRef &pColorTab ) long nCount = pColorTab->Count(); XColorEntry* pEntry; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1168,7 +1168,7 @@ void ColorLB::Fill( const XColorListRef &pColorTab ) } AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /************************************************************************/ @@ -1193,7 +1193,7 @@ void FillAttrLB::Fill( const XColorListRef &pColorTab ) { long nCount = pColorTab->Count(); XColorEntry* pEntry; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1202,7 +1202,7 @@ void FillAttrLB::Fill( const XColorListRef &pColorTab ) } AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } // Fills the listbox (provisional) with strings @@ -1234,7 +1234,7 @@ void HatchingLB::Fill( const XHatchListRef &pList ) XHatchEntry* pEntry; long nCount = pList->Count(); - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1247,7 +1247,7 @@ void HatchingLB::Fill( const XHatchListRef &pList ) } AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /************************************************************************/ @@ -1288,7 +1288,7 @@ void FillAttrLB::Fill( const XHatchListRef &pList ) { long nCount = pList->Count(); XHatchEntry* pEntry; - ListBox::SetUpdateMode( sal_False ); + ListBox::SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1301,7 +1301,7 @@ void FillAttrLB::Fill( const XHatchListRef &pList ) } AdaptDropDownLineCountToMaximum(); - ListBox::SetUpdateMode( sal_True ); + ListBox::SetUpdateMode( true ); } // Fills the listbox (provisional) with strings @@ -1333,7 +1333,7 @@ void GradientLB::Fill( const XGradientListRef &pList ) XGradientEntry* pEntry; long nCount = pList->Count(); - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1346,7 +1346,7 @@ void GradientLB::Fill( const XGradientListRef &pList ) } AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /************************************************************************/ @@ -1411,7 +1411,7 @@ void FillAttrLB::Fill( const XGradientListRef &pList ) { long nCount = pList->Count(); XGradientEntry* pEntry; - ListBox::SetUpdateMode( sal_False ); + ListBox::SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1424,7 +1424,7 @@ void FillAttrLB::Fill( const XGradientListRef &pList ) } AdaptDropDownLineCountToMaximum(); - ListBox::SetUpdateMode( sal_True ); + ListBox::SetUpdateMode( true ); } // BitmapLB Constructor @@ -1598,7 +1598,7 @@ void FillAttrLB::Fill( const XBitmapListRef &pList ) void FillTypeLB::Fill() { - SetUpdateMode( sal_False ); + SetUpdateMode( false ); InsertEntry( SVX_RESSTR(RID_SVXSTR_INVISIBLE) ); InsertEntry( SVX_RESSTR(RID_SVXSTR_COLOR) ); @@ -1607,7 +1607,7 @@ void FillTypeLB::Fill() InsertEntry( SVX_RESSTR(RID_SVXSTR_BITMAP) ); AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } LineLB::LineLB(Window* pParent, WinBits aWB) @@ -1666,7 +1666,7 @@ void LineLB::Fill( const XDashListRef &pList ) long nCount = pList->Count(); XDashEntry* pEntry; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1681,7 +1681,7 @@ void LineLB::Fill( const XDashListRef &pList ) } AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /************************************************************************/ @@ -1750,7 +1750,7 @@ void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart ) long nCount = pList->Count(); XLineEndEntry* pEntry; VirtualDevice aVD; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); for( long i = 0; i < nCount; i++ ) { @@ -1759,7 +1759,7 @@ void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart ) if( !aBitmap.IsEmpty() ) { Size aBmpSize( aBitmap.GetSizePixel() ); - aVD.SetOutputSizePixel( aBmpSize, sal_False ); + aVD.SetOutputSizePixel( aBmpSize, false ); aVD.DrawBitmap( Point(), aBitmap ); InsertEntry( pEntry->GetName(), Image(aVD.GetBitmap( @@ -1772,7 +1772,7 @@ void LineEndLB::Fill( const XLineEndListRef &pList, bool bStart ) } AdaptDropDownLineCountToMaximum(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /************************************************************************/ diff --git a/svx/source/dialog/fntctrl.cxx b/svx/source/dialog/fntctrl.cxx index d5865b4fb4b6..6ce388eeefe3 100644 --- a/svx/source/dialog/fntctrl.cxx +++ b/svx/source/dialog/fntctrl.cxx @@ -93,7 +93,7 @@ namespace // ----------------------------------------------------------------------- void initFont(Font& _rFont) { - _rFont.SetTransparent(sal_True); + _rFont.SetTransparent(true); _rFont.SetAlign(ALIGN_BASELINE); } // ----------------------------------------------------------------------- @@ -119,7 +119,7 @@ namespace void setFont( const SvxFont& rNewFont, SvxFont& rImplFont ) { rImplFont = rNewFont; - rImplFont.SetTransparent( sal_True ); + rImplFont.SetTransparent( true ); rImplFont.SetAlign( ALIGN_BASELINE ); } diff --git a/svx/source/dialog/fontlb.cxx b/svx/source/dialog/fontlb.cxx index 9133ef12f30b..7e75eea7d48f 100644 --- a/svx/source/dialog/fontlb.cxx +++ b/svx/source/dialog/fontlb.cxx @@ -94,7 +94,7 @@ SvxFontListBox::SvxFontListBox(Window* pParent, WinBits nStyle) , maStdFont(GetFont()) , mbUseFont(false) { - maStdFont.SetTransparent(sal_True); + maStdFont.SetTransparent(true); maEntryFont = maStdFont; } diff --git a/svx/source/dialog/fontwork.cxx b/svx/source/dialog/fontwork.cxx index 769176ea2408..5620c82a470b 100644 --- a/svx/source/dialog/fontwork.cxx +++ b/svx/source/dialog/fontwork.cxx @@ -341,16 +341,16 @@ void SvxFontWorkDialog::SetStyle_Impl(const XFormTextStyleItem* pItem) // Make sure that there is always exactly one checked toolbox item. if ( pItem->GetValue() == XFT_NONE ) { - aTbxStyle.CheckItem(TBI_STYLE_ROTATE, sal_False); - aTbxStyle.CheckItem(TBI_STYLE_UPRIGHT, sal_False); - aTbxStyle.CheckItem(TBI_STYLE_SLANTX, sal_False); - aTbxStyle.CheckItem(TBI_STYLE_SLANTY, sal_False); + aTbxStyle.CheckItem(TBI_STYLE_ROTATE, false); + aTbxStyle.CheckItem(TBI_STYLE_UPRIGHT, false); + aTbxStyle.CheckItem(TBI_STYLE_SLANTX, false); + aTbxStyle.CheckItem(TBI_STYLE_SLANTY, false); - aTbxStyle.CheckItem(TBI_STYLE_OFF, sal_True); + aTbxStyle.CheckItem(TBI_STYLE_OFF, true); } else { - aTbxStyle.CheckItem(TBI_STYLE_OFF, sal_False); + aTbxStyle.CheckItem(TBI_STYLE_OFF, false); aTbxStyle.CheckItem(nId); } diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx index e4c59655743a..d4c61d63715a 100644 --- a/svx/source/dialog/graphctl.cxx +++ b/svx/source/dialog/graphctl.cxx @@ -72,7 +72,7 @@ GraphCtrl::GraphCtrl( Window* pParent, const ResId& rResId ) : aUpdateTimer.SetTimeout( 500 ); aUpdateTimer.SetTimeoutHdl( LINK( this, GraphCtrl, UpdateHdl ) ); aUpdateTimer.Start(); - EnableRTL( sal_False ); + EnableRTL( false ); } GraphCtrl::GraphCtrl( Window* pParent, WinBits nStyle ) : @@ -92,7 +92,7 @@ GraphCtrl::GraphCtrl( Window* pParent, WinBits nStyle ) : aUpdateTimer.SetTimeout( 500 ); aUpdateTimer.SetTimeoutHdl( LINK( this, GraphCtrl, UpdateHdl ) ); aUpdateTimer.Start(); - EnableRTL( sal_False ); + EnableRTL( false ); } extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeGraphCtrl(Window *pParent, VclBuilder::stringmap &rMap) diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index e6a2b5306347..9b2032248e64 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -192,7 +192,7 @@ SvxHFPage::SvxHFPage( Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId m_pPageLbl->Show(); InitHandler(); - m_pBspWin->EnableRTL( sal_False ); + m_pBspWin->EnableRTL( false ); // This Page needs ExchangeSupport SetExchangeSupport(); @@ -404,10 +404,10 @@ void SvxHFPage::Reset( const SfxItemSet& rSet ) if ( !pSetItem ) { - m_pTurnOnBox->Check( sal_False ); - m_pHeightDynBtn->Check( sal_True ); - m_pCntSharedBox->Check( sal_True ); - m_pCntSharedFirstBox->Check( sal_True ); + m_pTurnOnBox->Check( false ); + m_pHeightDynBtn->Check( true ); + m_pCntSharedBox->Check( true ); + m_pCntSharedFirstBox->Check( true ); } TurnOnHdl(0); diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx index c1ab88dc392f..1f78f78116df 100644 --- a/svx/source/dialog/imapdlg.cxx +++ b/svx/source/dialog/imapdlg.cxx @@ -159,7 +159,7 @@ SvxIMapDlg::SvxIMapDlg( SfxBindings *_pBindings, SfxChildWindow *pCW, aTbxIMapDlg1.SetOutStyle( aMiscOptions.GetToolboxStyle() ); aTbxIMapDlg1.SetSizePixel( aTbxIMapDlg1.CalcWindowSizePixel() ); aTbxIMapDlg1.SetSelectHdl( LINK( this, SvxIMapDlg, TbxClickHdl ) ); - aTbxIMapDlg1.CheckItem( TBI_SELECT, sal_True ); + aTbxIMapDlg1.CheckItem( TBI_SELECT, true ); TbxClickHdl( &aTbxIMapDlg1 ); SetMinOutputSizePixel( aLastSize = GetOutputSizePixel() ); @@ -218,7 +218,7 @@ void SvxIMapDlg::Resize() } } -sal_Bool SvxIMapDlg::Close() +bool SvxIMapDlg::Close() { sal_Bool bRet = sal_True; @@ -347,7 +347,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_SELECT ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); pIMapWnd->SetEditMode( sal_True ); if( pTbx->IsKeyEvent() ) { @@ -361,7 +361,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_RECT ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); pIMapWnd->SetObjKind( OBJ_RECT ); if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) ) { @@ -373,7 +373,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_CIRCLE ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); pIMapWnd->SetObjKind( OBJ_CIRC ); if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) ) { @@ -385,7 +385,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_POLY ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); pIMapWnd->SetObjKind( OBJ_POLY ); if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) ) { @@ -397,7 +397,7 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx ) case( TBI_FREEPOLY ): { - pTbx->CheckItem( nNewItemId, sal_True ); + pTbx->CheckItem( nNewItemId, true ); pIMapWnd->SetObjKind( OBJ_FREEFILL ); if( pTbx->IsKeyEvent() && ((pTbx->GetKeyModifier() & KEY_MOD1) != 0) ) { @@ -599,7 +599,7 @@ IMPL_LINK( SvxIMapDlg, InfoHdl, IMapWindow*, pWnd ) if ( !rInfo.bOneMarked ) { - aTbxIMapDlg1.CheckItem( TBI_ACTIVE, sal_False ); + aTbxIMapDlg1.CheckItem( TBI_ACTIVE, false ); aTbxIMapDlg1.EnableItem( TBI_ACTIVE, false ); aTbxIMapDlg1.EnableItem( TBI_MACRO, false ); aTbxIMapDlg1.EnableItem( TBI_PROPERTY, false ); @@ -736,7 +736,7 @@ IMPL_LINK_NOARG(SvxIMapDlg, UpdateHdl) SetEditingObject( pOwnData->pUpdateEditingObject ); // After changes => default selection - aTbxIMapDlg1.CheckItem( TBI_SELECT, sal_True ); + aTbxIMapDlg1.CheckItem( TBI_SELECT, true ); pIMapWnd->SetEditMode( sal_True ); } @@ -787,13 +787,13 @@ IMPL_LINK( SvxIMapDlg, StateHdl, IMapWindow*, pWnd ) break; } - aTbxIMapDlg1.CheckItem( nId, sal_True ); + aTbxIMapDlg1.CheckItem( nId, true ); } else { - aTbxIMapDlg1.CheckItem( TBI_POLYEDIT, sal_False ); - aTbxIMapDlg1.CheckItem( TBI_POLYMOVE, sal_True ); - aTbxIMapDlg1.CheckItem( TBI_POLYINSERT, sal_False ); + aTbxIMapDlg1.CheckItem( TBI_POLYEDIT, false ); + aTbxIMapDlg1.CheckItem( TBI_POLYMOVE, true ); + aTbxIMapDlg1.CheckItem( TBI_POLYINSERT, false ); pWnd->SetPolyEditMode( 0 ); } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index bf6b89a1e777..bd7e209c46f4 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -465,19 +465,19 @@ void IMapWindow::Command(const CommandEvent& rCEvt) const SdrMarkList& rMarkList = pView->GetMarkedObjectList(); sal_uIntPtr nMarked = rMarkList.GetMarkCount(); - aMenu.EnableItem( MN_URL, sal_False ); - aMenu.EnableItem( MN_ACTIVATE, sal_False ); - aMenu.EnableItem( MN_MACRO, sal_False ); + aMenu.EnableItem( MN_URL, false ); + aMenu.EnableItem( MN_ACTIVATE, false ); + aMenu.EnableItem( MN_MACRO, false ); aMenu.EnableItem( MN_MARK_ALL, pModel->GetPage( 0 )->GetObjCount() != pView->GetMarkedObjectCount() ); if ( !nMarked ) { - aMenu.EnableItem( MN_POSITION, sal_False ); - aMenu.EnableItem( MN_FRAME_TO_TOP, sal_False ); - aMenu.EnableItem( MN_MOREFRONT, sal_False ); - aMenu.EnableItem( MN_MOREBACK, sal_False ); - aMenu.EnableItem( MN_FRAME_TO_BOTTOM, sal_False ); - aMenu.EnableItem( MN_DELETE1, sal_False ); + aMenu.EnableItem( MN_POSITION, false ); + aMenu.EnableItem( MN_FRAME_TO_TOP, false ); + aMenu.EnableItem( MN_MOREFRONT, false ); + aMenu.EnableItem( MN_MOREBACK, false ); + aMenu.EnableItem( MN_FRAME_TO_BOTTOM, false ); + aMenu.EnableItem( MN_DELETE1, false ); } else { @@ -485,18 +485,18 @@ void IMapWindow::Command(const CommandEvent& rCEvt) { SdrObject* pSdrObj = GetSelectedSdrObject(); - aMenu.EnableItem( MN_URL, sal_True ); - aMenu.EnableItem( MN_ACTIVATE, sal_True ); - aMenu.EnableItem( MN_MACRO, sal_True ); + aMenu.EnableItem( MN_URL, true ); + aMenu.EnableItem( MN_ACTIVATE, true ); + aMenu.EnableItem( MN_MACRO, true ); aMenu.CheckItem( MN_ACTIVATE, GetIMapObj( pSdrObj )->IsActive() ); } - aMenu.EnableItem( MN_POSITION, sal_True ); - aMenu.EnableItem( MN_FRAME_TO_TOP, sal_True ); - aMenu.EnableItem( MN_MOREFRONT, sal_True ); - aMenu.EnableItem( MN_MOREBACK, sal_True ); - aMenu.EnableItem( MN_FRAME_TO_BOTTOM, sal_True ); - aMenu.EnableItem( MN_DELETE1, sal_True ); + aMenu.EnableItem( MN_POSITION, true ); + aMenu.EnableItem( MN_FRAME_TO_TOP, true ); + aMenu.EnableItem( MN_MOREFRONT, true ); + aMenu.EnableItem( MN_MOREBACK, true ); + aMenu.EnableItem( MN_FRAME_TO_BOTTOM, true ); + aMenu.EnableItem( MN_DELETE1, true ); } aMenu.SetSelectHdl( LINK( this, IMapWindow, MenuSelectHdl ) ); diff --git a/svx/source/dialog/rubydialog.cxx b/svx/source/dialog/rubydialog.cxx index 7054c898548e..2bcd6b9d9c2c 100644 --- a/svx/source/dialog/rubydialog.cxx +++ b/svx/source/dialog/rubydialog.cxx @@ -279,12 +279,12 @@ void SvxRubyDialog::ClearCharStyleList() m_pCharStyleLB->Clear(); } -sal_Bool SvxRubyDialog::Close() +bool SvxRubyDialog::Close() { pBindings->GetDispatcher()->Execute( SID_RUBY_DIALOG, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); - return sal_True; + return true; } void SvxRubyDialog::Activate() diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index 840d0b984488..43465e18ffc5 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -415,7 +415,7 @@ void SvxSearchDialog::Construct_Impl() SvtCJKOptions aCJKOptions; if(!aCJKOptions.IsJapaneseFindEnabled()) { - m_pJapOptionsCB->Check( sal_False ); + m_pJapOptionsCB->Check( false ); m_pJapOptionsCB->Hide(); m_pJapOptionsBtn->Hide(); } @@ -426,7 +426,7 @@ void SvxSearchDialog::Construct_Impl() SvtCTLOptions aCTLOptions; if(!aCTLOptions.IsCTLFontEnabled()) { - m_pIgnoreDiacritics->Check( sal_False ); + m_pIgnoreDiacritics->Check( false ); m_pIgnoreDiacritics->Hide(); } //component extension - show component search buttons if the commands @@ -494,7 +494,7 @@ void SvxSearchDialog::Construct_Impl() // ----------------------------------------------------------------------- -sal_Bool SvxSearchDialog::Close() +bool SvxSearchDialog::Close() { // remember strings speichern if (!aSearchStrings.empty()) @@ -518,7 +518,7 @@ sal_Bool SvxSearchDialog::Close() rBindings.GetDispatcher()->Execute( FID_SEARCH_OFF, SFX_CALLMODE_SLOT, ppArgs ); rBindings.Execute( SID_SEARCH_DLG ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -570,9 +570,9 @@ void SvxSearchDialog::Activate() void SvxSearchDialog::InitControls_Impl() { // CaseSensitives AutoComplete - m_pSearchLB->EnableAutocomplete( sal_True, sal_True ); + m_pSearchLB->EnableAutocomplete( true, true ); m_pSearchLB->Show(); - m_pReplaceLB->EnableAutocomplete( sal_True, sal_True ); + m_pReplaceLB->EnableAutocomplete( true, true ); m_pReplaceLB->Show(); m_pFormatBtn->Disable(); @@ -855,7 +855,7 @@ void SvxSearchDialog::Init_Impl( bool bSearchPattern ) EnableControl_Impl(m_pSelectionBtn); else { - m_pSelectionBtn->Check( sal_False ); + m_pSelectionBtn->Check( false ); m_pSelectionBtn->Disable(); } } @@ -1066,14 +1066,14 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) if ( bIsChecked ) { m_pSimilarityBtn->Enable(); - m_pRegExpBtn->Check( sal_False ); + m_pRegExpBtn->Check( false ); m_pRegExpBtn->Disable(); EnableControl_Impl(m_pWordBtn); if ( m_pLayoutBtn->IsChecked() ) { EnableControl_Impl(m_pMatchCaseCB); - m_pLayoutBtn->Check( sal_False ); + m_pLayoutBtn->Check( false ); } m_pRegExpBtn->Disable(); m_pLayoutBtn->Disable(); @@ -1110,11 +1110,11 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) { if ( m_pLayoutBtn->IsChecked() && !bFormat ) { - m_pWordBtn->Check( sal_False ); + m_pWordBtn->Check( false ); m_pWordBtn->Disable(); - m_pRegExpBtn->Check( sal_False ); + m_pRegExpBtn->Check( false ); m_pRegExpBtn->Disable(); - m_pMatchCaseCB->Check( sal_False ); + m_pMatchCaseCB->Check( false ); m_pMatchCaseCB->Disable(); m_pNotesBtn->Disable(); @@ -1134,7 +1134,7 @@ IMPL_LINK( SvxSearchDialog, FlagHdl_Impl, Control *, pCtrl ) if ( m_pRegExpBtn->IsChecked() ) { - m_pWordBtn->Check( sal_False ); + m_pWordBtn->Check( false ); m_pWordBtn->Disable(); m_pSimilarityBox->Disable(); m_pSimilarityBtn->Disable(); @@ -1503,8 +1503,8 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) m_pSearchTmplLB->Clear(); m_pReplaceTmplLB->Clear(); rPool.SetSearchMask( pSearchItem->GetFamily(), SFXSTYLEBIT_ALL ); - m_pSearchTmplLB->SetUpdateMode( sal_False ); - m_pReplaceTmplLB->SetUpdateMode( sal_False ); + m_pSearchTmplLB->SetUpdateMode( false ); + m_pReplaceTmplLB->SetUpdateMode( false ); SfxStyleSheetBase* pBase = rPool.First(); while ( pBase ) @@ -1514,8 +1514,8 @@ void SvxSearchDialog::TemplatesChanged_Impl( SfxStyleSheetBasePool& rPool ) m_pReplaceTmplLB->InsertEntry( pBase->GetName() ); pBase = rPool.Next(); } - m_pSearchTmplLB->SetUpdateMode( sal_True ); - m_pReplaceTmplLB->SetUpdateMode( sal_True ); + m_pSearchTmplLB->SetUpdateMode( true ); + m_pReplaceTmplLB->SetUpdateMode( true ); m_pSearchTmplLB->SelectEntryPos(0); if ( !aOldSrch.isEmpty() ) @@ -1940,7 +1940,7 @@ IMPL_LINK_NOARG(SvxSearchDialog, NoFormatHdl_Impl) } bFormat = sal_False; - m_pLayoutBtn->Check( sal_False ); + m_pLayoutBtn->Check( false ); if ( bSearch ) { @@ -1990,7 +1990,7 @@ IMPL_LINK( SvxSearchDialog, TimeoutHdl_Impl, Timer *, pTimer ) EnableControl_Impl(m_pSelectionBtn); else { - m_pSelectionBtn->Check( sal_False ); + m_pSelectionBtn->Check( false ); m_pSelectionBtn->Disable(); } } diff --git a/svx/source/dialog/svxbmpnumvalueset.cxx b/svx/source/dialog/svxbmpnumvalueset.cxx index dc42baaf5ab1..00e9c7e96379 100644 --- a/svx/source/dialog/svxbmpnumvalueset.cxx +++ b/svx/source/dialog/svxbmpnumvalueset.cxx @@ -100,7 +100,7 @@ static Font& lcl_GetDefaultBulletFont() aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( sal_True ); + aDefBulletFont.SetTransparent( true ); bInit = sal_True; } return aDefBulletFont; diff --git a/svx/source/engine3d/float3d.cxx b/svx/source/engine3d/float3d.cxx index f130fa823206..57cadf6c009f 100644 --- a/svx/source/engine3d/float3d.cxx +++ b/svx/source/engine3d/float3d.cxx @@ -712,7 +712,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_DOUBLE_SIDED); if( eState != SFX_ITEM_DONTCARE ) { - sal_Bool bValue = ((const Svx3DDoubleSidedItem&)rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); + bool bValue = ((const Svx3DDoubleSidedItem&)rAttrs.Get(SDRATTR_3DOBJ_DOUBLE_SIDED)).GetValue(); if( bValue != aBtnDoubleSided.IsChecked() ) { aBtnDoubleSided.Check( bValue ); @@ -825,9 +825,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) aBtnNormalsFlat.IsChecked() || aBtnNormalsSphere.IsChecked() ) { - aBtnNormalsObj.Check( sal_False ); - aBtnNormalsFlat.Check( sal_False ); - aBtnNormalsSphere.Check( sal_False ); + aBtnNormalsObj.Check( false ); + aBtnNormalsFlat.Check( false ); + aBtnNormalsSphere.Check( false ); bUpdate = sal_True; } } @@ -836,7 +836,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_NORMALS_INVERT); if( eState != SFX_ITEM_DONTCARE ) { - sal_Bool bValue = ((const Svx3DNormalsInvertItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); + bool bValue = ((const Svx3DNormalsInvertItem&)rAttrs.Get(SDRATTR_3DOBJ_NORMALS_INVERT)).GetValue(); if( bValue != aBtnNormalsInvert.IsChecked() ) { aBtnNormalsInvert.Check( bValue ); @@ -858,7 +858,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING); if( eState != SFX_ITEM_DONTCARE ) { - sal_Bool bValue = ((const Svx3DTwoSidedLightingItem&)rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); + bool bValue = ((const Svx3DTwoSidedLightingItem&)rAttrs.Get(SDRATTR_3DSCENE_TWO_SIDED_LIGHTING)).GetValue(); if( bValue != aBtnTwoSidedLighting.IsChecked() ) { aBtnTwoSidedLighting.Check( bValue ); @@ -901,7 +901,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_SHADOW_3D); if( eState != SFX_ITEM_DONTCARE ) { - sal_Bool bValue = ((const Svx3DShadow3DItem&)rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); + bool bValue = ((const Svx3DShadow3DItem&)rAttrs.Get(SDRATTR_3DOBJ_SHADOW_3D)).GetValue(); if( bValue != aBtnShadow3d.IsChecked() ) { aBtnShadow3d.Check( bValue ); @@ -1428,8 +1428,8 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aBtnTexLuminance.IsChecked() || aBtnTexColor.IsChecked() ) { - aBtnTexLuminance.Check( sal_False ); - aBtnTexColor.Check( sal_False ); + aBtnTexLuminance.Check( false ); + aBtnTexColor.Check( false ); bUpdate = sal_True; } } @@ -1453,8 +1453,8 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) if( aBtnTexReplace.IsChecked() || aBtnTexModulate.IsChecked() ) { - aBtnTexReplace.Check( sal_False ); - aBtnTexModulate.Check( sal_False ); + aBtnTexReplace.Check( false ); + aBtnTexModulate.Check( false ); bUpdate = sal_True; } } @@ -1481,9 +1481,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) aBtnTexParallelX.IsChecked() || aBtnTexCircleX.IsChecked() ) { - aBtnTexObjectX.Check( sal_False ); - aBtnTexParallelX.Check( sal_False ); - aBtnTexCircleX.Check( sal_False ); + aBtnTexObjectX.Check( false ); + aBtnTexParallelX.Check( false ); + aBtnTexCircleX.Check( false ); bUpdate = sal_True; } } @@ -1510,9 +1510,9 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) aBtnTexParallelY.IsChecked() || aBtnTexCircleY.IsChecked() ) { - aBtnTexObjectY.Check( sal_False ); - aBtnTexParallelY.Check( sal_False ); - aBtnTexCircleY.Check( sal_False ); + aBtnTexObjectY.Check( false ); + aBtnTexParallelY.Check( false ); + aBtnTexCircleY.Check( false ); bUpdate = sal_True; } } @@ -1521,7 +1521,7 @@ void Svx3DWin::Update( SfxItemSet& rAttrs ) eState = rAttrs.GetItemState(SDRATTR_3DOBJ_TEXTURE_FILTER); if( eState != SFX_ITEM_DONTCARE ) { - sal_Bool bValue = ((const Svx3DTextureFilterItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); + bool bValue = ((const Svx3DTextureFilterItem&)rAttrs.Get(SDRATTR_3DOBJ_TEXTURE_FILTER)).GetValue(); if( bValue != aBtnTexFilter.IsChecked() ) { aBtnTexFilter.Check( bValue ); @@ -2662,42 +2662,42 @@ IMPL_LINK( Svx3DWin, ClickHdl, PushButton *, pBtn ) if( pBtn != &aBtnLight1 && aBtnLight1.IsChecked() ) { - aBtnLight1.Check( sal_False ); + aBtnLight1.Check( false ); aLbLight1.Hide(); } if( pBtn != &aBtnLight2 && aBtnLight2.IsChecked() ) { - aBtnLight2.Check( sal_False ); + aBtnLight2.Check( false ); aLbLight2.Hide(); } if( pBtn != &aBtnLight3 && aBtnLight3.IsChecked() ) { - aBtnLight3.Check( sal_False ); + aBtnLight3.Check( false ); aLbLight3.Hide(); } if( pBtn != &aBtnLight4 && aBtnLight4.IsChecked() ) { - aBtnLight4.Check( sal_False ); + aBtnLight4.Check( false ); aLbLight4.Hide(); } if( pBtn != &aBtnLight5 && aBtnLight5.IsChecked() ) { - aBtnLight5.Check( sal_False ); + aBtnLight5.Check( false ); aLbLight5.Hide(); } if( pBtn != &aBtnLight6 && aBtnLight6.IsChecked() ) { - aBtnLight6.Check( sal_False ); + aBtnLight6.Check( false ); aLbLight6.Hide(); } if( pBtn != &aBtnLight7 && aBtnLight7.IsChecked() ) { - aBtnLight7.Check( sal_False ); + aBtnLight7.Check( false ); aLbLight7.Hide(); } if( pBtn != &aBtnLight8 && aBtnLight8.IsChecked() ) { - aBtnLight8.Check( sal_False ); + aBtnLight8.Check( false ); aLbLight8.Hide(); } } @@ -2997,42 +2997,42 @@ IMPL_LINK_NOARG(Svx3DWin, ChangeSelectionCallbackHdl) // Status: No lamp selected if( aBtnLight1.IsChecked() ) { - aBtnLight1.Check( sal_False ); + aBtnLight1.Check( false ); aLbLight1.Enable( false ); } else if( aBtnLight2.IsChecked() ) { - aBtnLight2.Check( sal_False ); + aBtnLight2.Check( false ); aLbLight2.Enable( false ); } else if( aBtnLight3.IsChecked() ) { - aBtnLight3.Check( sal_False ); + aBtnLight3.Check( false ); aLbLight3.Enable( false ); } else if( aBtnLight4.IsChecked() ) { - aBtnLight4.Check( sal_False ); + aBtnLight4.Check( false ); aLbLight4.Enable( false ); } else if( aBtnLight5.IsChecked() ) { - aBtnLight5.Check( sal_False ); + aBtnLight5.Check( false ); aLbLight5.Enable( false ); } else if( aBtnLight6.IsChecked() ) { - aBtnLight6.Check( sal_False ); + aBtnLight6.Check( false ); aLbLight6.Enable( false ); } else if( aBtnLight7.IsChecked() ) { - aBtnLight7.Check( sal_False ); + aBtnLight7.Check( false ); aLbLight7.Enable( false ); } else if( aBtnLight8.IsChecked() ) { - aBtnLight8.Check( sal_False ); + aBtnLight8.Check( false ); aLbLight8.Enable( false ); } aBtnLightColor.Enable( false ); diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index ba7d7a236293..25f3511d58d8 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -974,7 +974,7 @@ void FmGridHeader::triggerColumnContextMenu( const ::Point& _rPreferredPos ) // let derivees modify the menu PreExecuteColumnContextMenu( nColId, aContextMenu ); - aContextMenu.RemoveDisabledEntries( sal_True, sal_True ); + aContextMenu.RemoveDisabledEntries( true, true ); // execute the menu sal_uInt16 nResult = aContextMenu.Execute( this, _rPreferredPos ); diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx index 009a83067afe..f0404f09d287 100644 --- a/svx/source/fmcomp/fmgridif.cxx +++ b/svx/source/fmcomp/fmgridif.cxx @@ -2090,7 +2090,7 @@ Reference< XAccessibleContext > FmXGridPeer::CreateAccessibleContext() Window* pGrid = GetWindow(); if ( pGrid ) { - Reference< XAccessible > xAcc( pGrid->GetAccessible( sal_True ) ); + Reference< XAccessible > xAcc( pGrid->GetAccessible( true ) ); if ( xAcc.is() ) xContext = xAcc->getAccessibleContext(); // TODO: this has a slight conceptual problem: diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 28d2509e608d..12448a00f118 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -972,7 +972,7 @@ void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) { if ( m_pPainter->GetParent() == &_rDev ) { - m_pPainter->SetPaintTransparent( sal_True ); + m_pPainter->SetPaintTransparent( true ); m_pPainter->SetBackground( ); m_pPainter->SetControlBackground( _rDev.GetFillColor() ); m_pPainter->SetControlForeground( _rDev.GetTextColor() ); @@ -980,15 +980,15 @@ void DbCellControl::PaintCell( OutputDevice& _rDev, const Rectangle& _rRect ) m_pPainter->SetTextFillColor( _rDev.GetTextColor() ); Font aFont( _rDev.GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); m_pPainter->SetFont( aFont ); m_pPainter->SetPosSizePixel( _rRect.TopLeft(), _rRect.GetSize() ); m_pPainter->Show(); m_pPainter->Update(); - m_pPainter->SetParentUpdateMode( sal_False ); + m_pPainter->SetParentUpdateMode( false ); m_pPainter->Hide(); - m_pPainter->SetParentUpdateMode( sal_True ); + m_pPainter->SetParentUpdateMode( true ); } else m_pPainter->Draw( &_rDev, _rRect.TopLeft(), _rRect.GetSize(), 0 ); @@ -1670,8 +1670,8 @@ void DbCheckBox::Init( Window& rParent, const Reference< XRowSet >& xCursor ) m_pWindow = new CheckBoxControl( &rParent ); m_pPainter = new CheckBoxControl( &rParent ); - m_pWindow->SetPaintTransparent( sal_True ); - m_pPainter->SetPaintTransparent( sal_True ); + m_pWindow->SetPaintTransparent( true ); + m_pPainter->SetPaintTransparent( true ); m_pPainter->SetBackground(); @@ -2267,13 +2267,13 @@ void DbDateField::implAdjustGenericFieldSetting( const Reference< XPropertySet > static_cast< DateField* >( m_pWindow )->SetMin( aMin ); static_cast< DateField* >( m_pWindow )->SetMax( aMax ); static_cast< DateField* >( m_pWindow )->SetStrictFormat( bStrict ); - static_cast< DateField* >( m_pWindow )->EnableEmptyFieldValue( sal_True ); + static_cast< DateField* >( m_pWindow )->EnableEmptyFieldValue( true ); static_cast< DateField* >( m_pPainter )->SetExtDateFormat( (ExtDateFieldFormat)nFormat ); static_cast< DateField* >( m_pPainter )->SetMin( aMin ); static_cast< DateField* >( m_pPainter )->SetMax( aMax ); static_cast< DateField* >( m_pPainter )->SetStrictFormat( bStrict ); - static_cast< DateField* >( m_pPainter )->EnableEmptyFieldValue( sal_True ); + static_cast< DateField* >( m_pPainter )->EnableEmptyFieldValue( true ); } } @@ -2379,13 +2379,13 @@ void DbTimeField::implAdjustGenericFieldSetting( const Reference< XPropertySet > static_cast< TimeField* >( m_pWindow )->SetMin( aMin ); static_cast< TimeField* >( m_pWindow )->SetMax( aMax ); static_cast< TimeField* >( m_pWindow )->SetStrictFormat( bStrict ); - static_cast< TimeField* >( m_pWindow )->EnableEmptyFieldValue( sal_True ); + static_cast< TimeField* >( m_pWindow )->EnableEmptyFieldValue( true ); static_cast< TimeField* >( m_pPainter )->SetExtFormat( (ExtTimeFieldFormat)nFormat ); static_cast< TimeField* >( m_pPainter )->SetMin( aMin ); static_cast< TimeField* >( m_pPainter )->SetMax( aMax ); static_cast< TimeField* >( m_pPainter )->SetStrictFormat( bStrict ); - static_cast< TimeField* >( m_pPainter )->EnableEmptyFieldValue( sal_True ); + static_cast< TimeField* >( m_pPainter )->EnableEmptyFieldValue( true ); } } @@ -2817,11 +2817,11 @@ void DbFilterField::CreateControl(Window* pParent, const Reference< ::com::sun:: { case ::com::sun::star::form::FormComponentType::CHECKBOX: m_pWindow = new CheckBoxControl(pParent); - m_pWindow->SetPaintTransparent( sal_True ); + m_pWindow->SetPaintTransparent( true ); ((CheckBoxControl*)m_pWindow)->SetClickHdl( LINK( this, DbFilterField, OnClick ) ); m_pPainter = new CheckBoxControl(pParent); - m_pPainter->SetPaintTransparent( sal_True ); + m_pPainter->SetPaintTransparent( true ); m_pPainter->SetBackground(); break; case ::com::sun::star::form::FormComponentType::LISTBOX: @@ -3041,7 +3041,7 @@ void DbFilterField::SetText(const OUString& rText) { Sequence<sal_Int16> aPosSeq = ::comphelper::findValue(m_aValueList, m_aText, true); if (aPosSeq.getLength()) - static_cast<ListBox*>(m_pWindow)->SelectEntryPos(aPosSeq.getConstArray()[0], sal_True); + static_cast<ListBox*>(m_pWindow)->SelectEntryPos(aPosSeq.getConstArray()[0], true); else static_cast<ListBox*>(m_pWindow)->SetNoSelection(); } break; diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index 29abc1bea421..761426ecba81 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -290,7 +290,7 @@ DbGridControl::NavigationBar::AbsolutePos::AbsolutePos(Window* pParent, WinBits SetSpinSize(1); SetDecimalDigits(0); - SetStrictFormat(sal_True); + SetStrictFormat(true); } void DbGridControl::NavigationBar::AbsolutePos::KeyInput(const KeyEvent& rEvt) @@ -432,7 +432,7 @@ sal_uInt16 DbGridControl::NavigationBar::ArrangeControls() aApplFont.SetSize( pointAbsoluteSize ); m_aAbsolute.SetControlFont( aApplFont ); - aApplFont.SetTransparent( sal_True ); + aApplFont.SetTransparent( true ); m_aRecordText.SetControlFont( aApplFont ); m_aRecordOf.SetControlFont( aApplFont ); m_aRecordCount.SetControlFont( aApplFont ); @@ -603,7 +603,7 @@ sal_Bool DbGridControl::NavigationBar::GetState(sal_uInt16 nWhich) const void DbGridControl::NavigationBar::SetState(sal_uInt16 nWhich) { - sal_Bool bAvailable = GetState(nWhich); + bool bAvailable = GetState(nWhich); DbGridControl* pParent = (DbGridControl*)GetParent(); Window* pWnd = NULL; switch (nWhich) @@ -924,7 +924,7 @@ void DbGridControl::InsertHandleColumn() void DbGridControl::Init() { BrowserHeader* pNewHeader = CreateHeaderBar(this); - pHeader->SetMouseTransparent(sal_False); + pHeader->SetMouseTransparent(false); SetHeaderBar(pNewHeader); SetMode(m_nMode); @@ -1792,7 +1792,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B // ignore any implicitly made updates bool bDisablePaint = !bUpdateCursor && IsPaintEnabled(); if (bDisablePaint) - EnablePaint(sal_False); + EnablePaint(false); // adjust cache to the visible area Reference< XPropertySet > xSet = m_pSeekCursor->getPropertySet(); @@ -1833,7 +1833,7 @@ void DbGridControl::RecalcRows(long nNewTopRow, sal_uInt16 nLinesOnScreen, sal_B AdjustRows(); // ignore any updates implicit made - EnablePaint(sal_True); + EnablePaint(true); } void DbGridControl::RowInserted(long nRow, long nNumRows, sal_Bool bDoPaint, sal_Bool bKeepSelection) @@ -2763,7 +2763,7 @@ void DbGridControl::executeRowContextMenu( long _nRow, const Point& _rPreferredP PopupMenu aContextMenu( SVX_RES( RID_SVXMNU_ROWS ) ); PreExecuteRowContextMenu( (sal_uInt16)_nRow, aContextMenu ); - aContextMenu.RemoveDisabledEntries( sal_True, sal_True ); + aContextMenu.RemoveDisabledEntries( true, true ); PostExecuteRowContextMenu( (sal_uInt16)_nRow, aContextMenu, aContextMenu.Execute( this, _rPreferredPos ) ); // TODO: why this weird cast to sal_uInt16? What if we really have more than 65535 lines? @@ -2806,7 +2806,7 @@ void DbGridControl::Command(const CommandEvent& rEvt) else if (canCopyCellText(nRow, nColId)) { PopupMenu aContextMenu(SVX_RES(RID_SVXMNU_CELL)); - aContextMenu.RemoveDisabledEntries(sal_True, sal_True); + aContextMenu.RemoveDisabledEntries(true, true); switch (aContextMenu.Execute(this, rEvt.GetMousePosPixel())) { case SID_COPY: @@ -3220,7 +3220,7 @@ bool DbGridControl::PreNotify(NotifyEvent& rEvt) // Ctrl-Tab is used to step out of the control, without traveling to the // remaining cells first // -> build a new key event without the Ctrl-key, and let the very base class handle it - KeyCode aNewCode( KEY_TAB, bShift, sal_False, sal_False, sal_False ); + KeyCode aNewCode( KEY_TAB, bShift, false, false, false ); KeyEvent aNewEvent( pKeyEvent->GetCharCode(), aNewCode ); // call the Control - our direct base class will interpret this in a way we do not want (and do diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx index d3ad4ba6d803..6437cfe6d3a6 100644 --- a/svx/source/form/datanavi.cxx +++ b/svx/source/form/datanavi.cxx @@ -2209,7 +2209,7 @@ namespace svxform } //----------------------------------------------------------------------- - sal_Bool DataNavigator::Close() + bool DataNavigator::Close() { Update( NULL ); return SfxDockingWindow::Close(); @@ -2661,19 +2661,19 @@ namespace svxform { if ( ( m_xTempBinding->getPropertyValue( PN_REQUIRED_EXPR ) >>= sTemp ) && !sTemp.isEmpty() ) - m_pRequiredCB->Check( sal_True ); + m_pRequiredCB->Check( true ); if ( ( m_xTempBinding->getPropertyValue( PN_RELEVANT_EXPR ) >>= sTemp ) && !sTemp.isEmpty() ) - m_pRelevantCB->Check( sal_True ); + m_pRelevantCB->Check( true ); if ( ( m_xTempBinding->getPropertyValue( PN_CONSTRAINT_EXPR ) >>= sTemp ) && !sTemp.isEmpty() ) - m_pConstraintCB->Check( sal_True ); + m_pConstraintCB->Check( true ); if ( ( m_xTempBinding->getPropertyValue( PN_READONLY_EXPR ) >>= sTemp ) && !sTemp.isEmpty() ) - m_pReadonlyCB->Check( sal_True ); + m_pReadonlyCB->Check( true ); if ( ( m_xTempBinding->getPropertyValue( PN_CALCULATE_EXPR ) >>= sTemp ) && !sTemp.isEmpty() ) - m_pCalculateCB->Check( sal_True ); + m_pCalculateCB->Check( true ); } catch (const Exception&) { diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index e15cb99e6906..5a4583c43b17 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1712,7 +1712,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) aContextMenu.EnableItem( SID_FM_FILTER_IS_NOT_NULL, bEdit ); - aContextMenu.RemoveDisabledEntries(sal_True, sal_True); + aContextMenu.RemoveDisabledEntries(true, true); sal_uInt16 nSlotId = aContextMenu.Execute( this, aWhere ); switch( nSlotId ) { @@ -1948,14 +1948,14 @@ void FmFilterNavigatorWin::StateChanged( sal_uInt16 nSID, SfxItemState eState, c } //----------------------------------------------------------------------- -sal_Bool FmFilterNavigatorWin::Close() +bool FmFilterNavigatorWin::Close() { if ( m_pNavigator && m_pNavigator->IsEditingActive() ) m_pNavigator->EndEditing(); if ( m_pNavigator && m_pNavigator->IsEditingActive() ) // the EndEditing was vetoed (perhaps of an syntax error or such) - return sal_False; + return false; UpdateContent( NULL ); return SfxDockingWindow::Close(); diff --git a/svx/source/form/fmPropBrw.cxx b/svx/source/form/fmPropBrw.cxx index d380e7057167..1c24dbc2da06 100644 --- a/svx/source/form/fmPropBrw.cxx +++ b/svx/source/form/fmPropBrw.cxx @@ -337,7 +337,7 @@ void FmPropBrw::implDetachController() } //----------------------------------------------------------------------- -sal_Bool FmPropBrw::Close() +bool FmPropBrw::Close() { // suspend the controller (it is allowed to veto) if ( m_xMeAsFrame.is() ) @@ -346,7 +346,7 @@ sal_Bool FmPropBrw::Close() { Reference< XController > xController( m_xMeAsFrame->getController() ); if ( xController.is() && !xController->suspend( sal_True ) ) - return sal_False; + return false; } catch( const Exception& ) { diff --git a/svx/source/form/fmexpl.cxx b/svx/source/form/fmexpl.cxx index ff39f82502af..3a6076ad15a8 100644 --- a/svx/source/form/fmexpl.cxx +++ b/svx/source/form/fmexpl.cxx @@ -634,7 +634,7 @@ namespace svxform } //----------------------------------------------------------------------- - sal_Bool NavigatorFrame::Close() + bool NavigatorFrame::Close() { UpdateContent( NULL ); return SfxDockingWindow::Close(); diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx index b1b4241095ef..a382e69ab5d7 100644 --- a/svx/source/form/navigatortree.cxx +++ b/svx/source/form/navigatortree.cxx @@ -423,10 +423,10 @@ namespace svxform pFormShell->GetImpl()->checkControlConversionSlotsForCurrentSelection( *aContextMenu.GetPopupMenu( SID_FM_CHANGECONTROLTYPE ) ); } else - aContextMenu.EnableItem( SID_FM_CHANGECONTROLTYPE, sal_False ); + aContextMenu.EnableItem( SID_FM_CHANGECONTROLTYPE, false ); // jetzt alles, was disabled wurde, wech - aContextMenu.RemoveDisabledEntries(sal_True, sal_True); + aContextMenu.RemoveDisabledEntries(true, true); ////////////////////////////////////////////////////////// // OpenReadOnly setzen diff --git a/svx/source/form/tabwin.cxx b/svx/source/form/tabwin.cxx index 6ba2729ad025..689e25a2e921 100644 --- a/svx/source/form/tabwin.cxx +++ b/svx/source/form/tabwin.cxx @@ -287,7 +287,7 @@ bool FmFieldWin::PreNotify( NotifyEvent& _rNEvt ) } //----------------------------------------------------------------------- -sal_Bool FmFieldWin::Close() +bool FmFieldWin::Close() { return SfxFloatingWindow::Close(); } diff --git a/svx/source/form/tbxform.cxx b/svx/source/form/tbxform.cxx index 9b04305739a1..7bf980cbdb8f 100644 --- a/svx/source/form/tbxform.cxx +++ b/svx/source/form/tbxform.cxx @@ -63,7 +63,7 @@ SvxFmAbsRecWin::SvxFmAbsRecWin( Window* _pParent, SfxToolBoxControl* _pControlle SetSizePixel( Size(70,19) ); SetDecimalDigits(0); - SetStrictFormat(sal_True); + SetStrictFormat(true); } // ----------------------------------------------------------------------- @@ -395,7 +395,7 @@ Window* SvxFmTbxCtlRecTotal::CreateItemWindow( Window* pParent ) aSize.Width() += 12; pFixedText->SetSizePixel( aSize ); pFixedText->SetBackground(); - pFixedText->SetPaintTransparent(sal_True); + pFixedText->SetPaintTransparent(true); return pFixedText; } diff --git a/svx/source/gallery2/GalleryControl.cxx b/svx/source/gallery2/GalleryControl.cxx index bdd1004083b9..2bb139bdd7b6 100644 --- a/svx/source/gallery2/GalleryControl.cxx +++ b/svx/source/gallery2/GalleryControl.cxx @@ -180,7 +180,7 @@ sal_Bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, Window* ) { if( !rKEvt.GetKeyCode().IsShift() ) { - if( mpBrowser1->mpThemes->HasChildPathFocus( sal_True ) ) + if( mpBrowser1->mpThemes->HasChildPathFocus( true ) ) mpBrowser2->GetViewWindow()->GrabFocus(); else if( mpBrowser2->GetViewWindow()->HasFocus() ) mpBrowser2->maViewBox.GrabFocus(); @@ -191,7 +191,7 @@ sal_Bool GalleryControl::GalleryKeyInput( const KeyEvent& rKEvt, Window* ) } else { - if( mpBrowser1->mpThemes->HasChildPathFocus( sal_True ) ) + if( mpBrowser1->mpThemes->HasChildPathFocus( true ) ) mpBrowser1->maNewTheme.GrabFocus(); else if( mpBrowser1->maNewTheme.HasFocus() ) mpBrowser2->maViewBox.GrabFocus(); diff --git a/svx/source/gallery2/galbrws.cxx b/svx/source/gallery2/galbrws.cxx index 27275d2b8c9c..cefb64480999 100644 --- a/svx/source/gallery2/galbrws.cxx +++ b/svx/source/gallery2/galbrws.cxx @@ -196,7 +196,7 @@ sal_Bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) { if( !rKEvt.GetKeyCode().IsShift() ) { - if( mpBrowser1->mpThemes->HasChildPathFocus( sal_True ) ) + if( mpBrowser1->mpThemes->HasChildPathFocus( true ) ) mpBrowser2->GetViewWindow()->GrabFocus(); else if( mpBrowser2->GetViewWindow()->HasFocus() ) mpBrowser2->maViewBox.GrabFocus(); @@ -207,7 +207,7 @@ sal_Bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) } else { - if( mpBrowser1->mpThemes->HasChildPathFocus( sal_True ) ) + if( mpBrowser1->mpThemes->HasChildPathFocus( true ) ) mpBrowser1->maNewTheme.GrabFocus(); else if( mpBrowser1->maNewTheme.HasFocus() ) mpBrowser2->maViewBox.GrabFocus(); @@ -221,7 +221,7 @@ sal_Bool GalleryBrowser::KeyInput( const KeyEvent& rKEvt, Window* ) return bRet; } -sal_Bool GalleryBrowser::Close() +bool GalleryBrowser::Close() { return SfxDockingWindow::Close(); } diff --git a/svx/source/gallery2/galbrws2.cxx b/svx/source/gallery2/galbrws2.cxx index 483a83d3f659..f9070ffcb725 100644 --- a/svx/source/gallery2/galbrws2.cxx +++ b/svx/source/gallery2/galbrws2.cxx @@ -183,7 +183,7 @@ throw ( css::uno::RuntimeException ) { if ( !rEvent.IsEnabled ) { - maPopupMenu.EnableItem( MN_ADD, sal_False ); + maPopupMenu.EnableItem( MN_ADD, false ); } } else if ( rURL == CMD_SID_GALLERY_BG_BRUSH ) @@ -251,21 +251,21 @@ void GalleryThemePopup::ExecutePopup( Window *pWindow, const ::Point &aPos ) if( mpTheme->IsReadOnly() || !mpTheme->GetObjectCount() ) { - maPopupMenu.EnableItem( MN_DELETE, sal_False ); - maPopupMenu.EnableItem( MN_TITLE, sal_False ); + maPopupMenu.EnableItem( MN_DELETE, false ); + maPopupMenu.EnableItem( MN_TITLE, false ); if( mpTheme->IsReadOnly() ) - maPopupMenu.EnableItem( MN_PASTECLIPBOARD, sal_False ); + maPopupMenu.EnableItem( MN_PASTECLIPBOARD, false ); if( !mpTheme->GetObjectCount() ) - maPopupMenu.EnableItem( MN_COPYCLIPBOARD, sal_False ); + maPopupMenu.EnableItem( MN_COPYCLIPBOARD, false ); } else { maPopupMenu.EnableItem( MN_DELETE, !mbPreview ); - maPopupMenu.EnableItem( MN_TITLE, sal_True ); - maPopupMenu.EnableItem( MN_COPYCLIPBOARD, sal_True ); - maPopupMenu.EnableItem( MN_PASTECLIPBOARD, sal_True ); + maPopupMenu.EnableItem( MN_TITLE, true ); + maPopupMenu.EnableItem( MN_COPYCLIPBOARD, true ); + maPopupMenu.EnableItem( MN_PASTECLIPBOARD, true ); } #ifdef GALLERY_USE_CLIPBOARD @@ -291,8 +291,8 @@ void GalleryThemePopup::ExecutePopup( Window *pWindow, const ::Point &aPos ) maPopupMenu.EnableItem( MN_PASTECLIPBOARD, sal_False ); } #else - maPopupMenu.EnableItem( MN_COPYCLIPBOARD, sal_False ); - maPopupMenu.EnableItem( MN_PASTECLIPBOARD, sal_False ); + maPopupMenu.EnableItem( MN_COPYCLIPBOARD, false ); + maPopupMenu.EnableItem( MN_PASTECLIPBOARD, false ); #endif // update status @@ -328,10 +328,10 @@ void GalleryThemePopup::ExecutePopup( Window *pWindow, const ::Point &aPos ) } if( !maBackgroundPopup.GetItemCount() || ( eObjKind == SGA_OBJ_SVDRAW ) || ( eObjKind == SGA_OBJ_SOUND ) ) - maPopupMenu.EnableItem( MN_BACKGROUND, sal_False ); + maPopupMenu.EnableItem( MN_BACKGROUND, false ); else { - maPopupMenu.EnableItem( MN_BACKGROUND, sal_True ); + maPopupMenu.EnableItem( MN_BACKGROUND, true ); maPopupMenu.SetPopupMenu( MN_BACKGROUND, &maBackgroundPopup ); maBackgroundPopup.SetSelectHdl( LINK( this, GalleryThemePopup, BackgroundMenuSelectHdl ) ); } @@ -780,7 +780,7 @@ void GalleryBrowser2::SelectTheme( const OUString& rThemeName ) maViewBox.EnableItem( TBX_ID_ICON, true ); maViewBox.EnableItem( TBX_ID_LIST, true ); - maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, sal_True ); + maViewBox.CheckItem( ( GALLERYBROWSERMODE_ICON == GetMode() ) ? TBX_ID_ICON : TBX_ID_LIST, true ); if(maInfoBar.GetText().isEmpty()) mpIconView->SetAccessibleRelationLabeledBy(mpIconView); @@ -810,8 +810,8 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) maViewBox.EnableItem( TBX_ID_ICON, true ); maViewBox.EnableItem( TBX_ID_LIST, true ); - maViewBox.CheckItem( TBX_ID_ICON, sal_True ); - maViewBox.CheckItem( TBX_ID_LIST, sal_False ); + maViewBox.CheckItem( TBX_ID_ICON, true ); + maViewBox.CheckItem( TBX_ID_LIST, false ); } break; @@ -828,8 +828,8 @@ void GalleryBrowser2::SetMode( GalleryBrowserMode eMode ) maViewBox.EnableItem( TBX_ID_ICON, true ); maViewBox.EnableItem( TBX_ID_LIST, true ); - maViewBox.CheckItem( TBX_ID_ICON, sal_False ); - maViewBox.CheckItem( TBX_ID_LIST, sal_True ); + maViewBox.CheckItem( TBX_ID_ICON, false ); + maViewBox.CheckItem( TBX_ID_LIST, true ); } break; diff --git a/svx/source/inc/datanavi.hxx b/svx/source/inc/datanavi.hxx index 331b06753fcb..d9d91c046edb 100644 --- a/svx/source/inc/datanavi.hxx +++ b/svx/source/inc/datanavi.hxx @@ -378,7 +378,7 @@ namespace svxform protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void GetFocus(); virtual Size CalcDockingSize( SfxChildAlignment ); virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ); diff --git a/svx/source/inc/filtnav.hxx b/svx/source/inc/filtnav.hxx index 1c03f60021e7..adc474e2c1d4 100644 --- a/svx/source/inc/filtnav.hxx +++ b/svx/source/inc/filtnav.hxx @@ -321,7 +321,7 @@ private: protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual Size CalcDockingSize( SfxChildAlignment ); virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ); diff --git a/svx/source/inc/fmPropBrw.hxx b/svx/source/inc/fmPropBrw.hxx index e7aff9331c75..4afe9ea66971 100644 --- a/svx/source/inc/fmPropBrw.hxx +++ b/svx/source/inc/fmPropBrw.hxx @@ -65,7 +65,7 @@ class FmPropBrw : public SfxFloatingWindow, public SfxControllerItem protected: virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, const SfxPoolItem* pState); virtual void FillInfo( SfxChildWinInfo& rInfo ) const; - virtual sal_Bool Close(); + virtual bool Close(); DECL_LINK( OnAsyncGetFocus, void* ); diff --git a/svx/source/inc/fmexpl.hxx b/svx/source/inc/fmexpl.hxx index 319681604fa6..5b5c2898f0ad 100644 --- a/svx/source/inc/fmexpl.hxx +++ b/svx/source/inc/fmexpl.hxx @@ -568,7 +568,7 @@ namespace svxform protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void GetFocus(); virtual Size CalcDockingSize( SfxChildAlignment ); virtual SfxChildAlignment CheckAlignment( SfxChildAlignment, SfxChildAlignment ); diff --git a/svx/source/inc/tabwin.hxx b/svx/source/inc/tabwin.hxx index 6277bd8186b6..71a4e2a3de45 100644 --- a/svx/source/inc/tabwin.hxx +++ b/svx/source/inc/tabwin.hxx @@ -89,7 +89,7 @@ public: virtual ~FmFieldWin(); virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void GetFocus(); virtual bool PreNotify( NotifyEvent& _rNEvt ); virtual void StateChanged(sal_uInt16 nSID, SfxItemState eState, diff --git a/svx/source/mnuctrls/clipboardctl.cxx b/svx/source/mnuctrls/clipboardctl.cxx index b1019314a073..f4921b7be86b 100644 --- a/svx/source/mnuctrls/clipboardctl.cxx +++ b/svx/source/mnuctrls/clipboardctl.cxx @@ -83,13 +83,13 @@ SfxPopupWindow* SvxClipBoardControl::CreatePopupWindow() ToolBox& rBox = GetToolBox(); sal_uInt16 nId = GetId(); - rBox.SetItemDown( nId, sal_True ); + rBox.SetItemDown( nId, true ); pPopup->Execute( &rBox, rBox.GetItemRect( nId ), (rBox.GetAlign() == WINDOWALIGN_TOP || rBox.GetAlign() == WINDOWALIGN_BOTTOM) ? POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT ); - rBox.SetItemDown( nId, sal_False ); + rBox.SetItemDown( nId, false ); SfxUInt32Item aItem( SID_CLIPBOARD_FORMAT_ITEMS, pPopup->GetCurItemId() ); diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 0bb2ffbeedb2..27d8599ce416 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -72,7 +72,7 @@ Font& lcl_GetDefaultBulletFont() aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( sal_True ); + aDefBulletFont.SetTransparent( true ); bInit = sal_True; } return aDefBulletFont; @@ -1827,7 +1827,7 @@ sal_Bool OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum,sal_uInt16 nIndex,sal_uIn aCreateFont.SetFamily( FAMILY_DONTKNOW ); aCreateFont.SetPitch( PITCH_DONTKNOW ); aCreateFont.SetWeight( WEIGHT_DONTKNOW ); - aCreateFont.SetTransparent( sal_True ); + aCreateFont.SetTransparent( true ); aFmt.SetBulletFont( &aCreateFont ); } }else diff --git a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx index 4a60f58e6787..37b7a4ad151b 100644 --- a/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx +++ b/svx/source/sidebar/paragraph/ParaPropertyPanel.cxx @@ -400,7 +400,7 @@ IMPL_LINK(ParaPropertyPanel, NumBTbxDDHandler, ToolBox*, pToolBox) const OUString aCommand(pToolBox->GetItemCommand(nId)); EndTracking(); - pToolBox->SetItemDown( nId, sal_True ); + pToolBox->SetItemDown( nId, true ); if (aCommand == UNO_DEFAULTBULLET) { @@ -412,7 +412,7 @@ IMPL_LINK(ParaPropertyPanel, NumBTbxDDHandler, ToolBox*, pToolBox) maNumberingPopup.UpdateValueSet(); maNumberingPopup.Show(*pToolBox); } - pToolBox->SetItemDown( nId, sal_False ); + pToolBox->SetItemDown( nId, false ); return 0; } diff --git a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx index 5d3c74f664ff..5d317f1b19d1 100644 --- a/svx/source/sidebar/tools/ValueSetWithTextControl.cxx +++ b/svx/source/sidebar/tools/ValueSetWithTextControl.cxx @@ -61,7 +61,7 @@ static Font& lcl_GetDefaultBulletFont() aDefBulletFont.SetFamily( FAMILY_DONTKNOW ); aDefBulletFont.SetPitch( PITCH_DONTKNOW ); aDefBulletFont.SetWeight( WEIGHT_DONTKNOW ); - aDefBulletFont.SetTransparent( sal_True ); + aDefBulletFont.SetTransparent( true ); bInit = sal_True; } return aDefBulletFont; diff --git a/svx/source/stbctrls/zoomctrl.cxx b/svx/source/stbctrls/zoomctrl.cxx index 6494c69c9fe0..3a34edeab79c 100644 --- a/svx/source/stbctrls/zoomctrl.cxx +++ b/svx/source/stbctrls/zoomctrl.cxx @@ -72,7 +72,7 @@ ZoomPopup_Impl::ZoomPopup_Impl( sal_uInt16 nZ, sal_uInt16 nValueSet ) for ( sal_uInt16 nPos = 0; nPos < SAL_N_ELEMENTS(aTable); nPos += 2 ) if ( ( aTable[nPos] != ( aTable[nPos] & nValueSet ) ) ) - EnableItem( aTable[nPos+1], sal_False ); + EnableItem( aTable[nPos+1], false ); } // ----------------------------------------------------------------------- diff --git a/svx/source/svdraw/sdrpaintwindow.cxx b/svx/source/svdraw/sdrpaintwindow.cxx index a0fe5a79ef9f..1367c0b110ea 100644 --- a/svx/source/svdraw/sdrpaintwindow.cxx +++ b/svx/source/svdraw/sdrpaintwindow.cxx @@ -90,8 +90,8 @@ void SdrPreRenderDevice::OutputPreRenderDevice(const Region& rExpandedRegion) // MapModes off sal_Bool bMapModeWasEnabledDest(mrOutputDevice.IsMapModeEnabled()); sal_Bool bMapModeWasEnabledSource(maPreRenderDevice.IsMapModeEnabled()); - mrOutputDevice.EnableMapMode(sal_False); - maPreRenderDevice.EnableMapMode(sal_False); + mrOutputDevice.EnableMapMode(false); + maPreRenderDevice.EnableMapMode(false); RectangleVector aRectangles; aRegionPixel.GetRegionRectangles(aRectangles); diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 154316a20198..73193f646456 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -415,7 +415,7 @@ void SdrObjEditView::ImpInvalidateOutlinerView(OutlinerView& rOutlView) const aOuterPix.Bottom()+=nPixSiz; bool bMerk(pWin->IsMapModeEnabled()); - pWin->EnableMapMode(sal_False); + pWin->EnableMapMode(false); pWin->Invalidate(aOuterPix); pWin->EnableMapMode(bMerk); } diff --git a/svx/source/svdraw/svdglue.cxx b/svx/source/svdraw/svdglue.cxx index 34c88c71fb63..4a95b145f7f4 100644 --- a/svx/source/svdraw/svdglue.cxx +++ b/svx/source/svdraw/svdglue.cxx @@ -240,7 +240,7 @@ void SdrGluePoint::Invalidate(Window& rWin, const SdrObject* pObj) const bool bMapMerk=rWin.IsMapModeEnabled(); Point aPt(pObj!=NULL ? GetAbsolutePos(*pObj) : GetPos()); aPt=rWin.LogicToPixel(aPt); - rWin.EnableMapMode(sal_False); + rWin.EnableMapMode(false); Size aSiz( aGlueHalfSize ); Rectangle aRect(aPt.X()-aSiz.Width(),aPt.Y()-aSiz.Height(), diff --git a/svx/source/svdraw/svdotext.cxx b/svx/source/svdraw/svdotext.cxx index 21b8911f6d1c..59861fd8c16c 100644 --- a/svx/source/svdraw/svdotext.cxx +++ b/svx/source/svdraw/svdotext.cxx @@ -871,7 +871,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS pMtf = NULL; if(pMtf) - pMtf->Pause(sal_True); + pMtf->Pause(true); Font aFontMerk(pOut->GetFont()); Font aTmpFont( OutputDevice::GetDefaultFont( DEFAULTFONT_SERIF, LANGUAGE_SYSTEM, DEFAULTFONT_FLAGS_ONLYONE ) ); @@ -885,7 +885,7 @@ void SdrTextObj::ImpSetCharStretching(SdrOutliner& rOutliner, const Size& rTextS pOut->SetFont(aFontMerk); if(pMtf) - pMtf->Pause(sal_False); + pMtf->Pause(false); bNoStretching = (aSize1 == aSize2); @@ -1851,7 +1851,7 @@ GDIMetaFile* SdrTextObj::GetTextScrollMetaFileAndRectangle( // create the MetaFile pRetval = new GDIMetaFile; VirtualDevice aBlackHole; - aBlackHole.EnableOutput(sal_False); + aBlackHole.EnableOutput(false); pRetval->Record(&aBlackHole); Point aPaintPos = aPaintRect.TopLeft(); diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 9c6d7ff95153..d62f4c685ada 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -646,7 +646,7 @@ Graphic SdrExchangeView::GetObjGraphic( const SdrModel* pModel, const SdrObject* pModel->GetScaleFraction(), pModel->GetScaleFraction() ); - aOut.EnableOutput( sal_False ); + aOut.EnableOutput( false ); aOut.SetMapMode( aMap ); aMtf.Record( &aOut ); pObj->SingleObjectPainter( aOut ); diff --git a/svx/source/table/tablecontroller.cxx b/svx/source/table/tablecontroller.cxx index cf1475d376ba..f9a92b0bc8c8 100644 --- a/svx/source/table/tablecontroller.cxx +++ b/svx/source/table/tablecontroller.cxx @@ -1237,7 +1237,7 @@ bool SvxTableController::checkTableObject() sal_uInt16 SvxTableController::getKeyboardAction( const KeyEvent& rKEvt, Window* /*pWindow*/ ) { const bool bMod1 = rKEvt.GetKeyCode().IsMod1(); // ctrl - const bool bMod2 = rKEvt.GetKeyCode().IsMod2() != 0; // Alt + const bool bMod2 = rKEvt.GetKeyCode().IsMod2(); // Alt const bool bTextEdit = mpView->IsTextEdit(); diff --git a/svx/source/tbxctrls/colorwindow.hxx b/svx/source/tbxctrls/colorwindow.hxx index 0b6836483e14..cdad609a676a 100644 --- a/svx/source/tbxctrls/colorwindow.hxx +++ b/svx/source/tbxctrls/colorwindow.hxx @@ -48,7 +48,7 @@ private: protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); public: SvxColorWindow_Impl( const OUString& rCommand, diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx index 0e37a6d456d5..cce884f49765 100644 --- a/svx/source/tbxctrls/colrctrl.cxx +++ b/svx/source/tbxctrls/colrctrl.cxx @@ -396,13 +396,13 @@ void SvxColorDockingWindow::SetSize() |* \************************************************************************/ -sal_Bool SvxColorDockingWindow::Close() +bool SvxColorDockingWindow::Close() { SfxBoolItem aItem( SID_COLOR_CONTROL, false ); GetBindings().GetDispatcher()->Execute( SID_COLOR_CONTROL, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, &aItem, 0L ); SfxDockingWindow::Close(); - return( sal_True ); + return true; } /************************************************************************* diff --git a/svx/source/tbxctrls/itemwin.cxx b/svx/source/tbxctrls/itemwin.cxx index fda4261b3667..01b221c05155 100644 --- a/svx/source/tbxctrls/itemwin.cxx +++ b/svx/source/tbxctrls/itemwin.cxx @@ -666,7 +666,7 @@ bool SvxFillTypeBox::PreNotify( NotifyEvent& rNEvt ) nCurPos = GetSelectEntryPos(); else if ( EVENT_LOSEFOCUS == nType && Application::GetFocusWindow() - && !IsWindowOrChild( Application::GetFocusWindow(), sal_True ) ) + && !IsWindowOrChild( Application::GetFocusWindow(), true ) ) { if ( !bSelect ) SelectEntryPos( nCurPos ); diff --git a/svx/source/tbxctrls/layctrl.cxx b/svx/source/tbxctrls/layctrl.cxx index 8d17b8dcb537..07898e1023f5 100644 --- a/svx/source/tbxctrls/layctrl.cxx +++ b/svx/source/tbxctrls/layctrl.cxx @@ -140,7 +140,7 @@ TableWindow::TableWindow( sal_uInt16 nSlotId, const OUString& rCmd, const OUStri Font aFont = GetFont(); aFont.SetColor( ::Color( aColorConfig.GetColorValue( svtools::FONTCOLOR ).nColor ) ); aFont.SetFillColor( aBackgroundColor ); - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); SetFont( aFont ); SetText( rText ); @@ -460,7 +460,7 @@ ColumnsWindow::ColumnsWindow( sal_uInt16 nId, const OUString& rCmd, const OUStri Font aFont( GetFont() ); aFont.SetColor( aLineColor ); aFont.SetFillColor( aFaceColor ); - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); SetFont( aFont ); nCol = 0; diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index f9deeb7ce8de..aa44b89d9afd 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -97,7 +97,7 @@ SvxPopupWindowListBox::SvxPopupWindowListBox( sal_uInt16 nSlotId, const OUString DBG_ASSERT( nSlotId == GetId(), "id mismatch" ); pListBox = new ListBox( this, SVX_RES( LB_SVXTBX_UNDO_REDO_CTRL ) ); FreeResource(); - pListBox->EnableMultiSelection( sal_True, sal_True ); + pListBox->EnableMultiSelection( true, true ); SetBackground( GetSettings().GetStyleSettings().GetDialogColor() ); AddStatusListener( rCommandURL ); } diff --git a/svx/source/tbxctrls/linectrl.cxx b/svx/source/tbxctrls/linectrl.cxx index a1f112f4cddb..451e451eb2cc 100644 --- a/svx/source/tbxctrls/linectrl.cxx +++ b/svx/source/tbxctrls/linectrl.cxx @@ -510,7 +510,7 @@ void SvxLineEndWindow::FillValueSet() OSL_ENSURE( !aBmp.IsEmpty(), "UI bitmap was not created" ); aBmpSize = aBmp.GetSizePixel(); - aVD.SetOutputSizePixel( aBmpSize, sal_False ); + aVD.SetOutputSizePixel( aBmpSize, false ); aBmpSize.Width() = aBmpSize.Width() / 2; Point aPt0( 0, 0 ); Point aPt1( aBmpSize.Width(), 0 ); @@ -623,7 +623,7 @@ void SvxLineEndWindow::StartSelection() // ----------------------------------------------------------------------- -sal_Bool SvxLineEndWindow::Close() +bool SvxLineEndWindow::Close() { return SfxPopupWindow::Close(); } diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 7990834ab244..b46c61c9d4fa 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -266,7 +266,7 @@ private: protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual Window* GetPreferredKeyInputWindow(); virtual void GetFocus(); @@ -294,7 +294,7 @@ private: protected: virtual void Resize(); - virtual sal_Bool Close(); + virtual bool Close(); virtual Window* GetPreferredKeyInputWindow(); virtual void GetFocus(); virtual void DataChanged( const DataChangedEvent& rDCEvt ); @@ -351,7 +351,7 @@ SvxStyleBox_Impl::SvxStyleBox_Impl(Window* pParent, , bInSpecialMode( bInSpec ) { aLogicalSize = PixelToLogic( GetSizePixel(), MAP_APPFONT ); - EnableAutocomplete( sal_True ); + EnableAutocomplete( true ); EnableUserDraw( true ); SetUserItemSize( Size( 0, 30 ) ); } @@ -1232,7 +1232,7 @@ void SvxColorWindow_Impl::StartSelection() // ----------------------------------------------------------------------- -sal_Bool SvxColorWindow_Impl::Close() +bool SvxColorWindow_Impl::Close() { return SfxPopupWindow::Close(); } @@ -1537,7 +1537,7 @@ void SvxFrameWindow_Impl::StartSelection() // ----------------------------------------------------------------------- -sal_Bool SvxFrameWindow_Impl::Close() +bool SvxFrameWindow_Impl::Close() { return SfxPopupWindow::Close(); } @@ -1652,7 +1652,7 @@ void SvxLineWindow_Impl::Resize() // ----------------------------------------------------------------------- -sal_Bool SvxLineWindow_Impl::Close() +bool SvxLineWindow_Impl::Close() { return SfxPopupWindow::Close(); } @@ -1991,7 +1991,7 @@ void SvxStyleToolBoxControl::FillStyleBox() if ( bDoFill ) { - pBox->SetUpdateMode( sal_False ); + pBox->SetUpdateMode( false ); pBox->Clear(); { @@ -2059,7 +2059,7 @@ void SvxStyleToolBoxControl::FillStyleBox() pBox->SetStyle( nWinBits ); } - pBox->SetUpdateMode( sal_True ); + pBox->SetUpdateMode( true ); pBox->SetFamily( eFamily ); sal_uInt16 nLines = std::min( pBox->GetEntryCount(), MAX_STYLES_ENTRIES ); diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx index 04b141e4914b..98cbbe0cdf28 100644 --- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx +++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx @@ -134,7 +134,7 @@ FindTextFieldControl::FindTextFieldControl( Window* pParent, WinBits nStyle, m_xContext(xContext) { SetPlaceholderText(SVX_RESSTR(RID_SVXSTR_FINDBAR_FIND)); - EnableAutocomplete(sal_True, sal_True); + EnableAutocomplete(true, true); } FindTextFieldControl::~FindTextFieldControl() diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx index 3f67ed42dc2d..8b03ad6d01e7 100644 --- a/svx/source/unodraw/UnoGraphicExporter.cxx +++ b/svx/source/unodraw/UnoGraphicExporter.cxx @@ -729,7 +729,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, aVDev.SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) aVDev.SetDrawMode( aVDev.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); aMtf.Record( &aVDev ); Size aNewSize; @@ -927,7 +927,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic, } } - aOut.EnableOutput( sal_False ); + aOut.EnableOutput( false ); aOut.SetMapMode( aMap ); if( rSettings.mbUseHighContrast ) aOut.SetDrawMode( aVDev.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); diff --git a/sw/source/core/doc/notxtfrm.cxx b/sw/source/core/doc/notxtfrm.cxx index be12f39e096b..d221bcbdf132 100644 --- a/sw/source/core/doc/notxtfrm.cxx +++ b/sw/source/core/doc/notxtfrm.cxx @@ -100,7 +100,7 @@ static void lcl_PaintReplacement( const SwRect &rRect, const OUString &rText, pFont->SetStyleName( OUString() ); pFont->SetName(OUString("Arial Unicode")); pFont->SetFamily( FAMILY_SWISS ); - pFont->SetTransparent( sal_True ); + pFont->SetTransparent( true ); } Color aCol( COL_RED ); diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx index d6a052307e3f..15da21ce2be5 100644 --- a/sw/source/core/frmedt/fecopy.cxx +++ b/sw/source/core/frmedt/fecopy.cxx @@ -1237,7 +1237,7 @@ sal_Bool SwFEShell::GetDrawObjGraphic( sal_uLong nFmt, Graphic& rGrf ) const GetGrfSize( aSz ); VirtualDevice aVirtDev; - aVirtDev.EnableOutput( sal_False ); + aVirtDev.EnableOutput( false ); MapMode aTmp( GetWin()->GetMapMode() ); aTmp.SetOrigin( aPt ); diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 2874707c28d7..0082908d8782 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -7047,7 +7047,7 @@ const Font& SwPageFrm::GetEmptyPageFont() pEmptyPgFont->SetStyleName( aEmptyOUStr ); pEmptyPgFont->SetName(OUString("Helvetica")); pEmptyPgFont->SetFamily( FAMILY_SWISS ); - pEmptyPgFont->SetTransparent( sal_True ); + pEmptyPgFont->SetTransparent( true ); pEmptyPgFont->SetColor( COL_GRAY ); } @@ -7303,7 +7303,7 @@ Graphic SwFlyFrmFmt::MakeGraphic( ImageMap* pMap ) OutputDevice *pOld = pSh->GetOut(); VirtualDevice aDev( *pOld ); - aDev.EnableOutput( sal_False ); + aDev.EnableOutput( false ); GDIMetaFile aMet; MapMode aMap( pOld->GetMapMode().GetMapUnit() ); diff --git a/sw/source/core/view/printdata.cxx b/sw/source/core/view/printdata.cxx index 192ae5a91135..39a5ff8f40b5 100644 --- a/sw/source/core/view/printdata.cxx +++ b/sw/source/core/view/printdata.cxx @@ -281,7 +281,7 @@ SwPrintUIOptions::SwPrintUIOptions( // print range selection vcl::PrinterOptionsHelper::UIControlOptions aPrintRangeOpt; aPrintRangeOpt.maGroupHint = "PrintRange"; - aPrintRangeOpt.mbInternalOnly = sal_True; + aPrintRangeOpt.mbInternalOnly = true; m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("printrange", OUString(aLocalizedStrings.GetString(26)), OUString(), aPrintRangeOpt); @@ -309,7 +309,7 @@ SwPrintUIOptions::SwPrintUIOptions( aChoices, 0 /* always default to 'All pages' */, aChoicesDisabled); // show an Edit dependent on "Pages" selected - vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true ); m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(), ".HelpID:vcl:PrintDialog:PageRange:Edit", "PageRange", @@ -330,7 +330,7 @@ SwPrintUIOptions::SwPrintUIOptions( aHelpIds.realloc( 2 ); aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText"; aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox"; - vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( OUString( "PrintProspect" ), 0, sal_False ); + vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( OUString( "PrintProspect" ), 0, false ); aAnnotOpt.mbEnabled = bHasPostIts; m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments", aLocalizedStrings.GetString( 17 ), @@ -389,7 +389,7 @@ SwPrintUIOptions::SwPrintUIOptions( uno::Sequence< OUString > aBRTLChoices( 2 ); aBRTLChoices[0] = aLocalizedStrings.GetString( 24 ); aBRTLChoices[1] = aLocalizedStrings.GetString( 25 ); - vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, sal_True ); + vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, true ); uno::Sequence< OUString > aBRTLHelpIds( 1 ); aBRTLHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox"; aBrochureRTLOpt.maGroupHint = "LayoutPage"; @@ -444,8 +444,8 @@ bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const // take care of different property names for the option. bool bRes = bIsPDFExport ? - !getBoolValue( "IsSkipEmptyPages", sal_True ) : - getBoolValue( "PrintEmptyPages", sal_True ); + !getBoolValue( "IsSkipEmptyPages", true ) : + getBoolValue( "PrintEmptyPages", true ); return bRes; } @@ -463,7 +463,7 @@ bool SwPrintUIOptions::IsPrintGraphics() const // take care of different property names for the option. // for compatibility the old name should win (may still be used for PDF export or via Uno API) - bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True ); + bool bRes = getBoolValue( "PrintPicturesAndObjects", true ); bRes = getBoolValue( "PrintGraphics", bRes ); return bRes; } @@ -473,7 +473,7 @@ bool SwPrintUIOptions::IsPrintDrawings() const // take care of different property names for the option. // for compatibility the old name should win (may still be used for PDF export or via Uno API) - bool bRes = getBoolValue( "PrintPicturesAndObjects", sal_True ); + bool bRes = getBoolValue( "PrintPicturesAndObjects", true ); bRes = getBoolValue( "PrintDrawings", bRes ); return bRes; } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 61fbf74d254c..c5062f1a4b13 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -420,7 +420,7 @@ void SwViewShell::ImplStartAction() void SwViewShell::ImplLockPaint() { if ( GetWin() && GetWin()->IsVisible() ) - GetWin()->EnablePaint( sal_False ); //Also cut off the controls. + GetWin()->EnablePaint( false ); //Also cut off the controls. Imp()->LockPaint(); } @@ -439,7 +439,7 @@ void SwViewShell::ImplUnlockPaint( sal_Bool bVirDev ) aSize.Height()+= 20; if( pVout->SetOutputSize( aSize ) ) { - GetWin()->EnablePaint( sal_True ); + GetWin()->EnablePaint( true ); GetWin()->Validate(); Imp()->UnlockPaint(); @@ -465,7 +465,7 @@ void SwViewShell::ImplUnlockPaint( sal_Bool bVirDev ) else { Imp()->UnlockPaint(); - GetWin()->EnablePaint( sal_True ); + GetWin()->EnablePaint( true ); GetWin()->Invalidate( INVALIDATE_CHILDREN ); } delete pVout; @@ -473,7 +473,7 @@ void SwViewShell::ImplUnlockPaint( sal_Bool bVirDev ) else { Imp()->UnlockPaint(); - GetWin()->EnablePaint( sal_True ); + GetWin()->EnablePaint( true ); GetWin()->Invalidate( INVALIDATE_CHILDREN ); } } diff --git a/sw/source/ui/chrdlg/break.cxx b/sw/source/ui/chrdlg/break.cxx index 1f7f6f3b6a61..e345a6f78a13 100644 --- a/sw/source/ui/chrdlg/break.cxx +++ b/sw/source/ui/chrdlg/break.cxx @@ -193,7 +193,7 @@ void SwBreakDlg::CheckEnable() { m_pPageBtn->Enable(false); if(m_pPageBtn->IsChecked()) - m_pLineBtn->Check(sal_True); + m_pLineBtn->Check(true); bEnable = sal_False; } const sal_Bool bPage = m_pPageBtn->IsChecked(); diff --git a/sw/source/ui/chrdlg/drpcps.cxx b/sw/source/ui/chrdlg/drpcps.cxx index ea5147c9b77f..2e2c83bfb463 100644 --- a/sw/source/ui/chrdlg/drpcps.cxx +++ b/sw/source/ui/chrdlg/drpcps.cxx @@ -317,9 +317,9 @@ void SwDropCapsPict::UpdatePaintSettings( void ) maCJKFont.SetSize(Size(0, mnTextH)); maCTLFont.SetSize(Size(0, mnTextH)); - aFont.SetTransparent(sal_True); - maCJKFont.SetTransparent(sal_True); - maCTLFont.SetTransparent(sal_True); + aFont.SetTransparent(true); + maCJKFont.SetTransparent(true); + maCTLFont.SetTransparent(true); aFont.SetColor( SwViewOption::GetFontColor() ); maCJKFont.SetColor( SwViewOption::GetFontColor() ); diff --git a/sw/source/ui/chrdlg/numpara.cxx b/sw/source/ui/chrdlg/numpara.cxx index 01b9e2dfc411..50acfdc6a1b8 100644 --- a/sw/source/ui/chrdlg/numpara.cxx +++ b/sw/source/ui/chrdlg/numpara.cxx @@ -209,7 +209,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) m_pNewStartCB->SetState(rStart.GetValue() ? STATE_CHECK : STATE_NOCHECK ); - m_pNewStartCB->EnableTriState(sal_False); + m_pNewStartCB->EnableTriState(false); } else m_pNewStartCB->SetState(bHasNumberStyle ? STATE_NOCHECK : STATE_DONTKNOW); @@ -225,7 +225,7 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) nNewStart = 1; m_pNewStartNF->SetValue(nNewStart); - m_pNewStartNumberCB->EnableTriState(sal_False); + m_pNewStartNumberCB->EnableTriState(false); } else m_pNewStartCB->SetState(STATE_DONTKNOW); @@ -242,8 +242,8 @@ void SwParagraphNumTabPage::Reset( const SfxItemSet& rSet ) m_pRestartParaCountCB->SetState( 0 != nStartValue ? STATE_CHECK : STATE_NOCHECK ); m_pRestartNF->SetValue(nStartValue == 0 ? 1 : nStartValue); LineCountHdl_Impl(m_pCountParaCB); - m_pCountParaCB->EnableTriState(sal_False); - m_pRestartParaCountCB->EnableTriState(sal_False); + m_pCountParaCB->EnableTriState(false); + m_pRestartParaCountCB->EnableTriState(false); } else { diff --git a/sw/source/ui/config/optpage.cxx b/sw/source/ui/config/optpage.cxx index 994a2c9b3d34..6ab0257bd13a 100644 --- a/sw/source/ui/config/optpage.cxx +++ b/sw/source/ui/config/optpage.cxx @@ -457,7 +457,7 @@ IMPL_LINK_NOARG_INLINE_START(SwAddPrinterTabPage, AutoClickHdl) bAttrModified = sal_True; bool bIsProspect = m_pProspectCB->IsChecked(); if (!bIsProspect) - m_pProspectCB_RTL->Check( sal_False ); + m_pProspectCB_RTL->Check( false ); m_pProspectCB_RTL->Enable( bIsProspect ); m_pNoRB->Enable( !bIsProspect ); m_pOnlyRB->Enable( !bIsProspect ); @@ -1886,10 +1886,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) InitFontStyle(*pChangedPreviewWN); // initialise colour list box - pInsertColorLB->SetUpdateMode(sal_False); - pDeletedColorLB->SetUpdateMode(sal_False); - pChangedColorLB->SetUpdateMode(sal_False); - pMarkColorLB->SetUpdateMode(sal_False); + pInsertColorLB->SetUpdateMode(false); + pDeletedColorLB->SetUpdateMode(false); + pChangedColorLB->SetUpdateMode(false); + pMarkColorLB->SetUpdateMode(false); pInsertColorLB->InsertEntry(sNone); pDeletedColorLB->InsertEntry(sNone); pChangedColorLB->InsertEntry(sNone); @@ -1911,10 +1911,10 @@ void SwRedlineOptionsTabPage::Reset( const SfxItemSet& ) pChangedColorLB->InsertEntry( aColor, sName ); pMarkColorLB->InsertEntry( aColor, sName ); } - pInsertColorLB->SetUpdateMode( sal_True ); - pDeletedColorLB->SetUpdateMode( sal_True ); - pChangedColorLB->SetUpdateMode( sal_True ); - pMarkColorLB->SetUpdateMode( sal_True ); + pInsertColorLB->SetUpdateMode( true ); + pDeletedColorLB->SetUpdateMode( true ); + pChangedColorLB->SetUpdateMode( true ); + pMarkColorLB->SetUpdateMode( true ); ColorData nColor = rInsertAttr.nColor; diff --git a/sw/source/ui/dbui/dbinsdlg.cxx b/sw/source/ui/dbui/dbinsdlg.cxx index fdb7bc8069d4..bd5b36392a18 100644 --- a/sw/source/ui/dbui/dbinsdlg.cxx +++ b/sw/source/ui/dbui/dbinsdlg.cxx @@ -354,13 +354,13 @@ SwInsertDBColAutoPilot::SwInsertDBColAutoPilot( SwView& rView, if( pView->GetWrtShell().GetTableFmt() ) { m_pRbAsTable->Enable( false ); - m_pRbAsField->Check( sal_True ); - m_pRbDbFmtFromDb->Check( sal_True ); + m_pRbAsField->Check( true ); + m_pRbDbFmtFromDb->Check( true ); } else { - m_pRbAsTable->Check( sal_True ); - m_pRbDbFmtFromDb->Check( sal_True ); + m_pRbAsTable->Check( true ); + m_pRbDbFmtFromDb->Check( true ); m_pIbDbcolOneFrom->Enable( false ); m_pIbDbcolAllFrom->Enable( false ); } @@ -475,8 +475,8 @@ IMPL_LINK( SwInsertDBColAutoPilot, DBFormatHdl, Button*, pButton ) IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) { sal_Bool bChgEnable = sal_True, bEnableTo = sal_True, bEnableFrom = sal_True; - m_pLbTblDbColumn->SetUpdateMode( sal_False ); - m_pLbTableCol->SetUpdateMode( sal_False ); + m_pLbTblDbColumn->SetUpdateMode( false ); + m_pLbTableCol->SetUpdateMode( false ); if( pButton == m_pIbDbcolAllTo ) { @@ -612,8 +612,8 @@ IMPL_LINK( SwInsertDBColAutoPilot, TblToFromHdl, Button*, pButton ) m_pPbTblFormat->Enable( bEnableFrom ); } - m_pLbTblDbColumn->SetUpdateMode( sal_True ); - m_pLbTableCol->SetUpdateMode( sal_True ); + m_pLbTblDbColumn->SetUpdateMode( true ); + m_pLbTableCol->SetUpdateMode( true ); return 0; } @@ -1820,7 +1820,7 @@ void SwInsertDBColAutoPilot::Load() // when the cursor is inside of a table, table must NEVER be selectable if( !m_pRbAsTable->IsEnabled() && m_pRbAsTable->IsChecked() ) - m_pRbAsField->Check( sal_True ); + m_pRbAsField->Check( true ); delete pNewData; break; } diff --git a/sw/source/ui/dbui/mmaddressblockpage.cxx b/sw/source/ui/dbui/mmaddressblockpage.cxx index 18b97076239c..25880d41e879 100644 --- a/sw/source/ui/dbui/mmaddressblockpage.cxx +++ b/sw/source/ui/dbui/mmaddressblockpage.cxx @@ -1056,7 +1056,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) // The first line has to be -(nThumb * m_nYOffset) in the negative long nMove = m_nFirstYPos - (*m_aMatches.begin())->GetPosPixel().Y() - (nThumb * m_nYOffset); - SetUpdateMode(sal_False); + SetUpdateMode(false); long nIndex; ::std::vector<FixedInfo*>::iterator aFIIter; for(nIndex = 0, aFIIter = m_aFieldNames.begin(); aFIIter != m_aFieldNames.end(); ++aFIIter, ++nIndex) @@ -1066,7 +1066,7 @@ IMPL_LINK(SwAssignFieldsControl, ScrollHdl_Impl, ScrollBar*, pScroll) lcl_Move(*aLBIter, nMove); for(nIndex = 0, aFIIter = m_aPreviews.begin(); aFIIter != m_aPreviews.end(); ++aFIIter, ++nIndex) lcl_Move(*aFIIter, nMove); - SetUpdateMode(sal_True); + SetUpdateMode(true); return 0; } @@ -1264,9 +1264,9 @@ AddressMultiLineEdit::AddressMultiLineEdit(Window* pParent, WinBits nBits) : VclMultiLineEdit(pParent, nBits) , m_pParentDialog(NULL) { - GetTextView()->SupportProtectAttribute(sal_True); + GetTextView()->SupportProtectAttribute(true); StartListening(*GetTextEngine()); - EnableFocusSelectionHide(sal_False); + EnableFocusSelectionHide(false); } Size AddressMultiLineEdit::GetOptimalSize() const @@ -1348,7 +1348,7 @@ void AddressMultiLineEdit::SetText( const OUString& rStr ) sal_Int32 nEnd = nStart == -1 ? -1 : sPara.indexOf( '>', nStart ); nIndex = nEnd; if(nStart != -1 && nEnd != -1) - pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, sal_False ); + pTextEngine->SetAttrib( aProtectAttr, nPara, nStart, nEnd + 1, false ); else break; } diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 56063f809f1c..ca4c88d4fc7b 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -373,7 +373,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) &m_aSendAllRB, &m_aSendDocumentsPB, 0 }; - SetUpdateMode(sal_True); + SetUpdateMode(true); Control** pControl = aControls; do { @@ -515,7 +515,7 @@ IMPL_LINK(SwMailMergeOutputPage, OutputTypeHdl_Impl, RadioButton*, pButton) } m_aFromRB.GetClickHdl().Call(m_aFromRB.IsChecked() ? &m_aFromRB : 0); - SetUpdateMode(sal_False); + SetUpdateMode(false); return 0; } diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx index 74fde17d4721..dc459a802fd3 100644 --- a/sw/source/ui/dialog/swabstdlg.cxx +++ b/sw/source/ui/dialog/swabstdlg.cxx @@ -42,7 +42,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create() #if HAVE_FEATURE_DESKTOP #ifndef DISABLE_DYNLOADING static ::osl::Module aDialogLibrary; - static const OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", sal_True)); + static const OUString sLibName(::vcl::unohelper::CreateLibraryName("swui", true)); if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName, SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) ) fp = ( SwAbstractDialogFactory* (SAL_CALL*)() ) diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx index 299abdbcaf9c..b98c01875e45 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -980,7 +980,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) if(!CheckPasswd(pBox)) return 0; SvTreeListEntry* pEntry = m_pTree->FirstSelected(); - pBox->EnableTriState(sal_False); + pBox->EnableTriState(false); sal_Bool bMulti = 1 < m_pTree->GetSelectionCount(); sal_Bool bFile = pBox->IsChecked(); if(pEntry) @@ -992,7 +992,7 @@ IMPL_LINK( SwEditRegionDlg, UseFileHdl, CheckBox *, pBox ) if( pBox->IsChecked() && bContent && rSh.HasSelection() ) { if( RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() ) - pBox->Check( sal_False ); + pBox->Check( false ); } if( bFile ) pSectRepr->SetContent(false); @@ -1571,7 +1571,7 @@ SwInsertSectionTabPage::SwInsertSectionTabPage( m_pCurName->SetModifyHdl ( LINK( this, SwInsertSectionTabPage, NameEditHdl)); m_pDDECB->SetClickHdl ( LINK( this, SwInsertSectionTabPage, DDEHdl )); ChangeProtectHdl(m_pProtectCB); - m_pSubRegionED->EnableAutocomplete( sal_True, sal_True ); + m_pSubRegionED->EnableAutocomplete( true, true ); } SwInsertSectionTabPage::~SwInsertSectionTabPage() @@ -1728,7 +1728,7 @@ IMPL_LINK( SwInsertSectionTabPage, ChangePasswdHdl, Button *, pButton ) } } else if(!bChange) - m_pPasswdCB->Check(sal_False); + m_pPasswdCB->Check(false); } } else @@ -1750,7 +1750,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) { if( m_pWrtSh->HasSelection() && RET_NO == QueryBox( this, SW_RES(QB_CONNECT) ).Execute() ) - pBox->Check( sal_False ); + pBox->Check( false ); } sal_Bool bFile = pBox->IsChecked(); @@ -1764,11 +1764,11 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, CheckBox *, pBox ) if( bFile ) { m_pFileNameED->GrabFocus(); - m_pProtectCB->Check( sal_True ); + m_pProtectCB->Check( true ); } else { - m_pDDECB->Check(sal_False); + m_pDDECB->Check(false); DDEHdl(m_pDDECB); } return 0; diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx index 2e47c0699526..ff2e582ef461 100644 --- a/sw/source/ui/dialog/wordcountdialog.cxx +++ b/sw/source/ui/dialog/wordcountdialog.cxx @@ -67,7 +67,7 @@ void SwWordCountFloatDlg::SetValues(const SwDocStat& rCurrent, const SwDocStat& setValue(m_pDocCjkcharsFT, rDoc.nAsianWord); bool bShowCJK = (SvtCJKOptions().IsAnyEnabled() || rDoc.nAsianWord); - bool bToggleCJK = m_pCurrentCjkcharsFT->IsVisible() != static_cast<sal_Bool>(bShowCJK); + bool bToggleCJK = m_pCurrentCjkcharsFT->IsVisible() != bShowCJK; if (bToggleCJK) { showCJK(bShowCJK); diff --git a/sw/source/ui/docvw/SidebarWin.cxx b/sw/source/ui/docvw/SidebarWin.cxx index ea591226326c..98dfcc7d5a73 100644 --- a/sw/source/ui/docvw/SidebarWin.cxx +++ b/sw/source/ui/docvw/SidebarWin.cxx @@ -332,7 +332,7 @@ void SwSidebarWin::InitControls() mpOutliner->SetUpdateMode( sal_True ); Rescale(); - mpSidebarTxtControl->EnableRTL( sal_False ); + mpSidebarTxtControl->EnableRTL( false ); mpOutlinerView = new OutlinerView ( mpOutliner, mpSidebarTxtControl ); mpOutlinerView->SetBackgroundColor(COL_TRANSPARENT); mpOutliner->InsertView(mpOutlinerView ); diff --git a/sw/source/ui/docvw/romenu.cxx b/sw/source/ui/docvw/romenu.cxx index ea480007a844..024f3f2b6faa 100644 --- a/sw/source/ui/docvw/romenu.cxx +++ b/sw/source/ui/docvw/romenu.cxx @@ -63,7 +63,7 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD SfxItemState eState = rDis.GetBindings()->QueryState( nSID, _pItem ); if (eState >= SFX_ITEM_AVAILABLE) { - EnableItem( nMID, sal_True ); + EnableItem( nMID, true ); if (_pItem) { CheckItem ( nMID, !_pItem->ISA(SfxVoidItem) && @@ -71,11 +71,11 @@ void SwReadOnlyPopup::Check( sal_uInt16 nMID, sal_uInt16 nSID, SfxDispatcher &rD ((SfxBoolItem*)_pItem)->GetValue()); //remove full screen entry when not in full screen mode if( SID_WIN_FULLSCREEN == nSID && !IsItemChecked(SID_WIN_FULLSCREEN) ) - EnableItem(nMID, sal_False); + EnableItem(nMID, false); } } else - EnableItem( nMID, sal_False ); + EnableItem( nMID, false ); delete _pItem; } @@ -107,8 +107,8 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : const Graphic *pGrf; if ( 0 == (pGrf = rSh.GetGrfAtPos( rDocPos, sGrfName, bLink )) ) { - EnableItem( MN_READONLY_SAVEGRAPHIC, sal_False ); - EnableItem( MN_READONLY_COPYGRAPHIC, sal_False ); + EnableItem( MN_READONLY_SAVEGRAPHIC, false ); + EnableItem( MN_READONLY_COPYGRAPHIC, false ); } else { @@ -180,7 +180,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : if ( !rSh.GetViewOptions()->IsGraphic() ) CheckItem( MN_READONLY_GRAPHICOFF ); else - EnableItem( MN_READONLY_LOADGRAPHIC, sal_False ); + EnableItem( MN_READONLY_LOADGRAPHIC, false ); sal_Bool bReloadFrame = 0 != rSh.GetView().GetViewFrame()->GetFrame().GetParentFrame(); EnableItem( MN_READONLY_RELOAD_FRAME, @@ -203,7 +203,7 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : SfxItemState eState = pVFrame->GetBindings().QueryState( SID_COPY, pState ); Check( MN_READONLY_COPY, SID_COPY, rDis ); if(eState < SFX_ITEM_AVAILABLE) - EnableItem( MN_READONLY_COPY, sal_False ); + EnableItem( MN_READONLY_COPY, false ); delete pState; pState = NULL; @@ -213,19 +213,19 @@ SwReadOnlyPopup::SwReadOnlyPopup( const Point &rDPos, SwView &rV ) : (rSh.IsGlobalDoc() && rView.GetDocShell()->IsReadOnlyUI()) ) { - EnableItem( MN_READONLY_EDITDOC, sal_False ); + EnableItem( MN_READONLY_EDITDOC, false ); } delete pState; if ( sURL.isEmpty() ) { - EnableItem( MN_READONLY_OPENURL, sal_False ); - EnableItem( MN_READONLY_OPENURLNEW, sal_False ); - EnableItem( MN_READONLY_COPYLINK, sal_False ); + EnableItem( MN_READONLY_OPENURL, false ); + EnableItem( MN_READONLY_OPENURLNEW, false ); + EnableItem( MN_READONLY_COPYLINK, false ); } Check( SID_WIN_FULLSCREEN, SID_WIN_FULLSCREEN, rDis ); - RemoveDisabledEntries( sal_True, sal_True ); + RemoveDisabledEntries( true, true ); } void SwReadOnlyPopup::Execute( Window* pWin, const Point &rPixPos ) diff --git a/sw/source/ui/docvw/srcedtw.cxx b/sw/source/ui/docvw/srcedtw.cxx index dfa45a108145..7242dcbb97a0 100644 --- a/sw/source/ui/docvw/srcedtw.cxx +++ b/sw/source/ui/docvw/srcedtw.cxx @@ -501,14 +501,14 @@ void SwSrcEditWindow::CreateTextEngine() pTextEngine = new ExtTextEngine; pTextView = new ExtTextView( pTextEngine, pOutWin ); - pTextView->SetAutoIndentMode(sal_True); + pTextView->SetAutoIndentMode(true); pOutWin->SetTextView(pTextView); - pTextEngine->SetUpdateMode( sal_False ); + pTextEngine->SetUpdateMode( false ); pTextEngine->InsertView( pTextView ); Font aFont; - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); aFont.SetFillColor( rCol ); SetPointFont( aFont ); aFont = GetFont(); @@ -519,10 +519,10 @@ void SwSrcEditWindow::CreateTextEngine() aSyntaxIdleTimer.SetTimeout( SYNTAX_HIGHLIGHT_TIMEOUT ); aSyntaxIdleTimer.SetTimeoutHdl( LINK( this, SwSrcEditWindow, SyntaxTimerHdl ) ); - pTextEngine->EnableUndo( sal_True ); - pTextEngine->SetUpdateMode( sal_True ); + pTextEngine->EnableUndo( true ); + pTextEngine->SetUpdateMode( true ); - pTextView->ShowCursor( sal_True, sal_True ); + pTextView->ShowCursor( true, true ); InitScrollBars(); StartListening( *pTextEngine ); @@ -560,14 +560,14 @@ IMPL_LINK(SwSrcEditWindow, ScrollHdl, ScrollBar*, pScroll) { long nDiff = pTextView->GetStartDocPos().Y() - pScroll->GetThumbPos(); GetTextView()->Scroll( 0, nDiff ); - pTextView->ShowCursor( sal_False, sal_True ); + pTextView->ShowCursor( false, true ); pScroll->SetThumbPos( pTextView->GetStartDocPos().Y() ); } else { long nDiff = pTextView->GetStartDocPos().X() - pScroll->GetThumbPos(); GetTextView()->Scroll( nDiff, 0 ); - pTextView->ShowCursor( sal_False, sal_True ); + pTextView->ShowCursor( false, true ); pScroll->SetThumbPos( pTextView->GetStartDocPos().X() ); } GetSrcView()->GetViewFrame()->GetBindings().Invalidate( SID_TABLE_CELL ); @@ -640,17 +640,17 @@ void SwSrcEditWindow::DoSyntaxHighlight( sal_uInt16 nPara ) if ( nPara < pTextEngine->GetParagraphCount() ) { sal_Bool bTempModified = IsModified(); - pTextEngine->RemoveAttribs( nPara, (sal_Bool)sal_True ); + pTextEngine->RemoveAttribs( nPara, true ); OUString aSource( pTextEngine->GetText( nPara ) ); - pTextEngine->SetUpdateMode( sal_False ); + pTextEngine->SetUpdateMode( false ); ImpDoHighlight( aSource, nPara ); TextView* pTmp = pTextEngine->GetActiveView(); - pTmp->SetAutoScroll(sal_False); + pTmp->SetAutoScroll(false); pTextEngine->SetActiveView(0); - pTextEngine->SetUpdateMode( sal_True ); + pTextEngine->SetUpdateMode( true ); pTextEngine->SetActiveView(pTmp); - pTmp->SetAutoScroll(sal_True); - pTmp->ShowCursor( sal_False/*pTmp->IsAutoScroll()*/ ); + pTmp->SetAutoScroll(true); + pTmp->ShowCursor( false/*pTmp->IsAutoScroll()*/ ); if(!bTempModified) ClearModifyFlag(); @@ -723,7 +723,7 @@ void SwSrcEditWindow::ImpDoHighlight( const OUString& rSource, sal_uInt16 nLineO r.eType = svtools::HTMLUNKNOWN; Color aColor((ColorData)SW_MOD()->GetColorConfig().GetColorValue((svtools::ColorConfigEntry)r.eType).nColor); sal_uInt16 nLine = nLineOff+r.nLine; // - pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, sal_True ); + pTextEngine->SetAttrib( TextAttribFontColor( aColor ), nLine, r.nStart, r.nEnd+1, true ); } } diff --git a/sw/source/ui/envelp/labfmt.cxx b/sw/source/ui/envelp/labfmt.cxx index 96460837d4e4..92a2475c832b 100644 --- a/sw/source/ui/envelp/labfmt.cxx +++ b/sw/source/ui/envelp/labfmt.cxx @@ -63,7 +63,7 @@ SwLabPreview::SwLabPreview(Window* pParent) SetBackground(Wallpaper(rWinColor)); Font aFont = GetFont(); - aFont.SetTransparent(sal_True); + aFont.SetTransparent(true); aFont.SetWeight (WEIGHT_NORMAL); SetFont(aFont); @@ -116,7 +116,7 @@ void SwLabPreview::Paint(const Rectangle &) SetLineColor(rWinColor); SetFillColor(aGrayColor); Font aPaintFont(GetFont()); - aPaintFont.SetTransparent(sal_False); + aPaintFont.SetTransparent(false); SetFont(aPaintFont); // size of region to be displayed diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx index 2e99e6d329b9..4481082cf362 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -319,7 +319,7 @@ SwMailMergeDlg::SwMailMergeDlg(Window* pParent, SwWrtShell& rShell, aFormatHtmlCB.Check((nMailingMode & TXTFORMAT_HTML) != 0); aFormatRtfCB.Check((nMailingMode & TXTFORMAT_RTF) != 0); - aAllRB.Check(sal_True); + aAllRB.Check(true); // Install handlers Link aLk = LINK(this, SwMailMergeDlg, ButtonHdl); diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index f478d42468ce..82372d200867 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -81,7 +81,7 @@ void SwFldDBPage::Reset(const SfxItemSet&) { Init(); // Allgemeine initialisierung - m_pTypeLB->SetUpdateMode(sal_False); + m_pTypeLB->SetUpdateMode(false); sal_uInt16 nOldPos = m_pTypeLB->GetSelectEntryPos(); m_sOldDBName = m_pDatabaseTLB->GetDBName(m_sOldTableName, m_sOldColumnName); @@ -166,7 +166,7 @@ void SwFldDBPage::Reset(const SfxItemSet&) } TypeHdl(0); - m_pTypeLB->SetUpdateMode(sal_True); + m_pTypeLB->SetUpdateMode(true); m_pTypeLB->SetSelectHdl(LINK(this, SwFldDBPage, TypeHdl)); m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFldDBPage, InsertHdl)); diff --git a/sw/source/ui/fldui/flddok.cxx b/sw/source/ui/fldui/flddok.cxx index e83684580f38..bc76e4109df0 100644 --- a/sw/source/ui/fldui/flddok.cxx +++ b/sw/source/ui/fldui/flddok.cxx @@ -88,7 +88,7 @@ void SwFldDokPage::Reset(const SfxItemSet& ) // initialise TypeListBox const SwFldGroupRgn& rRg = GetFldMgr().GetGroupRange(IsFldDlgHtmlMode(), GetGroup()); - m_pTypeLB->SetUpdateMode(sal_False); + m_pTypeLB->SetUpdateMode(false); m_pTypeLB->Clear(); sal_uInt16 nPos, nTypeId; @@ -146,7 +146,7 @@ void SwFldDokPage::Reset(const SfxItemSet& ) // select old Pos RestorePos(m_pTypeLB); - m_pTypeLB->SetUpdateMode(sal_True); + m_pTypeLB->SetUpdateMode(true); m_pTypeLB->SetDoubleClickHdl(LINK(this, SwFldDokPage, InsertHdl)); m_pTypeLB->SetSelectHdl(LINK(this, SwFldDokPage, TypeHdl)); m_pFormatLB->SetSelectHdl(LINK(this, SwFldDokPage, FormatHdl)); diff --git a/sw/source/ui/fldui/fldfunc.cxx b/sw/source/ui/fldui/fldfunc.cxx index 3e0acd623a08..101f58f35740 100644 --- a/sw/source/ui/fldui/fldfunc.cxx +++ b/sw/source/ui/fldui/fldfunc.cxx @@ -99,7 +99,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) SavePos(m_pTypeLB); Init(); // general initialisation - m_pTypeLB->SetUpdateMode(sal_False); + m_pTypeLB->SetUpdateMode(false); m_pTypeLB->Clear(); sal_uInt16 nPos, nTypeId; @@ -169,7 +169,7 @@ void SwFldFuncPage::Reset(const SfxItemSet& ) } TypeHdl(0); - m_pTypeLB->SetUpdateMode(sal_True); + m_pTypeLB->SetUpdateMode(true); if (IsFldEdit()) { @@ -396,7 +396,7 @@ IMPL_LINK_NOARG(SwFldFuncPage, InsertMacroHdl) IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) { - m_pListItemsLB->SetUpdateMode(sal_False); + m_pListItemsLB->SetUpdateMode(false); if(pControl == m_pListAddPB || (pControl == m_pListItemED && m_pListAddPB->IsEnabled())) { @@ -436,7 +436,7 @@ IMPL_LINK( SwFldFuncPage, ListModifyHdl, Control*, pControl) } } bDropDownLBChanged = true; - m_pListItemsLB->SetUpdateMode(sal_True); + m_pListItemsLB->SetUpdateMode(true); ListEnableHdl(0); return 0; } @@ -463,7 +463,7 @@ void SwFldFuncPage::UpdateSubType() sal_uInt16 nTypeId = (sal_uInt16)(sal_uLong)m_pTypeLB->GetEntryData(GetTypeSel()); // fill Selction-Listbox - m_pSelectionLB->SetUpdateMode(sal_False); + m_pSelectionLB->SetUpdateMode(false); m_pSelectionLB->Clear(); std::vector<OUString> aLst; @@ -497,7 +497,7 @@ void SwFldFuncPage::UpdateSubType() EnableInsert(bHasMacro); } - m_pSelectionLB->SetUpdateMode(sal_True); + m_pSelectionLB->SetUpdateMode(true); } /*-------------------------------------------------------------------- diff --git a/sw/source/ui/fldui/fldref.cxx b/sw/source/ui/fldui/fldref.cxx index 7798e2eadea4..ccd742513f85 100644 --- a/sw/source/ui/fldui/fldref.cxx +++ b/sw/source/ui/fldui/fldref.cxx @@ -166,7 +166,7 @@ void SwFldRefPage::Reset(const SfxItemSet& ) Init(); // general initialisation // initialise TypeListBox - m_pTypeLB->SetUpdateMode(sal_False); + m_pTypeLB->SetUpdateMode(false); m_pTypeLB->Clear(); // fill Type-Listbox @@ -233,7 +233,7 @@ void SwFldRefPage::Reset(const SfxItemSet& ) if (!IsFldEdit()) RestorePos(m_pTypeLB); - m_pTypeLB->SetUpdateMode(sal_True); + m_pTypeLB->SetUpdateMode(true); nFldDlgFmtSel = 0; @@ -477,7 +477,7 @@ void SwFldRefPage::UpdateSubType() if (IsFldEdit() && sOldSel.isEmpty()) sOldSel = OUString::number( pRefFld->GetSeqNo() + 1 ); - m_pSelectionLB->SetUpdateMode(sal_False); + m_pSelectionLB->SetUpdateMode(false); m_pSelectionLB->Clear(); // #i83479# m_pSelectionToolTipLB->SetUpdateMode(sal_False); @@ -650,7 +650,7 @@ void SwFldRefPage::UpdateSubType() } else { - m_pSelectionLB->SetUpdateMode(sal_True); + m_pSelectionLB->SetUpdateMode(true); // enable or disable bool bEnable = m_pSelectionLB->GetEntryCount() != 0; diff --git a/sw/source/ui/fldui/fldtdlg.cxx b/sw/source/ui/fldui/fldtdlg.cxx index 47d8e95848de..32b3ab1410dd 100644 --- a/sw/source/ui/fldui/fldtdlg.cxx +++ b/sw/source/ui/fldui/fldtdlg.cxx @@ -109,7 +109,7 @@ SwFldDlg::~SwFldDlg() { } -sal_Bool SwFldDlg::Close() +bool SwFldDlg::Close() { m_pBindings->GetDispatcher()-> Execute(m_bDataBaseMode ? FN_INSERT_FIELD_DATA_ONLY : FN_INSERT_FIELD, diff --git a/sw/source/ui/fldui/fldvar.cxx b/sw/source/ui/fldui/fldvar.cxx index ecd296a3c3d7..7e90bec09d6f 100644 --- a/sw/source/ui/fldui/fldvar.cxx +++ b/sw/source/ui/fldui/fldvar.cxx @@ -93,7 +93,7 @@ void SwFldVarPage::Reset(const SfxItemSet& ) Init(); // general initialisation - m_pTypeLB->SetUpdateMode(sal_False); + m_pTypeLB->SetUpdateMode(false); m_pTypeLB->Clear(); sal_uInt16 nPos, nTypeId; @@ -165,7 +165,7 @@ void SwFldVarPage::Reset(const SfxItemSet& ) } TypeHdl(0); - m_pTypeLB->SetUpdateMode(sal_True); + m_pTypeLB->SetUpdateMode(true); if (IsFldEdit()) { @@ -233,8 +233,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) if (m_pValueFT->GetText() != OUString(sOldValueFT)) m_pValueFT->SetText(sOldValueFT); - m_pNumFormatLB->SetUpdateMode(sal_False); - m_pFormatLB->SetUpdateMode(sal_False); + m_pNumFormatLB->SetUpdateMode(false); + m_pFormatLB->SetUpdateMode(false); FillFormatLB(nTypeId); sal_uInt16 nSize = m_pFormatLB->GetEntryCount(); @@ -532,8 +532,8 @@ IMPL_LINK( SwFldVarPage, SubTypeHdl, ListBox *, pBox ) ModifyHdl(); // apply/insert/delete status update - m_pNumFormatLB->SetUpdateMode(sal_True); - m_pFormatLB->SetUpdateMode(sal_True); + m_pNumFormatLB->SetUpdateMode(true); + m_pFormatLB->SetUpdateMode(true); if(m_pSelectionLB->IsCallAddSelection()) { @@ -574,7 +574,7 @@ void SwFldVarPage::UpdateSubType() sOldSel = m_pSelectionLB->GetEntry(GetSelectionSel()); // fill Selection-Listbox - m_pSelectionLB->SetUpdateMode(sal_False); + m_pSelectionLB->SetUpdateMode(false); m_pSelectionLB->Clear(); std::vector<OUString> aList; @@ -663,7 +663,7 @@ void SwFldVarPage::UpdateSubType() m_pSelection->Enable(bEnable); SubTypeHdl(pLB); - m_pSelectionLB->SetUpdateMode(sal_True); + m_pSelectionLB->SetUpdateMode(true); } sal_uInt16 SwFldVarPage::FillFormatLB(sal_uInt16 nTypeId) diff --git a/sw/source/ui/frmdlg/column.cxx b/sw/source/ui/frmdlg/column.cxx index 239aaa6f5ed9..b851e939950d 100644 --- a/sw/source/ui/frmdlg/column.cxx +++ b/sw/source/ui/frmdlg/column.cxx @@ -540,14 +540,14 @@ SwColumnPage::SwColumnPage(Window *pParent, const SfxItemSet &rSet) if ( pColorList.is() ) { - m_pLineColorDLB->SetUpdateMode( sal_False ); + m_pLineColorDLB->SetUpdateMode( false ); for (long i = 0; i < pColorList->Count(); ++i ) { XColorEntry* pEntry = pColorList->GetColor(i); m_pLineColorDLB->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pLineColorDLB->SetUpdateMode( sal_True ); + m_pLineColorDLB->SetUpdateMode( true ); } m_pLineColorDLB->SelectEntryPos( 0 ); } @@ -614,7 +614,7 @@ void SwColumnPage::Reset(const SfxItemSet &rSet) if( SFX_ITEM_SET == rSet.GetItemState( RES_COLUMNBALANCE, false, &pItem )) m_pBalanceColsCB->Check(!((const SwFmtNoBalancedColumns*)pItem)->GetValue()); else - m_pBalanceColsCB->Check( sal_True ); + m_pBalanceColsCB->Check( true ); } //text direction @@ -1313,7 +1313,7 @@ IMPL_LINK( SwColumnPage, SetDefaultsHdl, ValueSet *, pVS ) { bLockUpdate = true; m_pCLNrEdt->SetValue( 2 ); - m_pAutoWidthBox->Check(sal_False); + m_pAutoWidthBox->Check(false); aDistEd1.SetPrcntValue(0); ColModify(0); // now set the width ratio to 2 : 1 or 1 : 2 respectively diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index fe19d66868f8..10dfa30f8f3b 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -921,7 +921,7 @@ void SwFrmPage::Reset( const SfxItemSet &rSet ) } if ( sDlgType == "PictureDialog" ) - m_pFixedRatioCB->Check( sal_False ); + m_pFixedRatioCB->Check( false ); else { if ( bNew ) @@ -2325,18 +2325,18 @@ void SwFrmPage::Init(const SfxItemSet& rSet, sal_Bool bReset) RangeModifyHdl(&m_aWidthED); // set reference values (for 100%) if (rSize.GetWidthPercent() == 0xff || rSize.GetHeightPercent() == 0xff) - m_pFixedRatioCB->Check(sal_True); + m_pFixedRatioCB->Check(true); if (rSize.GetWidthPercent() && rSize.GetWidthPercent() != 0xff && !m_pRelWidthCB->IsChecked()) { - m_pRelWidthCB->Check(sal_True); + m_pRelWidthCB->Check(true); RelSizeClickHdl(m_pRelWidthCB); m_aWidthED.SetPrcntValue(rSize.GetWidthPercent(), FUNIT_CUSTOM); } if (rSize.GetHeightPercent() && rSize.GetHeightPercent() != 0xff && !m_pRelHeightCB->IsChecked()) { - m_pRelHeightCB->Check(sal_True); + m_pRelHeightCB->Check(true); RelSizeClickHdl(m_pRelHeightCB); m_aHeightED.SetPrcntValue(rSize.GetHeightPercent(), FUNIT_CUSTOM); } @@ -2450,10 +2450,10 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) switch( eMirror ) { case RES_MIRROR_GRAPH_DONT: break; - case RES_MIRROR_GRAPH_VERT: m_pMirrorHorzBox->Check(sal_True); break; - case RES_MIRROR_GRAPH_HOR: m_pMirrorVertBox->Check(sal_True); break; - case RES_MIRROR_GRAPH_BOTH: m_pMirrorHorzBox->Check(sal_True); - m_pMirrorVertBox->Check(sal_True); + case RES_MIRROR_GRAPH_VERT: m_pMirrorHorzBox->Check(true); break; + case RES_MIRROR_GRAPH_HOR: m_pMirrorVertBox->Check(true); break; + case RES_MIRROR_GRAPH_BOTH: m_pMirrorHorzBox->Check(true); + m_pMirrorVertBox->Check(true); break; default: ; @@ -2469,7 +2469,7 @@ void SwGrfExtPage::ActivatePage(const SfxItemSet& rSet) { case 1: // mirror at left / even pages m_pLeftPagesRB->Check(); - m_pMirrorHorzBox->Check(sal_True); + m_pMirrorHorzBox->Check(true); break; case 2: // mirror on all pages m_pAllPagesRB->Check(); @@ -2591,8 +2591,8 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl) m_pConnectED->SetText( aNewGrfName ); //reset mirrors because maybe a Bitmap was swapped with //another type of graphic that cannot be mirrored. - m_pMirrorVertBox->Check(sal_False); - m_pMirrorHorzBox->Check(sal_False); + m_pMirrorVertBox->Check(false); + m_pMirrorHorzBox->Check(false); m_pAllPagesRB->Enable(false); m_pLeftPagesRB->Enable(false); m_pRightPagesRB->Enable(false); diff --git a/sw/source/ui/frmdlg/wrap.cxx b/sw/source/ui/frmdlg/wrap.cxx index ab59a3327d8f..2e6bec7f258b 100644 --- a/sw/source/ui/frmdlg/wrap.cxx +++ b/sw/source/ui/frmdlg/wrap.cxx @@ -518,7 +518,7 @@ void SwWrapTabPage::ActivatePage(const SfxItemSet& rSet) if(m_pNoWrapRB->IsChecked() && !m_pNoWrapRB->IsEnabled()) { if(m_pWrapThroughRB->IsEnabled()) - m_pWrapThroughRB->Check(sal_True); + m_pWrapThroughRB->Check(true); else if(m_pWrapLeftRB->IsEnabled()) m_pWrapLeftRB->Check(); else if(m_pWrapRightRB->IsEnabled()) diff --git a/sw/source/ui/inc/fldtdlg.hxx b/sw/source/ui/inc/fldtdlg.hxx index 485eaf66ef56..4835a4afb054 100644 --- a/sw/source/ui/inc/fldtdlg.hxx +++ b/sw/source/ui/inc/fldtdlg.hxx @@ -38,7 +38,7 @@ class SwFldDlg: public SfxTabDialog sal_uInt16 m_nFuncId; sal_uInt16 m_nDbId; - virtual sal_Bool Close(); + virtual bool Close(); virtual SfxItemSet* CreateInputItemSet( sal_uInt16 nId ); virtual void Activate(); virtual void PageCreated(sal_uInt16 nId, SfxTabPage& rPage); diff --git a/sw/source/ui/inc/srcedtw.hxx b/sw/source/ui/inc/srcedtw.hxx index 2db653685d7d..8f4012009def 100644 --- a/sw/source/ui/inc/srcedtw.hxx +++ b/sw/source/ui/inc/srcedtw.hxx @@ -122,9 +122,9 @@ public: void SetScrollBarRanges(); void InitScrollBars(); sal_uLong Read( SvStream& rInput) - {return pTextEngine->Read(rInput);} + {return pTextEngine->Read(rInput) ? 1 : 0;} sal_uLong Write( SvStream& rOutput) - {return pTextEngine->Write(rOutput);} + {return pTextEngine->Write(rOutput) ? 1 : 0;} ExtTextView* GetTextView() {return pTextView;} @@ -137,7 +137,7 @@ public: virtual void Invalidate( sal_uInt16 nFlags = 0 ); void ClearModifyFlag() - { pTextEngine->SetModified(sal_False); } + { pTextEngine->SetModified(false); } sal_Bool IsModified() const { return pTextEngine->IsModified();} void CreateScrollbars(); diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 6c8128c32851..f1d656e0847f 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -515,11 +515,11 @@ public: int CreateTab(); int KillTab(); - int StatVRuler() const { return ((Window*)m_pVRuler)->IsVisible(); } + bool StatVRuler() const { return ((Window*)m_pVRuler)->IsVisible(); } void ChangeVRulerMetric(FieldUnit eUnit); void GetVRulerMetric(FieldUnit& rToFill) const; - int StatTab() const { return ((Window*)m_pHRuler)->IsVisible(); } + bool StatTab() const { return ((Window*)m_pHRuler)->IsVisible(); } SvxRuler& GetHRuler() { return *m_pHRuler; } SvxRuler& GetVRuler() { return *m_pVRuler; } void InvalidateRulerPos(); diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 7a0173b86c23..7906d5382c48 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1370,7 +1370,7 @@ IMPL_LINK(SwTOXSelectTabPage, CheckBoxHdl, CheckBox*, pBox ) if(!m_pAddStylesCB->IsChecked() && !m_pFromHeadingsCB->IsChecked() && !m_pTOXMarksCB->IsChecked()) { //TODO: InfoBox? - pBox->Check(sal_True); + pBox->Check(true); } m_pAddStylesPB->Enable(m_pAddStylesCB->IsChecked()); } @@ -3080,7 +3080,7 @@ void SwTokenWindow::InsertAtSelection(const OUString& rText, const SwFormToken& Size aEditSize(GetOutputSizePixel()); aEditSize.Width() = pButton->GetTextWidth(rText) + 5; pButton->SetSizePixel(aEditSize); - pButton->Check(sal_True); + pButton->Check(true); pButton->Show(); SetActiveControl(pButton); @@ -3811,7 +3811,7 @@ SwEntryBrowseBox::SwEntryBrowseBox(Window* pParent, VclBuilderContainer* pBuilde sYes = pBuilder->get<Window>("yes")->GetText(); sNo = pBuilder->get<Window>("no")->GetText(); - aCellCheckBox.GetBox().EnableTriState(sal_False); + aCellCheckBox.GetBox().EnableTriState(false); xController = new ::svt::EditCellController(&aCellEdit); xCheckController = new ::svt::CheckBoxCellController(&aCellCheckBox); diff --git a/sw/source/ui/index/swuiidxmrk.cxx b/sw/source/ui/index/swuiidxmrk.cxx index d29df7439cf4..23e67afed334 100644 --- a/sw/source/ui/index/swuiidxmrk.cxx +++ b/sw/source/ui/index/swuiidxmrk.cxx @@ -1309,7 +1309,7 @@ IMPL_LINK(SwAuthorMarkPane, CreateEntryHdl, PushButton*, pButton) } if(bNewEntry && !m_pFromDocContentRB->IsChecked()) { - m_pFromDocContentRB->Check(sal_True); + m_pFromDocContentRB->Check(true); ChangeSourceHdl(m_pFromDocContentRB); } if(bCreate) diff --git a/sw/source/ui/lingu/olmenu.cxx b/sw/source/ui/lingu/olmenu.cxx index f3db53ed8fd8..c2591a4966ac 100644 --- a/sw/source/ui/lingu/olmenu.cxx +++ b/sw/source/ui/lingu/olmenu.cxx @@ -213,7 +213,7 @@ void SwSpellPopup::fillLangPopupMenu( if (aEntryTxt == aCurLang) { //make a check mark for the current language - pPopupMenu->CheckItem( nItemId, sal_True ); + pPopupMenu->CheckItem( nItemId, true ); } rLangTable[ nItemId ] = aEntryTxt; ++nItemId; @@ -222,7 +222,7 @@ void SwSpellPopup::fillLangPopupMenu( pPopupMenu->InsertItem( nLangItemIdStart + MN_NONE_OFFSET, OUString(SW_RES( STR_LANGSTATUS_NONE )), MIB_RADIOCHECK ); if ( aLanguageTable.GetString( LANGUAGE_NONE ) == aCurLang ) - pPopupMenu->CheckItem( nLangItemIdStart + MN_NONE_OFFSET, sal_True ); + pPopupMenu->CheckItem( nLangItemIdStart + MN_NONE_OFFSET, true ); pPopupMenu->InsertItem( nLangItemIdStart + MN_RESET_OFFSET, OUString(SW_RES( STR_RESET_TO_DEFAULT_LANGUAGE )), 0 ); pPopupMenu->InsertItem( nLangItemIdStart + MN_MORE_OFFSET, OUString(SW_RES( STR_LANGSTATUS_MORE )), 0 ); @@ -456,7 +456,7 @@ SwSpellPopup::SwSpellPopup( ////////////////////////////////////////////////////////////////////////////////// checkRedline(); - RemoveDisabledEntries( sal_True, sal_True ); + RemoveDisabledEntries( true, true ); } @@ -610,7 +610,7 @@ m_aInfo16( SW_RES(IMG_INFO_16) ) ////////////////////////////////////////////////////////////////////////////////// checkRedline(); - RemoveDisabledEntries( sal_True, sal_True ); + RemoveDisabledEntries( true, true ); } void SwSpellPopup::checkRedline() diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx index f60d28d2e8ff..c242903023d1 100644 --- a/sw/source/ui/misc/bookmark.cxx +++ b/sw/source/ui/misc/bookmark.cxx @@ -131,8 +131,8 @@ SwInsertBookmarkDlg::SwInsertBookmarkDlg( Window *pParent, SwWrtShell &rS, SfxRe get(m_pDeleteBtn, "delete"); m_pBookmarkBox->SetModifyHdl(LINK(this, SwInsertBookmarkDlg, ModifyHdl)); - m_pBookmarkBox->EnableMultiSelection(sal_True); - m_pBookmarkBox->EnableAutocomplete( sal_True, sal_True ); + m_pBookmarkBox->EnableMultiSelection(true); + m_pBookmarkBox->EnableAutocomplete( true, true ); m_pDeleteBtn->SetClickHdl(LINK(this, SwInsertBookmarkDlg, DeleteHdl)); diff --git a/sw/source/ui/misc/insfnote.cxx b/sw/source/ui/misc/insfnote.cxx index 20c8f58da0d8..308512077dab 100644 --- a/sw/source/ui/misc/insfnote.cxx +++ b/sw/source/ui/misc/insfnote.cxx @@ -96,7 +96,7 @@ IMPL_LINK_NOARG_INLINE_END(SwInsFootNoteDlg, NumberCharHdl) IMPL_LINK_NOARG_INLINE_START(SwInsFootNoteDlg, NumberEditHdl) { - m_pNumberCharBtn->Check( sal_True ); + m_pNumberCharBtn->Check( true ); m_pOkBtn->Enable( !m_pNumberCharEdit->GetText().isEmpty() ); return 0; @@ -112,7 +112,7 @@ IMPL_LINK_NOARG_INLINE_END(SwInsFootNoteDlg, NumberAutoBtnHdl) IMPL_LINK_NOARG(SwInsFootNoteDlg, NumberExtCharHdl) { - m_pNumberCharBtn->Check( sal_True ); + m_pNumberCharBtn->Check( true ); SfxItemSet aSet( rSh.GetAttrPool(), RES_CHRATR_FONT, RES_CHRATR_FONT ); rSh.GetCurAttr( aSet ); diff --git a/sw/source/ui/misc/num.cxx b/sw/source/ui/misc/num.cxx index 7c7a3b0ea6d3..b66e726d2546 100644 --- a/sw/source/ui/misc/num.cxx +++ b/sw/source/ui/misc/num.cxx @@ -378,17 +378,17 @@ void SwNumPositionTabPage::ActivatePage(const SfxItemSet& ) *pActNum = *pSaveNum; nActNumLvl = nTmpNumLvl; sal_uInt16 nMask = 1; - m_pLevelLB->SetUpdateMode(sal_False); + m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); m_pLevelLB->SelectEntryPos( MAXLEVEL, nActNumLvl == USHRT_MAX); if(nActNumLvl != USHRT_MAX) for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) - m_pLevelLB->SelectEntryPos( i, sal_True); + m_pLevelLB->SelectEntryPos( i, true); nMask <<= 1 ; } - m_pLevelLB->SetUpdateMode(sal_True); + m_pLevelLB->SetUpdateMode(true); InitPosAndSpaceMode(); ShowControlsDependingOnPosAndSpaceMode(); @@ -427,27 +427,27 @@ void SwNumPositionTabPage::Reset( const SfxItemSet& rSet ) if(pOutlineDlg) { pSaveNum = pOutlineDlg->GetNumRule(); - m_pLevelLB->EnableMultiSelection(sal_False); + m_pLevelLB->EnableMultiSelection(false); } else if(SFX_ITEM_SET == rSet.GetItemState(FN_PARAM_ACT_NUMBER, false, &pItem)) pSaveNum = ((SwUINumRuleItem*)pItem)->GetNumRule(); nActNumLvl = SwOutlineTabDialog::GetActNumLevel(); sal_uInt16 nMask = 1; - m_pLevelLB->SetUpdateMode(sal_False); + m_pLevelLB->SetUpdateMode(false); m_pLevelLB->SetNoSelection(); if(nActNumLvl == USHRT_MAX) { - m_pLevelLB->SelectEntryPos( MAXLEVEL, sal_True); + m_pLevelLB->SelectEntryPos( MAXLEVEL, true); } else for(sal_uInt16 i = 0; i < MAXLEVEL; i++) { if(nActNumLvl & nMask) - m_pLevelLB->SelectEntryPos( i, sal_True); + m_pLevelLB->SelectEntryPos( i, true); nMask <<= 1; } - m_pLevelLB->SetUpdateMode(sal_True); + m_pLevelLB->SetUpdateMode(true); if(!pActNum) pActNum = new SwNumRule(*pSaveNum); @@ -593,10 +593,10 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) (pBox->GetSelectEntryCount() == 1 || nSaveNumLvl != 0xffff)) { nActNumLvl = 0xFFFF; - pBox->SetUpdateMode(sal_False); + pBox->SetUpdateMode(false); for( sal_uInt16 i = 0; i < MAXLEVEL; i++ ) - pBox->SelectEntryPos( i, sal_False ); - pBox->SetUpdateMode(sal_True); + pBox->SelectEntryPos( i, false ); + pBox->SetUpdateMode(true); } else if(pBox->GetSelectEntryCount()) { @@ -607,7 +607,7 @@ IMPL_LINK( SwNumPositionTabPage, LevelHdl, ListBox *, pBox ) nActNumLvl |= nMask; nMask <<= 1; } - pBox->SelectEntryPos( MAXLEVEL, sal_False ); + pBox->SelectEntryPos( MAXLEVEL, false ); } else { diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx index 4c4a7e0526b9..3f35e7e5b4ad 100644 --- a/sw/source/ui/misc/outline.cxx +++ b/sw/source/ui/misc/outline.cxx @@ -853,7 +853,7 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev, Font aFont(*rFmt.GetBulletFont()); aFont.SetSize(rSize); - aFont.SetTransparent(sal_True); + aFont.SetTransparent(true); pVDev->SetFont( aFont ); OUString aText(rFmt.GetBulletChar()); pVDev->DrawText( Point(nXStart, nYStart), aText ); diff --git a/sw/source/ui/misc/pgfnote.cxx b/sw/source/ui/misc/pgfnote.cxx index 3b353553f9c6..15a0e8e39183 100644 --- a/sw/source/ui/misc/pgfnote.cxx +++ b/sw/source/ui/misc/pgfnote.cxx @@ -167,11 +167,11 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) if(lHeight) { m_pMaxHeightEdit->SetValue(m_pMaxHeightEdit->Normalize(lHeight),FUNIT_TWIP); - m_pMaxHeightBtn->Check(sal_True); + m_pMaxHeightBtn->Check(true); } else { - m_pMaxHeightPageBtn->Check(sal_True); + m_pMaxHeightPageBtn->Check(true); m_pMaxHeightEdit->Enable(false); } m_pMaxHeightPageBtn->SetClickHdl(LINK(this,SwFootNotePage,HeightPage)); @@ -222,14 +222,14 @@ void SwFootNotePage::Reset(const SfxItemSet &rSet) if ( pColorList.is() ) { - m_pLineColorBox->SetUpdateMode( sal_False ); + m_pLineColorBox->SetUpdateMode( false ); for ( long i = 0; i < pColorList->Count(); ++i ) { XColorEntry* pEntry = pColorList->GetColor(i); m_pLineColorBox->InsertEntry( pEntry->GetColor(), pEntry->GetName() ); } - m_pLineColorBox->SetUpdateMode( sal_True ); + m_pLineColorBox->SetUpdateMode( true ); } // select color in the list or add it as a user color diff --git a/sw/source/ui/misc/pggrid.cxx b/sw/source/ui/misc/pggrid.cxx index d498e0887182..3b252f977497 100644 --- a/sw/source/ui/misc/pggrid.cxx +++ b/sw/source/ui/misc/pggrid.cxx @@ -116,7 +116,7 @@ SwTextGridPage::SwTextGridPage(Window *pParent, const SfxItemSet &rSet) : OUString sName = pEntry->GetName(); m_pColorLB->InsertEntry( aColor, sName ); } - m_pColorLB->SetUpdateMode( sal_True ); + m_pColorLB->SetUpdateMode( true ); //Get the default paper mode SwView *pView = ::GetActiveView(); if( pView ) diff --git a/sw/source/ui/misc/redlndlg.cxx b/sw/source/ui/misc/redlndlg.cxx index c2638659f8c4..9feb5670c7ee 100644 --- a/sw/source/ui/misc/redlndlg.cxx +++ b/sw/source/ui/misc/redlndlg.cxx @@ -1033,7 +1033,7 @@ IMPL_LINK_NOARG(SwRedlineAcceptDlg, CommandHdl) if (pSubMenu) { for (sal_uInt16 i = MN_SORT_ACTION; i < MN_SORT_ACTION + 5; i++) - pSubMenu->CheckItem(i, sal_False); + pSubMenu->CheckItem(i, false); pSubMenu->CheckItem(nColumn + MN_SORT_ACTION); } diff --git a/sw/source/ui/misc/srtdlg.cxx b/sw/source/ui/misc/srtdlg.cxx index 2acd12d39715..3eb2e52cb831 100644 --- a/sw/source/ui/misc/srtdlg.cxx +++ b/sw/source/ui/misc/srtdlg.cxx @@ -174,7 +174,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) else { m_pColumnRB->Enable(false); - m_pRowRB->Check(sal_True); + m_pRowRB->Check(true); m_pColLbl->SetText(aColTxt); } @@ -223,7 +223,7 @@ SwSortDlg::SwSortDlg(Window* pParent, SwWrtShell &rShell) if(!m_pDelimTabRB->IsChecked()) { m_pDelimEdt->SetText(OUString(cDeli)); - m_pDelimFreeRB->Check(sal_True); + m_pDelimFreeRB->Check(true); DelimHdl(m_pDelimFreeRB); } else @@ -414,7 +414,7 @@ IMPL_LINK( SwSortDlg, CheckHdl, CheckBox *, pCheck ) else if(!m_pKeyCB1->IsChecked() && !m_pKeyCB2->IsChecked() && !m_pKeyCB3->IsChecked()) - pCheck->Check(sal_True); + pCheck->Check(true); return 0; } diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx index 54b34de75fe3..184cf6d5f316 100644 --- a/sw/source/ui/ribbar/workctrl.cxx +++ b/sw/source/ui/ribbar/workctrl.cxx @@ -108,7 +108,7 @@ void SwTbxInsertCtrl::StateChanged( sal_uInt16 /*nSID*/, ToolBox& rBox = GetToolBox(); Image aImage = GetImage( m_xFrame, aSlotURL, hasBigImages() ); rBox.SetItemImage(GetId(), aImage); - rBox.SetItemImageMirrorMode( GetId(), sal_False ); + rBox.SetItemImageMirrorMode( GetId(), false ); rBox.SetItemImageAngle( GetId(), pItem->GetRotation() ); rBox.SetItemImageMirrorMode( GetId(), pItem->IsMirrored() ); } @@ -216,13 +216,13 @@ SfxPopupWindow* SwTbxAutoTextCtrl::CreatePopupWindow() } ToolBox* pToolBox = &GetToolBox(); sal_uInt16 nId = GetId(); - pToolBox->SetItemDown( nId, sal_True ); + pToolBox->SetItemDown( nId, true ); pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ), (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ? POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT ); - pToolBox->SetItemDown( nId, sal_False ); + pToolBox->SetItemDown( nId, false ); } GetToolBox().EndSelection(); DelPopup(); @@ -322,13 +322,13 @@ SfxPopupWindow* SwTbxFieldCtrl::CreatePopupWindow() } ToolBox* pToolBox = &GetToolBox(); sal_uInt16 nId = GetId(); - pToolBox->SetItemDown( nId, sal_True ); + pToolBox->SetItemDown( nId, true ); pPopup->Execute( pToolBox, pToolBox->GetItemRect( nId ), (pToolBox->GetAlign() == WINDOWALIGN_TOP || pToolBox->GetAlign() == WINDOWALIGN_BOTTOM) ? POPUPMENU_EXECUTE_DOWN : POPUPMENU_EXECUTE_RIGHT ); - pToolBox->SetItemDown( nId, sal_False ); + pToolBox->SetItemDown( nId, false ); } GetToolBox().EndSelection(); DelPopup(); @@ -504,7 +504,7 @@ SwScrollNaviPopup::SwScrollNaviPopup(sal_uInt16 nId, const Reference< XFrame >& aToolBox.SetPosSizePixel( Point(), aSz ); sal_uInt16 nItemId = SwView::GetMoveType(); aInfoField.SetText(aToolBox.GetItemText(nItemId)); - aToolBox.CheckItem( nItemId, sal_True ); + aToolBox.CheckItem( nItemId, true ); Size aFTSize(aInfoField.GetSizePixel()); Size aSepSize(aSeparator.GetSizePixel()); aSepSize.Width() = aSz.Width(); @@ -640,7 +640,7 @@ SwZoomBox_Impl::SwZoomBox_Impl( bRelease(true), m_xDispatchProvider( rDispatchProvider ) { - EnableAutocomplete( sal_False ); + EnableAutocomplete( false ); sal_uInt16 aZoomValues[] = { 25, 50, 75, 100, 150, 200 }; for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++) diff --git a/sw/source/ui/sidebar/WrapPropertyPanel.cxx b/sw/source/ui/sidebar/WrapPropertyPanel.cxx index 3f303f8dfee8..490a748300ee 100644 --- a/sw/source/ui/sidebar/WrapPropertyPanel.cxx +++ b/sw/source/ui/sidebar/WrapPropertyPanel.cxx @@ -234,12 +234,12 @@ void WrapPropertyPanel::NotifyItemUpdate( mpRBWrapThrough->Enable(false); mpRBIdealWrap->Enable(false); - mpRBNoWrap->Check( sal_False ); - mpRBWrapLeft->Check( sal_False ); - mpRBWrapRight->Check( sal_False ); - mpRBWrapParallel->Check( sal_False ); - mpRBWrapThrough->Check( sal_False ); - mpRBIdealWrap->Check( sal_False ); + mpRBNoWrap->Check( false ); + mpRBWrapLeft->Check( false ); + mpRBWrapRight->Check( false ); + mpRBWrapParallel->Check( false ); + mpRBWrapThrough->Check( false ); + mpRBIdealWrap->Check( false ); } } diff --git a/sw/source/ui/table/convert.cxx b/sw/source/ui/table/convert.cxx index 96cf83db5867..4fc5ecfcb34c 100644 --- a/sw/source/ui/table/convert.cxx +++ b/sw/source/ui/table/convert.cxx @@ -203,7 +203,7 @@ IMPL_LINK( SwConvertTableDlg, BtnHdl, Button*, pButton ) { if( mpKeepColumn->IsEnabled() ) mpKeepColumn->SaveValue(); - mpKeepColumn->Check( sal_True ); + mpKeepColumn->Check( true ); } mpKeepColumn->Enable( mpTabBtn->IsChecked() ); mpOtherEd->Enable( mpOtherBtn->IsChecked() ); diff --git a/sw/source/ui/table/tabledlg.cxx b/sw/source/ui/table/tabledlg.cxx index c464cd93435c..0ab390563d1e 100644 --- a/sw/source/ui/table/tabledlg.cxx +++ b/sw/source/ui/table/tabledlg.cxx @@ -250,7 +250,7 @@ void SwFormatTablePage::RightModify() m_pRelWidthCB->Enable(bEnable); if ( !bEnable ) { - m_pRelWidthCB->Check(sal_False); + m_pRelWidthCB->Check(false); RelWidthClickHdl(m_pRelWidthCB); } bEnable = m_pRelWidthCB->IsChecked(); @@ -462,7 +462,7 @@ void SwFormatTablePage::Reset( const SfxItemSet& ) if(pTblData->GetWidthPercent()) { - m_pRelWidthCB->Check(sal_True); + m_pRelWidthCB->Check(true); RelWidthClickHdl(m_pRelWidthCB); m_aWidthMF.SetPrcntValue(pTblData->GetWidthPercent(), FUNIT_CUSTOM); @@ -1110,13 +1110,13 @@ void SwTableColumnPage::ActivatePage( const SfxItemSet& ) bModifyTbl = sal_False; if(bPercentMode) { - m_pModifyTableCB->Check(sal_False); - m_pProportionalCB->Check(sal_False); + m_pModifyTableCB->Check(false); + m_pProportionalCB->Check(false); } else if( !bModifyTbl ) { - m_pProportionalCB->Check(sal_False); - m_pModifyTableCB->Check(sal_False); + m_pProportionalCB->Check(false); + m_pModifyTableCB->Check(false); } m_pSpaceFT->Enable(!bPercentMode); m_pSpaceED->Enable(!bPercentMode); @@ -1539,15 +1539,15 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) m_pPageCollCB->Enable(); m_pPgBrkCB->Check(); - m_pPgBrkCB->Check( sal_True ); - m_pColBrkRB->Check( sal_False ); - m_pPgBrkBeforeRB->Check( sal_True ); - m_pPgBrkAfterRB->Check( sal_False ); + m_pPgBrkCB->Check( true ); + m_pColBrkRB->Check( false ); + m_pPgBrkBeforeRB->Check( true ); + m_pPgBrkAfterRB->Check( false ); } else { m_pPageCollLB->SetNoSelection(); - m_pPageCollCB->Check(sal_False); + m_pPageCollCB->Check(false); } } @@ -1567,28 +1567,28 @@ void SwTextFlowPage::Reset( const SfxItemSet& rSet ) switch ( eBreak ) { case SVX_BREAK_PAGE_BEFORE: - m_pPgBrkRB->Check( sal_True ); - m_pColBrkRB->Check( sal_False ); - m_pPgBrkBeforeRB->Check( sal_True ); - m_pPgBrkAfterRB->Check( sal_False ); + m_pPgBrkRB->Check( true ); + m_pColBrkRB->Check( false ); + m_pPgBrkBeforeRB->Check( true ); + m_pPgBrkAfterRB->Check( false ); break; case SVX_BREAK_PAGE_AFTER: - m_pPgBrkRB->Check( sal_True ); - m_pColBrkRB->Check( sal_False ); - m_pPgBrkBeforeRB->Check( sal_False ); - m_pPgBrkAfterRB->Check( sal_True ); + m_pPgBrkRB->Check( true ); + m_pColBrkRB->Check( false ); + m_pPgBrkBeforeRB->Check( false ); + m_pPgBrkAfterRB->Check( true ); break; case SVX_BREAK_COLUMN_BEFORE: - m_pPgBrkRB->Check( sal_False ); - m_pColBrkRB->Check( sal_True ); - m_pPgBrkBeforeRB->Check( sal_True ); - m_pPgBrkAfterRB->Check( sal_False ); + m_pPgBrkRB->Check( false ); + m_pColBrkRB->Check( true ); + m_pPgBrkBeforeRB->Check( true ); + m_pPgBrkAfterRB->Check( false ); break; case SVX_BREAK_COLUMN_AFTER: - m_pPgBrkRB->Check( sal_False ); - m_pColBrkRB->Check( sal_True ); - m_pPgBrkBeforeRB->Check( sal_False ); - m_pPgBrkAfterRB->Check( sal_True ); + m_pPgBrkRB->Check( false ); + m_pColBrkRB->Check( true ); + m_pPgBrkBeforeRB->Check( false ); + m_pPgBrkAfterRB->Check( true ); break; default:; //prevent warning } @@ -1691,7 +1691,7 @@ IMPL_LINK_NOARG(SwTextFlowPage, PageBreakHdl_Impl) } else { - m_pPageCollCB->Check( sal_False ); + m_pPageCollCB->Check( false ); m_pPageCollCB->Enable(false); m_pPageCollLB->Enable(false); m_pPageNoFT->Enable(false); @@ -1746,7 +1746,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakPosHdl_Impl, RadioButton*, pBtn ) } else if (pBtn == m_pPgBrkAfterRB) { - m_pPageCollCB->Check( sal_False ); + m_pPageCollCB->Check( false ); m_pPageCollCB->Enable(false); m_pPageCollLB->Enable(false); m_pPageNoFT->Enable(false); @@ -1760,7 +1760,7 @@ IMPL_LINK( SwTextFlowPage, PageBreakTypeHdl_Impl, RadioButton*, pBtn ) { if ( pBtn == m_pColBrkRB || m_pPgBrkAfterRB->IsChecked() ) { - m_pPageCollCB->Check(sal_False); + m_pPageCollCB->Check(false); m_pPageCollCB->Enable(false); m_pPageCollLB->Enable(false); m_pPageNoFT->Enable(false); @@ -1779,7 +1779,7 @@ IMPL_LINK( SwTextFlowPage, SplitHdl_Impl, CheckBox*, pBox ) IMPL_LINK( SwTextFlowPage, SplitRowHdl_Impl, TriStateBox*, pBox ) { - pBox->EnableTriState(sal_False); + pBox->EnableTriState(false); return 0; } diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 92ea069d1c3b..680cc726d5a5 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -581,7 +581,7 @@ void AutoFmtPreview::MakeFonts( sal_uInt8 nIndex, Font& rFont, Font& rCJKFont, F SETONALLFONTS( SetShadow, rBoxFmt.GetShadowed().GetValue() ); SETONALLFONTS( SetColor, rBoxFmt.GetColor().GetValue() ); SETONALLFONTS( SetSize, aFontSize ); - SETONALLFONTS( SetTransparent, sal_True ); + SETONALLFONTS( SetTransparent, true ); } sal_uInt8 AutoFmtPreview::GetFormatIndex( size_t nCol, size_t nRow ) const @@ -869,7 +869,7 @@ void AutoFmtPreview::DoPaint( const Rectangle& /*rRect*/ ) Font aFont; aFont = aVD.GetFont(); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); aVD.SetFont ( aFont ); aVD.SetLineColor (); diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index c520e6570f85..e2dd9dbfa500 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -1245,7 +1245,7 @@ int SwPagePreview::_CreateScrollbar( sal_Bool bHori ) *ppScrollbar = new SwScrollbar( pMDI, bHori ); ScrollDocSzChg(); - (*ppScrollbar)->EnableDrag( sal_True ); + (*ppScrollbar)->EnableDrag( true ); (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwPagePreview, EndScrollHdl )); (*ppScrollbar)->SetScrollHdl( LINK( this, SwPagePreview, ScrollHdl )); @@ -1814,7 +1814,7 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible > SolarMutexGuard aGuard; // this should have happened already!!! OSL_ENSURE( GetViewShell() != NULL, "We need a view shell" ); - ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible( sal_False ); + ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAcc = GetAccessible( false ); if (xAcc.is()) { return xAcc; @@ -1824,7 +1824,7 @@ uno::Reference< ::com::sun::star::accessibility::XAccessible > ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > xAccPreview = mpViewShell->CreateAccessiblePreview(); SetAccessible(xAccPreview); } - return GetAccessible( sal_False ); + return GetAccessible( false ); } // MT: Removed Windows::SwitchView() introduced with IA2 CWS. diff --git a/sw/source/ui/uiview/scroll.cxx b/sw/source/ui/uiview/scroll.cxx index 9ec9a41e9ec9..176ba6f18965 100644 --- a/sw/source/ui/uiview/scroll.cxx +++ b/sw/source/ui/uiview/scroll.cxx @@ -35,7 +35,7 @@ SwScrollbar::SwScrollbar( Window *pWin, sal_Bool bHoriz ) : { // SSA: --- RTL --- no mirroring for horizontal scrollbars if( bHoriz ) - EnableRTL( sal_False ); + EnableRTL( false ); } diff --git a/sw/source/ui/uiview/srcview.cxx b/sw/source/ui/uiview/srcview.cxx index 1d5ac4c0d4a0..a2b0660e8780 100644 --- a/sw/source/ui/uiview/srcview.cxx +++ b/sw/source/ui/uiview/srcview.cxx @@ -594,7 +594,7 @@ sal_uInt16 SwSrcView::StartSearchAndReplace(const SvxSearchItem& rSearchItem, { case SVX_SEARCHCMD_FIND: case SVX_SEARCHCMD_FIND_ALL: - nFound = pTextView->Search( aSearchOpt, bForward ); + nFound = pTextView->Search( aSearchOpt, bForward ) ? 1 : 0; break; case SVX_SEARCHCMD_REPLACE_ALL: bAll = sal_True; @@ -821,9 +821,9 @@ void SwSrcView::Load(SwDocShell* pDocShell) pStream->SetStreamCharSet( eDestEnc ); pStream->Seek(0); TextEngine* pTextEngine = aEditWin.GetTextEngine(); - pTextEngine->EnableUndo(sal_False); + pTextEngine->EnableUndo(false); aEditWin.Read(*pStream); - pTextEngine->EnableUndo(sal_True); + pTextEngine->EnableUndo(true); } else { diff --git a/sw/source/ui/uiview/view0.cxx b/sw/source/ui/uiview/view0.cxx index 9682f37b85a3..aa10ea327808 100644 --- a/sw/source/ui/uiview/view0.cxx +++ b/sw/source/ui/uiview/view0.cxx @@ -299,7 +299,7 @@ void SwView::StateViewOptions(SfxItemSet &rSet) case FN_VIEW_SMOOTH_SCROLL: aBool.SetValue( pOpt->IsSmoothScroll()); break; case FN_VLINEAL: - aBool.SetValue( 0 != StatVRuler() ); break; + aBool.SetValue( StatVRuler() ); break; case FN_HSCROLLBAR: if( pOpt->getBrowseMode() ) { diff --git a/sw/source/ui/uiview/viewmdi.cxx b/sw/source/ui/uiview/viewmdi.cxx index c463de2dad22..57c62941973f 100644 --- a/sw/source/ui/uiview/viewmdi.cxx +++ b/sw/source/ui/uiview/viewmdi.cxx @@ -305,7 +305,7 @@ int SwView::_CreateScrollbar( sal_Bool bHori ) (*ppScrollbar)->SetScrollHdl( LINK( this, SwView, ScrollHdl )); (*ppScrollbar)->SetEndScrollHdl( LINK( this, SwView, EndScrollHdl )); - (*ppScrollbar)->EnableDrag( sal_True ); + (*ppScrollbar)->EnableDrag( true ); if(GetWindow()) InvalidateBorder(); diff --git a/sw/source/ui/uno/unotxdoc.cxx b/sw/source/ui/uno/unotxdoc.cxx index f6af0861fc19..cd108feaeb16 100644 --- a/sw/source/ui/uno/unotxdoc.cxx +++ b/sw/source/ui/uno/unotxdoc.cxx @@ -2946,7 +2946,7 @@ void SAL_CALL SwXTextDocument::render( m_pPrintUIOptions = lcl_GetPrintUIOptions( pDocShell, pView ); m_pPrintUIOptions->processProperties( rxOptions ); const bool bPrintProspect = m_pPrintUIOptions->getBoolValue( "PrintProspect", false ); - const bool bLastPage = m_pPrintUIOptions->getBoolValue( "IsLastPage", sal_False ); + const bool bLastPage = m_pPrintUIOptions->getBoolValue( "IsLastPage", false ); SwDoc *pDoc = GetRenderDoc( pView, rSelection, bIsPDFExport ); OSL_ENSURE( pDoc && pView, "doc or view shell missing!" ); @@ -2994,7 +2994,7 @@ void SAL_CALL SwXTextDocument::render( if(pVwSh && pOut && m_pRenderData->HasSwPrtOptions()) { const OUString aPageRange = m_pPrintUIOptions->getStringValue( "PageRange", OUString() ); - const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage", sal_False ); + const bool bFirstPage = m_pPrintUIOptions->getBoolValue( "IsFirstPage", false ); bool bIsSkipEmptyPages = !m_pPrintUIOptions->IsPrintEmptyPages( bIsPDFExport ); OSL_ENSURE(( pView->IsA(aSwViewTypeId) && m_pRenderData->IsViewOptionAdjust()) diff --git a/sw/source/ui/utlui/navipi.cxx b/sw/source/ui/utlui/navipi.cxx index 7ab5f78a3cb2..a7f38a4c0c16 100644 --- a/sw/source/ui/utlui/navipi.cxx +++ b/sw/source/ui/utlui/navipi.cxx @@ -380,11 +380,11 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) } pMenu->CheckItem( nRegionMode + 1 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); - pBox->SetItemDown( nCurrItemId, sal_True ); + pBox->SetItemDown( nCurrItemId, true ); pMenu->Execute( pBox, pBox->GetItemRect(FN_DROP_REGION), POPUPMENU_EXECUTE_DOWN ); - pBox->SetItemDown( nCurrItemId, sal_False ); + pBox->SetItemDown( nCurrItemId, false ); pBox->EndSelection(); delete pMenu; pBox->Invalidate(); @@ -400,11 +400,11 @@ IMPL_LINK( SwNavigationPI, ToolBoxDropdownClickHdl, ToolBox*, pBox ) } pMenu->CheckItem( aContentTree.GetOutlineLevel() + 100 ); pMenu->SetSelectHdl(LINK(this, SwNavigationPI, MenuSelectHdl)); - pBox->SetItemDown( nCurrItemId, sal_True ); + pBox->SetItemDown( nCurrItemId, true ); pMenu->Execute( pBox, pBox->GetItemRect(FN_OUTLINE_LEVEL), POPUPMENU_EXECUTE_DOWN ); - pBox->SetItemDown( nCurrItemId, sal_False ); + pBox->SetItemDown( nCurrItemId, false ); delete pMenu; pBox->EndSelection(); pBox->Invalidate(); @@ -595,7 +595,7 @@ void SwNavigationPI::_ZoomIn() if(pFirst) aContentTree.Select(pFirst, sal_True); // Enable toolbox pConfig->SetSmall( sal_True ); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_False); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, false); } } } @@ -780,7 +780,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, SV_DRAGDROP_ENABLE_TOP ); aContentTree.EnableAsyncDrag(sal_True); aContentTree.ShowTree(); - aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, sal_True); + aContentToolBox.CheckItem(FN_SHOW_CONTENT_BOX, true); // TreeListBox for global document aGlobalTree.setPosSizePixel( 0, nListboxYPos, 0, 0, WINDOW_POSSIZE_Y ); @@ -801,7 +801,7 @@ SwNavigationPI::SwNavigationPI( SfxBindings* _pBindings, aContentToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); aGlobalToolBox.SetClickHdl( LINK(this, SwNavigationPI, ToolBoxClickHdl) ); aGlobalToolBox.SetDropdownClickHdl( LINK(this, SwNavigationPI, ToolBoxDropdownClickHdl) ); - aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, sal_True); + aGlobalToolBox.CheckItem(FN_GLOBAL_SWITCH, true); Font aFont(GetFont()); aFont.SetWeight(WEIGHT_NORMAL); @@ -1052,7 +1052,7 @@ IMPL_LINK( SwNavigationPI, MenuSelectHdl, Menu *, pMenu ) void SwNavigationPI::UpdateListBox() { - aDocListBox.SetUpdateMode(sal_False); + aDocListBox.SetUpdateMode(false); aDocListBox.Clear(); SwView *pActView = GetCreateView(); bool bDisable = pActView == 0; @@ -1117,7 +1117,7 @@ void SwNavigationPI::UpdateListBox() aDocListBox.SelectEntryPos(nConstPos); aDocListBox.Enable( !bDisable ); - aDocListBox.SetUpdateMode(sal_True); + aDocListBox.SetUpdateMode(true); } IMPL_LINK(SwNavigationPI, DoneLink, SfxPoolItem *, pItem) @@ -1248,7 +1248,7 @@ sal_Bool SwNavigationPI::ToggleTree() sal_Bool bGlobalDoc = IsGlobalDoc(); if(!IsGlobalMode() && bGlobalDoc) { - SetUpdateMode(sal_False); + SetUpdateMode(false); if(_IsZoomedIn()) _ZoomOut(); aGlobalTree.ShowTree(); @@ -1257,7 +1257,7 @@ sal_Bool SwNavigationPI::ToggleTree() aContentToolBox.Hide(); aDocListBox.Hide(); SetGlobalMode(sal_True); - SetUpdateMode(sal_True); + SetUpdateMode(true); } else { @@ -1337,7 +1337,7 @@ SwNavigationChild::SwNavigationChild( Window* pParent, if( nRootType < CONTENT_TYPE_MAX ) { pNavi->aContentTree.SetRootType(nRootType); - pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, sal_True); + pNavi->aContentToolBox.CheckItem(FN_SHOW_ROOT, true); } pNavi->aContentTree.SetOutlineLevel( static_cast< sal_uInt8 >( pNaviConfig->GetOutlineLevel() ) ); pNavi->SetRegionDropMode( static_cast< sal_uInt16 >( pNaviConfig->GetRegionMode() ) ); diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx index 4fbc9df25349..c20492a85652 100644 --- a/toolkit/source/awt/vclxaccessiblecomponent.cxx +++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx @@ -213,9 +213,9 @@ void VCLXAccessibleComponent::ProcessWindowEvent( const VclWindowEvent& rVclWind { Window* pWindow = (Window*) rVclWindowEvent.GetData(); DBG_ASSERT( pWindow, "VCLEVENT_WINDOW_CHILDDESTROYED - Window=?" ); - if ( pWindow->GetAccessible( sal_False ).is() ) + if ( pWindow->GetAccessible( false ).is() ) { - aOldValue <<= pWindow->GetAccessible( sal_False ); + aOldValue <<= pWindow->GetAccessible( false ); NotifyAccessibleEvent( accessibility::AccessibleEventId::CHILD, aOldValue, aNewValue ); } } diff --git a/toolkit/source/awt/vclxcontainer.cxx b/toolkit/source/awt/vclxcontainer.cxx index d82381b6acaa..fcc4e887549e 100644 --- a/toolkit/source/awt/vclxcontainer.cxx +++ b/toolkit/source/awt/vclxcontainer.cxx @@ -157,9 +157,9 @@ void VCLXContainer::setTabOrder( const ::com::sun::star::uno::Sequence< ::com::s if ( bGroupControl ) { if ( n == 0 ) - pWin->SetDialogControlStart( sal_True ); + pWin->SetDialogControlStart( true ); else - pWin->SetDialogControlStart( sal_False ); + pWin->SetDialogControlStart( false ); } pPrevWin = pWin; diff --git a/toolkit/source/awt/vclxtoolkit.cxx b/toolkit/source/awt/vclxtoolkit.cxx index e2cfd8cadfca..8c5be7dc6032 100644 --- a/toolkit/source/awt/vclxtoolkit.cxx +++ b/toolkit/source/awt/vclxtoolkit.cxx @@ -831,7 +831,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_CURRENCYFIELD: pNewWindow = new CurrencyField( pParent, nWinBits ); - static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( sal_True ); + static_cast<CurrencyField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXNumericField; ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(CurrencyField*)pNewWindow ); break; @@ -840,7 +840,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_DATEFIELD: pNewWindow = new DateField( pParent, nWinBits ); - static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( sal_True ); + static_cast<DateField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXDateField; ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(DateField*)pNewWindow ); break; @@ -889,7 +889,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, *ppNewComp = new VCLXFrame; // Frame control needs to receive // Mouse events - pGroupBox->SetMouseTransparent( sal_False ); + pGroupBox->SetMouseTransparent( false ); } } break; @@ -965,7 +965,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_NUMERICFIELD: pNewWindow = new NumericField( pParent, nWinBits ); - static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( sal_True ); + static_cast<NumericField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXNumericField; ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(NumericField*)pNewWindow ); break; @@ -1002,7 +1002,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, // is not really valid: the controls are grouped after they have been created, but we're still in // the creation process, so the RadioButton::Check relies on invalid grouping information. // 07.08.2001 - #87254# - frank.schoenheit@sun.com - static_cast<RadioButton*>(pNewWindow)->EnableRadioCheck( sal_False ); + static_cast<RadioButton*>(pNewWindow)->EnableRadioCheck( false ); break; case WINDOW_SCROLLBAR: pNewWindow = new ScrollBar( pParent, nWinBits ); @@ -1050,7 +1050,7 @@ Window* VCLXToolkit::ImplCreateWindow( VCLXWindow** ppNewComp, break; case WINDOW_TIMEFIELD: pNewWindow = new TimeField( pParent, nWinBits ); - static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( sal_True ); + static_cast<TimeField*>(pNewWindow)->EnableEmptyFieldValue( true ); *ppNewComp = new VCLXTimeField; ((VCLXFormattedSpinField*)*ppNewComp)->SetFormatter( (FormatterBase*)(TimeField*)pNewWindow ); break; @@ -1236,7 +1236,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( #else "svt", #endif - sal_True ); + true ); hSvToolsLib = osl_loadModuleRelative( &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); if ( hSvToolsLib ) @@ -1261,7 +1261,7 @@ css::uno::Reference< css::awt::XWindowPeer > VCLXToolkit::ImplCreateWindow( if ( pNewWindow ) { - pNewWindow->SetCreatedWithToolkit( sal_True ); + pNewWindow->SetCreatedWithToolkit( true ); //pNewWindow->SetPosPixel( Point() ); // do not force (0,0) position, keep default pos instead if ( rDescriptor.WindowAttributes & ::com::sun::star::awt::WindowAttribute::MINSIZE ) diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx index fa29d4fb82ae..a8b8981bed99 100644 --- a/toolkit/source/awt/vclxwindow.cxx +++ b/toolkit/source/awt/vclxwindow.cxx @@ -1065,7 +1065,7 @@ void VCLXWindow::addWindowListener( const ::com::sun::star::uno::Reference< ::co // #100119# Get all resize events, even if height or width 0, or invisible if ( GetWindow() ) - GetWindow()->EnableAllResize( sal_True ); + GetWindow()->EnableAllResize( true ); } void VCLXWindow::removeWindowListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowListener >& rxListener ) throw(::com::sun::star::uno::RuntimeException) @@ -1627,7 +1627,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st // support transparency only for special controls pWindow->SetBackground(); pWindow->SetControlBackground(); - pWindow->SetPaintTransparent( sal_True ); + pWindow->SetPaintTransparent( true ); break; } @@ -1660,7 +1660,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st case WINDOW_RADIOBUTTON: case WINDOW_GROUPBOX: case WINDOW_FIXEDLINE: - pWindow->SetPaintTransparent( sal_False ); + pWindow->SetPaintTransparent( false ); default: ; } pWindow->Invalidate(); // Invalidate if control does not respond to it @@ -1862,7 +1862,7 @@ void VCLXWindow::setProperty( const OUString& PropertyName, const ::com::sun::st break; case BASEPROPERTY_AUTOMNEMONICS: { - sal_Bool bAutoMnemonics = false; + bool bAutoMnemonics = false; Value >>= bAutoMnemonics; AllSettings aSettings = pWindow->GetSettings(); StyleSettings aStyleSettings = aSettings.GetStyleSettings(); @@ -2314,9 +2314,9 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: pWindow->Show(); pWindow->Update(); - pWindow->SetParentUpdateMode( sal_False ); + pWindow->SetParentUpdateMode( false ); pWindow->Hide(); - pWindow->SetParentUpdateMode( sal_True ); + pWindow->SetParentUpdateMode( true ); pWindow->SetPosPixel( aOldPos ); if ( bWasVisible ) @@ -2341,10 +2341,10 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(::com::sun::star::uno: { sal_Bool bOldNW =pWindow->IsNativeWidgetEnabled(); if( bOldNW ) - pWindow->EnableNativeWidget(sal_False); + pWindow->EnableNativeWidget(false); pWindow->PaintToDevice( pDev, aP, aSz ); if( bOldNW ) - pWindow->EnableNativeWidget(sal_True); + pWindow->EnableNativeWidget(true); } } } diff --git a/toolkit/source/awt/vclxwindows.cxx b/toolkit/source/awt/vclxwindows.cxx index 9df857685c46..623c5eb0cecf 100644 --- a/toolkit/source/awt/vclxwindows.cxx +++ b/toolkit/source/awt/vclxwindows.cxx @@ -1301,11 +1301,11 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent aEvent.ActionCommand = maActionCommand; maActionListeners.actionPerformed( aEvent ); } - ImplClickedOrToggled( sal_False ); + ImplClickedOrToggled( false ); break; case VCLEVENT_RADIOBUTTON_TOGGLE: - ImplClickedOrToggled( sal_True ); + ImplClickedOrToggled( true ); break; default: @@ -1314,7 +1314,7 @@ void VCLXRadioButton::ProcessWindowEvent( const VclWindowEvent& rVclWindowEvent } } -void VCLXRadioButton::ImplClickedOrToggled( sal_Bool bToggled ) +void VCLXRadioButton::ImplClickedOrToggled( bool bToggled ) { // In the formulars, RadioChecked is not enabled, call itemStateChanged only for click // In the dialog editor, RadioChecked is enabled, call itemStateChanged only for bToggled @@ -1324,7 +1324,7 @@ void VCLXRadioButton::ImplClickedOrToggled( sal_Bool bToggled ) ::com::sun::star::awt::ItemEvent aEvent; aEvent.Source = (::cppu::OWeakObject*)this; aEvent.Highlighted = sal_False; - aEvent.Selected = pRadioButton->IsChecked(); + aEvent.Selected = pRadioButton->IsChecked() ? 1 : 0; maItemListeners.itemStateChanged( aEvent ); } } @@ -1678,7 +1678,7 @@ void VCLXListBox::selectItemPos( sal_Int16 nPos, sal_Bool bSelect ) throw(::com: SolarMutexGuard aGuard; ListBox* pBox = (ListBox*) GetWindow(); - if ( pBox && ( pBox->IsEntryPosSelected( nPos ) != bSelect ) ) + if ( pBox && ( pBox->IsEntryPosSelected( nPos ) != bool(bSelect) ) ) { pBox->SelectEntryPos( nPos, bSelect ); @@ -1703,7 +1703,7 @@ void VCLXListBox::selectItemsPos( const ::com::sun::star::uno::Sequence<sal_Int1 for ( sal_uInt16 n = (sal_uInt16)aPositions.getLength(); n; ) { sal_uInt16 nPos = (sal_uInt16) aPositions.getConstArray()[--n]; - if ( pBox->IsEntryPosSelected( nPos ) != bSelect ) + if ( pBox->IsEntryPosSelected( nPos ) != bool(bSelect) ) { pBox->SelectEntryPos( nPos, bSelect ); bChanged = sal_True; @@ -1898,7 +1898,7 @@ void VCLXListBox::setProperty( const OUString& PropertyName, const ::com::sun::s if ( Value >>= aItems ) { for ( sal_uInt16 n = pListBox->GetEntryCount(); n; ) - pListBox->SelectEntryPos( --n, sal_False ); + pListBox->SelectEntryPos( --n, false ); if ( aItems.getLength() ) selectItemsPos( aItems, sal_True ); @@ -4835,7 +4835,7 @@ void VCLXDateField::setProperty( const OUString& PropertyName, const ::com::sun: { if ( bVoid ) { - ((DateField*)GetWindow())->EnableEmptyFieldValue( sal_True ); + ((DateField*)GetWindow())->EnableEmptyFieldValue( true ); ((DateField*)GetWindow())->SetEmptyFieldValue(); } else @@ -5319,7 +5319,7 @@ void VCLXTimeField::setProperty( const OUString& PropertyName, const ::com::sun: { if ( bVoid ) { - ((TimeField*)GetWindow())->EnableEmptyFieldValue( sal_True ); + ((TimeField*)GetWindow())->EnableEmptyFieldValue( true ); ((TimeField*)GetWindow())->SetEmptyFieldValue(); } else @@ -5649,7 +5649,7 @@ void VCLXNumericField::setProperty( const OUString& PropertyName, const ::com::s { if ( bVoid ) { - ((NumericField*)GetWindow())->EnableEmptyFieldValue( sal_True ); + ((NumericField*)GetWindow())->EnableEmptyFieldValue( true ); ((NumericField*)GetWindow())->SetEmptyFieldValue(); } else @@ -6245,7 +6245,7 @@ void VCLXCurrencyField::setProperty( const OUString& PropertyName, const ::com:: { if ( bVoid ) { - ((LongCurrencyField*)GetWindow())->EnableEmptyFieldValue( sal_True ); + ((LongCurrencyField*)GetWindow())->EnableEmptyFieldValue( true ); ((LongCurrencyField*)GetWindow())->SetEmptyFieldValue(); } else diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx index 004f17e30ddb..afd6ed58f8f3 100644 --- a/vcl/generic/fontmanager/fontmanager.cxx +++ b/vcl/generic/fontmanager/fontmanager.cxx @@ -233,7 +233,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr table[ i ] = 256*nPage + i; int nCharacters = nPage < 255 ? 256 : 254; - MapString( pTTFont, table, nCharacters, NULL, 0 ); + MapString( pTTFont, table, nCharacters, NULL, false ); TTSimpleGlyphMetrics* pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 0 ); if( pMetrics ) { @@ -252,7 +252,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr for( i = 0; i < 256; i++ ) table_vert[ i ] = 256*nPage + i; - MapString( pTTFont, table_vert, nCharacters, NULL, 1 ); + MapString( pTTFont, table_vert, nCharacters, NULL, true ); pMetrics = GetTTSimpleCharMetrics( pTTFont, nPage*256, nCharacters, 1 ); if( pMetrics ) { diff --git a/vcl/generic/print/common_gfx.cxx b/vcl/generic/print/common_gfx.cxx index 84d3afcef575..ae8943cbd937 100644 --- a/vcl/generic/print/common_gfx.cxx +++ b/vcl/generic/print/common_gfx.cxx @@ -48,7 +48,7 @@ GraphicsStatus::GraphicsStatus() : * non graphics graphics routines */ -sal_Bool +bool PrinterGfx::Init (PrinterJob &rPrinterJob) { mpPageHeader = rPrinterJob.GetCurrentPageHeader (); @@ -62,10 +62,10 @@ PrinterGfx::Init (PrinterJob &rPrinterJob) const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rPrinterJob.GetPrinterName() ) ); mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; - return sal_True; + return true; } -sal_Bool +bool PrinterGfx::Init (const JobData& rData) { mpPageHeader = NULL; @@ -80,7 +80,7 @@ PrinterGfx::Init (const JobData& rData) const PrinterInfo& rInfo( PrinterInfoManager::get().getPrinterInfo( rData.m_aPrinterName ) ); mbUploadPS42Fonts = rInfo.m_pParser ? ( rInfo.m_pParser->isType42Capable() ? sal_True : sal_False ) : sal_False; - return sal_True; + return true; } sal_uInt16 @@ -97,7 +97,7 @@ PrinterGfx::PrinterGfx() : mnTextAngle (0), mbTextVertical (false), mrFontMgr (PrintFontManager::get()), - mbCompressBmp (sal_True), + mbCompressBmp (true), maFillColor (0xff,0,0), maTextColor (0,0,0), maLineColor (0, 0xff, 0) @@ -127,11 +127,11 @@ PrinterGfx::Clear() maLineColor = PrinterColor(); maFillColor = PrinterColor(); maTextColor = PrinterColor(); - mbCompressBmp = sal_True; + mbCompressBmp = true; mnDpi = 300; mnDepth = 24; mnPSLevel = 2; - mbColor = sal_True; + mbColor = true; mnTextAngle = 0; maClipRegion.clear(); @@ -157,19 +157,19 @@ PrinterGfx::BeginSetClipRegion( sal_uInt32 ) maClipRegion.clear(); } -sal_Bool +bool PrinterGfx::UnionClipRegion (sal_Int32 nX,sal_Int32 nY,sal_Int32 nDX,sal_Int32 nDY) { if( nDX && nDY ) maClipRegion.push_back (Rectangle(Point(nX,nY ), Size(nDX,nDY))); - return sal_True; + return true; } -sal_Bool +bool PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, Point& rOldPoint, sal_Int32& rColumn ) { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; std::list< Rectangle >::iterator tempit, nextit; nextit = it; @@ -267,7 +267,7 @@ PrinterGfx::JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, ++tempit; maClipRegion.erase( it ); it = tempit; - bSuccess = sal_True; + bSuccess = true; } return bSuccess; } @@ -1127,15 +1127,15 @@ PrinterGfx::PSComment( const sal_Char* pComment ) } } -sal_Bool +bool PrinterGfx::DrawEPS( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize ) { if( nSize == 0 ) - return sal_True; + return true; if( ! mpPageBody ) - return sal_False; + return false; - sal_Bool bSuccess = sal_False; + bool bSuccess = false; // first search the BoundingBox of the EPS data SvMemoryStream aStream( pPtr, nSize, STREAM_READ ); diff --git a/vcl/generic/print/genprnpsp.cxx b/vcl/generic/print/genprnpsp.cxx index 160a3b5ad45b..501260b22608 100644 --- a/vcl/generic/print/genprnpsp.cxx +++ b/vcl/generic/print/genprnpsp.cxx @@ -560,15 +560,15 @@ void PspSalInfoPrinter::ReleaseGraphics( SalGraphics* pGraphics ) return; } -sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) +bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) { if( ! pFrame || ! pJobSetup ) - return sal_False; + return false; getPaLib(); if( ! pSetupFunction ) - return sal_False; + return false; PrinterInfoManager& rManager = PrinterInfoManager::get(); @@ -594,9 +594,9 @@ sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) // copy everything to job setup copyJobDataToJobSetup( pJobSetup, aInfo ); JobData::constructFromStreamBuffer( pJobSetup->mpDriverData, pJobSetup->mnDriverDataLen, m_aJobData ); - return sal_True; + return true; } - return sal_False; + return false; } // This function gets the driver data and puts it into pJobSetup @@ -604,21 +604,21 @@ sal_Bool PspSalInfoPrinter::Setup( SalFrame* pFrame, ImplJobSetup* pJobSetup ) // data should be merged into the driver data // If pJobSetup->mpDriverData IS NULL, then the driver defaults // should be merged into the independent data -sal_Bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) +bool PspSalInfoPrinter::SetPrinterData( ImplJobSetup* pJobSetup ) { if( pJobSetup->mpDriverData ) return SetData( ~0, pJobSetup ); copyJobDataToJobSetup( pJobSetup, m_aJobData ); - return sal_True; + return true; } // This function merges the independ driver data // and sets the new independ data in pJobSetup // Only the data must be changed, where the bit // in nGetDataFlags is set -sal_Bool PspSalInfoPrinter::SetData( +bool PspSalInfoPrinter::SetData( sal_uLong nSetDataFlags, ImplJobSetup* pJobSetup ) { @@ -657,7 +657,7 @@ sal_Bool PspSalInfoPrinter::SetData( } if( ! ( pKey && pValue && aData.m_aContext.setValue( pKey, pValue, false ) == pValue ) ) - return sal_False; + return false; } // merge paperbin if necessary @@ -717,10 +717,10 @@ sal_Bool PspSalInfoPrinter::SetData( m_aJobData = aData; copyJobDataToJobSetup( pJobSetup, aData ); - return sal_True; + return true; } - return sal_False; + return false; } void PspSalInfoPrinter::GetPageInfo( @@ -879,7 +879,7 @@ static OUString getTmpName() return aSys; } -sal_Bool PspSalPrinter::StartJob( +bool PspSalPrinter::StartJob( const OUString* pFileName, const OUString& rJobName, const OUString& rAppName, @@ -954,11 +954,11 @@ sal_Bool PspSalPrinter::StartJob( return m_aPrintJob.StartJob( ! m_aTmpFile.isEmpty() ? m_aTmpFile : m_aFileName, nMode, rJobName, rAppName, m_aJobData, &m_aPrinterGfx, bDirect ) ? sal_True : sal_False; } -sal_Bool PspSalPrinter::EndJob() +bool PspSalPrinter::EndJob() { - sal_Bool bSuccess = sal_False; + bool bSuccess = false; if( m_bIsPDFWriterJob ) - bSuccess = sal_True; + bSuccess = true; else { bSuccess = m_aPrintJob.EndJob(); @@ -984,9 +984,9 @@ sal_Bool PspSalPrinter::EndJob() return bSuccess; } -sal_Bool PspSalPrinter::AbortJob() +bool PspSalPrinter::AbortJob() { - sal_Bool bAbort = m_aPrintJob.AbortJob() ? sal_True : sal_False; + bool bAbort = m_aPrintJob.AbortJob() ? sal_True : sal_False; GetSalData()->m_pInstance->jobEndedPrinterUpdate(); return bAbort; } @@ -1013,9 +1013,9 @@ SalGraphics* PspSalPrinter::StartPage( ImplJobSetup* pJobSetup, sal_Bool ) return m_pGraphics; } -sal_Bool PspSalPrinter::EndPage() +bool PspSalPrinter::EndPage() { - sal_Bool bResult = m_aPrintJob.EndPage(); + bool bResult = m_aPrintJob.EndPage(); m_aPrinterGfx.Clear(); OSL_TRACE("PspSalPrinter::EndPage"); return bResult ? sal_True : sal_False; @@ -1060,14 +1060,14 @@ struct PDFPrintFile , maParameters( i_rNewParameters ) {} }; -sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJobName, const OUString& i_rAppName, +bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i_rJobName, const OUString& i_rAppName, ImplJobSetup* i_pSetupData, vcl::PrinterController& i_rController ) { OSL_TRACE( "StartJob with controller: pFilename = %s", i_pFileName ? OUStringToOString( *i_pFileName, RTL_TEXTENCODING_UTF8 ).getStr() : "<nil>" ); // mark for endjob m_bIsPDFWriterJob = true; // reset IsLastPage - i_rController.setLastPage( sal_False ); + i_rController.setLastPage( false ); // update job data if( i_pSetupData ) @@ -1077,7 +1077,7 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i m_aJobData.m_nPDFDevice = 1; // possibly create one job for collated output - sal_Bool bSinglePrintJobs = sal_False; + bool bSinglePrintJobs = false; beans::PropertyValue* pSingleValue = i_rController.getValue( OUString( "PrintCollateAsSingleJobs" ) ); if( pSingleValue ) { @@ -1120,7 +1120,7 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i for( int nPage = 0; nPage < nAllPages && ! bAborted; nPage++ ) { if( nPage == nAllPages-1 ) - i_rController.setLastPage( sal_True ); + i_rController.setLastPage( true ); // get the page's metafile GDIMetaFile aPageFile; @@ -1131,7 +1131,7 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i if( nPage != nAllPages-1 ) { i_rController.createProgressDialog(); - i_rController.setLastPage( sal_True ); + i_rController.setLastPage( true ); i_rController.getFilteredPageFile( nPage, aPageFile ); } } @@ -1289,7 +1289,7 @@ sal_Bool PspSalPrinter::StartJob( const OUString* i_pFileName, const OUString& i } } - return sal_True; + return true; } diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx index 10f663f137cc..f4e4dc3d5701 100644 --- a/vcl/generic/print/genpspgraphics.cxx +++ b/vcl/generic/print/genpspgraphics.cxx @@ -464,26 +464,26 @@ bool GenPspGraphics::drawPolyLine( return false; } -sal_Bool GenPspGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +bool GenPspGraphics::drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) { m_pPrinterGfx->DrawPolyLineBezier (nPoints, (Point*)pPtAry, pFlgAry); - return sal_True; + return true; } -sal_Bool GenPspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) +bool GenPspGraphics::drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) { m_pPrinterGfx->DrawPolygonBezier (nPoints, (Point*)pPtAry, pFlgAry); - return sal_True; + return true; } -sal_Bool GenPspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, +bool GenPspGraphics::drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) { // Point must be equal to SalPoint! see vcl/inc/salgtype.hxx m_pPrinterGfx->DrawPolyPolygonBezier (nPoly, pPoints, (Point**)pPtAry, (sal_uInt8**)pFlgAry); - return sal_True; + return true; } void GenPspGraphics::invert( sal_uInt32, @@ -493,7 +493,7 @@ void GenPspGraphics::invert( sal_uInt32, DBG_ASSERT( false, "Error: PrinterGfx::Invert() not implemented" ); } -sal_Bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) +bool GenPspGraphics::drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) { return m_pPrinterGfx->DrawEPS( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ), pPtr, nSize ); } @@ -1008,7 +1008,7 @@ SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe //-------------------------------------------------------------------------- -sal_Bool GenPspGraphics::CreateFontSubset( +bool GenPspGraphics::CreateFontSubset( const OUString& rToFile, const PhysicalFontFace* pFont, sal_GlyphId* pGlyphIds, diff --git a/vcl/generic/print/glyphset.cxx b/vcl/generic/print/glyphset.cxx index 96b965762f62..abb4b9d835a5 100644 --- a/vcl/generic/print/glyphset.cxx +++ b/vcl/generic/print/glyphset.cxx @@ -44,7 +44,7 @@ using namespace vcl; using namespace psp; -GlyphSet::GlyphSet (sal_Int32 nFontID, sal_Bool bVertical) +GlyphSet::GlyphSet (sal_Int32 nFontID, bool bVertical) : mnFontID (nFontID), mbVertical (bVertical) { @@ -79,7 +79,7 @@ GlyphSet::IsVertical () return mbVertical; } -sal_Bool +bool GlyphSet::GetCharID ( sal_Unicode nChar, unsigned char* nOutGlyphID, @@ -90,7 +90,7 @@ GlyphSet::GetCharID ( || AddCharID (nChar, nOutGlyphID, nOutGlyphSetID); } -sal_Bool +bool GlyphSet::GetGlyphID ( sal_GlyphId nGlyph, sal_Unicode nUnicode, @@ -102,7 +102,7 @@ GlyphSet::GetGlyphID ( || AddGlyphID (nGlyph, nUnicode, nOutGlyphID, nOutGlyphSetID); } -sal_Bool +bool GlyphSet::LookupCharID ( sal_Unicode nChar, unsigned char* nOutGlyphID, @@ -124,16 +124,16 @@ GlyphSet::LookupCharID ( // success: found the unicode char, return the glyphid and the glyphsetid *nOutGlyphSetID = nGlyphSetID; *nOutGlyphID = (*aGlyph).second; - return sal_True; + return true; } } *nOutGlyphSetID = -1; *nOutGlyphID = 0; - return sal_False; + return false; } -sal_Bool +bool GlyphSet::LookupGlyphID ( sal_GlyphId nGlyph, unsigned char* nOutGlyphID, @@ -155,13 +155,13 @@ GlyphSet::LookupGlyphID ( // success: found the glyph id, return the mapped glyphid and the glyphsetid *nOutGlyphSetID = nGlyphSetID; *nOutGlyphID = (*aGlyph).second; - return sal_True; + return true; } } *nOutGlyphSetID = -1; *nOutGlyphID = 0; - return sal_False; + return false; } unsigned char @@ -209,7 +209,7 @@ GlyphSet::AddNotdef (glyph_map_t &rGlyphMap) if (rGlyphMap.empty()) rGlyphMap[0] = 0; } -sal_Bool +bool GlyphSet::AddCharID ( sal_Unicode nChar, unsigned char* nOutGlyphID, @@ -264,10 +264,10 @@ GlyphSet::AddCharID ( *nOutGlyphID = aGlyphSet [nChar]; } - return sal_True; + return true; } -sal_Bool +bool GlyphSet::AddGlyphID ( sal_GlyphId nGlyph, sal_Unicode nUnicode, @@ -321,7 +321,7 @@ GlyphSet::AddGlyphID ( *nOutGlyphID = aGlyphSet [nGlyph]; } - return sal_True; + return true; } OString @@ -464,7 +464,7 @@ void GlyphSet::DrawGlyphs( const sal_Unicode* pUnicodes, sal_Int16 nLen, const sal_Int32* pDeltaArray, - const sal_Bool bUseGlyphs) + const bool bUseGlyphs) { unsigned char *pGlyphID = (unsigned char*)alloca (nLen * sizeof(unsigned char)); sal_Int32 *pGlyphSetID = (sal_Int32*)alloca (nLen * sizeof(sal_Int32)); @@ -607,17 +607,17 @@ GlyphSet::ImplDrawText (PrinterGfx &rGfx, const Point& rPoint, return; } - DrawGlyphs( rGfx, rPoint, NULL, pStr, nLen, pDeltaArray, sal_False); + DrawGlyphs( rGfx, rPoint, NULL, pStr, nLen, pDeltaArray, false); } -sal_Bool +bool GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx) { // only for ps fonts if (meBaseType != fonttype::Type1) - return sal_False; + return false; if (mnBaseEncoding == RTL_TEXTENCODING_SYMBOL) - return sal_False; + return false; PrintFontManager &rMgr = rGfx.GetFontMgr(); @@ -695,7 +695,7 @@ GlyphSet::PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx) PSDefineReencodedFont (pOutFile, nGlyphSetID); } - return sal_True; + return true; } struct EncEntry @@ -745,12 +745,12 @@ static void CreatePSUploadableFont( TrueTypeFont* pSrcFont, FILE* pTmpFile, &aRequestedGlyphs[0], &aEncoding[0], nGlyphCount, NULL ); } -sal_Bool +bool GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42, std::list< OString >& rSuppliedFonts ) { // only for truetype fonts if (meBaseType != fonttype::TrueType) - return sal_False; + return false; #if defined( UNX ) TrueTypeFont *pTTFont; @@ -758,10 +758,10 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42 int nFace = rGfx.GetFontMgr().getFontFaceNumber(mnFontID); sal_Int32 nSuccess = OpenTTFontFile(aTTFileName.getStr(), nFace, &pTTFont); if (nSuccess != SF_OK) - return sal_False; + return false; FILE* pTmpFile = tmpfile(); if (pTmpFile == NULL) - return sal_False; + return false; // array of unicode source characters sal_Unicode pUChars[256]; @@ -851,7 +851,7 @@ GlyphSet::PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAllowType42 CloseTTFont (pTTFont); fclose (pTmpFile); - return sal_True; + return true; #else (void)rOutFile; (void)rGfx; (void)bAllowType42; (void)rSuppliedFonts; # warning FIXME: Missing OpenTTFontFile outside of Unix ... diff --git a/vcl/generic/print/glyphset.hxx b/vcl/generic/print/glyphset.hxx index 934ff31fe86c..f5cec42d9c0e 100644 --- a/vcl/generic/print/glyphset.hxx +++ b/vcl/generic/print/glyphset.hxx @@ -41,7 +41,7 @@ class GlyphSet private: sal_Int32 mnFontID; - sal_Bool mbVertical; + bool mbVertical; OString maBaseName; fonttype::type meBaseType; rtl_TextEncoding mnBaseEncoding; @@ -64,18 +64,18 @@ private: void PSDefineReencodedFont (osl::File* pOutFile, sal_Int32 nGlyphSetID); - sal_Bool GetCharID (sal_Unicode nChar, + bool GetCharID (sal_Unicode nChar, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool LookupCharID (sal_Unicode nChar, + bool LookupCharID (sal_Unicode nChar, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool AddCharID (sal_Unicode nChar, + bool AddCharID (sal_Unicode nChar, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool GetGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode, + bool GetGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool LookupGlyphID (sal_GlyphId nGlyphId, + bool LookupGlyphID (sal_GlyphId nGlyphId, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); - sal_Bool AddGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode, + bool AddGlyphID (sal_GlyphId nGlyphId, sal_Unicode nUnicode, unsigned char* nOutGlyphID, sal_Int32* nOutGlyphSetID); void AddNotdef (char_map_t &rCharMap); @@ -91,7 +91,7 @@ private: public: - GlyphSet (sal_Int32 nFontID, sal_Bool bVertical); + GlyphSet (sal_Int32 nFontID, bool bVertical); ~GlyphSet (); sal_Int32 GetFontID (); @@ -113,9 +113,9 @@ public: const sal_Unicode* pUnicodes, sal_Int16 nLen, const sal_Int32* pDeltaArray, - sal_Bool bUseGlyphs=sal_True); - sal_Bool PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx); - sal_Bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< OString >& rSuppliedFonts ); + bool bUseGlyphs=true); + bool PSUploadEncoding(osl::File* pOutFile, PrinterGfx &rGfx); + bool PSUploadFont (osl::File& rOutFile, PrinterGfx &rGfx, bool bAsType42, std::list< OString >& rSuppliedFonts ); }; diff --git a/vcl/generic/print/printerjob.cxx b/vcl/generic/print/printerjob.cxx index e18d769fa2e8..6e15280f830f 100644 --- a/vcl/generic/print/printerjob.cxx +++ b/vcl/generic/print/printerjob.cxx @@ -55,15 +55,15 @@ using namespace psp; namespace psp { -sal_Bool +bool AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer, sal_uInt32 nBlockSize = nBLOCKSIZE) { if ((pDst == NULL) || (pSrc == NULL)) - return sal_False; + return false; if (pSrc->setPos(osl_Pos_Absolut, 0) != osl::FileBase::E_None) - return sal_False; + return false; if (nBlockSize == 0) nBlockSize = nBLOCKSIZE; @@ -80,7 +80,7 @@ AppendPS (FILE* pDst, osl::File* pSrc, unsigned char* pBuffer, } while ((nIn > 0) && (nIn == nOut)); - return sal_True; + return true; } } // namespace psp @@ -129,7 +129,7 @@ sal_uInt16 PrinterJob::GetDepth () const { sal_Int32 nLevel = GetPostscriptLevel(); - sal_Bool bColor = IsColorPrinter (); + bool bColor = IsColorPrinter (); return nLevel > 1 && bColor ? 24 : 8; } @@ -151,10 +151,10 @@ PrinterJob::GetPostscriptLevel (const JobData *pJobData) const return nPSLevel; } -sal_Bool +bool PrinterJob::IsColorPrinter () const { - sal_Bool bColor = sal_False; + bool bColor = false; if( m_aLastJobData.m_nColorDevice ) bColor = m_aLastJobData.m_nColorDevice == -1 ? sal_False : sal_True; @@ -298,7 +298,7 @@ static bool isAscii( const OUString& rStr ) return true; } -sal_Bool +bool PrinterJob::StartJob ( const OUString& rFileName, int nMode, @@ -325,7 +325,7 @@ PrinterJob::StartJob ( mpJobHeader = CreateSpoolFile (OUString("psp_head"), aExt); mpJobTrailer = CreateSpoolFile (OUString("psp_tail"), aExt); if( ! (mpJobHeader && mpJobTrailer) ) // existing files are removed in destructor - return sal_False; + return false; // write document header according to Document Structuring Conventions (DSC) WritePS (mpJobHeader, @@ -406,15 +406,15 @@ PrinterJob::StartJob ( m_aLastJobData.m_pParser = NULL; m_aLastJobData.m_aContext.setParser( NULL ); - return sal_True; + return true; } -sal_Bool +bool PrinterJob::EndJob () { // no pages ? that really means no print job if( maPageList.empty() ) - return sal_False; + return false; // write document setup (done here because it // includes the accumulated fonts @@ -422,7 +422,7 @@ PrinterJob::EndJob () writeSetup( mpJobHeader, m_aDocumentJobData ); m_pGraphics->OnEndJob(); if( ! (mpJobHeader && mpJobTrailer) ) - return sal_False; + return false; // write document trailer according to Document Structuring Conventions (DSC) OStringBuffer aTrailer(512); @@ -447,7 +447,7 @@ PrinterJob::EndJob () FILE* pDestFILE = NULL; /* create a destination either as file or as a pipe */ - sal_Bool bSpoolToFile = !maFileName.isEmpty(); + bool bSpoolToFile = !maFileName.isEmpty(); if (bSpoolToFile) { const OString aFileName = OUStringToOString (maFileName, @@ -462,7 +462,7 @@ PrinterJob::EndJob () { close( nFile ); unlink( aFileName.getStr() ); - return sal_False; + return false; } } else @@ -472,14 +472,14 @@ PrinterJob::EndJob () pDestFILE = fopen (aFileName.getStr(), "w"); if (pDestFILE == NULL) - return sal_False; + return false; } else { PrinterInfoManager& rPrinterInfoManager = PrinterInfoManager::get (); pDestFILE = rPrinterInfoManager.startSpool( m_aLastJobData.m_aPrinterName, m_bQuickJob ); if (pDestFILE == NULL) - return sal_False; + return false; } /* spool the document parts to the destination */ @@ -489,7 +489,7 @@ PrinterJob::EndJob () AppendPS (pDestFILE, mpJobHeader, pBuffer); mpJobHeader->close(); - sal_Bool bSuccess = sal_True; + bool bSuccess = true; std::list< osl::File* >::iterator pPageBody; std::list< osl::File* >::iterator pPageHead; for (pPageBody = maPageList.begin(), pPageHead = maHeaderList.begin(); @@ -506,7 +506,7 @@ PrinterJob::EndJob () } } else - bSuccess = sal_False; + bSuccess = false; if( *pPageBody ) { osl::File::RC nError = (*pPageBody)->open(osl_File_OpenFlag_Read); @@ -517,7 +517,7 @@ PrinterJob::EndJob () } } else - bSuccess = sal_False; + bSuccess = false; } AppendPS (pDestFILE, mpJobTrailer, pBuffer); @@ -533,18 +533,18 @@ PrinterJob::EndJob () if (!rPrinterInfoManager.endSpool( m_aLastJobData.m_aPrinterName, maJobTitle, pDestFILE, m_aDocumentJobData, true )) { - bSuccess = sal_False; + bSuccess = false; } } return bSuccess; } -sal_Bool +bool PrinterJob::AbortJob () { m_pGraphics->OnEndJob(); - return sal_False; + return false; } void @@ -581,7 +581,7 @@ PrinterJob::InitPaperSize (const JobData& rJobSetup) } -sal_Bool +bool PrinterJob::StartPage (const JobData& rJobSetup) { InitPaperSize (rJobSetup); @@ -596,7 +596,7 @@ PrinterJob::StartPage (const JobData& rJobSetup) maPageList.push_back (pPageBody); if( ! (pPageHeader && pPageBody) ) - return sal_False; + return false; // write page header according to Document Structuring Conventions (DSC) WritePS (pPageHeader, "%%Page: "); @@ -652,7 +652,7 @@ PrinterJob::StartPage (const JobData& rJobSetup) return false; } -sal_Bool +bool PrinterJob::EndPage () { m_pGraphics->OnEndPage(); @@ -661,7 +661,7 @@ PrinterJob::EndPage () osl::File* pPageBody = maPageList.back(); if( ! (pPageBody && pPageHeader) ) - return sal_False; + return false; // copy page to paper and write page trailer according to DSC @@ -677,7 +677,7 @@ PrinterJob::EndPage () pPageHeader->close(); pPageBody->close(); - return sal_True; + return true; } struct less_ppd_key : public ::std::binary_function<double, double, bool> diff --git a/vcl/generic/print/psputil.cxx b/vcl/generic/print/psputil.cxx index e6bd2c467c76..3c409d9c6e57 100644 --- a/vcl/generic/print/psputil.cxx +++ b/vcl/generic/print/psputil.cxx @@ -44,7 +44,7 @@ sal_Int32 getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer) { // get sign - sal_Bool bNegative = nValue < 0; + bool bNegative = nValue < 0; nValue = bNegative ? -nValue : nValue; // get required buffer size, must be a multiple of two @@ -134,7 +134,7 @@ appendStr (const sal_Char* pSrc, sal_Char* pDst) * copy strings to file */ -sal_Bool +bool WritePS (osl::File* pFile, const sal_Char* pString) { sal_uInt64 nInLength = rtl_str_getLength (pString); @@ -146,7 +146,7 @@ WritePS (osl::File* pFile, const sal_Char* pString) return nInLength == nOutLength; } -sal_Bool +bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength) { sal_uInt64 nOutLength = 0; @@ -157,7 +157,7 @@ WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength) return nInLength == nOutLength; } -sal_Bool +bool WritePS (osl::File* pFile, const OString &rString) { sal_uInt64 nInLength = rString.getLength(); @@ -169,7 +169,7 @@ WritePS (osl::File* pFile, const OString &rString) return nInLength == nOutLength; } -sal_Bool +bool WritePS (osl::File* pFile, const OUString &rString) { return WritePS (pFile, OUStringToOString(rString, RTL_TEXTENCODING_ASCII_US)); diff --git a/vcl/generic/print/psputil.hxx b/vcl/generic/print/psputil.hxx index c2092c17b76a..01a2d4f3cb31 100644 --- a/vcl/generic/print/psputil.hxx +++ b/vcl/generic/print/psputil.hxx @@ -41,10 +41,10 @@ sal_Int32 getAlignedHexValueOf (sal_Int32 nValue, sal_Char* pBuffer); sal_Int32 getValueOf (sal_Int32 nValue, sal_Char* pBuffer); sal_Int32 appendStr (const sal_Char* pSrc, sal_Char* pDst); -sal_Bool WritePS (osl::File* pFile, const sal_Char* pString); -sal_Bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength); -sal_Bool WritePS (osl::File* pFile, const OString &rString); -sal_Bool WritePS (osl::File* pFile, const OUString &rString); +bool WritePS (osl::File* pFile, const sal_Char* pString); +bool WritePS (osl::File* pFile, const sal_Char* pString, sal_uInt64 nInLength); +bool WritePS (osl::File* pFile, const OString &rString); +bool WritePS (osl::File* pFile, const OUString &rString); class ConverterFactory { diff --git a/vcl/generic/print/text_gfx.cxx b/vcl/generic/print/text_gfx.cxx index 0b1d4e65c623..71662cf58ac6 100644 --- a/vcl/generic/print/text_gfx.cxx +++ b/vcl/generic/print/text_gfx.cxx @@ -598,7 +598,7 @@ PrinterGfx::drawText( } int -PrinterGfx::getCharWidth (sal_Bool b_vert, sal_Unicode n_char, CharacterMetric *p_bbox) +PrinterGfx::getCharWidth (bool b_vert, sal_Unicode n_char, CharacterMetric *p_bbox) { b_vert = b_vert && (getVerticalDeltaAngle(n_char) != 0); int w = b_vert ? p_bbox->height : p_bbox->width; diff --git a/vcl/headless/svpframe.cxx b/vcl/headless/svpframe.cxx index b0073712f665..db5d08d88866 100644 --- a/vcl/headless/svpframe.cxx +++ b/vcl/headless/svpframe.cxx @@ -182,10 +182,10 @@ void SvpSalFrame::ReleaseGraphics( SalGraphics* pGraphics ) delete pSvpGraphics; } -sal_Bool SvpSalFrame::PostEvent( void* pData ) +bool SvpSalFrame::PostEvent( void* pData ) { m_pInstance->PostEvent( this, pData, SALEVENT_USEREVENT ); - return sal_True; + return true; } void SvpSalFrame::PostPaint(bool bImmediate) const @@ -354,7 +354,7 @@ void SvpSalFrame::SetWindowState( const SalFrameState *pState ) } } -sal_Bool SvpSalFrame::GetWindowState( SalFrameState* pState ) +bool SvpSalFrame::GetWindowState( SalFrameState* pState ) { pState->mnState = WINDOWSTATE_STATE_NORMAL; pState->mnX = maGeometry.nX; @@ -363,7 +363,7 @@ sal_Bool SvpSalFrame::GetWindowState( SalFrameState* pState ) pState->mnHeight = maGeometry.nHeight; pState->mnMask = _FRAMESTATE_MASK_GEOMETRY | WINDOWSTATE_MASK_STATE; - return sal_True; + return true; } void SvpSalFrame::ShowFullScreen( sal_Bool, sal_Int32 ) @@ -418,9 +418,9 @@ OUString SvpSalFrame::GetKeyName( sal_uInt16 ) return OUString(); } -sal_Bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, KeyCode& ) +bool SvpSalFrame::MapUnicodeToKeyCode( sal_Unicode, LanguageType, KeyCode& ) { - return sal_False; + return false; } LanguageType SvpSalFrame::GetInputLanguage() diff --git a/vcl/headless/svpgdi.cxx b/vcl/headless/svpgdi.cxx index a1122e55dbe5..5279c18e6bce 100644 --- a/vcl/headless/svpgdi.cxx +++ b/vcl/headless/svpgdi.cxx @@ -531,26 +531,26 @@ bool SvpSalGraphics::drawPolyLine( return false; } -sal_Bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32, +bool SvpSalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) { - return sal_False; + return false; } -sal_Bool SvpSalGraphics::drawPolygonBezier( sal_uInt32, +bool SvpSalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) { - return sal_False; + return false; } -sal_Bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32, +bool SvpSalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, const SalPoint* const*, const sal_uInt8* const* ) { - return sal_False; + return false; } bool SvpSalGraphics::drawPolyPolygon( const basegfx::B2DPolyPolygon&, double /*fTransparency*/ ) @@ -728,9 +728,9 @@ void SvpSalGraphics::invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInve dbgOut( m_aDevice ); } -sal_Bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong ) +bool SvpSalGraphics::drawEPS( long, long, long, long, void*, sal_uLong ) { - return sal_False; + return false; } SystemGraphicsData SvpSalGraphics::GetGraphicsData() const diff --git a/vcl/headless/svpprn.cxx b/vcl/headless/svpprn.cxx index f50db9a69ec9..e09433900158 100644 --- a/vcl/headless/svpprn.cxx +++ b/vcl/headless/svpprn.cxx @@ -271,9 +271,9 @@ GenPspGraphics *SvpSalInstance::CreatePrintGraphics() return new GenPspGraphics(); } -sal_Bool SvpSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* ) +bool SvpSalInfoPrinter::Setup( SalFrame*, ImplJobSetup* ) { - return sal_False; + return false; } SvpSalPrinter::SvpSalPrinter( SalInfoPrinter* pInfoPrinter ) diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx index 29c823d50283..22c786ca6a2a 100644 --- a/vcl/headless/svptext.cxx +++ b/vcl/headless/svptext.cxx @@ -302,7 +302,7 @@ bool SvpSalGraphics::AddTempDevFont( ImplDevFontList*, } -sal_Bool SvpSalGraphics::CreateFontSubset( +bool SvpSalGraphics::CreateFontSubset( const OUString& rToFile, const PhysicalFontFace* pFont, sal_GlyphId* pGlyphIds, diff --git a/vcl/headless/svpvd.cxx b/vcl/headless/svpvd.cxx index 56c7ed73e92b..6d5cfbc25fcf 100644 --- a/vcl/headless/svpvd.cxx +++ b/vcl/headless/svpvd.cxx @@ -47,12 +47,12 @@ void SvpSalVirtualDevice::ReleaseGraphics( SalGraphics* pGraphics ) delete pGraphics; } -sal_Bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY ) +bool SvpSalVirtualDevice::SetSize( long nNewDX, long nNewDY ) { return SetSizeUsingBuffer( nNewDX, nNewDY, basebmp::RawMemorySharedArray() ); } -sal_Bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray &pBuffer ) +bool SvpSalVirtualDevice::SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray &pBuffer ) { B2IVector aDevSize( nNewDX, nNewDY ); if( aDevSize.getX() == 0 ) diff --git a/vcl/inc/accel.h b/vcl/inc/accel.h index d1ccb875baa0..e3e92c78a8a5 100644 --- a/vcl/inc/accel.h +++ b/vcl/inc/accel.h @@ -31,7 +31,7 @@ public: KeyCode maKeyCode; Accelerator* mpAccel; Accelerator* mpAutoAccel; - sal_Bool mbEnabled; + bool mbEnabled; }; void ImplGetKeyCode( KeyFuncType eFunc, sal_uInt16& rCode1, sal_uInt16& rCode2, sal_uInt16& rCode3, sal_uInt16& rCode4 ); diff --git a/vcl/inc/accmgr.hxx b/vcl/inc/accmgr.hxx index 98dd74f9c6ed..4645cb27abc2 100644 --- a/vcl/inc/accmgr.hxx +++ b/vcl/inc/accmgr.hxx @@ -41,13 +41,13 @@ public: } ~ImplAccelManager(); - sal_Bool InsertAccel( Accelerator* pAccel ); + bool InsertAccel( Accelerator* pAccel ); void RemoveAccel( Accelerator* pAccel ); - void EndSequence( sal_Bool bCancel = sal_False ); - void FlushAccel() { EndSequence( sal_True ); } + void EndSequence( bool bCancel = false ); + void FlushAccel() { EndSequence( true ); } - sal_Bool IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ); + bool IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ); }; #endif // INCLUDED_VCL_INC_ACCMGR_HXX diff --git a/vcl/inc/brdwin.hxx b/vcl/inc/brdwin.hxx index 051200458349..296b415f7b19 100644 --- a/vcl/inc/brdwin.hxx +++ b/vcl/inc/brdwin.hxx @@ -92,16 +92,16 @@ private: long mnOrgMenuHeight; sal_uInt16 mnTitleType; sal_uInt16 mnBorderStyle; - sal_Bool mbFloatWindow; - sal_Bool mbSmallOutBorder; - sal_Bool mbFrameBorder; - sal_Bool mbPined; - sal_Bool mbRollUp; - sal_Bool mbMenuHide; - sal_Bool mbDockBtn; - sal_Bool mbHideBtn; - sal_Bool mbMenuBtn; - sal_Bool mbDisplayActive; + bool mbFloatWindow; + bool mbSmallOutBorder; + bool mbFrameBorder; + bool mbPined; + bool mbRollUp; + bool mbMenuHide; + bool mbDockBtn; + bool mbHideBtn; + bool mbMenuBtn; + bool mbDisplayActive; using Window::ImplInit; void ImplInit( Window* pParent, @@ -136,27 +136,27 @@ public: virtual void DataChanged( const DataChangedEvent& rDCEvt ); void InitView(); - void UpdateView( sal_Bool bNewView, const Size& rNewOutSize ); + void UpdateView( bool bNewView, const Size& rNewOutSize ); void InvalidateBorder(); using Window::Draw; void Draw( const Rectangle& rRect, OutputDevice* pDev, const Point& rPos ); - void SetDisplayActive( sal_Bool bActive ); - sal_Bool IsDisplayActive() const { return mbDisplayActive; } + void SetDisplayActive( bool bActive ); + bool IsDisplayActive() const { return mbDisplayActive; } void SetTitleType( sal_uInt16 nTitleType, const Size& rSize ); void SetBorderStyle( sal_uInt16 nStyle ); sal_uInt16 GetBorderStyle() const { return mnBorderStyle; } - void SetPin( sal_Bool bPin ); - void SetRollUp( sal_Bool bRollUp, const Size& rSize ); + void SetPin( bool bPin ); + void SetRollUp( bool bRollUp, const Size& rSize ); void SetCloser(); - void SetDockButton( sal_Bool bDockButton ); - void SetHideButton( sal_Bool bHideButton ); - void SetMenuButton( sal_Bool bMenuButton ); + void SetDockButton( bool bDockButton ); + void SetHideButton( bool bHideButton ); + void SetMenuButton( bool bMenuButton ); void UpdateMenuHeight(); void SetMenuBarWindow( Window* pWindow ); - void SetMenuBarMode( sal_Bool bHide ); + void SetMenuBarMode( bool bHide ); void SetMinOutputSize( long nWidth, long nHeight ) { mnMinWidth = nWidth; mnMinHeight = nHeight; } @@ -208,9 +208,9 @@ struct ImplBorderFrameData sal_uInt16 mnHideState; sal_uInt16 mnHelpState; sal_uInt16 mnTitleType; - sal_Bool mbFloatWindow; - sal_Bool mbDragFull; - sal_Bool mbTitleClipped; + bool mbFloatWindow; + bool mbDragFull; + bool mbTitleClipped; }; class ImplBorderWindowView @@ -218,9 +218,9 @@ class ImplBorderWindowView public: virtual ~ImplBorderWindowView(); - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool Tracking( const TrackingEvent& rTEvt ); + virtual bool MouseMove( const MouseEvent& rMEvt ); + virtual bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual bool Tracking( const TrackingEvent& rTEvt ); virtual OUString RequestHelp( const Point& rPos, Rectangle& rHelpRect ); virtual void Init( OutputDevice* pDev, long nWidth, long nHeight ) = 0; @@ -232,9 +232,9 @@ public: void ImplInitTitle( ImplBorderFrameData* pData ); sal_uInt16 ImplHitTest( ImplBorderFrameData* pData, const Point& rPos ); - sal_Bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - sal_Bool ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); - sal_Bool ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ); + bool ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); + bool ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ); + bool ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ); OUString ImplRequestHelp( ImplBorderFrameData* pData, const Point& rPos, Rectangle& rHelpRect ); long ImplCalcTitleWidth( const ImplBorderFrameData* pData ) const; }; @@ -283,9 +283,9 @@ public: ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ); ~ImplStdBorderWindowView(); - virtual sal_Bool MouseMove( const MouseEvent& rMEvt ); - virtual sal_Bool MouseButtonDown( const MouseEvent& rMEvt ); - virtual sal_Bool Tracking( const TrackingEvent& rTEvt ); + virtual bool MouseMove( const MouseEvent& rMEvt ); + virtual bool MouseButtonDown( const MouseEvent& rMEvt ); + virtual bool Tracking( const TrackingEvent& rTEvt ); virtual OUString RequestHelp( const Point& rPos, Rectangle& rHelpRect ); virtual Rectangle GetMenuRect() const; diff --git a/vcl/inc/cvtsvm.hxx b/vcl/inc/cvtsvm.hxx index dd92f8edd699..5c5e006fdfa1 100644 --- a/vcl/inc/cvtsvm.hxx +++ b/vcl/inc/cvtsvm.hxx @@ -83,7 +83,7 @@ private: SAL_DLLPRIVATE void ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ); SAL_DLLPRIVATE void ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ); SAL_DLLPRIVATE sal_uLong ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, - VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1, + VirtualDevice& rSaveVDev, bool& rRop_0_1, Color& rLineCol, ::std::stack<Color*>& rLineColStack, rtl_TextEncoding& rActualCharSet ); diff --git a/vcl/inc/dndlcon.hxx b/vcl/inc/dndlcon.hxx index dcda3c5419d8..3d6c6b617c83 100644 --- a/vcl/inc/dndlcon.hxx +++ b/vcl/inc/dndlcon.hxx @@ -36,7 +36,7 @@ class DNDListenerContainer : public ::vcl::unohelper::MutexHelper, ::com::sun::star::datatransfer::dnd::XDropTargetDropContext, ::com::sun::star::datatransfer::dnd::XDropTarget > { - sal_Bool m_bActive; + bool m_bActive; sal_Int8 m_nDefaultActions; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTargetDragContext > m_xDropTargetDragContext; diff --git a/vcl/inc/generic/gendisp.hxx b/vcl/inc/generic/gendisp.hxx index 285a9dc2e70a..4aa5f356e2cf 100644 --- a/vcl/inc/generic/gendisp.hxx +++ b/vcl/inc/generic/gendisp.hxx @@ -68,7 +68,7 @@ public: virtual bool DispatchInternalEvent(); bool HasUserEvents() const; - sal_Bool MouseCaptured( const SalFrame *pFrameData ) const + bool MouseCaptured( const SalFrame *pFrameData ) const { return m_pCapture == pFrameData; } SalFrame* GetCaptureFrame() const { return m_pCapture; } diff --git a/vcl/inc/generic/genprn.h b/vcl/inc/generic/genprn.h index b63f8b43f88c..539c2b4fadd0 100644 --- a/vcl/inc/generic/genprn.h +++ b/vcl/inc/generic/genprn.h @@ -40,9 +40,9 @@ public: // overload all pure virtual methods virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); - virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData ); - virtual sal_Bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ); + virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); + virtual bool SetPrinterData( ImplJobSetup* pSetupData ); + virtual bool SetData( sal_uIntPtr nFlags, ImplJobSetup* pSetupData ); virtual void GetPageInfo( const ImplJobSetup* pSetupData, long& rOutWidth, long& rOutHeight, long& rPageOffX, long& rPageOffY, @@ -76,22 +76,22 @@ public: virtual ~PspSalPrinter(); // overload all pure virtual methods - virtual sal_Bool StartJob( const OUString* pFileName, + virtual bool StartJob( const OUString* pFileName, const OUString& rJobName, const OUString& rAppName, sal_uIntPtr nCopies, bool bCollate, bool bDirect, ImplJobSetup* pSetupData ); - virtual sal_Bool StartJob( const OUString*, + virtual bool StartJob( const OUString*, const OUString&, const OUString&, ImplJobSetup*, vcl::PrinterController& i_rController ); - virtual sal_Bool EndJob(); - virtual sal_Bool AbortJob(); + virtual bool EndJob(); + virtual bool AbortJob(); virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ); - virtual sal_Bool EndPage(); + virtual bool EndPage(); virtual sal_uIntPtr GetErrorCode(); }; diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h index 044cb123fb21..9a2c8c559796 100644 --- a/vcl/inc/generic/genpspgraphics.h +++ b/vcl/inc/generic/genpspgraphics.h @@ -97,7 +97,7 @@ public: virtual void ClearDevFontCache(); virtual bool AddTempDevFont( ImplDevFontList*, const OUString& rFileURL, const OUString& rFontName ); - virtual sal_Bool CreateFontSubset( const OUString& rToFile, + virtual bool CreateFontSubset( const OUString& rToFile, const PhysicalFontFace*, sal_GlyphId* pGlyphIDs, sal_uInt8* pEncoding, @@ -137,13 +137,13 @@ public: const basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, com::sun::star::drawing::LineCap); - virtual sal_Bool drawPolyLineBezier( sal_uInt32 nPoints, + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual sal_Bool drawPolygonBezier( sal_uInt32 nPoints, + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ); @@ -172,7 +172,7 @@ public: virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); + virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); virtual bool filterText( const OUString& rOrigText, OUString& rNewText, sal_Int32 nIndex, sal_Int32& rLen, sal_Int32& rCutStart, sal_Int32& rCutStop ); virtual bool drawAlphaBitmap( const SalTwoRect&, diff --git a/vcl/inc/generic/printergfx.hxx b/vcl/inc/generic/printergfx.hxx index 77ac4676b2fc..dee151c6541d 100644 --- a/vcl/inc/generic/printergfx.hxx +++ b/vcl/inc/generic/printergfx.hxx @@ -75,7 +75,7 @@ public: ~PrinterColor () {} - sal_Bool Is () const + bool Is () const { return meColorspace != eInvalid; } ColorSpace GetColorSpace () const @@ -86,14 +86,14 @@ public: { return mnGreen; } sal_uInt16 GetBlue () const { return mnBlue; } - sal_Bool operator== (const PrinterColor& aColor) const + bool operator== (const PrinterColor& aColor) const { return aColor.Is() && this->Is() && mnRed == aColor.mnRed && mnGreen == aColor.mnGreen && mnBlue == aColor.mnBlue; } - sal_Bool operator!= (const PrinterColor& aColor) const + bool operator!= (const PrinterColor& aColor) const { return ! (aColor==*this); } PrinterColor& operator= (const PrinterColor& aColor) { @@ -189,8 +189,8 @@ private: sal_uInt16 mnDepth; sal_uInt16 mnPSLevel; - sal_Bool mbColor; - sal_Bool mbUploadPS42Fonts; + bool mbColor; + bool mbUploadPS42Fonts; osl::File* mpPageHeader; osl::File* mpPageBody; @@ -219,7 +219,7 @@ private: /* bitmap drawing implementation */ - sal_Bool mbCompressBmp; + bool mbCompressBmp; void DrawPS1GrayImage (const PrinterBmp& rBitmap, const Rectangle& rArea); void writePS2ImageHeader (const Rectangle& rArea, psp::ImageType nType); @@ -232,7 +232,7 @@ private: /* clip region */ std::list< Rectangle > maClipRegion; - sal_Bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, + bool JoinVerticalClipRectangles( std::list< Rectangle >::iterator& it, Point& aOldPoint, sal_Int32& nColumn ); /* color settings */ @@ -247,7 +247,7 @@ private: /* font */ friend class Font2; - int getCharWidth (sal_Bool b_vert, sal_Unicode n_char, + int getCharWidth (bool b_vert, sal_Unicode n_char, CharacterMetric *p_bbox); fontID getCharMetric (const Font2 &rFont, sal_Unicode n_char, CharacterMetric *p_bbox); @@ -321,8 +321,8 @@ public: public: PrinterGfx(); ~PrinterGfx(); - sal_Bool Init (PrinterJob &rPrinterSpec); - sal_Bool Init (const JobData& rData); + bool Init (PrinterJob &rPrinterSpec); + bool Init (const JobData& rData); void Clear(); // query depth @@ -331,7 +331,7 @@ public: // clip region void ResetClipRegion (); void BeginSetClipRegion (sal_uInt32); - sal_Bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY, + bool UnionClipRegion (sal_Int32 nX, sal_Int32 nY, sal_Int32 nDX, sal_Int32 nDY); void EndSetClipRegion (); @@ -364,7 +364,7 @@ public: const sal_uInt8* const* pFlgAry); // eps - sal_Bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); + bool DrawEPS ( const Rectangle& rBoundingBox, void* pPtr, sal_uInt32 nSize); // image drawing void DrawBitmap (const Rectangle& rDest, const Rectangle& rSrc, diff --git a/vcl/inc/generic/printerjob.hxx b/vcl/inc/generic/printerjob.hxx index 5c521bb37675..c9ea6b7b5d92 100644 --- a/vcl/inc/generic/printerjob.hxx +++ b/vcl/inc/generic/printerjob.hxx @@ -89,7 +89,7 @@ public: // for usage in PrinterGfx void GetScale (double &rXScale, double &rYScale) const; sal_uInt16 GetDepth () const; sal_uInt16 GetPostscriptLevel (const JobData *pJobData = NULL) const; - sal_Bool IsColorPrinter () const; + bool IsColorPrinter () const; osl::File* GetCurrentPageHeader (); osl::File* GetCurrentPageBody (); @@ -114,7 +114,7 @@ public: * the quick command for spooling should be used instead * of the normal command */ - sal_Bool StartJob (const OUString& rFileName, + bool StartJob (const OUString& rFileName, int nMode, const OUString& rJobName, const OUString& rAppName, @@ -122,12 +122,12 @@ public: PrinterGfx* pGraphics, bool bIsQuickJob ); - sal_Bool EndJob (); + bool EndJob (); - sal_Bool AbortJob (); + bool AbortJob (); - sal_Bool StartPage (const JobData& rJobSetup); - sal_Bool EndPage (); + bool StartPage (const JobData& rJobSetup); + bool EndPage (); }; } /* namespace psp */ diff --git a/vcl/inc/headless/svpframe.hxx b/vcl/inc/headless/svpframe.hxx index 865fd280b1c5..c4e88c312fb2 100644 --- a/vcl/inc/headless/svpframe.hxx +++ b/vcl/inc/headless/svpframe.hxx @@ -79,7 +79,7 @@ public: virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual sal_Bool PostEvent( void* pData ); + virtual bool PostEvent( void* pData ); virtual void SetTitle( const OUString& rTitle ); virtual void SetIcon( sal_uInt16 nIcon ); @@ -96,7 +96,7 @@ public: virtual void GetWorkArea( Rectangle& rRect ); virtual SalFrame* GetParent() const; virtual void SetWindowState( const SalFrameState* pState ); - virtual sal_Bool GetWindowState( SalFrameState* pState ); + virtual bool GetWindowState( SalFrameState* pState ); virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); virtual void StartPresentation( sal_Bool bStart ); virtual void SetAlwaysOnTop( sal_Bool bOnTop ); @@ -110,7 +110,7 @@ public: virtual void SetInputContext( SalInputContext* pContext ); virtual void EndExtTextInput( sal_uInt16 nFlags ); virtual OUString GetKeyName( sal_uInt16 nKeyCode ); - virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); virtual LanguageType GetInputLanguage(); virtual void UpdateSettings( AllSettings& rSettings ); virtual void Beep(); diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx index 94a5c1ce4e52..9733e49bf18c 100644 --- a/vcl/inc/headless/svpgdi.hxx +++ b/vcl/inc/headless/svpgdi.hxx @@ -155,7 +155,7 @@ public: virtual void GetDevFontList( ImplDevFontList* ); virtual void ClearDevFontCache(); virtual bool AddTempDevFont( ImplDevFontList*, const OUString& rFileURL, const OUString& rFontName ); - virtual sal_Bool CreateFontSubset( const OUString& rToFile, + virtual bool CreateFontSubset( const OUString& rToFile, const PhysicalFontFace*, sal_GlyphId* pGlyphIds, sal_uInt8* pEncoding, @@ -194,13 +194,13 @@ public: virtual void drawPolyPolygon( sal_uInt32 nPoly, const sal_uInt32* pPoints, PCONSTSALPOINT* pPtAry ); - virtual sal_Bool drawPolyLineBezier( sal_uInt32 nPoints, + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual sal_Bool drawPolygonBezier( sal_uInt32 nPoints, + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ); @@ -230,7 +230,7 @@ public: virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ); + virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ); virtual SystemGraphicsData GetGraphicsData() const; virtual SystemFontData GetSysFontData( int nFallbacklevel ) const; diff --git a/vcl/inc/headless/svpprn.hxx b/vcl/inc/headless/svpprn.hxx index d9ac08f8fb6c..2c404ee2b048 100644 --- a/vcl/inc/headless/svpprn.hxx +++ b/vcl/inc/headless/svpprn.hxx @@ -30,7 +30,7 @@ class SvpSalInfoPrinter : public PspSalInfoPrinter { public: - virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); + virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ); }; class SvpSalPrinter : public PspSalPrinter diff --git a/vcl/inc/headless/svpvd.hxx b/vcl/inc/headless/svpvd.hxx index 6a0b031c132a..a896db8300d4 100644 --- a/vcl/inc/headless/svpvd.hxx +++ b/vcl/inc/headless/svpvd.hxx @@ -44,8 +44,8 @@ public: virtual SalGraphics* GetGraphics(); virtual void ReleaseGraphics( SalGraphics* pGraphics ); - virtual sal_Bool SetSize( long nNewDX, long nNewDY ); - virtual sal_Bool SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray &pBuffer ); + virtual bool SetSize( long nNewDX, long nNewDY ); + virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray &pBuffer ); virtual void GetSize( long& rWidth, long& rHeight ); }; diff --git a/vcl/inc/idlemgr.hxx b/vcl/inc/idlemgr.hxx index 432748f4a682..02fc85ec0985 100644 --- a/vcl/inc/idlemgr.hxx +++ b/vcl/inc/idlemgr.hxx @@ -36,7 +36,7 @@ public: ImplIdleMgr(); ~ImplIdleMgr(); - sal_Bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ); + bool InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ); void RemoveIdleHdl( const Link& rLink ); void RestartIdler() diff --git a/vcl/inc/ilstbox.hxx b/vcl/inc/ilstbox.hxx index 58d6f9ccdbfd..cb90e5de30df 100644 --- a/vcl/inc/ilstbox.hxx +++ b/vcl/inc/ilstbox.hxx @@ -50,7 +50,7 @@ struct ImplEntryType OUString maStr; Image maImage; void* mpUserData; - sal_Bool mbIsSelected; + bool mbIsSelected; long mnFlags; long mnHeight; @@ -60,7 +60,7 @@ struct ImplEntryType mnFlags( 0 ), mnHeight( 0 ) { - mbIsSelected = sal_False; + mbIsSelected = false; mpUserData = NULL; } @@ -69,7 +69,7 @@ struct ImplEntryType mnFlags( 0 ), mnHeight( 0 ) { - mbIsSelected = sal_False; + mbIsSelected = false; mpUserData = NULL; } @@ -78,7 +78,7 @@ struct ImplEntryType mnFlags( 0 ), mnHeight( 0 ) { - mbIsSelected = sal_False; + mbIsSelected = false; mpUserData = NULL; } }; @@ -95,7 +95,7 @@ private: sal_uInt16 mnMaxMRUCount; Link maSelectionChangedHdl; - sal_Bool mbCallSelectionChangedHdl; + bool mbCallSelectionChangedHdl; boost::ptr_vector<ImplEntryType> maEntries; ImplEntryType* GetEntry( sal_uInt16 nPos ) const @@ -109,14 +109,14 @@ public: ImplEntryList( Window* pWindow ); ~ImplEntryList(); - sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, sal_Bool bSort ); + sal_uInt16 InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, bool bSort ); void RemoveEntry( sal_uInt16 nPos ); const ImplEntryType* GetEntryPtr( sal_uInt16 nPos ) const { return (const ImplEntryType*) GetEntry( nPos ); } ImplEntryType* GetMutableEntryPtr( sal_uInt16 nPos ) const { return GetEntry( nPos ); } void Clear(); - sal_uInt16 FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart = 0, sal_Bool bForward = sal_True, sal_Bool bLazy = sal_True ) const; - sal_uInt16 FindEntry( const OUString& rStr, sal_Bool bSearchMRUArea = sal_False ) const; + sal_uInt16 FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart = 0, bool bForward = true, bool bLazy = true ) const; + sal_uInt16 FindEntry( const OUString& rStr, bool bSearchMRUArea = false ) const; sal_uInt16 FindEntry( const void* pData ) const; /// helper: add up heights up to index nEndIndex. @@ -127,11 +127,11 @@ public: long GetEntryHeight( sal_uInt16 nPos ) const; sal_uInt16 GetEntryCount() const { return (sal_uInt16)maEntries.size(); } - sal_Bool HasImages() const { return mnImages ? sal_True : sal_False; } + bool HasImages() const { return mnImages ? sal_True : sal_False; } OUString GetEntryText( sal_uInt16 nPos ) const; - sal_Bool HasEntryImage( sal_uInt16 nPos ) const; + bool HasEntryImage( sal_uInt16 nPos ) const; Image GetEntryImage( sal_uInt16 nPos ) const; void SetEntryData( sal_uInt16 nPos, void* pNewData ); @@ -140,12 +140,12 @@ public: void SetEntryFlags( sal_uInt16 nPos, long nFlags ); long GetEntryFlags( sal_uInt16 nPos ) const; - void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ); + void SelectEntry( sal_uInt16 nPos, bool bSelect ); sal_uInt16 GetSelectEntryCount() const; OUString GetSelectEntry( sal_uInt16 nIndex ) const; sal_uInt16 GetSelectEntryPos( sal_uInt16 nIndex ) const; - sal_Bool IsEntryPosSelected( sal_uInt16 nIndex ) const; + bool IsEntryPosSelected( sal_uInt16 nIndex ) const; void SetLastSelected( sal_uInt16 nPos ) { mnLastSelected = nPos; } sal_uInt16 GetLastSelected() const { return mnLastSelected; } @@ -155,7 +155,7 @@ public: void SetSelectionChangedHdl( const Link& rLnk ) { maSelectionChangedHdl = rLnk; } - void SetCallSelectionChangedHdl( sal_Bool bCall ) { mbCallSelectionChangedHdl = bCall; } + void SetCallSelectionChangedHdl( bool bCall ) { mbCallSelectionChangedHdl = bCall; } void SetMRUCount( sal_uInt16 n ) { mnMRUCount = n; } sal_uInt16 GetMRUCount() const { return mnMRUCount; } @@ -250,8 +250,8 @@ protected: virtual void GetFocus(); virtual void LoseFocus(); - sal_Bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift = sal_False, sal_Bool bCtrl = sal_False, sal_Bool bSelectPosChange = sal_False ); - void ImplPaint( sal_uInt16 nPos, sal_Bool bErase = sal_False, bool bLayout = false ); + bool SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, bool bShift = false, bool bCtrl = false, bool bSelectPosChange = false ); + void ImplPaint( sal_uInt16 nPos, bool bErase = false, bool bLayout = false ); void ImplDoPaint( const Rectangle& rRect, bool bLayout = false ); void ImplCalcMetrics(); void ImplUpdateEntryMetrics( ImplEntryType& rEntry ); @@ -280,14 +280,14 @@ public: sal_uInt16 GetDisplayLineCount() const; void SetEntryFlags( sal_uInt16 nPos, long nFlags ); - void DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false ); + void DrawEntry( sal_uInt16 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false, bool bLayout = false ); - void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ); + void SelectEntry( sal_uInt16 nPos, bool bSelect ); void DeselectAll(); sal_uInt16 GetEntryPosForPoint( const Point& rPoint ) const; sal_uInt16 GetLastVisibleEntry() const; - sal_Bool ProcessKeyInput( const KeyEvent& rKEvt ); + bool ProcessKeyInput( const KeyEvent& rKEvt ); void SetTopEntry( sal_uInt16 nTop ); sal_uInt16 GetTopEntry() const { return mnTop; } @@ -297,7 +297,7 @@ public: void SetProminentEntryType( ProminentEntry eType ) { meProminentType = eType; } ProminentEntry GetProminentEntryType() const { return meProminentType; } using Window::IsVisible; - sal_Bool IsVisible( sal_uInt16 nEntry ) const; + bool IsVisible( sal_uInt16 nEntry ) const; long GetLeftIndent() const { return mnLeft; } void SetLeftIndent( long n ); @@ -361,7 +361,7 @@ public: bool IsReadOnly() const { return mbReadOnly; } using Control::ImplInitSettings; - void ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); + void ImplInitSettings( bool bFont, bool bForeground, bool bBackground ); sal_uInt16 ImplGetTextStyle() const; /// pb: #106948# explicit mirroring for calc @@ -430,13 +430,13 @@ public: void SetEntryFlags( sal_uInt16 nPos, long nFlags ); - void SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ); + void SelectEntry( sal_uInt16 nPos, bool bSelect ); void SetNoSelection(); void ResetCurrentPos() { maLBWindow.ResetCurrentPos(); } sal_uInt16 GetCurrentPos() const { return maLBWindow.GetCurrentPos(); } - sal_Bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); } - sal_Bool HandleWheelAsCursorTravel( const CommandEvent& rCEvt ); + bool ProcessKeyInput( const KeyEvent& rKEvt ) { return maLBWindow.ProcessKeyInput( rKEvt ); } + bool HandleWheelAsCursorTravel( const CommandEvent& rCEvt ); void SetSeparatorPos( sal_uInt16 n ) { maLBWindow.SetSeparatorPos( n ); } sal_uInt16 GetSeparatorPos() const { return maLBWindow.GetSeparatorPos(); } @@ -445,7 +445,7 @@ public: sal_uInt16 GetTopEntry() const { return maLBWindow.GetTopEntry(); } void ShowProminentEntry( sal_uInt16 nPos ) { maLBWindow.ShowProminentEntry( nPos ); } using Window::IsVisible; - sal_Bool IsVisible( sal_uInt16 nEntry ) const { return maLBWindow.IsVisible( nEntry ); } + bool IsVisible( sal_uInt16 nEntry ) const { return maLBWindow.IsVisible( nEntry ); } void SetProminentEntryType( ProminentEntry eType ) { maLBWindow.SetProminentEntryType( eType ); } ProminentEntry GetProminentEntryType() const { return maLBWindow.GetProminentEntryType(); } @@ -454,18 +454,18 @@ public: void SetLeftIndent( sal_uInt16 n ) { maLBWindow.SetLeftIndent( n ); } void ScrollHorz( short nDiff ) { maLBWindow.ScrollHorz( nDiff ); } - void SetTravelSelect( sal_Bool bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); } - sal_Bool IsTravelSelect() const { return maLBWindow.IsTravelSelect(); } - sal_Bool IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); } + void SetTravelSelect( bool bTravelSelect ) { maLBWindow.SetTravelSelect( bTravelSelect ); } + bool IsTravelSelect() const { return maLBWindow.IsTravelSelect(); } + bool IsTrackingSelect() const { return maLBWindow.IsTrackingSelect(); } - void EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); } - sal_Bool IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); } + void EnableMultiSelection( bool bMulti, bool bStackMode ) { maLBWindow.EnableMultiSelection( bMulti, bStackMode ); } + bool IsMultiSelectionEnabled() const { return maLBWindow.IsMultiSelectionEnabled(); } - void SetMultiSelectionSimpleMode( sal_Bool bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); } - sal_Bool IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); } + void SetMultiSelectionSimpleMode( bool bSimple ) { maLBWindow.SetMultiSelectionSimpleMode( bSimple ); } + bool IsMultiSelectionSimpleMode() const { return maLBWindow.IsMultiSelectionSimpleMode(); } - void SetReadOnly( sal_Bool b ) { maLBWindow.SetReadOnly( b ); } - sal_Bool IsReadOnly() const { return maLBWindow.IsReadOnly(); } + void SetReadOnly( bool b ) { maLBWindow.SetReadOnly( b ); } + bool IsReadOnly() const { return maLBWindow.IsReadOnly(); } Size CalcSize( sal_uInt16 nMaxLines ) const { return maLBWindow.CalcSize( nMaxLines ); } @@ -488,8 +488,8 @@ public: void SetListItemSelectHdl( const Link& rLink ) { maLBWindow.SetListItemSelectHdl( rLink ); } const Link& GetListItemSelectHdl() const { return maLBWindow.GetListItemSelectHdl(); } void SetSelectionChangedHdl( const Link& rLnk ) { maLBWindow.GetEntryList()->SetSelectionChangedHdl( rLnk ); } - void SetCallSelectionChangedHdl( sal_Bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); } - sal_Bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); } + void SetCallSelectionChangedHdl( bool bCall ) { maLBWindow.GetEntryList()->SetCallSelectionChangedHdl( bCall ); } + bool IsSelectionChanged() const { return maLBWindow.IsSelectionChanged(); } sal_uInt16 GetSelectModifier() const { return maLBWindow.GetSelectModifier(); } void SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ); @@ -514,7 +514,7 @@ private: Size maPrefSz; sal_uInt16 mnDDLineCount; sal_uInt16 mnPopupModeStartSaveSelection; - sal_Bool mbAutoWidth; + bool mbAutoWidth; protected: virtual bool PreNotify( NotifyEvent& rNEvt ); @@ -527,11 +527,11 @@ public: void SetPrefSize( const Size& rSz ) { maPrefSz = rSz; } const Size& GetPrefSize() const { return maPrefSz; } - void SetAutoWidth( sal_Bool b ) { mbAutoWidth = b; } - sal_Bool IsAutoWidth() const { return mbAutoWidth; } + void SetAutoWidth( bool b ) { mbAutoWidth = b; } + bool IsAutoWidth() const { return mbAutoWidth; } Size CalcFloatSize(); - void StartFloat( sal_Bool bStartTracking ); + void StartFloat( bool bStartTracking ); virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); @@ -602,7 +602,7 @@ public: void EnableUserDraw( bool bUserDraw ) { mbUserDrawEnabled = bUserDraw; } bool IsUserDrawEnabled() const { return mbUserDrawEnabled; } - void DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos = sal_False, bool bLayout = false ); + void DrawEntry( bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos = false, bool bLayout = false ); bool GetEdgeBlending() const { return mbEdgeBlending; } void SetEdgeBlending(bool bNew) { mbEdgeBlending = bNew; } @@ -611,7 +611,7 @@ public: class ImplBtn : public PushButton { private: - sal_Bool mbDown; + bool mbDown; Link maMBDownHdl; @@ -627,7 +627,7 @@ public: }; -void ImplInitFieldSettings( Window* pWin, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ); +void ImplInitFieldSettings( Window* pWin, bool bFont, bool bForeground, bool bBackground ); void ImplInitDropDownButton( PushButton* pButton ); #endif // INCLUDED_VCL_INC_ILSTBOX_HXX diff --git a/vcl/inc/image.h b/vcl/inc/image.h index a59c865b23ed..370e19f46cca 100644 --- a/vcl/inc/image.h +++ b/vcl/inc/image.h @@ -119,7 +119,7 @@ struct ImplImageRefData ImplImageRefData() {} // Um Warning zu umgehen ~ImplImageRefData(); - sal_Bool IsEqual( const ImplImageRefData& rData ); + bool IsEqual( const ImplImageRefData& rData ); }; // ---------------- @@ -134,7 +134,7 @@ struct ImplImageData ImplImageData( const BitmapEx& rBmpEx ); ~ImplImageData(); - sal_Bool IsEqual( const ImplImageData& rData ); + bool IsEqual( const ImplImageData& rData ); }; // ------------- diff --git a/vcl/inc/impbmp.hxx b/vcl/inc/impbmp.hxx index 31b6e4329b09..c0eb805090f8 100644 --- a/vcl/inc/impbmp.hxx +++ b/vcl/inc/impbmp.hxx @@ -43,16 +43,16 @@ public: void ImplSetSalBitmap( SalBitmap* pSalBitmap ); SalBitmap* ImplGetSalBitmap() const { return mpSalBitmap; } - sal_Bool ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); - sal_Bool ImplCreate( const ImpBitmap& rImpBitmap ); - sal_Bool ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ); - sal_Bool ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ); + bool ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ); + bool ImplCreate( const ImpBitmap& rImpBitmap ); + bool ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ); + bool ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ); Size ImplGetSize() const; sal_uInt16 ImplGetBitCount() const; - BitmapBuffer* ImplAcquireBuffer( sal_Bool bReadOnly ); - void ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly ); + BitmapBuffer* ImplAcquireBuffer( bool bReadOnly ); + void ImplReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ); sal_uLong ImplGetRefCount() const { return mnRefCount; } void ImplIncRefCount() { mnRefCount++; } diff --git a/vcl/inc/impfont.hxx b/vcl/inc/impfont.hxx index 0bdd8edb2969..75bc9267acb7 100644 --- a/vcl/inc/impfont.hxx +++ b/vcl/inc/impfont.hxx @@ -75,7 +75,7 @@ private: FontEmphasisMark meEmphasisMark; short mnOrientation; FontKerning mnKerning; - sal_Bool mbWordLine:1, + bool mbWordLine:1, mbOutline:1, mbConfigLookup:1, // there was a config lookup mbShadow:1, diff --git a/vcl/inc/impgraph.hxx b/vcl/inc/impgraph.hxx index 6926aee63c64..931bf6b355f5 100644 --- a/vcl/inc/impgraph.hxx +++ b/vcl/inc/impgraph.hxx @@ -64,8 +64,8 @@ private: sal_uLong mnDocFilePos; mutable sal_uLong mnSizeBytes; sal_uLong mnRefCount; - sal_Bool mbSwapOut; - sal_Bool mbSwapUnderway; + bool mbSwapOut; + bool mbSwapUnderway; // SvgData support SvgDataPtr maSvgData; @@ -82,20 +82,20 @@ private: virtual ~ImpGraphic(); ImpGraphic& operator=( const ImpGraphic& rImpGraphic ); - sal_Bool operator==( const ImpGraphic& rImpGraphic ) const; - sal_Bool operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); } + bool operator==( const ImpGraphic& rImpGraphic ) const; + bool operator!=( const ImpGraphic& rImpGraphic ) const { return !( *this == rImpGraphic ); } - void ImplClearGraphics( sal_Bool bCreateSwapInfo ); + void ImplClearGraphics( bool bCreateSwapInfo ); void ImplClear(); GraphicType ImplGetType() const; void ImplSetDefaultType(); - sal_Bool ImplIsSupportedGraphic() const; + bool ImplIsSupportedGraphic() const; - sal_Bool ImplIsTransparent() const; - sal_Bool ImplIsAlpha() const; - sal_Bool ImplIsAnimated() const; - sal_Bool ImplIsEPS() const; + bool ImplIsTransparent() const; + bool ImplIsAlpha() const; + bool ImplIsAnimated() const; + bool ImplIsEPS() const; Bitmap ImplGetBitmap(const GraphicConversionParameters& rParameters) const; BitmapEx ImplGetBitmapEx(const GraphicConversionParameters& rParameters) const; @@ -141,24 +141,24 @@ private: const OUString& ImplGetDocFileName() const; sal_uLong ImplGetDocFilePos() const; - sal_Bool ImplReadEmbedded( SvStream& rIStream, sal_Bool bSwap = sal_False ); - sal_Bool ImplWriteEmbedded( SvStream& rOStream ); + bool ImplReadEmbedded( SvStream& rIStream, bool bSwap = false ); + bool ImplWriteEmbedded( SvStream& rOStream ); - sal_Bool ImplSwapIn(); - sal_Bool ImplSwapIn( SvStream* pIStm ); + bool ImplSwapIn(); + bool ImplSwapIn( SvStream* pIStm ); - sal_Bool ImplSwapOut(); - sal_Bool ImplSwapOut( SvStream* pOStm ); + bool ImplSwapOut(); + bool ImplSwapOut( SvStream* pOStm ); - sal_Bool ImplIsSwapOut() const; + bool ImplIsSwapOut() const; void ImplSetLink( const GfxLink& ); GfxLink ImplGetLink(); - sal_Bool ImplIsLink() const; + bool ImplIsLink() const; sal_uLong ImplGetChecksum() const; - sal_Bool ImplExportNative( SvStream& rOStm ) const; + bool ImplExportNative( SvStream& rOStm ) const; friend SvStream& WriteImpGraphic( SvStream& rOStm, const ImpGraphic& rImpGraphic ); friend SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ); diff --git a/vcl/inc/octree.hxx b/vcl/inc/octree.hxx index f81f1e5fd798..186e4406fac1 100644 --- a/vcl/inc/octree.hxx +++ b/vcl/inc/octree.hxx @@ -36,7 +36,7 @@ typedef struct OctreeNode OctreeNode* pNext; OctreeNode* pNextInCache; sal_uInt16 nPalIndex; - sal_Bool bLeaf; + bool bLeaf; } NODE; typedef NODE* PNODE; diff --git a/vcl/inc/printdlg.hxx b/vcl/inc/printdlg.hxx index e142f0ab0101..11e4ea0e8907 100644 --- a/vcl/inc/printdlg.hxx +++ b/vcl/inc/printdlg.hxx @@ -226,7 +226,7 @@ namespace vcl Size maDetailsCollapsedSize; Size maDetailsExpandedSize; - sal_Bool mbShowLayoutPage; + bool mbShowLayoutPage; Size getJobPageSize(); void updateNup(); diff --git a/vcl/inc/salframe.hxx b/vcl/inc/salframe.hxx index 41b510f7e879..a30ca80c277a 100644 --- a/vcl/inc/salframe.hxx +++ b/vcl/inc/salframe.hxx @@ -115,7 +115,7 @@ public: // Event must be destroyed, when Frame is destroyed // When Event is called, SalInstance::Yield() must be returned - virtual sal_Bool PostEvent( void* pData ) = 0; + virtual bool PostEvent( void* pData ) = 0; virtual void SetTitle( const OUString& rTitle ) = 0; virtual void SetIcon( sal_uInt16 nIcon ) = 0; @@ -142,7 +142,7 @@ public: const SalFrameGeometry& GetUnmirroredGeometry() const { return maGeometry; } virtual void SetWindowState( const SalFrameState* pState ) = 0; - virtual sal_Bool GetWindowState( SalFrameState* pState ) = 0; + virtual bool GetWindowState( SalFrameState* pState ) = 0; virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ) = 0; // Enable/Disable ScreenSaver, SystemAgents, ... @@ -173,7 +173,7 @@ public: // returns in 'rKeyCode' the single keycode that translates to the given unicode when using a keyboard layout of language 'aLangType' // returns sal_False if no mapping exists or function not supported // this is required for advanced menu support - virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0; + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ) = 0; // returns the input language used for the last key stroke // may be LANGUAGE_DONTKNOW if not supported by the OS diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx index 7c3ffdb005e8..3c4d04709432 100644 --- a/vcl/inc/salgdi.hxx +++ b/vcl/inc/salgdi.hxx @@ -110,9 +110,9 @@ protected: const ::basegfx::B2DVector& rLineWidths, basegfx::B2DLineJoin, com::sun::star::drawing::LineCap) = 0; - virtual sal_Bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0; - virtual sal_Bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0; - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) = 0; + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0; + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ) = 0; + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ) = 0; // CopyArea --> No RasterOp, but ClipRegion virtual void copyArea( long nDestX, long nDestY, long nSrcX, long nSrcY, long nSrcWidth, @@ -139,15 +139,15 @@ protected: virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags) = 0; virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ) = 0; - virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) = 0; + virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize ) = 0; // native widget rendering methods that require mirroring - virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ); - virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ); - virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); @@ -260,7 +260,7 @@ public: // rInfo: additional outgoing information // implementation note: encoding 0 with glyph id 0 should be added implicitly // as "undefined character" - virtual sal_Bool CreateFontSubset( const OUString& rToFile, + virtual bool CreateFontSubset( const OUString& rToFile, const PhysicalFontFace* pFont, sal_GlyphId* pGlyphIDs, sal_uInt8* pEncoding, @@ -352,7 +352,7 @@ public: void mirror( long& nX, const OutputDevice *pOutDev, bool bBack = false ) const; void mirror( long& nX, long& nWidth, const OutputDevice *pOutDev, bool bBack = false ) const; - sal_Bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const; + bool mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack = false ) const; void mirror( Rectangle& rRect, const OutputDevice*, bool bBack = false ) const; void mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack = false ) const; void mirror( ImplControlValue&, const OutputDevice*, bool bBack = false ) const; @@ -385,15 +385,15 @@ public: com::sun::star::drawing::LineCap i_eLineCap, const OutputDevice* i_pOutDev); - sal_Bool DrawPolyLineBezier( sal_uInt32 nPoints, + bool DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice *pOutDev ); - sal_Bool DrawPolygonBezier( sal_uInt32 nPoints, + bool DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice *pOutDev ); - sal_Bool DrawPolyPolygonBezier( sal_uInt32 nPoly, + bool DrawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry, @@ -443,7 +443,7 @@ public: SalInvert nFlags, const OutputDevice *pOutDev ); - sal_Bool DrawEPS( long nX, long nY, + bool DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, @@ -452,10 +452,10 @@ public: // native widget rendering functions // Query the platform layer for control support - virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); + virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); // Query the native control to determine if it was acted upon - sal_Bool HitTestNativeControl( ControlType nType, + bool HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, @@ -463,7 +463,7 @@ public: const OutputDevice *pOutDev ); // Request rendering of a particular control and/or part - sal_Bool DrawNativeControl( ControlType nType, + bool DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -472,7 +472,7 @@ public: const OutputDevice *pOutDev ); // Query the native control's actual drawing region (including adornment) - sal_Bool GetNativeControlRegion( ControlType nType, + bool GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, diff --git a/vcl/inc/salmenu.hxx b/vcl/inc/salmenu.hxx index 2a15583dbbfa..6515fc2fab0f 100644 --- a/vcl/inc/salmenu.hxx +++ b/vcl/inc/salmenu.hxx @@ -65,7 +65,7 @@ public: SalMenu() {} virtual ~SalMenu(); - virtual sal_Bool VisibleMenuBar() = 0; // must return sal_True to actually DISPLAY native menu bars + virtual bool VisibleMenuBar() = 0; // must return sal_True to actually DISPLAY native menu bars // otherwise only menu messages are processed (eg, OLE on Windows) virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ) = 0; diff --git a/vcl/inc/salobj.hxx b/vcl/inc/salobj.hxx index 302200a6a9c2..219e2ce026fe 100644 --- a/vcl/inc/salobj.hxx +++ b/vcl/inc/salobj.hxx @@ -39,10 +39,10 @@ class VCL_PLUGIN_PUBLIC SalObject { void* m_pInst; SALOBJECTPROC m_pCallback; - sal_Bool m_bMouseTransparent:1, + bool m_bMouseTransparent:1, m_bEraseBackground:1; public: - SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( sal_False ), m_bEraseBackground( sal_True ) {} + SalObject() : m_pInst( NULL ), m_pCallback( NULL ), m_bMouseTransparent( false ), m_bEraseBackground( true ) {} virtual ~SalObject(); virtual void ResetClipRegion() = 0; @@ -67,13 +67,13 @@ public: { m_pInst = pInst; m_pCallback = pProc; } long CallCallback( sal_uInt16 nEvent, const void* pEvent ) { return m_pCallback ? m_pCallback( m_pInst, this, nEvent, pEvent ) : 0; } - void SetMouseTransparent( sal_Bool bMouseTransparent ) + void SetMouseTransparent( bool bMouseTransparent ) { m_bMouseTransparent = bMouseTransparent; } - sal_Bool IsMouseTransparent() + bool IsMouseTransparent() { return m_bMouseTransparent; } - void EnableEraseBackground( sal_Bool bEnable ) + void EnableEraseBackground( bool bEnable ) { m_bEraseBackground = bEnable; } - sal_Bool IsEraseBackgroundEnabled() + bool IsEraseBackgroundEnabled() { return m_bEraseBackground; } }; diff --git a/vcl/inc/salprn.hxx b/vcl/inc/salprn.hxx index 3e96c557122f..ce003ff17354 100644 --- a/vcl/inc/salprn.hxx +++ b/vcl/inc/salprn.hxx @@ -61,15 +61,15 @@ public: virtual SalGraphics* GetGraphics() = 0; virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; - virtual sal_Bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0; + virtual bool Setup( SalFrame* pFrame, ImplJobSetup* pSetupData ) = 0; // This function set the driver data and // set the new indepen data in pSetupData - virtual sal_Bool SetPrinterData( ImplJobSetup* pSetupData ) = 0; + virtual bool SetPrinterData( ImplJobSetup* pSetupData ) = 0; // This function merged the indepen driver data // and set the new indepen data in pSetupData // Only the data must changed, where the bit // in nFlags is set - virtual sal_Bool SetData( sal_uLong nFlags, ImplJobSetup* pSetupData ) = 0; + virtual bool SetData( sal_uLong nFlags, ImplJobSetup* pSetupData ) = 0; virtual void GetPageInfo( const ImplJobSetup* pSetupData, long& rOutWidth, long& rOutHeight, @@ -90,7 +90,7 @@ public: SalPrinter() {} virtual ~SalPrinter(); - virtual sal_Bool StartJob( const OUString* pFileName, + virtual bool StartJob( const OUString* pFileName, const OUString& rJobName, const OUString& rAppName, sal_uLong nCopies, @@ -100,16 +100,16 @@ public: // implement for pull model print systems only, // default implementations (see salvtables.cxx) just returns sal_False - virtual sal_Bool StartJob( const OUString* pFileName, + virtual bool StartJob( const OUString* pFileName, const OUString& rJobName, const OUString& rAppName, ImplJobSetup* pSetupData, vcl::PrinterController& rController ); - virtual sal_Bool EndJob() = 0; - virtual sal_Bool AbortJob() = 0; + virtual bool EndJob() = 0; + virtual bool AbortJob() = 0; virtual SalGraphics* StartPage( ImplJobSetup* pSetupData, sal_Bool bNewJobData ) = 0; - virtual sal_Bool EndPage() = 0; + virtual bool EndPage() = 0; virtual sal_uLong GetErrorCode() = 0; }; diff --git a/vcl/inc/salvd.hxx b/vcl/inc/salvd.hxx index 2720e34f99bc..736ee06822a5 100644 --- a/vcl/inc/salvd.hxx +++ b/vcl/inc/salvd.hxx @@ -37,10 +37,10 @@ public: virtual void ReleaseGraphics( SalGraphics* pGraphics ) = 0; // Set new size, without saving the old contents - virtual sal_Bool SetSize( long nNewDX, long nNewDY ) = 0; + virtual bool SetSize( long nNewDX, long nNewDY ) = 0; // Set new size using a buffer at the given address - virtual sal_Bool SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray & /* pBuffer */ ) + virtual bool SetSizeUsingBuffer( long nNewDX, long nNewDY, const basebmp::RawMemorySharedArray & /* pBuffer */ ) { // Only the headless virtual device has an implementation that uses pBuffer. return SetSize( nNewDX, nNewDY ); diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx index b592a6ab7768..22b71c6b9d94 100644 --- a/vcl/inc/salwtype.hxx +++ b/vcl/inc/salwtype.hxx @@ -155,11 +155,11 @@ struct SalWheelMouseEvent long mnNotchDelta; // Number of fixed rotations sal_uLong mnScrollLines; // Actual number of lines to scroll sal_uInt16 mnCode; // SV-Modifiercode (KEY_SHIFT|KEY_MOD1|KEY_MOD2|MOUSE_LEFT|MOUSE_MIDDLE|MOUSE_RIGHT) - sal_Bool mbHorz; // Horizontal - sal_Bool mbDeltaIsPixel; // delta value is a pixel value (on touch devices) + bool mbHorz; // Horizontal + bool mbDeltaIsPixel; // delta value is a pixel value (on touch devices) SalWheelMouseEvent() - : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( sal_False ), mbDeltaIsPixel( sal_False ) + : mnTime( 0 ), mnX( 0 ), mnY( 0 ), mnDelta( 0 ), mnNotchDelta( 0 ), mnScrollLines( 0 ), mnCode( 0 ), mbHorz( false ), mbDeltaIsPixel( false ) {} }; diff --git a/vcl/inc/sft.hxx b/vcl/inc/sft.hxx index c86b5a271a68..ba69bda08d9b 100644 --- a/vcl/inc/sft.hxx +++ b/vcl/inc/sft.hxx @@ -505,7 +505,7 @@ namespace vcl * MapString() replaces the UCS-2 characters in str with glyphIDs. * @ingroup sft */ - int VCL_DLLPUBLIC MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, int bvertical); + int VCL_DLLPUBLIC MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, bool bvertical); /** * Maps a Unicode (UCS-2) character to a glyph ID and returns it. Missing glyph has diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx index ec9c475c5395..f46bf003f9cc 100644 --- a/vcl/inc/svdata.hxx +++ b/vcl/inc/svdata.hxx @@ -134,11 +134,11 @@ struct ImplSVAppData sal_uInt16 mnSysWinMode; // Mode, when SystemWindows should be created sal_uInt16 mnLayout; // --- RTL-Flags --- currently not used, only for testing short mnDialogScaleX; // Scale X-Positions and sizes in Dialogs - sal_Bool mbInAppMain; // is Application::Main() on stack - sal_Bool mbInAppExecute; // is Application::Execute() on stack - sal_Bool mbAppQuit; // is Application::Quit() called - sal_Bool mbSettingsInit; // sal_True: Settings are initialized - sal_Bool mbNoYield; // Application::Yield will not wait for events if the queue is empty + bool mbInAppMain; // is Application::Main() on stack + bool mbInAppExecute; // is Application::Execute() on stack + bool mbAppQuit; // is Application::Quit() called + bool mbSettingsInit; // sal_True: Settings are initialized + bool mbNoYield; // Application::Yield will not wait for events if the queue is empty // essentially that makes it the same as Application::Reschedule Application::DialogCancelMode meDialogCancel; // sal_True: All Dialog::Execute() calls will be terminated immediately with return sal_False long mnDefaultLayoutBorder; // default value in pixel for layout distances used @@ -175,7 +175,7 @@ struct ImplSVGDIData long mnRealAppFontX; // AppFont X-Numenator for 40/tel Width long mnAppFontX; // AppFont X-Numenator for 40/tel Width + DialogScaleX long mnAppFontY; // AppFont Y-Numenator for 80/tel Height - sal_Bool mbFontSubChanged; // sal_True: FontSubstitution was changed between Begin/End + bool mbFontSubChanged; // sal_True: FontSubstitution was changed between Begin/End bool mbNativeFontConfig; // true: do not override UI font bool mbNoXORClipping; // true: do not use XOR to achieve clipping effects }; @@ -200,9 +200,9 @@ struct ImplSVWinData Window* mpAutoScrollWin; // window, that is in AutoScrollMode mode sal_uInt16 mnTrackFlags; // tracking flags sal_uInt16 mnAutoScrollFlags; // auto scroll flags - sal_Bool mbNoDeactivate; // sal_True: do not execute Deactivate - sal_Bool mbNoSaveFocus; // sal_True: menus must not save/restore focus - sal_Bool mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant + bool mbNoDeactivate; // sal_True: do not execute Deactivate + bool mbNoSaveFocus; // sal_True: menus must not save/restore focus + bool mbNoSaveBackground; // sal_True: save background is unnecessary or even less performant }; @@ -236,16 +236,16 @@ struct ImplSVCtrlData struct ImplSVHelpData { - sal_Bool mbContextHelp : 1; // is ContextHelp enabled - sal_Bool mbExtHelp : 1; // is ExtendedHelp enabled - sal_Bool mbExtHelpMode : 1; // is in ExtendedHelp Mode - sal_Bool mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started - sal_Bool mbBalloonHelp : 1; // is BalloonHelp enabled - sal_Bool mbQuickHelp : 1; // is QuickHelp enabled - sal_Bool mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard - sal_Bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard - sal_Bool mbAutoHelpId : 1; // generate HelpIds - sal_Bool mbRequestingHelp : 1; // In Window::RequestHelp + bool mbContextHelp : 1; // is ContextHelp enabled + bool mbExtHelp : 1; // is ExtendedHelp enabled + bool mbExtHelpMode : 1; // is in ExtendedHelp Mode + bool mbOldBalloonMode : 1; // BallonMode, befor ExtHelpMode started + bool mbBalloonHelp : 1; // is BalloonHelp enabled + bool mbQuickHelp : 1; // is QuickHelp enabled + bool mbSetKeyboardHelp : 1; // tiphelp was activated by keyboard + bool mbKeyboardHelp : 1; // tiphelp was activated by keyboard + bool mbAutoHelpId : 1; // generate HelpIds + bool mbRequestingHelp : 1; // In Window::RequestHelp HelpTextWindow* mpHelpWin; // HelpWindow sal_uLong mnLastHelpHideTime; // ticks of last show }; @@ -308,7 +308,7 @@ struct ImplSVData SalInstance* mpDefInst; // Default SalInstance Application* mpApp; // pApp WorkWindow* mpDefaultWin; // Default-Window - sal_Bool mbDeInit; // Is VCL deinitializing + bool mbDeInit; // Is VCL deinitializing sal_uLong mnThreadCount; // is VCL MultiThread enabled ImplConfigData* mpFirstConfigData; // Zeiger auf ersten Config-Block ImplTimerData* mpFirstTimerData; // list of all running timers @@ -318,8 +318,8 @@ struct ImplSVData ResMgr* mpResMgr; // SV-Resource-Manager sal_uLong mnTimerPeriod; // current timer period sal_uLong mnTimerUpdate; // TimerCallbackProcs on stack - sal_Bool mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden - sal_Bool mbNoCallTimer; // sal_True: No Timeout calls + bool mbNotAllTimerCalled;// sal_True: Es muessen noch Timer abgearbeitet werden + bool mbNoCallTimer; // sal_True: No Timeout calls ImplSVAppData maAppData; // indepen data for class Application ImplSVGDIData maGDIData; // indepen data for Output classes ImplSVWinData maWinData; // indepen data for Windows classes @@ -330,7 +330,7 @@ struct ImplSVData Window* mpIntroWindow; // the splash screen DockingManager* mpDockingManager; BlendFrameCache* mpBlendFrameCache; - sal_Bool mbIsTestTool; + bool mbIsTestTool; oslThreadIdentifier mnMainThreadId; rtl::Reference< vcl::DisplayConnection > mxDisplayConnection; @@ -377,18 +377,18 @@ struct ImplDelData { ImplDelData* mpNext; const Window* mpWindow; - sal_Bool mbDel; + bool mbDel; ImplDelData( const Window* pWindow = NULL ) - : mpNext( NULL ), mpWindow( NULL ), mbDel( sal_False ) + : mpNext( NULL ), mpWindow( NULL ), mbDel( false ) { if( pWindow ) AttachToWindow( pWindow ); } virtual ~ImplDelData(); bool IsDead() const { - DBG_ASSERT( mbDel == sal_False, "object deleted while in use !" ); - return (mbDel!=sal_False); + DBG_ASSERT( mbDel == false, "object deleted while in use !" ); + return mbDel; } private: @@ -402,7 +402,7 @@ struct ImplSVEvent Link* mpLink; Window* mpWindow; ImplDelData maDelData; - sal_Bool mbCall; + bool mbCall; }; #endif // INCLUDED_VCL_INC_SVDATA_HXX diff --git a/vcl/inc/toolbox.h b/vcl/inc/toolbox.h index 6c8bd8e39621..bfffe7bcffd6 100644 --- a/vcl/inc/toolbox.h +++ b/vcl/inc/toolbox.h @@ -95,24 +95,24 @@ struct ImplToolItem // the default size is the precomputed size for standard items // ie those that are just ordinary buttons (no windows or text etc.) // bCheckMaxWidth indicates that item windows must not exceed maxWidth in which case they will be painted as buttons - Size GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ); + Size GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ); // only useful for buttons: returns if the text or image part or both can be drawn according to current button drawing style - void DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const; + void DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbImage, bool& rbText ) const; // returns the rectangle which contains the drop down arrow // or an empty rect if there is none // bHorz denotes the toolbox alignment - Rectangle GetDropDownRect( sal_Bool bHorz ) const; + Rectangle GetDropDownRect( bool bHorz ) const; // returns sal_True if the toolbar item is currently clipped, which can happen for docked toolbars - sal_Bool IsClipped() const; + bool IsClipped() const; // returns sal_True if the toolbar item is currently hidden i.e. they are unchecked in the toolbar Customize menu - sal_Bool IsItemHidden() const; + bool IsItemHidden() const; private: - void init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, sal_Bool bEmptyBtn); + void init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, bool bEmptyBtn); }; namespace vcl @@ -163,7 +163,7 @@ struct ImplToolBoxPrivateData vcl::IImageListProvider* mpImageListProvider; vcl::ImageListType meImageListType; - sal_Bool mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper + bool mbIsLocked:1, // keeps last lock state from ImplDockingWindowWrapper mbAssumeDocked:1, // only used during calculations to override current floating/popup mode mbAssumeFloating:1, mbAssumePopupMode:1, diff --git a/vcl/inc/unx/gtk/gtkframe.hxx b/vcl/inc/unx/gtk/gtkframe.hxx index 0cf197a7d70d..bd2fd96dbbc8 100644 --- a/vcl/inc/unx/gtk/gtkframe.hxx +++ b/vcl/inc/unx/gtk/gtkframe.hxx @@ -323,7 +323,7 @@ public: // and false else; if true was returned the event should // be swallowed bool Dispatch( const XEvent* pEvent ); - void grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents = sal_False ); + void grabPointer( bool bGrab, bool bOwnerEvents = false ); GtkSalDisplay* getDisplay(); GdkDisplay* getGdkDisplay(); @@ -356,7 +356,7 @@ public: // Event must be destroyed, when Frame is destroyed // When Event is called, SalInstance::Yield() must be returned - virtual sal_Bool PostEvent( void* pData ); + virtual bool PostEvent( void* pData ); virtual void SetTitle( const OUString& rTitle ); virtual void SetIcon( sal_uInt16 nIcon ); @@ -379,7 +379,7 @@ public: virtual void GetWorkArea( Rectangle& rRect ); virtual SalFrame* GetParent() const; virtual void SetWindowState( const SalFrameState* pState ); - virtual sal_Bool GetWindowState( SalFrameState* pState ); + virtual bool GetWindowState( SalFrameState* pState ); virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nDisplay ); // Enable/Disable ScreenSaver, SystemAgents, ... virtual void StartPresentation( sal_Bool bStart ); @@ -405,7 +405,7 @@ public: virtual void EndExtTextInput( sal_uInt16 nFlags ); virtual OUString GetKeyName( sal_uInt16 nKeyCode ); - virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); // returns the input language used for the last key stroke // may be LANGUAGE_DONTKNOW if not supported by the OS diff --git a/vcl/inc/unx/gtk/gtkgdi.hxx b/vcl/inc/unx/gtk/gtkgdi.hxx index 628221bf1f94..d3c540b0307f 100644 --- a/vcl/inc/unx/gtk/gtkgdi.hxx +++ b/vcl/inc/unx/gtk/gtkgdi.hxx @@ -42,12 +42,12 @@ public: long nSrcX, long nSrcY, long nSrcWidth, long nSrcHeight, sal_uInt16 /*nFlags*/ ); - virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); - virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, + virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, @@ -130,17 +130,17 @@ public: // will be set when UI theme was changed - static sal_Bool bThemeChanged; - static sal_Bool bNeedPixmapPaint; + static bool bThemeChanged; + static bool bNeedPixmapPaint; // native widget methods - virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); - virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); + virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) SAL_OVERRIDE; - virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ); @@ -163,115 +163,115 @@ protected: typedef std::list< Rectangle > clipList; GdkPixmap* NWGetPixmapFromScreen( Rectangle srcRect ); - sal_Bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ); + bool NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ); - sal_Bool NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKScrollbar( ControlType nType, ControlPart nPart, + bool NWPaintGTKScrollbar( ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKSpinBox( ControlType nType, ControlPart nPart, + bool NWPaintGTKSpinBox( ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKTabItem( ControlType nType, ControlPart nPart, + bool NWPaintGTKTabItem( ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKProgress( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKSlider( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, const OUString& rCaption ); - sal_Bool NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, + bool NWPaintGTKListNode( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, ControlState nState, const ImplControlValue& aValue, diff --git a/vcl/inc/unx/gtk/gtkobject.hxx b/vcl/inc/unx/gtk/gtkobject.hxx index 99fd9cb3f8a0..39ef5b80222a 100644 --- a/vcl/inc/unx/gtk/gtkobject.hxx +++ b/vcl/inc/unx/gtk/gtkobject.hxx @@ -40,7 +40,7 @@ class GtkSalObject : public SalObject static gboolean signalFocus( GtkWidget*, GdkEventFocus*, gpointer ); static void signalDestroy( GtkWidget*, gpointer ); public: - GtkSalObject( GtkSalFrame* pParent, sal_Bool bShow = sal_True ); + GtkSalObject( GtkSalFrame* pParent, bool bShow = true ); virtual ~GtkSalObject(); // overload all pure virtual methods diff --git a/vcl/inc/unx/gtk/gtkprn.hxx b/vcl/inc/unx/gtk/gtkprn.hxx index 2550dd38052f..8e955a32d1d7 100644 --- a/vcl/inc/unx/gtk/gtkprn.hxx +++ b/vcl/inc/unx/gtk/gtkprn.hxx @@ -24,11 +24,11 @@ public: GtkSalPrinter(SalInfoPrinter* i_pInfoPrinter); using PspSalPrinter::StartJob; - virtual sal_Bool StartJob( + virtual bool StartJob( const OUString* i_pFileName, const OUString& i_rJobName, const OUString& i_rAppName, ImplJobSetup* io_pSetupData, vcl::PrinterController& io_rController); - virtual sal_Bool EndJob(); + virtual bool EndJob(); private: bool impl_doJob( diff --git a/vcl/inc/unx/gtk/gtksalmenu.hxx b/vcl/inc/unx/gtk/gtksalmenu.hxx index 4b2ac33dc26f..aa99268f82f8 100644 --- a/vcl/inc/unx/gtk/gtksalmenu.hxx +++ b/vcl/inc/unx/gtk/gtksalmenu.hxx @@ -40,7 +40,7 @@ class GtkSalMenu : public SalMenu private: std::vector< GtkSalMenuItem* > maItems; - sal_Bool mbMenuBar; + bool mbMenuBar; Menu* mpVCLMenu; GtkSalMenu* mpOldSalMenu; GtkSalMenu* mpParentSalMenu; @@ -55,10 +55,10 @@ private: void ActivateAllSubmenus(MenuBar* pMenuBar); public: - GtkSalMenu( sal_Bool bMenuBar ); + GtkSalMenu( bool bMenuBar ); virtual ~GtkSalMenu(); - virtual sal_Bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars + virtual bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars // otherwise only menu messages are processed (eg, OLE on Windows) virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); @@ -83,7 +83,7 @@ public: virtual GtkSalMenuItem* GetItemAtPos( unsigned nPos ) { return maItems[ nPos ]; } virtual void SetActionGroup( GActionGroup* pActionGroup ) { mpActionGroup = pActionGroup; } virtual GActionGroup* GetActionGroup() { return mpActionGroup; } - virtual sal_Bool IsItemVisible( unsigned nPos ); + virtual bool IsItemVisible( unsigned nPos ); void NativeSetItemText( unsigned nSection, unsigned nItemPos, const OUString& rText ); void NativeSetItemCommand( unsigned nSection, @@ -100,7 +100,7 @@ public: void DispatchCommand( gint itemId, const gchar* aCommand ); void Activate(); void Deactivate( const gchar* aMenuCommand ); - void Display( sal_Bool bVisible ); + void Display( bool bVisible ); bool PrepUpdate(); void Update(); // Update this menu only. void UpdateFull(); // Update full menu hierarchy from this menu. @@ -114,7 +114,7 @@ public: sal_uInt16 mnId; // Item ID MenuItemType mnType; // Item type - sal_Bool mbVisible; // Item visibility. + bool mbVisible; // Item visibility. Menu* mpVCLMenu; // VCL Menu into which this menu item is inserted GtkSalMenu* mpParentMenu; // The menu into which this menu item is inserted GtkSalMenu* mpSubMenu; // Submenu of this item (if defined) diff --git a/vcl/inc/unx/i18n_xkb.hxx b/vcl/inc/unx/i18n_xkb.hxx index 2c5f13942ca9..76b21925383f 100644 --- a/vcl/inc/unx/i18n_xkb.hxx +++ b/vcl/inc/unx/i18n_xkb.hxx @@ -27,7 +27,7 @@ class VCLPLUG_GEN_PUBLIC SalI18N_KeyboardExtension { private: - sal_Bool mbUseExtension; + bool mbUseExtension; sal_uInt32 mnDefaultGroup; sal_uInt32 mnGroup; int mnEventBase; @@ -39,9 +39,9 @@ public: SalI18N_KeyboardExtension( Display *pDisplay ); inline ~SalI18N_KeyboardExtension(); - inline sal_Bool UseExtension() const ; // server and client support the + inline bool UseExtension() const ; // server and client support the // extension - inline void UseExtension( sal_Bool bState );// used to disable the Extension + inline void UseExtension( bool bState );// used to disable the Extension void Dispatch( XEvent *pEvent ); // keep track of group changes @@ -59,14 +59,14 @@ SalI18N_KeyboardExtension::~SalI18N_KeyboardExtension() { } -inline sal_Bool +inline bool SalI18N_KeyboardExtension::UseExtension() const { return mbUseExtension; } inline void -SalI18N_KeyboardExtension::UseExtension( sal_Bool bState ) +SalI18N_KeyboardExtension::UseExtension( bool bState ) { mbUseExtension = mbUseExtension && bState; } diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx index 00fcd3ee6869..b9a38daa8f7f 100644 --- a/vcl/inc/unx/saldisp.hxx +++ b/vcl/inc/unx/saldisp.hxx @@ -139,11 +139,11 @@ public: inline Pixel GetUsed() const { return m_nUsed; } inline int GetClass() const { return m_aVisual.GetClass(); } - sal_Bool GetXPixels( XColor &rColor, + bool GetXPixels( XColor &rColor, int r, int g, int b ) const; - inline sal_Bool GetXPixel( XColor &rColor, + inline bool GetXPixel( XColor &rColor, int r, int g, int b ) const; @@ -262,7 +262,7 @@ protected: XLIB_Cursor aPointerCache_[POINTER_COUNT]; // Keyboard - sal_Bool bNumLockFromXS_; // Num Lock handled by X Server + bool bNumLockFromXS_; // Num Lock handled by X Server int nNumLockIndex_; // modifier index in modmap int nNumLockMask_; // keyevent state mask for KeySym nShiftKeySym_; // first shift modifier @@ -290,7 +290,7 @@ protected: void addXineramaScreenUnique( int i, long i_nX, long i_nY, long i_nWidth, long i_nHeight ); public: static SalDisplay *GetSalDisplay( Display* display ); - static sal_Bool BestVisual( Display *pDisp, + static bool BestVisual( Display *pDisp, int nScreen, XVisualInfo &rVI ); @@ -340,7 +340,7 @@ public: const Size& GetScreenSize( SalX11Screen nXScreen ) const { return getDataForScreen( nXScreen ).m_aSize; } srv_vendor_t GetServerVendor() const { return meServerVendor; } void SetServerVendor() { meServerVendor = sal_GetServerVendor(pDisp_); } - sal_Bool IsDisplay() const { return !!pXLib_; } + bool IsDisplay() const { return !!pXLib_; } GC GetMonoGC( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_aMonoGC; } GC GetCopyGC( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_aCopyGC; } GC GetAndInvertedGC( SalX11Screen nXScreen ) const { return getDataForScreen(nXScreen).m_aAndInvertedGC; } @@ -376,7 +376,7 @@ public: unsigned int GetXScreenCount() const { return m_aScreens.size(); } const std::list< SalFrame* >& getFrames() const { return m_aFrames; } - sal_Bool IsNumLockFromXS() const { return bNumLockFromXS_; } + bool IsNumLockFromXS() const { return bNumLockFromXS_; } std::list< SalObject* >& getSalObjects() { return m_aSalObjects; } @@ -403,7 +403,7 @@ public: virtual void Yield(); virtual void PostUserEvent(); - sal_Bool IsEvent(); + bool IsEvent(); void SetupInput( SalI18N_InputMethod *pInputMethod ); }; diff --git a/vcl/inc/unx/salframe.h b/vcl/inc/unx/salframe.h index bb6253f3f34f..d76218b918dc 100644 --- a/vcl/inc/unx/salframe.h +++ b/vcl/inc/unx/salframe.h @@ -89,11 +89,11 @@ class VCLPLUG_GEN_PUBLIC X11SalFrame : public SalFrame Rectangle maRestorePosSize; sal_uIntPtr nStyle_; SalExtStyle mnExtStyle; - sal_Bool bAlwaysOnTop_; - sal_Bool bViewable_; - sal_Bool bMapped_; - sal_Bool mbInShow; - sal_Bool bDefaultPosition_; // client is centered initially + bool bAlwaysOnTop_; + bool bViewable_; + bool bMapped_; + bool mbInShow; + bool bDefaultPosition_; // client is centered initially bool m_bXEmbed; int nVisibility_; int m_nWorkArea; @@ -192,7 +192,7 @@ public: sal_uIntPtr GetStyle() const { return nStyle_; } XLIB_Cursor GetCursor() const { return hCursor_; } - sal_Bool IsCaptured() const { return nCaptured_ == 1; } + bool IsCaptured() const { return nCaptured_ == 1; } #if !defined(__synchronous_extinput__) void HandleExtTextEvent (XClientMessageEvent *pEvent); #endif @@ -217,7 +217,7 @@ public: // call with false to setup graphics with window (GetWindow()) virtual void updateGraphics( bool bClear ); - virtual sal_Bool PostEvent( void* pData ); + virtual bool PostEvent( void* pData ); virtual void SetTitle( const OUString& rTitle ); virtual void SetIcon( sal_uInt16 nIcon ); @@ -234,7 +234,7 @@ public: virtual void GetWorkArea( Rectangle& rRect ); virtual SalFrame* GetParent() const; virtual void SetWindowState( const SalFrameState* pState ); - virtual sal_Bool GetWindowState( SalFrameState* pState ); + virtual bool GetWindowState( SalFrameState* pState ); virtual void ShowFullScreen( sal_Bool bFullScreen, sal_Int32 nMonitor ); virtual void StartPresentation( sal_Bool bStart ); virtual void SetAlwaysOnTop( sal_Bool bOnTop ); @@ -248,7 +248,7 @@ public: virtual void SetInputContext( SalInputContext* pContext ); virtual void EndExtTextInput( sal_uInt16 nFlags ); virtual OUString GetKeyName( sal_uInt16 nKeyCode ); - virtual sal_Bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); + virtual bool MapUnicodeToKeyCode( sal_Unicode aUnicode, LanguageType aLangType, KeyCode& rKeyCode ); virtual LanguageType GetInputLanguage(); virtual void UpdateSettings( AllSettings& rSettings ); virtual void Beep(); diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h index 962c32e60e3f..e6426b226231 100644 --- a/vcl/inc/unx/salgdi.h +++ b/vcl/inc/unx/salgdi.h @@ -108,9 +108,9 @@ protected: SalColor nTextColor_; Pixel nTextPixel_; - sal_Bool bFontVertical_; + bool bFontVertical_; - sal_Bool bDisableGraphite_; + bool bDisableGraphite_; GC pBrushGC_; // Brush attributes SalColor nBrushColor_; @@ -125,20 +125,20 @@ protected: GC pStippleGC_; GC pTrackingGC_; - sal_Bool bWindow_ : 1; // is Window - sal_Bool bPrinter_ : 1; // is Printer - sal_Bool bVirDev_ : 1; // is VirDev - sal_Bool bPenGC_ : 1; // is Pen GC valid - sal_Bool bFontGC_ : 1; // is Font GC valid - sal_Bool bBrushGC_ : 1; // is Brush GC valid - sal_Bool bMonoGC_ : 1; // is Mono GC valid - sal_Bool bCopyGC_ : 1; // is Copy GC valid - sal_Bool bInvertGC_ : 1; // is Invert GC valid - sal_Bool bInvert50GC_ : 1; // is Invert50 GC valid - sal_Bool bStippleGC_ : 1; // is Stipple GC valid - sal_Bool bTrackingGC_ : 1; // is Tracking GC valid + bool bWindow_ : 1; // is Window + bool bPrinter_ : 1; // is Printer + bool bVirDev_ : 1; // is VirDev + bool bPenGC_ : 1; // is Pen GC valid + bool bFontGC_ : 1; // is Font GC valid + bool bBrushGC_ : 1; // is Brush GC valid + bool bMonoGC_ : 1; // is Mono GC valid + bool bCopyGC_ : 1; // is Copy GC valid + bool bInvertGC_ : 1; // is Invert GC valid + bool bInvert50GC_ : 1; // is Invert50 GC valid + bool bStippleGC_ : 1; // is Stipple GC valid + bool bTrackingGC_ : 1; // is Tracking GC valid bool bXORMode_ : 1; // is ROP XOR Mode set - sal_Bool bDitherBrush_ : 1; // is solid or tile + bool bDitherBrush_ : 1; // is solid or tile using SalGraphics::SetClipRegion; void SetClipRegion( GC pGC, @@ -156,7 +156,7 @@ protected: GC pGC, bool bClose ); - sal_Bool GetDitherPixmap ( SalColor nSalColor ); + bool GetDitherPixmap ( SalColor nSalColor ); inline GC GetMonoGC( Pixmap hPixmap ); inline GC GetCopyGC(); @@ -233,7 +233,7 @@ public: virtual void GetDevFontList( ImplDevFontList* ); virtual void ClearDevFontCache(); virtual bool AddTempDevFont( ImplDevFontList*, const OUString& rFileURL, const OUString& rFontName ); - virtual sal_Bool CreateFontSubset( const OUString& rToFile, + virtual bool CreateFontSubset( const OUString& rToFile, const PhysicalFontFace*, sal_GlyphId* pGlyphIDs, sal_uInt8* pEncoding, @@ -277,13 +277,13 @@ public: virtual bool drawFilledTrapezoids( const ::basegfx::B2DTrapezoid*, int nTrapCount, double fTransparency ); #if 1 // TODO: remove these obselete methods - virtual sal_Bool drawPolyLineBezier( sal_uInt32 nPoints, + virtual bool drawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual sal_Bool drawPolygonBezier( sal_uInt32 nPoints, + virtual bool drawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry ); - virtual sal_Bool drawPolyPolygonBezier( sal_uInt32 nPoly, + virtual bool drawPolyPolygonBezier( sal_uInt32 nPoly, const sal_uInt32* pPoints, const SalPoint* const* pPtAry, const sal_uInt8* const* pFlgAry ); @@ -314,7 +314,7 @@ public: virtual void invert( long nX, long nY, long nWidth, long nHeight, SalInvert nFlags ); virtual void invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInvert nFlags ); - virtual sal_Bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); + virtual bool drawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uIntPtr nSize ); virtual bool drawAlphaBitmap( const SalTwoRect&, const SalBitmap& rSourceBitmap, diff --git a/vcl/inc/unx/salmenu.h b/vcl/inc/unx/salmenu.h index 3b545bff969f..5b398ae984c4 100644 --- a/vcl/inc/unx/salmenu.h +++ b/vcl/inc/unx/salmenu.h @@ -29,7 +29,7 @@ public: X11SalMenu() {} virtual ~X11SalMenu(); - virtual sal_Bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars + virtual bool VisibleMenuBar(); // must return TRUE to actually DISPLAY native menu bars // otherwise only menu messages are processed (eg, OLE on Windows) virtual void InsertItem( SalMenuItem* pSalMenuItem, unsigned nPos ); diff --git a/vcl/inc/unx/salobj.h b/vcl/inc/unx/salobj.h index dc65ba5185d9..e8b71eefaa93 100644 --- a/vcl/inc/unx/salobj.h +++ b/vcl/inc/unx/salobj.h @@ -64,10 +64,10 @@ public: XLIB_Window maSecondary; Colormap maColormap; SalClipRegion maClipRegion; - sal_Bool mbVisible; + bool mbVisible; static VCL_DLLPUBLIC bool Dispatch( XEvent* pEvent ); - static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow = sal_True ); + static VCL_DLLPUBLIC X11SalObject* CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow = sal_True ); X11SalObject(); virtual ~X11SalObject(); diff --git a/vcl/inc/unx/salvd.h b/vcl/inc/unx/salvd.h index fe6afd432b32..b1210b3a5243 100644 --- a/vcl/inc/unx/salvd.h +++ b/vcl/inc/unx/salvd.h @@ -41,14 +41,14 @@ class X11SalVirtualDevice : public SalVirtualDevice int nDX_; int nDY_; sal_uInt16 nDepth_; - sal_Bool bGraphics_; // is Graphics used - sal_Bool bExternPixmap_; + bool bGraphics_; // is Graphics used + bool bExternPixmap_; public: X11SalVirtualDevice(); virtual ~X11SalVirtualDevice(); - sal_Bool Init( SalDisplay *pDisplay, + bool Init( SalDisplay *pDisplay, long nDX, long nDY, sal_uInt16 nBitCount, SalX11Screen nXScreen, @@ -66,7 +66,7 @@ public: { return pDisplay_; } - sal_Bool IsDisplay() const + bool IsDisplay() const { return pDisplay_->IsDisplay(); } @@ -80,7 +80,7 @@ public: virtual void ReleaseGraphics( SalGraphics* pGraphics ); // Set new size, without saving the old contents - virtual sal_Bool SetSize( long nNewDX, long nNewDY ); + virtual bool SetSize( long nNewDX, long nNewDY ); virtual void GetSize( long& rWidth, long& rHeight ); }; diff --git a/vcl/inc/window.h b/vcl/inc/window.h index 05b5abb8cc16..279fc27c3518 100644 --- a/vcl/inc/window.h +++ b/vcl/inc/window.h @@ -100,15 +100,15 @@ struct ImplWinData sal_uInt16* mpExtOldAttrAry; Rectangle* mpCursorRect; long mnCursorExtWidth; - sal_Bool mbVertical; + bool mbVertical; Rectangle* mpCompositionCharRects; long mnCompositionCharRects; Rectangle* mpFocusRect; Rectangle* mpTrackRect; sal_uInt16 mnTrackFlags; sal_uInt16 mnIsTopWindow; - sal_Bool mbMouseOver; // tracks mouse over for native widget paint effect - sal_Bool mbEnableNativeWidget; // toggle native widget rendering + bool mbMouseOver; // tracks mouse over for native widget paint effect + bool mbEnableNativeWidget; // toggle native widget rendering ::std::list< Window* > maTopWindowChildren; }; @@ -119,7 +119,7 @@ struct ImplOverlapData Region* mpSaveBackRgn; // saved region, which must be invalidated Window* mpNextBackWin; // next window with saved background sal_uIntPtr mnSaveBackSize; // bitmap size of saved background - sal_Bool mbSaveBack; // sal_True: save background + bool mbSaveBack; // sal_True: save background sal_uInt8 mnTopLevel; // Level for Overlap-Window }; @@ -158,16 +158,16 @@ struct ImplFrameData sal_uInt16 mnMouseCode; // mouse code sal_uInt16 mnMouseMode; // mouse mode MapUnit meMapUnit; // last MapUnit for LogicUnitToPixel - sal_Bool mbHasFocus; // focus - sal_Bool mbInMouseMove; // is MouseMove on stack - sal_Bool mbMouseIn; // is Mouse inside the frame - sal_Bool mbStartDragCalled; // is command startdrag called - sal_Bool mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN - sal_Bool mbMinimized; // set, when FrameSize <= 0 - sal_Bool mbStartFocusState; // FocusState, when sending the event - sal_Bool mbInSysObjFocusHdl; // within a SysChildren's GetFocus handler - sal_Bool mbInSysObjToTopHdl; // within a SysChildren's ToTop handler - sal_Bool mbSysObjFocus; // does a SysChild have focus + bool mbHasFocus; // focus + bool mbInMouseMove; // is MouseMove on stack + bool mbMouseIn; // is Mouse inside the frame + bool mbStartDragCalled; // is command startdrag called + bool mbNeedSysWindow; // set, when FrameSize <= IMPL_MIN_NEEDSYSWIN + bool mbMinimized; // set, when FrameSize <= 0 + bool mbStartFocusState; // FocusState, when sending the event + bool mbInSysObjFocusHdl; // within a SysChildren's GetFocus handler + bool mbInSysObjToTopHdl; // within a SysChildren's ToTop handler + bool mbSysObjFocus; // does a SysChild have focus ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDragSource > mxDragSource; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::dnd::XDropTarget > mxDropTarget; @@ -175,7 +175,7 @@ struct ImplFrameData ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxClipboard; ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::clipboard::XClipboard > mxSelection; - sal_Bool mbInternalDragGestureRecognizer; + bool mbInternalDragGestureRecognizer; }; struct ImplAccessibleInfos @@ -371,7 +371,7 @@ public: // helper methods -bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave, +bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, long nX, long nY, sal_uIntPtr nMsgTime, sal_uInt16 nCode, sal_uInt16 nMode ); void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ); diff --git a/vcl/qa/cppunit/canvasbitmaptest.cxx b/vcl/qa/cppunit/canvasbitmaptest.cxx index 17208ba9b287..690a8225064c 100644 --- a/vcl/qa/cppunit/canvasbitmaptest.cxx +++ b/vcl/qa/cppunit/canvasbitmaptest.cxx @@ -107,7 +107,7 @@ void checkCanvasBitmap( const rtl::Reference<VclCanvasBitmap>& xBmp, xBmp->getSize().Width == 200 && xBmp->getSize().Height == 200); CPPUNIT_ASSERT_MESSAGE( "alpha state mismatch", - xBmp->hasAlpha() == aContainedBmpEx.IsTransparent()); + bool(xBmp->hasAlpha()) == aContainedBmpEx.IsTransparent()); CPPUNIT_ASSERT_MESSAGE( "getScaledBitmap() failed", xBmp->getScaledBitmap( geometry::RealSize2D(500,500), sal_False ).is()); diff --git a/vcl/source/app/dbggui.cxx b/vcl/source/app/dbggui.cxx index 217a2c747d64..79df6f7bf75b 100644 --- a/vcl/source/app/dbggui.cxx +++ b/vcl/source/app/dbggui.cxx @@ -346,7 +346,7 @@ private: public: DbgWindow(); - virtual sal_Bool Close(); + virtual bool Close(); virtual void Resize(); virtual bool PreNotify( NotifyEvent& rNEvt ); void InsertLine( const OUString& rLine ); @@ -455,7 +455,7 @@ DbgWindow::DbgWindow() : // ----------------------------------------------------------------------- -sal_Bool DbgWindow::Close() +bool DbgWindow::Close() { // remember window position OString aState( GetWindowState() ); @@ -469,7 +469,7 @@ sal_Bool DbgWindow::Close() delete this; ImplGetSVData()->maWinData.mpDbgWin = NULL; - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -626,7 +626,7 @@ DbgDialog::DbgDialog() : maXtorThis.Show(); maXtorThis.SetText("T~his"); if ( pData->nTestFlags & DBG_TEST_XTOR_THIS ) - maXtorThis.Check( sal_True ); + maXtorThis.Check( true ); maXtorThis.SetPosSizePixel( LogicToPixel( Point( 10, 15 ), aAppMap ), aButtonSize ); } @@ -635,7 +635,7 @@ DbgDialog::DbgDialog() : maXtorFunc.Show(); maXtorFunc.SetText("~Function"); if ( pData->nTestFlags & DBG_TEST_XTOR_FUNC ) - maXtorFunc.Check( sal_True ); + maXtorFunc.Check( true ); maXtorFunc.SetPosSizePixel( LogicToPixel( Point( 75, 15 ), aAppMap ), aButtonSize ); } @@ -644,7 +644,7 @@ DbgDialog::DbgDialog() : maXtorExit.Show(); maXtorExit.SetText("E~xit"); if ( pData->nTestFlags & DBG_TEST_XTOR_EXIT ) - maXtorExit.Check( sal_True ); + maXtorExit.Check( true ); maXtorExit.SetPosSizePixel( LogicToPixel( Point( 140, 15 ), aAppMap ), aButtonSize ); } @@ -653,7 +653,7 @@ DbgDialog::DbgDialog() : maXtorReport.Show(); maXtorReport.SetText("~Report"); if ( pData->nTestFlags & DBG_TEST_XTOR_REPORT ) - maXtorReport.Check( sal_True ); + maXtorReport.Check( true ); maXtorReport.SetPosSizePixel( LogicToPixel( Point( 205, 15 ), aAppMap ), aButtonSize ); } @@ -662,7 +662,7 @@ DbgDialog::DbgDialog() : maXtorTrace.Show(); maXtorTrace.SetText("~Trace"); if ( pData->nTestFlags & DBG_TEST_XTOR_TRACE ) - maXtorTrace.Check( sal_True ); + maXtorTrace.Check( true ); maXtorTrace.SetPosSizePixel( LogicToPixel( Point( 270, 15 ), aAppMap ), aButtonSize ); } @@ -678,7 +678,7 @@ DbgDialog::DbgDialog() : maProf.Show(); maProf.SetText("~Profiling"); if ( pData->nTestFlags & DBG_TEST_PROFILING ) - maProf.Check( sal_True ); + maProf.Check( true ); maProf.SetPosSizePixel( LogicToPixel( Point( 10, 95 ), aAppMap ), aButtonSize ); } @@ -687,7 +687,7 @@ DbgDialog::DbgDialog() : maRes.Show(); maRes.SetText("~Resourcen"); if ( pData->nTestFlags & DBG_TEST_RESOURCE ) - maRes.Check( sal_True ); + maRes.Check( true ); maRes.SetPosSizePixel( LogicToPixel( Point( 75, 95 ), aAppMap ), aButtonSize ); } @@ -696,7 +696,7 @@ DbgDialog::DbgDialog() : maDialog.Show(); maDialog.SetText("~Dialog"); if ( pData->nTestFlags & DBG_TEST_DIALOG ) - maDialog.Check( sal_True ); + maDialog.Check( true ); maDialog.SetPosSizePixel( LogicToPixel( Point( 140, 95 ), aAppMap ), aButtonSize ); } @@ -705,7 +705,7 @@ DbgDialog::DbgDialog() : maBoldAppFont.Show(); maBoldAppFont.SetText("~Bold AppFont"); if ( pData->nTestFlags & DBG_TEST_BOLDAPPFONT ) - maBoldAppFont.Check( sal_True ); + maBoldAppFont.Check( true ); maBoldAppFont.SetPosSizePixel( LogicToPixel( Point( 205, 95 ), aAppMap ), aButtonSize ); maBoldAppFont.SaveValue(); @@ -730,7 +730,7 @@ DbgDialog::DbgDialog() : maOverwrite.Show(); maOverwrite.SetText("Overwrite ~File"); if ( pData->bOverwrite ) - maOverwrite.Check( sal_True ); + maOverwrite.Check( true ); maOverwrite.SetPosSizePixel( LogicToPixel( Point( 205, 130 ), aAppMap ), aButtonSize ); } @@ -739,7 +739,7 @@ DbgDialog::DbgDialog() : maHookOSLBox.Show(); maHookOSLBox.SetText("Reroute osl debug ~messages"); if ( pData->bHookOSLAssert ) - maHookOSLBox.Check( sal_True ); + maHookOSLBox.Check( true ); maHookOSLBox.SetPosSizePixel( LogicToPixel( Point( 10, 240 ), aAppMap ), LogicToPixel( Size( 100, 12 ), aAppMap ) ); } @@ -1075,7 +1075,7 @@ DbgInfoDialog::DbgInfoDialog( Window* pParent, bool bHelpText ) : void DbgInfoDialog::SetInfoText( const OUString& rStr ) { - maListBox.SetUpdateMode( sal_False ); + maListBox.SetUpdateMode( false ); maListBox.Clear(); OUString aStr = convertLineEnd(rStr, LINEEND_LF); sal_Int32 nStrIndex = 0; @@ -1118,7 +1118,7 @@ void DbgInfoDialog::SetInfoText( const OUString& rStr ) nStrIndex = nFoundIndex+1; } while ( nFoundIndex != -1 ); - maListBox.SetUpdateMode( sal_True ); + maListBox.SetUpdateMode( true ); } // ======================================================================= diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index 69a0836584d1..d70bb7335d17 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -61,14 +61,14 @@ Help::~Help() // ----------------------------------------------------------------------- -sal_Bool Help::Start( const OUString&, const Window* ) +bool Help::Start( const OUString&, const Window* ) { - return sal_False; + return false; } -sal_Bool Help::SearchKeyword( const OUString& ) +bool Help::SearchKeyword( const OUString& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -82,19 +82,19 @@ OUString Help::GetHelpText( const OUString&, const Window* ) void Help::EnableContextHelp() { - ImplGetSVData()->maHelpData.mbContextHelp = sal_True; + ImplGetSVData()->maHelpData.mbContextHelp = true; } // ----------------------------------------------------------------------- void Help::DisableContextHelp() { - ImplGetSVData()->maHelpData.mbContextHelp = sal_False; + ImplGetSVData()->maHelpData.mbContextHelp = false; } // ----------------------------------------------------------------------- -sal_Bool Help::IsContextHelpEnabled() +bool Help::IsContextHelpEnabled() { return ImplGetSVData()->maHelpData.mbContextHelp; } @@ -103,129 +103,129 @@ sal_Bool Help::IsContextHelpEnabled() void Help::EnableExtHelp() { - ImplGetSVData()->maHelpData.mbExtHelp = sal_True; + ImplGetSVData()->maHelpData.mbExtHelp = true; } // ----------------------------------------------------------------------- void Help::DisableExtHelp() { - ImplGetSVData()->maHelpData.mbExtHelp = sal_False; + ImplGetSVData()->maHelpData.mbExtHelp = false; } // ----------------------------------------------------------------------- -sal_Bool Help::IsExtHelpEnabled() +bool Help::IsExtHelpEnabled() { return ImplGetSVData()->maHelpData.mbExtHelp; } // ----------------------------------------------------------------------- -sal_Bool Help::StartExtHelp() +bool Help::StartExtHelp() { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maHelpData.mbExtHelp && !pSVData->maHelpData.mbExtHelpMode ) { - pSVData->maHelpData.mbExtHelpMode = sal_True; + pSVData->maHelpData.mbExtHelpMode = true; pSVData->maHelpData.mbOldBalloonMode = pSVData->maHelpData.mbBalloonHelp; - pSVData->maHelpData.mbBalloonHelp = sal_True; + pSVData->maHelpData.mbBalloonHelp = true; if ( pSVData->maWinData.mpAppWin ) pSVData->maWinData.mpAppWin->ImplGenerateMouseMove(); - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Help::EndExtHelp() +bool Help::EndExtHelp() { ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maHelpData.mbExtHelp && pSVData->maHelpData.mbExtHelpMode ) { - pSVData->maHelpData.mbExtHelpMode = sal_False; + pSVData->maHelpData.mbExtHelpMode = false; pSVData->maHelpData.mbBalloonHelp = pSVData->maHelpData.mbOldBalloonMode; if ( pSVData->maWinData.mpAppWin ) pSVData->maWinData.mpAppWin->ImplGenerateMouseMove(); - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- void Help::EnableBalloonHelp() { - ImplGetSVData()->maHelpData.mbBalloonHelp = sal_True; + ImplGetSVData()->maHelpData.mbBalloonHelp = true; } // ----------------------------------------------------------------------- void Help::DisableBalloonHelp() { - ImplGetSVData()->maHelpData.mbBalloonHelp = sal_False; + ImplGetSVData()->maHelpData.mbBalloonHelp = false; } // ----------------------------------------------------------------------- -sal_Bool Help::IsBalloonHelpEnabled() +bool Help::IsBalloonHelpEnabled() { return ImplGetSVData()->maHelpData.mbBalloonHelp; } // ----------------------------------------------------------------------- -sal_Bool Help::ShowBalloon( Window* pParent, +bool Help::ShowBalloon( Window* pParent, const Point& rScreenPos, const OUString& rHelpText ) { ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, 0, rHelpText, OUString(), rScreenPos ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool Help::ShowBalloon( Window* pParent, +bool Help::ShowBalloon( Window* pParent, const Point& rScreenPos, const Rectangle& rRect, const OUString& rHelpText ) { ImplShowHelpWindow( pParent, HELPWINSTYLE_BALLOON, 0, rHelpText, OUString(), rScreenPos, &rRect ); - return sal_True; + return true; } // ----------------------------------------------------------------------- void Help::EnableQuickHelp() { - ImplGetSVData()->maHelpData.mbQuickHelp = sal_True; + ImplGetSVData()->maHelpData.mbQuickHelp = true; } // ----------------------------------------------------------------------- void Help::DisableQuickHelp() { - ImplGetSVData()->maHelpData.mbQuickHelp = sal_False; + ImplGetSVData()->maHelpData.mbQuickHelp = false; } // ----------------------------------------------------------------------- -sal_Bool Help::IsQuickHelpEnabled() +bool Help::IsQuickHelpEnabled() { return ImplGetSVData()->maHelpData.mbQuickHelp; } // ----------------------------------------------------------------------- -sal_Bool Help::ShowQuickHelp( Window* pParent, +bool Help::ShowQuickHelp( Window* pParent, const Rectangle& rScreenRect, const OUString& rHelpText, const OUString& rLongHelpText, @@ -234,7 +234,7 @@ sal_Bool Help::ShowQuickHelp( Window* pParent, ImplShowHelpWindow( pParent, HELPWINSTYLE_QUICK, nStyle, rHelpText, rLongHelpText, pParent->OutputToScreenPixel( pParent->GetPointerPosPixel() ), &rScreenRect ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -297,7 +297,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const OUString& rText, sal_uInt maHelpText( rText ) { SetType( WINDOW_HELPTEXTWINDOW ); - ImplSetMouseTransparent( sal_True ); + ImplSetMouseTransparent( true ); mnHelpWinStyle = nHelpWinStyle; mnStyle = nStyle; // on windows this will raise the application window, because help windows are system windows now @@ -310,9 +310,9 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const OUString& rText, sal_uInt SetTextAlign( ALIGN_TOP ); if ( IsNativeControlSupported( CTRL_TOOLTIP, PART_ENTIRE_CONTROL ) ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else @@ -334,7 +334,7 @@ HelpTextWindow::HelpTextWindow( Window* pParent, const OUString& rText, sal_uInt ImplSVData* pSVData = ImplGetSVData(); if ( pSVData->maHelpData.mbSetKeyboardHelp ) - pSVData->maHelpData.mbKeyboardHelp = sal_True; + pSVData->maHelpData.mbKeyboardHelp = true; const HelpSettings& rHelpSettings = pParent->GetSettings().GetHelpSettings(); maShowTimer.SetTimeoutHdl( LINK( this, HelpTextWindow, TimerHdl ) ); @@ -632,7 +632,7 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime ) if( pHelpWin->IsVisible() ) pWindow->Invalidate( aInvRect ); pSVData->maHelpData.mpHelpWin = NULL; - pSVData->maHelpData.mbKeyboardHelp = sal_False; + pSVData->maHelpData.mbKeyboardHelp = false; pHelpWin->Hide(); delete pHelpWin; if( bUpdateHideTime ) diff --git a/vcl/source/app/i18nhelp.cxx b/vcl/source/app/i18nhelp.cxx index 82f0cb3b1434..40585a81ed71 100644 --- a/vcl/source/app/i18nhelp.cxx +++ b/vcl/source/app/i18nhelp.cxx @@ -40,7 +40,7 @@ vcl::I18nHelper::I18nHelper( const ::com::sun::star::uno::Reference< ::com::sun m_xContext = rxContext; mpLocaleDataWrapper = NULL; mpTransliterationWrapper= NULL; - mbTransliterateIgnoreCase = sal_False; + mbTransliterateIgnoreCase = false; } vcl::I18nHelper::~I18nHelper() @@ -119,7 +119,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const OUString& rStr1, const OUString& { // Change mbTransliterateIgnoreCase and destroy the warpper, next call to // ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase - ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = sal_False; + ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = false; delete ((vcl::I18nHelper*)this)->mpTransliterationWrapper; ((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL; } @@ -130,7 +130,7 @@ sal_Int32 vcl::I18nHelper::CompareString( const OUString& rStr1, const OUString& return ImplGetTransliterationWrapper().compareString( aStr1, aStr2 ); } -sal_Bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rStr2 ) const +bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rStr2 ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); @@ -138,7 +138,7 @@ sal_Bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rS { // Change mbTransliterateIgnoreCase and destroy the warpper, next call to // ImplGetTransliterationWrapper() will create a wrapper with the correct bIgnoreCase - ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = sal_True; + ((vcl::I18nHelper*)this)->mbTransliterateIgnoreCase = true; delete ((vcl::I18nHelper*)this)->mpTransliterationWrapper; ((vcl::I18nHelper*)this)->mpTransliterationWrapper = NULL; } @@ -148,11 +148,11 @@ sal_Bool vcl::I18nHelper::MatchString( const OUString& rStr1, const OUString& rS return ImplGetTransliterationWrapper().isMatch( aStr1, aStr2 ); } -sal_Bool vcl::I18nHelper::MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const +bool vcl::I18nHelper::MatchMnemonic( const OUString& rString, sal_Unicode cMnemonicChar ) const { ::osl::Guard< ::osl::Mutex > aGuard( ((vcl::I18nHelper*)this)->maMutex ); - sal_Bool bEqual = sal_False; + bool bEqual = false; sal_Int32 n = rString.indexOf( '~' ); if ( n != -1 ) { @@ -163,7 +163,7 @@ sal_Bool vcl::I18nHelper::MatchMnemonic( const OUString& rString, sal_Unicode cM } -OUString vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const +OUString vcl::I18nHelper::GetNum( long nNumber, sal_uInt16 nDecimals, bool bUseThousandSep, bool bTrailingZeros ) const { return ImplGetLocaleDataWrapper().getNum( nNumber, nDecimals, bUseThousandSep, bTrailingZeros ); } diff --git a/vcl/source/app/idlemgr.cxx b/vcl/source/app/idlemgr.cxx index 419b5d05f4ef..4f7ba2306ce6 100644 --- a/vcl/source/app/idlemgr.cxx +++ b/vcl/source/app/idlemgr.cxx @@ -56,14 +56,14 @@ ImplIdleMgr::~ImplIdleMgr() // ----------------------------------------------------------------------- -sal_Bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ) +bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ) { size_t nPos = (size_t)-1; size_t n = mpIdleList->size(); for ( size_t i = 0; i < n; ++i ) { // we need to check each element to verify that rLink isn't in the array if ( (*mpIdleList)[ i ]->maIdleHdl == rLink ) { - return sal_False; + return false; } if ( nPriority <= (*mpIdleList)[ i ]->mnPriority ) { nPos = i; @@ -87,7 +87,7 @@ sal_Bool ImplIdleMgr::InsertIdleHdl( const Link& rLink, sal_uInt16 nPriority ) if ( !maTimer.IsActive() ) maTimer.Start(); - return sal_True; + return true; } // ----------------------------------------------------------------------- diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 6601446e97f2..8ed1ec84f73b 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -106,10 +106,10 @@ SalPrinter::~SalPrinter() { } -sal_Bool SalPrinter::StartJob( const OUString*, const OUString&, const OUString&, +bool SalPrinter::StartJob( const OUString*, const OUString&, const OUString&, ImplJobSetup*, vcl::PrinterController& ) { - return sal_False; + return false; } SalInfoPrinter::~SalInfoPrinter() diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index 3f5c9c7e0b44..85f76e6be8c2 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -68,7 +68,7 @@ ImplMouseData::ImplMouseData() mnDragLinkCode = KEY_SHIFT | KEY_MOD1; mnContextMenuCode = MOUSE_RIGHT; mnContextMenuClicks = 1; - mbContextMenuDown = sal_True; + mbContextMenuDown = true; mnMiddleButtonAction = MOUSE_MIDDLE_AUTOSCROLL; mnScrollRepeat = 100; mnButtonStartRepeat = 370; @@ -170,10 +170,10 @@ void MouseSettings::CopyData() // ----------------------------------------------------------------------- -sal_Bool MouseSettings::operator ==( const MouseSettings& rSet ) const +bool MouseSettings::operator ==( const MouseSettings& rSet ) const { if ( mpData == rSet.mpData ) - return sal_True; + return true; if ( (mpData->mnOptions == rSet.mpData->mnOptions) && (mpData->mnDoubleClkTime == rSet.mpData->mnDoubleClkTime) && @@ -196,9 +196,9 @@ sal_Bool MouseSettings::operator ==( const MouseSettings& rSet ) const (mpData->mnMenuDelay == rSet.mpData->mnMenuDelay) && (mpData->mnFollow == rSet.mpData->mnFollow) && (mpData->mnWheelBehavior == rSet.mpData->mnWheelBehavior ) ) - return sal_True; + return true; else - return sal_False; + return false; } // ======================================================================= @@ -229,7 +229,7 @@ ImplStyleData::ImplStyleData() : mnAutoMnemonic = 1; mnToolbarIconSize = STYLE_TOOLBAR_ICONSIZE_UNKNOWN; mnSymbolsStyle = STYLE_SYMBOLS_AUTO; - mnUseImagesInMenus = STYLE_MENUIMAGES_AUTO; + mnUseImagesInMenus = AUTO_STATE_AUTO; mnPreferredSymbolsStyle = STYLE_SYMBOLS_AUTO; mpFontOptions = NULL; mnEdgeBlending = 35; @@ -446,15 +446,15 @@ void ImplStyleData::SetStandardStyles() mnFloatTitleHeight = 13; mnTearOffTitleHeight = 8; mnMenuBarHeight = 14; - mnHighContrast = 0; - mnUseSystemUIFonts = 1; - mnUseFlatBorders = 0; - mnUseFlatMenus = 0; - mbPreferredUseImagesInMenus = sal_True; - mnSkipDisabledInMenus = (sal_uInt16)sal_False; - mbHideDisabledMenuItems = sal_False; - mbAcceleratorsInContextMenus = sal_True; - mbPrimaryButtonWarpsSlider = sal_False; + mnHighContrast = false; + mnUseSystemUIFonts = true; + mnUseFlatBorders = false; + mnUseFlatMenus = false; + mbPreferredUseImagesInMenus = true; + mnSkipDisabledInMenus = false; + mbHideDisabledMenuItems = false; + mbAcceleratorsInContextMenus = true; + mbPrimaryButtonWarpsSlider = false; Gradient aGrad( GradientStyle_LINEAR, DEFAULT_WORKSPACE_GRADIENT_START_COLOR, DEFAULT_WORKSPACE_GRADIENT_END_COLOR ); maWorkspaceGradient = Wallpaper( aGrad ); @@ -710,15 +710,17 @@ bool StyleSettings::CheckSymbolStyle( sal_uLong nStyle ) const // ----------------------------------------------------------------------- -sal_Bool StyleSettings::GetUseImagesInMenus() const +bool StyleSettings::GetUseImagesInMenus() const { // icon mode selected in Tools -> Options... -> OpenOffice.org -> View - sal_uInt16 nStyle = mpData->mnUseImagesInMenus; - - if ( nStyle == STYLE_MENUIMAGES_AUTO ) + switch (mpData->mnUseImagesInMenus) { + case AUTO_STATE_OFF: + return false; + case AUTO_STATE_ON: + return true; + case AUTO_STATE_AUTO: return GetPreferredUseImagesInMenus(); - - return (sal_Bool)nStyle; + } } // ----------------------------------------------------------------------- @@ -881,10 +883,10 @@ void StyleSettings::CopyData() // ----------------------------------------------------------------------- -sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const +bool StyleSettings::operator ==( const StyleSettings& rSet ) const { if ( mpData == rSet.mpData ) - return sal_True; + return true; if ( (mpData->mnOptions == rSet.mpData->mnOptions) && (mpData->mnAutoMnemonic == rSet.mpData->mnAutoMnemonic) && @@ -991,9 +993,9 @@ sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const (mpData->maListBoxPreviewDefaultPixelSize == rSet.mpData->maListBoxPreviewDefaultPixelSize) && (mpData->mnListBoxPreviewDefaultLineWidth == rSet.mpData->mnListBoxPreviewDefaultLineWidth) && (mpData->mbPreviewUsesCheckeredBackground == rSet.mpData->mbPreviewUsesCheckeredBackground)) - return sal_True; + return true; else - return sal_False; + return false; } // ======================================================================= @@ -1001,8 +1003,8 @@ sal_Bool StyleSettings::operator ==( const StyleSettings& rSet ) const ImplMiscData::ImplMiscData() { mnRefCount = 1; - mnEnableATT = sal::static_int_cast<sal_uInt16>(~0U); - mnDisablePrinting = sal::static_int_cast<sal_uInt16>(~0U); + mnEnableATT = AUTO_STATE_AUTO; + mnDisablePrinting = AUTO_STATE_AUTO; static const char* pEnv = getenv("SAL_DECIMALSEP_ENABLED" ); // set default without UI mbEnableLocalizedDecimalSep = (pEnv != NULL) ? sal_True : sal_False; } @@ -1080,41 +1082,41 @@ void MiscSettings::CopyData() // ----------------------------------------------------------------------- -sal_Bool MiscSettings::operator ==( const MiscSettings& rSet ) const +bool MiscSettings::operator ==( const MiscSettings& rSet ) const { if ( mpData == rSet.mpData ) - return sal_True; + return true; if ( (mpData->mnEnableATT == rSet.mpData->mnEnableATT ) && (mpData->mnDisablePrinting == rSet.mpData->mnDisablePrinting ) && (mpData->mbEnableLocalizedDecimalSep == rSet.mpData->mbEnableLocalizedDecimalSep ) ) - return sal_True; + return true; else - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool MiscSettings::GetDisablePrinting() const +bool MiscSettings::GetDisablePrinting() const { - if( mpData->mnDisablePrinting == (sal_uInt16)~0 ) + if( mpData->mnDisablePrinting == AUTO_STATE_AUTO ) { OUString aEnable = vcl::SettingsConfigItem::get()-> getValue( OUString( "DesktopManagement" ), OUString( "DisablePrinting" ) ); - mpData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? 1 : 0; + mpData->mnDisablePrinting = aEnable.equalsIgnoreAsciiCase("true") ? AUTO_STATE_ON : AUTO_STATE_OFF; } - return (sal_Bool)mpData->mnDisablePrinting; + return mpData->mnDisablePrinting != AUTO_STATE_OFF; } // ----------------------------------------------------------------------- -sal_Bool MiscSettings::GetEnableATToolSupport() const +bool MiscSettings::GetEnableATToolSupport() const { #ifdef WNT - if( mpData->mnEnableATT == (sal_uInt16)~0 ) + if( mpData->mnEnableATT == AUTO_STATE_AUTO ) { // Check in the Windows registry if an AT tool wants Accessibility support to // be activated .. @@ -1134,10 +1136,21 @@ sal_Bool MiscSettings::GetEnableATToolSupport() const switch (dwType) { case REG_SZ: - mpData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true"))); + mpData->mnEnableATT = ((0 == stricmp((const char *) Data, "1")) || (0 == stricmp((const char *) Data, "true"))) ? AUTO_STATE_ON : AUTO_STATE_OFF; break; case REG_DWORD: - mpData->mnEnableATT = (sal_uInt16) (((DWORD *) Data)[0]); + switch (((DWORD *) Data)[0]) { + case 0: + mpData->mnEnableATT = AUTO_STATE_OFF; + break; + case 1: + mpData->mnEnableATT = AUTO_STATE_ON; + break; + default: + mpData->mnEnableATT = AUTO_STATE_AUTO; + //TODO: or AUTO_STATE_ON? + break; + } break; default: // Unsupported registry type @@ -1150,7 +1163,7 @@ sal_Bool MiscSettings::GetEnableATToolSupport() const } #endif - if( mpData->mnEnableATT == (sal_uInt16)~0 ) + if( mpData->mnEnableATT == AUTO_STATE_AUTO ) { static const char* pEnv = getenv("SAL_ACCESSIBILITY_ENABLED" ); if( !pEnv || !*pEnv ) @@ -1159,21 +1172,21 @@ sal_Bool MiscSettings::GetEnableATToolSupport() const vcl::SettingsConfigItem::get()-> getValue( OUString( "Accessibility" ), OUString( "EnableATToolSupport" ) ); - mpData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? 1 : 0; + mpData->mnEnableATT = aEnable.equalsIgnoreAsciiCase("true") ? AUTO_STATE_ON : AUTO_STATE_OFF; } else { - mpData->mnEnableATT = 1; + mpData->mnEnableATT = AUTO_STATE_ON; } } - return (sal_Bool)mpData->mnEnableATT; + return mpData->mnEnableATT != AUTO_STATE_OFF; } #ifdef WNT void MiscSettings::SetEnableATToolSupport( sal_Bool bEnable ) { - if ( bEnable != mpData->mnEnableATT ) + if ( (bEnable ? AUTO_STATE_ON : AUTO_STATE_OFF) != mpData->mnEnableATT ) { if( bEnable && !ImplInitAccessBridge() ) return; @@ -1218,18 +1231,18 @@ void MiscSettings::SetEnableATToolSupport( sal_Bool bEnable ) setValue( OUString( "Accessibility" ), OUString( "EnableATToolSupport" ), bEnable ? OUString("true") : OUString("false" ) ); - mpData->mnEnableATT = bEnable ? 1 : 0; + mpData->mnEnableATT = bEnable ? AUTO_STATE_ON : AUTO_STATE_OFF; } } #endif -void MiscSettings::SetEnableLocalizedDecimalSep( sal_Bool bEnable ) +void MiscSettings::SetEnableLocalizedDecimalSep( bool bEnable ) { CopyData(); mpData->mbEnableLocalizedDecimalSep = bEnable; } -sal_Bool MiscSettings::GetEnableLocalizedDecimalSep() const +bool MiscSettings::GetEnableLocalizedDecimalSep() const { return mpData->mbEnableLocalizedDecimalSep; } @@ -1319,18 +1332,18 @@ void HelpSettings::CopyData() // ----------------------------------------------------------------------- -sal_Bool HelpSettings::operator ==( const HelpSettings& rSet ) const +bool HelpSettings::operator ==( const HelpSettings& rSet ) const { if ( mpData == rSet.mpData ) - return sal_True; + return true; if ( (mpData->mnOptions == rSet.mpData->mnOptions ) && (mpData->mnTipDelay == rSet.mpData->mnTipDelay ) && (mpData->mnTipTimeout == rSet.mpData->mnTipTimeout ) && (mpData->mnBalloonDelay == rSet.mpData->mnBalloonDelay ) ) - return sal_True; + return true; else - return sal_False; + return false; } // ======================================================================= @@ -1539,11 +1552,11 @@ sal_uLong AllSettings::GetChangeFlags( const AllSettings& rSet ) const // ----------------------------------------------------------------------- -sal_Bool AllSettings::operator ==( const AllSettings& rSet ) const +bool AllSettings::operator ==( const AllSettings& rSet ) const { if ( mpData == rSet.mpData ) - return sal_True; + return true; if ( (mpData->maMouseSettings == rSet.mpData->maMouseSettings) && (mpData->maStyleSettings == rSet.mpData->maStyleSettings) && @@ -1553,10 +1566,10 @@ sal_Bool AllSettings::operator ==( const AllSettings& rSet ) const (mpData->maLocale == rSet.mpData->maLocale) && (mpData->mnWindowUpdate == rSet.mpData->mnWindowUpdate) ) { - return sal_True; + return true; } else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -1612,7 +1625,7 @@ namespace OUString("org.openoffice.Office.Common/I18N/CTL") ); // note: case sensitive ! if ( aNode.isValid() ) { - sal_Bool bTmp = sal_Bool(); + bool bTmp = bool(); ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString("UIMirroring") ); if( aValue >>= bTmp ) { @@ -1720,7 +1733,7 @@ void AllSettings::LocaleSettingsChanged( sal_uInt32 nHint ) if ( nHint & SYSLOCALEOPTIONS_HINT_DECSEP ) { MiscSettings aMiscSettings = aAllSettings.GetMiscSettings(); - sal_Bool bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); + bool bIsDecSepAsLocale = aAllSettings.mpData->maSysLocale.GetOptions().IsDecimalSeparatorAsLocale(); if ( aMiscSettings.GetEnableLocalizedDecimalSep() != bIsDecSepAsLocale ) { aMiscSettings.SetEnableLocalizedDecimalSep( bIsDecSepAsLocale ); diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx index 28171684cdd8..83f0332693d7 100644 --- a/vcl/source/app/svapp.cxx +++ b/vcl/source/app/svapp.cxx @@ -206,7 +206,7 @@ Application::~Application() GlobalDeInitTools(); } -sal_Bool Application::QueryExit() +bool Application::QueryExit() { WorkWindow* pAppWin = ImplGetSVData()->maWinData.mpAppWin; @@ -214,7 +214,7 @@ sal_Bool Application::QueryExit() if ( pAppWin ) return pAppWin->Close(); else - return sal_True; + return true; } void Application::UserEvent( sal_uLong, void* ) @@ -336,12 +336,12 @@ const KeyCode* Application::GetReservedKeyCode( sal_uLong i ) void Application::Execute() { ImplSVData* pSVData = ImplGetSVData(); - pSVData->maAppData.mbInAppExecute = sal_True; + pSVData->maAppData.mbInAppExecute = true; while ( !pSVData->maAppData.mbAppQuit ) Application::Yield(); - pSVData->maAppData.mbInAppExecute = sal_False; + pSVData->maAppData.mbInAppExecute = false; } inline void ImplYield( bool i_bWait, bool i_bAllEvents ) @@ -395,7 +395,7 @@ void Application::Yield() IMPL_STATIC_LINK_NOINSTANCE( ImplSVAppData, ImplQuitMsg, void*, EMPTYARG ) { - ImplGetSVData()->maAppData.mbAppQuit = sal_True; + ImplGetSVData()->maAppData.mbAppQuit = true; return 0; } @@ -427,17 +427,17 @@ void Application::AcquireSolarMutex( sal_uLong nCount ) pSVData->mpDefInst->AcquireYieldMutex( nCount ); } -sal_Bool Application::IsInMain() +bool Application::IsInMain() { return ImplGetSVData()->maAppData.mbInAppMain; } -sal_Bool Application::IsInExecute() +bool Application::IsInExecute() { return ImplGetSVData()->maAppData.mbInAppExecute; } -sal_Bool Application::IsInModalMode() +bool Application::IsInModalMode() { return (ImplGetSVData()->maAppData.mnModalMode != 0); } @@ -459,7 +459,7 @@ sal_uLong Application::GetLastInputInterval() extern int nImplSysDialog; -sal_Bool Application::IsUICaptured() +bool Application::IsUICaptured() { ImplSVData* pSVData = ImplGetSVData(); @@ -468,9 +468,9 @@ sal_Bool Application::IsUICaptured() // D&D active !!! if ( pSVData->maWinData.mpCaptureWin || pSVData->maWinData.mpTrackWin || pSVData->maWinData.mpFirstFloat || nImplSysDialog ) - return sal_True; + return true; else - return sal_False; + return false; } void Application::OverrideSystemSettings( AllSettings& /*rSettings*/ ) @@ -489,10 +489,10 @@ void Application::MergeSystemSettings( AllSettings& rSettings ) { // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings pWindow->ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings ); - pSVData->maAppData.mbSettingsInit = sal_True; + pSVData->maAppData.mbSettingsInit = true; } // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings - pWindow->ImplUpdateGlobalSettings( rSettings, sal_False ); + pWindow->ImplUpdateGlobalSettings( rSettings, false ); } } @@ -561,7 +561,7 @@ void Application::SetSettings( const AllSettings& rSettings ) Window* pClientWin = pFrame; while ( pClientWin->ImplGetClientWindow() ) pClientWin = pClientWin->ImplGetClientWindow(); - pClientWin->UpdateSettings( rSettings, sal_True ); + pClientWin->UpdateSettings( rSettings, true ); Window* pTempWin = pFrame->mpWindowImpl->mpFrameData->mpFirstOverlap; while ( pTempWin ) @@ -570,7 +570,7 @@ void Application::SetSettings( const AllSettings& rSettings ) pClientWin = pTempWin; while ( pClientWin->ImplGetClientWindow() ) pClientWin = pClientWin->ImplGetClientWindow(); - pClientWin->UpdateSettings( rSettings, sal_True ); + pClientWin->UpdateSettings( rSettings, true ); pTempWin = pTempWin->mpWindowImpl->mpNextOverlap; } @@ -698,13 +698,13 @@ void Application::RemoveKeyListener( const Link& rKeyListener ) pSVData->maAppData.mpKeyListeners->removeListener( rKeyListener ); } -sal_Bool Application::HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent ) +bool Application::HandleKey( sal_uLong nEvent, Window *pWin, KeyEvent* pKeyEvent ) { // let listeners process the key event VclWindowEvent aEvent( pWin, nEvent, (void *) pKeyEvent ); ImplSVData* pSVData = ImplGetSVData(); - sal_Bool bProcessed = sal_False; + bool bProcessed = false; if ( pSVData->maAppData.mpKeyListeners ) bProcessed = pSVData->maAppData.mpKeyListeners->Process( &aEvent ); @@ -931,23 +931,23 @@ sal_uLong Application::PostUserEvent( const Link& rLink, void* pCaller ) return nEventId; } -sal_Bool Application::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) +bool Application::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) { ImplSVEvent* pSVEvent = new ImplSVEvent; pSVEvent->mnEvent = 0; pSVEvent->mpData = pCaller; pSVEvent->mpLink = new Link( rLink ); pSVEvent->mpWindow = NULL; - pSVEvent->mbCall = sal_True; + pSVEvent->mbCall = true; rEventId = (sal_uLong)pSVEvent; Window* pDefWindow = ImplGetDefaultWindow(); if ( pDefWindow && pDefWindow->ImplGetFrame()->PostEvent( pSVEvent ) ) - return sal_True; + return true; else { rEventId = 0; delete pSVEvent; - return sal_False; + return false; } } @@ -969,11 +969,11 @@ void Application::RemoveUserEvent( sal_uLong nUserEvent ) pSVEvent->mpWindow = NULL; } - pSVEvent->mbCall = sal_False; + pSVEvent->mbCall = false; } } -sal_Bool Application::InsertIdleHdl( const Link& rLink, sal_uInt16 nPrio ) +bool Application::InsertIdleHdl( const Link& rLink, sal_uInt16 nPrio ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1236,7 +1236,7 @@ unsigned int Application::GetBestScreen( const Rectangle& i_rRect ) return nBestMatchScreen; } -sal_Bool Application::InsertAccel( Accelerator* pAccel ) +bool Application::InsertAccel( Accelerator* pAccel ) { ImplSVData* pSVData = ImplGetSVData(); @@ -1263,17 +1263,17 @@ Help* Application::GetHelp() return ImplGetSVData()->maAppData.mpHelp; } -void Application::EnableAutoHelpId( sal_Bool bEnabled ) +void Application::EnableAutoHelpId( bool bEnabled ) { ImplGetSVData()->maHelpData.mbAutoHelpId = bEnabled; } -sal_Bool Application::IsAutoHelpIdEnabled() +bool Application::IsAutoHelpIdEnabled() { return ImplGetSVData()->maHelpData.mbAutoHelpId; } -void Application::EnableAutoMnemonic( sal_Bool bEnabled ) +void Application::EnableAutoMnemonic( bool bEnabled ) { AllSettings aSettings = GetSettings(); StyleSettings aStyle = aSettings.GetStyleSettings(); @@ -1282,7 +1282,7 @@ void Application::EnableAutoMnemonic( sal_Bool bEnabled ) SetSettings( aSettings ); } -sal_Bool Application::IsAutoMnemonicEnabled() +bool Application::IsAutoMnemonicEnabled() { return GetSettings().GetStyleSettings().GetAutoMnemonic(); } @@ -1373,7 +1373,7 @@ void Application::SetDialogCancelMode( DialogCancelMode mode ) ImplGetSVData()->maAppData.meDialogCancel = mode; } -sal_Bool Application::IsDialogCancelEnabled() +bool Application::IsDialogCancelEnabled() { return ImplGetSVData()->maAppData.meDialogCancel != DIALOG_CANCEL_OFF; } @@ -1391,7 +1391,7 @@ sal_uInt16 Application::GetSystemWindowMode() ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > Application::GetVCLToolkit() { ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit > xT; - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_True ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( true ); if ( pWrapper ) xT = pWrapper->GetVCLToolkit(); return xT; @@ -1407,7 +1407,7 @@ extern "C" { static void SAL_CALL thisModule() {} } #endif -UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist ) +UnoWrapperBase* Application::GetUnoWrapper( bool bCreateIfNotExist ) { ImplSVData* pSVData = ImplGetSVData(); static bool bAlreadyTriedToCreate = false; @@ -1420,7 +1420,7 @@ UnoWrapperBase* Application::GetUnoWrapper( sal_Bool bCreateIfNotExist ) #else "tk", #endif - sal_True ); + true ); oslModule hTkLib = osl_loadModuleRelative( &thisModule, aLibName.pData, SAL_LOADMODULE_DEFAULT ); if ( hTkLib ) @@ -1543,7 +1543,7 @@ void Application::EnableHeadlessMode( bool dialogsAreFatal ) dialogsAreFatal ? DIALOG_CANCEL_FATAL : DIALOG_CANCEL_SILENT ); } -sal_Bool Application::IsHeadlessModeEnabled() +bool Application::IsHeadlessModeEnabled() { return IsDialogCancelEnabled(); } diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 95eebf0337ee..d9d25d7623b9 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -82,7 +82,7 @@ void ImplInitSVData() // init global instance data memset( pImplSVData, 0, sizeof( ImplSVData ) ); - pImplSVData->maHelpData.mbAutoHelpId = sal_True; + pImplSVData->maHelpData.mbAutoHelpId = true; pImplSVData->maNWFData.maMenuBarHighlightTextColor = Color( COL_TRANSPARENT ); // mark default layout border as unitialized diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx index 7acd92f10dfa..1191ef41186a 100644 --- a/vcl/source/app/svmain.cxx +++ b/vcl/source/app/svmain.cxx @@ -156,9 +156,9 @@ int ImplSVMain() if( bInit ) { // call application main - pSVData->maAppData.mbInAppMain = sal_True; + pSVData->maAppData.mbInAppMain = true; nReturn = pSVData->mpApp->Main(); - pSVData->maAppData.mbInAppMain = sal_False; + pSVData->maAppData.mbInAppMain = false; } if( pSVData->mxDisplayConnection.is() ) @@ -187,7 +187,7 @@ int ImplSVMain() int SVMain() { // #i47888# allow for alternative initialization as required for e.g. MacOSX - extern sal_Bool ImplSVMainHook( int* ); + extern bool ImplSVMainHook( int* ); int nRet; if( !Application::IsConsoleOnly() && ImplSVMainHook( &nRet ) ) @@ -352,7 +352,7 @@ VCLUnoWrapperDeleter::disposing(lang::EventObject const& /* rSource */) void DeInitVCL() { ImplSVData* pSVData = ImplGetSVData(); - pSVData->mbDeInit = sal_True; + pSVData->mbDeInit = true; vcl::DeleteOnDeinitBase::ImplDeleteOnDeInit(); diff --git a/vcl/source/app/svmainhook.cxx b/vcl/source/app/svmainhook.cxx index e4799d1608df..a8e29a909f23 100644 --- a/vcl/source/app/svmainhook.cxx +++ b/vcl/source/app/svmainhook.cxx @@ -22,9 +22,9 @@ #ifndef MACOSX // MacOSX implementation of ImplSVMainHook is in osx/salinst.cxx -sal_Bool ImplSVMainHook( int * ) +bool ImplSVMainHook( int * ) { - return sal_False; // indicate that ImplSVMainHook is not implemented + return false; // indicate that ImplSVMainHook is not implemented } #endif diff --git a/vcl/source/app/timer.cxx b/vcl/source/app/timer.cxx index 512386a12c8a..2f4ff80eee25 100644 --- a/vcl/source/app/timer.cxx +++ b/vcl/source/app/timer.cxx @@ -92,7 +92,7 @@ void Timer::ImplTimerCallbackProc() return; pSVData->mnTimerUpdate++; - pSVData->mbNotAllTimerCalled = sal_True; + pSVData->mbNotAllTimerCalled = true; // find timer where the timer handler needs to be called pTimerData = pSVData->mpFirstTimerData; @@ -188,7 +188,7 @@ void Timer::ImplTimerCallbackProc() ImplStartTimer( pSVData, nMinPeriod ); pSVData->mnTimerUpdate--; - pSVData->mbNotAllTimerCalled = sal_False; + pSVData->mbNotAllTimerCalled = false; } Timer::Timer(): diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx index d5e4e0838b25..24f40a2ddd92 100644 --- a/vcl/source/app/unohelp.cxx +++ b/vcl/source/app/unohelp.cxx @@ -45,7 +45,7 @@ uno::Reference < i18n::XCharacterClassification > vcl::unohelper::CreateCharacte return i18n::CharacterClassification::create( comphelper::getProcessComponentContext() ); } -OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, sal_Bool bSUPD ) +OUString vcl::unohelper::CreateLibraryName( const sal_Char* pModName, bool bSUPD ) { // create variable library name suffixes OUString aDLLSuffix = OUString::createFromAscii( SAL_STRINGIFY( DLLPOSTFIX ) ); diff --git a/vcl/source/app/vclevent.cxx b/vcl/source/app/vclevent.cxx index 26bbb5eec7a5..50c6b00c9cdd 100644 --- a/vcl/source/app/vclevent.cxx +++ b/vcl/source/app/vclevent.cxx @@ -80,12 +80,12 @@ void VclEventListeners::Call( VclSimpleEvent* pEvent ) const } } -sal_Bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const +bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const { if ( m_aListeners.empty() ) - return sal_False; + return false; - sal_Bool bProcessed = sal_False; + bool bProcessed = false; // Copy the list, because this can be destroyed when calling a Link... std::list<Link> aCopy( m_aListeners ); std::list<Link>::iterator aIter( aCopy.begin() ); @@ -94,7 +94,7 @@ sal_Bool VclEventListeners::Process( VclSimpleEvent* pEvent ) const { if( (*aIter).Call( pEvent ) != 0 ) { - bProcessed = sal_True; + bProcessed = true; break; } ++aIter; diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 361f775de517..ffeab10531d2 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -158,7 +158,7 @@ OUString Button::GetStandardText( StandardButtonType eButton ) } // ----------------------------------------------------------------------- -sal_Bool Button::SetModeImage( const Image& rImage ) +bool Button::SetModeImage( const Image& rImage ) { if ( rImage != mpButtonData->maImage ) { @@ -166,7 +166,7 @@ sal_Bool Button::SetModeImage( const Image& rImage ) StateChanged( STATE_CHANGE_DATA ); queue_resize(); } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -176,7 +176,7 @@ const Image Button::GetModeImage( ) const } // ----------------------------------------------------------------------- -sal_Bool Button::HasImage() const +bool Button::HasImage() const { return !!(mpButtonData->maImage); } @@ -249,7 +249,7 @@ sal_uInt16 Button::ImplGetTextStyle( OUString& rText, WinBits nWinStyle, // ----------------------------------------------------------------------- void Button::ImplDrawAlignedImage( OutputDevice* pDev, Point& rPos, - Size& rSize, sal_Bool bLayout, + Size& rSize, bool bLayout, sal_uLong nImageSep, sal_uLong nDrawFlags, sal_uInt16 nTextStyle, Rectangle *pSymbolRect, bool bAddImageSep ) @@ -577,7 +577,7 @@ void Button::SetSmallSymbol(bool bSmall) } // ----------------------------------------------------------------------- -void Button::EnableImageDisplay( sal_Bool bEnable ) +void Button::EnableImageDisplay( bool bEnable ) { if( bEnable ) mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOIMAGE; @@ -586,7 +586,7 @@ void Button::EnableImageDisplay( sal_Bool bEnable ) } // ----------------------------------------------------------------------- -void Button::EnableTextDisplay( sal_Bool bEnable ) +void Button::EnableTextDisplay( bool bEnable ) { if( bEnable ) mpButtonData->mnButtonState &= ~BUTTON_DRAW_NOTEXT; @@ -629,8 +629,8 @@ void PushButton::ImplInitPushButtonData() meState = STATE_NOCHECK; meSaveValue = STATE_NOCHECK; mnDDStyle = 0; - mbPressed = sal_False; - mbInUserDraw = sal_False; + mbPressed = false; + mbInUserDraw = false; } // ----------------------------------------------------------------------- @@ -643,7 +643,7 @@ void PushButton::ImplInit( Window* pParent, WinBits nStyle ) if ( nStyle & WB_NOLIGHTBORDER ) ImplGetButtonState() |= BUTTON_DRAW_NOLIGHTBORDER; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- @@ -684,8 +684,8 @@ const Color& PushButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) c // ----------------------------------------------------------------------- -void PushButton::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void PushButton::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Button::ImplInitSettings( bFont, bForeground ); @@ -698,18 +698,18 @@ void PushButton::ImplInitSettings( sal_Bool bFont, if ( IsNativeControlSupported( CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL ) || (GetStyle() & WB_FLATBUTTON) != 0 ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); mpWindowImpl->mbUseNativeFocus = (GetStyle() & WB_FLATBUTTON) ? false : ImplGetSVData()->maNWFData.mbNoFocusRects; } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); } } } @@ -744,7 +744,7 @@ void PushButton::ImplDrawPushButtonFrame( Window* pDev, // ----------------------------------------------------------------------- -sal_Bool PushButton::ImplHitTestPushButton( Window* pDev, +bool PushButton::ImplHitTestPushButton( Window* pDev, const Point& rPos ) { Point aTempPoint; @@ -958,7 +958,7 @@ void PushButton::ImplDrawPushButton( bool bLayout ) Size aOutSz( GetOutputSizePixel() ); Rectangle aRect( aPoint, aOutSz ); Rectangle aInRect = aRect; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; // adjust style if button should be rendered 'pressed' if ( mbPressed ) @@ -999,11 +999,11 @@ void PushButton::ImplDrawPushButton( bool bLayout ) { Edit* pEdit = static_cast<Edit*>(GetParent()); if( pEdit->ImplUseNativeBorder( pEdit->GetStyle() ) ) - bNativeOK = sal_True; + bNativeOK = true; } else if( GetParent()->IsNativeControlSupported( aCtrlType, HAS_BACKGROUND_TEXTURE) ) { - bNativeOK = sal_True; + bNativeOK = true; } if( !bNativeOK && GetParent()->IsNativeControlSupported( aCtrlType, PART_BUTTON_DOWN ) ) { @@ -1038,7 +1038,7 @@ void PushButton::ImplDrawPushButton( bool bLayout ) if( ! bRollOver && ! HasFocus() ) bDrawMenuSep = false; } - if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True ) + if ( (bNativeOK=IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) ) { PushButtonValue aControlValue; Rectangle aCtrlRegion( aInRect ); @@ -1094,7 +1094,7 @@ void PushButton::ImplDrawPushButton( bool bLayout ) ShowFocus( ImplGetFocusRect() ); } - if ( bNativeOK == sal_False ) + if ( !bNativeOK ) { // draw PushButtonFrame, aInRect has content size afterwards if( (GetStyle() & WB_FLATBUTTON) ) @@ -1125,14 +1125,14 @@ void PushButton::ImplDrawPushButton( bool bLayout ) // ----------------------------------------------------------------------- -void PushButton::ImplSetDefButton( sal_Bool bSet ) +void PushButton::ImplSetDefButton( bool bSet ) { Size aSize( GetSizePixel() ); Point aPos( GetPosPixel() ); int dLeft(0), dRight(0), dTop(0), dBottom(0); bool bSetPos = false; - if ( (IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL)) == sal_True ) + if ( IsNativeControlSupported(CTRL_PUSHBUTTON, PART_ENTIRE_CONTROL) ) { Rectangle aBound, aCont; Rectangle aCtrlRect( 0, 0, 80, 20 ); // use a constant size to avoid accumulating @@ -1185,7 +1185,7 @@ void PushButton::ImplSetDefButton( sal_Bool bSet ) // ----------------------------------------------------------------------- -sal_Bool PushButton::ImplIsDefButton() const +bool PushButton::ImplIsDefButton() const { return (ImplGetButtonState() & BUTTON_DRAW_DEFAULT) != 0; } @@ -1268,11 +1268,11 @@ void PushButton::Tracking( const TrackingEvent& rTEvt ) { if ( IsChecked() ) { - Check( sal_False ); + Check( false ); ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED; } else - Check( sal_True ); + Check( true ); } } else @@ -1357,11 +1357,11 @@ void PushButton::KeyUp( const KeyEvent& rKEvt ) { if ( IsChecked() ) { - Check( sal_False ); + Check( false ); ImplGetButtonState() &= ~BUTTON_DRAW_PRESSED; } else - Check( sal_True ); + Check( true ); Toggle(); } @@ -1499,17 +1499,17 @@ void PushButton::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -1525,7 +1525,7 @@ void PushButton::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -1659,7 +1659,7 @@ void PushButton::SetState( TriState eState ) // ----------------------------------------------------------------------- -void PushButton::SetPressed( sal_Bool bPressed ) +void PushButton::SetPressed( bool bPressed ) { if ( mbPressed != bPressed ) { @@ -1929,10 +1929,10 @@ void HelpButton::Click() void RadioButton::ImplInitRadioButtonData() { - mbChecked = sal_False; - mbSaveValue = sal_False; - mbRadioCheck = sal_True; - mbStateChanged = sal_False; + mbChecked = false; + mbSaveValue = false; + mbRadioCheck = true; + mbStateChanged = false; } // ----------------------------------------------------------------------- @@ -1942,7 +1942,7 @@ void RadioButton::ImplInit( Window* pParent, WinBits nStyle ) nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle ); Button::ImplInit( pParent, nStyle, NULL ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- @@ -1977,8 +1977,8 @@ const Color& RadioButton::GetCanonicalTextColor( const StyleSettings& _rStyle ) // ----------------------------------------------------------------------- -void RadioButton::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void RadioButton::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Button::ImplInitSettings( bFont, bForeground ); @@ -1988,18 +1988,18 @@ void RadioButton::ImplInitSettings( sal_Bool bFont, if ( !IsControlBackground() && (pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); if( IsNativeControlSupported( CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL ) ) mpWindowImpl->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects; } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -2032,10 +2032,10 @@ void RadioButton::ImplInvalidateOrDrawRadioButtonState() void RadioButton::ImplDrawRadioButtonState() { - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; // no native drawing for image radio buttons - if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) == sal_True ) + if ( !maImage && (bNativeOK=IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)) ) { ImplControlValue aControlValue( mbChecked ? BUTTONVALUE_ON : BUTTONVALUE_OFF ); Rectangle aCtrlRect( maStateRect.TopLeft(), maStateRect.GetSize() ); @@ -2054,7 +2054,7 @@ void RadioButton::ImplDrawRadioButtonState() } - if ( bNativeOK == sal_False ) + if ( !bNativeOK ) { // kein Image-RadioButton if ( !maImage ) @@ -2078,7 +2078,7 @@ void RadioButton::ImplDrawRadioButtonState() const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); Rectangle aImageRect = maStateRect; Size aImageSize = maImage.GetSizePixel(); - sal_Bool bEnabled = IsEnabled(); + bool bEnabled = IsEnabled(); sal_uInt16 nButtonStyle = FRAME_DRAW_DOUBLEIN; aImageSize.Width() = CalcZoom( aImageSize.Width() ); @@ -2297,7 +2297,7 @@ void RadioButton::ImplDrawRadioButton( bool bLayout ) ImplDraw( this, 0, Point(), GetOutputSizePixel(), aImageSize, maStateRect, maMouseRect, bLayout ); - if( !bLayout || (IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL)==sal_True) ) + if( !bLayout || IsNativeControlSupported(CTRL_RADIOBUTTON, PART_ENTIRE_CONTROL) ) { if ( !maImage && HasFocus() ) ShowFocus( ImplGetFocusRect() ); @@ -2410,7 +2410,7 @@ void RadioButton::ImplUncheckAllOther() { ImplDelData aDelData; pWindow->ImplAddDel( &aDelData ); - pWindow->SetState( sal_False ); + pWindow->SetState( false ); if ( aDelData.IsDead() ) return; pWindow->ImplRemoveDel( &aDelData ); @@ -2423,10 +2423,10 @@ void RadioButton::ImplUncheckAllOther() // ----------------------------------------------------------------------- -void RadioButton::ImplCallClick( sal_Bool bGrabFocus, sal_uInt16 nFocusFlags ) +void RadioButton::ImplCallClick( bool bGrabFocus, sal_uInt16 nFocusFlags ) { mbStateChanged = !mbChecked; - mbChecked = sal_True; + mbChecked = true; mpWindowImpl->mnStyle |= WB_TABSTOP; ImplInvalidateOrDrawRadioButtonState(); ImplDelData aDelData; @@ -2447,7 +2447,7 @@ void RadioButton::ImplCallClick( sal_Bool bGrabFocus, sal_uInt16 nFocusFlags ) if ( aDelData.IsDead() ) return; ImplRemoveDel( &aDelData ); - mbStateChanged = sal_False; + mbStateChanged = false; } // ----------------------------------------------------------------------- @@ -2483,7 +2483,7 @@ void RadioButton::ImplLoadRes( const ResId& rResId ) //anderer Wert als Default ? sal_uInt16 nChecked = ReadShortRes(); if ( nChecked ) - SetState( sal_True ); + SetState( true ); } // ----------------------------------------------------------------------- @@ -2747,17 +2747,17 @@ void RadioButton::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -2773,7 +2773,7 @@ void RadioButton::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -2815,7 +2815,7 @@ void RadioButton::Toggle() // ----------------------------------------------------------------------- -sal_Bool RadioButton::SetModeRadioImage( const Image& rImage ) +bool RadioButton::SetModeRadioImage( const Image& rImage ) { if ( rImage != maImage ) { @@ -2823,7 +2823,7 @@ sal_Bool RadioButton::SetModeRadioImage( const Image& rImage ) StateChanged( STATE_CHANGE_DATA ); queue_resize(); } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -2835,7 +2835,7 @@ const Image& RadioButton::GetModeRadioImage( ) const // ----------------------------------------------------------------------- -void RadioButton::SetState( sal_Bool bCheck ) +void RadioButton::SetState( bool bCheck ) { // TabStop-Flag richtig mitfuehren if ( bCheck ) @@ -2892,7 +2892,7 @@ bool RadioButton::set_property(const OString &rKey, const OString &rValue) // ----------------------------------------------------------------------- -void RadioButton::Check( sal_Bool bCheck ) +void RadioButton::Check( bool bCheck ) { // TabStop-Flag richtig mitfuehren if ( bCheck ) @@ -3131,7 +3131,7 @@ void CheckBox::ImplInitCheckBoxData() { meState = STATE_NOCHECK; meSaveValue = STATE_NOCHECK; - mbTriState = sal_False; + mbTriState = false; } // ----------------------------------------------------------------------- @@ -3141,7 +3141,7 @@ void CheckBox::ImplInit( Window* pParent, WinBits nStyle ) nStyle = ImplInitStyle( pParent->GetWindow( WINDOW_LASTCHILD ), nStyle ); Button::ImplInit( pParent, nStyle, NULL ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- @@ -3171,8 +3171,8 @@ const Color& CheckBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con // ----------------------------------------------------------------------- -void CheckBox::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void CheckBox::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Button::ImplInitSettings( bFont, bForeground ); @@ -3182,18 +3182,18 @@ void CheckBox::ImplInitSettings( sal_Bool bFont, if ( !IsControlBackground() && (pParent->IsChildTransparentModeEnabled() || IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); if( IsNativeControlSupported( CTRL_CHECKBOX, PART_ENTIRE_CONTROL ) ) ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects; } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -3214,7 +3214,7 @@ void CheckBox::ImplLoadRes( const ResId& rResId ) sal_uInt16 nChecked = ReadShortRes(); //anderer Wert als Default ? if( nChecked ) - Check( sal_True ); + Check( true ); } } @@ -3759,17 +3759,17 @@ void CheckBox::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -3785,7 +3785,7 @@ void CheckBox::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -3851,7 +3851,7 @@ bool CheckBox::set_property(const OString &rKey, const OString &rValue) // ----------------------------------------------------------------------- -void CheckBox::EnableTriState( sal_Bool bTriState ) +void CheckBox::EnableTriState( bool bTriState ) { if ( mbTriState != bTriState ) { @@ -4100,7 +4100,7 @@ ImageRadioButton::~ImageRadioButton() TriStateBox::TriStateBox( Window* pParent, WinBits nStyle ) : CheckBox( pParent, nStyle ) { - EnableTriState( sal_True ); + EnableTriState( true ); } // ----------------------------------------------------------------------- diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 7fda64fae340..b6d8c9bc851e 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -107,9 +107,9 @@ void ComboBox::ImplInitComboBoxData() mpFloatWin = NULL; mnDDHeight = 0; - mbDDAutoSize = sal_True; - mbSyntheticModify = sal_False; - mbMatchCase = sal_False; + mbDDAutoSize = true; + mbSyntheticModify = false; + mbMatchCase = false; mcMultiSep = ';'; m_nMaxWidthChars = -1; } @@ -167,7 +167,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) if( nStyle & WB_DROPDOWN ) { mpFloatWin = new ImplListBoxFloatingWindow( this ); - mpFloatWin->SetAutoWidth( sal_True ); + mpFloatWin->SetAutoWidth( true ); mpFloatWin->SetPopupModeEndHdl( LINK( this, ComboBox, ImplPopupModeEndHdl ) ); mpBtn = new ImplBtn( this, WB_NOLIGHTBORDER | WB_RECTSTYLE ); @@ -190,10 +190,10 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) } mpSubEdit = new Edit( this, nEditStyle ); - mpSubEdit->EnableRTL( sal_False ); + mpSubEdit->EnableRTL( false ); SetSubEdit( mpSubEdit ); mpSubEdit->SetPosPixel( Point() ); - EnableAutocomplete( sal_True ); + EnableAutocomplete( true ); mpSubEdit->Show(); Window* pLBParent = this; @@ -216,7 +216,7 @@ void ComboBox::ImplInit( Window* pParent, WinBits nStyle ) ImplCalcEditHeight(); - SetCompoundControl( sal_True ); + SetCompoundControl( true ); } // ----------------------------------------------------------------------- @@ -249,7 +249,7 @@ void ComboBox::ImplLoadRes( const ResId& rResId ) // ----------------------------------------------------------------------- -void ComboBox::EnableAutocomplete( sal_Bool bEnable, sal_Bool bMatchCase ) +void ComboBox::EnableAutocomplete( bool bEnable, bool bMatchCase ) { mbMatchCase = bMatchCase; @@ -261,7 +261,7 @@ void ComboBox::EnableAutocomplete( sal_Bool bEnable, sal_Bool bMatchCase ) // ----------------------------------------------------------------------- -sal_Bool ComboBox::IsAutocompleteEnabled() const +bool ComboBox::IsAutocompleteEnabled() const { return mpSubEdit->GetAutocompleteHdl().IsSet(); } @@ -275,10 +275,10 @@ IMPL_LINK_NOARG(ComboBox, ImplClickBtnHdl) if ( !mpImplLB->GetEntryList()->GetMRUCount() ) ImplUpdateFloatSelection(); else - mpImplLB->SelectEntry( 0 , sal_True ); - mpBtn->SetPressed( sal_True ); + mpImplLB->SelectEntry( 0 , true ); + mpBtn->SetPressed( true ); SetSelection( Selection( 0, SELECTION_MAX ) ); - mpFloatWin->StartFloat( sal_True ); + mpFloatWin->StartFloat( true ); ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN ); ImplClearLayoutData(); @@ -296,9 +296,9 @@ IMPL_LINK_NOARG(ComboBox, ImplPopupModeEndHdl) { if ( !mpImplLB->GetEntryList()->IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) ) { - mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), sal_True ); - sal_Bool bTravelSelect = mpImplLB->IsTravelSelect(); - mpImplLB->SetTravelSelect( sal_True ); + mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), true ); + bool bTravelSelect = mpImplLB->IsTravelSelect(); + mpImplLB->SetTravelSelect( true ); Select(); mpImplLB->SetTravelSelect( bTravelSelect ); } @@ -308,7 +308,7 @@ IMPL_LINK_NOARG(ComboBox, ImplPopupModeEndHdl) if( mpImplLB ) mpImplLB->GetMainWindow()->ImplClearLayoutData(); - mpBtn->SetPressed( sal_False ); + mpBtn->SetPressed( false ); ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); return 0; } @@ -333,12 +333,12 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit ) if ( nStart == LISTBOX_ENTRY_NOTFOUND ) nStart = 0; - sal_Bool bForward = sal_True; + bool bForward = true; if ( eAction == AUTOCOMPLETE_TABFORWARD ) nStart++; else if ( eAction == AUTOCOMPLETE_TABBACKWARD ) { - bForward = sal_False; + bForward = false; nStart = nStart ? nStart - 1 : mpImplLB->GetEntryList()->GetEntryCount()-1; } @@ -346,18 +346,18 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit ) if( ! mbMatchCase ) { // Try match case insensitive from current position - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, sal_True ); + nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, true ); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Try match case insensitive, but from start - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, sal_True ); + nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, true ); } if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Try match full from current position - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, sal_False ); + nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, nStart, bForward, false ); if ( nPos == LISTBOX_ENTRY_NOTFOUND ) // Match full, but from start - nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, sal_False ); + nPos = mpImplLB->GetEntryList()->FindMatchingEntry( aStartText, bForward ? 0 : (mpImplLB->GetEntryList()->GetEntryCount()-1), bForward, false ); if ( nPos != LISTBOX_ENTRY_NOTFOUND ) { @@ -374,7 +374,7 @@ IMPL_LINK( ComboBox, ImplAutocompleteHdl, Edit*, pEdit ) IMPL_LINK_NOARG(ComboBox, ImplSelectHdl) { - sal_Bool bPopup = IsInDropDown(); + bool bPopup = IsInDropDown(); bool bCallSelect = false; if ( mpImplLB->IsSelectionChanged() || bPopup ) { @@ -453,9 +453,9 @@ IMPL_LINK_NOARG(ComboBox, ImplSelectHdl) if ( bCallSelect ) { mpSubEdit->SetModifyFlag(); - mbSyntheticModify = sal_True; + mbSyntheticModify = true; Modify(); - mbSyntheticModify = sal_False; + mbSyntheticModify = false; Select(); } @@ -511,11 +511,11 @@ void ComboBox::ToggleDropDown() if ( !mpImplLB->GetEntryList()->GetMRUCount() ) ImplUpdateFloatSelection(); else - mpImplLB->SelectEntry( 0 , sal_True ); + mpImplLB->SelectEntry( 0 , true ); ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); - mpBtn->SetPressed( sal_True ); + mpBtn->SetPressed( true ); SetSelection( Selection( 0, SELECTION_MAX ) ); - mpFloatWin->StartFloat( sal_True ); + mpFloatWin->StartFloat( true ); ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN ); } } @@ -556,7 +556,7 @@ void ComboBox::EnableAutoSize( bool bAuto ) // ----------------------------------------------------------------------- -void ComboBox::EnableDDAutoWidth( sal_Bool b ) +void ComboBox::EnableDDAutoWidth( bool b ) { if ( mpFloatWin ) mpFloatWin->SetAutoWidth( b ); @@ -780,11 +780,11 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) if( ( nKeyCode == KEY_DOWN ) && mpFloatWin && !mpFloatWin->IsInPopupMode() && aKeyEvt.GetKeyCode().IsMod2() ) { ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); - mpBtn->SetPressed( sal_True ); + mpBtn->SetPressed( true ); if ( mpImplLB->GetEntryList()->GetMRUCount() ) - mpImplLB->SelectEntry( 0 , sal_True ); + mpImplLB->SelectEntry( 0 , true ); SetSelection( Selection( 0, SELECTION_MAX ) ); - mpFloatWin->StartFloat( sal_False ); + mpFloatWin->StartFloat( false ); ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN ); nDone = true; } @@ -815,7 +815,7 @@ bool ComboBox::Notify( NotifyEvent& rNEvt ) { if( mpFloatWin->HasChildPathFocus() ) mpSubEdit->GrabFocus(); - else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( sal_True ) ) + else if ( mpFloatWin->IsInPopupMode() && !HasChildPathFocus( true ) ) mpFloatWin->EndPopupMode(); } else if( (rNEvt.GetType() == EVENT_COMMAND) && @@ -879,12 +879,12 @@ void ComboBox::Modify() void ComboBox::ImplUpdateFloatSelection() { // move text in the ListBox into the visible region - mpImplLB->SetCallSelectionChangedHdl( sal_False ); + mpImplLB->SetCallSelectionChangedHdl( false ); if ( !IsMultiSelectionEnabled() ) { OUString aSearchStr( mpSubEdit->GetText() ); sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND; - sal_Bool bSelect = sal_True; + bool bSelect = true; if ( mpImplLB->GetCurrentPos() != LISTBOX_ENTRY_NOTFOUND ) { @@ -898,7 +898,7 @@ void ComboBox::ImplUpdateFloatSelection() if ( nSelect == LISTBOX_ENTRY_NOTFOUND ) { nSelect = mpImplLB->GetEntryList()->FindMatchingEntry( aSearchStr ); - bSelect = sal_False; + bSelect = false; } if( nSelect != LISTBOX_ENTRY_NOTFOUND ) @@ -911,7 +911,7 @@ void ComboBox::ImplUpdateFloatSelection() { nSelect = mpImplLB->GetEntryList()->GetSelectEntryPos( 0 ); if( nSelect != LISTBOX_ENTRY_NOTFOUND ) - mpImplLB->SelectEntry( nSelect, sal_False ); + mpImplLB->SelectEntry( nSelect, false ); mpImplLB->ResetCurrentPos(); } } @@ -922,7 +922,7 @@ void ComboBox::ImplUpdateFloatSelection() for ( sal_uInt16 n = 0; n < mpImplLB->GetEntryList()->GetEntryCount(); n++ ) mpImplLB->SelectEntry( n, aSelInText.count( n ) ); } - mpImplLB->SetCallSelectionChangedHdl( sal_True ); + mpImplLB->SetCallSelectionChangedHdl( true ); } // ----------------------------------------------------------------------- @@ -1002,29 +1002,29 @@ sal_uInt16 ComboBox::GetEntryCount() const // ----------------------------------------------------------------------- -sal_Bool ComboBox::IsTravelSelect() const +bool ComboBox::IsTravelSelect() const { return mpImplLB->IsTravelSelect(); } // ----------------------------------------------------------------------- -sal_Bool ComboBox::IsInDropDown() const +bool ComboBox::IsInDropDown() const { return mpFloatWin && mpFloatWin->IsInPopupMode(); } // ----------------------------------------------------------------------- -void ComboBox::EnableMultiSelection( sal_Bool bMulti ) +void ComboBox::EnableMultiSelection( bool bMulti ) { - mpImplLB->EnableMultiSelection( bMulti, sal_False ); - mpImplLB->SetMultiSelectionSimpleMode( sal_True ); + mpImplLB->EnableMultiSelection( bMulti, false ); + mpImplLB->SetMultiSelectionSimpleMode( true ); } // ----------------------------------------------------------------------- -sal_Bool ComboBox::IsMultiSelectionEnabled() const +bool ComboBox::IsMultiSelectionEnabled() const { return mpImplLB->IsMultiSelectionEnabled(); } @@ -1197,7 +1197,7 @@ void ComboBox::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLines void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { - mpImplLB->GetMainWindow()->ImplInitSettings( sal_True, sal_True, sal_True ); + mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true ); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -1212,8 +1212,8 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, s // Border/Background pDev->SetLineColor(); pDev->SetFillColor(); - sal_Bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); - sal_Bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); + bool bBorder = !(nFlags & WINDOW_DRAW_NOBORDER ) && (GetStyle() & WB_BORDER); + bool bBackground = !(nFlags & WINDOW_DRAW_NOBACKGROUND) && IsControlBackground(); if ( bBorder || bBackground ) { Rectangle aRect( aPos, aSize ); @@ -1322,14 +1322,14 @@ void ComboBox::SetUserItemSize( const Size& rSz ) // ----------------------------------------------------------------------- -void ComboBox::EnableUserDraw( sal_Bool bUserDraw ) +void ComboBox::EnableUserDraw( bool bUserDraw ) { mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw ); } // ----------------------------------------------------------------------- -void ComboBox::DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos ) +void ComboBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos ) { DBG_ASSERT( rEvt.GetDevice() == mpImplLB->GetMainWindow(), "DrawEntry?!" ); mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos ); @@ -1453,12 +1453,12 @@ sal_uInt16 ComboBox::GetSelectEntryPos( sal_uInt16 nIndex ) const return nPos; } // ----------------------------------------------------------------------------- -sal_Bool ComboBox::IsEntryPosSelected( sal_uInt16 nPos ) const +bool ComboBox::IsEntryPosSelected( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } // ----------------------------------------------------------------------------- -void ComboBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect) +void ComboBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect) { if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() ) mpImplLB->SelectEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), bSelect ); diff --git a/vcl/source/control/ctrl.cxx b/vcl/source/control/ctrl.cxx index 330d9b4a6384..84e25feb4cfb 100644 --- a/vcl/source/control/ctrl.cxx +++ b/vcl/source/control/ctrl.cxx @@ -357,7 +357,7 @@ void Control::AppendLayoutData( const Control& rSubControl ) const // ----------------------------------------------------------------- -sal_Bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& rHandler, void* pCaller ) +bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Link& rHandler, void* pCaller ) { ImplDelData aCheckDelete; ImplAddDel( &aCheckDelete ); @@ -370,10 +370,10 @@ sal_Bool Control::ImplCallEventListenersAndHandler( sal_uLong nEvent, const Lin if ( !aCheckDelete.IsDead() ) { ImplRemoveDel( &aCheckDelete ); - return sal_False; + return false; } } - return sal_True; + return true; } // ----------------------------------------------------------------- @@ -495,7 +495,7 @@ const Color& Control::GetCanonicalTextColor( const StyleSettings& _rStyle ) cons } // ----------------------------------------------------------------- -void Control::ImplInitSettings( const sal_Bool _bFont, const sal_Bool _bForeground ) +void Control::ImplInitSettings( const bool _bFont, const bool _bForeground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 131f1c507cfc..165d73885552 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -310,21 +310,21 @@ void Edit::ImplInitEditData() mnWidthInChars = -1; mnMaxWidthChars = -1; meAutocompleteAction = AUTOCOMPLETE_KEYINPUT; - mbModified = sal_False; - mbInternModified = sal_False; - mbReadOnly = sal_False; - mbInsertMode = sal_True; - mbClickedInSelection = sal_False; - mbActivePopup = sal_False; - mbIsSubEdit = sal_False; - mbInMBDown = sal_False; + mbModified = false; + mbInternModified = false; + mbReadOnly = false; + mbInsertMode = true; + mbClickedInSelection = false; + mbActivePopup = false; + mbIsSubEdit = false; + mbInMBDown = false; mpDDInfo = NULL; mpIMEInfos = NULL; mcEchoChar = 0; // --- RTL --- no default mirroring for Edit controls // note: controls that use a subedit will revert this (SpinField, ComboBox) - EnableRTL( sal_False ); + EnableRTL( false ); vcl::unohelper::DragAndDropWrapper* pDnDWrapper = new vcl::unohelper::DragAndDropWrapper( this ); mxDnDListener = pDnDWrapper; @@ -371,7 +371,7 @@ void Edit::ImplInit( Window* pParent, WinBits nStyle ) SetCursor( new Cursor ); SetPointer( Pointer( POINTER_TEXT ) ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY ); uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer(); @@ -399,7 +399,7 @@ WinBits Edit::ImplInitStyle( WinBits nStyle ) // ----------------------------------------------------------------------- -sal_Bool Edit::IsCharInput( const KeyEvent& rKeyEvent ) +bool Edit::IsCharInput( const KeyEvent& rKeyEvent ) { // In the future we must use new Unicode functions for this sal_Unicode cCharCode = rKeyEvent.GetCharCode(); @@ -413,13 +413,13 @@ sal_Bool Edit::IsCharInput( const KeyEvent& rKeyEvent ) void Edit::ImplModified() { - mbModified = sal_True; + mbModified = true; Modify(); } // ----------------------------------------------------------------------- -void Edit::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void Edit::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -573,7 +573,7 @@ void Edit::ImplRepaint(bool bLayout) const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if ( IsEnabled() ) - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); if ( !IsEnabled() || bPaintPlaceholderText ) SetTextColor( rStyleSettings.GetDisableColor() ); @@ -810,7 +810,7 @@ void Edit::ImplDelete( const Selection& rSelection, sal_uInt8 nDirection, sal_uI maSelection.Min() = aSelection.Min(); maSelection.Max() = aSelection.Min(); ImplAlignAndPaint(); - mbInternModified = sal_True; + mbInternModified = true; } // ----------------------------------------------------------------------- @@ -873,7 +873,7 @@ bool Edit::ImplTruncateToMaxLen( OUString& rStr, sal_Int32 nSelectionLen ) const // ----------------------------------------------------------------------- -void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, sal_Bool bIsUserInput ) +void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, bool bIsUserInput ) { Selection aSelection( maSelection ); aSelection.Justify(); @@ -971,7 +971,7 @@ void Edit::ImplInsertText( const OUString& rStr, const Selection* pNewSel, sal_B } ImplAlignAndPaint(); - mbInternModified = sal_True; + mbInternModified = true; } // ----------------------------------------------------------------------- @@ -995,7 +995,7 @@ void Edit::ImplSetText( const OUString& rText, const Selection* pNewSelection ) ImplAlign(); if ( pNewSelection ) - ImplSetSelection( *pNewSelection, sal_False ); + ImplSetSelection( *pNewSelection, false ); if ( mnXOffset && !pNewSelection ) maSelection.Max() = 0; @@ -1142,7 +1142,7 @@ void Edit::ImplPaintBorder( long nXStart, long nXEnd ) // ----------------------------------------------------------------------- -void Edit::ImplShowCursor( sal_Bool bOnlyIfVisible ) +void Edit::ImplShowCursor( bool bOnlyIfVisible ) { if ( !IsUpdateMode() || ( bOnlyIfVisible && !IsReallyVisible() ) ) return; @@ -1334,7 +1334,7 @@ sal_Int32 Edit::ImplGetCharPos( const Point& rWindowPos ) const // ----------------------------------------------------------------------- -void Edit::ImplSetCursorPos( sal_Int32 nChar, sal_Bool bSelect ) +void Edit::ImplSetCursorPos( sal_Int32 nChar, bool bSelect ) { Selection aSelection( maSelection ); aSelection.Max() = nChar; @@ -1426,7 +1426,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) if ( rMEvt.GetClicks() < 4 ) { - mbClickedInSelection = sal_False; + mbClickedInSelection = false; if ( rMEvt.GetClicks() == 3 ) { ImplSetSelection( Selection( 0, EDIT_NOLIMIT) ); @@ -1442,7 +1442,7 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) ImplCopyToSelectionClipboard(); } else if ( !rMEvt.IsShift() && HasFocus() && aSelection.IsInside( nCharPos ) ) - mbClickedInSelection = sal_True; + mbClickedInSelection = true; else if ( rMEvt.IsLeft() ) ImplSetCursorPos( nCharPos, rMEvt.IsShift() ); @@ -1450,9 +1450,9 @@ void Edit::MouseButtonDown( const MouseEvent& rMEvt ) StartTracking( STARTTRACK_SCROLLREPEAT ); } - mbInMBDown = sal_True; // then do not select all in GetFocus + mbInMBDown = true; // then do not select all in GetFocus GrabFocus(); - mbInMBDown = sal_False; + mbInMBDown = false; } // ----------------------------------------------------------------------- @@ -1462,8 +1462,8 @@ void Edit::MouseButtonUp( const MouseEvent& rMEvt ) if ( mbClickedInSelection && rMEvt.IsLeft() ) { sal_Int32 nCharPos = ImplGetCharPos( rMEvt.GetPosPixel() ); - ImplSetCursorPos( nCharPos, sal_False ); - mbClickedInSelection = sal_False; + ImplSetCursorPos( nCharPos, false ); + mbClickedInSelection = false; } else if ( rMEvt.IsMiddle() && !mbReadOnly && ( GetSettings().GetMouseSettings().GetMiddleButtonAction() == MOUSE_MIDDLE_PASTESELECTION ) ) @@ -1483,8 +1483,8 @@ void Edit::Tracking( const TrackingEvent& rTEvt ) if ( mbClickedInSelection ) { sal_Int32 nCharPos = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() ); - ImplSetCursorPos( nCharPos, sal_False ); - mbClickedInSelection = sal_False; + ImplSetCursorPos( nCharPos, false ); + mbClickedInSelection = false; } else if ( rTEvt.GetMouseEvent().IsLeft() ) { @@ -1496,7 +1496,7 @@ void Edit::Tracking( const TrackingEvent& rTEvt ) if( !mbClickedInSelection ) { sal_Int32 nCharPos = ImplGetCharPos( rTEvt.GetMouseEvent().GetPosPixel() ); - ImplSetCursorPos( nCharPos, sal_True ); + ImplSetCursorPos( nCharPos, true ); } } @@ -1506,13 +1506,13 @@ void Edit::Tracking( const TrackingEvent& rTEvt ) // ----------------------------------------------------------------------- -sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) +bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) { - sal_Bool bDone = sal_False; + bool bDone = false; sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode(); KeyFuncType eFunc = rKEvt.GetKeyCode().GetFunction(); - mbInternModified = sal_False; + mbInternModified = false; if ( eFunc != KEYFUNC_DONTKNOW ) { @@ -1524,7 +1524,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) { Cut(); ImplModified(); - bDone = sal_True; + bDone = true; } } break; @@ -1534,7 +1534,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) if ( !(GetStyle() & WB_PASSWORD) ) { Copy(); - bDone = sal_True; + bDone = true; } } break; @@ -1544,7 +1544,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) if ( !mbReadOnly ) { Paste(); - bDone = sal_True; + bDone = true; } } break; @@ -1554,7 +1554,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) if ( !mbReadOnly ) { Undo(); - bDone = sal_True; + bDone = true; } } break; @@ -1569,7 +1569,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) if ( nCode == KEY_A ) { ImplSetSelection( Selection( 0, maText.getLength() ) ); - bDone = sal_True; + bDone = true; } else if ( rKEvt.GetKeyCode().IsShift() && (nCode == KEY_S) ) { @@ -1583,7 +1583,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) ImplInsertText( aChars ); ImplModified(); } - bDone = sal_True; + bDone = true; } } } @@ -1595,7 +1595,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) case com::sun::star::awt::Key::SELECT_ALL: { ImplSetSelection( Selection( 0, maText.getLength() ) ); - bDone = sal_True; + bDone = true; } break; @@ -1726,7 +1726,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) } } - bDone = sal_True; + bDone = true; } } break; @@ -1768,7 +1768,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) ImplDelete( maSelection, nDel, nMode ); if ( maText.getLength() != nOldLen ) ImplModified(); - bDone = sal_True; + bDone = true; } } break; @@ -1778,7 +1778,7 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) if ( !mpIMEInfos && !mbReadOnly && !rKEvt.GetKeyCode().IsMod2() ) { SetInsertMode( !mbInsertMode ); - bDone = sal_True; + bDone = true; } } break; @@ -1813,10 +1813,10 @@ sal_Bool Edit::ImplHandleKeyEvent( const KeyEvent& rKEvt ) { if ( IsCharInput( rKEvt ) ) { - bDone = sal_True; // read characters also when in ReadOnly + bDone = true; // read characters also when in ReadOnly if ( !mbReadOnly ) { - ImplInsertText(OUString(rKEvt.GetCharCode()), 0, sal_True); + ImplInsertText(OUString(rKEvt.GetCharCode()), 0, true); if ( maAutocompleteHdl.IsSet() ) { if ( (maSelection.Min() == maSelection.Max()) && (maSelection.Min() == maText.getLength()) ) @@ -1883,7 +1883,7 @@ void Edit::Resize() void Edit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -2085,22 +2085,22 @@ void Edit::Command( const CommandEvent& rCEvt ) if ( !maSelection.Len() ) { - pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_COPY, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_CUT, false ); + pPopup->EnableItem( SV_MENU_EDIT_COPY, false ); + pPopup->EnableItem( SV_MENU_EDIT_DELETE, false ); } if ( IsReadOnly() ) { - pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_PASTE, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_CUT, false ); + pPopup->EnableItem( SV_MENU_EDIT_PASTE, false ); + pPopup->EnableItem( SV_MENU_EDIT_DELETE, false ); + pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, false ); } else { // only paste if text available in clipboard - sal_Bool bData = sal_False; + bool bData = false; uno::Reference< datatransfer::clipboard::XClipboard > xClipboard = GetClipboard(); if ( xClipboard.is() ) { @@ -2118,9 +2118,9 @@ void Edit::Command( const CommandEvent& rCEvt ) } if ( maUndoText == maText.getStr() ) - pPopup->EnableItem( SV_MENU_EDIT_UNDO, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_UNDO, false ); if ( ( maSelection.Min() == 0 ) && ( maSelection.Max() == maText.getLength() ) ) - pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_SELECTALL, false ); if ( !pImplFncGetSpecialChars ) { sal_uInt16 nPos = pPopup->GetItemPos( SV_MENU_EDIT_INSERTSYMBOL ); @@ -2128,7 +2128,7 @@ void Edit::Command( const CommandEvent& rCEvt ) pPopup->RemoveItem( nPos-1 ); } - mbActivePopup = sal_True; + mbActivePopup = true; Selection aSaveSel = GetSelection(); // if someone changes selection in Get/LoseFocus, e.g. URL bar Point aPos = rCEvt.GetMousePosPixel(); if ( !rCEvt.IsMouseEvent() ) @@ -2176,7 +2176,7 @@ void Edit::Command( const CommandEvent& rCEvt ) } break; } - mbActivePopup = sal_False; + mbActivePopup = false; } else if ( rCEvt.GetCommand() == COMMAND_STARTEXTTEXTINPUT ) { @@ -2188,12 +2188,12 @@ void Edit::Command( const CommandEvent& rCEvt ) } else if ( rCEvt.GetCommand() == COMMAND_ENDEXTTEXTINPUT ) { - sal_Bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite; + bool bInsertMode = !mpIMEInfos->bWasCursorOverwrite; delete mpIMEInfos; mpIMEInfos = NULL; // set font without attributes, because it will not be re-initialised in Repaint anymore - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); SetInsertMode( bInsertMode ); @@ -2325,10 +2325,10 @@ void Edit::StateChanged( StateChangedType nType ) mnXOffset = 0; // if GrabFocus before while size was still wrong ImplAlign(); if ( !mpSubEdit ) - ImplShowCursor( sal_False ); + ImplShowCursor( false ); } // update background (eventual SetPaintTransparent) - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); } else if ( nType == STATE_CHANGE_ENABLE ) { @@ -2381,8 +2381,8 @@ void Edit::StateChanged( StateChangedType nType ) { if ( !mpSubEdit ) { - ImplInitSettings( sal_True, sal_False, sal_False ); - ImplShowCursor( sal_True ); + ImplInitSettings( true, false, false ); + ImplShowCursor( true ); Invalidate(); } } @@ -2390,7 +2390,7 @@ void Edit::StateChanged( StateChangedType nType ) { if ( !mpSubEdit ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); ImplShowCursor(); Invalidate(); } @@ -2399,7 +2399,7 @@ void Edit::StateChanged( StateChangedType nType ) { if ( !mpSubEdit ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } } @@ -2407,7 +2407,7 @@ void Edit::StateChanged( StateChangedType nType ) { if ( !mpSubEdit ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -2426,8 +2426,8 @@ void Edit::DataChanged( const DataChangedEvent& rDCEvt ) { if ( !mpSubEdit ) { - ImplInitSettings( sal_True, sal_True, sal_True ); - ImplShowCursor( sal_True ); + ImplInitSettings( true, true, true ); + ImplShowCursor( true ); Invalidate(); } } @@ -2539,7 +2539,7 @@ void Edit::SetEchoChar( sal_Unicode c ) void Edit::SetReadOnly( sal_Bool bReadOnly ) { - if ( mbReadOnly != bReadOnly ) + if ( mbReadOnly != bool(bReadOnly) ) { mbReadOnly = bReadOnly; if ( mpSubEdit ) @@ -2560,7 +2560,7 @@ void Edit::SetAutocompleteHdl( const Link& rHdl ) // ----------------------------------------------------------------------- -void Edit::SetInsertMode( sal_Bool bInsert ) +void Edit::SetInsertMode( bool bInsert ) { if ( bInsert != mbInsertMode ) { @@ -2574,7 +2574,7 @@ void Edit::SetInsertMode( sal_Bool bInsert ) // ----------------------------------------------------------------------- -sal_Bool Edit::IsInsertMode() const +bool Edit::IsInsertMode() const { if ( mpSubEdit ) return mpSubEdit->IsInsertMode(); @@ -2613,7 +2613,7 @@ void Edit::SetSelection( const Selection& rSelection ) // ----------------------------------------------------------------------- -void Edit::ImplSetSelection( const Selection& rSelection, sal_Bool bPaint ) +void Edit::ImplSetSelection( const Selection& rSelection, bool bPaint ) { if ( mpSubEdit ) mpSubEdit->ImplSetSelection( rSelection ); @@ -2830,9 +2830,9 @@ OUString Edit::GetPlaceholderText() const void Edit::SetModifyFlag() { if ( mpSubEdit ) - mpSubEdit->mbModified = sal_True; + mpSubEdit->mbModified = true; else - mbModified = sal_True; + mbModified = true; } // ----------------------------------------------------------------------- @@ -2840,9 +2840,9 @@ void Edit::SetModifyFlag() void Edit::ClearModifyFlag() { if ( mpSubEdit ) - mpSubEdit->mbModified = sal_False; + mpSubEdit->mbModified = false; else - mbModified = sal_False; + mbModified = false; } // ----------------------------------------------------------------------- @@ -2853,7 +2853,7 @@ void Edit::SetSubEdit( Edit* pEdit ) if ( mpSubEdit ) { SetPointer( POINTER_ARROW ); // Nur das SubEdit hat den BEAM... - mpSubEdit->mbIsSubEdit = sal_True; + mpSubEdit->mbIsSubEdit = true; mpSubEdit->SetReadOnly( mbReadOnly ); } @@ -2999,8 +2999,8 @@ PopupMenu* Edit::CreatePopupMenu() pPopup->SetAccelKey( SV_MENU_EDIT_COPY, KeyCode( KEYFUNC_COPY ) ); pPopup->SetAccelKey( SV_MENU_EDIT_PASTE, KeyCode( KEYFUNC_PASTE ) ); pPopup->SetAccelKey( SV_MENU_EDIT_DELETE, KeyCode( KEYFUNC_DELETE ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, sal_False, sal_True, sal_False, sal_False ) ); - pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, sal_True, sal_True, sal_False, sal_False ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_SELECTALL, KeyCode( KEY_A, false, true, false, false ) ); + pPopup->SetAccelKey( SV_MENU_EDIT_INSERTSYMBOL, KeyCode( KEY_S, true, true, false, false ) ); } return pPopup; } @@ -3081,7 +3081,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& { SolarMutexGuard aVclGuard; - sal_Bool bChanges = sal_False; + bool bChanges = false; if ( !mbReadOnly && mpDDInfo ) { ImplHideDDCursor(); @@ -3109,7 +3109,7 @@ void Edit::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEvent& OUString aText; aData >>= aText; ImplInsertText( aText ); - bChanges = sal_True; + bChanges = true; ImplModified(); } } diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 09eeeb8f6530..ffe59c8794bd 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -263,8 +263,8 @@ static void ImplUpdateSeparators( const OUString& rOldDecSep, const OUString& rN if( bChangeDec || bChangeTh ) { - sal_Bool bUpdateMode = pEdit->IsUpdateMode(); - pEdit->SetUpdateMode( sal_False ); + bool bUpdateMode = pEdit->IsUpdateMode(); + pEdit->SetUpdateMode( false ); OUString aText = pEdit->GetText(); ImplUpdateSeparatorString( aText, rOldDecSep, rNewDecSep, rOldThSep, rNewThSep ); pEdit->SetText( aText ); @@ -295,11 +295,11 @@ FormatterBase::FormatterBase( Edit* pField ) { mpField = pField; mpLocaleDataWrapper = NULL; - mbReformat = sal_False; - mbStrictFormat = sal_False; - mbEmptyFieldValue = sal_False; - mbEmptyFieldValueEnabled = sal_False; - mbDefaultLocale = sal_True; + mbReformat = false; + mbStrictFormat = false; + mbEmptyFieldValue = false; + mbEmptyFieldValueEnabled = false; + mbDefaultLocale = true; } FormatterBase::~FormatterBase() @@ -330,7 +330,7 @@ void FormatterBase::ReformatAll() Reformat(); }; -void FormatterBase::SetStrictFormat( sal_Bool bStrict ) +void FormatterBase::SetStrictFormat( bool bStrict ) { if ( bStrict != mbStrictFormat ) { @@ -343,7 +343,7 @@ void FormatterBase::SetStrictFormat( sal_Bool bStrict ) void FormatterBase::SetLocale( const lang::Locale& rLocale ) { ImplGetLocaleDataWrapper().setLanguageTag( LanguageTag( rLocale) ); - mbDefaultLocale = sal_False; + mbDefaultLocale = false; ReformatAll(); } @@ -394,7 +394,7 @@ void FormatterBase::ImplSetText( const OUString& rText, Selection* pNewSelection mpField->SetText( rText, aSel ); } - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); } } @@ -402,19 +402,19 @@ void FormatterBase::SetEmptyFieldValue() { if ( mpField ) mpField->SetText( OUString() ); - mbEmptyFieldValue = sal_True; + mbEmptyFieldValue = true; } -sal_Bool FormatterBase::IsEmptyFieldValue() const +bool FormatterBase::IsEmptyFieldValue() const { return (!mpField || mpField->GetText().isEmpty()); } -sal_Bool NumericFormatter::ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, +bool NumericFormatter::ImplNumericReformat( const OUString& rStr, sal_Int64& rValue, OUString& rOutStr ) { if ( !ImplNumericGetValue( rStr, rValue, GetDecimalDigits(), ImplGetLocaleDataWrapper() ) ) - return sal_True; + return true; else { sal_Int64 nTempVal = rValue; @@ -429,14 +429,14 @@ sal_Bool NumericFormatter::ImplNumericReformat( const OUString& rStr, sal_Int64& if ( !GetErrorHdl().Call( this ) ) { mnCorrectedValue = 0; - return sal_False; + return false; } else mnCorrectedValue = 0; } rOutStr = CreateFieldText( nTempVal ); - return sal_True; + return true; } } @@ -449,8 +449,8 @@ void NumericFormatter::ImplInit() mnCorrectedValue = 0; mnDecimalDigits = 2; mnType = FORMAT_NUMERIC; - mbThousandSep = sal_True; - mbShowTrailingZeros = sal_True; + mbThousandSep = true; + mbShowTrailingZeros = true; // for fields mnSpinSize = 1; @@ -480,7 +480,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId ) mnMax = pMgr->ReadLong(); if ( NUMERICFORMATTER_STRICTFORMAT & nMask ) - SetStrictFormat( (sal_Bool)pMgr->ReadShort() ); + SetStrictFormat( pMgr->ReadShort() != 0 ); if ( NUMERICFORMATTER_DECIMALDIGITS & nMask ) SetDecimalDigits( pMgr->ReadShort() ); @@ -496,7 +496,7 @@ void NumericFormatter::ImplLoadRes( const ResId& rResId ) } if ( NUMERICFORMATTER_NOTHOUSANDSEP & nMask ) - SetUseThousandSep( !(sal_Bool)pMgr->ReadShort() ); + SetUseThousandSep( pMgr->ReadShort() == 0 ); } } @@ -518,7 +518,7 @@ void NumericFormatter::SetMax( sal_Int64 nNewMax ) ReformatAll(); } -void NumericFormatter::SetUseThousandSep( sal_Bool bValue ) +void NumericFormatter::SetUseThousandSep( bool bValue ) { mbThousandSep = bValue; ReformatAll(); @@ -530,7 +530,7 @@ void NumericFormatter::SetDecimalDigits( sal_uInt16 nDigits ) ReformatAll(); } -void NumericFormatter::SetShowTrailingZeros( sal_Bool bShowTrailingZeros ) +void NumericFormatter::SetShowTrailingZeros( bool bShowTrailingZeros ) { if ( mbShowTrailingZeros != bShowTrailingZeros ) { @@ -548,7 +548,7 @@ void NumericFormatter::SetValue( sal_Int64 nNewValue ) { SetUserValue( nNewValue ); mnFieldValue = mnLastValue; - SetEmptyFieldValueData( sal_False ); + SetEmptyFieldValueData( false ); } OUString NumericFormatter::CreateFieldText( sal_Int64 nValue ) const @@ -593,14 +593,14 @@ sal_Int64 NumericFormatter::GetValue() const return mnLastValue; } -sal_Bool NumericFormatter::IsValueModified() const +bool NumericFormatter::IsValueModified() const { if ( ImplGetEmptyFieldValue() ) return !IsEmptyFieldValue(); else if ( GetValue() != mnFieldValue ) - return sal_True; + return true; else - return sal_False; + return false; } sal_Int64 NumericFormatter::Normalize( sal_Int64 nValue ) const @@ -640,7 +640,7 @@ void NumericFormatter::Reformat() OUString aStr; sal_Int64 nTemp = mnLastValue; - sal_Bool bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr ); + bool bOK = ImplNumericReformat( GetField()->GetText(), nTemp, aStr ); mnLastValue = nTemp; if ( !bOK ) return; @@ -791,7 +791,7 @@ bool NumericField::PreNotify( NotifyEvent& rNEvt ) bool NumericField::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -820,7 +820,7 @@ void NumericField::DataChanged( const DataChangedEvent& rDCEvt ) void NumericField::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); SpinField::Modify(); } @@ -943,7 +943,7 @@ bool NumericBox::PreNotify( NotifyEvent& rNEvt ) bool NumericBox::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -972,7 +972,7 @@ void NumericBox::DataChanged( const DataChangedEvent& rDCEvt ) void NumericBox::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); ComboBox::Modify(); } @@ -980,7 +980,7 @@ void NumericBox::ReformatAll() { sal_Int64 nValue; OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -989,7 +989,7 @@ void NumericBox::ReformatAll() InsertEntry( aStr, i ); } NumericFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } void NumericBox::InsertValue( sal_Int64 nValue, sal_uInt16 nPos ) @@ -1337,10 +1337,10 @@ static bool ImplMetricGetValue( const OUString& rStr, double& rValue, sal_Int64 return true; } -sal_Bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ) +bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rValue, OUString& rOutStr ) { if ( !ImplMetricGetValue( rStr, rValue, mnBaseValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), meUnit ) ) - return sal_True; + return true; else { double nTempVal = rValue; @@ -1356,14 +1356,14 @@ sal_Bool MetricFormatter::ImplMetricReformat( const OUString& rStr, double& rVal if ( !GetErrorHdl().Call( this ) ) { mnCorrectedValue = 0; - return sal_False; + return false; } else mnCorrectedValue = 0; } rOutStr = CreateFieldText( (sal_Int64)nTempVal ); - return sal_True; + return true; } } @@ -1541,7 +1541,7 @@ void MetricFormatter::Reformat() OUString aStr; // caution: precision loss in double cast double nTemp = (double)mnLastValue; - sal_Bool bOK = ImplMetricReformat( aText, nTemp, aStr ); + bool bOK = ImplMetricReformat( aText, nTemp, aStr ); mnLastValue = (sal_Int64)nTemp; if ( !bOK ) @@ -1689,7 +1689,7 @@ bool MetricField::PreNotify( NotifyEvent& rNEvt ) bool MetricField::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -1718,7 +1718,7 @@ void MetricField::DataChanged( const DataChangedEvent& rDCEvt ) void MetricField::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); SpinField::Modify(); } @@ -1790,7 +1790,7 @@ bool MetricBox::PreNotify( NotifyEvent& rNEvt ) bool MetricBox::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -1819,7 +1819,7 @@ void MetricBox::DataChanged( const DataChangedEvent& rDCEvt ) void MetricBox::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); ComboBox::Modify(); } @@ -1827,7 +1827,7 @@ void MetricBox::ReformatAll() { double nValue; OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -1836,7 +1836,7 @@ void MetricBox::ReformatAll() InsertEntry( aStr, i ); } MetricFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } void MetricBox::CustomConvert() @@ -1899,11 +1899,11 @@ inline bool ImplCurrencyGetValue( const OUString& rStr, sal_Int64& rValue, return ImplNumericGetValue( rStr, rValue, nDecDigits, rWrapper, true ); } -sal_Bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ) +bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString& rOutStr ) { sal_Int64 nValue; if ( !ImplNumericGetValue( rStr, nValue, GetDecimalDigits(), ImplGetLocaleDataWrapper(), true ) ) - return sal_True; + return true; else { sal_Int64 nTempVal = nValue; @@ -1918,14 +1918,14 @@ sal_Bool CurrencyFormatter::ImplCurrencyReformat( const OUString& rStr, OUString if ( !GetErrorHdl().Call( this ) ) { mnCorrectedValue = 0; - return sal_False; + return false; } else mnCorrectedValue = 0; } rOutStr = CreateFieldText( nTempVal ); - return sal_True; + return true; } } @@ -1952,7 +1952,7 @@ void CurrencyFormatter::SetValue( sal_Int64 nNewValue ) { SetUserValue( nNewValue ); mnFieldValue = mnLastValue; - SetEmptyFieldValueData( sal_False ); + SetEmptyFieldValueData( false ); } OUString CurrencyFormatter::CreateFieldText( sal_Int64 nValue ) const @@ -1984,7 +1984,7 @@ void CurrencyFormatter::Reformat() return; OUString aStr; - sal_Bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr ); + bool bOK = ImplCurrencyReformat( GetField()->GetText(), aStr ); if ( !bOK ) return; @@ -2024,7 +2024,7 @@ bool CurrencyField::PreNotify( NotifyEvent& rNEvt ) bool CurrencyField::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -2053,7 +2053,7 @@ void CurrencyField::DataChanged( const DataChangedEvent& rDCEvt ) void CurrencyField::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); SpinField::Modify(); } @@ -2106,7 +2106,7 @@ bool CurrencyBox::PreNotify( NotifyEvent& rNEvt ) bool CurrencyBox::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -2135,14 +2135,14 @@ void CurrencyBox::DataChanged( const DataChangedEvent& rDCEvt ) void CurrencyBox::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); ComboBox::Modify(); } void CurrencyBox::ReformatAll() { OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -2151,7 +2151,7 @@ void CurrencyBox::ReformatAll() InsertEntry( aStr, i ); } CurrencyFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } sal_Int64 CurrencyBox::GetValue() const diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index d4c537b34a11..0568ad4c9d1b 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -450,10 +450,10 @@ static sal_Int32 ImplPatternRightPos( const OUString& rStr, const OString& rEdit static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, const OString& rEditMask, const OUString& rLiteralMask, - sal_Bool bStrictFormat, + bool bStrictFormat, sal_uInt16 nFormatFlags, bool bSameMask, - sal_Bool& rbInKeyInput ) + bool& rbInKeyInput ) { if ( rEditMask.isEmpty() || !bStrictFormat ) return false; @@ -462,7 +462,7 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, KeyCode aCode = rKEvt.GetKeyCode(); sal_Unicode cChar = rKEvt.GetCharCode(); sal_uInt16 nKeyCode = aCode.GetCode(); - sal_Bool bShift = aCode.IsShift(); + bool bShift = aCode.IsShift(); sal_Int32 nCursorPos = static_cast<sal_Int32>(aOldSel.Max()); sal_Int32 nNewPos; sal_Int32 nTempPos; @@ -579,11 +579,11 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, { if ( bSameMask ) aStr = ImplPatternReformat( aStr.toString(), rEditMask, rLiteralMask, nFormatFlags ); - rbInKeyInput = sal_True; + rbInKeyInput = true; pEdit->SetText( aStr.toString(), Selection( nNewPos ) ); pEdit->SetModifyFlag(); pEdit->Modify(); - rbInKeyInput = sal_False; + rbInKeyInput = false; } else pEdit->SetSelection( Selection( nNewPos ) ); @@ -704,12 +704,12 @@ static bool ImplPatternProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, if ( !bError ) { - rbInKeyInput = sal_True; + rbInKeyInput = true; Selection aNewSel( ImplPatternRightPos( aStr.toString(), rEditMask, nFormatFlags, bSameMask, nNewPos ) ); pEdit->SetText( aStr.toString(), aNewSel ); pEdit->SetModifyFlag(); pEdit->Modify(); - rbInKeyInput = sal_False; + rbInKeyInput = false; } } @@ -772,7 +772,7 @@ PatternFormatter::PatternFormatter() { mnFormatFlags = 0; mbSameMask = true; - mbInPattKeyInput = sal_False; + mbInPattKeyInput = false; } PatternFormatter::~PatternFormatter() @@ -792,7 +792,7 @@ void PatternFormatter::SetString( const OUString& rStr ) if ( GetField() ) { GetField()->SetText( rStr ); - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); } } @@ -810,7 +810,7 @@ void PatternFormatter::Reformat() { ImplSetText( ImplPatternReformat( GetField()->GetText(), m_aEditMask, maLiteralMask, mnFormatFlags ) ); if ( !mbSameMask && IsStrictFormat() && !GetField()->IsReadOnly() ) - GetField()->SetInsertMode( sal_False ); + GetField()->SetInsertMode( false ); } } @@ -841,7 +841,7 @@ bool PatternField::PreNotify( NotifyEvent& rNEvt ) bool PatternField::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -858,7 +858,7 @@ void PatternField::Modify() if ( IsStrictFormat() ) ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), GetFormatFlags(), ImplIsSameMask() ); else - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); } SpinField::Modify(); @@ -891,7 +891,7 @@ bool PatternBox::PreNotify( NotifyEvent& rNEvt ) bool PatternBox::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -908,7 +908,7 @@ void PatternBox::Modify() if ( IsStrictFormat() ) ImplPatternProcessStrictModify( GetField(), GetEditMask(), GetLiteralMask(), GetFormatFlags(), ImplIsSameMask() ); else - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); } ComboBox::Modify(); @@ -917,7 +917,7 @@ void PatternBox::Modify() void PatternBox::ReformatAll() { OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -926,7 +926,7 @@ void PatternBox::ReformatAll() InsertEntry( aStr, i ); } PatternFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } static ExtDateFieldFormat ImplGetExtFormat( DateFormat eOld ) @@ -1111,11 +1111,11 @@ static bool ImplDateGetValue( const OUString& rStr, Date& rDate, ExtDateFieldFor return false; } -sal_Bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr, const AllSettings& rSettings ) +bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutStr, const AllSettings& rSettings ) { Date aDate( 0, 0, 0 ); - if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) - return sal_True; + if ( !ImplDateGetValue( rStr, aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) + return true; Date aTempDate = aDate; if ( aTempDate > GetMax() ) @@ -1129,7 +1129,7 @@ sal_Bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutSt if( !GetErrorHdl().Call( this ) ) { maCorrectedDate = Date( Date::SYSTEM ); - return sal_False; + return false; } else maCorrectedDate = Date( Date::SYSTEM ); @@ -1137,7 +1137,7 @@ sal_Bool DateFormatter::ImplDateReformat( const OUString& rStr, OUString& rOutSt rOutStr = ImplGetDateAsText( aTempDate, rSettings ); - return sal_True; + return true; } OUString DateFormatter::ImplGetDateAsText( const Date& rDate, @@ -1176,7 +1176,7 @@ OUString DateFormatter::ImplGetDateAsText( const Date& rDate, sal_Unicode aBuf[128]; sal_Unicode* pBuf = aBuf; - OUString aDateSep = ImplGetDateSep( ImplGetLocaleDataWrapper(), GetExtDateFormat( sal_True ) ); + OUString aDateSep = ImplGetDateSep( ImplGetLocaleDataWrapper(), GetExtDateFormat( true ) ); sal_uInt16 nDay = rDate.GetDay(); sal_uInt16 nMonth = rDate.GetMonth(); sal_uInt16 nYear = rDate.GetYear(); @@ -1185,7 +1185,7 @@ OUString DateFormatter::ImplGetDateAsText( const Date& rDate, if ( !bShowCentury ) nYear %= 100; - switch ( GetExtDateFormat( sal_True ) ) + switch ( GetExtDateFormat( true ) ) { case XTDATEF_SYSTEM_LONG: { @@ -1232,7 +1232,7 @@ OUString DateFormatter::ImplGetDateAsText( const Date& rDate, return OUString(aBuf, pBuf-aBuf); } -static void ImplDateIncrementDay( Date& rDate, sal_Bool bUp ) +static void ImplDateIncrementDay( Date& rDate, bool bUp ) { DateFormatter::ExpandCentury( rDate ); @@ -1248,7 +1248,7 @@ static void ImplDateIncrementDay( Date& rDate, sal_Bool bUp ) } } -static void ImplDateIncrementMonth( Date& rDate, sal_Bool bUp ) +static void ImplDateIncrementMonth( Date& rDate, bool bUp ) { DateFormatter::ExpandCentury( rDate ); @@ -1286,7 +1286,7 @@ static void ImplDateIncrementMonth( Date& rDate, sal_Bool bUp ) rDate.SetDay( nDaysInMonth ); } -static void ImplDateIncrementYear( Date& rDate, sal_Bool bUp ) +static void ImplDateIncrementYear( Date& rDate, bool bUp ) { DateFormatter::ExpandCentury( rDate ); @@ -1318,12 +1318,12 @@ static void ImplDateIncrementYear( Date& rDate, sal_Bool bUp ) } } -sal_Bool DateFormatter::ImplAllowMalformedInput() const +bool DateFormatter::ImplAllowMalformedInput() const { return !IsEnforceValidValue(); } -void DateField::ImplDateSpinArea( sal_Bool bUp ) +void DateField::ImplDateSpinArea( bool bUp ) { // increment days if all is selected if ( GetField() ) @@ -1338,7 +1338,7 @@ void DateField::ImplDateSpinArea( sal_Bool bUp ) { sal_Int8 nDateArea = 0; - ExtDateFieldFormat eFormat = GetExtDateFormat( sal_True ); + ExtDateFieldFormat eFormat = GetExtDateFormat( true ); if ( eFormat == XTDATEF_SYSTEM_LONG ) { eFormat = ImplGetExtFormat( ImplGetLocaleDataWrapper().getLongDateFormat() ); @@ -1415,8 +1415,8 @@ void DateField::ImplDateSpinArea( sal_Bool bUp ) void DateFormatter::ImplInit() { - mbLongFormat = sal_False; - mbShowDateCentury = sal_True; + mbLongFormat = false; + mbShowDateCentury = true; mpCalendarWrapper = NULL; mnDateFormat = 0xFFFF; mnExtDateFormat = XTDATEF_SYSTEM_SHORT; @@ -1428,7 +1428,7 @@ DateFormatter::DateFormatter() : maMin( 1, 1, 1900 ), maMax( 31, 12, 2200 ), maCorrectedDate( Date::SYSTEM ), - mbEnforceValidValue( sal_True ) + mbEnforceValidValue( true ) { ImplInit(); } @@ -1451,10 +1451,10 @@ void DateFormatter::ImplLoadRes( const ResId& rResId ) pMgr->Increment( pMgr->GetObjSize( (RSHEADER_TYPE*)pMgr->GetClass() ) ); } if ( DATEFORMATTER_LONGFORMAT & nMask ) - mbLongFormat = (sal_Bool)pMgr->ReadShort(); + mbLongFormat = pMgr->ReadShort() != 0; if ( DATEFORMATTER_STRICTFORMAT & nMask ) - SetStrictFormat( (sal_Bool)pMgr->ReadShort() ); + SetStrictFormat( pMgr->ReadShort() != 0 ); if ( DATEFORMATTER_VALUE & nMask ) { @@ -1499,7 +1499,7 @@ void DateFormatter::SetExtDateFormat( ExtDateFieldFormat eFormat ) ReformatAll(); } -ExtDateFieldFormat DateFormatter::GetExtDateFormat( sal_Bool bResolveSystemFormat ) const +ExtDateFieldFormat DateFormatter::GetExtDateFormat( bool bResolveSystemFormat ) const { ExtDateFieldFormat eDateFormat = (ExtDateFieldFormat)mnExtDateFormat; @@ -1539,7 +1539,7 @@ void DateFormatter::SetMax( const Date& rNewMax ) ReformatAll(); } -void DateFormatter::SetLongFormat( sal_Bool bLong ) +void DateFormatter::SetLongFormat( bool bLong ) { mbLongFormat = bLong; @@ -1557,7 +1557,7 @@ void DateFormatter::SetLongFormat( sal_Bool bLong ) ReformatAll(); } -void DateFormatter::SetShowDateCentury( sal_Bool bShowDateCentury ) +void DateFormatter::SetShowDateCentury( bool bShowDateCentury ) { mbShowDateCentury = bShowDateCentury; @@ -1664,7 +1664,7 @@ Date DateFormatter::GetDate() const if ( GetField() ) { - if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) + if ( ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) { if ( aDate > maMax ) aDate = maMax; @@ -1696,20 +1696,20 @@ void DateFormatter::SetEmptyDate() FormatterBase::SetEmptyFieldValue(); } -sal_Bool DateFormatter::IsEmptyDate() const +bool DateFormatter::IsEmptyDate() const { - sal_Bool bEmpty = FormatterBase::IsEmptyFieldValue(); + bool bEmpty = FormatterBase::IsEmptyFieldValue(); if ( GetField() && MustBeReformatted() && IsEmptyFieldValueEnabled() ) { if ( GetField()->GetText().isEmpty() ) { - bEmpty = sal_True; + bEmpty = true; } else if ( !maLastDate.GetDate() ) { Date aDate( Date::EMPTY ); - bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ); + bEmpty = !ImplDateGetValue( GetField()->GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ); } } return bEmpty; @@ -1724,14 +1724,14 @@ void DateFormatter::Reformat() return; OUString aStr; - sal_Bool bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() ); + bool bOK = ImplDateReformat( GetField()->GetText(), aStr, GetFieldSettings() ); if( !bOK ) return; if ( !aStr.isEmpty() ) { ImplSetText( aStr ); - ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ); + ImplDateGetValue( aStr, maLastDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ); } else { @@ -1742,7 +1742,7 @@ void DateFormatter::Reformat() else { ImplSetText( OUString() ); - SetEmptyFieldValueData( sal_True ); + SetEmptyFieldValueData( true ); } } } @@ -1828,7 +1828,7 @@ bool DateField::PreNotify( NotifyEvent& rNEvt ) ( GetExtDateFormat() != XTDATEF_SYSTEM_LONG ) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( sal_True ), ImplGetLocaleDataWrapper() ) ) + if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( true ), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1838,7 +1838,7 @@ bool DateField::PreNotify( NotifyEvent& rNEvt ) bool DateField::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() ) @@ -1854,7 +1854,7 @@ bool DateField::Notify( NotifyEvent& rNEvt ) else { Date aDate( 0, 0, 0 ); - if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(sal_True), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) + if ( ImplDateGetValue( GetText(), aDate, GetExtDateFormat(true), ImplGetLocaleDataWrapper(), GetCalendarWrapper(), GetFieldSettings() ) ) // even with strict text analysis, our text is a valid date -> do a complete // reformat Reformat(); @@ -1863,7 +1863,7 @@ bool DateField::Notify( NotifyEvent& rNEvt ) else if ( !bTextLen && IsEmptyFieldValueEnabled() ) { ResetLastDate(); - SetEmptyFieldValueData( sal_True ); + SetEmptyFieldValueData( true ); } } } @@ -1885,19 +1885,19 @@ void DateField::DataChanged( const DataChangedEvent& rDCEvt ) void DateField::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); SpinField::Modify(); } void DateField::Up() { - ImplDateSpinArea( sal_True ); + ImplDateSpinArea( true ); SpinField::Up(); } void DateField::Down() { - ImplDateSpinArea( sal_False ); + ImplDateSpinArea( false ); SpinField::Down(); } @@ -1931,7 +1931,7 @@ bool DateBox::PreNotify( NotifyEvent& rNEvt ) ( GetExtDateFormat() != XTDATEF_SYSTEM_LONG ) && !rNEvt.GetKeyEvent()->GetKeyCode().IsMod2() ) { - if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( sal_True ), ImplGetLocaleDataWrapper() ) ) + if ( ImplDateProcessKeyInput( GetField(), *rNEvt.GetKeyEvent(), GetExtDateFormat( true ), ImplGetLocaleDataWrapper() ) ) return true; } @@ -1953,7 +1953,7 @@ void DateBox::DataChanged( const DataChangedEvent& rDCEvt ) bool DateBox::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() ) @@ -1964,7 +1964,7 @@ bool DateBox::Notify( NotifyEvent& rNEvt ) else if ( !bTextLen && IsEmptyFieldValueEnabled() ) { ResetLastDate(); - SetEmptyFieldValueData( sal_True ); + SetEmptyFieldValueData( true ); } } } @@ -1974,14 +1974,14 @@ bool DateBox::Notify( NotifyEvent& rNEvt ) void DateBox::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); ComboBox::Modify(); } void DateBox::ReformatAll() { OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -1990,11 +1990,11 @@ void DateBox::ReformatAll() InsertEntry( aStr, i ); } DateFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } static bool ImplTimeProcessKeyInput( Edit*, const KeyEvent& rKEvt, - sal_Bool bStrictFormat, sal_Bool bDuration, + bool bStrictFormat, bool bDuration, TimeFieldFormat eFormat, const LocaleDataWrapper& rLocaleDataWrapper ) { @@ -2033,7 +2033,7 @@ static bool ImplIsOnlyDigits( const OUStringBuffer& _rStr ) return true; } -static bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const OUStringBuffer& _rStr ) +static bool ImplIsValidTimePortion( bool _bSkipInvalidCharacters, const OUStringBuffer& _rStr ) { if ( !_bSkipInvalidCharacters ) { @@ -2043,7 +2043,7 @@ static bool ImplIsValidTimePortion( sal_Bool _bSkipInvalidCharacters, const OUSt return true; } -static bool ImplCutTimePortion( OUStringBuffer& _rStr, sal_Int32 _nSepPos, sal_Bool _bSkipInvalidCharacters, short* _pPortion ) +static bool ImplCutTimePortion( OUStringBuffer& _rStr, sal_Int32 _nSepPos, bool _bSkipInvalidCharacters, short* _pPortion ) { OUString sPortion(_rStr.getStr(), _nSepPos ); _rStr = _nSepPos < _rStr.getLength() @@ -2056,8 +2056,8 @@ static bool ImplCutTimePortion( OUStringBuffer& _rStr, sal_Int32 _nSepPos, sal_B } static bool ImplTimeGetValue( const OUString& rStr, Time& rTime, - TimeFieldFormat eFormat, sal_Bool bDuration, - const LocaleDataWrapper& rLocaleDataWrapper, sal_Bool _bSkipInvalidCharacters = sal_True ) + TimeFieldFormat eFormat, bool bDuration, + const LocaleDataWrapper& rLocaleDataWrapper, bool _bSkipInvalidCharacters = true ) { OUStringBuffer aStr = rStr; short nHour = 0; @@ -2251,11 +2251,11 @@ static bool ImplTimeGetValue( const OUString& rStr, Time& rTime, return true; } -sal_Bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr ) +bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutStr ) { Time aTime( 0, 0, 0 ); if ( !ImplTimeGetValue( rStr, aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper() ) ) - return sal_True; + return true; Time aTempTime = aTime; if ( aTempTime > GetMax() ) @@ -2269,18 +2269,18 @@ sal_Bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutSt if ( !GetErrorHdl().Call( this ) ) { maCorrectedTime = Time( Time::SYSTEM ); - return sal_False; + return false; } else maCorrectedTime = Time( Time::SYSTEM ); } - sal_Bool bSecond = sal_False; - sal_Bool b100Sec = sal_False; + bool bSecond = false; + bool b100Sec = false; if ( meFormat != TIMEF_NONE ) - bSecond = sal_True; + bSecond = true; if ( meFormat == TIMEF_100TH_SEC ) - b100Sec = sal_True; + b100Sec = true; if ( meFormat == TIMEF_SEC_CS ) { @@ -2316,14 +2316,14 @@ sal_Bool TimeFormatter::ImplTimeReformat( const OUString& rStr, OUString& rOutSt } } - return sal_True; + return true; } -sal_Bool TimeFormatter::ImplAllowMalformedInput() const +bool TimeFormatter::ImplAllowMalformedInput() const { return !IsEnforceValidValue(); } -void TimeField::ImplTimeSpinArea( sal_Bool bUp ) +void TimeField::ImplTimeSpinArea( bool bUp ) { if ( GetField() ) { @@ -2399,7 +2399,7 @@ void TimeField::ImplTimeSpinArea( sal_Bool bUp ) void TimeFormatter::ImplInit() { meFormat = TIMEF_NONE; - mbDuration = sal_False; + mbDuration = false; mnTimeFormat = HOUR_24; // Should become a ExtTimeFieldFormat in next implementation, merge with mbDuration and meFormat } @@ -2408,7 +2408,7 @@ TimeFormatter::TimeFormatter() : maMin( 0, 0 ), maMax( 23, 59, 59, 999999999 ), maCorrectedTime( Time::SYSTEM ), - mbEnforceValidValue( sal_True ), + mbEnforceValidValue( true ), maFieldTime( 0, 0 ) { ImplInit(); @@ -2437,10 +2437,10 @@ void TimeFormatter::ImplLoadRes( const ResId& rResId ) meFormat = (TimeFieldFormat)pMgr->ReadLong(); if ( TIMEFORMATTER_DURATION & nMask ) - mbDuration = (sal_Bool)pMgr->ReadShort(); + mbDuration = pMgr->ReadShort() != 0; if ( TIMEFORMATTER_STRICTFORMAT & nMask ) - SetStrictFormat( (sal_Bool)pMgr->ReadShort() ); + SetStrictFormat( pMgr->ReadShort() != 0 ); if ( TIMEFORMATTER_VALUE & nMask ) { @@ -2495,7 +2495,7 @@ void TimeFormatter::SetFormat( TimeFieldFormat eNewFormat ) ReformatAll(); } -void TimeFormatter::SetDuration( sal_Bool bNewDuration ) +void TimeFormatter::SetDuration( bool bNewDuration ) { mbDuration = bNewDuration; ReformatAll(); @@ -2505,7 +2505,7 @@ void TimeFormatter::SetTime( const Time& rNewTime ) { SetUserTime( rNewTime ); maFieldTime = maLastTime; - SetEmptyFieldValueData( sal_False ); + SetEmptyFieldValueData( false ); } void TimeFormatter::ImplNewFieldValue( const Time& rTime ) @@ -2549,12 +2549,12 @@ void TimeFormatter::ImplSetUserTime( const Time& rNewTime, Selection* pNewSelect if ( GetField() ) { OUString aStr; - sal_Bool bSec = sal_False; - sal_Bool b100Sec = sal_False; + bool bSec = false; + bool b100Sec = false; if ( meFormat != TIMEF_NONE ) - bSec = sal_True; + bSec = true; if ( meFormat == TIMEF_100TH_SEC || meFormat == TIMEF_SEC_CS ) - b100Sec = sal_True; + b100Sec = true; if ( meFormat == TIMEF_SEC_CS ) { sal_uLong n = aNewTime.GetHour() * 3600L; @@ -2606,7 +2606,7 @@ Time TimeFormatter::GetTime() const if ( GetField() ) { - sal_Bool bAllowMailformed = ImplAllowMalformedInput(); + bool bAllowMailformed = ImplAllowMalformedInput(); if ( ImplTimeGetValue( GetField()->GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), !bAllowMailformed ) ) { if ( aTime > GetMax() ) @@ -2635,7 +2635,7 @@ void TimeFormatter::Reformat() return; OUString aStr; - sal_Bool bOK = ImplTimeReformat( GetField()->GetText(), aStr ); + bool bOK = ImplTimeReformat( GetField()->GetText(), aStr ); if ( !bOK ) return; @@ -2717,7 +2717,7 @@ bool TimeField::PreNotify( NotifyEvent& rNEvt ) bool TimeField::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -2727,7 +2727,7 @@ bool TimeField::Notify( NotifyEvent& rNEvt ) else { Time aTime( 0, 0, 0 ); - if ( ImplTimeGetValue( GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), sal_False ) ) + if ( ImplTimeGetValue( GetText(), aTime, GetFormat(), IsDuration(), ImplGetLocaleDataWrapper(), false ) ) // even with strict text analysis, our text is a valid time -> do a complete // reformat Reformat(); @@ -2752,19 +2752,19 @@ void TimeField::DataChanged( const DataChangedEvent& rDCEvt ) void TimeField::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); SpinField::Modify(); } void TimeField::Up() { - ImplTimeSpinArea( sal_True ); + ImplTimeSpinArea( true ); SpinField::Up(); } void TimeField::Down() { - ImplTimeSpinArea( sal_False ); + ImplTimeSpinArea( false ); SpinField::Down(); } @@ -2787,40 +2787,40 @@ void TimeField::SetExtFormat( ExtTimeFieldFormat eFormat ) case EXTTIMEF_24H_SHORT: { SetTimeFormat( HOUR_24 ); - SetDuration( sal_False ); + SetDuration( false ); SetFormat( TIMEF_NONE ); } break; case EXTTIMEF_24H_LONG: { SetTimeFormat( HOUR_24 ); - SetDuration( sal_False ); + SetDuration( false ); SetFormat( TIMEF_SEC ); } break; case EXTTIMEF_12H_SHORT: { SetTimeFormat( HOUR_12 ); - SetDuration( sal_False ); + SetDuration( false ); SetFormat( TIMEF_NONE ); } break; case EXTTIMEF_12H_LONG: { SetTimeFormat( HOUR_12 ); - SetDuration( sal_False ); + SetDuration( false ); SetFormat( TIMEF_SEC ); } break; case EXTTIMEF_DURATION_SHORT: { - SetDuration( sal_True ); + SetDuration( true ); SetFormat( TIMEF_NONE ); } break; case EXTTIMEF_DURATION_LONG: { - SetDuration( sal_True ); + SetDuration( true ); SetFormat( TIMEF_SEC ); } break; @@ -2858,7 +2858,7 @@ bool TimeBox::PreNotify( NotifyEvent& rNEvt ) bool TimeBox::Notify( NotifyEvent& rNEvt ) { if ( rNEvt.GetType() == EVENT_GETFOCUS ) - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { if ( MustBeReformatted() && (!GetText().isEmpty() || !IsEmptyFieldValueEnabled()) ) @@ -2882,14 +2882,14 @@ void TimeBox::DataChanged( const DataChangedEvent& rDCEvt ) void TimeBox::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); ComboBox::Modify(); } void TimeBox::ReformatAll() { OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -2898,7 +2898,7 @@ void TimeBox::ReformatAll() InsertEntry( aStr, i ); } TimeFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/fixed.cxx b/vcl/source/control/fixed.cxx index 7020ab79cf12..fe988dd0637c 100644 --- a/vcl/source/control/fixed.cxx +++ b/vcl/source/control/fixed.cxx @@ -91,7 +91,7 @@ void FixedText::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- @@ -118,8 +118,8 @@ const Color& FixedText::GetCanonicalTextColor( const StyleSettings& _rStyle ) co // ----------------------------------------------------------------------- -void FixedText::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void FixedText::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Control::ImplInitSettings( bFont, bForeground ); @@ -128,16 +128,16 @@ void FixedText::ImplInitSettings( sal_Bool bFont, Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -268,7 +268,7 @@ void FixedText::Paint( const Rectangle& ) void FixedText::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -330,24 +330,24 @@ void FixedText::StateChanged( StateChangedType nType ) if ( (GetPrevStyle() & FIXEDTEXT_VIEW_STYLE) != (GetStyle() & FIXEDTEXT_VIEW_STYLE) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } } else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -363,7 +363,7 @@ void FixedText::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -511,7 +511,7 @@ SelectableFixedText::SelectableFixedText(Window* pParent, WinBits nStyle) // make it transparent SetControlBackground(); SetBackground(); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); } // ----------------------------------------------------------------------- @@ -529,7 +529,7 @@ void FixedLine::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- @@ -556,8 +556,8 @@ const Color& FixedLine::GetCanonicalTextColor( const StyleSettings& _rStyle ) co // ----------------------------------------------------------------------- -void FixedLine::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void FixedLine::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Control::ImplInitSettings( bFont, bForeground ); @@ -566,16 +566,16 @@ void FixedLine::ImplInitSettings( sal_Bool bFont, Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -737,17 +737,17 @@ void FixedLine::StateChanged( StateChangedType nType ) (nType == STATE_CHANGE_STYLE) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -763,7 +763,7 @@ void FixedLine::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -800,16 +800,16 @@ void FixedBitmap::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -974,7 +974,7 @@ void FixedBitmap::SetBitmap( const Bitmap& rBitmap ) void FixedImage::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); - mbInUserDraw = sal_False; + mbInUserDraw = false; Control::ImplInit( pParent, nStyle, NULL ); ImplInitSettings(); } @@ -995,16 +995,16 @@ void FixedImage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent && pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -1082,10 +1082,10 @@ void FixedImage::ImplDraw( OutputDevice* pDev, sal_uLong nDrawFlags, } } - mbInUserDraw = sal_True; + mbInUserDraw = true; UserDrawEvent aUDEvt( pDev, Rectangle( rPos, rSize ), 0, nStyle ); UserDraw( aUDEvt ); - mbInUserDraw = sal_False; + mbInUserDraw = false; } // ----------------------------------------------------------------------- @@ -1194,10 +1194,10 @@ void FixedImage::SetImage( const Image& rImage ) // ----------------------------------------------------------------------- -sal_Bool FixedImage::SetModeImage( const Image& rImage ) +bool FixedImage::SetModeImage( const Image& rImage ) { SetImage( rImage ); - return sal_True; + return true; } // ----------------------------------------------------------------------- diff --git a/vcl/source/control/group.cxx b/vcl/source/control/group.cxx index 3cd6c3d54721..8e1ef5bf1f51 100644 --- a/vcl/source/control/group.cxx +++ b/vcl/source/control/group.cxx @@ -39,8 +39,8 @@ void GroupBox::ImplInit( Window* pParent, WinBits nStyle ) { nStyle = ImplInitStyle( nStyle ); Control::ImplInit( pParent, nStyle, NULL ); - SetMouseTransparent( sal_True ); - ImplInitSettings( sal_True, sal_True, sal_True ); + SetMouseTransparent( true ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- @@ -67,8 +67,8 @@ const Color& GroupBox::GetCanonicalTextColor( const StyleSettings& _rStyle ) con // ----------------------------------------------------------------------- -void GroupBox::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void GroupBox::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Control::ImplInitSettings( bFont, bForeground ); @@ -79,16 +79,16 @@ void GroupBox::ImplInitSettings( sal_Bool bFont, !(pParent->GetStyle() & WB_CLIPCHILDREN) ) && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -280,17 +280,17 @@ void GroupBox::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -306,7 +306,7 @@ void GroupBox::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } diff --git a/vcl/source/control/ilstbox.cxx b/vcl/source/control/ilstbox.cxx index a3b69126677f..9d1b2f60cabf 100644 --- a/vcl/source/control/ilstbox.cxx +++ b/vcl/source/control/ilstbox.cxx @@ -47,7 +47,7 @@ using namespace ::com::sun::star; // ======================================================================= -void ImplInitFieldSettings( Window* pWin, sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void ImplInitFieldSettings( Window* pWin, bool bFont, bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = pWin->GetSettings().GetStyleSettings(); @@ -98,7 +98,7 @@ ImplEntryList::ImplEntryList( Window* pWindow ) mnLastSelected = LISTBOX_ENTRY_NOTFOUND; mnSelectionAnchor = LISTBOX_ENTRY_NOTFOUND; mnImages = 0; - mbCallSelectionChangedHdl = sal_True; + mbCallSelectionChangedHdl = true; mnMRUCount = 0; mnMaxMRUCount = 0; @@ -121,7 +121,7 @@ void ImplEntryList::Clear() // ----------------------------------------------------------------------- -void ImplEntryList::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ) +void ImplEntryList::SelectEntry( sal_uInt16 nPos, bool bSelect ) { if (nPos < maEntries.size()) { @@ -151,7 +151,7 @@ namespace }; } -sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, sal_Bool bSort ) +sal_uInt16 ImplEntryList::InsertEntry( sal_uInt16 nPos, ImplEntryType* pNewEntry, bool bSort ) { if ( !!pNewEntry->maImage ) mnImages++; @@ -266,7 +266,7 @@ void ImplEntryList::RemoveEntry( sal_uInt16 nPos ) // ----------------------------------------------------------------------- -sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, sal_Bool bSearchMRUArea ) const +sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, bool bSearchMRUArea ) const { sal_uInt16 nEntries = maEntries.size(); for ( sal_uInt16 n = bSearchMRUArea ? 0 : GetMRUCount(); n < nEntries; n++ ) @@ -280,7 +280,7 @@ sal_uInt16 ImplEntryList::FindEntry( const OUString& rString, sal_Bool bSearchMR // ----------------------------------------------------------------------- -sal_uInt16 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart, sal_Bool bForward, sal_Bool bLazy ) const +sal_uInt16 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_uInt16 nStart, bool bForward, bool bLazy ) const { sal_uInt16 nPos = LISTBOX_ENTRY_NOTFOUND; sal_uInt16 nEntryCount = GetEntryCount(); @@ -297,7 +297,7 @@ sal_uInt16 ImplEntryList::FindMatchingEntry( const OUString& rStr, sal_uInt16 nS bool bMatch; if ( bLazy ) { - bMatch = rI18nHelper.MatchString( rStr, pImplEntry->maStr ) != 0; + bMatch = rI18nHelper.MatchString( rStr, pImplEntry->maStr ); } else { @@ -382,9 +382,9 @@ OUString ImplEntryList::GetEntryText( sal_uInt16 nPos ) const // ----------------------------------------------------------------------- -sal_Bool ImplEntryList::HasEntryImage( sal_uInt16 nPos ) const +bool ImplEntryList::HasEntryImage( sal_uInt16 nPos ) const { - sal_Bool bImage = sal_False; + bool bImage = false; ImplEntryType* pImplEntry = GetEntry( nPos ); if ( pImplEntry ) bImage = !!pImplEntry->maImage; @@ -484,7 +484,7 @@ sal_uInt16 ImplEntryList::GetSelectEntryPos( sal_uInt16 nIndex ) const // ----------------------------------------------------------------------- -sal_Bool ImplEntryList::IsEntryPosSelected( sal_uInt16 nIndex ) const +bool ImplEntryList::IsEntryPosSelected( sal_uInt16 nIndex ) const { ImplEntryType* pImplEntry = GetEntry( nIndex ); return pImplEntry ? pImplEntry->mbIsSelected : sal_False; @@ -570,7 +570,7 @@ ImplListBoxWindow::ImplListBoxWindow( Window* pParent, WinBits nWinStyle ) : SetTextFillColor(); SetBackground( Wallpaper( GetSettings().GetStyleSettings().GetFieldColor() ) ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); ImplCalcMetrics(); } @@ -583,7 +583,7 @@ ImplListBoxWindow::~ImplListBoxWindow() // ----------------------------------------------------------------------- -void ImplListBoxWindow::ImplInitSettings( sal_Bool bFont, sal_Bool bForeground, sal_Bool bBackground ) +void ImplListBoxWindow::ImplInitSettings( bool bFont, bool bForeground, bool bBackground ) { ImplInitFieldSettings( this, bFont, bForeground, bBackground ); } @@ -761,16 +761,16 @@ void ImplListBoxWindow::ImplCallSelect() sal_uInt16 nSelected = GetEntryList()->GetSelectEntryPos( 0 ); sal_uInt16 nMRUCount = GetEntryList()->GetMRUCount(); OUString aSelected = GetEntryList()->GetEntryText( nSelected ); - sal_uInt16 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, sal_True ); + sal_uInt16 nFirstMatchingEntryPos = GetEntryList()->FindEntry( aSelected, true ); if ( nFirstMatchingEntryPos || !nMRUCount ) { - sal_Bool bSelectNewEntry = sal_False; + bool bSelectNewEntry = false; if ( nFirstMatchingEntryPos < nMRUCount ) { RemoveEntry( nFirstMatchingEntryPos ); nMRUCount--; if ( nFirstMatchingEntryPos == nSelected ) - bSelectNewEntry = sal_True; + bSelectNewEntry = true; } else if ( nMRUCount == GetEntryList()->GetMaxMRUCount() ) { @@ -782,7 +782,7 @@ void ImplListBoxWindow::ImplCallSelect() ImplEntryType* pNewEntry = new ImplEntryType( aSelected ); pNewEntry->mbIsSelected = bSelectNewEntry; - GetEntryList()->InsertEntry( 0, pNewEntry, sal_False ); + GetEntryList()->InsertEntry( 0, pNewEntry, false ); ImplUpdateEntryMetrics( *pNewEntry ); GetEntryList()->SetMRUCount( ++nMRUCount ); SetSeparatorPos( nMRUCount ? nMRUCount-1 : 0 ); @@ -872,16 +872,16 @@ sal_uInt16 ImplListBoxWindow::GetEntryPosForPoint( const Point& rPoint ) const // ----------------------------------------------------------------------- -sal_Bool ImplListBoxWindow::IsVisible( sal_uInt16 i_nEntry ) const +bool ImplListBoxWindow::IsVisible( sal_uInt16 i_nEntry ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( i_nEntry >= mnTop ) { if( mpEntryList->GetAddedHeight( i_nEntry, mnTop ) < PixelToLogic( GetSizePixel() ).Height() ) { - bRet = sal_True; + bRet = true; } } @@ -929,7 +929,7 @@ void ImplListBoxWindow::MouseButtonDown( const MouseEvent& rMEvt ) mnCurrentPos = nSelect; mbTrackingSelect = true; - sal_Bool bCurPosChange = (mnCurrentPos != nSelect); + bool bCurPosChange = (mnCurrentPos != nSelect); SelectEntries( nSelect, LET_MBDOWN, rMEvt.IsShift(), rMEvt.IsMod1() ,bCurPosChange); mbTrackingSelect = false; if ( mbGrabFocus ) @@ -992,7 +992,7 @@ void ImplListBoxWindow::MouseMove( const MouseEvent& rMEvt ) ( ( nSelect != mnCurrentPos ) || !GetEntryList()->GetSelectEntryCount() || ( nSelect != GetEntryList()->GetSelectEntryPos( 0 ) ) ) ) { mbTrackingSelect = true; - if ( SelectEntries( nSelect, LET_TRACKING, sal_False, sal_False ) ) + if ( SelectEntries( nSelect, LET_TRACKING, false, false ) ) { if ( mbStackMode ) // #87072# { @@ -1037,13 +1037,13 @@ void ImplListBoxWindow::DeselectAll() while ( GetEntryList()->GetSelectEntryCount() ) { sal_uInt16 nS = GetEntryList()->GetSelectEntryPos( 0 ); - SelectEntry( nS, sal_False ); + SelectEntry( nS, false ); } } // ----------------------------------------------------------------------- -void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ) +void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, bool bSelect ) { if( (mpEntryList->IsEntryPosSelected( nPos ) != bSelect) && mpEntryList->IsEntrySelectable( nPos ) ) { @@ -1057,12 +1057,12 @@ void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ) if( nDeselect != LISTBOX_ENTRY_NOTFOUND ) { //SelectEntryPos( nDeselect, sal_False ); - GetEntryList()->SelectEntry( nDeselect, sal_False ); + GetEntryList()->SelectEntry( nDeselect, false ); if ( IsUpdateMode() && IsReallyVisible() ) - ImplPaint( nDeselect, sal_True ); + ImplPaint( nDeselect, true ); } } - mpEntryList->SelectEntry( nPos, sal_True ); + mpEntryList->SelectEntry( nPos, true ); mnCurrentPos = nPos; if ( ( nPos != LISTBOX_ENTRY_NOTFOUND ) && IsUpdateMode() ) { @@ -1085,8 +1085,8 @@ void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ) } else { - mpEntryList->SelectEntry( nPos, sal_False ); - ImplPaint( nPos, sal_True ); + mpEntryList->SelectEntry( nPos, false ); + ImplPaint( nPos, true ); } mbSelectionChanged = true; } @@ -1094,10 +1094,10 @@ void ImplListBoxWindow::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ) // ----------------------------------------------------------------------- -sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, sal_Bool bShift, sal_Bool bCtrl, sal_Bool bSelectPosChange /*=FALSE*/ ) +bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLET, bool bShift, bool bCtrl, bool bSelectPosChange /*=FALSE*/ ) { bool bFocusChanged = false; - sal_Bool bSelectionChanged = sal_False; + bool bSelectionChanged = false; if( IsEnabled() && mpEntryList->IsEntrySelectable( nSelect ) ) { @@ -1107,10 +1107,10 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE sal_uInt16 nDeselect = mpEntryList->GetSelectEntryPos( 0 ); if( nSelect != nDeselect ) { - SelectEntry( nSelect, sal_True ); + SelectEntry( nSelect, true ); mpEntryList->SetLastSelected( nSelect ); bFocusChanged = true; - bSelectionChanged = sal_True; + bSelectionChanged = true; } } // MultiListBox without Modifier @@ -1119,12 +1119,12 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE sal_uInt16 nEntryCount = mpEntryList->GetEntryCount(); for ( sal_uInt16 nPos = 0; nPos < nEntryCount; nPos++ ) { - sal_Bool bSelect = nPos == nSelect; + bool bSelect = nPos == nSelect; if ( mpEntryList->IsEntryPosSelected( nPos ) != bSelect ) { SelectEntry( nPos, bSelect ); bFocusChanged = true; - bSelectionChanged = sal_True; + bSelectionChanged = true; } } mpEntryList->SetLastSelected( nSelect ); @@ -1136,7 +1136,7 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE // Space for selection change if( !bShift && ( ( eLET == LET_KEYSPACE ) || ( eLET == LET_MBDOWN ) ) ) { - sal_Bool bSelect = ( mbStackMode && IsMouseMoveSelect() ) ? sal_True : !mpEntryList->IsEntryPosSelected( nSelect ); + bool bSelect = ( mbStackMode && IsMouseMoveSelect() ) ? sal_True : !mpEntryList->IsEntryPosSelected( nSelect ); if ( mbStackMode ) { sal_uInt16 n; @@ -1144,12 +1144,12 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE { // All entries before nSelect must be selected... for ( n = 0; n < nSelect; n++ ) - SelectEntry( n, sal_True ); + SelectEntry( n, true ); } if ( !bSelect ) { for ( n = nSelect+1; n < mpEntryList->GetEntryCount(); n++ ) - SelectEntry( n, sal_False ); + SelectEntry( n, false ); } } SelectEntry( nSelect, bSelect ); @@ -1158,7 +1158,7 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE if ( !mpEntryList->IsEntryPosSelected( nSelect ) ) mpEntryList->SetSelectionAnchor( LISTBOX_ENTRY_NOTFOUND ); bFocusChanged = true; - bSelectionChanged = sal_True; + bSelectionChanged = true; } else if( ( ( eLET == LET_TRACKING ) && ( nSelect != mnCurrentPos ) ) || ( (bShift||mbStackMode) && ( ( eLET == LET_KEYMOVE ) || ( eLET == LET_MBDOWN ) ) ) ) @@ -1180,8 +1180,8 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE { if ( !mpEntryList->IsEntryPosSelected( n ) ) { - SelectEntry( n, sal_True ); - bSelectionChanged = sal_True; + SelectEntry( n, true ); + bSelectionChanged = true; } } @@ -1195,8 +1195,8 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE { if ( mpEntryList->IsEntryPosSelected( n ) ) { - SelectEntry( n, sal_False ); - bSelectionChanged = sal_True; + SelectEntry( n, false ); + bSelectionChanged = true; } } } @@ -1206,8 +1206,8 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE { if ( mpEntryList->IsEntryPosSelected( n ) ) { - SelectEntry( n, sal_False ); - bSelectionChanged = sal_True; + SelectEntry( n, false ); + bSelectionChanged = true; } } } @@ -1218,7 +1218,7 @@ sal_Bool ImplListBoxWindow::SelectEntries( sal_uInt16 nSelect, LB_EVENT_TYPE eLE else if( eLET != LET_TRACKING ) { ImplHideFocusRect(); - ImplPaint( nSelect, sal_True ); + ImplPaint( nSelect, true ); bFocusChanged = true; } } @@ -1255,7 +1255,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) { Point aPoint; Rectangle aRect( aPoint, GetOutputSizePixel() ); - sal_Bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ); + bool bInside = aRect.IsInside( rTEvt.GetMouseEvent().GetPosPixel() ); if( rTEvt.IsTrackingCanceled() || rTEvt.IsTrackingEnded() ) // MouseButtonUp { @@ -1270,7 +1270,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) if ( !mbMulti ) { mbTrackingSelect = true; - SelectEntry( mnTrackingSaveSelection, sal_True ); + SelectEntry( mnTrackingSaveSelection, true ); mbTrackingSelect = false; if ( mnTrackingSaveSelection != LISTBOX_ENTRY_NOTFOUND ) { @@ -1288,7 +1288,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) } else { - sal_Bool bTrackOrQuickClick = mbTrack; + bool bTrackOrQuickClick = mbTrack; if( !mbTrack ) { if ( bInside ) @@ -1299,7 +1299,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) // this case only happens, if the mouse button is pressed very briefly if( rTEvt.IsTrackingEnded() && mbTrack ) { - bTrackOrQuickClick = sal_True; + bTrackOrQuickClick = true; mbTrack = false; } } @@ -1308,8 +1308,8 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) { MouseEvent aMEvt = rTEvt.GetMouseEvent(); Point aPt( aMEvt.GetPosPixel() ); - sal_Bool bShift = aMEvt.IsShift(); - sal_Bool bCtrl = aMEvt.IsMod1(); + bool bShift = aMEvt.IsShift(); + bool bCtrl = aMEvt.IsMod1(); sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND; if( aPt.Y() < 0 ) @@ -1360,7 +1360,7 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) if ( !mbMulti && GetEntryList()->GetSelectEntryCount() ) { mbTrackingSelect = true; - SelectEntry( GetEntryList()->GetSelectEntryPos( 0 ), sal_False ); + SelectEntry( GetEntryList()->GetSelectEntryPos( 0 ), false ); mbTrackingSelect = false; } else if ( mbStackMode ) @@ -1369,14 +1369,14 @@ void ImplListBoxWindow::Tracking( const TrackingEvent& rTEvt ) { if ( ( rTEvt.GetMouseEvent().GetPosPixel().Y() < 0 ) || ( rTEvt.GetMouseEvent().GetPosPixel().Y() > GetOutputSizePixel().Height() ) ) { - sal_Bool bSelectionChanged = sal_False; + bool bSelectionChanged = false; if ( ( rTEvt.GetMouseEvent().GetPosPixel().Y() < 0 ) && !mnCurrentPos ) { if ( mpEntryList->IsEntryPosSelected( 0 ) ) { - SelectEntry( 0, sal_False ); - bSelectionChanged = sal_True; + SelectEntry( 0, false ); + bSelectionChanged = true; nSelect = LISTBOX_ENTRY_NOTFOUND; } @@ -1428,7 +1428,7 @@ void ImplListBoxWindow::KeyInput( const KeyEvent& rKEvt ) // ----------------------------------------------------------------------- -sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) +bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) { // entry to be selected sal_uInt16 nSelect = LISTBOX_ENTRY_NOTFOUND; @@ -1436,10 +1436,10 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) KeyCode aKeyCode = rKEvt.GetKeyCode(); - sal_Bool bShift = aKeyCode.IsShift(); - sal_Bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3(); - sal_Bool bMod2 = aKeyCode.IsMod2(); - sal_Bool bDone = sal_False; + bool bShift = aKeyCode.IsShift(); + bool bCtrl = aKeyCode.IsMod1() || aKeyCode.IsMod3(); + bool bMod2 = aKeyCode.IsMod2(); + bool bDone = false; switch( aKeyCode.GetCode() ) { @@ -1465,7 +1465,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect < mnTop ) ) SetTopEntry( mnTop-1 ); - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1492,7 +1492,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if( ( nSelect != LISTBOX_ENTRY_NOTFOUND ) && ( nSelect >= GetLastVisibleEntry() ) ) SetTopEntry( mnTop+1 ); - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1523,7 +1523,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) // find first selectable starting from mnTop looking foreward nSelect = mpEntryList->FindFirstSelectable( mnTop, true ); } - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1557,7 +1557,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) // find first selectable starting from nTmp looking backwards nSelect = mpEntryList->FindFirstSelectable( nTmp, false ); } - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1577,7 +1577,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if( mnTop != 0 ) SetTopEntry( 0 ); - bDone = sal_True; + bDone = true; } } maQuickSelectionEngine.Reset(); @@ -1604,7 +1604,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if( nCount > nCurVis ) SetTopEntry( nCount - nCurVis ); } - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1615,7 +1615,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if ( !bCtrl && !bMod2 ) { ScrollHorz( -HORZ_SCROLL ); - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1626,7 +1626,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if ( !bCtrl && !bMod2 ) { ScrollHorz( HORZ_SCROLL ); - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1638,7 +1638,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) { mnSelectModifier = rKEvt.GetKeyCode().GetModifier(); ImplCallSelect(); - bDone = sal_False; // do not catch RETURN + bDone = false; // do not catch RETURN } maQuickSelectionEngine.Reset(); } @@ -1653,7 +1653,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) nSelect = mnCurrentPos; eLET = LET_KEYSPACE; } - bDone = sal_True; + bDone = true; } maQuickSelectionEngine.Reset(); } @@ -1664,12 +1664,12 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) if( bCtrl && mbMulti ) { // paint only once - sal_Bool bUpdates = IsUpdateMode(); - SetUpdateMode( sal_False ); + bool bUpdates = IsUpdateMode(); + SetUpdateMode( false ); sal_uInt16 nEntryCount = mpEntryList->GetEntryCount(); for( sal_uInt16 i = 0; i < nEntryCount; i++ ) - SelectEntry( i, sal_True ); + SelectEntry( i, true ); // restore update mode SetUpdateMode( bUpdates ); @@ -1677,7 +1677,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) maQuickSelectionEngine.Reset(); - bDone = sal_True; + bDone = true; break; } } @@ -1701,7 +1701,7 @@ sal_Bool ImplListBoxWindow::ProcessKeyInput( const KeyEvent& rKEvt ) DBG_ASSERT( !mpEntryList->IsEntryPosSelected( nSelect ) || mbMulti, "ImplListBox: Selecting same Entry" ); if( nSelect >= mpEntryList->GetEntryCount() ) nSelect = mpEntryList->GetEntryCount()-1; - sal_Bool bCurPosChange = (mnCurrentPos != nSelect); + bool bCurPosChange = (mnCurrentPos != nSelect); mnCurrentPos = nSelect; if(SelectEntries( nSelect, eLET, bShift, bCtrl, bCurPosChange)) { @@ -1772,7 +1772,7 @@ void ImplListBoxWindow::SelectEntry( ::vcl::StringEntryIdentifier _entry ) // actually select mnCurrentPos = nSelect; - if ( SelectEntries( nSelect, LET_KEYMOVE, sal_False, sal_False ) ) + if ( SelectEntries( nSelect, LET_KEYMOVE, false, false ) ) { mbTravelSelect = true; mnSelectModifier = 0; @@ -1783,7 +1783,7 @@ void ImplListBoxWindow::SelectEntry( ::vcl::StringEntryIdentifier _entry ) // ----------------------------------------------------------------------- -void ImplListBoxWindow::ImplPaint( sal_uInt16 nPos, sal_Bool bErase, bool bLayout ) +void ImplListBoxWindow::ImplPaint( sal_uInt16 nPos, bool bErase, bool bLayout ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1806,7 +1806,7 @@ void ImplListBoxWindow::ImplPaint( sal_uInt16 nPos, sal_Bool bErase, bool bLayou } else { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); if( !IsEnabled() ) SetTextColor( rStyleSettings.GetDisableColor() ); SetTextFillColor(); @@ -1834,13 +1834,13 @@ void ImplListBoxWindow::ImplPaint( sal_uInt16 nPos, sal_Bool bErase, bool bLayou } else { - DrawEntry( nPos, sal_True, sal_True, sal_False, bLayout ); + DrawEntry( nPos, true, true, false, bLayout ); } } // ----------------------------------------------------------------------- -void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos, bool bLayout ) +void ImplListBoxWindow::DrawEntry( sal_uInt16 nPos, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos, bool bLayout ) { const ImplEntryType* pEntry = mpEntryList->GetEntryPtr( nPos ); if( ! pEntry ) @@ -1973,7 +1973,7 @@ void ImplListBoxWindow::ImplDoPaint( const Rectangle& rRect, bool bLayout ) { sal_uInt16 nCount = mpEntryList->GetEntryCount(); - sal_Bool bShowFocusRect = mbHasFocusRect; + bool bShowFocusRect = mbHasFocusRect; if ( mbHasFocusRect && ! bLayout ) ImplHideFocusRect(); @@ -1986,7 +1986,7 @@ void ImplListBoxWindow::ImplDoPaint( const Rectangle& rRect, bool bLayout ) if( nY + pEntry->mnHeight >= rRect.Top() && nY <= rRect.Bottom() + mnMaxHeight ) { - ImplPaint( i, sal_False, bLayout ); + ImplPaint( i, false, bLayout ); } nY += pEntry->mnHeight; } @@ -2027,7 +2027,7 @@ void ImplListBoxWindow::Resize() { Control::Resize(); - sal_Bool bShowFocusRect = mbHasFocusRect; + bool bShowFocusRect = mbHasFocusRect; if ( bShowFocusRect ) ImplHideFocusRect(); @@ -2183,7 +2183,7 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType ) if ( nType == STATE_CHANGE_ZOOM ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); ImplCalcMetrics(); Invalidate(); } @@ -2194,18 +2194,18 @@ void ImplListBoxWindow::StateChanged( StateChangedType nType ) } else if ( nType == STATE_CHANGE_CONTROLFONT ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); ImplCalcMetrics(); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } ImplClearLayoutData(); @@ -2223,7 +2223,7 @@ void ImplListBoxWindow::DataChanged( const DataChangedEvent& rDCEvt ) (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { ImplClearLayoutData(); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); ImplCalcMetrics(); Invalidate(); } @@ -2336,7 +2336,7 @@ void ImplListBox::SetEntryFlags( sal_uInt16 nPos, long nFlags ) // ----------------------------------------------------------------------- -void ImplListBox::SelectEntry( sal_uInt16 nPos, sal_Bool bSelect ) +void ImplListBox::SelectEntry( sal_uInt16 nPos, bool bSelect ) { maLBWindow.SelectEntry( nPos, bSelect ); } @@ -2535,7 +2535,7 @@ void ImplListBox::ImplResizeControls() // pb: #106948# explicit mirroring for calc // Scrollbar on left or right side? - sal_Bool bMirroring = maLBWindow.IsMirroring(); + bool bMirroring = maLBWindow.IsMirroring(); Point aWinPos( bMirroring && mbVScroll ? nSBWidth : 0, 0 ); maLBWindow.SetPosSizePixel( aWinPos, aInnerSz ); @@ -2590,7 +2590,7 @@ void ImplListBox::StateChanged( StateChangedType nType ) } else if ( ( nType == STATE_CHANGE_UPDATEMODE ) || ( nType == STATE_CHANGE_DATA ) ) { - sal_Bool bUpdate = IsUpdateMode(); + bool bUpdate = IsUpdateMode(); maLBWindow.SetUpdateMode( bUpdate ); if ( bUpdate && IsReallyVisible() ) ImplCheckScrollBars(); @@ -2667,9 +2667,9 @@ const Wallpaper& ImplListBox::GetDisplayBackground() const // ----------------------------------------------------------------------- -sal_Bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt ) +bool ImplListBox::HandleWheelAsCursorTravel( const CommandEvent& rCEvt ) { - sal_Bool bDone = sal_False; + bool bDone = false; if ( rCEvt.GetCommand() == COMMAND_WHEEL ) { const CommandWheelData* pData = rCEvt.GetWheelData(); @@ -2702,7 +2702,7 @@ void ImplListBox::SetMRUEntries( const OUString& rEntries, sal_Unicode cSep ) if ( GetEntryList()->FindEntry( aEntry ) != LISTBOX_ENTRY_NOTFOUND ) { ImplEntryType* pNewEntry = new ImplEntryType( aEntry ); - maLBWindow.GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, sal_False ); + maLBWindow.GetEntryList()->InsertEntry( nMRUCount++, pNewEntry, false ); bChanges = true; } } @@ -2813,7 +2813,7 @@ void ImplWin::ImplDraw( bool bLayout ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( ! bLayout ) { @@ -2840,11 +2840,11 @@ void ImplWin::ImplDraw( bool bLayout ) Point aPoint( -nLeft, -nTop ); Rectangle aCtrlRegion( aPoint - GetPosPixel(), pWin->GetSizePixel() ); - sal_Bool bMouseOver = sal_False; + bool bMouseOver = false; if( GetParent() ) { Window *pChild = GetParent()->GetWindow( WINDOW_FIRSTCHILD ); - while( pChild && (bMouseOver = pChild->IsMouseOver()) == sal_False ) + while( pChild && !(bMouseOver = pChild->IsMouseOver()) ) pChild = pChild->GetWindow( WINDOW_NEXT ); } @@ -2914,7 +2914,7 @@ void ImplWin::ImplDraw( bool bLayout ) } else { - DrawEntry( sal_True, sal_True, sal_False, bLayout ); + DrawEntry( true, true, false, bLayout ); } } @@ -2927,7 +2927,7 @@ void ImplWin::Paint( const Rectangle& ) // ----------------------------------------------------------------------- -void ImplWin::DrawEntry( sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos, bool bLayout ) +void ImplWin::DrawEntry( bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos, bool bLayout ) { long nBorder = 1; Size aOutSz = GetOutputSizePixel(); @@ -3051,7 +3051,7 @@ void ImplWin::LoseFocus() ImplBtn::ImplBtn( Window* pParent, WinBits nWinStyle ) : PushButton( pParent, nWinStyle ), - mbDown ( sal_False ) + mbDown ( false ) { } @@ -3071,7 +3071,7 @@ void ImplBtn::MouseButtonDown( const MouseEvent& ) if( IsEnabled() ) { MBDown(); - mbDown = sal_True; + mbDown = true; } } @@ -3082,7 +3082,7 @@ ImplListBoxFloatingWindow::ImplListBoxFloatingWindow( Window* pParent ) : { mpImplLB = NULL; mnDDLineCount = 0; - mbAutoWidth = sal_False; + mbAutoWidth = false; mnPopupModeStartSaveSelection = LISTBOX_ENTRY_NOTFOUND; @@ -3107,7 +3107,7 @@ bool ImplListBoxFloatingWindow::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - if( !GetParent()->HasChildPathFocus( sal_True ) ) + if( !GetParent()->HasChildPathFocus( true ) ) EndPopupMode(); } @@ -3234,7 +3234,7 @@ Size ImplListBoxFloatingWindow::CalcFloatSize() // ----------------------------------------------------------------------- -void ImplListBoxFloatingWindow::StartFloat( sal_Bool bStartTracking ) +void ImplListBoxFloatingWindow::StartFloat( bool bStartTracking ) { if( !IsInPopupMode() ) { diff --git a/vcl/source/control/longcurr.cxx b/vcl/source/control/longcurr.cxx index a7e735452a45..4bd5e43fba47 100644 --- a/vcl/source/control/longcurr.cxx +++ b/vcl/source/control/longcurr.cxx @@ -51,7 +51,7 @@ static BigInt ImplPower10( sal_uInt16 n ) return nValue; } -static OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt &rNumber, sal_uInt16 nDigits, const OUString& rCurrSymbol, sal_Bool bShowThousandSep ) +static OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const BigInt &rNumber, sal_uInt16 nDigits, const OUString& rCurrSymbol, bool bShowThousandSep ) { DBG_ASSERT( nDigits < 10, "LongCurrency may only have 9 decimal places" ); @@ -98,7 +98,7 @@ static OUString ImplGetCurr( const LocaleDataWrapper& rLocaleDataWrapper, const } static bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt, - sal_Bool bStrictFormat, sal_Bool bThousandSep, + bool bStrictFormat, bool bThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) { if ( !bStrictFormat ) @@ -122,13 +122,13 @@ static bool ImplNumericProcessKeyInput( Edit*, const KeyEvent& rKEvt, static bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper, - sal_Bool bCurrency = sal_False ) + bool bCurrency = false ) { OUString aStr = rStr; OUStringBuffer aStr1; OUStringBuffer aStr2; sal_Int32 nDecPos; - sal_Bool bNegative = sal_False; + bool bNegative = false; // On empty string if ( rStr.isEmpty() ) @@ -152,7 +152,7 @@ static bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, if ( bCurrency ) { if ( (aStr[ 0 ] == '(') && (aStr[ aStr.getLength()-1 ] == ')') ) - bNegative = sal_True; + bNegative = true; if ( !bNegative ) { for (sal_Int32 i=0; i < aStr.getLength(); i++ ) @@ -161,7 +161,7 @@ static bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, break; else if ( aStr[ i ] == '-' ) { - bNegative = sal_True; + bNegative = true; break; } } @@ -178,7 +178,7 @@ static bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, break; else if ( aStr[ i ] == '-' ) { - bNegative = sal_True; + bNegative = true; break; } } @@ -188,7 +188,7 @@ static bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, else { if ( aStr1[ 0 ] == '-' ) - bNegative = sal_True; + bNegative = true; } // delete unwanted characters @@ -245,10 +245,10 @@ static bool ImplNumericGetValue( const OUString& rStr, BigInt& rValue, } static bool ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, - sal_Bool, sal_Bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) + bool, bool bUseThousandSep, const LocaleDataWrapper& rLocaleDataWrapper ) { // There's no StrictFormat that makes sense here, thus allow all chars - return ImplNumericProcessKeyInput( pEdit, rKEvt, sal_False, bUseThousandSep, rLocaleDataWrapper ); + return ImplNumericProcessKeyInput( pEdit, rKEvt, false, bUseThousandSep, rLocaleDataWrapper ); } } // namespace @@ -256,7 +256,7 @@ static bool ImplLongCurrencyProcessKeyInput( Edit* pEdit, const KeyEvent& rKEvt, inline bool ImplLongCurrencyGetValue( const OUString& rStr, BigInt& rValue, sal_uInt16 nDecDigits, const LocaleDataWrapper& rLocaleDataWrapper ) { - return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, sal_True ); + return ImplNumericGetValue( rStr, rValue, nDecDigits, rLocaleDataWrapper, true ); } bool ImplLongCurrencyReformat( const OUString& rStr, BigInt nMin, BigInt nMax, @@ -265,7 +265,7 @@ bool ImplLongCurrencyReformat( const OUString& rStr, BigInt nMin, BigInt nMax, LongCurrencyFormatter& rFormatter ) { BigInt nValue; - if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, sal_True ) ) + if ( !ImplNumericGetValue( rStr, nValue, nDecDigits, rLocaleDataWrapper, true ) ) return true; else { @@ -304,7 +304,7 @@ void LongCurrencyFormatter::ImpInit() mnCorrectedValue = 0; mnDecimalDigits = 0; mnType = FORMAT_LONGCURRENCY; - mbThousandSep = sal_True; + mbThousandSep = true; SetDecimalDigits( 0 ); } @@ -332,7 +332,7 @@ void LongCurrencyFormatter::SetValue( BigInt nNewValue ) { SetUserValue( nNewValue ); mnFieldValue = mnLastValue; - SetEmptyFieldValueData( sal_False ); + SetEmptyFieldValueData( false ); } void LongCurrencyFormatter::SetUserValue( BigInt nNewValue ) @@ -355,7 +355,7 @@ void LongCurrencyFormatter::SetUserValue( BigInt nNewValue ) } else GetField()->SetText( aStr ); - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); } BigInt LongCurrencyFormatter::GetValue() const @@ -393,7 +393,7 @@ void LongCurrencyFormatter::Reformat() if ( !aStr.isEmpty() ) { GetField()->SetText( aStr ); - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); ImplLongCurrencyGetValue( aStr, mnLastValue, GetDecimalDigits(), GetLocaleDataWrapper() ); } else @@ -417,7 +417,7 @@ void LongCurrencyFormatter::SetMax( BigInt nNewMax ) ReformatAll(); } -void LongCurrencyFormatter::SetUseThousandSep( sal_Bool b ) +void LongCurrencyFormatter::SetUseThousandSep( bool b ) { mbThousandSep = b; ReformatAll(); @@ -491,7 +491,7 @@ bool LongCurrencyField::Notify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_GETFOCUS ) { - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { @@ -507,7 +507,7 @@ bool LongCurrencyField::Notify( NotifyEvent& rNEvt ) void LongCurrencyField::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); SpinField::Modify(); } @@ -574,7 +574,7 @@ bool LongCurrencyBox::Notify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_GETFOCUS ) { - MarkToBeReformatted( sal_False ); + MarkToBeReformatted( false ); } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { @@ -589,14 +589,14 @@ bool LongCurrencyBox::Notify( NotifyEvent& rNEvt ) void LongCurrencyBox::Modify() { - MarkToBeReformatted( sal_True ); + MarkToBeReformatted( true ); ComboBox::Modify(); } void LongCurrencyBox::ReformatAll() { OUString aStr; - SetUpdateMode( sal_False ); + SetUpdateMode( false ); sal_uInt16 nEntryCount = GetEntryCount(); for ( sal_uInt16 i=0; i < nEntryCount; i++ ) { @@ -607,7 +607,7 @@ void LongCurrencyBox::ReformatAll() InsertEntry( aStr, i ); } LongCurrencyFormatter::Reformat(); - SetUpdateMode( sal_True ); + SetUpdateMode( true ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 060db316c115..bf87289c1677 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -136,7 +136,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle ) } mpFloatWin = new ImplListBoxFloatingWindow( this ); - mpFloatWin->SetAutoWidth( sal_True ); + mpFloatWin->SetAutoWidth( true ); mpFloatWin->SetPopupModeEndHdl( LINK( this, ListBox, ImplPopupModeEndHdl ) ); mpFloatWin->GetDropTarget()->addDropTargetListener(xDrop); @@ -180,7 +180,7 @@ void ListBox::ImplInit( Window* pParent, WinBits nStyle ) else mpImplLB->GetMainWindow()->AllowGrabFocus( true ); - SetCompoundControl( sal_True ); + SetCompoundControl( true ); } @@ -217,7 +217,7 @@ void ListBox::ImplLoadRes( const ResId& rResId ) IMPL_LINK_NOARG(ListBox, ImplSelectHdl) { - sal_Bool bPopup = IsInDropDown(); + bool bPopup = IsInDropDown(); if( IsDropDownBox() ) { if( !mpImplLB->IsTravelSelect() ) @@ -316,8 +316,8 @@ IMPL_LINK_NOARG(ListBox, ImplClickBtnHdl) { ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); mpImplWin->GrabFocus(); - mpBtn->SetPressed( sal_True ); - mpFloatWin->StartFloat( sal_True ); + mpBtn->SetPressed( true ); + mpFloatWin->StartFloat( true ); ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN ); ImplClearLayoutData(); @@ -338,9 +338,9 @@ IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) if ( ( mpFloatWin->GetPopupModeStartSaveSelection() != LISTBOX_ENTRY_NOTFOUND ) && !IsEntryPosSelected( mpFloatWin->GetPopupModeStartSaveSelection() ) ) { - mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), sal_True ); - sal_Bool bTravelSelect = mpImplLB->IsTravelSelect(); - mpImplLB->SetTravelSelect( sal_True ); + mpImplLB->SelectEntry( mpFloatWin->GetPopupModeStartSaveSelection(), true ); + bool bTravelSelect = mpImplLB->IsTravelSelect(); + mpImplLB->SetTravelSelect( true ); ImplDelData aCheckDelete; ImplAddDel( &aCheckDelete ); @@ -359,7 +359,7 @@ IMPL_LINK_NOARG(ListBox, ImplPopupModeEndHdl) if( mpImplWin ) mpImplWin->ImplClearLayoutData(); - mpBtn->SetPressed( sal_False ); + mpBtn->SetPressed( false ); ImplCallEventListeners( VCLEVENT_DROPDOWN_CLOSE ); return 0; } @@ -375,8 +375,8 @@ void ListBox::ToggleDropDown() { ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); mpImplWin->GrabFocus(); - mpBtn->SetPressed( sal_True ); - mpFloatWin->StartFloat( sal_True ); + mpBtn->SetPressed( true ); + mpFloatWin->StartFloat( true ); ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN ); } } @@ -385,7 +385,7 @@ void ListBox::ToggleDropDown() void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { - mpImplLB->GetMainWindow()->ImplInitSettings( sal_True, sal_True, sal_True ); + mpImplLB->GetMainWindow()->ImplInitSettings( true, true, true ); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); @@ -483,7 +483,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sa for ( sal_uInt16 n = 0; n < nLines; n++ ) { sal_uInt16 nEntry = n+mpImplLB->GetTopEntry(); - sal_Bool bSelected = mpImplLB->GetEntryList()->IsEntryPosSelected( nEntry ); + bool bSelected = mpImplLB->GetEntryList()->IsEntryPosSelected( nEntry ); if ( bSelected ) { pDev->SetFillColor( COL_BLACK ); @@ -563,7 +563,7 @@ void ListBox::DataChanged( const DataChangedEvent& rDCEvt ) if ( mpImplWin ) { mpImplWin->SetSettings( GetSettings() ); // If not yet set... - ImplInitFieldSettings( mpImplWin, sal_True, sal_True, sal_True ); + ImplInitFieldSettings( mpImplWin, true, true, true ); mpBtn->SetSettings( GetSettings() ); ImplInitDropDownButton( mpBtn ); @@ -594,7 +594,7 @@ void ListBox::EnableAutoSize( bool bAuto ) } -void ListBox::EnableDDAutoWidth( sal_Bool b ) +void ListBox::EnableDDAutoWidth( bool b ) { if ( mpFloatWin ) mpFloatWin->SetAutoWidth( b ); @@ -884,7 +884,7 @@ void ListBox::StateChanged( StateChangedType nType ) { SetStyle( ImplInitStyle( GetStyle() ) ); mpImplLB->GetMainWindow()->EnableSort( ( GetStyle() & WB_SORT ) ? sal_True : sal_False ); - sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False; + bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False; mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode ); } else if( nType == STATE_CHANGE_MIRRORING ) @@ -920,8 +920,8 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) aKeyEvt.GetKeyCode().IsMod2() ) { ImplCallEventListeners( VCLEVENT_DROPDOWN_PRE_OPEN ); - mpBtn->SetPressed( sal_True ); - mpFloatWin->StartFloat( sal_False ); + mpBtn->SetPressed( true ); + mpFloatWin->StartFloat( false ); ImplCallEventListeners( VCLEVENT_DROPDOWN_OPEN ); nDone = true; } @@ -963,7 +963,7 @@ bool ListBox::PreNotify( NotifyEvent& rNEvt ) } else if ( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - if ( IsInDropDown() && !HasChildPathFocus( sal_True ) ) + if ( IsInDropDown() && !HasChildPathFocus( true ) ) mpFloatWin->EndPopupMode(); } else if ( (rNEvt.GetType() == EVENT_COMMAND) && @@ -1132,19 +1132,19 @@ bool ListBox::IsEntrySelected(const OUString& rStr) const } -sal_Bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const +bool ListBox::IsEntryPosSelected( sal_uInt16 nPos ) const { return mpImplLB->GetEntryList()->IsEntryPosSelected( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); } -void ListBox::SelectEntry( const OUString& rStr, sal_Bool bSelect ) +void ListBox::SelectEntry( const OUString& rStr, bool bSelect ) { SelectEntryPos( GetEntryPos( rStr ), bSelect ); } -void ListBox::SelectEntryPos( sal_uInt16 nPos, sal_Bool bSelect ) +void ListBox::SelectEntryPos( sal_uInt16 nPos, bool bSelect ) { if ( nPos < mpImplLB->GetEntryList()->GetEntryCount() ) { @@ -1203,13 +1203,13 @@ sal_uInt16 ListBox::GetTopEntry() const } -sal_Bool ListBox::IsTravelSelect() const +bool ListBox::IsTravelSelect() const { return mpImplLB->IsTravelSelect(); } -sal_Bool ListBox::IsInDropDown() const +bool ListBox::IsInDropDown() const { return mpFloatWin && mpFloatWin->IsInPopupMode(); } @@ -1224,19 +1224,19 @@ Rectangle ListBox::GetBoundingRectangle( sal_uInt16 nItem ) const } -void ListBox::EnableMultiSelection( sal_Bool bMulti ) +void ListBox::EnableMultiSelection( bool bMulti ) { - EnableMultiSelection( bMulti, sal_False ); + EnableMultiSelection( bMulti, false ); } -void ListBox::EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackSelection ) +void ListBox::EnableMultiSelection( bool bMulti, bool bStackSelection ) { mpImplLB->EnableMultiSelection( bMulti, bStackSelection ); // WB_SIMPLEMODE: // The MultiListBox behaves just like a normal ListBox // MultiSelection is possible via corresponding additional keys - sal_Bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False; + bool bSimpleMode = ( GetStyle() & WB_SIMPLEMODE ) ? sal_True : sal_False; mpImplLB->SetMultiSelectionSimpleMode( bSimpleMode ); // In a MultiSelection, we can't see us travelling without focus @@ -1245,7 +1245,7 @@ void ListBox::EnableMultiSelection( sal_Bool bMulti, sal_Bool bStackSelection ) } -sal_Bool ListBox::IsMultiSelectionEnabled() const +bool ListBox::IsMultiSelectionEnabled() const { return mpImplLB->IsMultiSelectionEnabled(); } @@ -1440,7 +1440,7 @@ void ListBox::UserDraw( const UserDrawEvent& ) } -void ListBox::DrawEntry( const UserDrawEvent& rEvt, sal_Bool bDrawImage, sal_Bool bDrawText, sal_Bool bDrawTextAtImagePos ) +void ListBox::DrawEntry( const UserDrawEvent& rEvt, bool bDrawImage, bool bDrawText, bool bDrawTextAtImagePos ) { if ( rEvt.GetDevice() == mpImplLB->GetMainWindow() ) mpImplLB->GetMainWindow()->DrawEntry( rEvt.GetItemId(), bDrawImage, bDrawText, bDrawTextAtImagePos ); @@ -1457,7 +1457,7 @@ void ListBox::SetUserItemSize( const Size& rSz ) } -void ListBox::EnableUserDraw( sal_Bool bUserDraw ) +void ListBox::EnableUserDraw( bool bUserDraw ) { mpImplLB->GetMainWindow()->EnableUserDraw( bUserDraw ); if ( mpImplWin ) @@ -1465,7 +1465,7 @@ void ListBox::EnableUserDraw( sal_Bool bUserDraw ) } -void ListBox::SetReadOnly( sal_Bool bReadOnly ) +void ListBox::SetReadOnly( bool bReadOnly ) { if ( mpImplLB->IsReadOnly() != bReadOnly ) { @@ -1475,7 +1475,7 @@ void ListBox::SetReadOnly( sal_Bool bReadOnly ) } -sal_Bool ListBox::IsReadOnly() const +bool ListBox::IsReadOnly() const { return mpImplLB->IsReadOnly(); } @@ -1577,7 +1577,7 @@ MultiListBox::MultiListBox( Window* pParent, WinBits nStyle ) : ListBox( WINDOW_MULTILISTBOX ) { ImplInit( pParent, nStyle ); - EnableMultiSelection( sal_True ); + EnableMultiSelection( true ); } @@ -1591,7 +1591,7 @@ MultiListBox::MultiListBox( Window* pParent, const ResId& rResId ) : if ( !(nStyle & WB_HIDE ) ) Show(); - EnableMultiSelection( sal_True ); + EnableMultiSelection( true ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/control/menubtn.cxx b/vcl/source/control/menubtn.cxx index 922ffc7e1d6a..16955e89e5c0 100644 --- a/vcl/source/control/menubtn.cxx +++ b/vcl/source/control/menubtn.cxx @@ -56,10 +56,10 @@ void MenuButton::ImplExecuteMenu() Point aPos( 0, 1 ); Size aSize = GetSizePixel(); Rectangle aRect( aPos, aSize ); - SetPressed( sal_True ); + SetPressed( true ); EndSelection(); mnCurItemId = mpMenu->Execute( this, aRect, POPUPMENU_EXECUTE_DOWN ); - SetPressed( sal_False ); + SetPressed( false ); if ( mnCurItemId ) { Select(); diff --git a/vcl/source/control/morebtn.cxx b/vcl/source/control/morebtn.cxx index c1cc320648e8..fdedef589fca 100644 --- a/vcl/source/control/morebtn.cxx +++ b/vcl/source/control/morebtn.cxx @@ -36,7 +36,7 @@ void MoreButton::ImplInit( Window* pParent, WinBits nStyle ) mpMBData = new ImplMoreButtonData; mnDelta = 0; meUnit = MAP_PIXEL; - mbState = sal_False; + mbState = false; mpMBData->mpItemList = NULL; @@ -99,7 +99,7 @@ void MoreButton::ImplLoadRes( const ResId& rResId ) if ( nObjMask & RSC_MOREBUTTON_STATE ) { // Don't call method as Dialog should not be switched over - mbState = (sal_Bool)ReadShortRes(); + mbState = ReadShortRes() != 0; // SetText( GetText() ); ShowState(); } diff --git a/vcl/source/control/prgsbar.cxx b/vcl/source/control/prgsbar.cxx index 21af040341e6..2940d28a2518 100644 --- a/vcl/source/control/prgsbar.cxx +++ b/vcl/source/control/prgsbar.cxx @@ -28,9 +28,9 @@ void ProgressBar::ImplInit() { mnPercent = 0; - mbCalcNew = sal_True; + mbCalcNew = true; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } static WinBits clearProgressBarBorder( Window* pParent, WinBits nOrgStyle ) @@ -66,8 +66,8 @@ ProgressBar::~ProgressBar() { } -void ProgressBar::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void ProgressBar::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -89,8 +89,8 @@ void ProgressBar::ImplInitSettings( sal_Bool bFont, { if( (GetStyle() & WB_BORDER) ) SetBorderStyle( WINDOW_BORDER_REMOVEBORDER ); - EnableChildTransparentMode( sal_True ); - SetPaintTransparent( sal_True ); + EnableChildTransparentMode( true ); + SetPaintTransparent( true ); SetBackground(); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); } @@ -131,7 +131,7 @@ void ProgressBar::ImplDrawProgress( sal_uInt16 nOldPerc, sal_uInt16 nNewPerc ) { if ( mbCalcNew ) { - mbCalcNew = sal_False; + mbCalcNew = false; Size aSize = GetOutputSizePixel(); mnPrgsHeight = aSize.Height()-(PROGRESSBAR_WIN_OFFSET*2); @@ -164,7 +164,7 @@ void ProgressBar::Paint( const Rectangle& ) void ProgressBar::Resize() { - mbCalcNew = sal_True; + mbCalcNew = true; if ( IsReallyVisible() ) Invalidate(); } @@ -175,7 +175,7 @@ void ProgressBar::SetValue( sal_uInt16 nNewPercent ) if ( nNewPercent < mnPercent ) { - mbCalcNew = sal_True; + mbCalcNew = true; mnPercent = nNewPercent; if ( IsReallyVisible() ) { @@ -203,12 +203,12 @@ void ProgressBar::StateChanged( StateChangedType nType ) */ if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } @@ -220,7 +220,7 @@ void ProgressBar::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx index 14bbac1a2e25..d0b72391261f 100644 --- a/vcl/source/control/quickselectionengine.cxx +++ b/vcl/source/control/quickselectionengine.cxx @@ -85,7 +85,7 @@ namespace vcl StringEntryIdentifier pStartedWith = pSearchEntry; while ( pSearchEntry ) { - if ( rI18nHelper.MatchString( _searchString, sEntryText ) != 0 ) + if ( rI18nHelper.MatchString( _searchString, sEntryText ) ) break; pSearchEntry = _engineData.rEntryList.NextEntry( pSearchEntry, sEntryText ); diff --git a/vcl/source/control/scrbar.cxx b/vcl/source/control/scrbar.cxx index f79812f193e8..386c57e0b030 100644 --- a/vcl/source/control/scrbar.cxx +++ b/vcl/source/control/scrbar.cxx @@ -96,8 +96,8 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle ) mnStateFlags = 0; meScrollType = SCROLL_DONTKNOW; meDDScrollType = SCROLL_DONTKNOW; - mbCalcSize = sal_True; - mbFullDrag = 0; + mbCalcSize = true; + mbFullDrag = false; if( !mpData ) // TODO: remove when maTrackRect is no longer in mpData { @@ -118,7 +118,7 @@ void ScrollBar::ImplInit( Window* pParent, WinBits nStyle ) void ScrollBar::ImplInitStyle( WinBits nStyle ) { if ( nStyle & WB_DRAG ) - mbFullDrag = sal_True; + mbFullDrag = true; else mbFullDrag = (GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_SCROLL) != 0; } @@ -169,7 +169,7 @@ void ScrollBar::ImplLoadRes( const ResId& rResId ) } -void ScrollBar::ImplUpdateRects( sal_Bool bUpdate ) +void ScrollBar::ImplUpdateRects( bool bUpdate ) { sal_uInt16 nOldStateFlags = mnStateFlags; Rectangle aOldPage1Rect = maPage1Rect; @@ -302,7 +302,7 @@ long ScrollBar::ImplCalcThumbPosPix( long nPos ) } -void ScrollBar::ImplCalc( sal_Bool bUpdate ) +void ScrollBar::ImplCalc( bool bUpdate ) { const Size aSize = GetOutputSizePixel(); const long nMinThumbSize = GetSettings().GetStyleSettings().GetMinThumbSize(); @@ -401,7 +401,7 @@ void ScrollBar::ImplCalc( sal_Bool bUpdate ) if ( !mnThumbPixRange ) maThumbRect.SetEmpty(); - mbCalcSize = sal_False; + mbCalcSize = false; Size aNewSize = getCurrentCalcSize(); if (aOldSize != aNewSize) @@ -445,7 +445,7 @@ void ScrollBar::ImplCalc( sal_Bool bUpdate ) if ( bUpdate && HasPaintEvent() ) { Invalidate(); - bUpdate = sal_False; + bUpdate = false; } ImplUpdateRects( bUpdate ); } @@ -477,7 +477,7 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSiz // - force recalculate if ( mbCalcSize ) - ImplCalc( sal_False ); + ImplCalc( false ); maBtn1Rect+=aPos; maBtn2Rect+=aPos; @@ -489,17 +489,17 @@ void ScrollBar::Draw( OutputDevice* pDev, const Point& rPos, const Size& /* rSiz ImplDraw( SCRBAR_DRAW_ALL, pDev ); pDev->Pop(); - mbCalcSize = sal_True; + mbCalcSize = true; } -sal_Bool ScrollBar::ImplDrawNative( sal_uInt16 nDrawFlags ) +bool ScrollBar::ImplDrawNative( sal_uInt16 nDrawFlags ) { ScrollbarValue scrValue; - sal_Bool bNativeOK = IsNativeControlSupported(CTRL_SCROLLBAR, PART_ENTIRE_CONTROL); + bool bNativeOK = IsNativeControlSupported(CTRL_SCROLLBAR, PART_ENTIRE_CONTROL); if( !bNativeOK ) - return sal_False; + return false; bool bHorz = (GetStyle() & WB_HORZ ? true : false); @@ -661,11 +661,11 @@ void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev ) sal_uInt16 nStyle; const StyleSettings& rStyleSettings = pOutDev->GetSettings().GetStyleSettings(); SymbolType eSymbolType; - sal_Bool bEnabled = IsEnabled(); + bool bEnabled = IsEnabled(); // Finish some open calculations (if any) if ( mbCalcSize ) - ImplCalc( sal_False ); + ImplCalc( false ); Window *pWin = NULL; if( pOutDev->GetOutDevType() == OUTDEV_WINDOW ) @@ -770,7 +770,7 @@ void ScrollBar::ImplDraw( sal_uInt16 nDrawFlags, OutputDevice* pOutDev ) } -long ScrollBar::ImplScroll( long nNewPos, sal_Bool bCallEndScroll ) +long ScrollBar::ImplScroll( long nNewPos, bool bCallEndScroll ) { long nOldPos = mnThumbPos; SetThumbPos( nNewPos ); @@ -787,7 +787,7 @@ long ScrollBar::ImplScroll( long nNewPos, sal_Bool bCallEndScroll ) } -long ScrollBar::ImplDoAction( sal_Bool bCallEndScroll ) +long ScrollBar::ImplDoAction( bool bCallEndScroll ) { long nDelta = 0; @@ -816,10 +816,10 @@ long ScrollBar::ImplDoAction( sal_Bool bCallEndScroll ) } -void ScrollBar::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction ) +void ScrollBar::ImplDoMouseAction( const Point& rMousePos, bool bCallAction ) { sal_uInt16 nOldStateFlags = mnStateFlags; - sal_Bool bAction = sal_False; + bool bAction = false; bool bHorizontal = ( GetStyle() & WB_HORZ )? true: false; bool bIsInside = false; @@ -888,7 +888,7 @@ void ScrollBar::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction if ( nOldStateFlags != mnStateFlags ) ImplDraw( mnDragDraw, this ); if ( bAction ) - ImplDoAction( sal_False ); + ImplDoAction( false ); } void ScrollBar::ImplDragThumb( const Point& rMousePos ) @@ -1157,9 +1157,9 @@ void ScrollBar::Paint( const Rectangle& ) void ScrollBar::Resize() { Control::Resize(); - mbCalcSize = sal_True; + mbCalcSize = true; if ( IsReallyVisible() ) - ImplCalc( sal_False ); + ImplCalc( false ); Invalidate(); } @@ -1216,17 +1216,17 @@ void ScrollBar::StateChanged( StateChangedType nType ) Control::StateChanged( nType ); if ( nType == STATE_CHANGE_INITSHOW ) - ImplCalc( sal_False ); + ImplCalc( false ); else if ( nType == STATE_CHANGE_DATA ) { if ( IsReallyVisible() && IsUpdateMode() ) - ImplCalc( sal_True ); + ImplCalc( true ); } else if ( nType == STATE_CHANGE_UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) { - ImplCalc( sal_False ); + ImplCalc( false ); Invalidate(); } } @@ -1243,8 +1243,8 @@ void ScrollBar::StateChanged( StateChangedType nType ) if ( (GetPrevStyle() & SCRBAR_VIEW_STYLE) != (GetStyle() & SCRBAR_VIEW_STYLE) ) { - mbCalcSize = sal_True; - ImplCalc( sal_False ); + mbCalcSize = true; + ImplCalc( false ); Invalidate(); } } @@ -1258,8 +1258,8 @@ void ScrollBar::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - mbCalcSize = sal_True; - ImplCalc( sal_False ); + mbCalcSize = true; + ImplCalc( false ); Invalidate(); } } @@ -1328,7 +1328,7 @@ bool ScrollBar::PreNotify( NotifyEvent& rNEvt ) aClipRegion.Union( *pLastRect ); // Support for 3-button scroll bars - sal_Bool bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS ); + bool bHas3Buttons = IsNativeControlSupported( CTRL_SCROLLBAR, HAS_THREE_BUTTONS ); if ( bHas3Buttons && ( pRect == &maBtn1Rect || pLastRect == &maBtn1Rect ) ) { aClipRegion.Union( maBtn2Rect ); @@ -1366,7 +1366,7 @@ long ScrollBar::DoScroll( long nNewPos ) SAL_INFO("vcl.scrollbar", "DoScroll(" << nNewPos << ")"); meScrollType = SCROLL_DRAG; - long nDelta = ImplScroll( nNewPos, sal_True ); + long nDelta = ImplScroll( nNewPos, true ); meScrollType = SCROLL_DONTKNOW; return nDelta; } @@ -1380,7 +1380,7 @@ long ScrollBar::DoScrollAction( ScrollType eScrollType ) return 0; meScrollType = eScrollType; - long nDelta = ImplDoAction( sal_True ); + long nDelta = ImplDoAction( true ); meScrollType = SCROLL_DONTKNOW; return nDelta; } @@ -1453,7 +1453,7 @@ void ScrollBar::SetVisibleSize( long nNewSize ) Size ScrollBar::GetOptimalSize() const { if (mbCalcSize) - const_cast<ScrollBar*>(this)->ImplCalc(sal_False); + const_cast<ScrollBar*>(this)->ImplCalc(false); Size aRet = getCurrentCalcSize(); diff --git a/vcl/source/control/slider.cxx b/vcl/source/control/slider.cxx index 2b9dde815806..a942545ec792 100644 --- a/vcl/source/control/slider.cxx +++ b/vcl/source/control/slider.cxx @@ -69,8 +69,8 @@ void Slider::ImplInit( Window* pParent, WinBits nStyle ) mnDragDraw = 0; mnStateFlags = 0; meScrollType = SCROLL_DONTKNOW; - mbCalcSize = sal_True; - mbFullDrag = sal_True; + mbCalcSize = true; + mbFullDrag = true; Control::ImplInit( pParent, nStyle, NULL ); @@ -93,16 +93,16 @@ void Slider::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -113,7 +113,7 @@ void Slider::ImplInitSettings() // ----------------------------------------------------------------------- -void Slider::ImplUpdateRects( sal_Bool bUpdate ) +void Slider::ImplUpdateRects( bool bUpdate ) { Rectangle aOldThumbRect = maThumbRect; bool bInvalidateAll = false; @@ -250,7 +250,7 @@ long Slider::ImplCalcThumbPosPix( long nPos ) // ----------------------------------------------------------------------- -void Slider::ImplCalc( sal_Bool bUpdate ) +void Slider::ImplCalc( bool bUpdate ) { bool bInvalidateAll = false; @@ -305,7 +305,7 @@ void Slider::ImplCalc( sal_Bool bUpdate ) (nOldChannelPixBottom != mnChannelPixBottom) ) bInvalidateAll = true; - mbCalcSize = sal_False; + mbCalcSize = false; } if ( mnThumbPixRange ) @@ -314,7 +314,7 @@ void Slider::ImplCalc( sal_Bool bUpdate ) if ( bUpdate && bInvalidateAll ) { Invalidate(); - bUpdate = sal_False; + bUpdate = false; } ImplUpdateRects( bUpdate ); } @@ -326,11 +326,11 @@ void Slider::ImplDraw( sal_uInt16 nDrawFlags ) DecorationView aDecoView( this ); sal_uInt16 nStyle; const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); - sal_Bool bEnabled = IsEnabled(); + bool bEnabled = IsEnabled(); // do missing calculations if ( mbCalcSize ) - ImplCalc( sal_False ); + ImplCalc( false ); ControlPart nPart = (GetStyle() & WB_HORZ) ? PART_TRACK_HORZ_AREA : PART_TRACK_VERT_AREA; ControlState nState = ( IsEnabled() ? CTRL_STATE_ENABLED : 0 ) | ( HasFocus() ? CTRL_STATE_FOCUSED : 0 ); @@ -461,7 +461,7 @@ void Slider::ImplDraw( sal_uInt16 nDrawFlags ) // ----------------------------------------------------------------------- -sal_Bool Slider::ImplIsPageUp( const Point& rPos ) +bool Slider::ImplIsPageUp( const Point& rPos ) { Size aSize = GetOutputSizePixel(); Rectangle aRect = maChannel1Rect; @@ -480,7 +480,7 @@ sal_Bool Slider::ImplIsPageUp( const Point& rPos ) // ----------------------------------------------------------------------- -sal_Bool Slider::ImplIsPageDown( const Point& rPos ) +bool Slider::ImplIsPageDown( const Point& rPos ) { Size aSize = GetOutputSizePixel(); Rectangle aRect = maChannel2Rect; @@ -499,7 +499,7 @@ sal_Bool Slider::ImplIsPageDown( const Point& rPos ) // ----------------------------------------------------------------------- -long Slider::ImplSlide( long nNewPos, sal_Bool bCallEndSlide ) +long Slider::ImplSlide( long nNewPos, bool bCallEndSlide ) { long nOldPos = mnThumbPos; SetThumbPos( nNewPos ); @@ -517,7 +517,7 @@ long Slider::ImplSlide( long nNewPos, sal_Bool bCallEndSlide ) // ----------------------------------------------------------------------- -long Slider::ImplDoAction( sal_Bool bCallEndSlide ) +long Slider::ImplDoAction( bool bCallEndSlide ) { long nDelta = 0; @@ -551,10 +551,10 @@ long Slider::ImplDoAction( sal_Bool bCallEndSlide ) // ----------------------------------------------------------------------- -void Slider::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction ) +void Slider::ImplDoMouseAction( const Point& rMousePos, bool bCallAction ) { sal_uInt16 nOldStateFlags = mnStateFlags; - sal_Bool bAction = sal_False; + bool bAction = false; switch ( meScrollType ) { @@ -597,7 +597,7 @@ void Slider::ImplDoMouseAction( const Point& rMousePos, sal_Bool bCallAction ) if ( bAction ) { - if ( ImplDoAction( sal_False ) ) + if ( ImplDoAction( false ) ) { // Update the channel complete if ( mnDragDraw & SLIDER_DRAW_CHANNEL ) @@ -619,7 +619,7 @@ long Slider::ImplDoSlide( long nNewPos ) return 0; meScrollType = SCROLL_DRAG; - long nDelta = ImplSlide( nNewPos, sal_True ); + long nDelta = ImplSlide( nNewPos, true ); meScrollType = SCROLL_DONTKNOW; return nDelta; } @@ -634,7 +634,7 @@ long Slider::ImplDoSlideAction( ScrollType eScrollType ) return 0; meScrollType = eScrollType; - long nDelta = ImplDoAction( sal_True ); + long nDelta = ImplDoAction( true ); meScrollType = SCROLL_DONTKNOW; return nDelta; } @@ -715,7 +715,7 @@ void Slider::MouseButtonUp( const MouseEvent& ) ImplDraw( mnDragDraw ); mnDragDraw = 0; - ImplDoAction( sal_True ); + ImplDoAction( true ); meScrollType = SCROLL_DONTKNOW; } } @@ -861,9 +861,9 @@ void Slider::Paint( const Rectangle& ) void Slider::Resize() { Control::Resize(); - mbCalcSize = sal_True; + mbCalcSize = true; if ( IsReallyVisible() ) - ImplCalc( sal_False ); + ImplCalc( false ); Invalidate(); } @@ -881,17 +881,17 @@ void Slider::StateChanged( StateChangedType nType ) Control::StateChanged( nType ); if ( nType == STATE_CHANGE_INITSHOW ) - ImplCalc( sal_False ); + ImplCalc( false ); else if ( nType == STATE_CHANGE_DATA ) { if ( IsReallyVisible() && IsUpdateMode() ) - ImplCalc( sal_True ); + ImplCalc( true ); } else if ( nType == STATE_CHANGE_UPDATEMODE ) { if ( IsReallyVisible() && IsUpdateMode() ) { - ImplCalc( sal_False ); + ImplCalc( false ); Invalidate(); } } @@ -907,8 +907,8 @@ void Slider::StateChanged( StateChangedType nType ) if ( (GetPrevStyle() & SLIDER_VIEW_STYLE) != (GetStyle() & SLIDER_VIEW_STYLE) ) { - mbCalcSize = sal_True; - ImplCalc( sal_False ); + mbCalcSize = true; + ImplCalc( false ); Invalidate(); } } diff --git a/vcl/source/control/spinbtn.cxx b/vcl/source/control/spinbtn.cxx index aff23a3a0f8d..6d6d7dbc256f 100644 --- a/vcl/source/control/spinbtn.cxx +++ b/vcl/source/control/spinbtn.cxx @@ -27,10 +27,10 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle ) { - mbUpperIn = sal_False; - mbLowerIn = sal_False; - mbInitialUp = sal_False; - mbInitialDown = sal_False; + mbUpperIn = false; + mbLowerIn = false; + mbInitialUp = false; + mbInitialDown = false; mnMinRange = 0; mnMaxRange = 100; @@ -43,9 +43,9 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle ) mbRepeat = 0 != ( nStyle & WB_REPEAT ); if ( nStyle & WB_HSCROLL ) - mbHorz = sal_True; + mbHorz = true; else - mbHorz = sal_False; + mbHorz = false; Control::ImplInit( pParent, nStyle, NULL ); } @@ -54,7 +54,7 @@ void SpinButton::ImplInit( Window* pParent, WinBits nStyle ) SpinButton::SpinButton( Window* pParent, WinBits nStyle ) :Control( WINDOW_SPINBUTTON ) - ,mbUpperIsFocused( sal_False ) + ,mbUpperIsFocused( false ) { ImplInit( pParent, nStyle ); } @@ -94,7 +94,7 @@ void SpinButton::Up() mnValue += mnValueStep; StateChanged( STATE_CHANGE_DATA ); - ImplMoveFocus( sal_True ); + ImplMoveFocus( true ); } ImplCallEventListenersAndHandler( VCLEVENT_SPINBUTTON_UP, maUpHdlLink, this ); @@ -109,7 +109,7 @@ void SpinButton::Down() mnValue -= mnValueStep; StateChanged( STATE_CHANGE_DATA ); - ImplMoveFocus( sal_False ); + ImplMoveFocus( false ); } ImplCallEventListenersAndHandler( VCLEVENT_SPINBUTTON_DOWN, maDownHdlLink, this ); @@ -179,9 +179,9 @@ void SpinButton::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, aUpperRect += aPos; aLowerRect += aPos; - ImplDrawSpinButton( pDev, aUpperRect, aLowerRect, sal_False, sal_False, + ImplDrawSpinButton( pDev, aUpperRect, aLowerRect, false, false, IsEnabled() && ImplIsUpperEnabled(), - IsEnabled() && ImplIsLowerEnabled(), mbHorz, sal_True ); + IsEnabled() && ImplIsLowerEnabled(), mbHorz, true ); pDev->Pop(); } @@ -190,10 +190,10 @@ void SpinButton::Paint( const Rectangle& ) { HideFocus(); - sal_Bool bEnable = IsEnabled(); + bool bEnable = IsEnabled(); ImplDrawSpinButton( this, maUpperRect, maLowerRect, mbUpperIn, mbLowerIn, bEnable && ImplIsUpperEnabled(), - bEnable && ImplIsLowerEnabled(), mbHorz, sal_True ); + bEnable && ImplIsLowerEnabled(), mbHorz, true ); if ( HasFocus() ) ShowFocus( maFocusRect ); @@ -205,14 +205,14 @@ void SpinButton::MouseButtonDown( const MouseEvent& rMEvt ) { if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) && ( ImplIsUpperEnabled() ) ) { - mbUpperIn = sal_True; - mbInitialUp = sal_True; + mbUpperIn = true; + mbInitialUp = true; Invalidate( maUpperRect ); } else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) && ( ImplIsLowerEnabled() ) ) { - mbLowerIn = sal_True; - mbInitialDown = sal_True; + mbLowerIn = true; + mbInitialDown = true; Invalidate( maLowerRect ); } @@ -238,20 +238,20 @@ void SpinButton::MouseButtonUp( const MouseEvent& ) if ( mbUpperIn ) { - mbUpperIn = sal_False; + mbUpperIn = false; Invalidate( maUpperRect ); Update(); Up(); } else if ( mbLowerIn ) { - mbLowerIn = sal_False; + mbLowerIn = false; Invalidate( maLowerRect ); Update(); Down(); } - mbInitialUp = mbInitialDown = sal_False; + mbInitialUp = mbInitialDown = false; } // ----------------------------------------------------------------------- @@ -264,15 +264,15 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) if ( !maUpperRect.IsInside( rMEvt.GetPosPixel() ) && mbUpperIn && mbInitialUp ) { - mbUpperIn = sal_False; + mbUpperIn = false; maRepeatTimer.Stop(); Invalidate( maUpperRect ); Update(); } else if ( !maLowerRect.IsInside( rMEvt.GetPosPixel() ) && - mbLowerIn & mbInitialDown ) + mbLowerIn && mbInitialDown ) { - mbLowerIn = sal_False; + mbLowerIn = false; maRepeatTimer.Stop(); Invalidate( maLowerRect ); Update(); @@ -280,7 +280,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) else if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) && !mbUpperIn && mbInitialUp ) { - mbUpperIn = sal_True; + mbUpperIn = true; if ( mbRepeat ) maRepeatTimer.Start(); Invalidate( maUpperRect ); @@ -289,7 +289,7 @@ void SpinButton::MouseMove( const MouseEvent& rMEvt ) else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) && !mbLowerIn && mbInitialDown ) { - mbLowerIn = sal_True; + mbLowerIn = true; if ( mbRepeat ) maRepeatTimer.Start(); Invalidate( maLowerRect ); @@ -349,7 +349,7 @@ void SpinButton::StateChanged( StateChangedType nType ) case STATE_CHANGE_STYLE: { - sal_Bool bNewRepeat = 0 != ( GetStyle() & WB_REPEAT ); + bool bNewRepeat = 0 != ( GetStyle() & WB_REPEAT ); if ( bNewRepeat != mbRepeat ) { if ( maRepeatTimer.IsActive() ) @@ -360,7 +360,7 @@ void SpinButton::StateChanged( StateChangedType nType ) mbRepeat = bNewRepeat; } - sal_Bool bNewHorz = 0 != ( GetStyle() & WB_HSCROLL ); + bool bNewHorz = 0 != ( GetStyle() & WB_HSCROLL ); if ( bNewHorz != mbHorz ) { mbHorz = bNewHorz; @@ -449,21 +449,21 @@ void SpinButton::LoseFocus() // ----------------------------------------------------------------------- -sal_Bool SpinButton::ImplMoveFocus( sal_Bool _bUpper ) +bool SpinButton::ImplMoveFocus( bool _bUpper ) { if ( _bUpper == mbUpperIsFocused ) - return sal_False; + return false; HideFocus(); ImplCalcFocusRect( _bUpper ); if ( HasFocus() ) ShowFocus( maFocusRect ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -void SpinButton::ImplCalcFocusRect( sal_Bool _bUpper ) +void SpinButton::ImplCalcFocusRect( bool _bUpper ) { maFocusRect = _bUpper ? maUpperRect : maLowerRect; // inflate by some pixels diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 146b174d15a7..3e72b136c363 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -35,8 +35,8 @@ namespace { void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect, const Rectangle& rLowerRect, - sal_Bool bUpperIn, sal_Bool bLowerIn, - sal_Bool bUpperEnabled, sal_Bool bLowerEnabled, sal_Bool bHorz, + bool bUpperIn, bool bLowerIn, + bool bUpperEnabled, bool bLowerEnabled, bool bHorz, SpinbuttonValue& rValue ) { // convert spinbutton data to a SpinbuttonValue structure for native painting @@ -75,9 +75,9 @@ void ImplGetSpinbuttonValue( Window *pWin, const Rectangle& rUpperRect, } -sal_Bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) +bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) { - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( pWin->IsNativeControlSupported(CTRL_SPINBOX, PART_ENTIRE_CONTROL) && // there is just no useful native support for spinfields with dropdown @@ -126,9 +126,9 @@ sal_Bool ImplDrawNativeSpinfield( Window *pWin, const SpinbuttonValue& rSpinbutt return bNativeOK; } -sal_Bool ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) +bool ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbuttonValue ) { - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( pWin->IsNativeControlSupported(CTRL_SPINBUTTONS, PART_ENTIRE_CONTROL) ) { @@ -144,8 +144,8 @@ sal_Bool ImplDrawNativeSpinbuttons( Window *pWin, const SpinbuttonValue& rSpinbu void ImplDrawSpinButton( OutputDevice* pOutDev, const Rectangle& rUpperRect, const Rectangle& rLowerRect, - sal_Bool bUpperIn, sal_Bool bLowerIn, - sal_Bool bUpperEnabled, sal_Bool bLowerEnabled, sal_Bool bHorz, sal_Bool bMirrorHorz ) + bool bUpperIn, bool bLowerIn, + bool bUpperEnabled, bool bLowerEnabled, bool bHorz, bool bMirrorHorz ) { DecorationView aDecoView( pOutDev ); @@ -188,7 +188,7 @@ void ImplDrawSpinButton( OutputDevice* pOutDev, if ( bUpperIn ) nTempStyle |= BUTTON_DRAW_PRESSED; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; Rectangle aUpRect; if( pOutDev->GetOutDevType() == OUTDEV_WINDOW ) @@ -293,14 +293,14 @@ void ImplDrawSpinButton( OutputDevice* pOutDev, void SpinField::ImplInitSpinFieldData() { mpEdit = NULL; - mbSpin = sal_False; - mbRepeat = sal_False; - mbUpperIn = sal_False; - mbLowerIn = sal_False; - mbInitialUp = sal_False; - mbInitialDown = sal_False; - mbNoSelect = sal_False; - mbInDropDown = sal_False; + mbSpin = false; + mbRepeat = false; + mbUpperIn = false; + mbLowerIn = false; + mbInitialUp = false; + mbInitialDown = false; + mbNoSelect = false; + mbInDropDown = false; } // -------------------------------------------------------------------- @@ -311,7 +311,7 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle ) if ( nWinStyle & (WB_SPIN|WB_DROPDOWN) ) { - mbSpin = sal_True; + mbSpin = true; // Some themes want external spin buttons, therefore the main // spinfield should not overdraw the border between its encapsulated @@ -325,7 +325,7 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle ) else mpEdit = new Edit( this, WB_NOBORDER ); - mpEdit->EnableRTL( sal_False ); + mpEdit->EnableRTL( false ); mpEdit->SetPosPixel( Point() ); mpEdit->Show(); SetSubEdit( mpEdit ); @@ -333,9 +333,9 @@ void SpinField::ImplInit( Window* pParent, WinBits nWinStyle ) maRepeatTimer.SetTimeoutHdl( LINK( this, SpinField, ImplTimeout ) ); maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() ); if ( nWinStyle & WB_REPEAT ) - mbRepeat = sal_True; + mbRepeat = true; - SetCompoundControl( sal_True ); + SetCompoundControl( true ); } } @@ -410,7 +410,7 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt ) { if ( !HasFocus() && ( !mpEdit || !mpEdit->HasFocus() ) ) { - mbNoSelect = sal_True; + mbNoSelect = true; GrabFocus(); } @@ -418,14 +418,14 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt ) { if ( maUpperRect.IsInside( rMEvt.GetPosPixel() ) ) { - mbUpperIn = sal_True; - mbInitialUp = sal_True; + mbUpperIn = true; + mbInitialUp = true; Invalidate( maUpperRect ); } else if ( maLowerRect.IsInside( rMEvt.GetPosPixel() ) ) { - mbLowerIn = sal_True; - mbInitialDown = sal_True; + mbLowerIn = true; + mbInitialDown = true; Invalidate( maLowerRect ); } else if ( maDropDownRect.IsInside( rMEvt.GetPosPixel() ) ) @@ -453,20 +453,20 @@ void SpinField::MouseButtonDown( const MouseEvent& rMEvt ) void SpinField::MouseButtonUp( const MouseEvent& rMEvt ) { ReleaseMouse(); - mbInitialUp = mbInitialDown = sal_False; + mbInitialUp = mbInitialDown = false; maRepeatTimer.Stop(); maRepeatTimer.SetTimeout( GetSettings().GetMouseSettings().GetButtonStartRepeat() ); if ( mbUpperIn ) { - mbUpperIn = sal_False; + mbUpperIn = false; Invalidate( maUpperRect ); Update(); Up(); } else if ( mbLowerIn ) { - mbLowerIn = sal_False; + mbLowerIn = false; Invalidate( maLowerRect ); Update(); Down(); @@ -483,7 +483,7 @@ void SpinField::MouseMove( const MouseEvent& rMEvt ) { if ( mbInitialUp ) { - sal_Bool bNewUpperIn = maUpperRect.IsInside( rMEvt.GetPosPixel() ); + bool bNewUpperIn = maUpperRect.IsInside( rMEvt.GetPosPixel() ); if ( bNewUpperIn != mbUpperIn ) { if ( bNewUpperIn ) @@ -501,7 +501,7 @@ void SpinField::MouseMove( const MouseEvent& rMEvt ) } else if ( mbInitialDown ) { - sal_Bool bNewLowerIn = maLowerRect.IsInside( rMEvt.GetPosPixel() ); + bool bNewLowerIn = maLowerRect.IsInside( rMEvt.GetPosPixel() ); if ( bNewLowerIn != mbLowerIn ) { if ( bNewLowerIn ) @@ -637,7 +637,7 @@ void SpinField::Paint( const Rectangle& rRect ) { if ( mbSpin ) { - sal_Bool bEnable = IsEnabled(); + bool bEnable = IsEnabled(); ImplDrawSpinButton( this, maUpperRect, maLowerRect, mbUpperIn, mbLowerIn, bEnable, bEnable ); } @@ -693,7 +693,7 @@ void SpinField::ImplCalcButtonAreas( OutputDevice* pDev, const Size& rOutSz, Rec if ( !(aSize.Height() & 0x01) ) nBottom1--; - sal_Bool bNativeRegionOK = sal_False; + bool bNativeRegionOK = false; Rectangle aContentUp, aContentDown; if ( (pDev->GetOutDevType() == OUTDEV_WINDOW) && @@ -832,9 +832,9 @@ void SpinField::StateChanged( StateChangedType nType ) else if ( nType == STATE_CHANGE_STYLE ) { if ( GetStyle() & WB_REPEAT ) - mbRepeat = sal_True; + mbRepeat = true; else - mbRepeat = sal_False; + mbRepeat = false; } else if ( nType == STATE_CHANGE_ZOOM ) { @@ -847,21 +847,21 @@ void SpinField::StateChanged( StateChangedType nType ) { if ( mpEdit ) mpEdit->SetControlFont( GetControlFont() ); - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { if ( mpEdit ) mpEdit->SetControlForeground( GetControlForeground() ); - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { if ( mpEdit ) mpEdit->SetControlBackground( GetControlBackground() ); - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } else if( nType == STATE_CHANGE_MIRRORING ) @@ -951,15 +951,15 @@ bool SpinField::PreNotify( NotifyEvent& rNEvt ) void SpinField::EndDropDown() { - mbInDropDown = sal_False; + mbInDropDown = false; Paint( Rectangle( Point(), GetOutputSizePixel() ) ); } // ----------------------------------------------------------------------- -sal_Bool SpinField::ShowDropDown( sal_Bool ) +bool SpinField::ShowDropDown( sal_Bool ) { - return sal_False; + return false; } Size SpinField::CalcMinimumSizeForText(const OUString &rString) const @@ -1091,7 +1091,7 @@ void SpinField::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, if ( GetStyle() & WB_SPIN ) { - ImplDrawSpinButton( pDev, aUp, aDown, sal_False, sal_False, sal_True, sal_True ); + ImplDrawSpinButton( pDev, aUp, aDown, false, false, true, true ); } pDev->Pop(); diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index b8ccac827576..152449e242a5 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -110,15 +110,15 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) mnMaxPageWidth = 0; mnActPageId = 0; mnCurPageId = 0; - mbFormat = sal_True; - mbRestoreHelpId = sal_False; - mbRestoreUnqId = sal_False; - mbSmallInvalidate = sal_False; + mbFormat = true; + mbRestoreHelpId = false; + mbRestoreUnqId = false; + mbSmallInvalidate = false; mpTabCtrlData = new ImplTabCtrlData; mpTabCtrlData->mpListBox = NULL; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); if( (nStyle & WB_DROPDOWN) ) { @@ -131,7 +131,7 @@ void TabControl::ImplInit( Window* pParent, WinBits nStyle ) // if the tabcontrol is drawn (ie filled) by a native widget, make sure all contols will have transparent background // otherwise they will paint with a wrong background if( IsNativeControlSupported(CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); if ( pParent->IsDialog() ) pParent->AddChildEventListener( LINK( this, TabControl, ImplWindowEventListener ) ); @@ -152,8 +152,8 @@ const Color& TabControl::GetCanonicalTextColor( const StyleSettings& _rStyle ) c // ----------------------------------------------------------------------- -void TabControl::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void TabControl::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { Control::ImplInitSettings( bFont, bForeground ); @@ -168,17 +168,17 @@ void TabControl::ImplInitSettings( sal_Bool bFont, { // set transparent mode for NWF tabcontrols to have // the background always cleared properly - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); ImplGetWindowImpl()->mbUseNativeFocus = ImplGetSVData()->maNWFData.mbNoFocusRects; } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); @@ -461,7 +461,7 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe if ( mbFormat || (mnLastWidth != nWidth) || (mnLastHeight != nHeight) ) { Font aFont( GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); SetFont( aFont ); Size aSize; @@ -524,7 +524,7 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe Rectangle aNewRect( Point( nX, nY ), aSize ); if ( mbSmallInvalidate && (it->maRect != aNewRect) ) - mbSmallInvalidate = sal_False; + mbSmallInvalidate = false; it->maRect = aNewRect; it->mnLine = nLines; it->mbFullVisible = true; @@ -621,7 +621,7 @@ Rectangle TabControl::ImplGetTabRect( sal_uInt16 nItemPos, long nWidth, long nHe mnLastWidth = nWidth; mnLastHeight = nHeight; - mbFormat = sal_False; + mbFormat = false; } return size_t(nItemPos) < mpTabCtrlData->maItemList.size() ? mpTabCtrlData->maItemList[nItemPos].maRect : Rectangle(); @@ -693,12 +693,12 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) // also set the help id of the parent window to that of the tab page if ( GetHelpId().isEmpty() ) { - mbRestoreHelpId = sal_True; + mbRestoreHelpId = true; pCtrlParent->SetHelpId( pPage->GetHelpId() ); } if ( pCtrlParent->GetUniqueId().isEmpty() ) { - mbRestoreUnqId = sal_True; + mbRestoreUnqId = true; pCtrlParent->SetUniqueId( pPage->GetUniqueId() ); } @@ -735,7 +735,7 @@ void TabControl::ImplChangeTabPage( sal_uInt16 nId, sal_uInt16 nOldId ) // ----------------------------------------------------------------------- -sal_Bool TabControl::ImplPosCurTabPage() +bool TabControl::ImplPosCurTabPage() { // resize/position current TabPage ImplTabItem* pItem = ImplGetItem( GetCurPageId() ); @@ -745,19 +745,19 @@ sal_Bool TabControl::ImplPosCurTabPage() { Rectangle aRectNoTab( (const Point&)Point( 0, 0 ), GetSizePixel() ); pItem->mpTabPage->SetPosSizePixel( aRectNoTab.TopLeft(), aRectNoTab.GetSize() ); - return sal_True; + return true; } Rectangle aRect = ImplGetTabRect( TAB_PAGERECT ); pItem->mpTabPage->SetPosSizePixel( aRect.TopLeft(), aRect.GetSize() ); - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- -void TabControl::ImplActivateTabPage( sal_Bool bNext ) +void TabControl::ImplActivateTabPage( bool bNext ) { sal_uInt16 nCurPos = GetPagePos( GetCurPageId() ); @@ -851,7 +851,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo bool bLeftBorder = true; bool bRightBorder = true; sal_uInt16 nOff; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; sal_uInt16 nOff2 = 0; sal_uInt16 nOff3 = 0; @@ -890,7 +890,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo } } - if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) == sal_True ) + if( !bLayout && (bNativeOK = IsNativeControlSupported(CTRL_TAB_ITEM, PART_ENTIRE_CONTROL)) ) { Rectangle aCtrlRegion( pItem->maRect ); ControlState nState = 0; @@ -989,7 +989,7 @@ void TabControl::ImplDrawItem( ImplTabItem* pItem, const Rectangle& rCurRect, bo // set font accordingly, current item is painted bold // we set the font attributes always before drawing to be re-entrant (DrawNativeControl may trigger additional paints) Font aFont( GetFont() ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); SetFont( aFont ); Size aTabSize = aRect.GetSize(); @@ -1043,7 +1043,7 @@ bool TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) { if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEUP) ) { - ImplActivateTabPage( sal_False ); + ImplActivateTabPage( false ); nRet = true; } } @@ -1051,7 +1051,7 @@ bool TabControl::ImplHandleKeyEvent( const KeyEvent& rKeyEvent ) { if ( (nKeyCode == KEY_TAB) || (nKeyCode == KEY_PAGEDOWN) ) { - ImplActivateTabPage( sal_True ); + ImplActivateTabPage( true ); nRet = true; } } @@ -1117,7 +1117,7 @@ void TabControl::KeyInput( const KeyEvent& rKEvt ) if ( (nKeyCode == KEY_LEFT) || (nKeyCode == KEY_RIGHT) ) { - sal_Bool bNext = (nKeyCode == KEY_RIGHT); + bool bNext = (nKeyCode == KEY_RIGHT); ImplActivateTabPage( bNext ); } } @@ -1176,8 +1176,8 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) aRect.Right()+=10; } - sal_Bool bNativeOK = sal_False; - if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) == sal_True ) + bool bNativeOK = false; + if( ! bLayout && (bNativeOK = IsNativeControlSupported( CTRL_TAB_PANE, PART_ENTIRE_CONTROL) ) ) { const ImplControlValue aControlValue; @@ -1312,7 +1312,7 @@ void TabControl::ImplPaint( const Rectangle& rRect, bool bLayout ) ImplShowFocus(); if( ! bLayout ) - mbSmallInvalidate = sal_True; + mbSmallInvalidate = true; } // ----------------------------------------------------------------------- @@ -1336,10 +1336,10 @@ void TabControl::setAllocation(const Size &rAllocation) mpTabCtrlData->mpListBox->SetPosSizePixel( aNewPos, aNewSize ); } - mbFormat = sal_True; + mbFormat = true; // resize/position active TabPage - sal_Bool bTabPage = ImplPosCurTabPage(); + bool bTabPage = ImplPosCurTabPage(); // check what needs to be invalidated Size aNewSize = rAllocation; @@ -1350,7 +1350,7 @@ void TabControl::setAllocation(const Size &rAllocation) if ( !it->mbFullVisible || (it->maRect.Right()-2 >= nNewWidth) ) { - mbSmallInvalidate = sal_False; + mbSmallInvalidate = false; break; } } @@ -1579,17 +1579,17 @@ void TabControl::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -1605,7 +1605,7 @@ void TabControl::DataChanged( const DataChangedEvent& rDCEvt ) ((rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } } @@ -1796,7 +1796,7 @@ void TabControl::InsertPage( sal_uInt16 nPageId, const OUString& rText, pItem->maText = rText; pItem->mbFullVisible = false; - mbFormat = sal_True; + mbFormat = true; if ( IsUpdateMode() ) Invalidate(); @@ -1845,7 +1845,7 @@ void TabControl::RemovePage( sal_uInt16 nPageId ) } } - mbFormat = sal_True; + mbFormat = true; if ( IsUpdateMode() ) Invalidate(); @@ -1867,7 +1867,7 @@ void TabControl::Clear() ImplFreeLayoutData(); - mbFormat = sal_True; + mbFormat = true; if ( IsUpdateMode() ) Invalidate(); @@ -1883,7 +1883,7 @@ void TabControl::EnablePage( sal_uInt16 i_nPageId, bool i_bEnable ) if ( pItem && pItem->mbEnabled != i_bEnable ) { pItem->mbEnabled = i_bEnable; - mbFormat = sal_True; + mbFormat = true; if( mpTabCtrlData->mpListBox ) mpTabCtrlData->mpListBox->SetEntryFlags( GetPagePos( i_nPageId ), i_bEnable ? 0 : (LISTBOX_ENTRY_FLAG_DISABLE_SELECTION | LISTBOX_ENTRY_FLAG_DRAW_DISABLED) ); @@ -1993,7 +1993,7 @@ void TabControl::SetCurPageId( sal_uInt16 nPageId ) mnActPageId = nPageId; else { - mbFormat = sal_True; + mbFormat = true; sal_uInt16 nOldId = mnCurPageId; mnCurPageId = nPageId; ImplChangeTabPage( nPageId, nOldId ); @@ -2086,7 +2086,7 @@ void TabControl::SetPageText( sal_uInt16 nPageId, const OUString& rText ) if ( pItem && pItem->maText != rText ) { pItem->maText = rText; - mbFormat = sal_True; + mbFormat = true; if( mpTabCtrlData->mpListBox ) { sal_uInt16 nPos = GetPagePos( nPageId ); @@ -2186,7 +2186,7 @@ void TabControl::SetPageImage( sal_uInt16 i_nPageId, const Image& i_rImage ) if ( pItem ) { pItem->maTabImage = i_rImage; - mbFormat = sal_True; + mbFormat = true; if ( IsUpdateMode() ) Invalidate(); } diff --git a/vcl/source/control/throbber.cxx b/vcl/source/control/throbber.cxx index b1be3c353eee..96d95352f3d0 100644 --- a/vcl/source/control/throbber.cxx +++ b/vcl/source/control/throbber.cxx @@ -44,7 +44,7 @@ namespace ImageScaleMode = ::com::sun::star::awt::ImageScaleMode; Throbber::Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_imageSet ) :ImageControl( i_parentWindow, i_style ) - ,mbRepeat( sal_True ) + ,mbRepeat( true ) ,mnStepTime( 100 ) ,mnCurStep( 0 ) ,mnStepCount( 0 ) @@ -59,7 +59,7 @@ Throbber::Throbber( Window* i_parentWindow, WinBits i_style, const ImageSet i_im Throbber::Throbber( Window* i_parentWindow, const ResId& i_resId, const ImageSet i_imageSet ) :ImageControl( i_parentWindow, i_resId ) - ,mbRepeat( sal_True ) + ,mbRepeat( true ) ,mnStepTime( 100 ) ,mnCurStep( 0 ) ,mnStepCount( 0 ) diff --git a/vcl/source/edit/textdat2.hxx b/vcl/source/edit/textdat2.hxx index fd91bd11e023..30c8dc49db7e 100644 --- a/vcl/source/edit/textdat2.hxx +++ b/vcl/source/edit/textdat2.hxx @@ -72,7 +72,7 @@ public: sal_uInt8 GetRightToLeft() const { return nRightToLeft; } sal_uInt8& GetRightToLeft() { return nRightToLeft; } - sal_Bool IsRightToLeft() const { return (nRightToLeft&1); } + bool IsRightToLeft() const { return (nRightToLeft&1); } bool HasValidSize() const { return nWidth != (-1); } }; @@ -88,7 +88,7 @@ public: ~TETextPortionList(); void Reset(); - sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, sal_Bool bPreferStartingPortion = sal_False ); + sal_uInt16 FindPortion( sal_uInt16 nCharPos, sal_uInt16& rPortionStart, bool bPreferStartingPortion = false ); sal_uInt16 GetPortionStartIndex( sal_uInt16 nPortion ); void DeleteFromPortion( sal_uInt16 nDelFrom ); }; @@ -126,10 +126,10 @@ public: mbInvalid = true; } - sal_Bool IsIn( sal_uInt16 nIndex ) const + bool IsIn( sal_uInt16 nIndex ) const { return ( (nIndex >= mnStart ) && ( nIndex < mnEnd ) ); } - sal_Bool IsIn( sal_uInt16 nIndex, sal_Bool bInclEnd ) const + bool IsIn( sal_uInt16 nIndex, bool bInclEnd ) const { return ( ( nIndex >= mnStart ) && ( bInclEnd ? ( nIndex <= mnEnd ) : ( nIndex < mnEnd ) ) ); } void SetStart( sal_uInt16 n ) { mnStart = n; } @@ -229,7 +229,7 @@ public: std::vector<TEWritingDirectionInfo>& GetWritingDirectionInfos() { return maWritingDirectionInfos; } - sal_uInt16 GetLineNumber( sal_uInt16 nIndex, sal_Bool bInclEnd ); + sal_uInt16 GetLineNumber( sal_uInt16 nIndex, bool bInclEnd ); void CorrectValuesBehindLastFormattedLine( sal_uInt16 nLastFormattedLine ); }; @@ -255,9 +255,9 @@ public: virtual void CreateAnchor(); - virtual sal_Bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); + virtual bool SetCursorAtPoint( const Point& rPointPixel, sal_Bool bDontSelectAtCursor = sal_False ); - virtual sal_Bool IsSelectionAtPoint( const Point& rPointPixel ); + virtual bool IsSelectionAtPoint( const Point& rPointPixel ); virtual void DeselectAll(); virtual void DeselectAtPoint( const Point& ); @@ -285,14 +285,14 @@ struct TextDDInfo Cursor maCursor; TextPaM maDropPos; - sal_Bool mbStarterOfDD; - sal_Bool mbVisCursor; + bool mbStarterOfDD; + bool mbVisCursor; TextDDInfo() { maCursor.SetStyle( CURSOR_SHADOW ); - mbStarterOfDD = sal_False; - mbVisCursor = sal_False; + mbStarterOfDD = false; + mbVisCursor = false; } }; diff --git a/vcl/source/edit/textdata.cxx b/vcl/source/edit/textdata.cxx index 6ac9459a26f4..892ffc1f4dba 100644 --- a/vcl/source/edit/textdata.cxx +++ b/vcl/source/edit/textdata.cxx @@ -73,7 +73,7 @@ void TETextPortionList::DeleteFromPortion( sal_uInt16 nDelFrom ) erase( begin() + nDelFrom, end() ); } -sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, sal_Bool bPreferStartingPortion ) +sal_uInt16 TETextPortionList::FindPortion( sal_uInt16 nCharPos, sal_uInt16& nPortionStart, bool bPreferStartingPortion ) { // find left portion at nCharPos at portion border sal_uInt16 nTmpPos = 0; @@ -163,7 +163,7 @@ void TEParaPortion::MarkSelectionInvalid( sal_uInt16 nStart, sal_uInt16 /*nEnd*/ mbSimple = false; } -sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, sal_Bool bInclEnd ) +sal_uInt16 TEParaPortion::GetLineNumber( sal_uInt16 nChar, bool bInclEnd ) { for ( sal_uInt16 nLine = 0; nLine < maLines.size(); nLine++ ) { diff --git a/vcl/source/edit/textdoc.cxx b/vcl/source/edit/textdoc.cxx index c2a4b74ceeec..698e521c32b5 100644 --- a/vcl/source/edit/textdoc.cxx +++ b/vcl/source/edit/textdoc.cxx @@ -47,7 +47,7 @@ TextCharAttrib::~TextCharAttrib() TextCharAttribList::TextCharAttribList() { - mbHasEmptyAttribs = sal_False; + mbHasEmptyAttribs = false; } TextCharAttribList::~TextCharAttribList() @@ -55,7 +55,7 @@ TextCharAttribList::~TextCharAttribList() // PTRARR_DEL } -void TextCharAttribList::Clear( sal_Bool bDestroyAttribs ) +void TextCharAttribList::Clear( bool bDestroyAttribs ) { if ( bDestroyAttribs ) for(iterator it = begin(); it != end(); ++it) @@ -67,7 +67,7 @@ void TextCharAttribList::Clear( sal_Bool bDestroyAttribs ) void TextCharAttribList::InsertAttrib( TextCharAttrib* pAttrib ) { if ( pAttrib->IsEmpty() ) - mbHasEmptyAttribs = sal_True; + mbHasEmptyAttribs = true; const sal_uInt16 nCount = size(); const sal_uInt16 nStart = pAttrib->GetStart(); // maybe better for Comp.Opt. @@ -124,18 +124,18 @@ TextCharAttrib* TextCharAttribList::FindNextAttrib( sal_uInt16 nWhich, sal_uInt1 return NULL; } -sal_Bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const +bool TextCharAttribList::HasAttrib( sal_uInt16 nWhich ) const { for ( sal_uInt16 nAttr = size(); nAttr; ) { const TextCharAttrib* pAttr = GetAttrib( --nAttr ); if ( pAttr->Which() == nWhich ) - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound ) +bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound ) { // backwards; if one ends there and the next starts there // ==> the starting one counts @@ -144,12 +144,12 @@ sal_Bool TextCharAttribList::HasBoundingAttrib( sal_uInt16 nBound ) TextCharAttrib* pAttr = GetAttrib( --nAttr ); if ( pAttr->GetEnd() < nBound ) - return sal_False; + return false; if ( ( pAttr->GetStart() == nBound ) || ( pAttr->GetEnd() == nBound ) ) - return sal_True; + return true; } - return sal_False; + return false; } TextCharAttrib* TextCharAttribList::FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ) @@ -182,7 +182,7 @@ void TextCharAttribList::DeleteEmptyAttribs() nAttr--; } } - mbHasEmptyAttribs = sal_False; + mbHasEmptyAttribs = false; } TextNode::TextNode( const OUString& rText ) : @@ -310,7 +310,7 @@ void TextNode::CollapsAttribs( sal_uInt16 nIndex, sal_uInt16 nDeleted ) nAttr--; } else if ( pAttrib->IsEmpty() ) - maCharAttribs.HasEmptyAttribs() = sal_True; + maCharAttribs.HasEmptyAttribs() = true; } if ( bResort ) @@ -335,7 +335,7 @@ void TextNode::RemoveText( sal_uInt16 nPos, sal_uInt16 nChars ) CollapsAttribs( nPos, nChars ); } -TextNode* TextNode::Split( sal_uInt16 nPos, sal_Bool bKeepEndingAttribs ) +TextNode* TextNode::Split( sal_uInt16 nPos, bool bKeepEndingAttribs ) { OUString aNewText; if ( nPos < maText.getLength() ) @@ -545,7 +545,7 @@ TextPaM TextDoc::InsertText( const TextPaM& rPaM, const OUString& rStr ) return aPaM; } -TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs ) +TextPaM TextDoc::InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs ) { TextNode* pNode = maTextNodes.GetObject( rPaM.GetPara() ); TextNode* pNew = pNode->Split( rPaM.GetIndex(), bKeepEndingAttribs ); @@ -579,20 +579,20 @@ TextPaM TextDoc::RemoveChars( const TextPaM& rPaM, sal_uInt16 nChars ) return rPaM; } -sal_Bool TextDoc::IsValidPaM( const TextPaM& rPaM ) +bool TextDoc::IsValidPaM( const TextPaM& rPaM ) { if ( rPaM.GetPara() >= maTextNodes.Count() ) { OSL_FAIL( "PaM: Para out of range" ); - return sal_False; + return false; } TextNode * pNode = maTextNodes.GetObject( rPaM.GetPara() ); if ( rPaM.GetIndex() > pNode->GetText().getLength() ) { OSL_FAIL( "PaM: Index out of range" ); - return sal_False; + return false; } - return sal_True; + return true; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/edit/textdoc.hxx b/vcl/source/edit/textdoc.hxx index e00cafddd664..06623ce218dd 100644 --- a/vcl/source/edit/textdoc.hxx +++ b/vcl/source/edit/textdoc.hxx @@ -37,7 +37,7 @@ public: class TextCharAttribList : private TextCharAttribs { private: - sal_Bool mbHasEmptyAttribs; + bool mbHasEmptyAttribs; TextCharAttribList( const TextCharAttribList& ) : TextCharAttribs() {} @@ -45,7 +45,7 @@ public: TextCharAttribList(); ~TextCharAttribList(); - void Clear( sal_Bool bDestroyAttribs ); + void Clear( bool bDestroyAttribs ); sal_uInt16 Count() const { return TextCharAttribs::size(); } TextCharAttrib* GetAttrib( sal_uInt16 n ) const { return TextCharAttribs::operator[]( n ); } @@ -56,14 +56,14 @@ public: void DeleteEmptyAttribs(); void ResortAttribs(); - sal_Bool HasEmptyAttribs() const { return mbHasEmptyAttribs; } - sal_Bool& HasEmptyAttribs() { return mbHasEmptyAttribs; } + bool HasEmptyAttribs() const { return mbHasEmptyAttribs; } + bool& HasEmptyAttribs() { return mbHasEmptyAttribs; } TextCharAttrib* FindAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); TextCharAttrib* FindNextAttrib( sal_uInt16 nWhich, sal_uInt16 nFromPos, sal_uInt16 nMaxPos = 0xFFFF ) const; TextCharAttrib* FindEmptyAttrib( sal_uInt16 nWhich, sal_uInt16 nPos ); - sal_Bool HasAttrib( sal_uInt16 nWhich ) const; - sal_Bool HasBoundingAttrib( sal_uInt16 nBound ); + bool HasAttrib( sal_uInt16 nWhich ) const; + bool HasBoundingAttrib( sal_uInt16 nBound ); }; @@ -91,7 +91,7 @@ public: void InsertText( sal_uInt16 nPos, sal_Unicode c ); void RemoveText( sal_uInt16 nPos, sal_uInt16 nChars ); - TextNode* Split( sal_uInt16 nPos, sal_Bool bKeepEndigAttribs ); + TextNode* Split( sal_uInt16 nPos, bool bKeepEndigAttribs ); void Append( const TextNode& rNode ); }; @@ -117,7 +117,7 @@ public: TextPaM InsertText( const TextPaM& rPaM, sal_Unicode c ); TextPaM InsertText( const TextPaM& rPaM, const OUString& rStr ); - TextPaM InsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs ); + TextPaM InsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs ); TextPaM ConnectParagraphs( TextNode* pLeft, TextNode* pRight ); sal_uLong GetTextLen( const sal_Unicode* pSep, const TextSelection* pSel = NULL ) const; @@ -127,7 +127,7 @@ public: void SetLeftMargin( sal_uInt16 n ) { mnLeftMargin = n; } sal_uInt16 GetLeftMargin() const { return mnLeftMargin; } - sal_Bool IsValidPaM( const TextPaM& rPaM ); + bool IsValidPaM( const TextPaM& rPaM ); }; #endif // INCLUDED_VCL_SOURCE_EDIT_TEXTDOC_HXX diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index cbd0f9847189..985347cb0b42 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -70,15 +70,15 @@ TextEngine::TextEngine() mpViews = new TextViews; mpActiveView = NULL; - mbIsFormatting = sal_False; - mbFormatted = sal_False; - mbUpdate = sal_True; - mbModified = sal_False; - mbUndoEnabled = sal_False; - mbIsInUndo = sal_False; - mbDowning = sal_False; - mbRightToLeft = sal_False; - mbHasMultiLineParas = sal_False; + mbIsFormatting = false; + mbFormatted = false; + mbUpdate = true; + mbModified = false; + mbUndoEnabled = false; + mbIsInUndo = false; + mbDowning = false; + mbRightToLeft = false; + mbHasMultiLineParas = false; meAlign = TXTALIGN_LEFT; @@ -102,7 +102,7 @@ TextEngine::TextEngine() maTextColor = COL_BLACK; Font aFont; - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); Color aFillColor( aFont.GetFillColor() ); aFillColor.SetTransparency( 0 ); aFont.SetFillColor( aFillColor ); @@ -111,7 +111,7 @@ TextEngine::TextEngine() TextEngine::~TextEngine() { - mbDowning = sal_True; + mbDowning = true; delete mpIdleFormatter; delete mpDoc; @@ -188,7 +188,7 @@ void TextEngine::SetFont( const Font& rFont ) // Do not allow transparent fonts because of selection // (otherwise delete the background in ImplPaint later differently) - maFont.SetTransparent( sal_False ); + maFont.SetTransparent( false ); // Tell VCL not to use the font color, use text color from OutputDevice maFont.SetColor( COL_TRANSPARENT ); Color aFillColor( maFont.GetFillColor() ); @@ -306,7 +306,7 @@ sal_uInt16 TextEngine::GetTextLen( sal_uLong nPara ) const return mpDoc->GetNodes().GetObject( nPara )->GetText().getLength(); } -void TextEngine::SetUpdateMode( sal_Bool bUpdate ) +void TextEngine::SetUpdateMode( bool bUpdate ) { if ( bUpdate != mbUpdate ) { @@ -320,9 +320,9 @@ void TextEngine::SetUpdateMode( sal_Bool bUpdate ) } } -sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) +bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) { - sal_Bool bDoesChange = sal_False; + bool bDoesChange = false; KeyFuncType eFunc = rKeyEvent.GetKeyCode().GetFunction(); if ( eFunc != KEYFUNC_DONTKNOW ) @@ -332,7 +332,7 @@ sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) case KEYFUNC_UNDO: case KEYFUNC_REDO: case KEYFUNC_CUT: - case KEYFUNC_PASTE: bDoesChange = sal_True; + case KEYFUNC_PASTE: bDoesChange = true; break; default: // might get handled below eFunc = KEYFUNC_DONTKNOW; @@ -346,14 +346,14 @@ sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) case KEY_BACKSPACE: { if ( !rKeyEvent.GetKeyCode().IsMod2() ) - bDoesChange = sal_True; + bDoesChange = true; } break; case KEY_RETURN: case KEY_TAB: { if ( !rKeyEvent.GetKeyCode().IsMod1() && !rKeyEvent.GetKeyCode().IsMod2() ) - bDoesChange = sal_True; + bDoesChange = true; } break; default: @@ -365,15 +365,15 @@ sal_Bool TextEngine::DoesKeyChangeText( const KeyEvent& rKeyEvent ) return bDoesChange; } -sal_Bool TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent ) +bool TextEngine::IsSimpleCharInput( const KeyEvent& rKeyEvent ) { if( rKeyEvent.GetCharCode() >= 32 && rKeyEvent.GetCharCode() != 127 && KEY_MOD1 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) && // (ssa) #i45714#: KEY_MOD2 != (rKeyEvent.GetKeyCode().GetModifier() & ~KEY_SHIFT) ) // check for Ctrl and Alt separately { - return sal_True; + return true; } - return sal_False; + return false; } void TextEngine::ImpInitDoc() @@ -392,7 +392,7 @@ void TextEngine::ImpInitDoc() TEParaPortion* pIniPortion = new TEParaPortion( pNode ); mpTEParaPortions->Insert( pIniPortion, (sal_uLong)0 ); - mbFormatted = sal_False; + mbFormatted = false; ImpParagraphRemoved( TEXT_PARA_ALL ); ImpParagraphInserted( 0 ); @@ -447,9 +447,9 @@ void TextEngine::SetText( const OUString& rText ) { ImpRemoveText(); - sal_Bool bUndoCurrentlyEnabled = IsUndoEnabled(); + bool bUndoCurrentlyEnabled = IsUndoEnabled(); // the manually inserted text cannot be reversed by the user - EnableUndo( sal_False ); + EnableUndo( false ); TextPaM aStartPaM( 0, 0 ); TextSelection aEmptySel( aStartPaM, aStartPaM ); @@ -639,7 +639,7 @@ uno::Reference < i18n::XExtendedInputSequenceChecker > TextEngine::GetInputSeque return mxISC; } -sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const +bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextSelection& rCurSel ) const { SvtCTLOptions aCTLOptions; @@ -663,12 +663,12 @@ sal_Bool TextEngine::IsInputSequenceCheckingRequired( sal_Unicode c, const TextS return bIsSequenceChecking; } -TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, sal_Bool bOverwrite ) +TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, sal_Unicode c, bool bOverwrite ) { - return ImpInsertText( c, rCurSel, bOverwrite, sal_False ); + return ImpInsertText( c, rCurSel, bOverwrite, false ); } -TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, sal_Bool bOverwrite, sal_Bool bIsUserInput ) +TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, bool bOverwrite, bool bIsUserInput ) { DBG_ASSERT( c != '\n', "InsertText: NewLine!" ); DBG_ASSERT( c != '\r', "InsertText: NewLine!" ); @@ -751,7 +751,7 @@ TextPaM TextEngine::ImpInsertText( sal_Unicode c, const TextSelection& rCurSel, if ( IsUndoEnabled() && !IsInUndo() ) { TextUndoInsertChars* pNewUndo = new TextUndoInsertChars( this, aPaM, OUString(c) ); - sal_Bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False; + bool bTryMerge = ( !bDoOverwrite && ( c != ' ' ) ) ? sal_True : sal_False; InsertUndo( pNewUndo, bTryMerge ); } @@ -822,7 +822,7 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString& return aPaM; } -TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, sal_Bool bKeepEndingAttribs ) +TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, bool bKeepEndingAttribs ) { TextPaM aPaM; if ( rCurSel.HasRange() ) @@ -833,7 +833,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel, sal_Bool b return ImpInsertParaBreak( aPaM, bKeepEndingAttribs ); } -TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndingAttribs ) +TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, bool bKeepEndingAttribs ) { if ( IsUndoEnabled() && !IsInUndo() ) InsertUndo( new TextUndoSplitPara( this, rPaM.GetPara(), rPaM.GetIndex() ) ); @@ -861,7 +861,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM, sal_Bool bKeepEndin return aPaM; } -Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial ) +Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, bool bSpecial ) { DBG_ASSERT( GetUpdateMode(), "PaMtoEditCursor: GetUpdateMode()" ); @@ -887,7 +887,7 @@ Rectangle TextEngine::PaMtoEditCursor( const TextPaM& rPaM, sal_Bool bSpecial ) return aEditCursor; } -Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal_Bool bPreferPortionStart ) +Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, bool bSpecial, bool bPreferPortionStart ) { if ( !IsFormatted() && !IsFormatting() ) FormatAndUpdate(); @@ -940,16 +940,16 @@ Rectangle TextEngine::GetEditCursor( const TextPaM& rPaM, sal_Bool bSpecial, sal return aEditCursor; } -long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, sal_Bool bPreferPortionStart ) +long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex, bool bPreferPortionStart ) { DBG_ASSERT( ( nIndex >= pLine->GetStart() ) && ( nIndex <= pLine->GetEnd() ) , "ImpGetXPos: Bad parameters!" ); - sal_Bool bDoPreferPortionStart = bPreferPortionStart; + bool bDoPreferPortionStart = bPreferPortionStart; // Assure that the portion belongs to this line if ( nIndex == pLine->GetStart() ) - bDoPreferPortionStart = sal_True; + bDoPreferPortionStart = true; else if ( nIndex == pLine->GetEnd() ) - bDoPreferPortionStart = sal_False; + bDoPreferPortionStart = false; TEParaPortion* pParaPortion = mpTEParaPortions->GetObject( nPara ); @@ -985,7 +985,7 @@ long TextEngine::ImpGetXPos( sal_uLong nPara, TextLine* pLine, sal_uInt16 nIndex // nX += pNextPortion->GetWidth(); // End of the tab portion, use start of next for cursor pos DBG_ASSERT( !bPreferPortionStart, "ImpGetXPos: How can we get here!" ); - nX = ImpGetXPos( nPara, pLine, nIndex, sal_True ); + nX = ImpGetXPos( nPara, pLine, nIndex, true ); } } @@ -1039,9 +1039,9 @@ const TextCharAttrib* TextEngine::FindCharAttrib( const TextPaM& rPaM, sal_uInt1 return pAttr; } -sal_Bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const +bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const { - sal_Bool bAttr = sal_False; + bool bAttr = false; for ( sal_uLong n = mpDoc->GetNodes().Count(); --n && !bAttr; ) { TextNode* pNode = mpDoc->GetNodes().GetObject( n ); @@ -1050,7 +1050,7 @@ sal_Bool TextEngine::HasAttrib( sal_uInt16 nWhich ) const return bAttr; } -TextPaM TextEngine::GetPaM( const Point& rDocPos, sal_Bool bSmart ) +TextPaM TextEngine::GetPaM( const Point& rDocPos, bool bSmart ) { DBG_ASSERT( GetUpdateMode(), "GetPaM: GetUpdateMode()" ); @@ -1078,7 +1078,7 @@ TextPaM TextEngine::GetPaM( const Point& rDocPos, sal_Bool bSmart ) return TextPaM( nLastNode, pLast->GetText().getLength() ); } -sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, sal_Bool bSmart ) +sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara, bool bSmart ) { DBG_ASSERT( IsFormatted(), "GetPaM: Not formatted" ); TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion ); @@ -1112,7 +1112,7 @@ sal_uInt16 TextEngine::ImpFindIndex( sal_uLong nPortion, const Point& rPosInPara return nCurIndex; } -sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nXPos, sal_Bool ) +sal_uInt16 TextEngine::GetCharPos( sal_uLong nPortion, sal_uInt16 nLine, long nXPos, bool ) { TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPortion ); @@ -1327,7 +1327,7 @@ sal_uLong TextEngine::GetParagraphCount() const return mpDoc->GetNodes().Count(); } -void TextEngine::EnableUndo( sal_Bool bEnable ) +void TextEngine::EnableUndo( bool bEnable ) { // delete list when switching mode if ( bEnable != IsUndoEnabled() ) @@ -1358,7 +1358,7 @@ void TextEngine::UndoActionEnd() GetUndoManager().LeaveListAction(); } -void TextEngine::InsertUndo( TextUndo* pUndo, sal_Bool bTryMerge ) +void TextEngine::InsertUndo( TextUndo* pUndo, bool bTryMerge ) { DBG_ASSERT( !IsInUndo(), "InsertUndo: in Undo mode!" ); GetUndoManager().AddUndoAction( pUndo, bTryMerge ); @@ -1452,7 +1452,7 @@ void TextEngine::SeekCursor( sal_uLong nPara, sal_uInt16 nPos, Font& rFont, Outp const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); rFont.SetColor( rStyleSettings.GetHighlightTextColor() ); rFont.SetFillColor( rStyleSettings.GetHighlightColor() ); - rFont.SetTransparent( sal_False ); + rFont.SetTransparent( false ); } else if ( nAttr & EXTTEXTINPUT_ATTR_GRAYWAVELINE ) { @@ -1485,8 +1485,8 @@ void TextEngine::IdleFormatAndUpdate( TextView* pCurView, sal_uInt16 nMaxTimerRe void TextEngine::TextModified() { - mbFormatted = sal_False; - mbModified = sal_True; + mbFormatted = false; + mbModified = true; } void TextEngine::UpdateViews( TextView* pCurView ) @@ -1547,7 +1547,7 @@ void TextEngine::FormatFullDoc() sal_Int32 nLen = pTEParaPortion->GetNode()->GetText().getLength(); pTEParaPortion->MarkSelectionInvalid( 0, nLen ); } - mbFormatted = sal_False; + mbFormatted = false; FormatDoc(); } @@ -1556,8 +1556,8 @@ void TextEngine::FormatDoc() if ( IsFormatted() || !GetUpdateMode() || IsFormatting() ) return; - mbIsFormatting = sal_True; - mbHasMultiLineParas = sal_False; + mbIsFormatting = true; + mbHasMultiLineParas = false; long nY = 0; bool bGrow = false; @@ -1608,7 +1608,7 @@ void TextEngine::FormatDoc() } nY += CalcParaHeight( nPara ); if ( !mbHasMultiLineParas && pTEParaPortion->GetLines().size() > 1 ) - mbHasMultiLineParas = sal_True; + mbHasMultiLineParas = true; } if ( !maInvalidRect.IsEmpty() ) @@ -1630,13 +1630,13 @@ void TextEngine::FormatDoc() mnCurTextHeight = nNewHeight; if ( nDiff ) { - mbFormatted = sal_True; + mbFormatted = true; ImpTextHeightChanged(); } } - mbIsFormatting = sal_False; - mbFormatted = sal_True; + mbIsFormatting = false; + mbFormatted = true; ImpTextFormatted(); } @@ -2020,9 +2020,9 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan Font aFont; SeekCursor( nPara, nIndex+1, aFont, pOutDev ); if( bTransparent ) - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); else if ( pSelection ) - aFont.SetTransparent( sal_False ); + aFont.SetTransparent( false ); pOutDev->SetFont( aFont ); sal_uInt16 nTmpIndex = nIndex; @@ -2150,7 +2150,7 @@ void TextEngine::ImpPaint( OutputDevice* pOutDev, const Point& rStartPos, Rectan } } -sal_Bool TextEngine::CreateLines( sal_uLong nPara ) +bool TextEngine::CreateLines( sal_uLong nPara ) { // sal_Bool: changing Height of Paragraph Yes/No - sal_True/sal_False @@ -2501,10 +2501,10 @@ OUString TextEngine::GetWord( const TextPaM& rCursorPos, TextPaM* pStartOfWord ) return aWord; } -sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel ) +bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel ) { - sal_Bool bUpdate = GetUpdateMode(); - SetUpdateMode( sal_False ); + bool bUpdate = GetUpdateMode(); + SetUpdateMode( false ); UndoActionStart(); TextSelection aSel; @@ -2521,7 +2521,7 @@ sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel ) aSel = ImpDeleteText( aSel ); OString aLine; - sal_Bool bDone = rInput.ReadLine( aLine ); + bool bDone = rInput.ReadLine( aLine ); OUString aTmpStr(OStringToOUString(aLine, rInput.GetStreamCharSet())); while ( bDone ) { @@ -2546,7 +2546,7 @@ sal_Bool TextEngine::Read( SvStream& rInput, const TextSelection* pSel ) return rInput.GetError() ? sal_False : sal_True; } -sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bool bHTML ) +bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, bool bHTML ) { TextSelection aSel; if ( pSel ) @@ -2634,19 +2634,19 @@ sal_Bool TextEngine::Write( SvStream& rOutput, const TextSelection* pSel, sal_Bo return rOutput.GetError() ? sal_False : sal_True; } -void TextEngine::RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate ) +void TextEngine::RemoveAttribs( sal_uLong nPara, bool bIdleFormatAndUpdate ) { if ( nPara < mpDoc->GetNodes().Count() ) { TextNode* pNode = mpDoc->GetNodes().GetObject( nPara ); if ( pNode->GetCharAttribs().Count() ) { - pNode->GetCharAttribs().Clear( sal_True ); + pNode->GetCharAttribs().Clear( true ); TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() ); - mbFormatted = sal_False; + mbFormatted = false; if ( bIdleFormatAndUpdate ) IdleFormatAndUpdate( NULL, 0xFFFF ); @@ -2655,7 +2655,7 @@ void TextEngine::RemoveAttribs( sal_uLong nPara, sal_Bool bIdleFormatAndUpdate ) } } } -void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bIdleFormatAndUpdate ) +void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, bool bIdleFormatAndUpdate ) { if ( nPara < mpDoc->GetNodes().Count() ) { @@ -2671,7 +2671,7 @@ void TextEngine::RemoveAttribs( sal_uLong nPara, sal_uInt16 nWhich, sal_Bool bId } TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() ); - mbFormatted = sal_False; + mbFormatted = false; if(bIdleFormatAndUpdate) IdleFormatAndUpdate( NULL, 0xFFFF ); else @@ -2698,13 +2698,13 @@ void TextEngine::RemoveAttrib( sal_uLong nPara, const TextCharAttrib& rAttrib ) } TEParaPortion* pTEParaPortion = mpTEParaPortions->GetObject( nPara ); pTEParaPortion->MarkSelectionInvalid( 0, pNode->GetText().getLength() ); - mbFormatted = sal_False; + mbFormatted = false; FormatAndUpdate( NULL ); } } } -void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, sal_Bool bIdleFormatAndUpdate ) +void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 nStart, sal_uInt16 nEnd, bool bIdleFormatAndUpdate ) { // For now do not check if Attributes overlap! @@ -2726,7 +2726,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uLong nPara, sal_uInt16 pNode->GetCharAttribs().InsertAttrib( new TextCharAttrib( rAttr, nStart, nEnd ) ); pTEParaPortion->MarkSelectionInvalid( nStart, nEnd ); - mbFormatted = sal_False; + mbFormatted = false; if ( bIdleFormatAndUpdate ) IdleFormatAndUpdate( NULL, 0xFFFF ); else @@ -2932,7 +2932,7 @@ LocaleDataWrapper* TextEngine::ImpGetLocaleDataWrapper() return mpLocaleDataWrapper; } -void TextEngine::SetRightToLeft( sal_Bool bR2L ) +void TextEngine::SetRightToLeft( bool bR2L ) { if ( mbRightToLeft != bR2L ) { @@ -3084,7 +3084,7 @@ long TextEngine::ImpGetPortionXOffset( sal_uLong nPara, TextLine* pLine, sal_uIn return nX; } -void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, sal_Bool bDrawingR2LPortion ) +void TextEngine::ImpInitLayoutMode( OutputDevice* pOutDev, bool bDrawingR2LPortion ) { sal_uLong nLayoutMode = pOutDev->GetLayoutMode(); @@ -3113,7 +3113,7 @@ long TextEngine::ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt1 TEParaPortion* pPortion = mpTEParaPortions->GetObject( nPara ); sal_uInt16 nPortionStart; - sal_uInt16 nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, sal_True ); + sal_uInt16 nPortion = pPortion->GetTextPortions().FindPortion( nIndex, nPortionStart, true ); TETextPortion* pTextPortion = pPortion->GetTextPortions()[ nPortion ]; @@ -3134,7 +3134,7 @@ long TextEngine::ImpGetOutputOffset( sal_uLong nPara, TextLine* pLine, sal_uInt1 nX = ImpGetXPos( nPara, pLine, nIndex, nIndex == nPortionStart ); if ( nIndex2 != nIndex ) { - long nX2 = ImpGetXPos( nPara, pLine, nIndex2, sal_False ); + long nX2 = ImpGetXPos( nPara, pLine, nIndex2, false ); if ( ( !IsRightToLeft() && ( nX2 < nX ) ) || ( IsRightToLeft() && ( nX2 > nX ) ) ) { diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index 709b61b040db..6cd4f339d642 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -82,9 +82,9 @@ bool TextUndoManager::Undo() UndoRedoStart(); - mpTextEngine->SetIsInUndo( sal_True ); + mpTextEngine->SetIsInUndo( true ); bool bDone = SfxUndoManager::Undo(); - mpTextEngine->SetIsInUndo( sal_False ); + mpTextEngine->SetIsInUndo( false ); UndoRedoEnd(); @@ -99,9 +99,9 @@ bool TextUndoManager::Redo() UndoRedoStart(); - mpTextEngine->SetIsInUndo( sal_True ); + mpTextEngine->SetIsInUndo( true ); bool bDone = SfxUndoManager::Redo(); - mpTextEngine->SetIsInUndo( sal_False ); + mpTextEngine->SetIsInUndo( false ); UndoRedoEnd(); diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 1f43143bba78..969e5898d29a 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -166,36 +166,36 @@ struct ImpTextView sal_uInt16 mnTravelXPos; - sal_Bool mbAutoScroll : 1; - sal_Bool mbInsertMode : 1; - sal_Bool mbReadOnly : 1; - sal_Bool mbPaintSelection : 1; - sal_Bool mbAutoIndent : 1; - sal_Bool mbHighlightSelection : 1; - sal_Bool mbCursorEnabled : 1; - sal_Bool mbClickedInSelection : 1; - sal_Bool mbSupportProtectAttribute : 1; + bool mbAutoScroll : 1; + bool mbInsertMode : 1; + bool mbReadOnly : 1; + bool mbPaintSelection : 1; + bool mbAutoIndent : 1; + bool mbHighlightSelection : 1; + bool mbCursorEnabled : 1; + bool mbClickedInSelection : 1; + bool mbSupportProtectAttribute : 1; bool mbCursorAtEndOfLine; }; TextView::TextView( TextEngine* pEng, Window* pWindow ) : mpImpl(new ImpTextView) { - pWindow->EnableRTL( sal_False ); + pWindow->EnableRTL( false ); mpImpl->mpWindow = pWindow; mpImpl->mpTextEngine = pEng; mpImpl->mpVirtDev = NULL; - mpImpl->mbPaintSelection = sal_True; - mpImpl->mbAutoScroll = sal_True; - mpImpl->mbInsertMode = sal_True; - mpImpl->mbReadOnly = sal_False; - mpImpl->mbHighlightSelection = sal_False; - mpImpl->mbAutoIndent = sal_False; - mpImpl->mbCursorEnabled = sal_True; - mpImpl->mbClickedInSelection = sal_False; - mpImpl->mbSupportProtectAttribute = sal_False; + mpImpl->mbPaintSelection = true; + mpImpl->mbAutoScroll = true; + mpImpl->mbInsertMode = true; + mpImpl->mbReadOnly = false; + mpImpl->mbHighlightSelection = false; + mpImpl->mbAutoIndent = false; + mpImpl->mbCursorEnabled = true; + mpImpl->mbClickedInSelection = false; + mpImpl->mbSupportProtectAttribute = false; mpImpl->mbCursorAtEndOfLine = false; // mbInSelection = sal_False; @@ -204,7 +204,7 @@ TextView::TextView( TextEngine* pEng, Window* pWindow ) : mpImpl->mpSelFuncSet = new TextSelFunctionSet( this ); mpImpl->mpSelEngine = new SelectionEngine( mpImpl->mpWindow, mpImpl->mpSelFuncSet ); mpImpl->mpSelEngine->SetSelectionMode( RANGE_SELECTION ); - mpImpl->mpSelEngine->EnableDrag( sal_True ); + mpImpl->mpSelEngine->EnableDrag( true ); mpImpl->mpCursor = new Cursor; mpImpl->mpCursor->Show(); @@ -212,7 +212,7 @@ TextView::TextView( TextEngine* pEng, Window* pWindow ) : pWindow->SetInputContext( InputContext( pEng->GetFont(), INPUTCONTEXT_TEXT|INPUTCONTEXT_EXTTEXTINPUT ) ); if ( pWindow->GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_INVERT ) - mpImpl->mbHighlightSelection = sal_True; + mpImpl->mbHighlightSelection = true; pWindow->SetLineColor(); @@ -250,7 +250,7 @@ void TextView::Invalidate() mpImpl->mpWindow->Invalidate(); } -void TextView::SetSelection( const TextSelection& rTextSel, sal_Bool bGotoCursor ) +void TextView::SetSelection( const TextSelection& rTextSel, bool bGotoCursor ) { // if someone left an empty attribute and then the Outliner manipulated the selection if ( !mpImpl->maSelection.HasRange() ) @@ -319,10 +319,10 @@ void TextView::ImpPaint( OutputDevice* pOut, const Point& rStartPos, Rectangle c void TextView::Paint( const Rectangle& rRect ) { - ImpPaint( rRect, sal_False ); + ImpPaint( rRect, false ); } -void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev ) +void TextView::ImpPaint( const Rectangle& rRect, bool bUseVirtDev ) { if ( !mpImpl->mpTextEngine->GetUpdateMode() || mpImpl->mpTextEngine->IsInUndo() ) return; @@ -341,7 +341,7 @@ void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev ) if ( pVDev->GetBackground().GetColor() != rBackgroundColor ) pVDev->SetBackground( rBackgroundColor ); - sal_Bool bVDevValid = sal_True; + bool bVDevValid = true; Size aOutSz( pVDev->GetOutputSizePixel() ); if ( ( aOutSz.Width() < rRect.GetWidth() ) || ( aOutSz.Height() < rRect.GetHeight() ) ) @@ -364,7 +364,7 @@ void TextView::ImpPaint( const Rectangle& rRect, sal_Bool bUseVirtDev ) } if ( !bVDevValid ) { - ImpPaint( rRect, sal_False /* without VDev */ ); + ImpPaint( rRect, false /* without VDev */ ); return; } @@ -413,9 +413,9 @@ void TextView::ImpHighlight( const TextSelection& rSel ) sal_uInt16 nStartLine = 0; sal_uInt16 nEndLine = pTEParaPortion->GetLines().size() -1; if ( nPara == nStartPara ) - nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), sal_False ); + nStartLine = pTEParaPortion->GetLineNumber( aSel.GetStart().GetIndex(), false ); if ( nPara == nEndPara ) - nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), sal_True ); + nEndLine = pTEParaPortion->GetLineNumber( aSel.GetEnd().GetIndex(), true ); // iterate over all lines for ( sal_uInt16 nLine = nStartLine; nLine <= nEndLine; nLine++ ) @@ -432,12 +432,12 @@ void TextView::ImpHighlight( const TextSelection& rSel ) if ( nEndIndex < nStartIndex ) nEndIndex = nStartIndex; - Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), sal_False ) ); + Rectangle aTmpRect( mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nStartIndex ), false ) ); aTmpRect.Top() += nY; aTmpRect.Bottom() += nY; Point aTopLeft( aTmpRect.TopLeft() ); - aTmpRect = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), sal_True ); + aTmpRect = mpImpl->mpTextEngine->GetEditCursor( TextPaM( nPara, nEndIndex ), true ); aTmpRect.Top() += nY; aTmpRect.Bottom() += nY; Point aBottomRight( aTmpRect.BottomRight() ); @@ -487,20 +487,20 @@ void TextView::ImpSetSelection( const TextSelection& rSelection ) void TextView::ShowSelection() { - ImpShowHideSelection( sal_True ); + ImpShowHideSelection( true ); } void TextView::HideSelection() { - ImpShowHideSelection( sal_False ); + ImpShowHideSelection( false ); } void TextView::ShowSelection( const TextSelection& rRange ) { - ImpShowHideSelection( sal_True, &rRange ); + ImpShowHideSelection( true, &rRange ); } -void TextView::ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange ) +void TextView::ImpShowHideSelection( bool bShow, const TextSelection* pRange ) { const TextSelection* pRangeOrSelection = pRange ? pRange : &mpImpl->maSelection; @@ -520,7 +520,7 @@ void TextView::ImpShowHideSelection( sal_Bool bShow, const TextSelection* pRange Point aStartPos( ImpGetOutputStartPos( mpImpl->maStartDocPos ) ); TextSelection aRange( *pRangeOrSelection ); aRange.Justify(); - sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible(); + bool bVisCursor = mpImpl->mpCursor->IsVisible(); mpImpl->mpCursor->Hide(); ImpPaint( mpImpl->mpWindow, aStartPos, &aOutArea, &aRange, bShow ? &mpImpl->maSelection : NULL ); if ( bVisCursor ) @@ -546,19 +546,19 @@ void TextView::EraseVirtualDevice() mpImpl->mpVirtDev = 0; } -sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) +bool TextView::KeyInput( const KeyEvent& rKeyEvent ) { - sal_Bool bDone = sal_True; + bool bDone = true; bool bModified = false; bool bMoved = false; - sal_Bool bEndKey = sal_False; // special CursorPosition + bool bEndKey = false; // special CursorPosition bool bAllowIdle = true; // check mModified; // the local bModified is not set e.g. by Cut/Paste, as here // the update happens somewhere else - sal_Bool bWasModified = mpImpl->mpTextEngine->IsModified(); - mpImpl->mpTextEngine->SetModified( sal_False ); + bool bWasModified = mpImpl->mpTextEngine->IsModified(); + mpImpl->mpTextEngine->SetModified( false ); TextSelection aCurSel( mpImpl->maSelection ); TextSelection aOldSel( aCurSel ); @@ -642,10 +642,10 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) } bMoved = true; if ( nCode == KEY_END ) - bEndKey = sal_True; + bEndKey = true; } else - bDone = sal_False; + bDone = false; } break; case KEY_BACKSPACE: @@ -710,7 +710,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) bAllowIdle = false; } else - bDone = sal_False; + bDone = false; } break; case KEY_TAB: @@ -723,7 +723,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) bModified = true; } else - bDone = sal_False; + bDone = false; } break; case KEY_RETURN: @@ -752,7 +752,7 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) bModified = true; } else - bDone = sal_False; + bDone = false; } break; case KEY_INSERT: @@ -768,12 +768,12 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) sal_Unicode nCharCode = rKeyEvent.GetCharCode(); if ( !mpImpl->mbReadOnly && ImplCheckTextLen( OUString(nCharCode) ) ) // otherwise swallow the character anyway { - aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), sal_True ); + aCurSel = mpImpl->mpTextEngine->ImpInsertText( nCharCode, aCurSel, !IsInsertMode(), true ); bModified = true; } } else - bDone = sal_False; + bDone = false; } } } @@ -797,20 +797,20 @@ sal_Bool TextView::KeyInput( const KeyEvent& rKeyEvent ) else if ( bMoved ) { // selection is painted now in ImpMoveCursor - ImpShowCursor( mpImpl->mbAutoScroll, sal_True, bEndKey ); + ImpShowCursor( mpImpl->mbAutoScroll, true, bEndKey ); } if ( mpImpl->mpTextEngine->IsModified() ) mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); else if ( bWasModified ) - mpImpl->mpTextEngine->SetModified( sal_True ); + mpImpl->mpTextEngine->SetModified( true ); return bDone; } void TextView::MouseButtonUp( const MouseEvent& rMouseEvent ) { - mpImpl->mbClickedInSelection = sal_False; + mpImpl->mbClickedInSelection = false; mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW; mpImpl->mpSelEngine->SelMouseButtonUp( rMouseEvent ); if ( rMouseEvent.IsMiddle() && !IsReadOnly() && @@ -888,7 +888,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent ) } ImpSetSelection( aNewSel ); ShowSelection(); - ShowCursor( sal_True, sal_True ); + ShowCursor( true, true ); } } else if ( rMouseEvent.GetClicks() == 3 ) @@ -902,7 +902,7 @@ void TextView::MouseButtonDown( const MouseEvent& rMouseEvent ) aNewSel.GetEnd().GetIndex() = mpImpl->mpTextEngine->mpDoc->GetNodes().GetObject( mpImpl->maSelection.GetEnd().GetPara() )->GetText().getLength(); ImpSetSelection( aNewSel ); ShowSelection(); - ShowCursor( sal_True, sal_True ); + ShowCursor( true, true ); } } } @@ -936,7 +936,7 @@ void TextView::Command( const CommandEvent& rCEvt ) TEParaPortion* pPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetPara() ); pPortion->MarkSelectionInvalid( mpImpl->mpTextEngine->mpIMEInfos->aPos.GetIndex(), 0 ); - sal_Bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite; + bool bInsertMode = !mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite; delete mpImpl->mpTextEngine->mpIMEInfos; mpImpl->mpTextEngine->mpIMEInfos = NULL; @@ -1032,7 +1032,7 @@ void TextView::Command( const CommandEvent& rCEvt ) mpImpl->mpTextEngine->FormatDoc(); TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() ); - sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True ); + sal_uInt16 nLine = pParaPortion->GetLineNumber( aPaM.GetIndex(), true ); TextLine* pLine = pParaPortion->GetLines()[ nLine ]; if ( pLine && ( nInputEnd > pLine->GetEnd() ) ) nInputEnd = pLine->GetEnd(); @@ -1053,12 +1053,12 @@ void TextView::Command( const CommandEvent& rCEvt ) } } -void TextView::ShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor ) +void TextView::ShowCursor( bool bGotoCursor, bool bForceVisCursor ) { // this setting has more weight if ( !mpImpl->mbAutoScroll ) - bGotoCursor = sal_False; - ImpShowCursor( bGotoCursor, bForceVisCursor, sal_False ); + bGotoCursor = false; + ImpShowCursor( bGotoCursor, bForceVisCursor, false ); } void TextView::HideCursor() @@ -1090,7 +1090,7 @@ void TextView::Scroll( long ndX, long ndY ) if ( nDiffX || nDiffY ) { - sal_Bool bVisCursor = mpImpl->mpCursor->IsVisible(); + bool bVisCursor = mpImpl->mpCursor->IsVisible(); mpImpl->mpCursor->Hide(); mpImpl->mpWindow->Update(); mpImpl->maStartDocPos = aNewStartPos; @@ -1134,7 +1134,7 @@ void TextView::Copy( uno::Reference< datatransfer::clipboard::XClipboard >& rxCl TETextDataObject* pDataObj = new TETextDataObject( GetSelected() ); if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // then also as HTML - mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True ); + mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, true ); const sal_uInt32 nRef = Application::ReleaseSolarMutex(); @@ -1192,7 +1192,7 @@ void TextView::Paste( uno::Reference< datatransfer::clipboard::XClipboard >& rxC bool bWasTruncated = false; if( mpImpl->mpTextEngine->GetMaxTextLen() != 0 ) bWasTruncated = ImplTruncateNewText( aText ); - InsertText( aText, sal_False ); + InsertText( aText, false ); mpImpl->mpTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); if( bWasTruncated ) @@ -1222,22 +1222,22 @@ OUString TextView::GetSelected( LineEnd aSeparator ) return mpImpl->mpTextEngine->GetText( mpImpl->maSelection, aSeparator ); } -void TextView::SetInsertMode( sal_Bool bInsert ) +void TextView::SetInsertMode( bool bInsert ) { if ( mpImpl->mbInsertMode != bInsert ) { mpImpl->mbInsertMode = bInsert; - ShowCursor( mpImpl->mbAutoScroll, sal_False ); + ShowCursor( mpImpl->mbAutoScroll, false ); } } -void TextView::SetReadOnly( sal_Bool bReadOnly ) +void TextView::SetReadOnly( bool bReadOnly ) { if ( mpImpl->mbReadOnly != bReadOnly ) { mpImpl->mbReadOnly = bReadOnly; if ( !mpImpl->mbReadOnly ) - ShowCursor( mpImpl->mbAutoScroll, sal_False ); + ShowCursor( mpImpl->mbAutoScroll, false ); else HideCursor(); @@ -1348,7 +1348,7 @@ TextSelection TextView::ImpMoveCursor( const KeyEvent& rKeyEvent ) return mpImpl->maSelection; } -void TextView::InsertText( const OUString& rStr, sal_Bool bSelect ) +void TextView::InsertText( const OUString& rStr, bool bSelect ) { mpImpl->mpTextEngine->UndoActionStart(); @@ -1531,14 +1531,14 @@ TextPaM TextView::CursorUp( const TextPaM& rPaM ) long nX; if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW ) { - nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left(); + nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, false ).Left(); mpImpl->mnTravelXPos = (sal_uInt16)nX+1; } else nX = mpImpl->mnTravelXPos; TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() ); - sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), false ); if ( nLine ) // same paragraph { sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine-1, nX ); @@ -1569,14 +1569,14 @@ TextPaM TextView::CursorDown( const TextPaM& rPaM ) long nX; if ( mpImpl->mnTravelXPos == TRAVEL_X_DONTKNOW ) { - nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, sal_False ).Left(); + nX = mpImpl->mpTextEngine->GetEditCursor( rPaM, false ).Left(); mpImpl->mnTravelXPos = (sal_uInt16)nX+1; } else nX = mpImpl->mnTravelXPos; TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() ); - sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pPPortion->GetLineNumber( rPaM.GetIndex(), false ); if ( nLine < ( pPPortion->GetLines().size() - 1 ) ) { sal_uInt16 nCharPos = mpImpl->mpTextEngine->GetCharPos( rPaM.GetPara(), nLine+1, nX ); @@ -1606,7 +1606,7 @@ TextPaM TextView::CursorStartOfLine( const TextPaM& rPaM ) TextPaM aPaM( rPaM ); TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() ); - sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), false ); TextLine* pLine = pPPortion->GetLines()[ nLine ]; aPaM.GetIndex() = pLine->GetStart(); @@ -1618,7 +1618,7 @@ TextPaM TextView::CursorEndOfLine( const TextPaM& rPaM ) TextPaM aPaM( rPaM ); TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( rPaM.GetPara() ); - sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False ); + sal_uInt16 nLine = pPPortion->GetLineNumber( aPaM.GetIndex(), false ); TextLine* pLine = pPPortion->GetLines()[ nLine ]; aPaM.GetIndex() = pLine->GetEnd(); @@ -1692,11 +1692,11 @@ TextPaM TextView::PageDown( const TextPaM& rPaM ) return aPaM; } -void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sal_Bool bSpecial ) +void TextView::ImpShowCursor( bool bGotoCursor, bool bForceVisCursor, bool bSpecial ) { if ( mpImpl->mpTextEngine->IsFormatting() ) return; - if ( mpImpl->mpTextEngine->GetUpdateMode() == sal_False ) + if ( !mpImpl->mpTextEngine->GetUpdateMode() ) return; if ( mpImpl->mpTextEngine->IsInUndo() ) return; @@ -1715,7 +1715,7 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa { TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() ); mpImpl->mbCursorAtEndOfLine = - pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_True ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), sal_False ); + pParaPortion->GetLineNumber( aPaM.GetIndex(), true ) != pParaPortion->GetLineNumber( aPaM.GetIndex(), false ); } if ( !IsInsertMode() && !mpImpl->maSelection.HasRange() ) @@ -1724,12 +1724,12 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa if ( !pNode->GetText().isEmpty() && ( aPaM.GetIndex() < pNode->GetText().getLength() ) ) { // If we are behind a portion, and the next portion has other direction, we must change position... - aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, sal_False, sal_True ).Left(); + aEditCursor.Left() = aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aPaM, false, true ).Left(); TEParaPortion* pParaPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() ); sal_uInt16 nTextPortionStart = 0; - sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, sal_True ); + sal_uInt16 nTextPortion = pParaPortion->GetTextPortions().FindPortion( aPaM.GetIndex(), nTextPortionStart, true ); TETextPortion* pTextPortion = pParaPortion->GetTextPortions()[ nTextPortion ]; if ( pTextPortion->GetKind() == PORTIONKIND_TAB ) { @@ -1742,7 +1742,7 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa else { TextPaM aNext = CursorRight( TextPaM( aPaM.GetPara(), aPaM.GetIndex() ), (sal_uInt16)i18n::CharacterIteratorMode::SKIPCELL ); - aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, sal_True ).Left(); + aEditCursor.Right() = mpImpl->mpTextEngine->GetEditCursor( aNext, true ).Left(); } } } @@ -1829,7 +1829,7 @@ void TextView::ImpShowCursor( sal_Bool bGotoCursor, sal_Bool bForceVisCursor, sa mpImpl->mpCursor->Show(); } -sal_Bool TextView::SetCursorAtPoint( const Point& rPosPixel ) +bool TextView::SetCursorAtPoint( const Point& rPosPixel ) { mpImpl->mpTextEngine->CheckIdleFormatter(); @@ -1855,18 +1855,18 @@ sal_Bool TextView::SetCursorAtPoint( const Point& rPosPixel ) ShowSelection( aTmpNewSel ); } - sal_Bool bForceCursor = mpImpl->mpDDInfo ? sal_False : sal_True; // && !mbInSelection - ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, sal_False ); - return sal_True; + bool bForceCursor = mpImpl->mpDDInfo ? sal_False : sal_True; // && !mbInSelection + ImpShowCursor( mpImpl->mbAutoScroll, bForceCursor, false ); + return true; } -sal_Bool TextView::IsSelectionAtPoint( const Point& rPosPixel ) +bool TextView::IsSelectionAtPoint( const Point& rPosPixel ) { // if ( !Rectangle( Point(), mpImpl->mpWindow->GetOutputSizePixel() ).IsInside( rPosPixel ) && !mbInSelection ) // return sal_False; Point aDocPos = GetDocPos( rPosPixel ); - TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, sal_False ); + TextPaM aPaM = mpImpl->mpTextEngine->GetPaM( aDocPos, false ); // For Hyperlinks D&D also start w/o a selection. // BeginDrag is only called, however, if IsSelectionAtPoint() // Problem: IsSelectionAtPoint is not called by Command() @@ -1875,7 +1875,7 @@ sal_Bool TextView::IsSelectionAtPoint( const Point& rPosPixel ) ( /* mpImpl->mpSelEngine->IsInCommand() && */ mpImpl->mpTextEngine->FindAttrib( aPaM, TEXTATTR_HYPERLINK ) ) ); } -sal_Bool TextView::IsInSelection( const TextPaM& rPaM ) +bool TextView::IsInSelection( const TextPaM& rPaM ) { TextSelection aSel = mpImpl->maSelection; aSel.Justify(); @@ -1885,20 +1885,20 @@ sal_Bool TextView::IsInSelection( const TextPaM& rPaM ) sal_uLong nCurNode = rPaM.GetPara(); if ( ( nCurNode > nStartNode ) && ( nCurNode < nEndNode ) ) - return sal_True; + return true; if ( nStartNode == nEndNode ) { if ( nCurNode == nStartNode ) if ( ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) ) - return sal_True; + return true; } else if ( ( nCurNode == nStartNode ) && ( rPaM.GetIndex() >= aSel.GetStart().GetIndex() ) ) - return sal_True; + return true; else if ( ( nCurNode == nEndNode ) && ( rPaM.GetIndex() < aSel.GetEnd().GetIndex() ) ) - return sal_True; + return true; - return sal_False; + return false; } void TextView::ImpHideDDCursor() @@ -1906,7 +1906,7 @@ void TextView::ImpHideDDCursor() if ( mpImpl->mpDDInfo && mpImpl->mpDDInfo->mbVisCursor ) { mpImpl->mpDDInfo->maCursor.Hide(); - mpImpl->mpDDInfo->mbVisCursor = sal_False; + mpImpl->mpDDInfo->mbVisCursor = false; } } @@ -1914,7 +1914,7 @@ void TextView::ImpShowDDCursor() { if ( !mpImpl->mpDDInfo->mbVisCursor ) { - Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, sal_True ); + Rectangle aCursor = mpImpl->mpTextEngine->PaMtoEditCursor( mpImpl->mpDDInfo->maDropPos, true ); aCursor.Right()++; aCursor.SetPos( GetWindowPos( aCursor.TopLeft() ) ); @@ -1922,11 +1922,11 @@ void TextView::ImpShowDDCursor() mpImpl->mpDDInfo->maCursor.SetPos( aCursor.TopLeft() ); mpImpl->mpDDInfo->maCursor.SetSize( aCursor.GetSize() ); mpImpl->mpDDInfo->maCursor.Show(); - mpImpl->mpDDInfo->mbVisCursor = sal_True; + mpImpl->mpDDInfo->mbVisCursor = true; } } -void TextView::SetPaintSelection( sal_Bool bPaint ) +void TextView::SetPaintSelection( bool bPaint ) { if ( bPaint != mpImpl->mbPaintSelection ) { @@ -1935,9 +1935,9 @@ void TextView::SetPaintSelection( sal_Bool bPaint ) } } -sal_Bool TextView::Read( SvStream& rInput ) +bool TextView::Read( SvStream& rInput ) { - sal_Bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection ); + bool bDone = mpImpl->mpTextEngine->Read( rInput, &mpImpl->maSelection ); ShowCursor(); return bDone; } @@ -1968,9 +1968,9 @@ bool TextView::ImplTruncateNewText( OUString& rNewText ) const return bTruncated; } -sal_Bool TextView::ImplCheckTextLen( const OUString& rNewText ) +bool TextView::ImplCheckTextLen( const OUString& rNewText ) { - sal_Bool bOK = sal_True; + bool bOK = true; if ( mpImpl->mpTextEngine->GetMaxTextLen() ) { sal_uLong n = mpImpl->mpTextEngine->GetTextLen(); @@ -1980,7 +1980,7 @@ sal_Bool TextView::ImplCheckTextLen( const OUString& rNewText ) // calculate how much text is being deleted n -= mpImpl->mpTextEngine->GetTextLen( mpImpl->maSelection ); if ( n > mpImpl->mpTextEngine->GetMaxTextLen() ) - bOK = sal_False; + bOK = false; } } return bOK; @@ -1996,12 +1996,12 @@ void TextView::dragGestureRecognized( const ::com::sun::star::datatransfer::dnd: delete mpImpl->mpDDInfo; mpImpl->mpDDInfo = new TextDDInfo; - mpImpl->mpDDInfo->mbStarterOfDD = sal_True; + mpImpl->mpDDInfo->mbStarterOfDD = true; TETextDataObject* pDataObj = new TETextDataObject( GetSelected() ); if ( mpImpl->mpTextEngine->HasAttrib( TEXTATTR_HYPERLINK ) ) // then also as HTML - mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, sal_True ); + mpImpl->mpTextEngine->Write( pDataObj->GetHTMLStream(), &mpImpl->maSelection, true ); /* @@ -2045,7 +2045,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv { SolarMutexGuard aVclGuard; - sal_Bool bChanges = sal_False; + bool bChanges = false; if ( !mpImpl->mbReadOnly && mpImpl->mpDDInfo ) { ImpHideDDCursor(); @@ -2056,7 +2056,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv sal_uLong nPrevParaCount = mpImpl->mpTextEngine->GetParagraphCount(); sal_uInt16 nPrevStartParaLen = mpImpl->mpTextEngine->GetTextLen( aPrevSel.GetStart().GetPara() ); - sal_Bool bStarterOfDD = sal_False; + bool bStarterOfDD = false; for ( sal_uInt16 nView = mpImpl->mpTextEngine->GetViewCount(); nView && !bStarterOfDD; ) bStarterOfDD = mpImpl->mpTextEngine->GetView( --nView )->mpImpl->mpDDInfo ? mpImpl->mpTextEngine->GetView( nView )->mpImpl->mpDDInfo->mbStarterOfDD : sal_False; @@ -2091,7 +2091,7 @@ void TextView::drop( const ::com::sun::star::datatransfer::dnd::DropTargetDropEv mpImpl->mpTextEngine->SetAttrib( TextAttribProtect(), aTempStart.GetPara(), aTempStart.GetIndex(), - mpImpl->maSelection.GetEnd().GetIndex(), sal_False ); + mpImpl->maSelection.GetEnd().GetIndex(), false ); } if ( aPrevSel.HasRange() && @@ -2263,7 +2263,7 @@ sal_Int32 TextView::GetLineNumberOfCursorInSelection() const { TextPaM aPaM = GetSelection().GetEnd(); TEParaPortion* pPPortion = mpImpl->mpTextEngine->mpTEParaPortions->GetObject( aPaM.GetPara() ); - nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), sal_False ); + nLineNo = pPPortion->GetLineNumber( aPaM.GetIndex(), false ); if( mpImpl->mbCursorAtEndOfLine ) --nLineNo; } @@ -2294,12 +2294,12 @@ void TextSelFunctionSet::CreateAnchor() mpView->ImpSetSelection( mpView->mpImpl->maSelection.GetEnd() ); } -sal_Bool TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool ) +bool TextSelFunctionSet::SetCursorAtPoint( const Point& rPointPixel, sal_Bool ) { return mpView->SetCursorAtPoint( rPointPixel ); } -sal_Bool TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) +bool TextSelFunctionSet::IsSelectionAtPoint( const Point& rPointPixel ) { return mpView->IsSelectionAtPoint( rPointPixel ); } @@ -2322,27 +2322,27 @@ TextEngine* TextView::GetTextEngine() const { return mpImpl->mpTextEngine; } Window* TextView::GetWindow() const { return mpImpl->mpWindow; } -void TextView::EnableCursor( sal_Bool bEnable ) +void TextView::EnableCursor( bool bEnable ) { mpImpl->mbCursorEnabled = bEnable; } -sal_Bool TextView::IsCursorEnabled() const +bool TextView::IsCursorEnabled() const { return mpImpl->mbCursorEnabled; } void TextView::SetStartDocPos( const Point& rPos ) { mpImpl->maStartDocPos = rPos; } const Point& TextView::GetStartDocPos() const { return mpImpl->maStartDocPos; } -void TextView::SetAutoIndentMode( sal_Bool bAutoIndent ) +void TextView::SetAutoIndentMode( bool bAutoIndent ) { mpImpl->mbAutoIndent = bAutoIndent; } -sal_Bool TextView::IsReadOnly() const +bool TextView::IsReadOnly() const { return mpImpl->mbReadOnly; } -void TextView::SetAutoScroll( sal_Bool bAutoScroll ) +void TextView::SetAutoScroll( bool bAutoScroll ) { mpImpl->mbAutoScroll = bAutoScroll; } -sal_Bool TextView::IsAutoScroll() const +bool TextView::IsAutoScroll() const { return mpImpl->mbAutoScroll; } -sal_Bool TextView::HasSelection() const +bool TextView::HasSelection() const { return mpImpl->maSelection.HasRange(); } -sal_Bool TextView::IsInsertMode() const +bool TextView::IsInsertMode() const { return mpImpl->mbInsertMode; } -void TextView::SupportProtectAttribute(sal_Bool bSupport) +void TextView::SupportProtectAttribute(bool bSupport) { mpImpl->mbSupportProtectAttribute = bSupport;} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/edit/vclmedit.cxx b/vcl/source/edit/vclmedit.cxx index 2c616175a0d0..ea5237903c38 100644 --- a/vcl/source/edit/vclmedit.cxx +++ b/vcl/source/edit/vclmedit.cxx @@ -107,18 +107,18 @@ public: ImpVclMEdit( VclMultiLineEdit* pVclMultiLineEdit, WinBits nWinStyle ); ~ImpVclMEdit(); - void SetModified( sal_Bool bMod ); - sal_Bool IsModified() const; + void SetModified( bool bMod ); + bool IsModified() const; - void SetReadOnly( sal_Bool bRdOnly ); - sal_Bool IsReadOnly() const; + void SetReadOnly( bool bRdOnly ); + bool IsReadOnly() const; void SetMaxTextLen(sal_Int32 nLen); sal_Int32 GetMaxTextLen() const; void SetMaxTextWidth( sal_uLong nMaxWidth ); - sal_Bool IsInsertMode() const; + bool IsInsertMode() const; void InsertText( const OUString& rStr ); OUString GetSelected() const; @@ -139,9 +139,9 @@ public: void Resize(); void GetFocus(); - sal_Bool HandleCommand( const CommandEvent& rCEvt ); + bool HandleCommand( const CommandEvent& rCEvt ); - void Enable( sal_Bool bEnable ); + void Enable( bool bEnable ); Size CalcMinimumSize() const; Size CalcBlockSize( sal_uInt16 nColumns, sal_uInt16 nLines ) const; @@ -247,9 +247,9 @@ void ImpVclMEdit::InitFromStyle( WinBits nWinStyle ) mpTextWindow->SetAutoFocusHide( true ); if ( nWinStyle & WB_READONLY ) - mpTextWindow->GetTextView()->SetReadOnly( sal_True ); + mpTextWindow->GetTextView()->SetReadOnly( true ); else - mpTextWindow->GetTextView()->SetReadOnly( sal_False ); + mpTextWindow->GetTextView()->SetReadOnly( false ); if ( nWinStyle & WB_IGNORETAB ) { @@ -345,7 +345,7 @@ IMPL_LINK( ImpVclMEdit, ScrollHdl, ScrollBar*, pCurScrollBar ) void ImpVclMEdit::SetAlign( WinBits nWinStyle ) { - sal_Bool bRTL = Application::GetSettings().GetLayoutRTL(); + bool bRTL = Application::GetSettings().GetLayoutRTL(); mpTextWindow->GetTextEngine()->SetRightToLeft( bRTL ); if ( nWinStyle & WB_CENTER ) @@ -356,23 +356,23 @@ void ImpVclMEdit::SetAlign( WinBits nWinStyle ) mpTextWindow->GetTextEngine()->SetTextAlign( !bRTL ? TXTALIGN_LEFT : TXTALIGN_RIGHT ); } -void ImpVclMEdit::SetModified( sal_Bool bMod ) +void ImpVclMEdit::SetModified( bool bMod ) { mpTextWindow->GetTextEngine()->SetModified( bMod ); } -sal_Bool ImpVclMEdit::IsModified() const +bool ImpVclMEdit::IsModified() const { return mpTextWindow->GetTextEngine()->IsModified(); } -void ImpVclMEdit::SetReadOnly( sal_Bool bRdOnly ) +void ImpVclMEdit::SetReadOnly( bool bRdOnly ) { mpTextWindow->GetTextView()->SetReadOnly( bRdOnly ); // TODO: Adjust color? } -sal_Bool ImpVclMEdit::IsReadOnly() const +bool ImpVclMEdit::IsReadOnly() const { return mpTextWindow->GetTextView()->IsReadOnly(); } @@ -493,10 +493,10 @@ void ImpVclMEdit::Paste() void ImpVclMEdit::SetText( const OUString& rStr ) { - sal_Bool bWasModified = mpTextWindow->GetTextEngine()->IsModified(); + bool bWasModified = mpTextWindow->GetTextEngine()->IsModified(); mpTextWindow->GetTextEngine()->SetText( rStr ); if ( !bWasModified ) - mpTextWindow->GetTextEngine()->SetModified( sal_False ); + mpTextWindow->GetTextEngine()->SetModified( false ); mpTextWindow->GetTextView()->SetSelection( TextSelection() ); @@ -691,7 +691,7 @@ void ImpVclMEdit::GetMaxVisColumnsAndLines( sal_uInt16& rnCols, sal_uInt16& rnLi rnLines = (sal_uInt16) (aOutSz.Height()/aCharSz.Height()); } -void ImpVclMEdit::Enable( sal_Bool bEnable ) +void ImpVclMEdit::Enable( bool bEnable ) { mpTextWindow->Enable( bEnable ); if ( mpHScrollBar ) @@ -700,15 +700,15 @@ void ImpVclMEdit::Enable( sal_Bool bEnable ) mpVScrollBar->Enable( bEnable ); } -sal_Bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt ) +bool ImpVclMEdit::HandleCommand( const CommandEvent& rCEvt ) { - sal_Bool bDone = sal_False; + bool bDone = false; if ( ( rCEvt.GetCommand() == COMMAND_WHEEL ) || ( rCEvt.GetCommand() == COMMAND_STARTAUTOSCROLL ) || ( rCEvt.GetCommand() == COMMAND_AUTOSCROLL ) ) { mpTextWindow->HandleScrollCommand( rCEvt, mpHScrollBar, mpVScrollBar ); - bDone = sal_True; + bDone = true; } return bDone; } @@ -732,7 +732,7 @@ TextWindow::TextWindow( Window* pParent ) : Window( pParent ) mpExtTextEngine->SetLocale( GetSettings().GetLanguageTag().getLocale() ); mpExtTextView = new ExtTextView( mpExtTextEngine, this ); mpExtTextEngine->InsertView( mpExtTextView ); - mpExtTextEngine->EnableUndo( sal_True ); + mpExtTextEngine->EnableUndo( true ); mpExtTextView->ShowCursor(); Color aBackgroundColor = GetSettings().GetStyleSettings().GetWorkspaceColor(); @@ -772,14 +772,14 @@ void TextWindow::MouseButtonUp( const MouseEvent& rMEvt ) void TextWindow::KeyInput( const KeyEvent& rKEvent ) { - sal_Bool bDone = sal_False; + bool bDone = false; sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); if ( nCode == com::sun::star::awt::Key::SELECT_ALL || ( (nCode == KEY_A) && rKEvent.GetKeyCode().IsMod1() && !rKEvent.GetKeyCode().IsMod2() ) ) { mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) ); - bDone = sal_True; + bDone = true; } else if ( (nCode == KEY_S) && rKEvent.GetKeyCode().IsShift() && rKEvent.GetKeyCode().IsMod1() ) { @@ -791,10 +791,10 @@ void TextWindow::KeyInput( const KeyEvent& rKEvent ) if (!aChars.isEmpty()) { mpExtTextView->InsertText( aChars ); - mpExtTextView->GetTextEngine()->SetModified( sal_True ); + mpExtTextView->GetTextEngine()->SetModified( true ); } mbActivePopup = false; - bDone = sal_True; + bDone = true; } } else if ( nCode == KEY_TAB ) @@ -827,20 +827,20 @@ void TextWindow::Command( const CommandEvent& rCEvt ) PopupMenu* pPopup = Edit::CreatePopupMenu(); if ( !mpExtTextView->HasSelection() ) { - pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_COPY, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_CUT, false ); + pPopup->EnableItem( SV_MENU_EDIT_COPY, false ); + pPopup->EnableItem( SV_MENU_EDIT_DELETE, false ); } if ( mpExtTextView->IsReadOnly() ) { - pPopup->EnableItem( SV_MENU_EDIT_CUT, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_PASTE, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_DELETE, sal_False ); - pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_CUT, false ); + pPopup->EnableItem( SV_MENU_EDIT_PASTE, false ); + pPopup->EnableItem( SV_MENU_EDIT_DELETE, false ); + pPopup->EnableItem( SV_MENU_EDIT_INSERTSYMBOL, false ); } if ( !mpExtTextView->GetTextEngine()->HasUndoManager() || !mpExtTextView->GetTextEngine()->GetUndoManager().GetUndoActionCount() ) { - pPopup->EnableItem( SV_MENU_EDIT_UNDO, sal_False ); + pPopup->EnableItem( SV_MENU_EDIT_UNDO, false ); } // if ( ( maSelection.Min() == 0 ) && ( maSelection.Max() == maText.Len() ) ) // { @@ -867,21 +867,21 @@ void TextWindow::Command( const CommandEvent& rCEvt ) switch ( n ) { case SV_MENU_EDIT_UNDO: mpExtTextView->Undo(); - mpExtTextEngine->SetModified( sal_True ); + mpExtTextEngine->SetModified( true ); mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); break; case SV_MENU_EDIT_CUT: mpExtTextView->Cut(); - mpExtTextEngine->SetModified( sal_True ); + mpExtTextEngine->SetModified( true ); mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); break; case SV_MENU_EDIT_COPY: mpExtTextView->Copy(); break; case SV_MENU_EDIT_PASTE: mpExtTextView->Paste(); - mpExtTextEngine->SetModified( sal_True ); + mpExtTextEngine->SetModified( true ); mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); break; case SV_MENU_EDIT_DELETE: mpExtTextView->DeleteSelected(); - mpExtTextEngine->SetModified( sal_True ); + mpExtTextEngine->SetModified( true ); mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); break; case SV_MENU_EDIT_SELECTALL: mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFFFFFF, 0xFFFF ) ) ); @@ -892,7 +892,7 @@ void TextWindow::Command( const CommandEvent& rCEvt ) if (!aChars.isEmpty()) { mpExtTextView->InsertText( aChars ); - mpExtTextEngine->SetModified( sal_True ); + mpExtTextEngine->SetModified( true ); mpExtTextEngine->Broadcast( TextHint( TEXT_HINT_MODIFIED ) ); } } @@ -911,19 +911,19 @@ void TextWindow::GetFocus() { if ( !mbActivePopup ) { - sal_Bool bGotoCursor = !mpExtTextView->IsReadOnly(); + bool bGotoCursor = !mpExtTextView->IsReadOnly(); if ( mbFocusSelectionHide && IsReallyVisible() && !mpExtTextView->IsReadOnly() && ( mbSelectOnTab && (!mbInMBDown || ( GetSettings().GetStyleSettings().GetSelectionOptions() & SELECTION_OPTION_FOCUS ) )) ) { // select everything, but do not scroll - sal_Bool bAutoScroll = mpExtTextView->IsAutoScroll(); - mpExtTextView->SetAutoScroll( sal_False ); + bool bAutoScroll = mpExtTextView->IsAutoScroll(); + mpExtTextView->SetAutoScroll( false ); mpExtTextView->SetSelection( TextSelection( TextPaM( 0, 0 ), TextPaM( 0xFFFF, 0xFFFF ) ) ); mpExtTextView->SetAutoScroll( bAutoScroll ); - bGotoCursor = sal_False; + bGotoCursor = false; } - mpExtTextView->SetPaintSelection( sal_True ); + mpExtTextView->SetPaintSelection( true ); mpExtTextView->ShowCursor( bGotoCursor ); } } @@ -933,7 +933,7 @@ void TextWindow::LoseFocus() Window::LoseFocus(); if ( mbFocusSelectionHide && !mbActivePopup ) - mpExtTextView->SetPaintSelection( sal_False ); + mpExtTextView->SetPaintSelection( false ); } VclMultiLineEdit::VclMultiLineEdit( Window* pParent, WinBits nWinStyle ) @@ -941,10 +941,10 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, WinBits nWinStyle ) { SetType( WINDOW_MULTILINEEDIT ); pImpVclMEdit = new ImpVclMEdit( this, nWinStyle ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); pUpdateDataTimer = 0; - SetCompoundControl( sal_True ); + SetCompoundControl( true ); SetStyle( ImplInitStyle( nWinStyle ) ); } @@ -954,7 +954,7 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, const ResId& rResId ) SetType( WINDOW_MULTILINEEDIT ); WinBits nWinStyle = rResId.GetWinBits(); pImpVclMEdit = new ImpVclMEdit( this, nWinStyle ); - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); pUpdateDataTimer = 0; sal_Int32 nMaxLen = Edit::GetMaxTextLen(); @@ -966,7 +966,7 @@ VclMultiLineEdit::VclMultiLineEdit( Window* pParent, const ResId& rResId ) if ( IsVisible() ) pImpVclMEdit->Resize(); - SetCompoundControl( sal_True ); + SetCompoundControl( true ); SetStyle( ImplInitStyle( nWinStyle ) ); // Base Edit ctor could call Show already, but that would cause problems @@ -1002,7 +1002,7 @@ WinBits VclMultiLineEdit::ImplInitStyle( WinBits nStyle ) } -void VclMultiLineEdit::ImplInitSettings( sal_Bool /*bFont*/, sal_Bool /*bForeground*/, sal_Bool bBackground ) +void VclMultiLineEdit::ImplInitSettings( bool /*bFont*/, bool /*bForeground*/, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1034,7 +1034,7 @@ void VclMultiLineEdit::ImplInitSettings( sal_Bool /*bFont*/, sal_Bool /*bForegro { if( IsPaintTransparent() ) { - pImpVclMEdit->GetTextWindow()->SetPaintTransparent( sal_True ); + pImpVclMEdit->GetTextWindow()->SetPaintTransparent( true ); pImpVclMEdit->GetTextWindow()->SetBackground(); pImpVclMEdit->GetTextWindow()->SetControlBackground(); SetBackground(); @@ -1085,12 +1085,12 @@ void VclMultiLineEdit::UpdateData() void VclMultiLineEdit::SetModifyFlag() { - pImpVclMEdit->SetModified( sal_True ); + pImpVclMEdit->SetModified( true ); } void VclMultiLineEdit::ClearModifyFlag() { - pImpVclMEdit->SetModified( sal_False ); + pImpVclMEdit->SetModified( false ); } bool VclMultiLineEdit::IsModified() const @@ -1127,7 +1127,7 @@ void VclMultiLineEdit::SetReadOnly( sal_Bool bReadOnly ) SetStyle( nStyle ); } -sal_Bool VclMultiLineEdit::IsReadOnly() const +bool VclMultiLineEdit::IsReadOnly() const { return pImpVclMEdit->IsReadOnly(); } @@ -1278,7 +1278,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) if( nType == STATE_CHANGE_ENABLE ) { pImpVclMEdit->Enable( IsEnabled() ); - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); } else if( nType == STATE_CHANGE_READONLY ) { @@ -1287,23 +1287,23 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) else if ( nType == STATE_CHANGE_ZOOM ) { pImpVclMEdit->GetTextWindow()->SetZoom( GetZoom() ); - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Resize(); } else if ( nType == STATE_CHANGE_CONTROLFONT ) { - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Resize(); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } else if ( nType == STATE_CHANGE_STYLE ) @@ -1315,7 +1315,7 @@ void VclMultiLineEdit::StateChanged( StateChangedType nType ) { if( IsPaintTransparent() ) { - pImpVclMEdit->GetTextWindow()->SetPaintTransparent( sal_True ); + pImpVclMEdit->GetTextWindow()->SetPaintTransparent( true ); pImpVclMEdit->GetTextWindow()->SetBackground(); pImpVclMEdit->GetTextWindow()->SetControlBackground(); SetBackground(); @@ -1331,7 +1331,7 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) if ( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Resize(); Invalidate(); } @@ -1341,12 +1341,12 @@ void VclMultiLineEdit::DataChanged( const DataChangedEvent& rDCEvt ) void VclMultiLineEdit::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal_uLong nFlags ) { - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); Font aFont = pImpVclMEdit->GetTextWindow()->GetDrawPixelFont( pDev ); - aFont.SetTransparent( sal_True ); + aFont.SetTransparent( true ); OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); @@ -1540,7 +1540,7 @@ ScrollBar* VclMultiLineEdit::GetVScrollBar() const return pImpVclMEdit->GetVScrollBar(); } -void VclMultiLineEdit::EnableFocusSelectionHide( sal_Bool bHide ) +void VclMultiLineEdit::EnableFocusSelectionHide( bool bHide ) { pImpVclMEdit->GetTextWindow()->SetAutoFocusHide( bHide ); } @@ -1551,7 +1551,7 @@ void VclMultiLineEdit::SetLeftMargin( sal_uInt16 n ) GetTextEngine()->SetLeftMargin( n ); } -void VclMultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft ) +void VclMultiLineEdit::SetRightToLeft( bool bRightToLeft ) { if ( GetTextEngine() ) { @@ -1560,9 +1560,9 @@ void VclMultiLineEdit::SetRightToLeft( sal_Bool bRightToLeft ) } } -sal_Bool VclMultiLineEdit::IsRightToLeft() const +bool VclMultiLineEdit::IsRightToLeft() const { - sal_Bool bRightToLeft = sal_False; + bool bRightToLeft = false; if ( GetTextEngine() ) bRightToLeft = GetTextEngine()->IsRightToLeft(); @@ -1580,7 +1580,7 @@ void VclMultiLineEdit::SetTextSelectable( bool bTextSelectable ) pImpVclMEdit->GetTextWindow()->SetTextSelectable( bTextSelectable ); } -void VclMultiLineEdit::EnableCursor( sal_Bool bEnable ) +void VclMultiLineEdit::EnableCursor( bool bEnable ) { GetTextView()->EnableCursor( bEnable ); } diff --git a/vcl/source/edit/xtextedt.cxx b/vcl/source/edit/xtextedt.cxx index 4bdc040b24fa..c543c563d4e1 100644 --- a/vcl/source/edit/xtextedt.cxx +++ b/vcl/source/edit/xtextedt.cxx @@ -135,7 +135,7 @@ TextSelection ExtTextEngine::MatchGroup( const TextPaM& rCursor ) const return aSel; } -sal_Bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, sal_Bool bForward ) +bool ExtTextEngine::Search( TextSelection& rSel, const util::SearchOptions& rSearchOptions, bool bForward ) { TextSelection aSel( rSel ); aSel.Justify(); @@ -235,14 +235,14 @@ ExtTextView::~ExtTextView() { } -sal_Bool ExtTextView::MatchGroup() +bool ExtTextView::MatchGroup() { TextSelection aTmpSel( GetSelection() ); aTmpSel.Justify(); if ( ( aTmpSel.GetStart().GetPara() != aTmpSel.GetEnd().GetPara() ) || ( ( aTmpSel.GetEnd().GetIndex() - aTmpSel.GetStart().GetIndex() ) > 1 ) ) { - return sal_False; + return false; } TextSelection aMatchSel = ((ExtTextEngine*)GetTextEngine())->MatchGroup( aTmpSel.GetStart() ); @@ -252,17 +252,17 @@ sal_Bool ExtTextView::MatchGroup() return aMatchSel.HasRange() ? sal_True : sal_False; } -sal_Bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, sal_Bool bForward ) +bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, bool bForward ) { - sal_Bool bFound = sal_False; + bool bFound = false; TextSelection aSel( GetSelection() ); if ( ((ExtTextEngine*)GetTextEngine())->Search( aSel, rSearchOptions, bForward ) ) { - bFound = sal_True; + bFound = true; // First add the beginning of the word to the selection, // so that the whole word is in the visible region. SetSelection( aSel.GetStart() ); - ShowCursor( sal_True, sal_False ); + ShowCursor( true, false ); } else { @@ -275,7 +275,7 @@ sal_Bool ExtTextView::Search( const util::SearchOptions& rSearchOptions, sal_Boo return bFound; } -sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_Bool bAll, sal_Bool bForward ) +sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, bool bAll, bool bForward ) { sal_uInt16 nFound = 0; @@ -311,7 +311,7 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_ TextSelection aSearchSel( aSel ); - sal_Bool bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True ); + bool bFound = pTextEngine->Search( aSel, rSearchOptions, true ); if ( bFound ) pTextEngine->UndoActionStart(); while ( bFound ) @@ -321,7 +321,7 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_ TextPaM aNewStart = pTextEngine->ImpInsertText( aSel, rSearchOptions.replaceString ); aSel = aSearchSel; aSel.GetStart() = aNewStart; - bFound = pTextEngine->Search( aSel, rSearchOptions, sal_True ); + bFound = pTextEngine->Search( aSel, rSearchOptions, true ); } if ( nFound ) { @@ -333,9 +333,9 @@ sal_uInt16 ExtTextView::Replace( const util::SearchOptions& rSearchOptions, sal_ return nFound; } -sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight ) +bool ExtTextView::ImpIndentBlock( bool bRight ) { - sal_Bool bDone = sal_False; + bool bDone = false; TextSelection aSel = GetSelection(); aSel.Justify(); @@ -356,7 +356,7 @@ sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight ) { // add tabs GetTextEngine()->ImpInsertText( TextPaM( nPara, 0 ), '\t' ); - bDone = sal_True; + bDone = true; } else { @@ -367,14 +367,14 @@ sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight ) ( aText[ 0 ] == ' ' ) ) ) { GetTextEngine()->ImpDeleteText( TextSelection( TextPaM( nPara, 0 ), TextPaM( nPara, 1 ) ) ); - bDone = sal_True; + bDone = true; } } } GetTextEngine()->UndoActionEnd(); - sal_Bool bRange = aSel.HasRange(); + bool bRange = aSel.HasRange(); if ( bRight ) { aSel.GetStart().GetIndex()++; @@ -395,14 +395,14 @@ sal_Bool ExtTextView::ImpIndentBlock( sal_Bool bRight ) return bDone; } -sal_Bool ExtTextView::IndentBlock() +bool ExtTextView::IndentBlock() { - return ImpIndentBlock( sal_True ); + return ImpIndentBlock( true ); } -sal_Bool ExtTextView::UnindentBlock() +bool ExtTextView::UnindentBlock() { - return ImpIndentBlock( sal_False ); + return ImpIndentBlock( false ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/filter/FilterConfigCache.cxx b/vcl/source/filter/FilterConfigCache.cxx index 71334c96653a..cbb35a2ccd61 100644 --- a/vcl/source/filter/FilterConfigCache.cxx +++ b/vcl/source/filter/FilterConfigCache.cxx @@ -52,7 +52,7 @@ const char* FilterConfigCache::FilterConfigCacheEntry::ExternalPixelFilterNameLi "epp", "ira", "era", "itg", "iti", "eti", "exp", NULL }; -sal_Bool FilterConfigCache::bInitialized = sal_False; +bool FilterConfigCache::bInitialized = false; sal_Int32 FilterConfigCache::nIndType = -1; sal_Int32 FilterConfigCache::nIndUIName = -1; sal_Int32 FilterConfigCache::nIndDocumentService = -1; @@ -62,30 +62,30 @@ sal_Int32 FilterConfigCache::nIndUserData = -1; sal_Int32 FilterConfigCache::nIndFileFormatVersion = -1; sal_Int32 FilterConfigCache::nIndTemplateName = -1; -sal_Bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry ) +bool FilterConfigCache::FilterConfigCacheEntry::CreateFilterName( const OUString& rUserDataEntry ) { - bIsPixelFormat = bIsInternalFilter = sal_False; + bIsPixelFormat = bIsInternalFilter = false; sFilterName = rUserDataEntry; const char** pPtr; - for ( pPtr = InternalPixelFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) + for ( pPtr = InternalPixelFilterNameList; *pPtr && !bIsInternalFilter; pPtr++ ) { if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) ) { - bIsInternalFilter = sal_True; - bIsPixelFormat = sal_True; + bIsInternalFilter = true; + bIsPixelFormat = true; } } - for ( pPtr = InternalVectorFilterNameList; *pPtr && ( bIsInternalFilter == sal_False ); pPtr++ ) + for ( pPtr = InternalVectorFilterNameList; *pPtr && !bIsInternalFilter; pPtr++ ) { if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) ) - bIsInternalFilter = sal_True; + bIsInternalFilter = true; } if ( !bIsInternalFilter ) { - for ( pPtr = ExternalPixelFilterNameList; *pPtr && ( bIsPixelFormat == sal_False ); pPtr++ ) + for ( pPtr = ExternalPixelFilterNameList; *pPtr && !bIsPixelFormat; pPtr++ ) { if ( sFilterName.equalsIgnoreAsciiCase( OUString(*pPtr, strlen(*pPtr), RTL_TEXTENCODING_ASCII_US) ) ) - bIsPixelFormat = sal_True; + bIsPixelFormat = true; } OUString sTemp(SVLIBRARY("?")); sFilterName = sTemp.replaceFirst("?", sFilterName); @@ -302,7 +302,7 @@ void FilterConfigCache::ImplInitSmart() // ------------------------------------------------------------------------ -FilterConfigCache::FilterConfigCache( sal_Bool bConfig ) : +FilterConfigCache::FilterConfigCache( bool bConfig ) : bUseConfig ( bConfig ) { if ( bUseConfig ) @@ -432,12 +432,12 @@ OUString FilterConfigCache::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEn return aWildcard; } -sal_Bool FilterConfigCache::IsImportInternalFilter( sal_uInt16 nFormat ) +bool FilterConfigCache::IsImportInternalFilter( sal_uInt16 nFormat ) { return (nFormat < aImport.size()) && aImport[ nFormat ].bIsInternalFilter; } -sal_Bool FilterConfigCache::IsImportPixelFormat( sal_uInt16 nFormat ) +bool FilterConfigCache::IsImportPixelFormat( sal_uInt16 nFormat ) { return (nFormat < aImport.size()) && aImport[ nFormat ].bIsPixelFormat; } @@ -546,12 +546,12 @@ OUString FilterConfigCache::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEn return aWildcard; } -sal_Bool FilterConfigCache::IsExportInternalFilter( sal_uInt16 nFormat ) +bool FilterConfigCache::IsExportInternalFilter( sal_uInt16 nFormat ) { return (nFormat < aExport.size()) && aExport[ nFormat ].bIsInternalFilter; } -sal_Bool FilterConfigCache::IsExportPixelFormat( sal_uInt16 nFormat ) +bool FilterConfigCache::IsExportPixelFormat( sal_uInt16 nFormat ) { return (nFormat < aExport.size()) && aExport[ nFormat ].bIsPixelFormat; } diff --git a/vcl/source/filter/FilterConfigCache.hxx b/vcl/source/filter/FilterConfigCache.hxx index a9b693e73c00..ee83a39db2fb 100644 --- a/vcl/source/filter/FilterConfigCache.hxx +++ b/vcl/source/filter/FilterConfigCache.hxx @@ -48,10 +48,10 @@ class FilterConfigCache // user data OUString sFilterName; - sal_Bool bIsInternalFilter : 1; - sal_Bool bIsPixelFormat : 1; + bool bIsInternalFilter : 1; + bool bIsPixelFormat : 1; - sal_Bool CreateFilterName( const OUString& rUserDataEntry ); + bool CreateFilterName( const OUString& rUserDataEntry ); OUString GetShortName( ); static const char* InternalPixelFilterNameList[]; @@ -63,9 +63,9 @@ class FilterConfigCache CacheVector aImport; CacheVector aExport; - sal_Bool bUseConfig; + bool bUseConfig; - static sal_Bool bInitialized; + static bool bInitialized; static sal_Int32 nIndType; static sal_Int32 nIndUIName; static sal_Int32 nIndDocumentService; @@ -98,8 +98,8 @@ public: OUString GetImportFilterType( sal_uInt16 nFormat ); OUString GetImportFilterTypeName( sal_uInt16 nFormat ); - sal_Bool IsImportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsImportPixelFormat( sal_uInt16 nFormat ); + bool IsImportInternalFilter( sal_uInt16 nFormat ); + bool IsImportPixelFormat( sal_uInt16 nFormat ); sal_uInt16 GetExportFormatCount() const { return sal::static_int_cast< sal_uInt16 >(aExport.size()); }; @@ -116,10 +116,10 @@ public: OUString GetExportFilterTypeName( sal_uInt16 nFormat ); OUString GetExportInternalFilterName( sal_uInt16 nFormat ); - sal_Bool IsExportInternalFilter( sal_uInt16 nFormat ); - sal_Bool IsExportPixelFormat( sal_uInt16 nFormat ); + bool IsExportInternalFilter( sal_uInt16 nFormat ); + bool IsExportPixelFormat( sal_uInt16 nFormat ); - FilterConfigCache( sal_Bool bUseConfig ); + FilterConfigCache( bool bUseConfig ); ~FilterConfigCache(); }; diff --git a/vcl/source/filter/FilterConfigItem.cxx b/vcl/source/filter/FilterConfigItem.cxx index e486af6372bf..db9af7ad21ed 100644 --- a/vcl/source/filter/FilterConfigItem.cxx +++ b/vcl/source/filter/FilterConfigItem.cxx @@ -104,7 +104,7 @@ static bool ImpIsTreeAvailable( Reference< XMultiServiceFactory >& rXCfgProv, co void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) { - bModified = sal_False; + bModified = false; Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); @@ -122,7 +122,7 @@ void FilterConfigItem::ImpInitTree( const OUString& rSubTree ) // creation arguments: commit mode PropertyValue aModeArgument; - sal_Bool bAsyncron = sal_True; + bool bAsyncron = true; aAny <<= bAsyncron; aModeArgument.Name = "lazywrite"; aModeArgument.Value = aAny; @@ -189,15 +189,15 @@ FilterConfigItem::~FilterConfigItem() } } -sal_Bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, sal_Bool bTestPropertyAvailability ) +bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPropertySet >& rXPropSet, const OUString& rString, bool bTestPropertyAvailability ) { - sal_Bool bRetValue = sal_True; + bool bRetValue = true; if ( rXPropSet.is() ) { if ( bTestPropertyAvailability ) { - bRetValue = sal_False; + bRetValue = false; try { Reference< XPropertySetInfo > @@ -216,16 +216,16 @@ sal_Bool FilterConfigItem::ImplGetPropertyValue( Any& rAny, const Reference< XPr { rAny = rXPropSet->getPropertyValue( rString ); if ( !rAny.hasValue() ) - bRetValue = sal_False; + bRetValue = false; } catch( ::com::sun::star::uno::Exception& ) { - bRetValue = sal_False; + bRetValue = false; } } } else - bRetValue = sal_False; + bRetValue = false; return bRetValue; } @@ -252,9 +252,9 @@ PropertyValue* FilterConfigItem::GetPropertyValue( Sequence< PropertyValue >& rP corresponding PropertyValue is replaced, otherwise the given PropertyValue will be appended */ -sal_Bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropSeq, const PropertyValue& rPropValue ) +bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropSeq, const PropertyValue& rPropValue ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !rPropValue.Name.isEmpty() ) { sal_Int32 i, nCount; @@ -268,21 +268,21 @@ sal_Bool FilterConfigItem::WritePropertyValue( Sequence< PropertyValue >& rPropS rPropSeq[ i ] = rPropValue; - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool FilterConfigItem::ReadBool( const OUString& rKey, sal_Bool bDefault ) +bool FilterConfigItem::ReadBool( const OUString& rKey, bool bDefault ) { Any aAny; - sal_Bool bRetValue = bDefault; + bool bRetValue = bDefault; PropertyValue* pPropVal = GetPropertyValue( aFilterData, rKey ); if ( pPropVal ) { pPropVal->Value >>= bRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { aAny >>= bRetValue; } @@ -302,7 +302,7 @@ sal_Int32 FilterConfigItem::ReadInt32( const OUString& rKey, sal_Int32 nDefault { pPropVal->Value >>= nRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { aAny >>= nRetValue; } @@ -322,7 +322,7 @@ OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDe { pPropVal->Value >>= aRetValue; } - else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + else if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { aAny >>= aRetValue; } @@ -333,7 +333,7 @@ OUString FilterConfigItem::ReadString( const OUString& rKey, const OUString& rDe return aRetValue; } -void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) +void FilterConfigItem::WriteBool( const OUString& rKey, bool bNewValue ) { PropertyValue aBool; aBool.Name = rKey; @@ -343,9 +343,9 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) if ( xPropSet.is() ) { Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { - sal_Bool bOldValue(sal_True); + bool bOldValue(true); if ( aAny >>= bOldValue ) { if ( bOldValue != bNewValue ) @@ -354,7 +354,7 @@ void FilterConfigItem::WriteBool( const OUString& rKey, sal_Bool bNewValue ) try { xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; + bModified = true; } catch ( ::com::sun::star::uno::Exception& ) { @@ -377,7 +377,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) { Any aAny; - if ( ImplGetPropertyValue( aAny, xPropSet, rKey, sal_True ) ) + if ( ImplGetPropertyValue( aAny, xPropSet, rKey, true ) ) { sal_Int32 nOldValue = 0; if ( aAny >>= nOldValue ) @@ -388,7 +388,7 @@ void FilterConfigItem::WriteInt32( const OUString& rKey, sal_Int32 nNewValue ) try { xPropSet->setPropertyValue( rKey, aAny ); - bModified = sal_True; + bModified = true; } catch ( ::com::sun::star::uno::Exception& ) { diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 8e7e1ae69a91..abdcbea87bdb 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -145,7 +145,7 @@ static void KillDirEntry( const OUString& rMainUrl ) comphelper::getProcessComponentContext() ); aCnt.executeCommand( "delete", - css::uno::makeAny( sal_Bool( sal_True ) ) ); + css::uno::makeAny( true ) ); } catch(const css::ucb::CommandAbortedException&) { @@ -1097,7 +1097,7 @@ ImpFilterLibCacheEntry* ImpFilterLibCache::GetFilter( const OUString& rFilterPat namespace { struct Cache : public rtl::Static<ImpFilterLibCache, Cache> {}; } -GraphicFilter::GraphicFilter( sal_Bool bConfig ) : +GraphicFilter::GraphicFilter( bool bConfig ) : bUseConfig ( bConfig ), nExpGraphHint ( 0 ) { @@ -1153,7 +1153,7 @@ void GraphicFilter::ImplInit() } pErrorEx = new FilterErrorEx; - bAbort = sal_False; + bAbort = false; } sal_uLong GraphicFilter::ImplSetError( sal_uLong nError, const SvStream* pStm ) @@ -1219,7 +1219,7 @@ OUString GraphicFilter::GetImportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry return pConfig->GetImportWildcard( nFormat, nEntry ); } -sal_Bool GraphicFilter::IsImportPixelFormat( sal_uInt16 nFormat ) +bool GraphicFilter::IsImportPixelFormat( sal_uInt16 nFormat ) { return pConfig->IsImportPixelFormat( nFormat ); } @@ -1285,7 +1285,7 @@ OUString GraphicFilter::GetExportWildcard( sal_uInt16 nFormat, sal_Int32 nEntry return pConfig->GetExportWildcard( nFormat, nEntry ); } -sal_Bool GraphicFilter::IsExportPixelFormat( sal_uInt16 nFormat ) +bool GraphicFilter::IsExportPixelFormat( sal_uInt16 nFormat ) { return pConfig->IsExportPixelFormat( nFormat ); } @@ -1356,12 +1356,12 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat GraphicReader* pContext = rGraphic.GetContext(); GfxLinkType eLinkType = GFX_LINK_TYPE_NONE; bool bDummyContext = ( pContext == (GraphicReader*) 1 ); - const sal_Bool bLinkSet = rGraphic.IsLink(); + const bool bLinkSet = rGraphic.IsLink(); FilterConfigItem* pFilterConfigItem = NULL; Size aPreviewSizeHint( 0, 0 ); - sal_Bool bAllowPartialStreamRead = sal_False; - sal_Bool bCreateNativeLink = sal_True; + bool bAllowPartialStreamRead = false; + bool bCreateNativeLink = true; ResetLastError(); @@ -1407,7 +1407,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat else nStmBegin = rIStream.Tell(); - bAbort = sal_False; + bAbort = false; nStatus = ImpTestOrFindFormat( rPath, rIStream, nFormat ); // if pending, return GRFILTER_OK in order to request more bytes if( rIStream.GetError() == ERRCODE_IO_PENDING ) @@ -1736,7 +1736,7 @@ sal_uInt16 GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPat { rIStream.Seek( nStmBegin ); rIStream.Read( pBuf, nBufSize ); - rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, sal_True ) ); + rGraphic.SetLink( GfxLink( pBuf, nBufSize, eLinkType, true ) ); } } } @@ -1844,7 +1844,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString FilterConfigItem aConfigItem( (uno::Sequence< beans::PropertyValue >*)pFilterData ); OUString aFilterName( pConfig->GetExportFilterName( nFormat ) ); - bAbort = sal_False; + bAbort = false; sal_uInt16 nStatus = GRFILTER_OK; GraphicType eType; Graphic aGraphic( rGraphic ); @@ -1907,7 +1907,7 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString if( !aBmp.Convert( (BmpConversion) nColorRes ) ) aBmp = aGraphic.GetBitmap(); } - sal_Bool bRleCoding = aConfigItem.ReadBool( "RLE_Coding", sal_True ); + bool bRleCoding = aConfigItem.ReadBool( "RLE_Coding", true ); // save RLE encoded? WriteDIB(aBmp, rOStm, bRleCoding, true); diff --git a/vcl/source/filter/graphicfilter2.cxx b/vcl/source/filter/graphicfilter2.cxx index 9e3fd4c96624..b0495dc174fa 100644 --- a/vcl/source/filter/graphicfilter2.cxx +++ b/vcl/source/filter/graphicfilter2.cxx @@ -32,14 +32,14 @@ sal_uInt8* ImplSearchEntry( sal_uInt8* , sal_uInt8* , sal_uLong , sal_uLong ); GraphicDescriptor::GraphicDescriptor( const INetURLObject& rPath ) : pFileStm( ::utl::UcbStreamHelper::CreateStream( rPath.GetMainURL( INetURLObject::NO_DECODE ), STREAM_READ ) ), aPathExt( rPath.GetFileExtension().toAsciiLowerCase() ), - bOwnStream( sal_True ) + bOwnStream( true ) { ImpConstruct(); } GraphicDescriptor::GraphicDescriptor( SvStream& rInStream, const OUString* pPath) : pFileStm ( &rInStream ), - bOwnStream ( sal_False ) + bOwnStream ( false ) { ImpConstruct(); @@ -56,39 +56,39 @@ GraphicDescriptor::~GraphicDescriptor() delete pFileStm; } -sal_Bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo ) +bool GraphicDescriptor::Detect( sal_Bool bExtendedInfo ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( pFileStm && !pFileStm->GetError() ) { SvStream& rStm = *pFileStm; sal_uInt16 nOldFormat = rStm.GetNumberFormatInt(); - if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = sal_True; - else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = sal_True; + if ( ImpDetectGIF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectJPG( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectBMP( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPNG( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectTIF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPCX( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectDXF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectMET( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSGF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSGV( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSVM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectWMF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectEMF( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectSVG( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPCT( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectXBM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectXPM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPBM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPGM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPPM( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectRAS( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectTGA( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPSD( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectEPS( rStm, bExtendedInfo ) ) bRet = true; + else if ( ImpDetectPCD( rStm, bExtendedInfo ) ) bRet = true; rStm.SetNumberFormatInt( nOldFormat ); } @@ -100,13 +100,13 @@ void GraphicDescriptor::ImpConstruct() nFormat = GFF_NOT; nBitsPerPixel = 0; nPlanes = 0; - bCompressed = sal_False; + bCompressed = false; } -sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, bool bExtendedInfo ) { sal_uInt16 nTemp16 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -123,7 +123,7 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp16 == 0x4d42 ) { nFormat = GFF_BMP; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -168,7 +168,7 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo if ( ( nBitsPerPixel > 24 ) || ( nCompression > 3 ) ) { nFormat = GFF_NOT; - bRet = sal_False; + bRet = false; } } } @@ -176,11 +176,11 @@ sal_Bool GraphicDescriptor::ImpDetectBMP( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 n32 = 0; sal_uInt16 n16 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -193,7 +193,7 @@ sal_Bool GraphicDescriptor::ImpDetectGIF( SvStream& rStm, sal_Bool bExtendedInfo if ( ( n16 == 0x6137 ) || ( n16 == 0x6139 ) ) { nFormat = GFF_GIF; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -243,10 +243,10 @@ sal_uInt8 ImpDetectJPG_GetNextMarker( SvStream& rStm ) return nByte; } -sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 nTemp32 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); @@ -257,7 +257,7 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf if( 0xffd8ff00 == ( nTemp32 & 0xffffff00 ) ) { nFormat = GFF_JPG; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -400,9 +400,9 @@ sal_Bool GraphicDescriptor::ImpDetectJPG( SvStream& rStm, sal_Bool bExtendedInf return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN ); @@ -421,21 +421,21 @@ sal_Bool GraphicDescriptor::ImpDetectPCD( SvStream& rStm, sal_Bool ) ( cByte == 0x49 ) ) { nFormat = GFF_PCD; - bRet = sal_True; + bRet = true; } rStm.Seek( nStmPos ); return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, bool bExtendedInfo ) { // ! Because 0x0a can be interpreted as LF too ... // we cant be sure that this special sign represent a PCX file only. // Every Ascii file is possible here :-( // We must detect the whole header. - bExtendedInfo = sal_True; + bExtendedInfo = true; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -445,7 +445,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo if ( cByte == 0x0a ) { nFormat = GFF_PCX; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -511,10 +511,10 @@ sal_Bool GraphicDescriptor::ImpDetectPCX( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 nTemp32 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); @@ -526,7 +526,7 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp32 == 0x0d0a1a0a ) { nFormat = GFF_PNG; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -550,7 +550,7 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo // Planes always 1; // compression always nPlanes = 1; - bCompressed = sal_True; + bCompressed = true; sal_uInt32 nLen32 = 0; nTemp32 = 0; @@ -606,10 +606,10 @@ sal_Bool GraphicDescriptor::ImpDetectPNG( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, bool bExtendedInfo ) { bool bDetectOk = false; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte1 = 0; sal_uInt8 cByte2 = 1; @@ -637,7 +637,7 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo if ( nTemp16 == 0x2a ) { nFormat = GFF_TIF; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -737,38 +737,38 @@ sal_Bool GraphicDescriptor::ImpDetectTIF( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectXBM( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectXBM( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "xbm" ); + bool bRet = aPathExt.startsWith( "xbm" ); if (bRet) nFormat = GFF_XBM; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectXPM( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectXPM( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "xpm" ); + bool bRet = aPathExt.startsWith( "xpm" ); if (bRet) nFormat = GFF_XPM; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; // check file extension first, as this trumps the 2 ID bytes if ( aPathExt.startsWith( "pbm" ) ) - bRet = sal_True; + bRet = true; else { sal_Int32 nStmPos = rStm.Tell(); sal_uInt8 nFirst = 0, nSecond = 0; rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if ( nFirst == 'P' && ( ( nSecond == '1' ) || ( nSecond == '4' ) ) ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -778,19 +778,19 @@ sal_Bool GraphicDescriptor::ImpDetectPBM( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( aPathExt.startsWith( "pgm" ) ) - bRet = sal_True; + bRet = true; else { sal_uInt8 nFirst = 0, nSecond = 0; sal_Int32 nStmPos = rStm.Tell(); rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if ( nFirst == 'P' && ( ( nSecond == '2' ) || ( nSecond == '5' ) ) ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -800,19 +800,19 @@ sal_Bool GraphicDescriptor::ImpDetectPGM( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( aPathExt.startsWith( "ppm" ) ) - bRet = sal_True; + bRet = true; else { sal_uInt8 nFirst = 0, nSecond = 0; sal_Int32 nStmPos = rStm.Tell(); rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if ( nFirst == 'P' && ( ( nSecond == '3' ) || ( nSecond == '6' ) ) ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -822,34 +822,34 @@ sal_Bool GraphicDescriptor::ImpDetectPPM( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectRAS( SvStream& rStm, bool ) { sal_uInt32 nMagicNumber = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_Int32 nStmPos = rStm.Tell(); rStm.SetNumberFormatInt( NUMBERFORMAT_INT_BIGENDIAN ); rStm.ReadUInt32( nMagicNumber ); if ( nMagicNumber == 0x59a66a95 ) { nFormat = GFF_RAS; - bRet = sal_True; + bRet = true; } rStm.Seek( nStmPos ); return bRet; } -sal_Bool GraphicDescriptor::ImpDetectTGA( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectTGA( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "tga" ); + bool bRet = aPathExt.startsWith( "tga" ); if (bRet) nFormat = GFF_TGA; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, bool bExtendedInfo ) { - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt32 nMagicNumber = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -861,7 +861,7 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo rStm.ReadUInt16( nVersion ); if ( nVersion == 1 ) { - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { sal_uInt16 nChannels = 0; @@ -885,11 +885,11 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo aPixSize.Height() = nRows; break; default: - bRet = sal_False; + bRet = false; } } else - bRet = sal_False; + bRet = false; } } } @@ -900,12 +900,12 @@ sal_Bool GraphicDescriptor::ImpDetectPSD( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, bool ) { // check the EPS preview and the file extension sal_uInt32 nFirstLong = 0; sal_uInt8 nFirstBytes[20]; - sal_Bool bRet = sal_False; + bool bRet = false; memset(nFirstBytes, 0, sizeof (nFirstBytes)); sal_Int32 nStmPos = rStm.Tell(); @@ -919,24 +919,24 @@ sal_Bool GraphicDescriptor::ImpDetectEPS( SvStream& rStm, sal_Bool ) && ImplSearchEntry( &nFirstBytes[15], (sal_uInt8*)"EPS", 3, 3 ) ) ) { nFormat = GFF_EPS; - bRet = sal_True; + bRet = true; } rStm.Seek( nStmPos ); return bRet; } -sal_Bool GraphicDescriptor::ImpDetectDXF( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectDXF( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "dxf" ); + bool bRet = aPathExt.startsWith( "dxf" ); if (bRet) nFormat = GFF_DXF; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectMET( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "met" ); + bool bRet = aPathExt.startsWith( "met" ); if (bRet) nFormat = GFF_MET; @@ -945,9 +945,9 @@ sal_Bool GraphicDescriptor::ImpDetectMET( SvStream&, sal_Bool ) extern bool isPCT(SvStream& rStream, sal_uLong nStreamPos, sal_uLong nStreamLen); -sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, bool ) { - sal_Bool bRet = aPathExt.startsWith( "pct" ); + bool bRet = aPathExt.startsWith( "pct" ); if (bRet) nFormat = GFF_PCT; else @@ -956,7 +956,7 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) sal_Size nStreamLen = rStm.remainingSize(); if (isPCT(rStm, nStreamPos, nStreamLen)) { - bRet = sal_True; + bRet = true; nFormat = GFF_PCT; } rStm.Seek(nStreamPos); @@ -965,11 +965,11 @@ sal_Bool GraphicDescriptor::ImpDetectPCT( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) +bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, bool ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( aPathExt.startsWith( "sgf" ) ) - bRet = sal_True; + bRet = true; else { sal_Int32 nStmPos = rStm.Tell(); @@ -979,7 +979,7 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) rStm.ReadUChar( nFirst ).ReadUChar( nSecond ); if( nFirst == 'J' && nSecond == 'J' ) - bRet = sal_True; + bRet = true; rStm.Seek( nStmPos ); } @@ -990,19 +990,19 @@ sal_Bool GraphicDescriptor::ImpDetectSGF( SvStream& rStm, sal_Bool ) return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSGV( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectSGV( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "sgv" ); + bool bRet = aPathExt.startsWith( "sgv" ); if (bRet) nFormat = GFF_SGV; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo ) +bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, bool bExtendedInfo ) { sal_uInt32 n32 = 0; - sal_Bool bRet = sal_False; + bool bRet = false; sal_uInt8 cByte = 0; sal_Int32 nStmPos = rStm.Tell(); @@ -1015,7 +1015,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo if ( cByte == 0x49 ) { nFormat = GFF_SVM; - bRet = sal_True; + bRet = true; if ( bExtendedInfo ) { @@ -1058,7 +1058,7 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo if( nTmp16 == 0x4654 ) { nFormat = GFF_SVM; - bRet = sal_True; + bRet = true; if( bExtendedInfo ) { @@ -1076,27 +1076,27 @@ sal_Bool GraphicDescriptor::ImpDetectSVM( SvStream& rStm, sal_Bool bExtendedInfo return bRet; } -sal_Bool GraphicDescriptor::ImpDetectWMF( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectWMF( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "wmf" ); + bool bRet = aPathExt.startsWith( "wmf" ); if (bRet) nFormat = GFF_WMF; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectEMF( SvStream&, sal_Bool ) +bool GraphicDescriptor::ImpDetectEMF( SvStream&, bool ) { - sal_Bool bRet = aPathExt.startsWith( "emf" ); + bool bRet = aPathExt.startsWith( "emf" ); if (bRet) nFormat = GFF_EMF; return bRet; } -sal_Bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, sal_Bool /*bExtendedInfo*/ ) +bool GraphicDescriptor::ImpDetectSVG( SvStream& /*rStm*/, bool /*bExtendedInfo*/ ) { - sal_Bool bRet = aPathExt.startsWith( "svg" ); + bool bRet = aPathExt.startsWith( "svg" ); if (bRet) nFormat = GFF_SVG; diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 79d58ce0641e..26ceb86b9e12 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -543,7 +543,7 @@ void GIFReader::CreateNewBitmaps() aAnimBmp.aPosPix = Point( nImagePosX, nImagePosY ); aAnimBmp.aSizePix = Size( nImageWidth, nImageHeight ); aAnimBmp.nWait = ( nTimer != 65535 ) ? nTimer : ANIMATION_TIMEOUT_ON_CLICK; - aAnimBmp.bUserInput = sal_False; + aAnimBmp.bUserInput = false; if( nGCDisposalMethod == 2 ) aAnimBmp.eDisposal = DISPOSE_BACK; diff --git a/vcl/source/filter/jpeg/JpegReader.cxx b/vcl/source/filter/jpeg/JpegReader.cxx index 5e5c6ac9e9c9..e473df1e7a7d 100644 --- a/vcl/source/filter/jpeg/JpegReader.cxx +++ b/vcl/source/filter/jpeg/JpegReader.cxx @@ -285,7 +285,7 @@ unsigned char * JPEGReader::CreateBitmap( JPEGCreateBitmapParam * pParam ) else { pParam->nAlignedWidth = AlignedWidth4Bytes( aSize.Width() * ( bGray ? 8 : 24 ) ); - pParam->bTopDown = sal_True; + pParam->bTopDown = true; pBmpBuf = mpBuffer = new unsigned char[pParam->nAlignedWidth * aSize.Height()]; } } diff --git a/vcl/source/filter/jpeg/JpegReader.hxx b/vcl/source/filter/jpeg/JpegReader.hxx index 442c52d78ef2..978317a59c9d 100644 --- a/vcl/source/filter/jpeg/JpegReader.hxx +++ b/vcl/source/filter/jpeg/JpegReader.hxx @@ -43,7 +43,7 @@ struct JPEGCreateBitmapParam long bGray; long nAlignedWidth; // these members will be filled by the - long bTopDown; // CreateBitmap method in svtools + bool bTopDown; // CreateBitmap method in svtools }; class JPEGReader : public GraphicReader diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index e763314138e9..78a96d43eeeb 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx @@ -186,9 +186,9 @@ void* JPEGWriter::GetScanline( long nY ) return pScanline; } -sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) +bool JPEGWriter::Write( const Graphic& rGraphic ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( mxStatusIndicator.is() ) { @@ -223,7 +223,7 @@ sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) } } if ( bIsGrey ) - mbGreys = sal_True; + mbGreys = true; } if( mpExpWasGrey ) @@ -236,7 +236,7 @@ sal_Bool JPEGWriter::Write( const Graphic& rGraphic ) if( !mbNative ) mpBuffer = new sal_uInt8[ AlignedWidth4Bytes( mbGreys ? mpReadAccess->Width() * 8L : mpReadAccess->Width() * 24L ) ]; - bRet = (sal_Bool) WriteJPEG( this, &mrStream, mpReadAccess->Width(), mpReadAccess->Height(), mbGreys, mnQuality, maChromaSubsampling, mxStatusIndicator ); + bRet = WriteJPEG( this, &mrStream, mpReadAccess->Width(), mpReadAccess->Height(), mbGreys, mnQuality, maChromaSubsampling, mxStatusIndicator ); delete[] mpBuffer; mpBuffer = NULL; diff --git a/vcl/source/filter/jpeg/JpegWriter.hxx b/vcl/source/filter/jpeg/JpegWriter.hxx index 88b6352f0c1b..8c4b13bbf197 100644 --- a/vcl/source/filter/jpeg/JpegWriter.hxx +++ b/vcl/source/filter/jpeg/JpegWriter.hxx @@ -33,7 +33,7 @@ class JPEGWriter BitmapReadAccess* mpReadAccess; sal_uInt8* mpBuffer; bool mbNative; - sal_Bool mbGreys; + bool mbGreys; sal_Int32 mnQuality; sal_Int32 maChromaSubsampling; @@ -49,7 +49,7 @@ public: virtual ~JPEGWriter() {}; void* GetScanline( long nY ); - sal_Bool Write( const Graphic& rGraphic ); + bool Write( const Graphic& rGraphic ); }; diff --git a/vcl/source/filter/jpeg/jpeg.h b/vcl/source/filter/jpeg/jpeg.h index 01209ba56509..1f8c21f62aac 100644 --- a/vcl/source/filter/jpeg/jpeg.h +++ b/vcl/source/filter/jpeg/jpeg.h @@ -38,7 +38,7 @@ void jpeg_svstream_src (j_decompress_ptr cinfo, void* infile); void jpeg_svstream_dest (j_compress_ptr cinfo, void* outfile); -long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, long nWidth, long nHeight, long bGreyScale, +bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, long nWidth, long nHeight, bool bGreyScale, long nQualityPercent, long aChromaSubsampling, css::uno::Reference<css::task::XStatusIndicator> const & status); diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx index 3f52a2f024b9..6cbb5899d855 100644 --- a/vcl/source/filter/jpeg/jpegc.cxx +++ b/vcl/source/filter/jpeg/jpegc.cxx @@ -217,8 +217,8 @@ void ReadJPEG( JPEGReader* pJPEGReader, void* pInputStream, long* pLines, jpeg_destroy_decompress( &cinfo ); } -long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, - long nWidth, long nHeight, long bGreys, +bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, + long nWidth, long nHeight, bool bGreys, long nQualityPercent, long aChromaSubsampling, css::uno::Reference<css::task::XStatusIndicator> const & status ) { @@ -230,7 +230,7 @@ long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, if ( setjmp( jerr.setjmp_buffer ) ) { jpeg_destroy_compress( &cinfo ); - return 0; + return false; } cinfo.err = jpeg_std_error( &jerr.pub ); @@ -295,7 +295,7 @@ long WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream, jpeg_finish_compress(&cinfo); jpeg_destroy_compress( &cinfo ); - return 1; + return true; } long Transform(void* pInputStream, void* pOutputStream, long nAngle) diff --git a/vcl/source/filter/sgvmain.hxx b/vcl/source/filter/sgvmain.hxx index e9272b3b5260..93ba2a47bd75 100644 --- a/vcl/source/filter/sgvmain.hxx +++ b/vcl/source/filter/sgvmain.hxx @@ -58,7 +58,7 @@ public: sal_uInt32 nList; // objectdata, first record sal_uInt32 ListEnd; // objectdata, last record Seitenformat Paper; // data of paper - sal_Bool BorderClip; // clip objects at border (cheat due to alignment in NT) + bool BorderClip; // clip objects at border (cheat due to alignment in NT) sal_uInt8 StdPg; // insert which standardpage ? PointType U; // origin sal_Int16 HlpLnH[20]; // guides @@ -115,8 +115,8 @@ public: ObjLineType ShdL; // shadow outline (new 2.0) ObjAreaType ShdF; // shadow inside (new 2.0) PointType ShdVers; // shadow offset max. 300.00% - sal_Bool ShdAbs; // True-> shadow offset is absolute instead of relative to font size - sal_Bool NoSpc; // True-> no space (for background area) + bool ShdAbs; // True-> shadow offset is absolute instead of relative to font size + bool NoSpc; // True-> no space (for background area) ObjAreaType BackF; // background area sal_uInt32 GetFont(); void SetFont(sal_uInt32 FontID); @@ -139,7 +139,7 @@ public: sal_uInt8 Art; sal_uInt8 Layer; friend SvStream& ReadObjkType(SvStream& rIStream, ObjkType& rObjk); - friend sal_Bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk); + friend bool ObjOverSeek(SvStream& rInp, ObjkType& rObjk); virtual void Draw(OutputDevice& rOut); }; @@ -265,9 +265,9 @@ public: PointType PixSize; // size in Pixel (0 for vector) GrafStat Format; // see: GpmDef.Pas sal_uInt8 nPlanes; // number of bitplanes (0 for vector) - sal_Bool RawOut; // output as raw ? - sal_Bool InvOut; // output inverted ? - sal_Bool LightOut; // brighten? (SD20) + bool RawOut; // output as raw ? + bool InvOut; // output inverted ? + bool LightOut; // brighten? (SD20) sal_uInt8 GrfFlg; // (SD20) 0=nSGF 1=Pcx 2=HPGL 4=Raw $FF=Undef (to fix DrawBmp) INetURLObject aFltPath; // for GraphicFilter friend SvStream& ReadBmapType(SvStream& rIStream, BmapType& rBmap); @@ -300,11 +300,11 @@ class SgfFontOne { public: SgfFontOne* Next; // pointer to list sal_uInt32 IFID; - sal_Bool Bold; - sal_Bool Ital; - sal_Bool Sans; - sal_Bool Serf; - sal_Bool Fixd; + bool Bold; + bool Ital; + bool Sans; + bool Serf; + bool Fixd; FontFamily SVFamil; rtl_TextEncoding SVChSet; OUString SVFName; // e.g. "Times New Roman" = 15 chars diff --git a/vcl/source/filter/sgvtext.cxx b/vcl/source/filter/sgvtext.cxx index b5355cafcb81..39b581f373a4 100644 --- a/vcl/source/filter/sgvtext.cxx +++ b/vcl/source/filter/sgvtext.cxx @@ -589,7 +589,7 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u aColor=Sgv2SvFarbe(Atr.L.LFarbe,Atr.L.LBFarbe,Atr.L.LIntens); aFont.SetColor(aColor); aColor=Sgv2SvFarbe(Atr.F.FFarbe,Atr.F.FBFarbe,Atr.F.FIntens); aFont.SetFillColor(aColor); - aFont.SetTransparent(sal_True); + aFont.SetTransparent(true); aFont.SetAlign(ALIGN_BASELINE); Dreh/=10; Dreh=3600-Dreh; if (Dreh==3600) Dreh=0; @@ -601,11 +601,11 @@ sal_uInt16 SetTextContext(OutputDevice& rOut, ObjTextType& Atr, bool Kapt, sal_u if ((Atr.Schnitt & TextDbUnBit) !=0) aFont.SetUnderline(UNDERLINE_DOUBLE); if ((Atr.Schnitt & TextStrkBit) !=0) aFont.SetStrikeout(STRIKEOUT_SINGLE); if ((Atr.Schnitt & TextDbStBit) !=0) aFont.SetStrikeout(STRIKEOUT_DOUBLE); - if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(sal_True); - if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(sal_True); - if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(sal_True); - if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(sal_True); - if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(sal_True); + if ((Atr.Schnitt & TextSh2DBit) !=0) aFont.SetShadow(true); + if ((Atr.Schnitt & TextSh3DBit) !=0) aFont.SetShadow(true); + if ((Atr.Schnitt & TextSh4DBit) !=0) aFont.SetShadow(true); + if ((Atr.Schnitt & TextShEbBit) !=0) aFont.SetShadow(true); + if (CheckTextOutl(Atr.F,Atr.L)) aFont.SetOutline(true); if (aFont!=rOut.GetFont()) rOut.SetFont(aFont); @@ -1095,11 +1095,11 @@ SgfFontOne::SgfFontOne() { Next=NULL; IFID=0; - Bold=sal_False; - Ital=sal_False; - Sans=sal_False; - Serf=sal_False; - Fixd=sal_False; + Bold=false; + Ital=false; + Sans=false; + Serf=false; + Fixd=false; SVFamil=FAMILY_DONTKNOW; SVChSet=RTL_TEXTENCODING_DONTKNOW; SVWidth=40; @@ -1134,11 +1134,11 @@ void SgfFontOne::ReadOne( const OString& rID, OString& Dsc ) if (!s.isEmpty()) { s = s.toAsciiUpperCase(); - if (s.match("BOLD")) Bold=sal_True; - else if (s.match("ITAL")) Ital=sal_True; - else if (s.match("SERF")) Serf=sal_True; - else if (s.match("SANS")) Sans=sal_True; - else if (s.match("FIXD")) Fixd=sal_True; + if (s.match("BOLD")) Bold=true; + else if (s.match("ITAL")) Ital=true; + else if (s.match("SERF")) Serf=true; + else if (s.match("SANS")) Sans=true; + else if (s.match("FIXD")) Fixd=true; else if (s.match("ROMAN")) SVFamil=FAMILY_ROMAN; else if (s.match("SWISS")) SVFamil=FAMILY_SWISS; else if (s.match("MODERN")) SVFamil=FAMILY_MODERN; diff --git a/vcl/source/filter/wmf/emfwr.cxx b/vcl/source/filter/wmf/emfwr.cxx index 9a6909f2c418..79497fb344e1 100644 --- a/vcl/source/filter/wmf/emfwr.cxx +++ b/vcl/source/filter/wmf/emfwr.cxx @@ -178,7 +178,7 @@ void EMFWriter::ImplBeginPlusRecord( sal_uInt16 nType, sal_uInt16 nFlags ) if( !mbRecordPlusOpen ) { - mbRecordPlusOpen = sal_True; + mbRecordPlusOpen = true; mnRecordPlusPos = m_rStm.Tell(); m_rStm.WriteUInt16( (sal_uInt16) nType ).WriteUInt16( (sal_uInt16) nFlags ); @@ -198,7 +198,7 @@ void EMFWriter::ImplEndPlusRecord() m_rStm.WriteUInt32( (sal_uInt32)( nSize ) ) // Size .WriteUInt32( (sal_uInt32) ( nSize - 0xc ) ); // Data Size m_rStm.Seek( nActPos ); - mbRecordPlusOpen = sal_False; + mbRecordPlusOpen = false; } } @@ -283,11 +283,11 @@ void EMFWriter::ImplWritePlusFillPolygonRecord( const Polygon& rPoly, const sal_ ImplEndCommentRecord(); } -sal_Bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConfigItem ) +bool EMFWriter::WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pFilterConfigItem ) { const sal_uLong nHeaderPos = m_rStm.Tell(); - maVDev.EnableOutput( sal_False ); + maVDev.EnableOutput( false ); maVDev.SetMapMode( rMtf.GetPrefMapMode() ); // don't work with pixel as destination map mode -> higher resolution preferrable maDestMapMode.SetMapUnit( MAP_100TH_MM ); @@ -401,7 +401,7 @@ void EMFWriter::ImplBeginRecord( sal_uInt32 nType ) if( !mbRecordOpen ) { - mbRecordOpen = sal_True; + mbRecordOpen = true; mnRecordPos = m_rStm.Tell(); m_rStm.WriteUInt32( nType ); @@ -426,11 +426,11 @@ void EMFWriter::ImplEndRecord() while( nFillBytes-- ) m_rStm.WriteUChar( (sal_uInt8)0 ); mnRecordCount++; - mbRecordOpen = sal_False; + mbRecordOpen = false; } } -sal_Bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ) +bool EMFWriter::ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ) { if( rHandle != HANDLE_INVALID ) { @@ -664,7 +664,7 @@ void EMFWriter::ImplWriteRect( const Rectangle& rRect ) .WriteInt32( static_cast<sal_Int32>(aRect.Bottom()) ); } -void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose ) +void EMFWriter::ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ) { if( rPoly.GetSize() ) { @@ -696,7 +696,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) if( nPolyCount ) { if( 1 == nPolyCount ) - ImplWritePolygonRecord( rPolyPoly[ 0 ], sal_True ); + ImplWritePolygonRecord( rPolyPoly[ 0 ], true ); else { bool bHasFlags = false; @@ -711,7 +711,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) if( nTotalPoints ) { if ( bHasFlags ) - ImplWritePath( rPolyPoly, sal_True ); + ImplWritePath( rPolyPoly, true ); else { ImplCheckFillAttr(); @@ -738,7 +738,7 @@ void EMFWriter::ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ) } } -void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClosed ) +void EMFWriter::ImplWritePath( const PolyPolygon& rPolyPoly, bool bClosed ) { if ( bClosed ) ImplCheckFillAttr(); @@ -957,7 +957,7 @@ void EMFWriter::Impl_handleLineInfoPolyPolygons(const LineInfo& rInfo, const bas for(sal_uInt32 a(0); a < aLinePolyPolygon.count(); a++) { const basegfx::B2DPolygon aCandidate(aLinePolyPolygon.getB2DPolygon(a)); - ImplWritePolygonRecord( Polygon(aCandidate), sal_False ); + ImplWritePolygonRecord( Polygon(aCandidate), false ); } } @@ -1154,7 +1154,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) { if(pA->GetLineInfo().IsDefault()) { - ImplWritePolygonRecord( rPoly, sal_False ); + ImplWritePolygonRecord( rPoly, false ); } else { @@ -1394,14 +1394,14 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_LINECOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbLineChanged = sal_True; + mbLineChanged = true; } break; case( META_FILLCOLOR_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbFillChanged = sal_True; + mbFillChanged = true; } break; @@ -1412,7 +1412,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) case( META_FONT_ACTION ): { ( (MetaAction*) pAction )->Execute( &maVDev ); - mbTextChanged = sal_True; + mbTextChanged = true; } break; @@ -1457,7 +1457,7 @@ void EMFWriter::ImplWrite( const GDIMetaFile& rMtf ) ImplEndRecord(); ImplWriteRasterOp( maVDev.GetRasterOp() ); - mbLineChanged = mbFillChanged = mbTextChanged = sal_True; + mbLineChanged = mbFillChanged = mbTextChanged = true; } break; diff --git a/vcl/source/filter/wmf/emfwr.hxx b/vcl/source/filter/wmf/emfwr.hxx index 54228e6cd8c6..1eddc51e2029 100644 --- a/vcl/source/filter/wmf/emfwr.hxx +++ b/vcl/source/filter/wmf/emfwr.hxx @@ -47,13 +47,13 @@ private: sal_uLong mnRecordCount; sal_uLong mnRecordPos; sal_uLong mnRecordPlusPos; - sal_Bool mbRecordOpen; - sal_Bool mbRecordPlusOpen; - sal_Bool mbLineChanged; + bool mbRecordOpen; + bool mbRecordPlusOpen; + bool mbLineChanged; sal_uInt32 mnLineHandle; - sal_Bool mbFillChanged; + bool mbFillChanged; sal_uInt32 mnFillHandle; - sal_Bool mbTextChanged; + bool mbTextChanged; sal_uInt32 mnTextHandle; sal_uInt32 mnHorTextAlign; @@ -68,7 +68,7 @@ private: sal_uLong ImplAcquireHandle(); void ImplReleaseHandle( sal_uLong nHandle ); - sal_Bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ); + bool ImplPrepareHandleSelect( sal_uInt32& rHandle, sal_uLong nSelectType ); void ImplCheckLineAttr(); void ImplCheckFillAttr(); void ImplCheckTextAttr(); @@ -79,8 +79,8 @@ private: void ImplWritePoint( const Point& rPoint ); void ImplWriteSize( const Size& rSize); void ImplWriteRect( const Rectangle& rRect ); - void ImplWritePath( const PolyPolygon& rPolyPoly, sal_Bool bClose ); - void ImplWritePolygonRecord( const Polygon& rPoly, sal_Bool bClose ); + void ImplWritePath( const PolyPolygon& rPolyPoly, bool bClose ); + void ImplWritePolygonRecord( const Polygon& rPoly, bool bClose ); void ImplWritePolyPolygonRecord( const PolyPolygon& rPolyPoly ); void ImplWriteBmpRecord( const Bitmap& rBmp, const Point& rPt, const Size& rSz, sal_uInt32 nROP ); void ImplWriteTextRecord( const Point& rPos, const OUString rText, const sal_Int32* pDXArray, sal_uInt32 nWidth ); @@ -97,7 +97,7 @@ public: EMFWriter(SvStream &rStream) : m_rStm(rStream) {} - sal_Bool WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pConfigItem = NULL ); + bool WriteEMF( const GDIMetaFile& rMtf, FilterConfigItem* pConfigItem = NULL ); }; #endif // INCLUDED_VCL_SOURCE_FILTER_WMF_EMFWR_HXX diff --git a/vcl/source/filter/wmf/enhwmf.cxx b/vcl/source/filter/wmf/enhwmf.cxx index e2292a0b8f5f..9023c50ad3ed 100644 --- a/vcl/source/filter/wmf/enhwmf.cxx +++ b/vcl/source/filter/wmf/enhwmf.cxx @@ -236,7 +236,7 @@ static bool ImplReadRegion( PolyPolygon& rPolyPoly, SvStream& rSt, sal_uInt32 nL return bOk; } -void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC) +void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC) { if (!bEMFPlus) { pOut->PassEMFPlusHeaderInfo(); @@ -306,7 +306,7 @@ void EnhWMFReader::ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC) * skipFirst: if the first point read is the 0th point or the 1st point in the array. * */ template <class T, class Drawer> -void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const sal_Bool skipFirst) +void EnhWMFReader::ReadAndDrawPolygon(Drawer drawer, const bool skipFirst) { sal_uInt32 nPoints(0), nStartIndex(0); pWMF->SeekRel( 16 ); @@ -379,7 +379,7 @@ void EnhWMFReader::ReadAndDrawPolyLine() for ( i = 0; ( i < nPoly ) && pWMF->good(); i++ ) { Polygon aPolygon = ReadPolygon<T>(0, pnPoints[i]); - pOut->DrawPolyLine( aPolygon, sal_False, bRecordPath ); + pOut->DrawPolyLine( aPolygon, false, bRecordPath ); } delete[] pnPoints; } @@ -450,7 +450,7 @@ void EnhWMFReader::ReadAndDrawPolyPolygon() } } -sal_Bool EnhWMFReader::ReadEnhWMF() +bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStretchBltMode = 0; sal_uInt32 nRecType(0), nRecSize(0), nNextPos(0), @@ -458,8 +458,8 @@ sal_Bool EnhWMFReader::ReadEnhWMF() nDat32(0), nNom1(0), nDen1(0), nNom2(0), nDen2(0); sal_Int32 nX32(0), nY32(0), nx32(0), ny32(0); - sal_Bool bFlag(sal_False), bStatus = ReadHeader(); - sal_Bool bHaveDC = false; + bool bFlag(false), bStatus = ReadHeader(); + bool bHaveDC = false; static bool bEnableEMFPlus = ( getenv( "EMF_PLUS_DISABLE" ) == NULL ); @@ -469,7 +469,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( !pWMF->good() || ( nRecSize < 8 ) || ( nRecSize & 3 ) ) // Parameters are always divisible by 4 { - bStatus = sal_False; + bStatus = false; break; } @@ -477,7 +477,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( !pWMF->good() || nNextPos > nEndPos ) { - bStatus = sal_False; + bStatus = false; break; } @@ -488,7 +488,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() pOut->ResolveBitmapActions( aBmpSaveList ); } - bFlag = sal_False; + bFlag = false; SAL_INFO ("vcl.emf", "0x" << std::hex << (nNextPos - nRecSize) << "-0x" << nNextPos << " record type: " << std::dec << nRecType << " size: " << nRecSize << std::dec); @@ -522,21 +522,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF() switch( nRecType ) { case EMR_POLYBEZIERTO : - ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), true); break; case EMR_POLYBEZIER : - ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), false); break; case EMR_POLYGON : - ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), false); break; case EMR_POLYLINETO : - ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), true); break; case EMR_POLYLINE : - ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon<sal_Int32>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), false); break; case EMR_POLYPOLYLINE : @@ -727,7 +727,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( aSize.Width() ) aLineInfo.SetWidth( aSize.Width() ); - sal_Bool bTransparent = sal_False; + bool bTransparent = false; switch( nStyle & 0xFF ) { case PS_DASHDOTDOT : @@ -761,7 +761,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() aLineInfo.SetDistance( 100 ); break; case PS_NULL : - bTransparent = sal_True; + bTransparent = true; aLineInfo.SetStyle( LINE_NONE ); break; case PS_INSIDEFRAME : @@ -817,7 +817,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() if ( nWidth ) aLineInfo.SetWidth( nWidth ); - sal_Bool bTransparent = sal_False; + bool bTransparent = false; sal_uInt16 nDashCount = 0; sal_uInt16 nDotCount = 0; @@ -834,7 +834,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() nDashCount++; break; case PS_NULL : - bTransparent = sal_True; + bTransparent = true; aLineInfo.SetStyle( LINE_NONE ); break; @@ -938,21 +938,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF() { sal_uInt32 nStartX, nStartY, nEndX, nEndY; pWMF->ReadInt32( nX32 ).ReadInt32( nY32 ).ReadInt32( nx32 ).ReadInt32( ny32 ).ReadUInt32( nStartX ).ReadUInt32( nStartY ).ReadUInt32( nEndX ).ReadUInt32( nEndY ); - pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), sal_True ); + pOut->DrawArc( ReadRectangle( nX32, nY32, nx32, ny32 ), Point( nStartX, nStartY ), Point( nEndX, nEndY ), true ); } break; case EMR_BEGINPATH : { pOut->ClearPath(); - bRecordPath = sal_True; + bRecordPath = true; } break; case EMR_ABORTPATH : pOut->ClearPath(); case EMR_ENDPATH : - bRecordPath = sal_False; + bRecordPath = false; break; case EMR_CLOSEFIGURE : @@ -960,22 +960,22 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_FILLPATH : - pOut->StrokeAndFillPath( sal_False, sal_True ); + pOut->StrokeAndFillPath( false, true ); break; case EMR_STROKEANDFILLPATH : - pOut->StrokeAndFillPath( sal_True, sal_True ); + pOut->StrokeAndFillPath( true, true ); break; case EMR_STROKEPATH : - pOut->StrokeAndFillPath( sal_True, sal_False ); + pOut->StrokeAndFillPath( true, false ); break; case EMR_SELECTCLIPPATH : { sal_Int32 nClippingMode; pWMF->ReadInt32( nClippingMode ); - pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, sal_True ); + pOut->SetClipPath( pOut->GetPathObj(), nClippingMode, true ); } break; @@ -988,7 +988,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() PolyPolygon aPolyPoly; if ( cbRgnData ) ImplReadRegion( aPolyPoly, *pWMF, nRecSize ); - pOut->SetClipPath( aPolyPoly, iMode, sal_True ); + pOut->SetClipPath( aPolyPoly, iMode, true ); } break; @@ -1018,7 +1018,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() Rectangle aRect( Point( xDest, yDest ), Size( cxDest+1, cyDest+1 ) ); if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = sal_False; + bStatus = false; else { sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; @@ -1082,7 +1082,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() cyDest = abs( (int)cyDest ); // and also 122889 if ( (cbBitsSrc > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc) ) - bStatus = sal_False; + bStatus = false; else { sal_uInt32 nSize = cbBmiSrc + cbBitsSrc + 14; @@ -1151,7 +1151,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() || ((SAL_MAX_UINT32 - 14) - cbBitsSrc < cbBmiSrc ) ) { - bStatus = sal_False; + bStatus = false; } else { @@ -1238,7 +1238,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_EXTTEXTOUTA : - bFlag = sal_True; + bFlag = true; case EMR_EXTTEXTOUTW : { sal_Int32 nLeft, nTop, nRight, nBottom, ptlReferenceX, ptlReferenceY, nGfxMode, nXScale, nYScale; @@ -1328,21 +1328,21 @@ sal_Bool EnhWMFReader::ReadEnhWMF() break; case EMR_POLYBEZIERTO16 : - ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), true); break; case EMR_POLYBEZIER16 : - ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyBezier, _1, _2, _3, _4), false); break; case EMR_POLYGON16 : - ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolygon, _1, _2, _3, _4), false); break; case EMR_POLYLINETO16 : - ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_True); + ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), true); break; case EMR_POLYLINE16 : - ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), sal_False); + ReadAndDrawPolygon<sal_Int16>(boost::bind(&WinMtfOutput::DrawPolyLine, _1, _2, _3, _4), false); break; case EMR_POLYPOLYLINE16 : @@ -1364,7 +1364,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() { pOut->Push(); pOut->SelectObject( nIndex ); - pOut->DrawPolyPolygon( aPolyPoly, sal_False ); + pOut->DrawPolyPolygon( aPolyPoly, false ); pOut->Pop(); } } @@ -1388,7 +1388,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() pWMF->ReadUInt32( cbBits ); if ( (cbBits > (SAL_MAX_UINT32 - 14)) || ((SAL_MAX_UINT32 - 14) - cbBits < cbBmi) ) - bStatus = sal_False; + bStatus = false; else if ( offBmi ) { sal_uInt32 nSize = cbBmi + cbBits + 14; @@ -1488,7 +1488,7 @@ sal_Bool EnhWMFReader::ReadEnhWMF() }; -sal_Bool EnhWMFReader::ReadHeader() +bool EnhWMFReader::ReadHeader() { sal_uInt32 nType, nSignature, nVersion; sal_uInt32 nHeaderSize, nPalEntries; @@ -1499,7 +1499,7 @@ sal_Bool EnhWMFReader::ReadHeader() pWMF->ReadUInt32( nType ).ReadUInt32( nHeaderSize ); if ( nType != 1 ) { // per [MS-EMF] 2.3.4.2 EMF Header Record Types, type MUST be 0x00000001 SAL_WARN("vcl.emf", "EMF header type is not set to 0x00000001 - possibly corrupted file?"); - return sal_False; + return false; } // Start reading the EMR_HEADER Header object @@ -1526,7 +1526,7 @@ sal_Bool EnhWMFReader::ReadHeader() // and 2.1.14 FormatSignature Enumeration if ( nSignature != 0x464d4520 ) { SAL_WARN("vcl.emf", "EMF\t\tSignature is not 0x464d4520 (\"FME\") - possibly corrupted file?"); - return sal_False; + return false; } pWMF->ReadUInt32( nVersion ); // according to [WS-EMF] 2.2.9, this SHOULD be 0x0001000, however @@ -1555,7 +1555,7 @@ sal_Bool EnhWMFReader::ReadHeader() if ( !nRecordCount ) { SAL_WARN("vcl.emf", "EMF\t\tEMF Header object shows record counter as 0! This shouldn't " "be possible... indicator of possible file corruption?"); - return sal_False; + return false; } // the number of "handles", or graphics objects used in the metafile @@ -1591,7 +1591,7 @@ sal_Bool EnhWMFReader::ReadHeader() pOut->SetRefMill( Size( nMillX, nMillY ) ); pWMF->Seek( nStartPos + nHeaderSize ); - return sal_True; + return true; } diff --git a/vcl/source/filter/wmf/winmtf.cxx b/vcl/source/filter/wmf/winmtf.cxx index 7d0d479832b9..eca0d4f76798 100644 --- a/vcl/source/filter/wmf/winmtf.cxx +++ b/vcl/source/filter/wmf/winmtf.cxx @@ -95,7 +95,7 @@ void WinMtfPathObj::AddPoint( const Point& rPoint ) Insert( Polygon(), POLYPOLY_APPEND ); Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPoint, POLY_NORMAL ); - bClosed = sal_False; + bClosed = false; } void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) @@ -104,13 +104,13 @@ void WinMtfPathObj::AddPolyLine( const Polygon& rPolyLine ) Insert( Polygon(), POLYPOLY_APPEND ); Polygon& rPoly = ((PolyPolygon&)*this)[ Count() - 1 ]; rPoly.Insert( rPoly.GetSize(), rPolyLine ); - bClosed = sal_False; + bClosed = false; } void WinMtfPathObj::AddPolygon( const Polygon& rPoly ) { Insert( rPoly, POLYPOLY_APPEND ); - bClosed = sal_True; + bClosed = true; } void WinMtfPathObj::AddPolyPolygon( const PolyPolygon& rPolyPoly ) @@ -118,7 +118,7 @@ void WinMtfPathObj::AddPolyPolygon( const PolyPolygon& rPolyPoly ) sal_uInt16 i, nCount = rPolyPoly.Count(); for ( i = 0; i < nCount; i++ ) Insert( rPolyPoly[ i ], POLYPOLY_APPEND ); - bClosed = sal_True; + bClosed = true; } void WinMtfPathObj::ClosePath() @@ -133,7 +133,7 @@ void WinMtfPathObj::ClosePath() rPoly.Insert( rPoly.GetSize(), aFirst, POLY_NORMAL ); } } - bClosed = sal_True; + bClosed = true; } @@ -594,7 +594,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex ) break; case NULL_PEN : { - pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ) ); + pGDIObj->Set( GDI_PEN, new WinMtfLineStyle( Color( COL_TRANSPARENT ), true ) ); } break; default: @@ -611,7 +611,7 @@ void WinMtfOutput::SelectObject( sal_Int32 nIndex ) case GDI_BRUSH : { maFillStyle = (WinMtfFillStyle*)pGDIObj->pStyle; - mbFillStyleSelected = sal_True; + mbFillStyleSelected = true; } break; case GDI_FONT : @@ -813,7 +813,7 @@ void WinMtfOutput::MoveClipRegion( const Size& rSize ) aClipPath.moveClipRegion( ImplMap( rSize ) ); } -void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, sal_Bool bIsMapped ) +void WinMtfOutput::SetClipPath( const PolyPolygon& rPolyPolygon, sal_Int32 nClippingMode, bool bIsMapped ) { mbClipNeedsUpdate=true; if ( bIsMapped ) @@ -841,8 +841,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : meLatestRasterOp ( ROP_INVERT ), meRasterOp ( ROP_OVERPAINT ), maActPos ( Point() ), - mbNopMode ( sal_False ), - mbFillStyleSelected ( sal_False ), + mbNopMode ( false ), + mbFillStyleSelected ( false ), mbClipNeedsUpdate ( true ), mbComplexClip ( false ), mnGfxMode ( GM_COMPATIBLE ), @@ -861,8 +861,8 @@ WinMtfOutput::WinMtfOutput( GDIMetaFile& rGDIMetaFile ) : mnMillY ( 1 ), mpGDIMetaFile ( &rGDIMetaFile ) { - mbIsMapWinSet = sal_False; - mbIsMapDevSet = sal_False; + mbIsMapWinSet = false; + mbIsMapDevSet = false; mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_CLIPREGION ) ); // The original clipregion has to be on top // of the stack so it can always be restored // this is necessary to be able to support @@ -923,7 +923,7 @@ void WinMtfOutput::UpdateClipRegion() void WinMtfOutput::ImplSetNonPersistentLineColorTransparenz() { Color aColor( COL_TRANSPARENT); - WinMtfLineStyle aTransparentLine( aColor, sal_True ); + WinMtfLineStyle aTransparentLine( aColor, true ); if ( ! ( maLatestLineStyle == aTransparentLine ) ) { maLatestLineStyle = aTransparentLine; @@ -968,7 +968,7 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) { // changing modes from R2_NOP so set pen and brush maFillStyle = aNopFillStyle; maLineStyle = aNopLineStyle; - mbNopMode = sal_False; + mbNopMode = false; } switch( nRasterOp ) { @@ -983,13 +983,13 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) case R2_NOP: { meRasterOp = ROP_OVERPAINT; - if( mbNopMode == sal_False ) + if( !mbNopMode ) { aNopFillStyle = maFillStyle; aNopLineStyle = maLineStyle; maFillStyle = WinMtfFillStyle( Color( COL_TRANSPARENT ), true ); - maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), sal_True ); - mbNopMode = sal_True; + maLineStyle = WinMtfLineStyle( Color( COL_TRANSPARENT ), true ); + mbNopMode = true; } } break; @@ -1005,7 +1005,7 @@ sal_uInt32 WinMtfOutput::SetRasterOp( sal_uInt32 nRasterOp ) }; -void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) +void WinMtfOutput::StrokeAndFillPath( bool bStroke, bool bFill ) { if ( aPathObj.Count() ) { @@ -1017,7 +1017,7 @@ void WinMtfOutput::StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ) if ( !bStroke ) { mpGDIMetaFile->AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); + mpGDIMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); } if ( aPathObj.Count() == 1 ) mpGDIMetaFile->AddAction( new MetaPolygonAction( aPathObj.GetObject( 0 ) ) ); @@ -1044,7 +1044,7 @@ void WinMtfOutput::DrawPixel( const Point& rSource, const Color& rColor ) } -void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath ) +void WinMtfOutput::MoveTo( const Point& rPoint, bool bRecordPath ) { Point aDest( ImplMap( rPoint ) ); if ( bRecordPath ) @@ -1059,7 +1059,7 @@ void WinMtfOutput::MoveTo( const Point& rPoint, sal_Bool bRecordPath ) } -void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath ) +void WinMtfOutput::LineTo( const Point& rPoint, bool bRecordPath ) { UpdateClipRegion(); Point aDest( ImplMap( rPoint ) ); @@ -1074,7 +1074,7 @@ void WinMtfOutput::LineTo( const Point& rPoint, sal_Bool bRecordPath ) } -void WinMtfOutput::DrawRect( const Rectangle& rRect, sal_Bool bEdge ) +void WinMtfOutput::DrawRect( const Rectangle& rRect, bool bEdge ) { UpdateClipRegion(); UpdateFillStyle(); @@ -1145,7 +1145,7 @@ void WinMtfOutput::DrawEllipse( const Rectangle& rRect ) } -void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, sal_Bool bTo ) +void WinMtfOutput::DrawArc( const Rectangle& rRect, const Point& rStart, const Point& rEnd, bool bTo ) { UpdateClipRegion(); UpdateLineStyle(); @@ -1223,7 +1223,7 @@ void WinMtfOutput::DrawChord( const Rectangle& rRect, const Point& rStart, const } -void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolygon( Polygon& rPolygon, bool bRecordPath ) { UpdateClipRegion(); ImplMap( rPolygon ); @@ -1296,7 +1296,7 @@ void WinMtfOutput::DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath ) } -void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, bool bRecordPath ) { UpdateClipRegion(); @@ -1323,7 +1323,7 @@ void WinMtfOutput::DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordP } -void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, bool bTo, bool bRecordPath ) { UpdateClipRegion(); @@ -1343,7 +1343,7 @@ void WinMtfOutput::DrawPolyLine( Polygon& rPolygon, sal_Bool bTo, sal_Bool bReco } -void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRecordPath ) +void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, bool bTo, bool bRecordPath ) { UpdateClipRegion(); @@ -1374,7 +1374,7 @@ void WinMtfOutput::DrawPolyBezier( Polygon& rPolygon, sal_Bool bTo, sal_Bool bRe } -void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXArry, sal_Bool bRecordPath, sal_Int32 nGfxMode ) +void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXArry, bool bRecordPath, sal_Int32 nGfxMode ) { UpdateClipRegion(); rPosition = ImplMap( rPosition ); @@ -1443,9 +1443,9 @@ void WinMtfOutput::DrawText( Point& rPosition, OUString& rText, sal_Int32* pDXAr aTmp.SetFillColor( maBkColor ); if( mnBkMode == TRANSPARENT ) - aTmp.SetTransparent( sal_True ); + aTmp.SetTransparent( true ); else - aTmp.SetTransparent( sal_False ); + aTmp.SetTransparent( false ); if ( ( mnTextAlign & TA_BASELINE) == TA_BASELINE ) aTmp.SetAlign( ALIGN_BASELINE ); @@ -1566,7 +1566,7 @@ void WinMtfOutput::ImplDrawBitmap( const Point& rPos, const Size& rSize, const B const Point aEmptyPoint; // #i50672# Extract whole VDev content (to match size of rBitmap) - aVDev.EnableMapMode( sal_False ); + aVDev.EnableMapMode( false ); Bitmap aMask( aVDev.GetBitmap( aEmptyPoint, aSizePixel ).CreateMask( Color( COL_WHITE ) ) ); if ( aBmpEx.IsTransparent() ) @@ -1636,7 +1636,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) { // patterns aren't well supported yet sal_uInt32 nOldRop = SetRasterOp( ROP_OVERPAINT ); // in this case nRasterOperation is either 0 or 0xff UpdateFillStyle(); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); SetRasterOp( nOldRop ); } else @@ -1701,7 +1701,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0x1 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1719,7 +1719,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0x7 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1728,7 +1728,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) case 0xb : { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); SetRasterOp( R2_COPYPEN ); Bitmap aMask( aBitmap ); aBitmap.Invert(); @@ -1739,7 +1739,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0xb ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1756,7 +1756,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0xd ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1768,7 +1768,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) if ( nOperation == 0x9 ) { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } } break; @@ -1778,7 +1778,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) { // in this case nRasterOperation is either 0 or 0xff maFillStyle = WinMtfFillStyle( Color( nRasterOperation, nRasterOperation, nRasterOperation ) ); UpdateFillStyle(); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } break; @@ -1794,7 +1794,7 @@ void WinMtfOutput::ResolveBitmapActions( BSaveStructList_impl& rSaveList ) case 0x5 : // only destination is used { SetRasterOp( R2_NOT ); - DrawRect( aRect, sal_False ); + DrawRect( aRect, false ); } case 0xa : // no operation break; @@ -1830,7 +1830,7 @@ void WinMtfOutput::SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ) -void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular) +void WinMtfOutput::SetDevExt( const Size& rSize ,bool regular) { if ( rSize.Width() && rSize.Height() ) { @@ -1845,7 +1845,7 @@ void WinMtfOutput::SetDevExt( const Size& rSize ,sal_Bool regular) } if (regular) { - mbIsMapDevSet=sal_True; + mbIsMapDevSet=true; } } } @@ -1860,7 +1860,7 @@ void WinMtfOutput::ScaleDevExt( double fX, double fY ) -void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF) +void WinMtfOutput::SetWinOrg( const Point& rPoint , bool bIsEMF) { mnWinOrgX = rPoint.X(); mnWinOrgY = rPoint.Y(); @@ -1868,7 +1868,7 @@ void WinMtfOutput::SetWinOrg( const Point& rPoint , sal_Bool bIsEMF) { SetDevByWin(); } - mbIsMapWinSet=sal_True; + mbIsMapWinSet=true; } @@ -1887,14 +1887,14 @@ void WinMtfOutput::SetDevByWin() //mnWinExt...-stuff has to be assigned before. { if ( mnMapMode == MM_ISOTROPIC ) //TODO: WHAT ABOUT ANISOTROPIC??? { - SetDevExt(Size((mnWinExtX+mnWinOrgX)>>MS_FIXPOINT_BITCOUNT_28_4,-((mnWinExtY-mnWinOrgY)>>MS_FIXPOINT_BITCOUNT_28_4)),sal_False); + SetDevExt(Size((mnWinExtX+mnWinOrgX)>>MS_FIXPOINT_BITCOUNT_28_4,-((mnWinExtY-mnWinOrgY)>>MS_FIXPOINT_BITCOUNT_28_4)),false); } } } -void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF ) +void WinMtfOutput::SetWinExt( const Size& rSize, bool bIsEMF ) { if( rSize.Width() && rSize.Height() ) { @@ -1909,7 +1909,7 @@ void WinMtfOutput::SetWinExt( const Size& rSize, sal_Bool bIsEMF ) { SetDevByWin(); } - mbIsMapWinSet=sal_True; + mbIsMapWinSet=true; } } } @@ -2184,7 +2184,7 @@ void WinMtfOutput::PassEMFPlusHeaderInfo() mem.Flush(); mpGDIMetaFile->AddAction( new MetaCommentAction( "EMF_PLUS_HEADER_INFO", 0, (const sal_uInt8*) mem.GetData(), mem.GetEndOfData() ) ); - mpGDIMetaFile->UseCanvas( sal_True ); + mpGDIMetaFile->UseCanvas( true ); } void WinMtfOutput::PassEMFPlus( void* pBuffer, sal_uInt32 nLength ) diff --git a/vcl/source/filter/wmf/winmtf.hxx b/vcl/source/filter/wmf/winmtf.hxx index c20090725f6b..ab7291986de3 100644 --- a/vcl/source/filter/wmf/winmtf.hxx +++ b/vcl/source/filter/wmf/winmtf.hxx @@ -307,12 +307,12 @@ public : class WinMtfPathObj : public PolyPolygon { - sal_Bool bClosed; + bool bClosed; public : - WinMtfPathObj() { bClosed = sal_True; } - void Init() { Clear(); bClosed = sal_True; }; + WinMtfPathObj() { bClosed = true; } + void Init() { Clear(); bClosed = true; }; void ClosePath(); void AddPoint( const Point& rPoint ); void AddPolygon( const Polygon& rPoly ); @@ -400,29 +400,29 @@ struct WinMtfLineStyle { Color aLineColor; LineInfo aLineInfo; - sal_Bool bTransparent; + bool bTransparent; WinMtfLineStyle() : aLineColor ( COL_BLACK ), - bTransparent( sal_False ) {} + bTransparent( false ) {} - WinMtfLineStyle( const Color& rColor, sal_Bool bTrans = sal_False ) : + WinMtfLineStyle( const Color& rColor, bool bTrans = false ) : aLineColor ( rColor ), bTransparent( bTrans ) {} - WinMtfLineStyle( const Color& rColor, const LineInfo& rStyle, sal_Bool bTrans = sal_False ) : + WinMtfLineStyle( const Color& rColor, const LineInfo& rStyle, bool bTrans = false ) : aLineColor ( rColor ), aLineInfo ( rStyle ), bTransparent( bTrans ) {} - sal_Bool operator==( const WinMtfLineStyle& rStyle ) + bool operator==( const WinMtfLineStyle& rStyle ) { return ( ( aLineColor == rStyle.aLineColor ) && ( bTransparent == rStyle.bTransparent ) && ( aLineInfo == rStyle.aLineInfo ) ); } - sal_Bool operator==( WinMtfLineStyle* pStyle ) + bool operator==( WinMtfLineStyle* pStyle ) { return ( ( aLineColor == pStyle->aLineColor ) && ( bTransparent == pStyle->bTransparent ) @@ -485,8 +485,8 @@ struct SaveStruct WinMtfClipPath aClipPath; XForm aXForm; - sal_Bool bRecordPath; - sal_Bool bFillStyleSelected; + bool bRecordPath; + bool bFillStyleSelected; }; typedef ::boost::shared_ptr< SaveStruct > SaveStructPtr; @@ -601,10 +601,10 @@ class WinMtfOutput Point maActPos; sal_uInt32 mnRop; - sal_Bool mbNopMode; - sal_Bool mbFillStyleSelected; - sal_Bool mbClipNeedsUpdate; - sal_Bool mbComplexClip; + bool mbNopMode; + bool mbFillStyleSelected; + bool mbClipNeedsUpdate; + bool mbComplexClip; std::vector< SaveStructPtr > vSaveStack; @@ -616,8 +616,8 @@ class WinMtfOutput sal_Int32 mnDevWidth, mnDevHeight; sal_Int32 mnWinOrgX, mnWinOrgY; // aktuel window origin sal_Int32 mnWinExtX, mnWinExtY; // aktuel window extend - sal_Bool mbIsMapWinSet; - sal_Bool mbIsMapDevSet; + bool mbIsMapWinSet; + bool mbIsMapDevSet; sal_Int32 mnPixX, mnPixY; // Reference Device in pixel sal_Int32 mnMillX, mnMillY; // Reference Device in Mill @@ -648,12 +648,12 @@ public: void SetDevByWin(); //Hack to set varying defaults for incompletely defined files. void SetDevOrg( const Point& rPoint ); void SetDevOrgOffset( sal_Int32 nXAdd, sal_Int32 nYAdd ); - void SetDevExt( const Size& rSize ,sal_Bool regular = true); + void SetDevExt( const Size& rSize ,bool regular = true); void ScaleDevExt( double fX, double fY ); - void SetWinOrg( const Point& rPoint , sal_Bool bIsEMF = false); + void SetWinOrg( const Point& rPoint , bool bIsEMF = false); void SetWinOrgOffset( sal_Int32 nX, sal_Int32 nY ); - void SetWinExt( const Size& rSize , sal_Bool bIsEMF = false); + void SetWinExt( const Size& rSize , bool bIsEMF = false); void ScaleWinExt( double fX, double fY ); void SetrclBounds( const Rectangle& rRect ); @@ -671,7 +671,7 @@ public: void Pop(); sal_uInt32 SetRasterOp( sal_uInt32 nRasterOp ); - void StrokeAndFillPath( sal_Bool bStroke, sal_Bool bFill ); + void StrokeAndFillPath( bool bStroke, bool bFill ); void SetGfxMode( sal_Int32 nGfxMode ){ mnGfxMode = nGfxMode; }; sal_Int32 GetGfxMode() const { return mnGfxMode; }; @@ -692,17 +692,17 @@ public: void ClosePath(){ aPathObj.ClosePath(); }; const PolyPolygon& GetPathObj(){ return aPathObj; }; - void MoveTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); - void LineTo( const Point& rPoint, sal_Bool bRecordPath = sal_False ); + void MoveTo( const Point& rPoint, bool bRecordPath = false ); + void LineTo( const Point& rPoint, bool bRecordPath = false ); void DrawPixel( const Point& rSource, const Color& rColor ); - void DrawRect( const Rectangle& rRect, sal_Bool bEdge = sal_True ); + void DrawRect( const Rectangle& rRect, bool bEdge = true ); void DrawRoundRect( const Rectangle& rRect, const Size& rSize ); void DrawEllipse( const Rectangle& rRect ); void DrawArc( const Rectangle& rRect, const Point& rStartAngle, const Point& rEndAngle, - sal_Bool bDrawTo = sal_False + bool bDrawTo = false ); void DrawPie( const Rectangle& rRect, @@ -714,28 +714,28 @@ public: const Point& rStartAngle, const Point& rEndAngle ); - void DrawPolygon( Polygon& rPolygon, sal_Bool bRecordPath = sal_False ); - void DrawPolygon( Polygon& rPolygon, sal_Bool /*bDrawTo*/, sal_Bool bRecordPath) + void DrawPolygon( Polygon& rPolygon, bool bRecordPath = false ); + void DrawPolygon( Polygon& rPolygon, bool /*bDrawTo*/, bool bRecordPath) { //For ReadAndDrawPolygon template compatibility DrawPolygon(rPolygon, bRecordPath); } - void DrawPolyPolygon( PolyPolygon& rPolyPolygon, sal_Bool bRecordPath = sal_False ); + void DrawPolyPolygon( PolyPolygon& rPolyPolygon, bool bRecordPath = false ); void DrawPolyLine( Polygon& rPolygon, - sal_Bool bDrawTo = sal_False, - sal_Bool bRecordPath = sal_False + bool bDrawTo = false, + bool bRecordPath = false ); void DrawPolyBezier( Polygon& rPolygin, - sal_Bool bDrawTo = sal_False, - sal_Bool bRecordPath = sal_False + bool bDrawTo = false, + bool bRecordPath = false ); void DrawText( Point& rPosition, OUString& rString, sal_Int32* pDXArry = NULL, - sal_Bool bRecordPath = sal_False, + bool bRecordPath = false, sal_Int32 nGraphicsMode = GM_COMPATIBLE ); void ResolveBitmapActions( BSaveStructList_impl& rSaveList ); @@ -746,7 +746,7 @@ public: void SetClipPath( const PolyPolygon& rPolyPoly, sal_Int32 nClippingMode, - sal_Bool bIsMapped + bool bIsMapped ); void UpdateClipRegion(); void AddFromGDIMetaFile( GDIMetaFile& rGDIMetaFile ); @@ -791,12 +791,12 @@ protected: class EnhWMFReader : public WinMtf { - sal_Bool bRecordPath; + bool bRecordPath; sal_Int32 nRecordCount; - sal_Bool bEMFPlus; + bool bEMFPlus; - sal_Bool ReadHeader(); + bool ReadHeader(); // reads and converts the rectangle Rectangle ReadRectangle( sal_Int32, sal_Int32, sal_Int32, sal_Int32 ); @@ -809,18 +809,18 @@ public: : WinMtf( new WinMtfOutput( rGDIMetaFile ) , rStreamWMF , pConfigItem ) - , bRecordPath( sal_False ) - , bEMFPlus( sal_False ) + , bRecordPath( false ) + , bEMFPlus( false ) {}; ~EnhWMFReader(); - sal_Bool ReadEnhWMF(); - void ReadEMFPlusComment(sal_uInt32 length, sal_Bool& bHaveDC); + bool ReadEnhWMF(); + void ReadEMFPlusComment(sal_uInt32 length, bool& bHaveDC); private: template <class T> void ReadAndDrawPolyPolygon(); template <class T> void ReadAndDrawPolyLine(); template <class T> Polygon ReadPolygon(sal_uInt32 nStartIndex, sal_uInt32 nPoints); - template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const sal_Bool skipFirst); + template <class T, class Drawer> void ReadAndDrawPolygon(Drawer drawer, const bool skipFirst); }; //============================ WMFReader ================================== @@ -851,7 +851,7 @@ private: WMF_EXTERNALHEADER* pExternalHeader; // reads header of the WMF-Datei - sal_Bool ReadHeader(); + bool ReadHeader(); // reads parameters of the record with the functionnumber nFunction. void ReadRecordParams( sal_uInt16 nFunction ); @@ -860,7 +860,7 @@ private: Point ReadYX(); // reads and converts a point (first Y then X) Rectangle ReadRectangle(); // reads and converts a rectangle Size ReadYXExt(); - sal_Bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); + bool GetPlaceableBound( Rectangle& rSize, SvStream* pStrm ); public: diff --git a/vcl/source/filter/wmf/winwmf.cxx b/vcl/source/filter/wmf/winwmf.cxx index f53e396bc3ce..8d6fd89787aa 100644 --- a/vcl/source/filter/wmf/winwmf.cxx +++ b/vcl/source/filter/wmf/winwmf.cxx @@ -748,7 +748,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) if ( nWidth ) aLineInfo.SetWidth( nWidth ); - sal_Bool bTransparent = sal_False; + bool bTransparent = false; switch( nStyle & 0xFF ) { case PS_DASHDOTDOT : @@ -782,7 +782,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) aLineInfo.SetDistance( 100 ); break; case PS_NULL : - bTransparent = sal_True; + bTransparent = true; aLineInfo.SetStyle( LINE_NONE ); break; default : @@ -891,7 +891,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) pWMF->ReadUInt32( nROP ); Size aSize = ReadYXExt(); nOldROP = pOut->SetRasterOp( nROP ); - pOut->DrawRect( Rectangle( ReadYX(), aSize ), sal_False ); + pOut->DrawRect( Rectangle( ReadYX(), aSize ), false ); pOut->SetRasterOp( nOldROP ); } break; @@ -903,7 +903,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) if ( !nObjIndex ) { PolyPolygon aEmptyPolyPoly; - pOut->SetClipPath( aEmptyPolyPoly, RGN_COPY, sal_True ); + pOut->SetClipPath( aEmptyPolyPoly, RGN_COPY, true ); } } break; @@ -1091,7 +1091,7 @@ void WMFReader::ReadRecordParams( sal_uInt16 nFunc ) // ------------------------------------------------------------------------ -sal_Bool WMFReader::ReadHeader() +bool WMFReader::ReadHeader() { sal_Size nStrmPos = pWMF->Tell(); @@ -1200,7 +1200,7 @@ void WMFReader::ReadWMF() nEMFRec = 0; nEMFSize = 0; - sal_Bool bEMFAvailable = sal_False; + bool bEMFAvailable = false; pOut->SetMapMode( MM_ANISOTROPIC ); pOut->SetWinOrg( Point() ); @@ -1306,9 +1306,9 @@ void WMFReader::ReadWMF() // ------------------------------------------------------------------------ -sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) +bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pStm ) { - sal_Bool bRet = sal_True; + bool bRet = true; rPlaceableBound.Left() = (sal_Int32)0x7fffffff; rPlaceableBound.Top() = (sal_Int32)0x7fffffff; @@ -1335,7 +1335,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if( pStm->IsEof() ) { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; } break; } @@ -1419,7 +1419,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if (!bRecordOk) { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; break; } @@ -1431,7 +1431,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt if (!bRecordOk) { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; break; } } @@ -1531,7 +1531,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt else { pStm->SetError( SVSTREAM_FILEFORMAT_ERROR ); - bRet = sal_False; + bRet = false; } } @@ -1539,7 +1539,7 @@ sal_Bool WMFReader::GetPlaceableBound( Rectangle& rPlaceableBound, SvStream* pSt else { pStm->SetError( SVSTREAM_GENERALERROR ); - bRet = sal_False; + bRet = false; } return bRet; } diff --git a/vcl/source/filter/wmf/wmf.cxx b/vcl/source/filter/wmf/wmf.cxx index 002756aaaeed..f9e51a2a8724 100644 --- a/vcl/source/filter/wmf/wmf.cxx +++ b/vcl/source/filter/wmf/wmf.cxx @@ -27,7 +27,7 @@ // ----------------------------------------------------------------------------- -sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem, WMF_EXTERNALHEADER *pExtHeader ) +bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaFile, FilterConfigItem* pConfigItem, WMF_EXTERNALHEADER *pExtHeader ) { sal_uInt32 nMetaType; sal_uInt32 nOrgPos = rStreamWMF.Tell(); @@ -38,7 +38,7 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaF rStreamWMF.Seek( nOrgPos ); if ( nMetaType == 0x464d4520 ) { - if ( EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() == sal_False ) + if ( !EnhWMFReader( rStreamWMF, rGDIMetaFile, pConfigItem ).ReadEnhWMF() ) rStreamWMF.SetError( SVSTREAM_FILEFORMAT_ERROR ); } else @@ -58,7 +58,7 @@ sal_Bool ConvertWMFToGDIMetaFile( SvStream & rStreamWMF, GDIMetaFile & rGDIMetaF // ----------------------------------------------------------------------------- -sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) +bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigItem* pFilterConfigItem ) { sal_uInt32 nMetaType(0); sal_uInt32 nOrgPos = rStream.Tell(); @@ -79,7 +79,7 @@ sal_Bool ReadWindowMetafile( SvStream& rStream, GDIMetaFile& rMTF, FilterConfigI if ( nMetaType == 0x464d4520 ) { - if ( EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() == sal_False ) + if ( !EnhWMFReader( rStream, rMTF, NULL ).ReadEnhWMF() ) rStream.SetError( SVSTREAM_FILEFORMAT_ERROR ); } else @@ -111,7 +111,7 @@ bool ConvertGDIMetaFileToWMF( const GDIMetaFile & rMTF, SvStream & rTargetStream // ----------------------------------------------------------------------------- -sal_Bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, +bool ConvertGDIMetaFileToEMF( const GDIMetaFile & rMTF, SvStream & rTargetStream, FilterConfigItem* pConfigItem ) { EMFWriter aEMFWriter(rTargetStream); diff --git a/vcl/source/fontsubset/gsub.cxx b/vcl/source/fontsubset/gsub.cxx index e51fb2ee34f3..68ba4014714d 100644 --- a/vcl/source/fontsubset/gsub.cxx +++ b/vcl/source/fontsubset/gsub.cxx @@ -325,7 +325,7 @@ void ReleaseGSUB(struct _TrueTypeFont* pTTFile) delete pGlyphSubstitution; } -int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph, int /*wmode*/ ) +int UseGSUB( struct _TrueTypeFont* pTTFile, int nGlyph, bool /*wmode*/ ) { GlyphSubstitution* pGlyphSubstitution = (GlyphSubstitution*)pTTFile->pGSubstitution; if( pGlyphSubstitution != 0 ) diff --git a/vcl/source/fontsubset/gsub.h b/vcl/source/fontsubset/gsub.h index b4111e48fa88..ece5aae1195e 100644 --- a/vcl/source/fontsubset/gsub.h +++ b/vcl/source/fontsubset/gsub.h @@ -25,7 +25,7 @@ namespace vcl int HasVerticalGSUB( struct vcl::_TrueTypeFont* pTTFile ); -int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, int wmode ); +int UseGSUB( struct vcl::_TrueTypeFont* pTTFile, int nGlyph, bool wmode ); bool ReadGSUB( struct vcl::_TrueTypeFont* pTTFile, int nRequestedScript, int nRequestedLangsys ); diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index caf84587cb65..93257adc2ef3 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -2237,7 +2237,7 @@ int CreateT42FromTTGlyphs(TrueTypeFont *ttf, #ifndef NO_MAPPERS -int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, int bvertical) +int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphArray, bool bvertical) { int i; sal_uInt16 *cp; @@ -2281,7 +2281,7 @@ int MapString(TrueTypeFont *ttf, sal_uInt16 *str, int nchars, sal_uInt16 *glyphA for (i = 0; i < nchars; i++) { cp[i] = (sal_uInt16)ttf->mapper(ttf->cmap, cp[i]); - if (cp[i]!=0 && bvertical!=0) + if (cp[i]!=0 && bvertical) cp[i] = (sal_uInt16)UseGSUB(ttf,cp[i],bvertical); } return nchars; diff --git a/vcl/source/gdi/alpha.cxx b/vcl/source/gdi/alpha.cxx index 8a58bb1a8e65..7e1721e3dd55 100644 --- a/vcl/source/gdi/alpha.cxx +++ b/vcl/source/gdi/alpha.cxx @@ -75,14 +75,14 @@ Bitmap AlphaMask::GetBitmap() const return ImplGetBitmap(); } -sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, +bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const AlphaMask* pAlphaSrc ) { // Note: this code is copied from Bitmap::CopyPixel but avoids any palette lookups // This optimization is possible because the palettes of AlphaMasks are always identical (8bit GreyPalette, see ctor) const Size aSizePix( GetSizePixel() ); Rectangle aRectDst( rRectDst ); - sal_Bool bRet = sal_False; + bool bRet = false; aRectDst.Intersection( Rectangle( Point(), aSizePix ) ); @@ -173,7 +173,7 @@ sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRect } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } } } @@ -183,16 +183,16 @@ sal_Bool AlphaMask::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRect } -sal_Bool AlphaMask::Erase( sal_uInt8 cTransparency ) +bool AlphaMask::Erase( sal_uInt8 cTransparency ) { return Bitmap::Erase( Color( cTransparency, cTransparency, cTransparency ) ); } -sal_Bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) +bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency ) { BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pMaskAcc && pAcc ) { @@ -213,14 +213,14 @@ sal_Bool AlphaMask::Replace( const Bitmap& rMask, sal_uInt8 cReplaceTransparency return bRet; } -sal_Bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong +bool AlphaMask::Replace( sal_uInt8 cSearchTransparency, sal_uInt8 cReplaceTransparency, sal_uLong #ifdef DBG_UTIL nTol #endif ) { BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; DBG_ASSERT( !nTol, "AlphaMask::Replace: nTol not used yet" ); @@ -255,7 +255,7 @@ nTol } } - bRet = sal_True; + bRet = true; } if( pAcc ) diff --git a/vcl/source/gdi/animate.cxx b/vcl/source/gdi/animate.cxx index b0e3a492ab83..abc068958353 100644 --- a/vcl/source/gdi/animate.cxx +++ b/vcl/source/gdi/animate.cxx @@ -67,9 +67,9 @@ Animation::Animation() : mnLoops ( 0 ), mnPos ( 0 ), meCycleMode ( CYCLE_NORMAL ), - mbIsInAnimation ( sal_False ), - mbLoopTerminated ( sal_False ), - mbIsWaiting ( sal_False ) + mbIsInAnimation ( false ), + mbLoopTerminated ( false ), + mbIsWaiting ( false ) { maTimer.SetTimeoutHdl( LINK( this, Animation, ImplTimeoutHdl ) ); } @@ -80,7 +80,7 @@ Animation::Animation( const Animation& rAnimation ) : mnLoopCount ( rAnimation.mnLoopCount ), mnPos ( rAnimation.mnPos ), meCycleMode ( rAnimation.meCycleMode ), - mbIsInAnimation ( sal_False ), + mbIsInAnimation ( false ), mbLoopTerminated ( rAnimation.mbLoopTerminated ), mbIsWaiting ( rAnimation.mbIsWaiting ) { @@ -153,7 +153,7 @@ bool Animation::operator==( const Animation& rAnimation ) const void Animation::Clear() { maTimer.Stop(); - mbIsInAnimation = sal_False; + mbIsInAnimation = false; maGlobalSize = Size(); maBitmapEx.SetEmpty(); @@ -166,11 +166,11 @@ void Animation::Clear() maViewList.clear(); } -sal_Bool Animation::IsTransparent() const +bool Animation::IsTransparent() const { Point aPoint; Rectangle aRect( aPoint, maGlobalSize ); - sal_Bool bRet = sal_False; + bool bRet = false; // If some small bitmap needs to be replaced by the background, // we need to be transparent, in order to be displayed correctly @@ -184,7 +184,7 @@ sal_Bool Animation::IsTransparent() const && Rectangle( pAnimBmp->aPosPix, pAnimBmp->aSizePix ) != aRect ) { - bRet = sal_True; + bRet = true; break; } } @@ -234,10 +234,10 @@ sal_uLong Animation::GetChecksum() const return nCrc; } -sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData, +bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& rDestSz, long nExtraData, OutputDevice* pFirstFrameOutDev ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !maList.empty() ) { @@ -274,7 +274,7 @@ sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& if( maViewList.empty() ) { maTimer.Stop(); - mbIsInAnimation = sal_False; + mbIsInAnimation = false; mnPos = 0UL; } @@ -284,13 +284,13 @@ sal_Bool Animation::Start( OutputDevice* pOut, const Point& rDestPt, const Size& if( !mbIsInAnimation ) { ImplRestartTimer( maList[ mnPos ]->nWait ); - mbIsInAnimation = sal_True; + mbIsInAnimation = true; } } else Draw( pOut, rDestPt, rDestSz ); - bRet = sal_True; + bRet = true; } return bRet; @@ -315,7 +315,7 @@ void Animation::Stop( OutputDevice* pOut, long nExtraData ) if( maViewList.empty() ) { maTimer.Stop(); - mbIsInAnimation = sal_False; + mbIsInAnimation = false; } } @@ -391,7 +391,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) pView = (ImplAnimView*) pAInfo->pViewData; pView->ImplPause( pAInfo->bPause ); - pView->ImplSetMarked( sal_True ); + pView->ImplSetMarked( true ); } // delete AInfo structures @@ -413,7 +413,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) if( !pView->ImplIsPause() ) bGlobalPause = false; - pView->ImplSetMarked( sal_False ); + pView->ImplSetMarked( false ); i++; } } @@ -434,7 +434,7 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) if( mnLoops == 1 ) { Stop(); - mbLoopTerminated = sal_True; + mbLoopTerminated = true; mnPos = nAnimCount - 1UL; maBitmapEx = maList[ mnPos ]->aBmpEx; return 0L; @@ -480,9 +480,9 @@ IMPL_LINK_NOARG(Animation, ImplTimeoutHdl) return 0L; } -sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp ) +bool Animation::Insert( const AnimationBitmap& rStepBmp ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !IsInAnimation() ) { @@ -496,7 +496,7 @@ sal_Bool Animation::Insert( const AnimationBitmap& rStepBmp ) if( maList.size() == 1 ) maBitmapEx = rStepBmp.aBmpEx; - bRet = sal_True; + bRet = true; } return bRet; @@ -541,18 +541,18 @@ void Animation::SetLoopCount( const sal_uLong nLoopCount ) void Animation::ResetLoopCount() { mnLoops = mnLoopCount; - mbLoopTerminated = sal_False; + mbLoopTerminated = false; } -sal_Bool Animation::Convert( BmpConversion eConversion ) +bool Animation::Convert( BmpConversion eConversion ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.Convert( eConversion ); @@ -560,20 +560,20 @@ sal_Bool Animation::Convert( BmpConversion eConversion ) maBitmapEx.Convert( eConversion ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) +bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.ReduceColors( nNewColorCount, eReduce ); @@ -581,20 +581,20 @@ sal_Bool Animation::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) maBitmapEx.ReduceColors( nNewColorCount, eReduce ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Invert() +bool Animation::Invert() { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.Invert(); @@ -602,27 +602,27 @@ sal_Bool Animation::Invert() maBitmapEx.Invert(); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Mirror( sal_uLong nMirrorFlags ) +bool Animation::Mirror( sal_uLong nMirrorFlags ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; if( nMirrorFlags ) { for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) { AnimationBitmap* pStepBmp = maList[ i ]; - if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) == sal_True ) + if( ( bRet = pStepBmp->aBmpEx.Mirror( nMirrorFlags ) ) ) { if( nMirrorFlags & BMP_MIRROR_HORZ ) pStepBmp->aPosPix.X() = maGlobalSize.Width() - pStepBmp->aPosPix.X() - pStepBmp->aSizePix.Width(); @@ -636,22 +636,22 @@ sal_Bool Animation::Mirror( sal_uLong nMirrorFlags ) } } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, +bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, - double fGamma, sal_Bool bInvert ) + double fGamma, bool bInvert ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) { @@ -669,20 +669,20 @@ sal_Bool Animation::Adjust( short nLuminancePercent, short nContrastPercent, fGamma, bInvert ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) { DBG_ASSERT( !IsInAnimation(), "Animation modified while it is animated" ); - sal_Bool bRet; + bool bRet; if( !IsInAnimation() && !maList.empty() ) { - bRet = sal_True; + bRet = true; for( size_t i = 0, n = maList.size(); ( i < n ) && bRet; ++i ) bRet = maList[ i ]->aBmpEx.Filter( eFilter, pFilterParam, pProgress ); @@ -690,7 +690,7 @@ sal_Bool Animation::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterPara maBitmapEx.Filter( eFilter, pFilterParam, pProgress ); } else - bRet = sal_False; + bRet = false; return bRet; } @@ -777,7 +777,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation ) BitmapEx aBmpEx; sal_uInt32 nTmp32; sal_uInt16 nTmp16; - sal_uInt8 cTmp; + bool cTmp; do { @@ -787,7 +787,7 @@ SvStream& ReadAnimation( SvStream& rIStm, Animation& rAnimation ) ReadPair( rIStm, rAnimation.maGlobalSize ); rIStm.ReadUInt16( nTmp16 ); aAnimBmp.nWait = ( ( 65535 == nTmp16 ) ? ANIMATION_TIMEOUT_ON_CLICK : nTmp16 ); rIStm.ReadUInt16( nTmp16 ); aAnimBmp.eDisposal = ( Disposal) nTmp16; - rIStm.ReadUChar( cTmp ); aAnimBmp.bUserInput = (sal_Bool) cTmp; + rIStm.ReadCharAsBool( cTmp ); aAnimBmp.bUserInput = cTmp; rIStm.ReadUInt32( nTmp32 ); rAnimation.mnLoopCount = (sal_uInt16) nTmp32; rIStm.ReadUInt32( nTmp32 ); // Unused rIStm.ReadUInt32( nTmp32 ); // Unused diff --git a/vcl/source/gdi/bitmap.cxx b/vcl/source/gdi/bitmap.cxx index 41fff7466179..9ecb8fa74865 100644 --- a/vcl/source/gdi/bitmap.cxx +++ b/vcl/source/gdi/bitmap.cxx @@ -240,7 +240,7 @@ Bitmap& Bitmap::operator=( const Bitmap& rBitmap ) return *this; } -sal_Bool Bitmap::IsEqual( const Bitmap& rBmp ) const +bool Bitmap::IsEqual( const Bitmap& rBmp ) const { return( IsSameInstance( rBmp ) || ( rBmp.GetSizePixel() == GetSizePixel() && @@ -267,10 +267,10 @@ sal_uInt16 Bitmap::GetBitCount() const return( mpImpBmp ? mpImpBmp->ImplGetBitCount() : 0 ); } -sal_Bool Bitmap::HasGreyPalette() const +bool Bitmap::HasGreyPalette() const { const sal_uInt16 nBitCount = GetBitCount(); - sal_Bool bRet = nBitCount == 1 ? sal_True : sal_False; + bool bRet = nBitCount == 1 ? sal_True : sal_False; BitmapReadAccess* pRAcc = ( (Bitmap*) this )->AcquireReadAccess(); @@ -431,13 +431,13 @@ void Bitmap::ReleaseAccess( BitmapReadAccess* pBitmapAccess ) delete pBitmapAccess; } -sal_Bool Bitmap::Erase( const Color& rFillColor ) +bool Bitmap::Erase( const Color& rFillColor ) { if( !(*this) ) - return sal_True; + return true; BitmapWriteAccess* pWriteAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pWriteAcc ) { @@ -505,16 +505,16 @@ sal_Bool Bitmap::Erase( const Color& rFillColor ) } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::Invert() +bool Bitmap::Invert() { BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc ) { @@ -539,17 +539,17 @@ sal_Bool Bitmap::Invert() } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) +bool Bitmap::Mirror( sal_uLong nMirrorFlags ) { bool bHorz = ( ( nMirrorFlags & BMP_MIRROR_HORZ ) == BMP_MIRROR_HORZ ); bool bVert = ( ( nMirrorFlags & BMP_MIRROR_VERT ) == BMP_MIRROR_VERT ); - sal_Bool bRet = sal_False; + bool bRet = false; if( bHorz && !bVert ) { @@ -574,7 +574,7 @@ sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } else if( bVert && !bHorz ) @@ -598,7 +598,7 @@ sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) delete[] pBuffer; ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } else if( bHorz && bVert ) @@ -635,24 +635,24 @@ sal_Bool Bitmap::Mirror( sal_uLong nMirrorFlags ) } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } else - bRet = sal_True; + bRet = true; return bRet; } -sal_Bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) +bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; nAngle10 %= 3600L; nAngle10 = ( nAngle10 < 0L ) ? ( 3599L + nAngle10 ) : nAngle10; if( !nAngle10 ) - bRet = sal_True; + bRet = true; else if( 1800L == nAngle10 ) bRet = Mirror( BMP_MIRROR_HORZ | BMP_MIRROR_VERT ); else @@ -778,18 +778,18 @@ sal_Bool Bitmap::Rotate( long nAngle10, const Color& rFillColor ) ReleaseAccess( pReadAcc ); } - if( ( bRet = !!aRotatedBmp ) == sal_True ) + if( ( bRet = !!aRotatedBmp ) ) ImplAssignWithSize( aRotatedBmp ); } return bRet; }; -sal_Bool Bitmap::Crop( const Rectangle& rRectPixel ) +bool Bitmap::Crop( const Rectangle& rRectPixel ) { const Size aSizePix( GetSizePixel() ); Rectangle aRect( rRectPixel ); - sal_Bool bRet = sal_False; + bool bRet = false; aRect.Intersection( Rectangle( Point(), aSizePix ) ); @@ -816,7 +816,7 @@ sal_Bool Bitmap::Crop( const Rectangle& rRectPixel ) pWriteAcc->SetPixel( nY, nX, pReadAcc->GetPixel( nY2, nX2 ) ); aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -829,12 +829,12 @@ sal_Bool Bitmap::Crop( const Rectangle& rRectPixel ) return bRet; }; -sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst, +bool Bitmap::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const Bitmap* pBmpSrc ) { const Size aSizePix( GetSizePixel() ); Rectangle aRectDst( rRectDst ); - sal_Bool bRet = sal_False; + bool bRet = false; aRectDst.Intersection( Rectangle( Point(), aSizePix ) ); @@ -1006,7 +1006,7 @@ sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst, } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } } } @@ -1015,9 +1015,9 @@ sal_Bool Bitmap::CopyPixel( const Rectangle& rRectDst, return bRet; } -sal_Bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) +bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( nDX || nDY ) { @@ -1061,7 +1061,7 @@ sal_Bool Bitmap::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor ) pWriteAcc->SetPixel( nY, nX, aColor ); aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -1078,7 +1078,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const { Bitmap aNewBmp( GetSizePixel(), 1 ); BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pWriteAcc ) { @@ -1247,7 +1247,7 @@ Bitmap Bitmap::CreateMask( const Color& rTransColor, sal_uLong nTol ) const } ( (Bitmap*) this )->ReleaseAccess( pReadAcc ); - bRet = sal_True; + bRet = true; } aNewBmp.ReleaseAccess( pWriteAcc ); @@ -1369,11 +1369,11 @@ Region Bitmap::CreateRegion( const Color& rColor, const Rectangle& rRect ) const return aRegion; } -sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) +bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) { BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pMaskAcc && pAcc ) { @@ -1434,7 +1434,7 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) if( pMaskAcc->GetPixel( nY, nX ) == aMaskWhite ) pAcc->SetPixel( nY, nX, aReplace ); - bRet = sal_True; + bRet = true; } ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc ); @@ -1443,13 +1443,13 @@ sal_Bool Bitmap::Replace( const Bitmap& rMask, const Color& rReplaceColor ) return bRet; } -sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) +bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) { Bitmap aNewBmp( GetSizePixel(), 24 ); BitmapReadAccess* pAcc = AcquireReadAccess(); BitmapReadAccess* pAlphaAcc = ( (AlphaMask&) rAlpha ).AcquireReadAccess(); BitmapWriteAccess* pNewAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc && pAlphaAcc && pNewAcc ) { @@ -1466,7 +1466,7 @@ sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) } } - bRet = sal_True; + bRet = true; } ReleaseAccess( pAcc ); @@ -1487,7 +1487,7 @@ sal_Bool Bitmap::Replace( const AlphaMask& rAlpha, const Color& rMergeColor ) return bRet; } -sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) +bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) { // Bitmaps with 1 bit color depth can cause problems // if they have other entries than black/white in their palette @@ -1495,7 +1495,7 @@ sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, Convert( BMP_CONVERSION_4BIT_COLORS ); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc ) { @@ -1542,13 +1542,13 @@ sal_Bool Bitmap::Replace( const Color& rSearchColor, const Color& rReplaceColor, } ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, +bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, sal_uLong* _pTols ) { // Bitmaps with 1 bit color depth can cause problems @@ -1557,7 +1557,7 @@ sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColor Convert( BMP_CONVERSION_4BIT_COLORS ); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAcc ) { @@ -1649,7 +1649,7 @@ sal_Bool Bitmap::Replace( const Color* pSearchColors, const Color* pReplaceColor delete[] pMinB; delete[] pMaxB; ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } return bRet; @@ -1672,11 +1672,11 @@ Bitmap Bitmap::CreateDisplayBitmap( OutputDevice* pDisplay ) return aDispBmp; } -sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) +bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) { BitmapReadAccess* pMaskAcc = ( (Bitmap&) rMask ).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pMaskAcc && pAcc ) { @@ -1800,7 +1800,7 @@ sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) break; } - bRet = sal_True; + bRet = true; } ( (Bitmap&) rMask ).ReleaseAccess( pMaskAcc ); @@ -1811,7 +1811,7 @@ sal_Bool Bitmap::CombineSimple( const Bitmap& rMask, BmpCombine eCombine ) // TODO: Have a look at OutputDevice::ImplDrawAlpha() for some // optimizations. Might even consolidate the code here and there. -sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) +bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) { // Convert to a truecolor bitmap, if we're a paletted one. There's // room for tradeoff decision here, maybe later for an overload (or a flag) @@ -1820,7 +1820,7 @@ sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) BitmapReadAccess* pAlphaAcc = const_cast<AlphaMask&>(rAlpha).AcquireReadAccess(); BitmapWriteAccess* pAcc = AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pAlphaAcc && pAcc ) { @@ -1833,7 +1833,7 @@ sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) pAcc->GetPixel( nY, nX ).Merge( rBackgroundColor, 255 - pAlphaAcc->GetPixelIndex( nY, nX ) ) ); - bRet = sal_True; + bRet = true; } const_cast<AlphaMask&>(rAlpha).ReleaseAccess( pAlphaAcc ); @@ -1842,7 +1842,7 @@ sal_Bool Bitmap::Blend( const AlphaMask& rAlpha, const Color& rBackgroundColor ) return bRet; } -sal_Bool Bitmap::MakeMono( sal_uInt8 cThreshold ) +bool Bitmap::MakeMono( sal_uInt8 cThreshold ) { return ImplMakeMono( cThreshold ); } diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx index 87333ee4f4a6..73029540a90b 100644 --- a/vcl/source/gdi/bitmap3.cxx +++ b/vcl/source/gdi/bitmap3.cxx @@ -236,10 +236,10 @@ void ImplCreateDitherMatrix( sal_uInt8 (*pDitherMatrix)[16][16] ) (*pDitherMatrix)[i][j] = (sal_uInt8) ( fVal * pMtx[i][j] ); } -sal_Bool Bitmap::Convert( BmpConversion eConversion ) +bool Bitmap::Convert( BmpConversion eConversion ) { const sal_uInt16 nBitCount = GetBitCount(); - sal_Bool bRet = sal_False; + bool bRet = false; switch( eConversion ) { @@ -262,7 +262,7 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) else if( nBitCount > 4 ) bRet = ImplConvertDown( 4, NULL ); else - bRet = sal_True; + bRet = true; } break; @@ -288,7 +288,7 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) else if( nBitCount > 8 ) bRet = ImplConvertDown( 8 ); else - bRet = sal_True; + bRet = true; } break; @@ -308,7 +308,7 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) if( nBitCount < 24 ) bRet = ImplConvertUp( 24, NULL ); else - bRet = sal_True; + bRet = true; } break; @@ -324,10 +324,10 @@ sal_Bool Bitmap::Convert( BmpConversion eConversion ) return bRet; } -sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) +bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -376,7 +376,7 @@ sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -396,10 +396,10 @@ sal_Bool Bitmap::ImplMakeMono( sal_uInt8 cThreshold ) return bRet; } -sal_Bool Bitmap::ImplMakeMonoDither() +bool Bitmap::ImplMakeMonoDither() { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -451,7 +451,7 @@ sal_Bool Bitmap::ImplMakeMonoDither() } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -471,12 +471,12 @@ sal_Bool Bitmap::ImplMakeMonoDither() return bRet; } -sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) +bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) { DBG_ASSERT( nGreys == 16 || nGreys == 256, "Only 16 or 256 greyscales are supported!" ); BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -557,7 +557,7 @@ sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -576,19 +576,19 @@ sal_Bool Bitmap::ImplMakeGreyscales( sal_uInt16 nGreys ) else { ReleaseAccess( pReadAcc ); - bRet = sal_True; + bRet = true; } } return bRet; } -sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) +bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) { DBG_ASSERT( nBitCount > GetBitCount(), "New BitCount must be greater!" ); BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -637,7 +637,7 @@ sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -657,12 +657,12 @@ sal_Bool Bitmap::ImplConvertUp( sal_uInt16 nBitCount, Color* pExtColor ) return bRet; } -sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) +bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) { DBG_ASSERT( nBitCount <= GetBitCount(), "New BitCount must be lower ( or equal when pExtColor is set )!" ); BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -761,7 +761,7 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) delete[] pErrQuad2; aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -781,11 +781,11 @@ sal_Bool Bitmap::ImplConvertDown( sal_uInt16 nBitCount, Color* pExtColor ) return bRet; } -sal_Bool Bitmap::ImplConvertGhosted() +bool Bitmap::ImplConvertGhosted() { Bitmap aNewBmp; BitmapReadAccess* pR = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pR ) { @@ -808,7 +808,7 @@ sal_Bool Bitmap::ImplConvertGhosted() { pW->CopyBuffer( *pR ); aNewBmp.ReleaseAccess( pW ); - bRet = sal_True; + bRet = true; } } else @@ -834,7 +834,7 @@ sal_Bool Bitmap::ImplConvertGhosted() } aNewBmp.ReleaseAccess( pW ); - bRet = sal_True; + bRet = true; } } @@ -855,7 +855,7 @@ sal_Bool Bitmap::ImplConvertGhosted() return bRet; } -sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) +bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) { bool bRetval(false); @@ -948,7 +948,7 @@ sal_Bool Bitmap::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 // ------------------------------------------------------------------------ -sal_Bool Bitmap::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) +bool Bitmap::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) { const Size aSize( GetSizePixel() ); bool bRet; @@ -1024,12 +1024,12 @@ void Bitmap::ImplAdaptBitCount(Bitmap& rNew) const } } -sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) +bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) { const Size aSizePix( GetSizePixel() ); const long nNewWidth = FRound( aSizePix.Width() * rScaleX ); const long nNewHeight = FRound( aSizePix.Height() * rScaleY ); - sal_Bool bRet = sal_False; + bool bRet = false; if( nNewWidth && nNewHeight ) { @@ -1076,7 +1076,7 @@ sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) nActY++; } - bRet = sal_True; + bRet = true; aNewBmp.ReleaseAccess( pWriteAcc ); } @@ -1093,12 +1093,12 @@ sal_Bool Bitmap::ImplScaleFast( const double& rScaleX, const double& rScaleY ) return bRet; } -sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY ) +bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rScaleY ) { const Size aSizePix( GetSizePixel() ); const long nNewWidth = FRound( aSizePix.Width() * rScaleX ); const long nNewHeight = FRound( aSizePix.Height() * rScaleY ); - sal_Bool bRet = sal_False; + bool bRet = false; if( ( nNewWidth > 1L ) && ( nNewHeight > 1L ) ) { @@ -1185,7 +1185,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca delete[] pLutInt; delete[] pLutFrac; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -1193,7 +1193,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca if( bRet ) { - bRet = sal_False; + bRet = false; const Bitmap aOriginal(*this); *this = aNewBmp; aNewBmp = Bitmap( Size( nNewWidth, nNewHeight ), 24 ); @@ -1257,7 +1257,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca delete[] pLutInt; delete[] pLutFrac; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -1281,7 +1281,7 @@ sal_Bool Bitmap::ImplScaleInterpolate( const double& rScaleX, const double& rSca // #i121233# Added BMP_SCALE_SUPER from symphony code -sal_Bool Bitmap::ImplScaleSuper( +bool Bitmap::ImplScaleSuper( const double& rScaleX, const double& rScaleY ) { @@ -2140,7 +2140,7 @@ namespace } } - sal_Bool ImplScaleConvolutionHor( + bool ImplScaleConvolutionHor( Bitmap& rSource, Bitmap& rTarget, const double& rScaleX, @@ -2333,7 +2333,7 @@ namespace // #i121233# Added BMP_SCALE_LANCZOS, BMP_SCALE_BICUBIC, BMP_SCALE_BILINEAR and // BMP_SCALE_BOX derived from the original commit from Tomas Vajngerl (see // bugzilla task for deitails) Thanks! -sal_Bool Bitmap::ImplScaleConvolution( +bool Bitmap::ImplScaleConvolution( const double& rScaleX, const double& rScaleY, const Kernel& aKernel) @@ -2444,14 +2444,14 @@ sal_Bool Bitmap::ImplScaleConvolution( // ------------------------------------------------------------------------ -sal_Bool Bitmap::Dither( sal_uLong nDitherFlags ) +bool Bitmap::Dither( sal_uLong nDitherFlags ) { - sal_Bool bRet = sal_False; + bool bRet = false; const Size aSizePix( GetSizePixel() ); if( aSizePix.Width() == 1 || aSizePix.Height() == 1 ) - bRet = sal_True; + bRet = true; else if( nDitherFlags & BMP_DITHER_MATRIX ) bRet = ImplDitherMatrix(); else if( nDitherFlags & BMP_DITHER_FLOYD ) @@ -2462,12 +2462,12 @@ sal_Bool Bitmap::Dither( sal_uLong nDitherFlags ) return bRet; } -sal_Bool Bitmap::ImplDitherMatrix() +bool Bitmap::ImplDitherMatrix() { BitmapReadAccess* pReadAcc = AcquireReadAccess(); Bitmap aNewBmp( GetSizePixel(), 8 ); BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc && pWriteAcc ) { @@ -2510,7 +2510,7 @@ sal_Bool Bitmap::ImplDitherMatrix() } } - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -2530,10 +2530,10 @@ sal_Bool Bitmap::ImplDitherMatrix() return bRet; } -sal_Bool Bitmap::ImplDitherFloyd() +bool Bitmap::ImplDitherFloyd() { const Size aSize( GetSizePixel() ); - sal_Bool bRet = sal_False; + bool bRet = false; if( ( aSize.Width() > 3 ) && ( aSize.Height() > 2 ) ) { @@ -2559,7 +2559,7 @@ sal_Bool Bitmap::ImplDitherFloyd() long* p1T = p1; long* p2T = p2; long* pTmp; - sal_Bool bPal = pReadAcc->HasPalette(); + bool bPal = pReadAcc->HasPalette(); pTmp = p2T; @@ -2648,7 +2648,7 @@ sal_Bool Bitmap::ImplDitherFloyd() delete[] p1; delete[] p2; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -2669,12 +2669,12 @@ sal_Bool Bitmap::ImplDitherFloyd() return bRet; } -sal_Bool Bitmap::ImplDitherFloyd16() +bool Bitmap::ImplDitherFloyd16() { BitmapReadAccess* pReadAcc = AcquireReadAccess(); Bitmap aNewBmp( GetSizePixel(), 24 ); BitmapWriteAccess* pWriteAcc = aNewBmp.AcquireWriteAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc && pWriteAcc ) { @@ -2738,7 +2738,7 @@ sal_Bool Bitmap::ImplDitherFloyd16() // Destroy row buffer delete[] pErrQuad1; delete[] pErrQuad2; - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -2758,12 +2758,12 @@ sal_Bool Bitmap::ImplDitherFloyd16() return bRet; } -sal_Bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce ) +bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce ) { - sal_Bool bRet; + bool bRet; if( GetColorCount() <= (sal_uLong) nColorCount ) - bRet = sal_True; + bRet = true; else if( nColorCount ) { if( BMP_REDUCE_SIMPLE == eReduce ) @@ -2774,18 +2774,18 @@ sal_Bool Bitmap::ReduceColors( sal_uInt16 nColorCount, BmpReduce eReduce ) bRet = ImplReduceMedian( nColorCount ); } else - bRet = sal_False; + bRet = false; return bRet; } -sal_Bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount ) +bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount ) { Bitmap aNewBmp; BitmapReadAccess* pRAcc = AcquireReadAccess(); const sal_uInt16 nColCount = std::min( nColorCount, (sal_uInt16) 256 ); sal_uInt16 nBitCount; - sal_Bool bRet = sal_False; + bool bRet = false; if( nColCount <= 2 ) nBitCount = 1; @@ -2822,7 +2822,7 @@ sal_Bool Bitmap::ImplReduceSimple( sal_uInt16 nColorCount ) } aNewBmp.ReleaseAccess( pWAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pRAcc ); @@ -2861,11 +2861,11 @@ extern "C" int SAL_CALL ImplPopularCmpFnc( const void* p1, const void* p2 ) return nRet; } -sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) +bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) { BitmapReadAccess* pRAcc = AcquireReadAccess(); sal_uInt16 nBitCount; - sal_Bool bRet = sal_False; + bool bRet = false; if( nColCount > 256 ) nColCount = 256; @@ -2986,7 +2986,7 @@ sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) delete[] pIndexMap; aNewBmp.ReleaseAccess( pWAcc ); - bRet = sal_True; + bRet = true; } delete[] pCountTable; @@ -3006,11 +3006,11 @@ sal_Bool Bitmap::ImplReducePopular( sal_uInt16 nColCount ) return bRet; } -sal_Bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) +bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) { BitmapReadAccess* pRAcc = AcquireReadAccess(); sal_uInt16 nBitCount; - sal_Bool bRet = sal_False; + bool bRet = false; if( nColCount < 17 ) nBitCount = 4; @@ -3076,7 +3076,7 @@ sal_Bool Bitmap::ImplReduceMedian( sal_uInt16 nColCount ) rtl_freeMemory( pColBuf ); aNewBmp.ReleaseAccess( pWAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pRAcc ); @@ -3226,28 +3226,28 @@ void Bitmap::ImplMedianCut( sal_uLong* pColBuf, BitmapPalette& rPal, } } -sal_Bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) +bool Bitmap::Vectorize( PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { return ImplVectorizer().ImplVectorize( *this, rPolyPoly, nFlags, pProgress ); } -sal_Bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ) +bool Bitmap::Vectorize( GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ) { return ImplVectorizer().ImplVectorize( *this, rMtf, cReduce, nFlags, pProgress ); } -sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, +bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, - double fGamma, sal_Bool bInvert ) + double fGamma, bool bInvert ) { - sal_Bool bRet = sal_False; + bool bRet = false; // nothing to do => return quickly if( !nLuminancePercent && !nContrastPercent && !nChannelRPercent && !nChannelGPercent && !nChannelBPercent && ( fGamma == 1.0 ) && !bInvert ) { - bRet = sal_True; + bRet = true; } else { @@ -3365,7 +3365,7 @@ sal_Bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, delete[] cMapG; delete[] cMapB; ReleaseAccess( pAcc ); - bRet = sal_True; + bRet = true; } } diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx index dbda9e68d4e8..509f7ead46ef 100644 --- a/vcl/source/gdi/bitmap4.cxx +++ b/vcl/source/gdi/bitmap4.cxx @@ -38,9 +38,9 @@ static inline sal_uInt8 lcl_getDuotoneColorComponent( sal_uInt8 base, sal_uInt16 return (sal_uInt8) (color1+color2); } -sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) { - sal_Bool bRet = sal_False; + bool bRet = false; switch( eFilter ) { @@ -58,7 +58,7 @@ sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, } else { - bRet = sal_False; + bRet = false; } } break; @@ -110,11 +110,11 @@ sal_Bool Bitmap::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, return bRet; } -sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, +bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -236,7 +236,7 @@ sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -256,10 +256,10 @@ sal_Bool Bitmap::ImplConvolute3( const long* pMatrix, long nDivisor, return bRet; } -sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) +bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -365,7 +365,7 @@ sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -385,13 +385,13 @@ sal_Bool Bitmap::ImplMedianFilter( const BmpFilterParam* /*pFilterParam*/, const return bRet; } -sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) +bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { - sal_Bool bRet = ImplMakeGreyscales( 256 ); + bool bRet = ImplMakeGreyscales( 256 ); if( bRet ) { - bRet = sal_False; + bRet = false; BitmapReadAccess* pReadAcc = AcquireReadAccess(); @@ -490,7 +490,7 @@ sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Li delete[] pHMap; delete[] pVMap; aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -511,13 +511,13 @@ sal_Bool Bitmap::ImplSobelGrey( const BmpFilterParam* /*pFilterParam*/, const Li return bRet; } -sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { - sal_Bool bRet = ImplMakeGreyscales( 256 ); + bool bRet = ImplMakeGreyscales( 256 ); if( bRet ) { - bRet = sal_False; + bRet = false; BitmapReadAccess* pReadAcc = AcquireReadAccess(); @@ -602,7 +602,7 @@ sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* delete[] pHMap; delete[] pVMap; aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -623,9 +623,9 @@ sal_Bool Bitmap::ImplEmbossGrey( const BmpFilterParam* pFilterParam, const Link* return bRet; } -sal_Bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { - sal_Bool bRet = sal_False; + bool bRet = false; BitmapWriteAccess* pWriteAcc = AcquireWriteAccess(); if( pWriteAcc ) @@ -665,16 +665,16 @@ sal_Bool Bitmap::ImplSolarize( const BmpFilterParam* pFilterParam, const Link* / } ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } return bRet; } -sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { BitmapReadAccess* pReadAcc = AcquireReadAccess(); - sal_Bool bRet = sal_False; + bool bRet = false; if( pReadAcc ) { @@ -736,7 +736,7 @@ sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pP } aNewBmp.ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -756,13 +756,13 @@ sal_Bool Bitmap::ImplSepia( const BmpFilterParam* pFilterParam, const Link* /*pP return bRet; } -sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) +bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*pProgress*/ ) { sal_uLong nTileWidth = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ? pFilterParam->maMosaicTileSize.mnTileWidth : 4; sal_uLong nTileHeight = ( pFilterParam && pFilterParam->meFilter == BMP_FILTER_MOSAIC ) ? pFilterParam->maMosaicTileSize.mnTileHeight : 4; - sal_Bool bRet = sal_False; + bool bRet = false; if( !nTileWidth ) nTileWidth = 1; @@ -884,7 +884,7 @@ sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*p } while( nY1 < nHeight ); - bRet = sal_True; + bRet = true; } ReleaseAccess( pReadAcc ); @@ -908,7 +908,7 @@ sal_Bool Bitmap::ImplMosaic( const BmpFilterParam* pFilterParam, const Link* /*p } } else - bRet = sal_True; + bRet = true; return bRet; } @@ -933,13 +933,13 @@ extern "C" int SAL_CALL ImplPopArtCmpFnc( const void* p1, const void* p2 ) return nRet; } -sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) +bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* /*pProgress*/ ) { - sal_Bool bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : sal_True; + bool bRet = ( GetBitCount() > 8 ) ? Convert( BMP_CONVERSION_8BIT_COLORS ) : sal_True; if( bRet ) { - bRet = sal_False; + bRet = false; BitmapWriteAccess* pWriteAcc = AcquireWriteAccess(); @@ -986,7 +986,7 @@ sal_Bool Bitmap::ImplPopArt( const BmpFilterParam* /*pFilterParam*/, const Link* // cleanup delete[] pPopArtTable; ReleaseAccess( pWriteAcc ); - bRet = sal_True; + bRet = true; } } diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index 7a3320c767c8..a8b287724478 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -48,7 +48,7 @@ using namespace ::com::sun::star; BitmapEx::BitmapEx() : eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { } @@ -64,7 +64,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx ) : BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) : eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { if( rBitmapEx.IsEmpty() ) return; @@ -73,7 +73,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) : aBitmapSize = aSize; if( rBitmapEx.IsAlpha() ) { - bAlpha = sal_True; + bAlpha = true; aMask = AlphaMask( aSize ).ImplGetBitmap(); } else if( rBitmapEx.IsTransparent() ) @@ -86,7 +86,7 @@ BitmapEx::BitmapEx( const BitmapEx& rBitmapEx, Point aSrc, Size aSize ) : BitmapEx::BitmapEx( const ResId& rResId ) : eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { static ImplImageTreeSingletonRef aImageTree; ResMgr* pResMgr = NULL; @@ -113,7 +113,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp ) : aBitmap ( rBmp ), aBitmapSize ( aBitmap.GetSizePixel() ), eTransparent( TRANSPARENT_NONE ), - bAlpha ( sal_False ) + bAlpha ( false ) { } @@ -122,7 +122,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Bitmap& rMask ) : aMask ( rMask ), aBitmapSize ( aBitmap.GetSizePixel() ), eTransparent ( !rMask ? TRANSPARENT_NONE : TRANSPARENT_BITMAP ), - bAlpha ( sal_False ) + bAlpha ( false ) { if(!!aBitmap && !!aMask && aBitmap.GetSizePixel() != aMask.GetSizePixel()) { @@ -163,7 +163,7 @@ BitmapEx::BitmapEx( const Bitmap& rBmp, const Color& rTransparentColor ) : aBitmapSize ( aBitmap.GetSizePixel() ), aTransparentColor ( rTransparentColor ), eTransparent ( TRANSPARENT_BITMAP ), - bAlpha ( sal_False ) + bAlpha ( false ) { aMask = aBitmap.CreateMask( aTransparentColor ); @@ -190,19 +190,19 @@ BitmapEx& BitmapEx::operator=( const BitmapEx& rBitmapEx ) return *this; } -sal_Bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const +bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const { if( eTransparent != rBitmapEx.eTransparent ) - return sal_False; + return false; if( aBitmap != rBitmapEx.aBitmap ) - return sal_False; + return false; if( aBitmapSize != rBitmapEx.aBitmapSize ) - return sal_False; + return false; if( eTransparent == TRANSPARENT_NONE ) - return sal_True; + return true; if( eTransparent == TRANSPARENT_COLOR ) return aTransparentColor == rBitmapEx.aTransparentColor; @@ -210,7 +210,7 @@ sal_Bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const return( ( aMask == rBitmapEx.aMask ) && ( bAlpha == rBitmapEx.bAlpha ) ); } -sal_Bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const +bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const { return( rBmpEx.eTransparent == eTransparent && rBmpEx.bAlpha == bAlpha && @@ -218,7 +218,7 @@ sal_Bool BitmapEx::IsEqual( const BitmapEx& rBmpEx ) const rBmpEx.aMask.IsEqual( aMask ) ); } -sal_Bool BitmapEx::IsEmpty() const +bool BitmapEx::IsEmpty() const { return( aBitmap.IsEmpty() && aMask.IsEmpty() ); } @@ -228,7 +228,7 @@ void BitmapEx::SetEmpty() aBitmap.SetEmpty(); aMask.SetEmpty(); eTransparent = TRANSPARENT_NONE; - bAlpha = sal_False; + bAlpha = false; } void BitmapEx::Clear() @@ -236,12 +236,12 @@ void BitmapEx::Clear() SetEmpty(); } -sal_Bool BitmapEx::IsTransparent() const +bool BitmapEx::IsTransparent() const { return( eTransparent != TRANSPARENT_NONE ); } -sal_Bool BitmapEx::IsAlpha() const +bool BitmapEx::IsAlpha() const { return( IsTransparent() && bAlpha ); } @@ -332,9 +332,9 @@ void BitmapEx::SetSizePixel( const Size& rNewSize, sal_uInt32 nScaleFlag ) } } -sal_Bool BitmapEx::Invert() +bool BitmapEx::Invert() { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -347,9 +347,9 @@ sal_Bool BitmapEx::Invert() return bRet; } -sal_Bool BitmapEx::Mirror( sal_uLong nMirrorFlags ) +bool BitmapEx::Mirror( sal_uLong nMirrorFlags ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -364,9 +364,9 @@ sal_Bool BitmapEx::Mirror( sal_uLong nMirrorFlags ) // ------------------------------------------------------------------ -sal_Bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) +bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt32 nScaleFlag ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -388,9 +388,9 @@ sal_Bool BitmapEx::Scale( const double& rScaleX, const double& rScaleY, sal_uInt // ------------------------------------------------------------------------ -sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) +bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) { - sal_Bool bRet; + bool bRet; if( aBitmapSize.Width() && aBitmapSize.Height() && ( rNewSize.Width() != aBitmapSize.Width() || @@ -401,14 +401,14 @@ sal_Bool BitmapEx::Scale( const Size& rNewSize, sal_uInt32 nScaleFlag ) nScaleFlag ); } else - bRet = sal_True; + bRet = true; return bRet; } -sal_Bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) +bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -450,9 +450,9 @@ sal_Bool BitmapEx::Rotate( long nAngle10, const Color& rFillColor ) return bRet; } -sal_Bool BitmapEx::Crop( const Rectangle& rRectPixel ) +bool BitmapEx::Crop( const Rectangle& rRectPixel ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -470,19 +470,19 @@ sal_Bool BitmapEx::Crop( const Rectangle& rRectPixel ) return bRet; } -sal_Bool BitmapEx::Convert( BmpConversion eConversion ) +bool BitmapEx::Convert( BmpConversion eConversion ) { return( !!aBitmap ? aBitmap.Convert( eConversion ) : sal_False ); } -sal_Bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) +bool BitmapEx::ReduceColors( sal_uInt16 nNewColorCount, BmpReduce eReduce ) { return( !!aBitmap ? aBitmap.ReduceColors( nNewColorCount, eReduce ) : sal_False ); } -sal_Bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, sal_Bool bExpandTransparent ) +bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor, bool bExpandTransparent ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -503,10 +503,10 @@ sal_Bool BitmapEx::Expand( sal_uLong nDX, sal_uLong nDY, const Color* pInitColor return bRet; } -sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, +bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectSrc, const BitmapEx* pBmpExSrc ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !pBmpExSrc || pBmpExSrc->IsEmpty() ) { @@ -537,7 +537,7 @@ sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectS aMask = pAlpha->ImplGetBitmap(); delete pAlpha; - bAlpha = sal_True; + bAlpha = true; aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask ); } else @@ -548,7 +548,7 @@ sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectS aMask = pAlpha->ImplGetBitmap(); delete pAlpha; eTransparent = TRANSPARENT_BITMAP; - bAlpha = sal_True; + bAlpha = true; aMask.CopyPixel( rRectDst, rRectSrc, &pBmpExSrc->aMask ); } } @@ -590,9 +590,9 @@ sal_Bool BitmapEx::CopyPixel( const Rectangle& rRectDst, const Rectangle& rRectS return bRet; } -sal_Bool BitmapEx::Erase( const Color& rFillColor ) +bool BitmapEx::Erase( const Color& rFillColor ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( !!aBitmap ) { @@ -617,31 +617,31 @@ sal_Bool BitmapEx::Erase( const Color& rFillColor ) return bRet; } -sal_Bool BitmapEx::Dither( sal_uLong nDitherFlags ) +bool BitmapEx::Dither( sal_uLong nDitherFlags ) { return( !!aBitmap ? aBitmap.Dither( nDitherFlags ) : sal_False ); } -sal_Bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) +bool BitmapEx::Replace( const Color& rSearchColor, const Color& rReplaceColor, sal_uLong nTol ) { return( !!aBitmap ? aBitmap.Replace( rSearchColor, rReplaceColor, nTol ) : sal_False ); } -sal_Bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols ) +bool BitmapEx::Replace( const Color* pSearchColors, const Color* pReplaceColors, sal_uLong nColorCount, const sal_uLong* pTols ) { return( !!aBitmap ? aBitmap.Replace( pSearchColors, pReplaceColors, nColorCount, (sal_uLong*) pTols ) : sal_False ); } -sal_Bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, +bool BitmapEx::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, short nChannelBPercent, - double fGamma, sal_Bool bInvert ) + double fGamma, bool bInvert ) { return( !!aBitmap ? aBitmap.Adjust( nLuminancePercent, nContrastPercent, nChannelRPercent, nChannelGPercent, nChannelBPercent, fGamma, bInvert ) : sal_False ); } -sal_Bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) +bool BitmapEx::Filter( BmpFilter eFilter, const BmpFilterParam* pFilterParam, const Link* pProgress ) { return( !!aBitmap ? aBitmap.Filter( eFilter, pFilterParam, pProgress ) : sal_False ); } diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index 8e3836596e32..92160da2b990 100644 --- a/vcl/source/gdi/bmpacc.cxx +++ b/vcl/source/gdi/bmpacc.cxx @@ -26,7 +26,7 @@ #include <string.h> -BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, sal_Bool bModify ) : +BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap, bool bModify ) : mpBuffer ( NULL ), mpScanBuf ( NULL ), mFncGetPixel ( NULL ), @@ -41,7 +41,7 @@ BitmapReadAccess::BitmapReadAccess( Bitmap& rBitmap ) : mpScanBuf ( NULL ), mFncGetPixel ( NULL ), mFncSetPixel ( NULL ), - mbModify ( sal_False ) + mbModify ( false ) { ImplCreate( rBitmap ); } @@ -133,9 +133,9 @@ void BitmapReadAccess::ImplDestroy() } } -sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat ) +bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat ) { - sal_Bool bRet = sal_True; + bool bRet = true; switch( nFormat ) { @@ -157,7 +157,7 @@ sal_Bool BitmapReadAccess::ImplSetAccessPointers( sal_uLong nFormat ) CASE_FORMAT( _32BIT_TC_MASK ) default: - bRet = sal_False; + bRet = false; break; } @@ -385,7 +385,7 @@ BitmapColor BitmapReadAccess::GetColorWithFallback( double fY, double fX, const } BitmapWriteAccess::BitmapWriteAccess( Bitmap& rBitmap ) : - BitmapReadAccess( rBitmap, sal_True ), + BitmapReadAccess( rBitmap, true ), mpLineColor ( NULL ), mpFillColor ( NULL ) { diff --git a/vcl/source/gdi/cvtsvm.cxx b/vcl/source/gdi/cvtsvm.cxx index 3df540f95d67..d547cc19eaaa 100644 --- a/vcl/source/gdi/cvtsvm.cxx +++ b/vcl/source/gdi/cvtsvm.cxx @@ -249,7 +249,7 @@ void ImplWriteFont( SvStream& rOStm, const Font& rFont, rOStm.WriteInt16( (sal_Int16) nWeight ); rOStm.WriteInt16( (sal_Int16) rFont.GetUnderline() ); rOStm.WriteInt16( (sal_Int16) rFont.GetStrikeout() ); - rOStm.WriteUChar( (sal_Bool) ( rFont.GetItalic() != ITALIC_NONE ) ); + rOStm.WriteUChar( rFont.GetItalic() != ITALIC_NONE ); rOStm.WriteUChar( rFont.IsOutline() ); rOStm.WriteUChar( rFont.IsShadow() ); rOStm.WriteUChar( rFont.IsTransparent() ); @@ -262,7 +262,7 @@ void ImplWriteRasterOpAction( SvStream& rOStm, sal_Int16 nRasterOp ) rOStm.WriteInt16( (sal_Int16) GDI_RASTEROP_ACTION ).WriteInt32( (sal_Int32) 6 ).WriteInt16( nRasterOp ); } -sal_Bool ImplWriteUnicodeComment( SvStream& rOStm, const OUString& rString ) +bool ImplWriteUnicodeComment( SvStream& rOStm, const OUString& rString ) { sal_Int32 nStringLen = rString.getLength(); if ( nStringLen ) @@ -662,7 +662,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) const Polygon aPoly( aRect.Center(), aRect.GetWidth() >> 1, aRect.GetHeight() >> 1 ); rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) ); @@ -683,7 +683,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) const Polygon aPoly( aRect, aPt, aPt1, POLY_ARC ); rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) ); @@ -704,7 +704,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) const Polygon aPoly( aRect, aPt, aPt1, POLY_PIE ); rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aPoly, aLineInfo ) ); @@ -744,7 +744,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) if( bFatLine ) { rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolygonAction( aActionPoly ) ); rMtf.AddAction( new MetaPopAction() ); rMtf.AddAction( new MetaPolyLineAction( aActionPoly, aLineInfo ) ); @@ -766,7 +766,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) if( bFatLine ) { rMtf.AddAction( new MetaPushAction( PUSH_LINECOLOR ) ); - rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, sal_False ) ); + rMtf.AddAction( new MetaLineColorAction( COL_TRANSPARENT, false ) ); rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) ); rMtf.AddAction( new MetaPopAction() ); @@ -788,7 +788,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) sal_Int32 nWidth, nHeight; sal_Int16 nCharSet, nFamily, nPitch, nAlign, nWeight, nUnderline, nStrikeout; sal_Int16 nCharOrient, nLineOrient; - sal_Bool bItalic, bOutline, bShadow, bTransparent; + bool bItalic, bOutline, bShadow, bTransparent; ImplReadColor( rIStm, aActionColor ); aFont.SetColor( aActionColor ); ImplReadColor( rIStm, aActionColor ); aFont.SetFillColor( aActionColor ); @@ -797,7 +797,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) rIStm.ReadInt32( nWidth ).ReadInt32( nHeight ); rIStm.ReadInt16( nCharOrient ).ReadInt16( nLineOrient ); rIStm.ReadInt16( nCharSet ).ReadInt16( nFamily ).ReadInt16( nPitch ).ReadInt16( nAlign ).ReadInt16( nWeight ).ReadInt16( nUnderline ).ReadInt16( nStrikeout ); - rIStm.ReadUChar( bItalic ).ReadUChar( bOutline ).ReadUChar( bShadow ).ReadUChar( bTransparent ); + rIStm.ReadCharAsBool( bItalic ).ReadCharAsBool( bOutline ).ReadCharAsBool( bShadow ).ReadCharAsBool( bTransparent ); aFont.SetSize( Size( nWidth, nHeight ) ); aFont.SetCharSet( (rtl_TextEncoding) nCharSet ); @@ -1011,7 +1011,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) Region aRegion; sal_Int16 nRegType; sal_Int16 bIntersect; - sal_Bool bClip = sal_False; + bool bClip = false; rIStm.ReadInt16( nRegType ).ReadInt16( bIntersect ); ImplReadRect( rIStm, aRect ); @@ -1027,7 +1027,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) ImplReadRect( rIStm, aRegRect ); aRegion = Region( aRegRect ); - bClip = sal_True; + bClip = true; } break; @@ -1035,7 +1035,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) { ImplReadPoly( rIStm, aActionPoly ); aRegion = Region( aActionPoly ); - bClip = sal_True; + bClip = true; } break; @@ -1053,7 +1053,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) } aRegion = Region( aPolyPoly ); - bClip = sal_True; + bClip = true; } break; } @@ -1227,11 +1227,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_REFPOINT_COMMENT ): { Point aRefPoint; - sal_Bool bSet; + bool bSet; sal_Int32 nFollowingActionCount; ReadPair( rIStm, aRefPoint ); - rIStm.ReadUChar( bSet ).ReadInt32( nFollowingActionCount ); + rIStm.ReadCharAsBool( bSet ).ReadInt32( nFollowingActionCount ); ImplSkipActions( rIStm, nFollowingActionCount ); rMtf.AddAction( new MetaRefPointAction( aRefPoint, bSet ) ); @@ -1248,11 +1248,11 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case( GDI_TEXTLINECOLOR_COMMENT ): { Color aColor; - sal_Bool bSet; + bool bSet; sal_Int32 nFollowingActionCount; ReadColor( rIStm, aColor ); - rIStm.ReadUChar( bSet ).ReadInt32( nFollowingActionCount ); + rIStm.ReadCharAsBool( bSet ).ReadInt32( nFollowingActionCount ); ImplSkipActions( rIStm, nFollowingActionCount ); rMtf.AddAction( new MetaTextLineColorAction( aColor, bSet ) ); @@ -1354,7 +1354,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) const sal_uInt16 nOldFormat = rOStm.GetNumberFormatInt(); rtl_TextEncoding eActualCharSet = osl_getThreadTextEncoding(); const Size aPrefSize( rMtf.GetPrefSize() ); - sal_Bool bRop_0_1 = sal_False; + bool bRop_0_1 = false; VirtualDevice aSaveVDev; Color aLineCol( COL_BLACK ); ::std::stack< Color* > aLineColStack; @@ -1390,7 +1390,7 @@ void SVMConverter::ImplConvertToSVM1( SvStream& rOStm, GDIMetaFile& rMtf ) } sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, - VirtualDevice& rSaveVDev, sal_Bool& rRop_0_1, + VirtualDevice& rSaveVDev, bool& rRop_0_1, Color& rLineCol, ::std::stack< Color* >& rLineColStack, rtl_TextEncoding& rActualCharSet ) { @@ -2108,7 +2108,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { ImplWritePopAction( rOStm ); rSaveVDev.Pop(); - rRop_0_1 = sal_False; + rRop_0_1 = false; nCount++; } @@ -2140,7 +2140,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, } ImplWriteRasterOpAction( rOStm, 0 ); - rRop_0_1 = sal_True; + rRop_0_1 = true; nCount += 4; } } @@ -2314,7 +2314,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaRefPointAction* pA = (MetaRefPointAction*) pAction; const Point& rRefPoint = pA->GetRefPoint(); - const sal_Bool bSet = pA->IsSetting(); + const bool bSet = pA->IsSetting(); sal_uLong nOldPos, nNewPos; // write RefPoint comment @@ -2343,7 +2343,7 @@ sal_uLong SVMConverter::ImplWriteActions( SvStream& rOStm, GDIMetaFile& rMtf, { const MetaTextLineColorAction* pA = (MetaTextLineColorAction*) pAction; const Color& rColor = pA->GetColor(); - const sal_Bool bSet = pA->IsSetting(); + const bool bSet = pA->IsSetting(); sal_uLong nOldPos, nNewPos; // write RefPoint comment diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx index 738e463c43ef..b20286959b9c 100644 --- a/vcl/source/gdi/font.cxx +++ b/vcl/source/gdi/font.cxx @@ -303,7 +303,7 @@ void Font::SetFillColor( const Color& rColor ) mpImplFont->mbTransparent = true; } -void Font::SetTransparent( sal_Bool bTransparent ) +void Font::SetTransparent( bool bTransparent ) { if( mpImplFont->mbTransparent != bTransparent ) @@ -427,7 +427,7 @@ void Font::SetOrientation( short nOrientation ) } } -void Font::SetVertical( sal_Bool bVertical ) +void Font::SetVertical( bool bVertical ) { if( mpImplFont->mbVertical != bVertical ) @@ -447,7 +447,7 @@ void Font::SetKerning( FontKerning nKerning ) } } -sal_Bool Font::IsKerning() const +bool Font::IsKerning() const { return (mpImplFont->mnKerning & KERNING_FONTSPECIFIC) != 0; } @@ -482,7 +482,7 @@ void Font::SetItalic( FontItalic eItalic ) } } -void Font::SetOutline( sal_Bool bOutline ) +void Font::SetOutline( bool bOutline ) { if( mpImplFont->mbOutline != bOutline ) @@ -492,7 +492,7 @@ void Font::SetOutline( sal_Bool bOutline ) } } -void Font::SetShadow( sal_Bool bShadow ) +void Font::SetShadow( bool bShadow ) { if( mpImplFont->mbShadow != bShadow ) @@ -552,7 +552,7 @@ void Font::SetEmphasisMark( FontEmphasisMark eEmphasisMark ) } } -void Font::SetWordLineMode( sal_Bool bWordLine ) +void Font::SetWordLineMode( bool bWordLine ) { if( mpImplFont->mbWordLine != bWordLine ) @@ -659,7 +659,7 @@ SvStream& ReadImpl_Font( SvStream& rIStm, Impl_Font& rImpl_Font ) { VersionCompat aCompat( rIStm, STREAM_READ ); sal_uInt16 nTmp16; - sal_Bool bTmp; + bool bTmp; sal_uInt8 nTmp8; rImpl_Font.maFamilyName = rIStm.ReadUniOrByteString(rIStm.GetStreamCharSet()); @@ -678,16 +678,16 @@ SvStream& ReadImpl_Font( SvStream& rIStm, Impl_Font& rImpl_Font ) rIStm.ReadInt16( rImpl_Font.mnOrientation ); - rIStm.ReadUChar( bTmp ); rImpl_Font.mbWordLine = bTmp; - rIStm.ReadUChar( bTmp ); rImpl_Font.mbOutline = bTmp; - rIStm.ReadUChar( bTmp ); rImpl_Font.mbShadow = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbWordLine = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbOutline = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbShadow = bTmp; rIStm.ReadUChar( nTmp8 ); rImpl_Font.mnKerning = nTmp8; if( aCompat.GetVersion() >= 2 ) { rIStm.ReadUChar( nTmp8 ); rImpl_Font.meRelief = (FontRelief)nTmp8; rIStm.ReadUInt16( nTmp16 ); rImpl_Font.maCJKLanguageTag.reset( (LanguageType)nTmp16); - rIStm.ReadUChar( bTmp ); rImpl_Font.mbVertical = bTmp; + rIStm.ReadCharAsBool( bTmp ); rImpl_Font.mbVertical = bTmp; rIStm.ReadUInt16( nTmp16 ); rImpl_Font.meEmphasisMark = (FontEmphasisMark)nTmp16; } if( aCompat.GetVersion() >= 3 ) @@ -719,15 +719,15 @@ SvStream& WriteImpl_Font( SvStream& rOStm, const Impl_Font& rImpl_Font ) rOStm.WriteInt16( rImpl_Font.mnOrientation ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbWordLine ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbOutline ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbShadow ); + rOStm.WriteUChar( rImpl_Font.mbWordLine ); + rOStm.WriteUChar( rImpl_Font.mbOutline ); + rOStm.WriteUChar( rImpl_Font.mbShadow ); rOStm.WriteUChar( (sal_uInt8) rImpl_Font.mnKerning ); // new in version 2 rOStm.WriteUChar( (sal_uInt8) rImpl_Font.meRelief ); rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.maCJKLanguageTag.getLanguageType( false) ); - rOStm.WriteUChar( (sal_Bool) rImpl_Font.mbVertical ); + rOStm.WriteUChar( rImpl_Font.mbVertical ); rOStm.WriteUInt16( (sal_uInt16) rImpl_Font.meEmphasisMark ); // new in version 3 @@ -960,7 +960,7 @@ const Color& Font::GetColor() const { return mpImplFont->maColor; } const Color& Font::GetFillColor() const { return mpImplFont->maFillColor; } -sal_Bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } +bool Font::IsTransparent() const { return mpImplFont->mbTransparent; } FontAlign Font::GetAlign() const { return mpImplFont->meAlign; } @@ -1004,9 +1004,9 @@ FontItalic Font::GetItalic() const { return mpImplFont->GetItalic(); } FontFamily Font::GetFamily() const { return mpImplFont->GetFamily(); } -sal_Bool Font::IsOutline() const { return mpImplFont->mbOutline; } +bool Font::IsOutline() const { return mpImplFont->mbOutline; } -sal_Bool Font::IsShadow() const { return mpImplFont->mbShadow; } +bool Font::IsShadow() const { return mpImplFont->mbShadow; } FontRelief Font::GetRelief() const { return mpImplFont->meRelief; } @@ -1018,8 +1018,8 @@ FontStrikeout Font::GetStrikeout() const { return mpImplFont->meStrikeout; } FontEmphasisMark Font::GetEmphasisMark() const { return mpImplFont->meEmphasisMark; } -sal_Bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } +bool Font::IsWordLineMode() const { return mpImplFont->mbWordLine; } -sal_Bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } +bool Font::IsSameInstance( const Font& rFont ) const { return (mpImplFont == rFont.mpImplFont); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx index a8768bff42f3..8e952cea47c0 100644 --- a/vcl/source/gdi/gdimtf.cxx +++ b/vcl/source/gdi/gdimtf.cxx @@ -66,7 +66,7 @@ struct ImplBmpAdjustParam short nChannelGPercent; short nChannelBPercent; double fGamma; - sal_Bool bInvert; + bool bInvert; }; struct ImplColConvertParam @@ -115,9 +115,9 @@ GDIMetaFile::GDIMetaFile() : pPrev ( NULL ), pNext ( NULL ), pOutDev ( NULL ), - bPause ( sal_False ), - bRecord ( sal_False ), - bUseCanvas ( sal_False ) + bPause ( false ), + bRecord ( false ), + bUseCanvas ( false ) { } @@ -129,8 +129,8 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) : pPrev ( rMtf.pPrev ), pNext ( rMtf.pNext ), pOutDev ( NULL ), - bPause ( sal_False ), - bRecord ( sal_False ), + bPause ( false ), + bRecord ( false ), bUseCanvas ( rMtf.bUseCanvas ) { // Increment RefCount of MetaActions @@ -145,7 +145,7 @@ GDIMetaFile::GDIMetaFile( const GDIMetaFile& rMtf ) : Record( rMtf.pOutDev ); if ( rMtf.bPause ) - Pause( sal_True ); + Pause( true ); } } @@ -209,8 +209,8 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf ) pPrev = rMtf.pPrev; pNext = rMtf.pNext; pOutDev = NULL; - bPause = sal_False; - bRecord = sal_False; + bPause = false; + bRecord = false; bUseCanvas = rMtf.bUseCanvas; if( rMtf.bRecord ) @@ -218,31 +218,31 @@ GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf ) Record( rMtf.pOutDev ); if( rMtf.bPause ) - Pause( sal_True ); + Pause( true ); } } return *this; } -sal_Bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const +bool GDIMetaFile::operator==( const GDIMetaFile& rMtf ) const { const size_t nObjCount = aList.size(); - sal_Bool bRet = sal_False; + bool bRet = false; if( this == &rMtf ) - bRet = sal_True; + bRet = true; else if( rMtf.GetActionSize() == nObjCount && rMtf.GetPrefSize() == aPrefSize && rMtf.GetPrefMapMode() == aPrefMapMode ) { - bRet = sal_True; + bRet = true; for( size_t n = 0; n < nObjCount; n++ ) { if( aList[ n ] != rMtf.GetAction( n ) ) { - bRet = sal_False; + bRet = false; break; } } @@ -306,7 +306,7 @@ void GDIMetaFile::Record( OutputDevice* pOut ) nCurrentActionElement = aList.empty() ? 0 : (aList.size() - 1); pOutDev = pOut; - bRecord = sal_True; + bRecord = true; Linker( pOut, sal_True ); } @@ -590,7 +590,7 @@ void GDIMetaFile::Play( OutputDevice* pOut, const Point& rPos, } } -void GDIMetaFile::Pause( sal_Bool _bPause ) +void GDIMetaFile::Pause( bool _bPause ) { if( bRecord ) { @@ -613,12 +613,12 @@ void GDIMetaFile::Stop() { if( bRecord ) { - bRecord = sal_False; + bRecord = false; if( !bPause ) Linker( pOutDev, sal_False ); else - bPause = sal_False; + bPause = false; } } @@ -686,12 +686,12 @@ void GDIMetaFile::RemoveAction( size_t nPos ) pPrev->RemoveAction( nPos ); } -sal_Bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags ) +bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags ) { const Size aOldPrefSize( GetPrefSize() ); long nMoveX, nMoveY; double fScaleX, fScaleY; - sal_Bool bRet; + bool bRet; if( nMirrorFlags & MTF_MIRROR_HORZ ) nMoveX = SAL_ABS( aOldPrefSize.Width() ) - 1, fScaleX = -1.0; @@ -708,10 +708,10 @@ sal_Bool GDIMetaFile::Mirror( sal_uLong nMirrorFlags ) Scale( fScaleX, fScaleY ); Move( nMoveX, nMoveY ); SetPrefSize( aOldPrefSize ); - bRet = sal_True; + bRet = true; } else - bRet = sal_False; + bRet = false; return bRet; } @@ -722,7 +722,7 @@ void GDIMetaFile::Move( long nX, long nY ) Size aOffset( aBaseOffset ); VirtualDevice aMapVDev; - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() ) @@ -756,7 +756,7 @@ void GDIMetaFile::Move( long nX, long nY, long nDPIX, long nDPIY ) Size aOffset( aBaseOffset ); VirtualDevice aMapVDev; - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetReferenceDevice( nDPIX, nDPIY ); aMapVDev.SetMapMode( GetPrefMapMode() ); @@ -824,7 +824,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect ) Rectangle aCurRect( i_rClipRect ); VirtualDevice aMapVDev; - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); for( MetaAction* pAct = FirstAction(); pAct; pAct = NextAction() ) @@ -844,7 +844,7 @@ void GDIMetaFile::Clip( const Rectangle& i_rClipRect ) Region aNewReg( aCurRect ); if( pOldAct->IsClipping() ) aNewReg.Intersect( pOldAct->GetRegion() ); - MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, sal_True ); + MetaClipRegionAction* pNewAct = new MetaClipRegionAction( aNewReg, true ); aList[ nCurrentActionElement ] = pNewAct; pOldAct->Delete(); } @@ -890,7 +890,7 @@ void GDIMetaFile::ImplAddGradientEx( GDIMetaFile& rMtf, { // Generate comment, GradientEx and Gradient actions (within DrawGradient) VirtualDevice aVDev( rMapDev, 0 ); - aVDev.EnableOutput( sal_False ); + aVDev.EnableOutput( false ); GDIMetaFile aGradMtf; aGradMtf.Record( &aVDev ); @@ -923,7 +923,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) aPoly.Rotate( Point(), fSin, fCos ); - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); const Rectangle aNewBound( aPoly.GetBoundRect() ); @@ -1280,7 +1280,7 @@ void GDIMetaFile::Rotate( long nAngle10 ) MetaClipRegionAction* pAct = (MetaClipRegionAction*) pAction; if( pAct->IsClipping() && pAct->GetRegion().HasPolyPolygonOrB2DPolyPolygon() ) - aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), sal_True ) ); + aMtf.AddAction( new MetaClipRegionAction( Region( ImplGetRotatedPolyPolygon( pAct->GetRegion().GetAsPolyPolygon(), aRotAnchor, aRotOffset, fSin, fCos ) ), true ) ); else { pAction->Duplicate(); @@ -1399,7 +1399,7 @@ Rectangle GDIMetaFile::GetBoundRect( OutputDevice& i_rReference, Rectangle* pHai GDIMetaFile aMtf; VirtualDevice aMapVDev( i_rReference ); - aMapVDev.EnableOutput( sal_False ); + aMapVDev.EnableOutput( false ); aMapVDev.SetMapMode( GetPrefMapMode() ); std::vector<Rectangle> aClipStack( 1, Rectangle() ); @@ -1939,7 +1939,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaLineColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1952,7 +1952,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaFillColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1972,7 +1972,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaTextFillColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1985,7 +1985,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaTextLineColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -1998,7 +1998,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol if( !pAct->IsSetting() ) pAct->Duplicate(); else - pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), sal_True ); + pAct = new MetaOverlineColorAction( pFncCol( pAct->GetColor(), pColParam ), true ); aMtf.push_back( pAct ); } @@ -2176,7 +2176,7 @@ void GDIMetaFile::ImplExchangeColors( ColorExchangeFnc pFncCol, const void* pCol void GDIMetaFile::Adjust( short nLuminancePercent, short nContrastPercent, short nChannelRPercent, short nChannelGPercent, - short nChannelBPercent, double fGamma, sal_Bool bInvert ) + short nChannelBPercent, double fGamma, bool bInvert ) { // nothing to do? => return quickly if( nLuminancePercent || nContrastPercent || @@ -2772,7 +2772,7 @@ SvStream& ReadGDIMetaFile( SvStream& rIStm, GDIMetaFile& rGDIMetaFile ) { MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction); if ( pCommentAct->GetComment() == "EMF_PLUS" ) - rGDIMetaFile.UseCanvas( sal_True ); + rGDIMetaFile.UseCanvas( true ); } rGDIMetaFile.AddAction( pAction ); } @@ -2870,7 +2870,7 @@ SvStream& GDIMetaFile::Write( SvStream& rOStm ) return rOStm; } -sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExtent) const +bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExtent) const { // initialization seems to be complicated but is used to avoid rounding errors VirtualDevice aVDev; @@ -2938,7 +2938,7 @@ sal_Bool GDIMetaFile::CreateThumbnail(BitmapEx& rBmpEx, sal_uInt32 nMaximumExten return !rBmpEx.IsEmpty(); } -void GDIMetaFile::UseCanvas( sal_Bool _bUseCanvas ) +void GDIMetaFile::UseCanvas( bool _bUseCanvas ) { bUseCanvas = _bUseCanvas; } diff --git a/vcl/source/gdi/gfxlink.cxx b/vcl/source/gdi/gfxlink.cxx index 94f1b0022ca8..742b5537e109 100644 --- a/vcl/source/gdi/gfxlink.cxx +++ b/vcl/source/gdi/gfxlink.cxx @@ -45,7 +45,7 @@ GfxLink::GfxLink( const GfxLink& rGfxLink ) : ImplCopy( rGfxLink ); } -GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, sal_Bool bOwns ) : +GfxLink::GfxLink( sal_uInt8* pBuf, sal_uInt32 nSize, GfxLinkType nType, bool bOwns ) : mpImpData( new ImpGfxLink ) { DBG_ASSERT( (pBuf != NULL && nSize) || (!bOwns && nSize == 0), @@ -94,9 +94,9 @@ GfxLink& GfxLink::operator=( const GfxLink& rGfxLink ) return *this; } -sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const +bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const { - sal_Bool bIsEqual = sal_False; + bool bIsEqual = false; if ( ( mnBufSize == rGfxLink.mnBufSize ) && ( meType == rGfxLink.meType ) ) { @@ -109,7 +109,7 @@ sal_Bool GfxLink::IsEqual( const GfxLink& rGfxLink ) const bIsEqual = memcmp( pSource, pDest, nSourceSize ) == 0; } else if ( ( pSource == 0 ) && ( pDest == 0 ) ) - bIsEqual = sal_True; + bIsEqual = true; } return bIsEqual; } @@ -135,7 +135,7 @@ GfxLinkType GfxLink::GetType() const return meType; } -sal_Bool GfxLink::IsNative() const +bool GfxLink::IsNative() const { return( meType >= GFX_LINK_FIRST_NATIVE_ID && meType <= GFX_LINK_LAST_NATIVE_ID ); } @@ -185,9 +185,9 @@ bool GfxLink::IsPrefMapModeValid() return mpImpData->mbPrefMapModeValid; } -sal_Bool GfxLink::LoadNative( Graphic& rGraphic ) +bool GfxLink::LoadNative( Graphic& rGraphic ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( IsNative() && mnBufSize ) { @@ -215,7 +215,7 @@ sal_Bool GfxLink::LoadNative( Graphic& rGraphic ) } if( nCvtType && ( GraphicConverter::Import( aMemStm, rGraphic, nCvtType ) == ERRCODE_NONE ) ) - bRet = sal_True; + bRet = true; } } @@ -256,7 +256,7 @@ void GfxLink::SwapIn() } } -sal_Bool GfxLink::ExportNative( SvStream& rOStream ) const +bool GfxLink::ExportNative( SvStream& rOStream ) const { if( GetDataSize() ) { @@ -319,7 +319,7 @@ SvStream& ReadGfxLink( SvStream& rIStream, GfxLink& rGfxLink) pBuf = new sal_uInt8[ nSize ]; rIStream.Read( pBuf, nSize ); - rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, sal_True ); + rGfxLink = GfxLink( pBuf, nSize, (GfxLinkType) nType, true ); rGfxLink.SetUserId( nUserId ); if( bMapAndSizeValid ) diff --git a/vcl/source/gdi/gradient.cxx b/vcl/source/gdi/gradient.cxx index da4185ebef2d..d8eed8320a27 100644 --- a/vcl/source/gdi/gradient.cxx +++ b/vcl/source/gdi/gradient.cxx @@ -265,11 +265,11 @@ Gradient& Gradient::operator=( const Gradient& rGradient ) return *this; } -sal_Bool Gradient::operator==( const Gradient& rGradient ) const +bool Gradient::operator==( const Gradient& rGradient ) const { if ( mpImplGradient == rGradient.mpImplGradient ) - return sal_True; + return true; if ( (mpImplGradient->meStyle == rGradient.mpImplGradient->meStyle) && (mpImplGradient->mnAngle == rGradient.mpImplGradient->mnAngle) && @@ -281,9 +281,9 @@ sal_Bool Gradient::operator==( const Gradient& rGradient ) const (mpImplGradient->mnIntensityEnd == rGradient.mpImplGradient->mnIntensityEnd) && (mpImplGradient->maStartColor == rGradient.mpImplGradient->maStartColor) && (mpImplGradient->maEndColor == rGradient.mpImplGradient->maEndColor) ) - return sal_True; + return true; else - return sal_False; + return false; } SvStream& ReadImpl_Gradient( SvStream& rIStm, Impl_Gradient& rImpl_Gradient ) diff --git a/vcl/source/gdi/graph.cxx b/vcl/source/gdi/graph.cxx index 20b1b090464c..be6af1734f8f 100644 --- a/vcl/source/gdi/graph.cxx +++ b/vcl/source/gdi/graph.cxx @@ -289,17 +289,17 @@ Graphic& Graphic::operator=( const Graphic& rGraphic ) return *this; } -sal_Bool Graphic::operator==( const Graphic& rGraphic ) const +bool Graphic::operator==( const Graphic& rGraphic ) const { return( *mpImpGraphic == *rGraphic.mpImpGraphic ); } -sal_Bool Graphic::operator!=( const Graphic& rGraphic ) const +bool Graphic::operator!=( const Graphic& rGraphic ) const { return( *mpImpGraphic != *rGraphic.mpImpGraphic ); } -sal_Bool Graphic::operator!() const +bool Graphic::operator!() const { return( GRAPHIC_NONE == mpImpGraphic->ImplGetType() ); } @@ -336,27 +336,27 @@ void Graphic::SetDefaultType() mpImpGraphic->ImplSetDefaultType(); } -sal_Bool Graphic::IsSupportedGraphic() const +bool Graphic::IsSupportedGraphic() const { return mpImpGraphic->ImplIsSupportedGraphic(); } -sal_Bool Graphic::IsTransparent() const +bool Graphic::IsTransparent() const { return mpImpGraphic->ImplIsTransparent(); } -sal_Bool Graphic::IsAlpha() const +bool Graphic::IsAlpha() const { return mpImpGraphic->ImplIsAlpha(); } -sal_Bool Graphic::IsAnimated() const +bool Graphic::IsAnimated() const { return mpImpGraphic->ImplIsAnimated(); } -sal_Bool Graphic::IsEPS() const +bool Graphic::IsEPS() const { return mpImpGraphic->ImplIsEPS(); } @@ -516,31 +516,31 @@ sal_uLong Graphic::GetDocFilePos() const return mpImpGraphic->ImplGetDocFilePos(); } -sal_Bool Graphic::SwapOut() +bool Graphic::SwapOut() { ImplTestRefCount(); return mpImpGraphic->ImplSwapOut(); } -sal_Bool Graphic::SwapOut( SvStream* pOStream ) +bool Graphic::SwapOut( SvStream* pOStream ) { ImplTestRefCount(); return mpImpGraphic->ImplSwapOut( pOStream ); } -sal_Bool Graphic::SwapIn() +bool Graphic::SwapIn() { ImplTestRefCount(); return mpImpGraphic->ImplSwapIn(); } -sal_Bool Graphic::SwapIn( SvStream* pStrm ) +bool Graphic::SwapIn( SvStream* pStrm ) { ImplTestRefCount(); return mpImpGraphic->ImplSwapIn( pStrm ); } -sal_Bool Graphic::IsSwapOut() const +bool Graphic::IsSwapOut() const { return mpImpGraphic->ImplIsSwapOut(); } @@ -556,7 +556,7 @@ GfxLink Graphic::GetLink() const return mpImpGraphic->ImplGetLink(); } -sal_Bool Graphic::IsLink() const +bool Graphic::IsLink() const { return mpImpGraphic->ImplIsLink(); } @@ -566,7 +566,7 @@ sal_uLong Graphic::GetChecksum() const return mpImpGraphic->ImplGetChecksum(); } -sal_Bool Graphic::ExportNative( SvStream& rOStream ) const +bool Graphic::ExportNative( SvStream& rOStream ) const { return mpImpGraphic->ImplExportNative( rOStream ); } diff --git a/vcl/source/gdi/hatch.cxx b/vcl/source/gdi/hatch.cxx index b4f2439ef93a..e4d08e08a7f3 100644 --- a/vcl/source/gdi/hatch.cxx +++ b/vcl/source/gdi/hatch.cxx @@ -80,7 +80,7 @@ Hatch& Hatch::operator=( const Hatch& rHatch ) return *this; } -sal_Bool Hatch::operator==( const Hatch& rHatch ) const +bool Hatch::operator==( const Hatch& rHatch ) const { return( mpImplHatch == rHatch.mpImplHatch || diff --git a/vcl/source/gdi/image.cxx b/vcl/source/gdi/image.cxx index 2a17f5140771..8400942651a5 100644 --- a/vcl/source/gdi/image.cxx +++ b/vcl/source/gdi/image.cxx @@ -247,7 +247,7 @@ Image& Image::operator=( const Image& rImage ) return *this; } -sal_Bool Image::operator==( const Image& rImage ) const +bool Image::operator==( const Image& rImage ) const { bool bRet = false; @@ -690,7 +690,7 @@ ImageList& ImageList::operator=( const ImageList& rImageList ) return *this; } -sal_Bool ImageList::operator==( const ImageList& rImageList ) const +bool ImageList::operator==( const ImageList& rImageList ) const { bool bRet = false; diff --git a/vcl/source/gdi/impanmvw.cxx b/vcl/source/gdi/impanmvw.cxx index 40b86b4fb91f..5a5453045dc7 100644 --- a/vcl/source/gdi/impanmvw.cxx +++ b/vcl/source/gdi/impanmvw.cxx @@ -37,8 +37,8 @@ ImplAnimView::ImplAnimView( Animation* pParent, OutputDevice* pOut, mpBackground ( new VirtualDevice ), mpRestore ( new VirtualDevice ), meLastDisposal ( DISPOSE_BACK ), - mbPause ( sal_False ), - mbMarked ( sal_False ), + mbPause ( false ), + mbMarked ( false ), mbHMirr ( maSz.Width() < 0L ), mbVMirr ( maSz.Height() < 0L ) { @@ -100,17 +100,17 @@ ImplAnimView::~ImplAnimView() mpParent->ImplDecAnimCount(); } -sal_Bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const +bool ImplAnimView::ImplMatches( OutputDevice* pOut, long nExtraData ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( nExtraData ) { if( ( mnExtraData == nExtraData ) && ( !pOut || ( pOut == mpOut ) ) ) - bRet = sal_True; + bRet = true; } else if( !pOut || ( pOut == mpOut ) ) - bRet = sal_True; + bRet = true; return bRet; } @@ -157,7 +157,7 @@ void ImplAnimView::ImplDrawToPos( sal_uLong nPos ) VirtualDevice aVDev; Region* pOldClip = !maClip.IsNull() ? new Region( mpOut->GetClipRegion() ) : NULL; - aVDev.SetOutputSizePixel( maSzPix, sal_False ); + aVDev.SetOutputSizePixel( maSzPix, false ); nPos = std::min( nPos, (sal_uLong) mpParent->Count() - 1UL ); for( sal_uLong i = 0UL; i <= nPos; i++ ) @@ -186,7 +186,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) // check, if output lies out of display if( aOutRect.Intersection( Rectangle( maDispPt, maDispSz ) ).IsEmpty() ) - ImplSetMarked( sal_True ); + ImplSetMarked( true ); else if( !mbPause ) { VirtualDevice* pDev; @@ -227,7 +227,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) if( !pVDev ) { pDev = new VirtualDevice; - pDev->SetOutputSizePixel( maSzPix, sal_False ); + pDev->SetOutputSizePixel( maSzPix, false ); pDev->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut ); } else @@ -258,10 +258,10 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) // Put it into a bitmap if needed, else delete // SaveBitmap to conserve memory if( ( meLastDisposal == DISPOSE_BACK ) || ( meLastDisposal == DISPOSE_NOT ) ) - mpRestore->SetOutputSizePixel( Size( 1, 1 ), sal_False ); + mpRestore->SetOutputSizePixel( Size( 1, 1 ), false ); else { - mpRestore->SetOutputSizePixel( maRestSz, sal_False ); + mpRestore->SetOutputSizePixel( maRestSz, false ); mpRestore->DrawOutDev( Point(), maRestSz, aPosPix, aSizePix, *pDev ); } @@ -292,7 +292,7 @@ void ImplAnimView::ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ) void ImplAnimView::ImplRepaint() { - const sal_Bool bOldPause = mbPause; + const bool bOldPause = mbPause; if( mpOut->GetOutDevType() == OUTDEV_WINDOW ) { @@ -305,7 +305,7 @@ void ImplAnimView::ImplRepaint() else mpBackground->DrawOutDev( Point(), maSzPix, maDispPt, maDispSz, *mpOut ); - mbPause = sal_False; + mbPause = false; ImplDrawToPos( mnActPos ); mbPause = bOldPause; } diff --git a/vcl/source/gdi/impanmvw.hxx b/vcl/source/gdi/impanmvw.hxx index 8fb0df5207be..2cb0aecf264a 100644 --- a/vcl/source/gdi/impanmvw.hxx +++ b/vcl/source/gdi/impanmvw.hxx @@ -47,10 +47,10 @@ private: VirtualDevice* mpRestore; sal_uLong mnActPos; Disposal meLastDisposal; - sal_Bool mbPause; - sal_Bool mbMarked; - sal_Bool mbHMirr; - sal_Bool mbVMirr; + bool mbPause; + bool mbMarked; + bool mbHMirr; + bool mbVMirr; void ImplGetPosSize( const AnimationBitmap& rAnm, Point& rPosPix, Size& rSizePix ); void ImplDraw( sal_uLong nPos, VirtualDevice* pVDev ); @@ -62,7 +62,7 @@ public: OutputDevice* pFirstFrameOutDev = NULL ); ~ImplAnimView(); - sal_Bool ImplMatches( OutputDevice* pOut, long nExtraData ) const; + bool ImplMatches( OutputDevice* pOut, long nExtraData ) const; void ImplDrawToPos( sal_uLong nPos ); void ImplDraw( sal_uLong nPos ); void ImplRepaint(); @@ -73,11 +73,11 @@ public: const Size& ImplGetOutSize() const { return maSz; } const Size& ImplGetOutSizePix() const { return maSzPix; } - void ImplPause( sal_Bool bPause ) { mbPause = bPause; } - sal_Bool ImplIsPause() const { return mbPause; } + void ImplPause( bool bPause ) { mbPause = bPause; } + bool ImplIsPause() const { return mbPause; } - void ImplSetMarked( sal_Bool bMarked ) { mbMarked = bMarked; } - sal_Bool ImplIsMarked() const { return mbMarked; } + void ImplSetMarked( bool bMarked ) { mbMarked = bMarked; } + bool ImplIsMarked() const { return mbMarked; } }; #endif diff --git a/vcl/source/gdi/impbmp.cxx b/vcl/source/gdi/impbmp.cxx index 852f21110998..08ecc18b7a91 100644 --- a/vcl/source/gdi/impbmp.cxx +++ b/vcl/source/gdi/impbmp.cxx @@ -42,23 +42,23 @@ void ImpBitmap::ImplSetSalBitmap( SalBitmap* pBitmap ) delete mpSalBitmap, mpSalBitmap = pBitmap; } -sal_Bool ImpBitmap::ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) +bool ImpBitmap::ImplCreate( const Size& rSize, sal_uInt16 nBitCount, const BitmapPalette& rPal ) { return mpSalBitmap->Create( rSize, nBitCount, rPal ); } -sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap ) +bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap ) { mnChecksum = rImpBitmap.mnChecksum; return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap ); } -sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ) +bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, SalGraphics* pGraphics ) { return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, pGraphics ); } -sal_Bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ) +bool ImpBitmap::ImplCreate( const ImpBitmap& rImpBitmap, sal_uInt16 nNewBitCount ) { return mpSalBitmap->Create( *rImpBitmap.mpSalBitmap, nNewBitCount ); } @@ -74,12 +74,12 @@ sal_uInt16 ImpBitmap::ImplGetBitCount() const return( ( nBitCount <= 1 ) ? 1 : ( nBitCount <= 4 ) ? 4 : ( nBitCount <= 8 ) ? 8 : 24 ); } -BitmapBuffer* ImpBitmap::ImplAcquireBuffer( sal_Bool bReadOnly ) +BitmapBuffer* ImpBitmap::ImplAcquireBuffer( bool bReadOnly ) { return mpSalBitmap->AcquireBuffer( bReadOnly ); } -void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, sal_Bool bReadOnly ) +void ImpBitmap::ImplReleaseBuffer( BitmapBuffer* pBuffer, bool bReadOnly ) { mpSalBitmap->ReleaseBuffer( pBuffer, bReadOnly ); diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index f8c6065c3f1c..643b28311e4a 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -97,8 +97,8 @@ ImpGraphic::ImpGraphic() : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -113,7 +113,7 @@ ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) : mnSizeBytes ( rImpGraphic.mnSizeBytes ), mnRefCount ( 1UL ), mbSwapOut ( rImpGraphic.mbSwapOut ), - mbSwapUnderway ( sal_False ) + mbSwapUnderway ( false ) { if( mpSwapFile ) mpSwapFile->nRefCount++; @@ -144,8 +144,8 @@ ImpGraphic::ImpGraphic( const Bitmap& rBitmap ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -159,8 +159,8 @@ ImpGraphic::ImpGraphic( const BitmapEx& rBitmapEx ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -173,8 +173,8 @@ ImpGraphic::ImpGraphic(const SvgDataPtr& rSvgDataPtr) mnDocFilePos( 0UL ), mnSizeBytes( 0UL ), mnRefCount( 1UL ), - mbSwapOut( sal_False ), - mbSwapUnderway( sal_False ), + mbSwapOut( false ), + mbSwapUnderway( false ), maSvgData(rSvgDataPtr) { } @@ -189,8 +189,8 @@ ImpGraphic::ImpGraphic( const Animation& rAnimation ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -204,8 +204,8 @@ ImpGraphic::ImpGraphic( const GDIMetaFile& rMtf ) : mnDocFilePos ( 0UL ), mnSizeBytes ( 0UL ), mnRefCount ( 1UL ), - mbSwapOut ( sal_False ), - mbSwapUnderway ( sal_False ) + mbSwapOut ( false ), + mbSwapUnderway ( false ) { } @@ -265,24 +265,24 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic ) return *this; } -sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const +bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const { - sal_Bool bRet = sal_False; + bool bRet = false; if( this == &rImpGraphic ) - bRet = sal_True; + bRet = true; else if( !ImplIsSwapOut() && ( rImpGraphic.meType == meType ) ) { switch( meType ) { case( GRAPHIC_NONE ): - bRet = sal_True; + bRet = true; break; case( GRAPHIC_GDIMETAFILE ): { if( rImpGraphic.maMetaFile == maMetaFile ) - bRet = sal_True; + bRet = true; } break; @@ -292,7 +292,7 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const { if(maSvgData == rImpGraphic.maSvgData) { - bRet = sal_True; + bRet = true; } else if(rImpGraphic.maSvgData) { @@ -303,7 +303,7 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const rImpGraphic.maSvgData->getSvgDataArray().get(), maSvgData->getSvgDataArrayLength())) { - bRet = sal_True; + bRet = true; } } } @@ -311,11 +311,11 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const else if( mpAnimation ) { if( rImpGraphic.mpAnimation && ( *rImpGraphic.mpAnimation == *mpAnimation ) ) - bRet = sal_True; + bRet = true; } else if( !rImpGraphic.mpAnimation && ( rImpGraphic.maEx == maEx ) ) { - bRet = sal_True; + bRet = true; } } break; @@ -328,7 +328,7 @@ sal_Bool ImpGraphic::operator==( const ImpGraphic& rImpGraphic ) const return bRet; } -void ImpGraphic::ImplClearGraphics( sal_Bool bCreateSwapInfo ) +void ImpGraphic::ImplClearGraphics( bool bCreateSwapInfo ) { if( bCreateSwapInfo && !ImplIsSwapOut() ) { @@ -370,7 +370,7 @@ void ImpGraphic::ImplClear() comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -391,12 +391,12 @@ void ImpGraphic::ImplClear() mpSwapFile = NULL; } - mbSwapOut = sal_False; + mbSwapOut = false; mnDocFilePos = 0UL; maDocFileURLStr = OUString(); // cleanup - ImplClearGraphics( sal_False ); + ImplClearGraphics( false ); meType = GRAPHIC_NONE; mnSizeBytes = 0; } @@ -412,14 +412,14 @@ void ImpGraphic::ImplSetDefaultType() meType = GRAPHIC_DEFAULT; } -sal_Bool ImpGraphic::ImplIsSupportedGraphic() const +bool ImpGraphic::ImplIsSupportedGraphic() const { return( meType != GRAPHIC_NONE ); } -sal_Bool ImpGraphic::ImplIsTransparent() const +bool ImpGraphic::ImplIsTransparent() const { - sal_Bool bRet(sal_True); + bool bRet(true); if( meType == GRAPHIC_BITMAP && !maSvgData.get()) { @@ -429,13 +429,13 @@ sal_Bool ImpGraphic::ImplIsTransparent() const return bRet; } -sal_Bool ImpGraphic::ImplIsAlpha() const +bool ImpGraphic::ImplIsAlpha() const { - sal_Bool bRet(sal_False); + bool bRet(false); if(maSvgData.get()) { - bRet = sal_True; + bRet = true; } else if( meType == GRAPHIC_BITMAP ) { @@ -445,12 +445,12 @@ sal_Bool ImpGraphic::ImplIsAlpha() const return bRet; } -sal_Bool ImpGraphic::ImplIsAnimated() const +bool ImpGraphic::ImplIsAnimated() const { return( mpAnimation != NULL ); } -sal_Bool ImpGraphic::ImplIsEPS() const +bool ImpGraphic::ImplIsEPS() const { return( ( meType == GRAPHIC_GDIMETAFILE ) && ( maMetaFile.GetActionSize() > 0 ) && @@ -980,7 +980,7 @@ sal_uLong ImpGraphic::ImplGetDocFilePos() const return mnDocFilePos; } -sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) +bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, bool bSwap ) { MapMode aMapMode; Size aSize; @@ -991,7 +991,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) sal_Int32 nType; sal_Int32 nLen; const sal_uInt16 nOldFormat = rIStm.GetNumberFormatInt(); - sal_Bool bRet = sal_False; + bool bRet = false; if( !mbSwapUnderway ) { @@ -1088,7 +1088,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) if (!maDocFileURLStr.isEmpty()) { rIStm.Seek( nStartPos + nHeaderLen + nLen ); - bRet = mbSwapOut = sal_True; + bRet = mbSwapOut = true; } else { @@ -1135,7 +1135,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) if( !nReadErr && !nWriteErr ) { - bRet = mbSwapOut = sal_True; + bRet = mbSwapOut = true; mpSwapFile = new ImpSwapFile; mpSwapFile->nRefCount = 1; mpSwapFile->aSwapURL = aTmpURL; @@ -1149,7 +1149,7 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -1210,16 +1210,16 @@ sal_Bool ImpGraphic::ImplReadEmbedded( SvStream& rIStm, sal_Bool bSwap ) } } else - bRet = sal_True; + bRet = true; rIStm.SetNumberFormatInt( nOldFormat ); return bRet; } -sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) +bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( ( meType != GRAPHIC_NONE ) && ( meType != GRAPHIC_DEFAULT ) && !ImplIsSwapOut() ) { @@ -1286,7 +1286,7 @@ sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) //fdo39428 SvStream no longer supports operator<<(long) rOStm.WriteInt32( sal::static_int_cast<sal_Int32>(nStmPos2 - nDataStart) ); rOStm.Seek( nStmPos2 ); - bRet = sal_True; + bRet = true; } } @@ -1296,9 +1296,9 @@ sal_Bool ImpGraphic::ImplWriteEmbedded( SvStream& rOStm ) return bRet; } -sal_Bool ImpGraphic::ImplSwapOut() +bool ImpGraphic::ImplSwapOut() { - sal_Bool bRet = sal_False; + bool bRet = false; if( !ImplIsSwapOut() ) { @@ -1322,7 +1322,7 @@ sal_Bool ImpGraphic::ImplSwapOut() pOStm->SetVersion( SOFFICE_FILEFORMAT_50 ); pOStm->SetCompressMode( COMPRESSMODE_NATIVE ); - if( ( bRet = ImplSwapOut( pOStm ) ) == sal_True ) + if( ( bRet = ImplSwapOut( pOStm ) ) ) { mpSwapFile = new ImpSwapFile; mpSwapFile->nRefCount = 1; @@ -1339,7 +1339,7 @@ sal_Bool ImpGraphic::ImplSwapOut() comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -1361,17 +1361,17 @@ sal_Bool ImpGraphic::ImplSwapOut() } else { - ImplClearGraphics( sal_True ); - bRet = mbSwapOut = sal_True; + ImplClearGraphics( true ); + bRet = mbSwapOut = true; } } return bRet; } -sal_Bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) +bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pOStm ) { @@ -1383,23 +1383,23 @@ sal_Bool ImpGraphic::ImplSwapOut( SvStream* pOStm ) if( !pOStm->GetError() ) { - ImplClearGraphics( sal_True ); - bRet = mbSwapOut = sal_True; + ImplClearGraphics( true ); + bRet = mbSwapOut = true; } } } else { - ImplClearGraphics( sal_True ); - bRet = mbSwapOut = sal_True; + ImplClearGraphics( true ); + bRet = mbSwapOut = true; } return bRet; } -sal_Bool ImpGraphic::ImplSwapIn() +bool ImpGraphic::ImplSwapIn() { - sal_Bool bRet = sal_False; + bool bRet = false; if( ImplIsSwapOut() ) { @@ -1445,7 +1445,7 @@ sal_Bool ImpGraphic::ImplSwapIn() comphelper::getProcessComponentContext() ); aCnt.executeCommand( OUString("delete"), - ::com::sun::star::uno::makeAny( sal_Bool( sal_True ) ) ); + ::com::sun::star::uno::makeAny( true ) ); } catch( const ::com::sun::star::ucb::ContentCreationException& ) { @@ -1472,9 +1472,9 @@ sal_Bool ImpGraphic::ImplSwapIn() return bRet; } -sal_Bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) +bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( pIStm ) { @@ -1482,21 +1482,21 @@ sal_Bool ImpGraphic::ImplSwapIn( SvStream* pIStm ) if( !pIStm->GetError() ) { - mbSwapUnderway = sal_True; + mbSwapUnderway = true; bRet = ImplReadEmbedded( *pIStm ); - mbSwapUnderway = sal_False; + mbSwapUnderway = false; if( !bRet ) ImplClear(); else - mbSwapOut = sal_False; + mbSwapOut = false; } } return bRet; } -sal_Bool ImpGraphic::ImplIsSwapOut() const +bool ImpGraphic::ImplIsSwapOut() const { return mbSwapOut; } @@ -1515,7 +1515,7 @@ GfxLink ImpGraphic::ImplGetLink() return( mpGfxLink ? *mpGfxLink : GfxLink() ); } -sal_Bool ImpGraphic::ImplIsLink() const +bool ImpGraphic::ImplIsLink() const { return ( mpGfxLink != NULL ) ? sal_True : sal_False; } @@ -1559,9 +1559,9 @@ sal_uLong ImpGraphic::ImplGetChecksum() const return nRet; } -sal_Bool ImpGraphic::ImplExportNative( SvStream& rOStm ) const +bool ImpGraphic::ImplExportNative( SvStream& rOStm ) const { - sal_Bool bResult = sal_False; + bool bResult = false; if( !rOStm.GetError() ) { @@ -1625,7 +1625,7 @@ SvStream& ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) if( !rIStm.GetError() && aLink.LoadNative( aGraphic ) ) { // set link only, if no other link was set - const sal_Bool bSetLink = ( rImpGraphic.mpGfxLink == NULL ); + const bool bSetLink = ( rImpGraphic.mpGfxLink == NULL ); // assign graphic rImpGraphic = *aGraphic.ImplGetImpGraphic(); diff --git a/vcl/source/gdi/impimage.cxx b/vcl/source/gdi/impimage.cxx index fafd07c90007..5215ed0d969d 100644 --- a/vcl/source/gdi/impimage.cxx +++ b/vcl/source/gdi/impimage.cxx @@ -112,7 +112,7 @@ ImplImageData::~ImplImageData() delete mpImageBitmap; } -sal_Bool ImplImageData::IsEqual( const ImplImageData& rData ) +bool ImplImageData::IsEqual( const ImplImageData& rData ) { return( maBmpEx == rData.maBmpEx ); } diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 7c5ed11e82a0..aa2c022c84c1 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -639,10 +639,10 @@ ImplVectorizer::~ImplVectorizer() { } -sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, +bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ) { - sal_Bool bRet = sal_False; + bool bRet = false; VECT_PROGRESS( pProgress, 0 ); @@ -709,8 +709,8 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rM if( aPolyPoly.Count() ) { - rMtf.AddAction( new MetaLineColorAction( aFindColor, sal_True ) ); - rMtf.AddAction( new MetaFillColorAction( aFindColor, sal_True ) ); + rMtf.AddAction( new MetaLineColorAction( aFindColor, true ) ); + rMtf.AddAction( new MetaFillColorAction( aFindColor, true ) ); rMtf.AddAction( new MetaPolyPolygonAction( aPolyPoly ) ); } } @@ -731,7 +731,7 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rM rMtf.SetPrefSize( Size( nWidth + 2, nHeight + 2 ) ); rMtf.Move( 1, 1 ); rMtf.Scale( aLogSize1.Width(), aLogSize1.Height() ); - bRet = sal_True; + bRet = true; } } @@ -742,14 +742,14 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rM return bRet; } -sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, +bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ) { Bitmap* pBmp = new Bitmap( rMonoBmp ); BitmapReadAccess* pRAcc; ImplVectMap* pMap; - sal_Bool bRet = sal_False; + bool bRet = false; VECT_PROGRESS( pProgress, 10 ); @@ -829,7 +829,7 @@ sal_Bool ImplVectorizer::ImplVectorize( const Bitmap& rMonoBmp, rPolyPoly.Insert( aFirst, 0 ); } - bRet = sal_True; + bRet = true; } VECT_PROGRESS( pProgress, 100 ); @@ -1027,7 +1027,7 @@ void ImplVectorizer::ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, s } } -sal_Bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ) +bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ) { long nActX = rStartPt.X(); long nActY = rStartPt.Y(); @@ -1076,19 +1076,19 @@ sal_Bool ImplVectorizer::ImplGetChain( ImplVectMap* pMap, const Point& rStartPt } while( nFound ); - return sal_True; + return true; } -sal_Bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const +bool ImplVectorizer::ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const { if( pMap->IsDone( nY - 1L, nX ) ) - return sal_True; + return true; else if( pMap->IsDone( nY + 1L, nX ) ) - return sal_False; + return false; else if( pMap->IsDone( nY - 1L, nX - 1L ) || pMap->IsDone( nY - 1L, nX + 1L ) ) - return sal_True; + return true; else - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/impvect.hxx b/vcl/source/gdi/impvect.hxx index 5543c13a7458..38becc56ddd7 100644 --- a/vcl/source/gdi/impvect.hxx +++ b/vcl/source/gdi/impvect.hxx @@ -37,8 +37,8 @@ private: ImplVectMap* ImplExpand( BitmapReadAccess* pRAcc, const Color& rColor ); void ImplCalculate( ImplVectMap* pMap, PolyPolygon& rPolyPoly, sal_uInt8 cReduce, sal_uLong nFlags ); - sal_Bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ); - sal_Bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const; + bool ImplGetChain( ImplVectMap* pMap, const Point& rStartPt, ImplChain& rChain ); + bool ImplIsUp( ImplVectMap* pMap, long nY, long nX ) const; void ImplLimitPolyPoly( PolyPolygon& rPolyPoly ); public: @@ -46,9 +46,9 @@ public: ImplVectorizer(); ~ImplVectorizer(); - sal_Bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, + bool ImplVectorize( const Bitmap& rColorBmp, GDIMetaFile& rMtf, sal_uInt8 cReduce, sal_uLong nFlags, const Link* pProgress ); - sal_Bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, + bool ImplVectorize( const Bitmap& rMonoBmp, PolyPolygon& rPolyPoly, sal_uLong nFlags, const Link* pProgress ); }; diff --git a/vcl/source/gdi/jobset.cxx b/vcl/source/gdi/jobset.cxx index 044cde6977e2..ecc81753f365 100644 --- a/vcl/source/gdi/jobset.cxx +++ b/vcl/source/gdi/jobset.cxx @@ -192,14 +192,14 @@ JobSetup& JobSetup::operator=( const JobSetup& rJobSetup ) return *this; } -sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const +bool JobSetup::operator==( const JobSetup& rJobSetup ) const { if ( mpData == rJobSetup.mpData ) - return sal_True; + return true; if ( !mpData || !rJobSetup.mpData ) - return sal_False; + return false; ImplJobSetup* pData1 = mpData; ImplJobSetup* pData2 = rJobSetup.mpData; @@ -216,9 +216,9 @@ sal_Bool JobSetup::operator==( const JobSetup& rJobSetup ) const (memcmp( pData1->mpDriverData, pData2->mpDriverData, pData1->mnDriverDataLen ) == 0) && (pData1->maValueMap == pData2->maValueMap) ) - return sal_True; + return true; - return sal_False; + return false; } SvStream& ReadJobSetup( SvStream& rIStream, JobSetup& rJobSetup ) diff --git a/vcl/source/gdi/lineinfo.cxx b/vcl/source/gdi/lineinfo.cxx index bc6f7390b68d..a6fb09f1ad05 100644 --- a/vcl/source/gdi/lineinfo.cxx +++ b/vcl/source/gdi/lineinfo.cxx @@ -119,7 +119,7 @@ LineInfo& LineInfo::operator=( const LineInfo& rLineInfo ) // ----------------------------------------------------------------------- -sal_Bool LineInfo::operator==( const LineInfo& rLineInfo ) const +bool LineInfo::operator==( const LineInfo& rLineInfo ) const { return( mpImplLineInfo == rLineInfo.mpImplLineInfo || @@ -220,7 +220,7 @@ void LineInfo::SetLineCap(com::sun::star::drawing::LineCap eLineCap) // ----------------------------------------------------------------------- -sal_Bool LineInfo::IsDefault() const +bool LineInfo::IsDefault() const { return( !mpImplLineInfo->mnWidth && ( LINE_SOLID == mpImplLineInfo->meStyle ) diff --git a/vcl/source/gdi/mapmod.cxx b/vcl/source/gdi/mapmod.cxx index d17e73e8cd38..2a723a987e70 100644 --- a/vcl/source/gdi/mapmod.cxx +++ b/vcl/source/gdi/mapmod.cxx @@ -30,7 +30,7 @@ ImplMapMode::ImplMapMode() : { mnRefCount = 1; meUnit = MAP_PIXEL; - mbSimple = sal_False; + mbSimple = false; } ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) : @@ -40,7 +40,7 @@ ImplMapMode::ImplMapMode( const ImplMapMode& rImplMapMode ) : { mnRefCount = 1; meUnit = rImplMapMode.meUnit; - mbSimple = sal_False; + mbSimple = false; } SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rImplMapMode ) @@ -52,7 +52,7 @@ SvStream& ReadImplMapMode( SvStream& rIStm, ImplMapMode& rImplMapMode ) ReadPair( rIStm, rImplMapMode.maOrigin ); ReadFraction( rIStm, rImplMapMode.maScaleX ); ReadFraction( rIStm, rImplMapMode.maScaleY ); - rIStm.ReadUChar( rImplMapMode.mbSimple ); + rIStm.ReadCharAsBool( rImplMapMode.mbSimple ); return rIStm; } @@ -85,7 +85,7 @@ ImplMapMode* ImplMapMode::ImplGetStaticMapMode( MapUnit eUnit ) pImplMapMode->maScaleX = aDefFraction; pImplMapMode->maScaleY = aDefFraction; pImplMapMode->meUnit = eUnit; - pImplMapMode->mbSimple = sal_True; + pImplMapMode->mbSimple = true; } return pImplMapMode; @@ -202,35 +202,35 @@ MapMode& MapMode::operator=( const MapMode& rMapMode ) return *this; } -sal_Bool MapMode::operator==( const MapMode& rMapMode ) const +bool MapMode::operator==( const MapMode& rMapMode ) const { if ( mpImplMapMode == rMapMode.mpImplMapMode ) - return sal_True; + return true; if ( (mpImplMapMode->meUnit == rMapMode.mpImplMapMode->meUnit) && (mpImplMapMode->maOrigin == rMapMode.mpImplMapMode->maOrigin) && (mpImplMapMode->maScaleX == rMapMode.mpImplMapMode->maScaleX) && (mpImplMapMode->maScaleY == rMapMode.mpImplMapMode->maScaleY) ) - return sal_True; + return true; else - return sal_False; + return false; } -sal_Bool MapMode::IsDefault() const +bool MapMode::IsDefault() const { ImplMapMode* pDefMapMode = ImplMapMode::ImplGetStaticMapMode( MAP_PIXEL ); if ( mpImplMapMode == pDefMapMode ) - return sal_True; + return true; if ( (mpImplMapMode->meUnit == pDefMapMode->meUnit) && (mpImplMapMode->maOrigin == pDefMapMode->maOrigin) && (mpImplMapMode->maScaleX == pDefMapMode->maScaleX) && (mpImplMapMode->maScaleY == pDefMapMode->maScaleY) ) - return sal_True; + return true; else - return sal_False; + return false; } SvStream& ReadMapMode( SvStream& rIStm, MapMode& rMapMode ) diff --git a/vcl/source/gdi/metaact.cxx b/vcl/source/gdi/metaact.cxx index 3c8b494ff542..16ecaa20ac57 100644 --- a/vcl/source/gdi/metaact.cxx +++ b/vcl/source/gdi/metaact.cxx @@ -131,9 +131,9 @@ void MetaAction::Scale( double, double ) // ------------------------------------------------------------------------ -sal_Bool MetaAction::Compare( const MetaAction& ) const +bool MetaAction::Compare( const MetaAction& ) const { - return sal_True; + return true; } // ------------------------------------------------------------------------ @@ -278,7 +278,7 @@ void MetaPixelAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPixelAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPixelAction::Compare( const MetaAction& rMetaAction ) const { return ( maPt == ((MetaPixelAction&)rMetaAction).maPt ) && ( maColor == ((MetaPixelAction&)rMetaAction).maColor ); @@ -346,7 +346,7 @@ void MetaPointAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPointAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPointAction::Compare( const MetaAction& rMetaAction ) const { return maPt == ((MetaPointAction&)rMetaAction).maPt; } @@ -429,7 +429,7 @@ void MetaLineAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaLineAction::Compare( const MetaAction& rMetaAction ) const +bool MetaLineAction::Compare( const MetaAction& rMetaAction ) const { return ( maLineInfo == ((MetaLineAction&)rMetaAction).maLineInfo ) && ( maStartPt == ((MetaLineAction&)rMetaAction).maStartPt ) && @@ -508,7 +508,7 @@ void MetaRectAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaRectAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRectAction::Compare( const MetaAction& rMetaAction ) const { return maRect == ((MetaRectAction&)rMetaAction).maRect; } @@ -578,7 +578,7 @@ void MetaRoundRectAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaRoundRectAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRoundRectAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaRoundRectAction&)rMetaAction).maRect ) && ( mnHorzRound == ((MetaRoundRectAction&)rMetaAction).mnHorzRound ) && @@ -646,7 +646,7 @@ void MetaEllipseAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaEllipseAction::Compare( const MetaAction& rMetaAction ) const +bool MetaEllipseAction::Compare( const MetaAction& rMetaAction ) const { return maRect == ((MetaEllipseAction&)rMetaAction).maRect; } @@ -718,7 +718,7 @@ void MetaArcAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaArcAction::Compare( const MetaAction& rMetaAction ) const +bool MetaArcAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaArcAction&)rMetaAction).maRect ) && ( maStartPt == ((MetaArcAction&)rMetaAction).maStartPt ) && @@ -796,7 +796,7 @@ void MetaPieAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPieAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPieAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaPieAction&)rMetaAction).maRect ) && ( maStartPt == ((MetaPieAction&)rMetaAction).maStartPt ) && @@ -874,7 +874,7 @@ void MetaChordAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaChordAction::Compare( const MetaAction& rMetaAction ) const +bool MetaChordAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaChordAction&)rMetaAction).maRect ) && ( maStartPt == ((MetaChordAction&)rMetaAction).maStartPt ) && @@ -958,11 +958,11 @@ void MetaPolyLineAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPolyLineAction::Compare( const MetaAction& rMetaAction ) const { - sal_Bool bIsEqual = sal_True; + bool bIsEqual = true; if ( maLineInfo != ((MetaPolyLineAction&)rMetaAction).maLineInfo ) - bIsEqual = sal_False; + bIsEqual = false; else bIsEqual = maPoly.IsEqual(((MetaPolyLineAction&)rMetaAction).maPoly ); return bIsEqual; @@ -1052,7 +1052,7 @@ void MetaPolygonAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPolygonAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPolygonAction::Compare( const MetaAction& rMetaAction ) const { return maPoly.IsEqual(((MetaPolygonAction&)rMetaAction).maPoly ); } @@ -1135,7 +1135,7 @@ void MetaPolyPolygonAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaPolyPolygonAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPolyPolygonAction::Compare( const MetaAction& rMetaAction ) const { return maPolyPoly.IsEqual(((MetaPolyPolygonAction&)rMetaAction).maPolyPoly ); } @@ -1243,7 +1243,7 @@ void MetaTextAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextAction::Compare( const MetaAction& rMetaAction ) const { return ( maPt == ((MetaTextAction&)rMetaAction).maPt ) && ( maStr == ((MetaTextAction&)rMetaAction).maStr ) && @@ -1377,7 +1377,7 @@ void MetaTextArrayAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextArrayAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextArrayAction::Compare( const MetaAction& rMetaAction ) const { return ( maStartPt == ((MetaTextArrayAction&)rMetaAction).maStartPt ) && ( maStr == ((MetaTextArrayAction&)rMetaAction).maStr ) && @@ -1516,7 +1516,7 @@ void MetaStretchTextAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const +bool MetaStretchTextAction::Compare( const MetaAction& rMetaAction ) const { return ( maPt == ((MetaStretchTextAction&)rMetaAction).maPt ) && ( maStr == ((MetaStretchTextAction&)rMetaAction).maStr ) && @@ -1601,7 +1601,7 @@ void MetaTextRectAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextRectAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaTextRectAction&)rMetaAction).maRect ) && ( maStr == ((MetaTextRectAction&)rMetaAction).maStr ) && @@ -1685,7 +1685,7 @@ void MetaTextLineAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTextLineAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextLineAction::Compare( const MetaAction& rMetaAction ) const { return ( maPos == ((MetaTextLineAction&)rMetaAction).maPos ) && ( mnWidth == ((MetaTextLineAction&)rMetaAction).mnWidth ) && @@ -1776,7 +1776,7 @@ void MetaBmpAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpAction::Compare( const MetaAction& rMetaAction ) const { return maBmp.IsEqual(((MetaBmpAction&)rMetaAction).maBmp ) && ( maPt == ((MetaBmpAction&)rMetaAction).maPt ); @@ -1853,7 +1853,7 @@ void MetaBmpScaleAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpScaleAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpScaleAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaBmpScaleAction&)rMetaAction).maBmp )) && ( maPt == ((MetaBmpScaleAction&)rMetaAction).maPt ) && @@ -1936,7 +1936,7 @@ void MetaBmpScalePartAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpScalePartAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpScalePartAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaBmpScalePartAction&)rMetaAction).maBmp )) && ( maDstPt == ((MetaBmpScalePartAction&)rMetaAction).maDstPt ) && @@ -2017,7 +2017,7 @@ void MetaBmpExAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpExAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpExAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmpEx.IsEqual(((MetaBmpExAction&)rMetaAction).maBmpEx )) && ( maPt == ((MetaBmpExAction&)rMetaAction).maPt ); @@ -2094,7 +2094,7 @@ void MetaBmpExScaleAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpExScaleAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpExScaleAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmpEx.IsEqual(((MetaBmpExScaleAction&)rMetaAction).maBmpEx )) && ( maPt == ((MetaBmpExScaleAction&)rMetaAction).maPt ) && @@ -2177,7 +2177,7 @@ void MetaBmpExScalePartAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaBmpExScalePartAction::Compare( const MetaAction& rMetaAction ) const +bool MetaBmpExScalePartAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmpEx.IsEqual(((MetaBmpExScalePartAction&)rMetaAction).maBmpEx )) && ( maDstPt == ((MetaBmpExScalePartAction&)rMetaAction).maDstPt ) && @@ -2261,7 +2261,7 @@ void MetaMaskAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMaskAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMaskAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaMaskAction&)rMetaAction).maBmp )) && ( maColor == ((MetaMaskAction&)rMetaAction).maColor ) && @@ -2341,7 +2341,7 @@ void MetaMaskScaleAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMaskScaleAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMaskScaleAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaMaskScaleAction&)rMetaAction).maBmp )) && ( maColor == ((MetaMaskScaleAction&)rMetaAction).maColor ) && @@ -2427,7 +2427,7 @@ void MetaMaskScalePartAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMaskScalePartAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMaskScalePartAction::Compare( const MetaAction& rMetaAction ) const { return ( maBmp.IsEqual(((MetaMaskScalePartAction&)rMetaAction).maBmp )) && ( maColor == ((MetaMaskScalePartAction&)rMetaAction).maColor ) && @@ -2511,7 +2511,7 @@ void MetaGradientAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaGradientAction::Compare( const MetaAction& rMetaAction ) const +bool MetaGradientAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaGradientAction&)rMetaAction).maRect ) && ( maGradient == ((MetaGradientAction&)rMetaAction).maGradient ); @@ -2594,7 +2594,7 @@ void MetaGradientExAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaGradientExAction::Compare( const MetaAction& rMetaAction ) const +bool MetaGradientExAction::Compare( const MetaAction& rMetaAction ) const { return ( maPolyPoly == ((MetaGradientExAction&)rMetaAction).maPolyPoly ) && ( maGradient == ((MetaGradientExAction&)rMetaAction).maGradient ); @@ -2669,7 +2669,7 @@ void MetaHatchAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaHatchAction::Compare( const MetaAction& rMetaAction ) const +bool MetaHatchAction::Compare( const MetaAction& rMetaAction ) const { return ( maPolyPoly == ((MetaHatchAction&)rMetaAction).maPolyPoly ) && ( maHatch == ((MetaHatchAction&)rMetaAction).maHatch ); @@ -2744,7 +2744,7 @@ void MetaWallpaperAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaWallpaperAction::Compare( const MetaAction& rMetaAction ) const +bool MetaWallpaperAction::Compare( const MetaAction& rMetaAction ) const { return ( maRect == ((MetaWallpaperAction&)rMetaAction).maRect ) && ( maWallpaper == ((MetaWallpaperAction&)rMetaAction).maWallpaper ); @@ -2772,7 +2772,7 @@ IMPL_META_ACTION( ClipRegion, META_CLIPREGION_ACTION ) // ------------------------------------------------------------------------ -MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, sal_Bool bClip ) : +MetaClipRegionAction::MetaClipRegionAction( const Region& rRegion, bool bClip ) : MetaAction ( META_CLIPREGION_ACTION ), maRegion ( rRegion ), mbClip ( bClip ) @@ -2814,7 +2814,7 @@ void MetaClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return ( maRegion == ((MetaClipRegionAction&)rMetaAction).maRegion ) && ( mbClip == ((MetaClipRegionAction&)rMetaAction).mbClip ); @@ -2835,7 +2835,7 @@ void MetaClipRegionAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); ReadRegion( rIStm, maRegion ); - rIStm.ReadUChar( mbClip ); + rIStm.ReadCharAsBool( mbClip ); } // ======================================================================== @@ -2882,7 +2882,7 @@ void MetaISectRectClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaISectRectClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaISectRectClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return maRect == ((MetaISectRectClipRegionAction&)rMetaAction).maRect; } @@ -2947,7 +2947,7 @@ void MetaISectRegionClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaISectRegionClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaISectRegionClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return maRegion == ((MetaISectRegionClipRegionAction&)rMetaAction).maRegion; } @@ -3007,7 +3007,7 @@ void MetaMoveClipRegionAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMoveClipRegionAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMoveClipRegionAction::Compare( const MetaAction& rMetaAction ) const { return ( mnHorzMove == ((MetaMoveClipRegionAction&)rMetaAction).mnHorzMove ) && ( mnVertMove == ((MetaMoveClipRegionAction&)rMetaAction).mnVertMove ); @@ -3040,7 +3040,7 @@ IMPL_META_ACTION( LineColor, META_LINECOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaLineColorAction::MetaLineColorAction( const Color& rColor, sal_Bool bSet ) : +MetaLineColorAction::MetaLineColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_LINECOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3068,7 +3068,7 @@ MetaAction* MetaLineColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaLineColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaLineColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaLineColorAction&)rMetaAction).mbSet ); @@ -3089,7 +3089,7 @@ void MetaLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3098,7 +3098,7 @@ IMPL_META_ACTION( FillColor, META_FILLCOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaFillColorAction::MetaFillColorAction( const Color& rColor, sal_Bool bSet ) : +MetaFillColorAction::MetaFillColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_FILLCOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3126,7 +3126,7 @@ MetaAction* MetaFillColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaFillColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaFillColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaFillColorAction&)rMetaAction).mbSet ); @@ -3147,7 +3147,7 @@ void MetaFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3180,7 +3180,7 @@ MetaAction* MetaTextColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextColorAction::Compare( const MetaAction& rMetaAction ) const { return maColor == ((MetaTextColorAction&)rMetaAction).maColor; } @@ -3207,7 +3207,7 @@ IMPL_META_ACTION( TextFillColor, META_TEXTFILLCOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, sal_Bool bSet ) : +MetaTextFillColorAction::MetaTextFillColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_TEXTFILLCOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3235,7 +3235,7 @@ MetaAction* MetaTextFillColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextFillColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaTextFillColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaTextFillColorAction&)rMetaAction).mbSet ); @@ -3256,7 +3256,7 @@ void MetaTextFillColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3265,7 +3265,7 @@ IMPL_META_ACTION( TextLineColor, META_TEXTLINECOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, sal_Bool bSet ) : +MetaTextLineColorAction::MetaTextLineColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_TEXTLINECOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3293,7 +3293,7 @@ MetaAction* MetaTextLineColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextLineColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaTextLineColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaTextLineColorAction&)rMetaAction).mbSet ); @@ -3314,7 +3314,7 @@ void MetaTextLineColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3323,7 +3323,7 @@ IMPL_META_ACTION( OverlineColor, META_OVERLINECOLOR_ACTION ) // ------------------------------------------------------------------------ -MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, sal_Bool bSet ) : +MetaOverlineColorAction::MetaOverlineColorAction( const Color& rColor, bool bSet ) : MetaAction ( META_OVERLINECOLOR_ACTION ), maColor ( rColor ), mbSet ( bSet ) @@ -3351,7 +3351,7 @@ MetaAction* MetaOverlineColorAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const +bool MetaOverlineColorAction::Compare( const MetaAction& rMetaAction ) const { return ( maColor == ((MetaOverlineColorAction&)rMetaAction).maColor ) && ( mbSet == ((MetaOverlineColorAction&)rMetaAction).mbSet ); @@ -3372,7 +3372,7 @@ void MetaOverlineColorAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); maColor.Read( rIStm, true ); - rIStm.ReadUChar( mbSet ); + rIStm.ReadCharAsBool( mbSet ); } // ======================================================================== @@ -3405,7 +3405,7 @@ MetaAction* MetaTextAlignAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextAlignAction::Compare( const MetaAction& rMetaAction ) const { return maAlign == ((MetaTextAlignAction&)rMetaAction).maAlign; } @@ -3468,7 +3468,7 @@ void MetaMapModeAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaMapModeAction::Compare( const MetaAction& rMetaAction ) const +bool MetaMapModeAction::Compare( const MetaAction& rMetaAction ) const { return maMapMode == ((MetaMapModeAction&)rMetaAction).maMapMode; } @@ -3538,7 +3538,7 @@ void MetaFontAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaFontAction::Compare( const MetaAction& rMetaAction ) const +bool MetaFontAction::Compare( const MetaAction& rMetaAction ) const { return maFont == ((MetaFontAction&)rMetaAction).maFont; } @@ -3595,7 +3595,7 @@ MetaAction* MetaPushAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaPushAction::Compare( const MetaAction& rMetaAction ) const +bool MetaPushAction::Compare( const MetaAction& rMetaAction ) const { return mnFlags == ((MetaPushAction&)rMetaAction).mnFlags; } @@ -3680,7 +3680,7 @@ MetaAction* MetaRasterOpAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRasterOpAction::Compare( const MetaAction& rMetaAction ) const { return meRasterOp == ((MetaRasterOpAction&)rMetaAction).meRasterOp; } @@ -3749,7 +3749,7 @@ void MetaTransparentAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaTransparentAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTransparentAction::Compare( const MetaAction& rMetaAction ) const { return ( maPolyPoly == ((MetaTransparentAction&)rMetaAction).maPolyPoly ) && ( mnTransPercent == ((MetaTransparentAction&)rMetaAction).mnTransPercent ); @@ -3837,7 +3837,7 @@ void MetaFloatTransparentAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) const +bool MetaFloatTransparentAction::Compare( const MetaAction& rMetaAction ) const { return ( maMtf == ((MetaFloatTransparentAction&)rMetaAction).maMtf ) && ( maPoint == ((MetaFloatTransparentAction&)rMetaAction).maPoint ) && @@ -3919,7 +3919,7 @@ void MetaEPSAction::Scale( double fScaleX, double fScaleY ) // ------------------------------------------------------------------------ -sal_Bool MetaEPSAction::Compare( const MetaAction& rMetaAction ) const +bool MetaEPSAction::Compare( const MetaAction& rMetaAction ) const { return ( maGfxLink.IsEqual(((MetaEPSAction&)rMetaAction).maGfxLink )) && ( maSubst == ((MetaEPSAction&)rMetaAction).maSubst ) && @@ -3955,7 +3955,7 @@ IMPL_META_ACTION( RefPoint, META_REFPOINT_ACTION ) // ------------------------------------------------------------------------ -MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, sal_Bool bSet ) : +MetaRefPointAction::MetaRefPointAction( const Point& rRefPoint, bool bSet ) : MetaAction ( META_REFPOINT_ACTION ), maRefPoint ( rRefPoint ), mbSet ( bSet ) @@ -3983,7 +3983,7 @@ MetaAction* MetaRefPointAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaRefPointAction::Compare( const MetaAction& rMetaAction ) const +bool MetaRefPointAction::Compare( const MetaAction& rMetaAction ) const { return ( maRefPoint == ((MetaRefPointAction&)rMetaAction).maRefPoint ) && ( mbSet == ((MetaRefPointAction&)rMetaAction).mbSet ); @@ -4003,7 +4003,7 @@ void MetaRefPointAction::Write( SvStream& rOStm, ImplMetaWriteData* pData ) void MetaRefPointAction::Read( SvStream& rIStm, ImplMetaReadData* ) { COMPAT( rIStm ); - ReadPair( rIStm, maRefPoint ).ReadUChar( mbSet ); + ReadPair( rIStm, maRefPoint ).ReadCharAsBool( mbSet ); } // ======================================================================== @@ -4199,7 +4199,7 @@ void MetaCommentAction::Scale( double fXScale, double fYScale ) // ------------------------------------------------------------------------ -sal_Bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const +bool MetaCommentAction::Compare( const MetaAction& rMetaAction ) const { return ( maComment == ((MetaCommentAction&)rMetaAction).maComment ) && ( mnValue == ((MetaCommentAction&)rMetaAction).mnValue ) && @@ -4270,7 +4270,7 @@ MetaAction* MetaLayoutModeAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaLayoutModeAction::Compare( const MetaAction& rMetaAction ) const +bool MetaLayoutModeAction::Compare( const MetaAction& rMetaAction ) const { return mnLayoutMode == ((MetaLayoutModeAction&)rMetaAction).mnLayoutMode; } @@ -4321,7 +4321,7 @@ MetaAction* MetaTextLanguageAction::Clone() // ------------------------------------------------------------------------ -sal_Bool MetaTextLanguageAction::Compare( const MetaAction& rMetaAction ) const +bool MetaTextLanguageAction::Compare( const MetaAction& rMetaAction ) const { return meTextLanguage == ((MetaTextLanguageAction&)rMetaAction).meTextLanguage; } diff --git a/vcl/source/gdi/metric.cxx b/vcl/source/gdi/metric.cxx index ff17f9d5bd9a..0ddf5ec69e1c 100644 --- a/vcl/source/gdi/metric.cxx +++ b/vcl/source/gdi/metric.cxx @@ -116,15 +116,15 @@ FontInfo& FontInfo::operator=( const FontInfo& rInfo ) // ----------------------------------------------------------------------- -sal_Bool FontInfo::operator==( const FontInfo& rInfo ) const +bool FontInfo::operator==( const FontInfo& rInfo ) const { if( !Font::operator==( rInfo ) ) - return sal_False; + return false; if( mpImplMetric == rInfo.mpImplMetric ) - return sal_True; + return true; if( *mpImplMetric == *rInfo.mpImplMetric ) - return sal_True; - return sal_False; + return true; + return false; } // ----------------------------------------------------------------------- @@ -190,7 +190,7 @@ FontMetric& FontMetric::operator =( const FontMetric& rMetric ) // ----------------------------------------------------------------------- -sal_Bool FontMetric::operator==( const FontMetric& rMetric ) const +bool FontMetric::operator==( const FontMetric& rMetric ) const { return FontInfo::operator==( rMetric ); } diff --git a/vcl/source/gdi/octree.cxx b/vcl/source/gdi/octree.cxx index 165ab33708cf..0a6a8c1ddc13 100644 --- a/vcl/source/gdi/octree.cxx +++ b/vcl/source/gdi/octree.cxx @@ -217,7 +217,7 @@ void Octree::ImplReduce() } } - pNode->bLeaf = sal_True; + pNode->bLeaf = true; pNode->nRed = nRedSum; pNode->nGreen = nGreenSum; pNode->nBlue = nBlueSum; diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index b372c9d8c585..439e385f5b94 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -392,7 +392,7 @@ OutputDevice::~OutputDevice() if ( GetUnoGraphicsList() ) { - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( false ); if ( pWrapper ) pWrapper->ReleaseAllGraphics( this ); delete mpUnoGraphicsList; @@ -457,9 +457,9 @@ bool OutputDevice::supportsOperation( OutDevSupportType eType ) const return bHasSupport; } -void OutputDevice::EnableRTL( sal_Bool bEnable ) +void OutputDevice::EnableRTL( bool bEnable ) { - mbEnableRTL = (bEnable != 0); + mbEnableRTL = bEnable; if( meOutDevType == OUTDEV_VIRDEV ) { // virdevs default to not mirroring, they will only be set to mirroring @@ -555,7 +555,7 @@ SalGraphics* OutputDevice::ImplGetGraphics() const { // steal the wingraphics from the other outdev mpGraphics = pReleaseOutDev->mpGraphics; - pReleaseOutDev->ImplReleaseGraphics( sal_False ); + pReleaseOutDev->ImplReleaseGraphics( false ); } else { @@ -670,7 +670,7 @@ SalGraphics* OutputDevice::ImplGetGraphics() const return mpGraphics; } -void OutputDevice::ImplReleaseGraphics( sal_Bool bRelease ) +void OutputDevice::ImplReleaseGraphics( bool bRelease ) { DBG_TESTSOLARMUTEX(); @@ -820,7 +820,7 @@ void OutputDevice::ImplInvalidateViewTransform() } } -sal_Bool OutputDevice::ImplIsRecordLayout() const +bool OutputDevice::ImplIsRecordLayout() const { return mpOutDevData && mpOutDevData->mpRecordLayout; } @@ -994,7 +994,7 @@ void OutputDevice::SetClipRegion() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( Region(), sal_False ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( Region(), false ) ); ImplSetClipRegion( NULL ); @@ -1006,7 +1006,7 @@ void OutputDevice::SetClipRegion( const Region& rRegion ) { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, sal_True ) ); + mpMetaFile->AddAction( new MetaClipRegionAction( rRegion, true ) ); if ( rRegion.IsNull() ) { @@ -1130,7 +1130,7 @@ void OutputDevice::SetLineColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); if ( mbLineColor ) { @@ -1190,7 +1190,7 @@ void OutputDevice::SetLineColor( const Color& rColor ) Color aColor = ImplDrawModeToColor( rColor ); if( mpMetaFile ) - mpMetaFile->AddAction( new MetaLineColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaLineColorAction( aColor, true ) ); if( ImplIsColorTransparent( aColor ) ) { @@ -1219,7 +1219,7 @@ void OutputDevice::SetFillColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color(), false ) ); if ( mbFillColor ) { @@ -1275,7 +1275,7 @@ void OutputDevice::SetFillColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaFillColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( aColor, true ) ); if ( ImplIsColorTransparent( aColor ) ) { @@ -1328,7 +1328,7 @@ void OutputDevice::SetRefPoint() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaRefPointAction( Point(), sal_False ) ); + mpMetaFile->AddAction( new MetaRefPointAction( Point(), false ) ); mbRefPoint = false; maRefPoint.X() = maRefPoint.Y() = 0L; @@ -1341,7 +1341,7 @@ void OutputDevice::SetRefPoint( const Point& rRefPoint ) { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, sal_True ) ); + mpMetaFile->AddAction( new MetaRefPointAction( rRefPoint, true ) ); mbRefPoint = true; maRefPoint = rRefPoint; @@ -2459,9 +2459,9 @@ void OutputDevice::SetConnectMetaFile( GDIMetaFile* pMtf ) mpMetaFile = pMtf; } -void OutputDevice::EnableOutput( sal_Bool bEnable ) +void OutputDevice::EnableOutput( bool bEnable ) { - mbOutput = (bEnable != 0); + mbOutput = bEnable; if( mpAlphaVDev ) mpAlphaVDev->EnableOutput( bEnable ); @@ -2510,7 +2510,7 @@ sal_uLong OutputDevice::GetColorCount() const return( ( nBitCount > 31 ) ? ULONG_MAX : ( ( (sal_uLong) 1 ) << nBitCount) ); } -sal_Bool OutputDevice::HasAlpha() +bool OutputDevice::HasAlpha() { return mpAlphaVDev != NULL; } diff --git a/vcl/source/gdi/outdev2.cxx b/vcl/source/gdi/outdev2.cxx index 501d42b236c4..111fdf652a8a 100644 --- a/vcl/source/gdi/outdev2.cxx +++ b/vcl/source/gdi/outdev2.cxx @@ -1747,7 +1747,7 @@ Bitmap OutputDevice::ImplBlendWithAlpha( Bitmap aBmp, "ImplBlendWithAlpha(): call me only with valid alpha VDev!" ); bool bOldMapMode( mpAlphaVDev->IsMapModeEnabled() ); - mpAlphaVDev->EnableMapMode(sal_False); + mpAlphaVDev->EnableMapMode(false); Bitmap aAlphaBitmap( mpAlphaVDev->GetBitmap( aDstRect.TopLeft(), aDstRect.GetSize() ) ); BitmapWriteAccess* pAlphaW = aAlphaBitmap.AcquireWriteAccess(); diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx index fb3c099a158a..833caaa1bb00 100644 --- a/vcl/source/gdi/outdev3.cxx +++ b/vcl/source/gdi/outdev3.cxx @@ -334,7 +334,7 @@ void OutputDevice::ImplUpdateFontDataForAllFrames( const FontUpdateHandler_t pHd void OutputDevice::BeginFontSubstitution() { ImplSVData* pSVData = ImplGetSVData(); - pSVData->maGDIData.mbFontSubChanged = sal_False; + pSVData->maGDIData.mbFontSubChanged = false; } void OutputDevice::EndFontSubstitution() @@ -348,7 +348,7 @@ void OutputDevice::EndFontSubstitution() DataChangedEvent aDCEvt( DATACHANGED_FONTSUBSTITUTION ); pApp->DataChanged( aDCEvt ); pApp->NotifyAllWindows( aDCEvt ); - pSVData->maGDIData.mbFontSubChanged = sal_False; + pSVData->maGDIData.mbFontSubChanged = false; } } @@ -360,7 +360,7 @@ void OutputDevice::AddFontSubstitute( const OUString& rFontName, if( !rpSubst ) rpSubst = new ImplDirectFontSubstitution(); rpSubst->AddFontSubstitute( rFontName, rReplaceFontName, nFlags ); - ImplGetSVData()->maGDIData.mbFontSubChanged = sal_True; + ImplGetSVData()->maGDIData.mbFontSubChanged = true; } void ImplDirectFontSubstitution::AddFontSubstitute( const OUString& rFontName, @@ -2837,17 +2837,17 @@ FontEmphasisMark OutputDevice::ImplGetEmphasisMarkStyle( const Font& rFont ) return nEmphasisMark; } -sal_Bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont ) +bool OutputDevice::ImplIsUnderlineAbove( const Font& rFont ) { if ( !rFont.IsVertical() ) - return sal_False; + return false; if( (LANGUAGE_JAPANESE == rFont.GetLanguage()) || (LANGUAGE_JAPANESE == rFont.GetCJKContextLanguage()) ) // the underline is right for Japanese only - return sal_True; + return true; - return sal_False; + return false; } void OutputDevice::ImplInitFontList() const @@ -3563,7 +3563,7 @@ void OutputDevice::ImplDrawWaveTextLine( long nBaseX, long nBaseY, long nDistX, long nDistY, long nWidth, FontUnderline eTextLine, Color aColor, - sal_Bool bIsAbove ) + bool bIsAbove ) { ImplFontEntry* pFontEntry = mpFontEntry; long nLineHeight; @@ -3625,7 +3625,7 @@ void OutputDevice::ImplDrawStraightTextLine( long nBaseX, long nBaseY, long nDistX, long nDistY, long nWidth, FontUnderline eTextLine, Color aColor, - sal_Bool bIsAbove ) + bool bIsAbove ) { ImplFontEntry* pFontEntry = mpFontEntry; long nLineHeight = 0; @@ -4006,7 +4006,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove ) + bool bUnderlineAbove ) { if ( !nWidth ) return; @@ -4046,7 +4046,7 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, (eOverline == UNDERLINE_DOUBLEWAVE) || (eOverline == UNDERLINE_BOLDWAVE) ) { - ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True ); + ImplDrawWaveTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, true ); bOverlineDone = true; } @@ -4061,14 +4061,14 @@ void OutputDevice::ImplDrawTextLine( long nX, long nY, ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eUnderline, aUnderlineColor, bUnderlineAbove ); if ( !bOverlineDone ) - ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, sal_True ); + ImplDrawStraightTextLine( nX, nY, nDistX, 0, nWidth, eOverline, aOverlineColor, true ); if ( !bStrikeoutDone ) ImplDrawStrikeoutLine( nX, nY, nDistX, 0, nWidth, eStrikeout, aStrikeoutColor ); } void OutputDevice::ImplDrawTextLines( SalLayout& rSalLayout, - FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, sal_Bool bWordLine, sal_Bool bUnderlineAbove ) + FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, bool bWordLine, bool bUnderlineAbove ) { if( bWordLine ) { @@ -4140,10 +4140,10 @@ void OutputDevice::ImplDrawMnemonicLine( long nX, long nY, long nWidth ) nX = nBaseX - nWidth - (nX - nBaseX - 1); } - ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, sal_False ); + ImplDrawTextLine( nX, nY, 0, nWidth, STRIKEOUT_NONE, UNDERLINE_SINGLE, UNDERLINE_NONE, false ); } -void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyLine, +void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, bool& rPolyLine, Rectangle& rRect1, Rectangle& rRect2, long& rYOff, long& rWidth, FontEmphasisMark eEmphasis, @@ -4184,7 +4184,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyL rWidth = 0; rYOff = 0; - rPolyLine = sal_False; + rPolyLine = false; if ( !nHeight ) return; @@ -4225,7 +4225,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyL // BorderWidth is 15% long nBorder = (nDotSize*150)/1000; if ( nBorder <= 1 ) - rPolyLine = sal_True; + rPolyLine = true; else { Polygon aPoly2( Point( nRad, nRad ), @@ -4297,7 +4297,7 @@ void OutputDevice::ImplGetEmphasisMark( PolyPolygon& rPolyPoly, sal_Bool& rPolyL } void OutputDevice::ImplDrawEmphasisMark( long nBaseX, long nX, long nY, - const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, + const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ) { if( IsRTLEnabled() ) @@ -4343,10 +4343,10 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) { Color aOldLineColor = GetLineColor(); Color aOldFillColor = GetFillColor(); - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; GDIMetaFile* pOldMetaFile = mpMetaFile; mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); FontEmphasisMark nEmphasisMark = ImplGetEmphasisMarkStyle( maFont ); PolyPolygon aPolyPoly; @@ -4355,7 +4355,7 @@ void OutputDevice::ImplDrawEmphasisMarks( SalLayout& rSalLayout ) long nEmphasisYOff; long nEmphasisWidth; long nEmphasisHeight; - sal_Bool bPolyLine; + bool bPolyLine; if ( nEmphasisMark & EMPHASISMARK_POS_BELOW ) nEmphasisHeight = mnEmphasisDescent; @@ -4477,12 +4477,12 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) GDIMetaFile* pOldMetaFile = mpMetaFile; long nOldOffX = mnOutOffX; long nOldOffY = mnOutOffY; - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; mnOutOffX = 0L; mnOutOffY = 0L; mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); DrawMask( aPoint, aBmp, GetTextColor() ); @@ -4494,7 +4494,7 @@ bool OutputDevice::ImplDrawRotateText( SalLayout& rSalLayout ) return true; } -void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, sal_Bool bTextLines ) +void OutputDevice::ImplDrawTextDirect( SalLayout& rSalLayout, bool bTextLines ) { if( mpFontEntry->mnOwnOrientation ) if( ImplDrawRotateText( rSalLayout ) ) @@ -4758,7 +4758,7 @@ long OutputDevice::ImplGetTextLines( ImplMultiTextLineInfo& rLineInfo, xHyphWord = xHyph->hyphenate( aWord, rDefLocale, aWord.getLength() - nMinTrail, uno::Sequence< beans::PropertyValue >() ); if (xHyphWord.is()) { - sal_Bool bAlternate = xHyphWord->isAlternativeSpelling(); + bool bAlternate = xHyphWord->isAlternativeSpelling(); sal_Int32 _nWordLen = 1 + xHyphWord->getHyphenPos(); if ( ( _nWordLen >= 2 ) && ( (nWordStart+_nWordLen) >= ( 2 ) ) ) @@ -4930,7 +4930,7 @@ void OutputDevice::SetFont( const Font& rNewFont ) aFont.SetColor( aTextColor ); - sal_Bool bTransFill = aFont.IsTransparent(); + bool bTransFill = aFont.IsTransparent(); if ( !bTransFill ) { Color aTextFillColor( aFont.GetFillColor() ); @@ -4949,7 +4949,7 @@ void OutputDevice::SetFont( const Font& rNewFont ) else if ( mnDrawMode & DRAWMODE_NOFILL ) { aTextFillColor = Color( COL_TRANSPARENT ); - bTransFill = sal_True; + bTransFill = true; } if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) ) @@ -5073,12 +5073,12 @@ void OutputDevice::SetTextFillColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaTextFillColorAction( Color(), false ) ); if ( maFont.GetColor() != Color( COL_TRANSPARENT ) ) maFont.SetFillColor( Color( COL_TRANSPARENT ) ); if ( !maFont.IsTransparent() ) - maFont.SetTransparent( sal_True ); + maFont.SetTransparent( true ); if( mpAlphaVDev ) mpAlphaVDev->SetTextFillColor(); @@ -5088,7 +5088,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) { Color aColor( rColor ); - sal_Bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False; + bool bTransFill = ImplIsColorTransparent( aColor ) ? sal_True : sal_False; if ( !bTransFill ) { @@ -5110,7 +5110,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) else if ( mnDrawMode & DRAWMODE_NOFILL ) { aColor = Color( COL_TRANSPARENT ); - bTransFill = sal_True; + bTransFill = true; } if ( !bTransFill && (mnDrawMode & DRAWMODE_GHOSTEDFILL) ) @@ -5123,7 +5123,7 @@ void OutputDevice::SetTextFillColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaTextFillColorAction( aColor, true ) ); if ( maFont.GetFillColor() != aColor ) maFont.SetFillColor( aColor ); @@ -5146,7 +5146,7 @@ void OutputDevice::SetTextLineColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaTextLineColorAction( Color(), false ) ); maTextLineColor = Color( COL_TRANSPARENT ); @@ -5185,7 +5185,7 @@ void OutputDevice::SetTextLineColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaTextLineColorAction( aColor, true ) ); maTextLineColor = aColor; @@ -5197,7 +5197,7 @@ void OutputDevice::SetOverlineColor() { if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaOverlineColorAction( Color(), false ) ); maOverlineColor = Color( COL_TRANSPARENT ); @@ -5236,7 +5236,7 @@ void OutputDevice::SetOverlineColor( const Color& rColor ) } if ( mpMetaFile ) - mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, sal_True ) ); + mpMetaFile->AddAction( new MetaOverlineColorAction( aColor, true ) ); maOverlineColor = aColor; @@ -5264,7 +5264,7 @@ void OutputDevice::DrawTextLine( const Point& rPos, long nWidth, FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove ) + bool bUnderlineAbove ) { if ( mpMetaFile ) @@ -5594,7 +5594,7 @@ long OutputDevice::GetTextArray( const OUString& rStr, sal_Int32* pDXAry, bool OutputDevice::GetCaretPositions( const OUString& rStr, sal_Int32* pCaretXArray, sal_Int32 nIndex, sal_Int32 nLen, sal_Int32* pDXAry, long nLayoutWidth, - sal_Bool bCellBreaking ) const + bool bCellBreaking ) const { if( nIndex >= rStr.getLength() ) @@ -6013,7 +6013,7 @@ SalLayout* OutputDevice::ImplGlyphFallbackLayout( SalLayout* pSalLayout, ImplLay return pSalLayout; } -sal_Bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const +bool OutputDevice::GetTextIsRTL( const OUString& rString, sal_Int32 nIndex, sal_Int32 nLen ) const { OUString aStr( rString ); ImplLayoutArgs aArgs = ImplPrepareLayoutArgs( aStr, nIndex, nLen, 0, NULL ); @@ -6120,8 +6120,8 @@ void OutputDevice::ImplDrawText( OutputDevice& rTargetDevice, const Rectangle& r bool bRestoreFillColor = false; if ( (nStyle & TEXT_DRAW_DISABLE) && ! pVector ) { - sal_Bool bHighContrastBlack = sal_False; - sal_Bool bHighContrastWhite = sal_False; + bool bHighContrastBlack = false; + bool bHighContrastWhite = false; const StyleSettings& rStyleSettings( rTargetDevice.GetSettings().GetStyleSettings() ); if( rStyleSettings.GetHighContrastMode() ) { @@ -6392,11 +6392,11 @@ void OutputDevice::AddTextRectActions( const Rectangle& rRect, // temporarily swap in passed mtf for action generation, and // disable output generation. - const sal_Bool bOutputEnabled( IsOutputEnabled() ); + const bool bOutputEnabled( IsOutputEnabled() ); GDIMetaFile* pMtf = mpMetaFile; mpMetaFile = &rMtf; - EnableOutput( sal_False ); + EnableOutput( false ); // #i47157# Factored out to ImplDrawTextRect(), to be shared // between us and DrawText() @@ -6495,7 +6495,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, else { if ( pInfo ) - pInfo->mbEllipsis = sal_True; + pInfo->mbEllipsis = true; nMaxWidth = nWidth; } } @@ -6536,7 +6536,7 @@ Rectangle OutputDevice::GetTextRect( const Rectangle& rRect, if ( (nMaxWidth > nWidth) && (nStyle & TEXT_DRAW_ELLIPSIS) ) { if ( pInfo ) - pInfo->mbEllipsis = sal_True; + pInfo->mbEllipsis = true; nMaxWidth = nWidth; } } @@ -6803,8 +6803,8 @@ void OutputDevice::DrawCtrlText( const Point& rPos, const OUString& rStr, Color aOldTextColor; Color aOldTextFillColor; bool bRestoreFillColor; - sal_Bool bHighContrastBlack = sal_False; - sal_Bool bHighContrastWhite = sal_False; + bool bHighContrastBlack = false; + bool bHighContrastWhite = false; const StyleSettings& rStyleSettings( GetSettings().GetStyleSettings() ); if( rStyleSettings.GetHighContrastMode() ) { @@ -6960,23 +6960,23 @@ FontInfo OutputDevice::GetDevFont( int nDevFontIndex ) const return aFontInfo; } -sal_Bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ) +bool OutputDevice::AddTempDevFont( const OUString& rFileURL, const OUString& rFontName ) { ImplInitFontList(); if( !mpGraphics && !ImplGetGraphics() ) - return sal_False; + return false; bool bRC = mpGraphics->AddTempDevFont( mpFontList, rFileURL, rFontName ); if( !bRC ) - return sal_False; + return false; if( mpAlphaVDev ) mpAlphaVDev->AddTempDevFont( rFileURL, rFontName ); mpFontCache->Invalidate(); - return sal_True; + return true; } int OutputDevice::GetDevFontSizeCount( const Font& rFont ) const @@ -7020,7 +7020,7 @@ Size OutputDevice::GetDevFontSize( const Font& rFont, int nSizeIndex ) const return aSize; } -sal_Bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const +bool OutputDevice::IsFontAvailable( const OUString& rFontName ) const { ImplDevFontListData* pFound = mpFontList->FindFontFamily( rFontName ); @@ -7215,7 +7215,7 @@ sal_Int32 OutputDevice::ValidateKashidas ( const OUString& rTxt, return nDropped; } -sal_Bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, +bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& rStr, int nIndex, int nLen, int nBase, MetricVector& rVector ) { @@ -7247,7 +7247,7 @@ sal_Bool OutputDevice::GetGlyphBoundRects( const Point& rOrigin, const OUString& return (nLen == (int)rVector.size()); } -sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, +bool OutputDevice::GetTextBoundRect( Rectangle& rRect, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, sal_uLong nLayoutWidth, const sal_Int32* pDXAry ) const @@ -7258,7 +7258,7 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, "GetTextBoundRect Suspicious arguments nLen:" << nLen); } - sal_Bool bRet = sal_False; + bool bRet = false; rRect.SetEmpty(); SalLayout* pSalLayout = NULL; @@ -7322,8 +7322,8 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, // so we need a monochrome virtual device with matching font VirtualDevice aVDev( 1 ); Font aFont( GetFont() ); - aFont.SetShadow( sal_False ); - aFont.SetOutline( sal_False ); + aFont.SetShadow( false ); + aFont.SetOutline( false ); aFont.SetRelief( RELIEF_NONE ); aFont.SetOrientation( 0 ); aFont.SetSize( Size( mpFontEntry->maFontSelData.mnWidth, mpFontEntry->maFontSelData.mnHeight ) ); @@ -7356,7 +7356,7 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, Bitmap aBmp = aVDev.GetBitmap( Point(), aOutSize ); BitmapReadAccess* pAcc = aBmp.AcquireReadAccess(); if( !pAcc ) - return sal_False; + return false; const BitmapColor aBlack( pAcc->GetBestMatchingColor( Color( COL_BLACK ) ) ); const long nW = pAcc->Width(); const long nH = pAcc->Height(); @@ -7421,16 +7421,16 @@ sal_Bool OutputDevice::GetTextBoundRect( Rectangle& rRect, aTopLeft.X() = ImplDevicePixelToLogicWidth( aTopLeft.X() ); aTopLeft.Y() = ImplDevicePixelToLogicHeight( aTopLeft.Y() ); rRect = Rectangle( aTopLeft, aSize ); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, +bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, - sal_Bool bOptimize, sal_uLong nLayoutWidth, const sal_Int32* pDXArray ) const + bool bOptimize, sal_uLong nLayoutWidth, const sal_Int32* pDXArray ) const { if(nLen == 0x0FFFF) { @@ -7443,9 +7443,9 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector if( mbInitFont ) ImplInitFont(); if( !mpFontEntry ) - return sal_False; + return false; - sal_Bool bRet = sal_False; + bool bRet = false; rVector.clear(); if( nLen < 0 ) { @@ -7455,7 +7455,7 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector // we want to get the Rectangle in logical units, so to // avoid rounding errors we just size the font in logical units - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; if( bOldMap ) { const_cast<OutputDevice&>(*this).mbMap = false; @@ -7564,7 +7564,7 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector pSalLayout->Release(); if( !nWidth || !nHeight ) - return sal_True; + return true; double fScaleX = static_cast< double >(nOrgWidth) / nWidth; double fScaleY = static_cast< double >(nOrgHeight) / nHeight; @@ -7662,9 +7662,9 @@ sal_Bool OutputDevice::GetTextOutlines( ::basegfx::B2DPolyPolygonVector& rVector return bRet; } -sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, +bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, const OUString& rStr, sal_Int32 nBase, - sal_Int32 nIndex, sal_Int32 nLen, sal_Bool bOptimize, + sal_Int32 nIndex, sal_Int32 nLen, bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const { if(nLen == 0x0FFFF) @@ -7679,7 +7679,7 @@ sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, ::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector; if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen, bOptimize, nTWidth, pDXArray ) ) - return sal_False; + return false; // convert to a tool polypolygon vector rResultVector.reserve( aB2DPolyPolyVector.size() ); @@ -7687,12 +7687,12 @@ sal_Bool OutputDevice::GetTextOutlines( PolyPolyVector& rResultVector, for(; aIt != aB2DPolyPolyVector.end(); ++aIt ) rResultVector.push_back(PolyPolygon(*aIt)); // #i76339# - return sal_True; + return true; } -sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& rStr, +bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& rStr, sal_Int32 nBase, sal_Int32 nIndex, sal_Int32 nLen, - sal_Bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const + bool bOptimize, sal_uLong nTWidth, const sal_Int32* pDXArray ) const { if(nLen == 0x0FFFF) { @@ -7705,7 +7705,7 @@ sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& r ::basegfx::B2DPolyPolygonVector aB2DPolyPolyVector; if( !GetTextOutlines( aB2DPolyPolyVector, rStr, nBase, nIndex, nLen, bOptimize, nTWidth, pDXArray ) ) - return sal_False; + return false; // convert and merge into a tool polypolygon ::basegfx::B2DPolyPolygonVector::const_iterator aIt = aB2DPolyPolyVector.begin(); @@ -7713,7 +7713,7 @@ sal_Bool OutputDevice::GetTextOutline( PolyPolygon& rPolyPoly, const OUString& r for( unsigned int i = 0; i < aIt->count(); ++i ) rPolyPoly.Insert(Polygon((*aIt).getB2DPolygon( i ))); // #i76339# - return sal_True; + return true; } bool OutputDevice::GetFontCapabilities( FontCapabilities& rFontCapabilities ) const @@ -7732,20 +7732,20 @@ bool OutputDevice::GetFontCapabilities( FontCapabilities& rFontCapabilities ) co return mpGraphics->GetImplFontCapabilities(rFontCapabilities); } -sal_Bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const +bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const { rFontCharMap.Reset(); // we need a graphics if( !mpGraphics && !ImplGetGraphics() ) - return sal_False; + return false; if( mbNewFont ) ImplNewFont(); if( mbInitFont ) ImplInitFont(); if( !mpFontEntry ) - return sal_False; + return false; #ifdef ENABLE_IFC_CACHE // a little font charmap cache helps considerably static const int NMAXITEMS = 16; @@ -7785,8 +7785,8 @@ sal_Bool OutputDevice::GetFontCharMap( FontCharMap& rFontCharMap ) const } if( rFontCharMap.IsDefaultMap() ) - return sal_False; - return sal_True; + return false; + return true; } sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr, @@ -7807,11 +7807,11 @@ sal_Int32 OutputDevice::HasGlyphs( const Font& rTempFont, const OUString& rStr, const Font aOrigFont = GetFont(); const_cast<OutputDevice&>(*this).SetFont( rTempFont ); FontCharMap aFontCharMap; - sal_Bool bRet = GetFontCharMap( aFontCharMap ); + bool bRet = GetFontCharMap( aFontCharMap ); const_cast<OutputDevice&>(*this).SetFont( aOrigFont ); // if fontmap is unknown assume it doesn't have the glyphs - if( bRet == sal_False ) + if( !bRet ) return nIndex; for( sal_Int32 i = nIndex; nIndex < nEnd; ++i, ++nIndex ) diff --git a/vcl/source/gdi/outdev4.cxx b/vcl/source/gdi/outdev4.cxx index 55f28e479693..c9a3e6369dda 100644 --- a/vcl/source/gdi/outdev4.cxx +++ b/vcl/source/gdi/outdev4.cxx @@ -143,7 +143,7 @@ inline sal_uInt8 ImplGetGradientColorValue( long nValue ) void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, const Gradient& rGradient, - sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ) + bool bMtf, const PolyPolygon* pClipPolyPoly ) { // get BoundRect of rotated rectangle Rectangle aRect; @@ -211,7 +211,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, nGreen = (sal_uInt8)nStartGreen; nBlue = (sal_uInt8)nStartBlue; if ( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -296,7 +296,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, fTempColor = ((double)nStartBlue) * (1.0-fAlpha) + ((double)nEndBlue) * fAlpha; nBlue = ImplGetGradientColorValue((long)fTempColor); if ( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -334,7 +334,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, nGreen = ImplGetGradientColorValue(nEndGreen); nBlue = ImplGetGradientColorValue(nEndBlue); if ( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -354,7 +354,7 @@ void OutputDevice::ImplDrawLinearGradient( const Rectangle& rRect, void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, const Gradient& rGradient, - sal_Bool bMtf, const PolyPolygon* pClipPolyPoly ) + bool bMtf, const PolyPolygon* pClipPolyPoly ) { // Determine if we output via Polygon or PolyPolygon // For all rasteroperations other then Overpaint always use PolyPolygon, @@ -442,7 +442,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, bool bPaintLastPolygon( false ); // #107349# Paint last polygon only if loop has generated any output if( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -510,7 +510,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, // the one painted in the window outdev path below. To get // matching colors, have to delay color setting here. if( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); } @@ -518,7 +518,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, { // #107349# Set fill color _before_ geometry painting if( bMtf ) - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); else mpGraphics->SetFillColor( MAKE_SALCOLOR( nRed, nGreen, nBlue ) ); @@ -545,7 +545,7 @@ void OutputDevice::ImplDrawComplexGradient( const Rectangle& rRect, if( bMtf ) { - mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), sal_True ) ); + mpMetaFile->AddAction( new MetaFillColorAction( Color( nRed, nGreen, nBlue ), true ) ); mpMetaFile->AddAction( new MetaPolygonAction( rPoly ) ); } else @@ -670,9 +670,9 @@ void OutputDevice::DrawGradient( const Rectangle& rRect, aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, aGradient, sal_False, NULL ); + ImplDrawLinearGradient( aRect, aGradient, false, NULL ); else - ImplDrawComplexGradient( aRect, aGradient, sal_False, NULL ); + ImplDrawComplexGradient( aRect, aGradient, false, NULL ); } Pop(); @@ -743,9 +743,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, } else { - const sal_Bool bOldOutput = IsOutputEnabled(); + const bool bOldOutput = IsOutputEnabled(); - EnableOutput( sal_False ); + EnableOutput( false ); Push( PUSH_RASTEROP ); SetRasterOp( ROP_XOR ); DrawGradient( aRect, rGradient ); @@ -830,9 +830,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, aGradient, sal_False, &aClipPolyPoly ); + ImplDrawLinearGradient( aRect, aGradient, false, &aClipPolyPoly ); else - ImplDrawComplexGradient( aRect, aGradient, sal_False, &aClipPolyPoly ); + ImplDrawComplexGradient( aRect, aGradient, false, &aClipPolyPoly ); } } } @@ -874,9 +874,9 @@ void OutputDevice::DrawGradient( const PolyPolygon& rPolyPoly, if( pVDev->SetOutputSizePixel( aDstSize) ) { MapMode aVDevMap; - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; - EnableMapMode( sal_False ); + EnableMapMode( false ); pVDev->DrawOutDev( Point(), aDstSize, aDstRect.TopLeft(), aDstSize, *this ); pVDev->SetRasterOp( ROP_XOR ); @@ -921,7 +921,7 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r mpMetaFile = &rMtf; mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) ); mpMetaFile->AddAction( new MetaISectRectClipRegionAction( aRect ) ); - mpMetaFile->AddAction( new MetaLineColorAction( Color(), sal_False ) ); + mpMetaFile->AddAction( new MetaLineColorAction( Color(), false ) ); // because we draw with no border line, we have to expand gradient // rect to avoid missing lines on the right and bottom edge @@ -935,9 +935,9 @@ void OutputDevice::AddGradientActions( const Rectangle& rRect, const Gradient& r aGradient.SetSteps( GRADIENT_DEFAULT_STEPCOUNT ); if( aGradient.GetStyle() == GradientStyle_LINEAR || aGradient.GetStyle() == GradientStyle_AXIAL ) - ImplDrawLinearGradient( aRect, aGradient, sal_True, NULL ); + ImplDrawLinearGradient( aRect, aGradient, true, NULL ); else - ImplDrawComplexGradient( aRect, aGradient, sal_True, NULL ); + ImplDrawComplexGradient( aRect, aGradient, true, NULL ); mpMetaFile->AddAction( new MetaPopAction() ); mpMetaFile = pOldMtf; @@ -998,17 +998,17 @@ void OutputDevice::DrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch { PolyPolygon aPolyPoly( LogicToPixel( rPolyPoly ) ); GDIMetaFile* pOldMetaFile = mpMetaFile; - sal_Bool bOldMap = mbMap; + bool bOldMap = mbMap; aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); aHatch.SetDistance( ImplLogicWidthToDevicePixel( aHatch.GetDistance() ) ); mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); Push( PUSH_LINECOLOR ); SetLineColor( aHatch.GetColor() ); ImplInitLineColor(); - ImplDrawHatch( aPolyPoly, aHatch, sal_False ); + ImplDrawHatch( aPolyPoly, aHatch, false ); Pop(); EnableMapMode( bOldMap ); mpMetaFile = pOldMetaFile; @@ -1031,14 +1031,14 @@ void OutputDevice::AddHatchActions( const PolyPolygon& rPolyPoly, const Hatch& r mpMetaFile = &rMtf; mpMetaFile->AddAction( new MetaPushAction( PUSH_ALL ) ); - mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), sal_True ) ); - ImplDrawHatch( aPolyPoly, rHatch, sal_True ); + mpMetaFile->AddAction( new MetaLineColorAction( rHatch.GetColor(), true ) ); + ImplDrawHatch( aPolyPoly, rHatch, true ); mpMetaFile->AddAction( new MetaPopAction() ); mpMetaFile = pOldMtf; } } -void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, sal_Bool bMtf ) +void OutputDevice::ImplDrawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch, bool bMtf ) { if(rPolyPoly.Count()) { @@ -1221,7 +1221,7 @@ void OutputDevice::ImplCalcHatchValues( const Rectangle& rRect, long nDist, sal_ } void OutputDevice::ImplDrawHatchLine( const Line& rLine, const PolyPolygon& rPolyPoly, - Point* pPtBuffer, sal_Bool bMtf ) + Point* pPtBuffer, bool bMtf ) { double fX, fY; long nAdd, nPCounter = 0; diff --git a/vcl/source/gdi/outdev6.cxx b/vcl/source/gdi/outdev6.cxx index 3f06b4e9c4ff..9d785e2610f9 100644 --- a/vcl/source/gdi/outdev6.cxx +++ b/vcl/source/gdi/outdev6.cxx @@ -139,8 +139,8 @@ void OutputDevice::DrawGrid( const Rectangle& rRect, const Size& rDist, sal_uLon if( mbInitFillColor ) ImplInitFillColor(); - const sal_Bool bOldMap = mbMap; - EnableMapMode( sal_False ); + const bool bOldMap = mbMap; + EnableMapMode( false ); if( nFlags & GRID_DOTS ) { @@ -384,8 +384,8 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly, Push( PUSH_CLIPREGION | PUSH_LINECOLOR ); IntersectClipRegion(Region(rPolyPoly)); SetLineColor( GetFillColor() ); - const sal_Bool bOldMap = mbMap; - EnableMapMode( sal_False ); + const bool bOldMap = mbMap; + EnableMapMode( false ); if(nMove) { @@ -480,9 +480,9 @@ void OutputDevice::DrawTransparent( const PolyPolygon& rPolyPoly, if( aVDev.SetOutputSizePixel( aDstSz ) ) { - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; - EnableMapMode( sal_False ); + EnableMapMode( false ); aVDev.SetLineColor( COL_BLACK ); aVDev.SetFillColor( COL_BLACK ); @@ -745,17 +745,17 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, AlphaMask aAlpha; MapMode aMap( GetMapMode() ); Point aOutPos( PixelToLogic( aDstRect.TopLeft() ) ); - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; aMap.SetOrigin( Point( -aOutPos.X(), -aOutPos.Y() ) ); pVDev->SetMapMode( aMap ); - const sal_Bool bVDevOldMap = pVDev->IsMapModeEnabled(); + const bool bVDevOldMap = pVDev->IsMapModeEnabled(); // create paint bitmap ( (GDIMetaFile&) rMtf ).WindStart(); ( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize ); ( (GDIMetaFile&) rMtf ).WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aPaint = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! @@ -768,7 +768,7 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, ( (GDIMetaFile&) rMtf ).WindStart(); ( (GDIMetaFile&) rMtf ).Play( pVDev, rPos, rSize ); ( (GDIMetaFile&) rMtf ).WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aMask = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); pVDev->EnableMapMode( bVDevOldMap ); // #i35331#: MUST NOT use EnableMapMode( sal_True ) here! @@ -776,14 +776,14 @@ void OutputDevice::DrawTransparent( const GDIMetaFile& rMtf, const Point& rPos, pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); pVDev->DrawGradient( Rectangle( rPos, rSize ), rTransparenceGradient ); pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); pVDev->DrawMask( Point(), pVDev->GetOutputSizePixel(), aMask, Color( COL_WHITE ) ); aAlpha = pVDev->GetBitmap( Point(), pVDev->GetOutputSizePixel() ); delete pVDev; - EnableMapMode( sal_False ); + EnableMapMode( false ); DrawBitmapEx( aDstRect.TopLeft(), BitmapEx( aPaint, aAlpha ) ); EnableMapMode( bOldMap ); } @@ -807,8 +807,8 @@ void OutputDevice::ImplDrawColorWallpaper( long nX, long nY, Color aOldFillColor = GetFillColor(); SetLineColor(); SetFillColor( rWallpaper.GetColor() ); - sal_Bool bMap = mbMap; - EnableMapMode( sal_False ); + bool bMap = mbMap; + EnableMapMode( false ); DrawRect( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); SetLineColor( aOldLineColor ); SetFillColor( aOldFillColor ); @@ -827,7 +827,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY, Size aSize; GDIMetaFile* pOldMetaFile = mpMetaFile; const WallpaperStyle eStyle = rWallpaper.GetStyle(); - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; bool bDrawn = false; bool bDrawGradientBackground = false; bool bDrawColorBackground = false; @@ -839,7 +839,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY, const long nBmpWidth = aBmpEx.GetSizePixel().Width(); const long nBmpHeight = aBmpEx.GetSizePixel().Height(); - const sal_Bool bTransparent = aBmpEx.IsTransparent(); + const bool bTransparent = aBmpEx.IsTransparent(); // draw background if( bTransparent ) @@ -891,7 +891,7 @@ void OutputDevice::ImplDrawBitmapWallpaper( long nX, long nY, } mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); Push( PUSH_CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); @@ -1066,13 +1066,13 @@ void OutputDevice::ImplDrawGradientWallpaper( long nX, long nY, { Rectangle aBound; GDIMetaFile* pOldMetaFile = mpMetaFile; - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; bool bNeedGradient = true; aBound = Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ); mpMetaFile = NULL; - EnableMapMode( sal_False ); + EnableMapMode( false ); Push( PUSH_CLIPREGION ); IntersectClipRegion( Rectangle( Point( nX, nY ), Size( nWidth, nHeight ) ) ); @@ -1151,7 +1151,7 @@ void OutputDevice::Erase() if ( !IsDeviceOutputNecessary() || ImplIsRecordLayout() ) return; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( meOutDevType == OUTDEV_WINDOW ) { diff --git a/vcl/source/gdi/outdevnative.cxx b/vcl/source/gdi/outdevnative.cxx index d04477930c6d..9e310c7ab9ac 100644 --- a/vcl/source/gdi/outdevnative.cxx +++ b/vcl/source/gdi/outdevnative.cxx @@ -147,14 +147,14 @@ PushButtonValue* PushButtonValue::clone() const // ----------------------------------------------------------------------- -sal_Bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart ) const +bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart nPart ) const { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; return( mpGraphics->IsNativeControlSupported(nType, nPart) ); } @@ -162,18 +162,18 @@ sal_Bool OutputDevice::IsNativeControlSupported( ControlType nType, ControlPart // ----------------------------------------------------------------------- -sal_Bool OutputDevice::HitTestNativeControl( ControlType nType, +bool OutputDevice::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) const { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; Point aWinOffs( mnOutOffX, mnOutOffY ); Rectangle screenRegion( rControlRegion ); @@ -263,7 +263,7 @@ static boost::shared_ptr< ImplControlValue > lcl_transformControlValue( const Im } return aResult; } -sal_Bool OutputDevice::DrawNativeControl( ControlType nType, +bool OutputDevice::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -271,17 +271,17 @@ sal_Bool OutputDevice::DrawNativeControl( ControlType nType, OUString aCaption ) { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; // make sure the current clip region is initialized correctly if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; if ( mbInitClipRegion ) ImplInitClipRegion(); if ( mbOutputClipped ) - return sal_True; + return true; if ( mbInitLineColor ) ImplInitLineColor(); @@ -298,14 +298,14 @@ sal_Bool OutputDevice::DrawNativeControl( ControlType nType, if (aTestRegion == Region(rControlRegion)) nState |= CTRL_CACHING_ALLOWED; // control is not clipped, caching allowed - sal_Bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this ); + bool bRet = mpGraphics->DrawNativeControl(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, this ); return bRet; } // ----------------------------------------------------------------------- -sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType, +bool OutputDevice::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -315,18 +315,18 @@ sal_Bool OutputDevice::GetNativeControlRegion( ControlType nType, Rectangle &rNativeContentRegion ) const { if( !lcl_enableNativeWidget( *this ) ) - return sal_False; + return false; if ( !mpGraphics ) if ( !ImplGetGraphics() ) - return sal_False; + return false; // Convert the coordinates from relative to Window-absolute, so we draw // in the correct place in platform code boost::shared_ptr< ImplControlValue > aScreenCtrlValue( lcl_transformControlValue( aValue, *this ) ); Rectangle screenRegion( ImplLogicToDevicePixel( rControlRegion ) ); - sal_Bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, + bool bRet = mpGraphics->GetNativeControlRegion(nType, nPart, screenRegion, nState, *aScreenCtrlValue, aCaption, rNativeBoundingRegion, rNativeContentRegion, this ); if( bRet ) diff --git a/vcl/source/gdi/outmap.cxx b/vcl/source/gdi/outmap.cxx index e68140ba1191..ba9fd16d9c06 100644 --- a/vcl/source/gdi/outmap.cxx +++ b/vcl/source/gdi/outmap.cxx @@ -684,9 +684,9 @@ Region OutputDevice::ImplPixelToDevicePixel( const Region& rRegion ) const // ----------------------------------------------------------------------- -void OutputDevice::EnableMapMode( sal_Bool bEnable ) +void OutputDevice::EnableMapMode( bool bEnable ) { - mbMap = (bEnable != 0); + mbMap = bEnable; if( mpAlphaVDev ) mpAlphaVDev->EnableMapMode( bEnable ); diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx index 30f118652b03..327c46bc6ba6 100644 --- a/vcl/source/gdi/pdfextoutdevdata.cxx +++ b/vcl/source/gdi/pdfextoutdevdata.cxx @@ -304,7 +304,7 @@ struct PageSyncData PageSyncData( GlobalSyncData* pGlobal ) : mbGroupIgnoreGDIMtfActions ( false ) { mpGlobalData = pGlobal; } void PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct ); - sal_Bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ); + bool PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ); }; void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDataSync::Action eAct ) { @@ -319,12 +319,12 @@ void PageSyncData::PushAction( const OutputDevice& rOutDev, const PDFExtOutDevDa aSync.nIdx = 0x7fffffff; // sync not possible mActions.push_back( aSync ); } -sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ) +bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAction, const PDFExtOutDevData& rOutDevData ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( mActions.size() && ( mActions.front().nIdx == rCurGDIMtfAction ) ) { - bRet = sal_True; + bRet = true; PDFExtOutDevDataSync aDataSync = mActions.front(); mActions.pop_front(); switch( aDataSync.eAct ) @@ -486,7 +486,7 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM else if ( mbGroupIgnoreGDIMtfActions ) { rCurGDIMtfAction++; - bRet = sal_True; + bRet = true; } return bRet; } @@ -494,14 +494,14 @@ sal_Bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIM TYPEINIT1(PDFExtOutDevData,ExtOutDevData); PDFExtOutDevData::PDFExtOutDevData( const OutputDevice& rOutDev ) : mrOutDev ( rOutDev ), - mbTaggedPDF ( sal_False ), - mbExportNotes ( sal_True ), - mbExportNotesPages ( sal_False ), - mbTransitionEffects ( sal_True ), - mbUseLosslessCompression( sal_True ), - mbReduceImageResolution ( sal_False ), - mbExportHiddenSlides ( sal_False ), - mbExportNDests ( sal_False ), + mbTaggedPDF ( false ), + mbExportNotes ( true ), + mbExportNotesPages ( false ), + mbTransitionEffects ( true ), + mbUseLosslessCompression( true ), + mbReduceImageResolution ( false ), + mbExportHiddenSlides ( false ), + mbExportNDests ( false ), mnFormsFormat ( 0 ), mnPage ( -1 ), mpPageSyncData ( NULL ), @@ -532,59 +532,59 @@ void PDFExtOutDevData::SetCurrentPageNumber( const sal_Int32 nPage ) { mnPage = nPage; } -sal_Bool PDFExtOutDevData::GetIsLosslessCompression() const +bool PDFExtOutDevData::GetIsLosslessCompression() const { return mbUseLosslessCompression; } -void PDFExtOutDevData::SetIsLosslessCompression( const sal_Bool bUseLosslessCompression ) +void PDFExtOutDevData::SetIsLosslessCompression( const bool bUseLosslessCompression ) { mbUseLosslessCompression = bUseLosslessCompression; } -sal_Bool PDFExtOutDevData::GetIsReduceImageResolution() const +bool PDFExtOutDevData::GetIsReduceImageResolution() const { return mbReduceImageResolution; } -void PDFExtOutDevData::SetIsReduceImageResolution( const sal_Bool bReduceImageResolution ) +void PDFExtOutDevData::SetIsReduceImageResolution( const bool bReduceImageResolution ) { mbReduceImageResolution = bReduceImageResolution; } -sal_Bool PDFExtOutDevData::GetIsExportNotes() const +bool PDFExtOutDevData::GetIsExportNotes() const { return mbExportNotes; } -void PDFExtOutDevData::SetIsExportNotes( const sal_Bool bExportNotes ) +void PDFExtOutDevData::SetIsExportNotes( const bool bExportNotes ) { mbExportNotes = bExportNotes; } -sal_Bool PDFExtOutDevData::GetIsExportNotesPages() const +bool PDFExtOutDevData::GetIsExportNotesPages() const { return mbExportNotesPages; } -void PDFExtOutDevData::SetIsExportNotesPages( const sal_Bool bExportNotesPages ) +void PDFExtOutDevData::SetIsExportNotesPages( const bool bExportNotesPages ) { mbExportNotesPages = bExportNotesPages; } -sal_Bool PDFExtOutDevData::GetIsExportTaggedPDF() const +bool PDFExtOutDevData::GetIsExportTaggedPDF() const { return mbTaggedPDF; } -void PDFExtOutDevData::SetIsExportTaggedPDF( const sal_Bool bTaggedPDF ) +void PDFExtOutDevData::SetIsExportTaggedPDF( const bool bTaggedPDF ) { mbTaggedPDF = bTaggedPDF; } -sal_Bool PDFExtOutDevData::GetIsExportTransitionEffects() const +bool PDFExtOutDevData::GetIsExportTransitionEffects() const { return mbTransitionEffects; } -void PDFExtOutDevData::SetIsExportTransitionEffects( const sal_Bool bTransitionEffects ) +void PDFExtOutDevData::SetIsExportTransitionEffects( const bool bTransitionEffects ) { mbTransitionEffects = bTransitionEffects; } -sal_Bool PDFExtOutDevData::GetIsExportFormFields() const +bool PDFExtOutDevData::GetIsExportFormFields() const { return mbExportFormFields; } -void PDFExtOutDevData::SetIsExportFormFields( const sal_Bool bExportFomtFields ) +void PDFExtOutDevData::SetIsExportFormFields( const bool bExportFomtFields ) { mbExportFormFields = bExportFomtFields; } @@ -592,19 +592,19 @@ void PDFExtOutDevData::SetFormsFormat( const sal_Int32 nFormsFormat ) { mnFormsFormat = nFormsFormat; } -sal_Bool PDFExtOutDevData::GetIsExportBookmarks() const +bool PDFExtOutDevData::GetIsExportBookmarks() const { return mbExportBookmarks; } -void PDFExtOutDevData::SetIsExportBookmarks( const sal_Bool bExportBookmarks ) +void PDFExtOutDevData::SetIsExportBookmarks( const bool bExportBookmarks ) { mbExportBookmarks = bExportBookmarks; } -sal_Bool PDFExtOutDevData::GetIsExportHiddenSlides() const +bool PDFExtOutDevData::GetIsExportHiddenSlides() const { return mbExportHiddenSlides; } -void PDFExtOutDevData::SetIsExportHiddenSlides( const sal_Bool bExportHiddenSlides ) +void PDFExtOutDevData::SetIsExportHiddenSlides( const bool bExportHiddenSlides ) { mbExportHiddenSlides = bExportHiddenSlides; } @@ -612,11 +612,11 @@ std::vector< PDFExtOutDevBookmarkEntry >& PDFExtOutDevData::GetBookmarks() { return maBookmarks; } -sal_Bool PDFExtOutDevData::GetIsExportNamedDestinations() const +bool PDFExtOutDevData::GetIsExportNamedDestinations() const { return mbExportNDests; } -void PDFExtOutDevData::SetIsExportNamedDestinations( const sal_Bool bExportNDests ) +void PDFExtOutDevData::SetIsExportNamedDestinations( const bool bExportNDests ) { mbExportNDests = bExportNDests; } @@ -624,7 +624,7 @@ void PDFExtOutDevData::ResetSyncData() { *mpPageSyncData = PageSyncData( mpGlobalSyncData ); } -sal_Bool PDFExtOutDevData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rIdx ) +bool PDFExtOutDevData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rIdx ) { return mpPageSyncData->PlaySyncPageAct( rWriter, rIdx, *this ); } diff --git a/vcl/source/gdi/pdfwriter.cxx b/vcl/source/gdi/pdfwriter.cxx index 610bfd5db6fa..de00ac33c87a 100644 --- a/vcl/source/gdi/pdfwriter.cxx +++ b/vcl/source/gdi/pdfwriter.cxx @@ -74,7 +74,7 @@ void PDFWriter::DrawTextLine( FontStrikeout eStrikeout, FontUnderline eUnderline, FontUnderline eOverline, - sal_Bool bUnderlineAbove ) + bool bUnderlineAbove ) { pImplementation->drawTextLine( rPos, nWidth, eStrikeout, eUnderline, eOverline, bUnderlineAbove ); } diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index d24ba589dad1..ccf7771b99ee 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4409,7 +4409,7 @@ we check in the following sequence: INetURLObject aDocumentURL( m_aContext.BaseURL ); INetURLObject aTargetURL( rLink.m_aURL ); sal_Int32 nSetGoToRMode = 0; - sal_Bool bTargetHasPDFExtension = sal_False; + bool bTargetHasPDFExtension = false; INetProtocol eTargetProtocol = aTargetURL.GetProtocol(); bool bIsUNCPath = false; @@ -7165,7 +7165,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool Font aSetFont = m_aCurrentPDFState.m_aFont; aSetFont.SetRelief( RELIEF_NONE ); - aSetFont.SetShadow( sal_False ); + aSetFont.SetShadow( false ); aSetFont.SetColor( aReliefColor ); setTextLineColor( aReliefColor ); @@ -7202,8 +7202,8 @@ void PDFWriterImpl::drawShadow( SalLayout& rLayout, const OUString& rText, bool rFont.SetColor( Color( COL_LIGHTGRAY ) ); else rFont.SetColor( Color( COL_BLACK ) ); - rFont.SetShadow( sal_False ); - rFont.SetOutline( sal_False ); + rFont.SetShadow( false ); + rFont.SetOutline( false ); setFont( rFont ); setTextLineColor( rFont.GetColor() ); setOverlineColor( rFont.GetColor() ); @@ -7661,7 +7661,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool ) ) { - sal_Bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont ); + bool bUnderlineAbove = OutputDevice::ImplIsUnderlineAbove( m_aCurrentPDFState.m_aFont ); if( m_aCurrentPDFState.m_aFont.IsWordLineMode() ) { Point aPos, aStartPt; @@ -7714,7 +7714,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool long nEmphYOff; long nEmphWidth; long nEmphHeight; - sal_Bool bEmphPolyLine; + bool bEmphPolyLine; FontEmphasisMark nEmphMark; push( PUSH_ALL ); @@ -7795,7 +7795,7 @@ void PDFWriterImpl::drawLayout( SalLayout& rLayout, const OUString& rText, bool } void PDFWriterImpl::drawEmphasisMark( long nX, long nY, - const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, + const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ) { // TODO: pass nWidth as width of this mark @@ -8387,11 +8387,11 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik while( m_pReferenceDevice->GetTextWidth( aStrikeout ) >= nWidth ) aStrikeout = aStrikeout.replaceAt( 0, 1, "" ); aStrikeout += aStrikeoutChar; - sal_Bool bShadow = m_aCurrentPDFState.m_aFont.IsShadow(); + bool bShadow = m_aCurrentPDFState.m_aFont.IsShadow(); if ( bShadow ) { Font aFont = m_aCurrentPDFState.m_aFont; - aFont.SetShadow( sal_False ); + aFont.SetShadow( false ); setFont( aFont ); updateGraphicsState(); } @@ -8425,7 +8425,7 @@ void PDFWriterImpl::drawStrikeoutChar( const Point& rPos, long nWidth, FontStrik if ( bShadow ) { Font aFont = m_aCurrentPDFState.m_aFont; - aFont.SetShadow( sal_True ); + aFont.SetShadow( true ); setFont( aFont ); updateGraphicsState(); } @@ -10326,7 +10326,7 @@ void PDFWriterImpl::drawHatch( const PolyPolygon& rPolyPoly, const Hatch& rHatch aPolyPoly.Optimize( POLY_OPTIMIZE_NO_SAME ); push( PUSH_LINECOLOR ); setLineColor( rHatch.GetColor() ); - getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, sal_False ); + getReferenceDevice()->ImplDrawHatch( aPolyPoly, rHatch, false ); pop(); } } diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 4bcebbddc11e..b2fa560e56ed 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -1010,7 +1010,7 @@ i12626 bool checkEmitStructure(); /* draws an emphasis mark */ - void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, sal_Bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); + void drawEmphasisMark( long nX, long nY, const PolyPolygon& rPolyPoly, bool bPolyLine, const Rectangle& rRect1, const Rectangle& rRect2 ); /* true if PDF/A-1a or PDF/A-1b is output */ bool m_bIsPDF_A1; @@ -1153,7 +1153,7 @@ public: void setTextFillColor() { m_aGraphicsStack.front().m_aFont.SetFillColor( Color( COL_TRANSPARENT ) ); - m_aGraphicsStack.front().m_aFont.SetTransparent( sal_True ); + m_aGraphicsStack.front().m_aFont.SetTransparent( true ); m_aGraphicsStack.front().m_nUpdateFlags |= GraphicsState::updateFont; } void setTextColor( const Color& rColor ) diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx index bea5e7dc2c2c..2a805f6d5a67 100644 --- a/vcl/source/gdi/pdfwriter_impl2.cxx +++ b/vcl/source/gdi/pdfwriter_impl2.cxx @@ -253,7 +253,7 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa if( ! pDummyVDev ) { pPrivateDevice = pDummyVDev = new VirtualDevice(); - pDummyVDev->EnableOutput( sal_False ); + pDummyVDev->EnableOutput( false ); pDummyVDev->SetMapMode( i_rMtf.GetPrefMapMode() ); } GDIMetaFile aMtf( i_rMtf ); @@ -461,9 +461,9 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa aTmpMtf.Play( pVDev, aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aPaint = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( sal_True ); + pVDev->EnableMapMode( true ); // create mask bitmap pVDev->SetLineColor( COL_BLACK ); @@ -474,15 +474,15 @@ void PDFWriterImpl::playMetafile( const GDIMetaFile& i_rMtf, vcl::PDFExtOutDevDa aTmpMtf.WindStart(); aTmpMtf.Play( pVDev, aPoint, aDstSize ); aTmpMtf.WindStart(); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); aMask = pVDev->GetBitmap( aPoint, aDstSizePixel ); - pVDev->EnableMapMode( sal_True ); + pVDev->EnableMapMode( true ); // create alpha mask from gradient pVDev->SetDrawMode( DRAWMODE_GRAYGRADIENT ); pVDev->DrawGradient( Rectangle( aPoint, aDstSize ), rTransparenceGradient ); pVDev->SetDrawMode( DRAWMODE_DEFAULT ); - pVDev->EnableMapMode( sal_False ); + pVDev->EnableMapMode( false ); pVDev->DrawMask( aPoint, aDstSizePixel, aMask, Color( COL_WHITE ) ); aAlpha = pVDev->GetBitmap( aPoint, aDstSizePixel ); implWriteBitmapEx( rPos, rSize, BitmapEx( aPaint, aAlpha ), pDummyVDev, i_rContext ); diff --git a/vcl/source/gdi/pngwrite.cxx b/vcl/source/gdi/pngwrite.cxx index 0e8160e02d91..79f36d49f38a 100644 --- a/vcl/source/gdi/pngwrite.cxx +++ b/vcl/source/gdi/pngwrite.cxx @@ -51,7 +51,7 @@ public: const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData = NULL ); ~PNGWriterImpl(); - sal_Bool Write( SvStream& rOStm ); + bool Write( SvStream& rOStm ); std::vector< vcl::PNGWriter::ChunkData >& GetChunks(); @@ -62,7 +62,7 @@ private: sal_Int32 mnCompLevel; sal_Int32 mnInterlaced; sal_uInt32 mnMaxChunkSize; - sal_Bool mbStatus; + bool mbStatus; BitmapReadAccess* mpAccess; BitmapReadAccess* mpMaskAccess; @@ -77,7 +77,7 @@ private: sal_uInt8 mnBitsPerPixel; sal_uInt8 mnFilterType; // 0 oder 4; sal_uLong mnBBP; // bytes per pixel ( needed for filtering ) - sal_Bool mbTrueAlpha; + bool mbTrueAlpha; sal_uLong mnCRC; void ImplWritepHYs( const BitmapEx& rBitmapEx ); @@ -85,7 +85,7 @@ private: sal_uLong ImplGetFilter( sal_uLong nY, sal_uLong nXStart=0, sal_uLong nXAdd=1 ); void ImplClearFirstScanline(); void ImplWriteTransparent(); - sal_Bool ImplWriteHeader(); + bool ImplWriteHeader(); void ImplWritePalette(); void ImplOpenChunk( sal_uLong nChunkType ); void ImplWriteChunk( sal_uInt8 nNumb ); @@ -97,7 +97,7 @@ private: PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >* pFilterData ) : mnCompLevel ( PNG_DEF_COMPRESSION ), - mbStatus ( sal_True ), + mbStatus ( true ), mpAccess ( NULL ), mpMaskAccess ( NULL ), mpZCodec ( new ZCodec( DEFAULT_IN_BUFSIZE, DEFAULT_OUT_BUFSIZE, MAX_MEM_USAGE ) ), @@ -157,14 +157,14 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aBmp.ReleaseAccess( mpAccess ), mpAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } else { mpAccess = aBmp.AcquireReadAccess(); // sal_True RGB with alphachannel if( mpAccess ) { - if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) != sal_False ) + if ( ( mbTrueAlpha = rBmpEx.IsAlpha() ) ) { AlphaMask aMask( rBmpEx.GetAlpha() ); mpMaskAccess = aMask.AcquireReadAccess(); @@ -178,7 +178,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aMask.ReleaseAccess( mpMaskAccess ), mpMaskAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } else { @@ -194,12 +194,12 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aMask.ReleaseAccess( mpMaskAccess ), mpMaskAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } aBmp.ReleaseAccess( mpAccess ), mpAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } } else @@ -218,7 +218,7 @@ PNGWriterImpl::PNGWriterImpl( const BitmapEx& rBmpEx, aBmp.ReleaseAccess( mpAccess ), mpAccess = 0; } else - mbStatus = sal_False; + mbStatus = false; } if ( mbStatus ) { @@ -233,7 +233,7 @@ PNGWriterImpl::~PNGWriterImpl() delete mpZCodec; } -sal_Bool PNGWriterImpl::Write( SvStream& rOStm ) +bool PNGWriterImpl::Write( SvStream& rOStm ) { /* png signature is always an array of 8 bytes */ sal_uInt16 nOldMode = rOStm.GetNumberFormatInt(); @@ -269,7 +269,7 @@ std::vector< vcl::PNGWriter::ChunkData >& PNGWriterImpl::GetChunks() return maChunkSeq; } -sal_Bool PNGWriterImpl::ImplWriteHeader() +bool PNGWriterImpl::ImplWriteHeader() { ImplOpenChunk(PNGCHUNK_IHDR); ImplWriteChunk( sal_uInt32( mnWidth = mpAccess->Width() ) ); @@ -301,7 +301,7 @@ sal_Bool PNGWriterImpl::ImplWriteHeader() ImplCloseChunk(); } else - mbStatus = sal_False; + mbStatus = false; return mbStatus; } @@ -505,7 +505,7 @@ sal_uLong PNGWriterImpl::ImplGetFilter ( sal_uLong nY, sal_uLong nXStart, sal_uL break; default : - mbStatus = sal_False; + mbStatus = false; break; } } @@ -658,7 +658,7 @@ PNGWriter::~PNGWriter() delete mpImpl; } -sal_Bool PNGWriter::Write( SvStream& rIStm ) +bool PNGWriter::Write( SvStream& rIStm ) { return mpImpl->Write( rIStm ); } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index 4137c23ef85a..ea6780da3df0 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -100,17 +100,17 @@ void ImplUpdateJobSetupPaper( JobSetup& rJobSetup ) // PrinterOptions PrinterOptions::PrinterOptions() : - mbReduceTransparency( sal_False ), + mbReduceTransparency( false ), meReducedTransparencyMode( PRINTER_TRANSPARENCY_AUTO ), - mbReduceGradients( sal_False ), + mbReduceGradients( false ), meReducedGradientsMode( PRINTER_GRADIENT_STRIPES ), mnReducedGradientStepCount( 64 ), - mbReduceBitmaps( sal_False ), + mbReduceBitmaps( false ), meReducedBitmapMode( PRINTER_BITMAP_NORMAL ), mnReducedBitmapResolution( 200 ), - mbReducedBitmapsIncludeTransparency( sal_True ), - mbConvertToGreyscales( sal_False ), - mbPDFAsStandardPrintJobFormat( sal_False ) + mbReducedBitmapsIncludeTransparency( true ), + mbConvertToGreyscales( false ), + mbPDFAsStandardPrintJobFormat( false ) { } @@ -167,7 +167,7 @@ bool PrinterOptions::ReadFromConfig( bool i_bFile ) if( xSet.is() ) { sal_Int32 nValue = 0; - sal_Bool bValue = 0; + bool bValue = false; if( xSet->getPropertyValue(PROPERTYNAME_REDUCETRANSPARENCY) >>= bValue ) SetReduceTransparency( bValue ); if( xSet->getPropertyValue(PROPERTYNAME_REDUCEDTRANSPARENCYMODE) >>= nValue ) @@ -421,22 +421,22 @@ void Printer::ImplInitData() { mbDevOutput = false; meOutDevType = OUTDEV_PRINTER; - mbDefPrinter = sal_False; + mbDefPrinter = false; mnError = 0; mnCurPage = 0; mnCurPrintPage = 0; mnPageQueueSize = 0; mnCopyCount = 1; - mbCollateCopy = sal_False; - mbPrinting = sal_False; - mbJobActive = sal_False; - mbPrintFile = sal_False; - mbInPrintPage = sal_False; - mbNewJobSetup = sal_False; + mbCollateCopy = false; + mbPrinting = false; + mbJobActive = false; + mbPrintFile = false; + mbInPrintPage = false; + mbNewJobSetup = false; mpInfoPrinter = NULL; mpPrinter = NULL; mpDisplayDev = NULL; - mbIsQueuePrinter = sal_False; + mbIsQueuePrinter = false; mpPrinterOptions = new PrinterOptions; // Add printer to the list @@ -597,7 +597,7 @@ Printer::Printer() { ImplInit( pInfo ); if ( !IsDisplayPrinter() ) - mbDefPrinter = sal_True; + mbDefPrinter = true; } else ImplInitDisplay( NULL ); @@ -707,38 +707,38 @@ sal_uLong Printer::GetCapabilities( sal_uInt16 nType ) const } -sal_Bool Printer::HasSupport( PrinterSupport eFeature ) const +bool Printer::HasSupport( PrinterSupport eFeature ) const { switch ( eFeature ) { case SUPPORT_SET_ORIENTATION: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION ); + return GetCapabilities( PRINTER_CAPABILITIES_SETORIENTATION ) != 0; case SUPPORT_SET_PAPERBIN: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN ); + return GetCapabilities( PRINTER_CAPABILITIES_SETPAPERBIN ) != 0; case SUPPORT_SET_PAPERSIZE: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE ); + return GetCapabilities( PRINTER_CAPABILITIES_SETPAPERSIZE ) != 0; case SUPPORT_SET_PAPER: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SETPAPER ); + return GetCapabilities( PRINTER_CAPABILITIES_SETPAPER ) != 0; case SUPPORT_COPY: return (GetCapabilities( PRINTER_CAPABILITIES_COPIES ) != 0); case SUPPORT_COLLATECOPY: return (GetCapabilities( PRINTER_CAPABILITIES_COLLATECOPIES ) != 0); case SUPPORT_SETUPDIALOG: - return (sal_Bool)GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG ); + return GetCapabilities( PRINTER_CAPABILITIES_SUPPORTDIALOG ) != 0; case SUPPORT_FAX: - return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_FAX ); + return GetCapabilities( PRINTER_CAPABILITIES_FAX ) != 0; case SUPPORT_PDF: - return (sal_Bool) GetCapabilities( PRINTER_CAPABILITIES_PDF ); + return GetCapabilities( PRINTER_CAPABILITIES_PDF ) != 0; } - return sal_True; + return true; } -sal_Bool Printer::SetJobSetup( const JobSetup& rSetup ) +bool Printer::SetJobSetup( const JobSetup& rSetup ) { if ( IsDisplayPrinter() || mbInPrintPage ) - return sal_False; + return false; JobSetup aJobSetup = rSetup; @@ -746,58 +746,58 @@ sal_Bool Printer::SetJobSetup( const JobSetup& rSetup ) if ( mpInfoPrinter->SetPrinterData( aJobSetup.ImplGetData() ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool Printer::Setup( Window* pWindow ) +bool Printer::Setup( Window* pWindow ) { if ( IsDisplayPrinter() ) - return sal_False; + return false; if ( IsJobActive() || IsPrinting() ) - return sal_False; + return false; JobSetup aJobSetup = maJobSetup; SalFrame* pFrame; if ( !pWindow ) pWindow = ImplGetDefaultWindow(); if( !pWindow ) - return sal_False; + return false; pFrame = pWindow->ImplGetFrame(); ImplReleaseGraphics(); ImplSVData* pSVData = ImplGetSVData(); pSVData->maAppData.mnModalMode++; nImplSysDialog++; - sal_Bool bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() ); + bool bSetup = mpInfoPrinter->Setup( pFrame, aJobSetup.ImplGetData() ); pSVData->maAppData.mnModalMode--; nImplSysDialog--; if ( bSetup ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) +bool Printer::SetPrinterProps( const Printer* pPrinter ) { if ( IsJobActive() || IsPrinting() ) - return sal_False; + return false; ImplSVData* pSVData = ImplGetSVData(); @@ -844,7 +844,7 @@ sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) // Construct new printer ImplInitDisplay( NULL ); - return sal_True; + return true; } // Destroy old printer? @@ -898,14 +898,14 @@ sal_Bool Printer::SetPrinterProps( const Printer* pPrinter ) else SetJobSetup( pPrinter->GetJobSetup() ); - return sal_False; + return false; } -sal_Bool Printer::SetOrientation( Orientation eOrientation ) +bool Printer::SetOrientation( Orientation eOrientation ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( maJobSetup.ImplGetConstData()->meOrientation != eOrientation ) { @@ -915,26 +915,26 @@ sal_Bool Printer::SetOrientation( Orientation eOrientation ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); if ( mpInfoPrinter->SetData( SAL_JOBSET_ORIENTATION, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -944,10 +944,10 @@ Orientation Printer::GetOrientation() const } -sal_Bool Printer::SetPaperBin( sal_uInt16 nPaperBin ) +bool Printer::SetPaperBin( sal_uInt16 nPaperBin ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( (maJobSetup.ImplGetConstData()->mnPaperBin != nPaperBin) && (nPaperBin < GetPaperBinCount()) ) @@ -958,26 +958,26 @@ sal_Bool Printer::SetPaperBin( sal_uInt16 nPaperBin ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERBIN, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -1077,10 +1077,10 @@ void Printer::ImplFindPaperFormatForUserSize( JobSetup& aJobSetup, bool bMatchNe } -sal_Bool Printer::SetPaper( Paper ePaper ) +bool Printer::SetPaper( Paper ePaper ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( maJobSetup.ImplGetConstData()->mePaperFormat != ePaper ) { @@ -1096,9 +1096,9 @@ sal_Bool Printer::SetPaper( Paper ePaper ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); @@ -1107,29 +1107,29 @@ sal_Bool Printer::SetPaper( Paper ePaper ) if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } -sal_Bool Printer::SetPaperSizeUser( const Size& rSize ) +bool Printer::SetPaperSizeUser( const Size& rSize ) { return SetPaperSizeUser( rSize, false ); } -sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) +bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) { if ( mbInPrintPage ) - return sal_False; + return false; Size aPixSize = LogicToPixel( rSize ); Size aPageSize = PixelToLogic( aPixSize, MAP_100TH_MM ); @@ -1145,9 +1145,9 @@ sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); @@ -1157,17 +1157,17 @@ sal_Bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest ) if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -1234,10 +1234,10 @@ const PaperInfo& Printer::GetPaperInfo( int nPaper ) const } -sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex ) +bool Printer::SetDuplexMode( DuplexMode eDuplex ) { if ( mbInPrintPage ) - return sal_False; + return false; if ( maJobSetup.ImplGetConstData()->meDuplexMode != eDuplex ) { @@ -1247,26 +1247,26 @@ sal_Bool Printer::SetDuplexMode( DuplexMode eDuplex ) if ( IsDisplayPrinter() ) { - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; - return sal_True; + return true; } ImplReleaseGraphics(); if ( mpInfoPrinter->SetData( SAL_JOBSET_DUPLEXMODE, pSetupData ) ) { ImplUpdateJobSetupPaper( aJobSetup ); - mbNewJobSetup = sal_True; + mbNewJobSetup = true; maJobSetup = aJobSetup; ImplUpdatePageData(); ImplUpdateFontList(); - return sal_True; + return true; } else - return sal_False; + return false; } - return sal_True; + return true; } @@ -1303,11 +1303,11 @@ OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const } -sal_Bool Printer::SetCopyCount( sal_uInt16 nCopy, sal_Bool bCollate ) +bool Printer::SetCopyCount( sal_uInt16 nCopy, bool bCollate ) { mnCopyCount = nCopy; mbCollateCopy = bCollate; - return sal_True; + return true; } @@ -1338,15 +1338,15 @@ sal_uLong Printer::ImplSalPrinterErrorCodeToVCL( sal_uLong nError ) } -sal_Bool Printer::EndJob() +bool Printer::EndJob() { - sal_Bool bRet = sal_False; + bool bRet = false; if ( !IsJobActive() ) return bRet; DBG_ASSERT( !mbInPrintPage, "Printer::EndJob() - StartPage() without EndPage() called" ); - mbJobActive = sal_False; + mbJobActive = false; if ( mpPrinter ) { @@ -1354,7 +1354,7 @@ sal_Bool Printer::EndJob() mnCurPage = 0; - mbPrinting = sal_False; + mbPrinting = false; mnCurPrintPage = 0; maJobName = OUString(); @@ -1389,7 +1389,7 @@ void Printer::ImplStartPage() // PrintJob not aborted ??? if ( IsJobActive() ) { - mbInPrintPage = sal_True; + mbInPrintPage = true; mnCurPage++; mnCurPrintPage++; } @@ -1402,7 +1402,7 @@ void Printer::ImplEndPage() if ( !IsJobActive() ) return; - mbInPrintPage = sal_False; + mbInPrintPage = false; if ( mpPrinter ) { @@ -1411,7 +1411,7 @@ void Printer::ImplEndPage() mbDevOutput = false; mpJobGraphics = NULL; - mbNewJobSetup = sal_False; + mbNewJobSetup = false; } } diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 5f30b43d9ac9..b6b8f23de2b8 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -144,13 +144,13 @@ static void ImplConvertTransparentAction( GDIMetaFile& o_rMtf, aLineColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetRed()) / 100L ) ); aLineColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetGreen()) / 100L ) ); aLineColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aLineColor.GetBlue()) / 100L ) ); - o_rMtf.AddAction( new MetaLineColorAction(aLineColor, sal_True) ); + o_rMtf.AddAction( new MetaLineColorAction(aLineColor, true) ); Color aFillColor( rStateOutDev.GetFillColor() ); aFillColor.SetRed( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetRed()) / 100L ) ); aFillColor.SetGreen( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetGreen()) / 100L ) ); aFillColor.SetBlue( static_cast<sal_uInt8>( (255L*nTransparency + (100L - nTransparency)*aFillColor.GetBlue()) / 100L ) ); - o_rMtf.AddAction( new MetaFillColorAction(aFillColor, sal_True) ); + o_rMtf.AddAction( new MetaFillColorAction(aFillColor, true) ); } o_rMtf.AddAction( new MetaPolyPolygonAction(pTransAct->GetPolyPolygon()) ); @@ -727,7 +727,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, VirtualDevice aMapModeVDev; aMapModeVDev.mnDPIX = mnDPIX; aMapModeVDev.mnDPIY = mnDPIY; - aMapModeVDev.EnableOutput(sal_False); + aMapModeVDev.EnableOutput(false); int nLastBgAction, nActionNum; @@ -1172,7 +1172,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, Size aDstSzPix; VirtualDevice aMapVDev; // here, we record only mapmode information - aMapVDev.EnableOutput(sal_False); + aMapVDev.EnableOutput(false); VirtualDevice aPaintVDev; // into this one, we render. aPaintVDev.SetBackground( aBackgroundComponent.aBgColor ); @@ -1204,7 +1204,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, aMapVDev.mnDPIX = aPaintVDev.mnDPIX = mnDPIX; aMapVDev.mnDPIY = aPaintVDev.mnDPIY = mnDPIY; - aPaintVDev.EnableOutput(sal_False); + aPaintVDev.EnableOutput(false); // iterate over all actions for( pCurrAct=const_cast<GDIMetaFile&>(rInMtf).FirstAction(), nActionNum=0; @@ -1216,7 +1216,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, // the current aCCList element // (aCurr) if( aCCList_MemberMap[nActionNum] == &(*aCurr) ) - aPaintVDev.EnableOutput(sal_True); + aPaintVDev.EnableOutput(true); // but process every action const sal_uInt16 nType( pCurrAct->GetType() ); @@ -1254,7 +1254,7 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, Application::Reschedule(); } - const sal_Bool bOldMap = mbMap; + const bool bOldMap = mbMap; mbMap = aPaintVDev.mbMap = false; Bitmap aBandBmp( aPaintVDev.GetBitmap( Point(), aDstSzPix ) ); diff --git a/vcl/source/gdi/print3.cxx b/vcl/source/gdi/print3.cxx index db7b14e14ec0..a64e6fc3ddff 100644 --- a/vcl/source/gdi/print3.cxx +++ b/vcl/source/gdi/print3.cxx @@ -148,10 +148,10 @@ public: Link maOptionChangeHdl; ControlDependencyMap maControlDependencies; ChoiceDisableMap maChoiceDisableMap; - sal_Bool mbFirstPage; - sal_Bool mbLastPage; - sal_Bool mbReversePageOrder; - sal_Bool mbPapersizeFromSetup; + bool mbFirstPage; + bool mbLastPage; + bool mbReversePageOrder; + bool mbPapersizeFromSetup; view::PrintableState meJobState; vcl::PrinterController::MultiPageSetup maMultiPage; @@ -182,10 +182,10 @@ public: // history suggests this is intentional... ImplPrinterControllerData() : - mbFirstPage( sal_True ), - mbLastPage( sal_False ), - mbReversePageOrder( sal_False ), - mbPapersizeFromSetup( sal_False ), + mbFirstPage( true ), + mbLastPage( false ), + mbReversePageOrder( false ), + mbPapersizeFromSetup( false ), meJobState( view::PrintableState_JOB_STARTED ), mpProgress( NULL ), mnDefaultPaperBin( -1 ), @@ -285,7 +285,7 @@ void Printer::PrintJob( const boost::shared_ptr<PrinterController>& i_pControlle const JobSetup& i_rInitSetup ) { - sal_Bool bSynchronous = sal_False; + bool bSynchronous = false; PropertyValue* pVal = i_pController->getValue( OUString( "Wait" ) ); if( pVal ) pVal->Value >>= bSynchronous; @@ -333,7 +333,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr } // reset last page property - i_pController->setLastPage( sal_False ); + i_pController->setLastPage( false ); // update "PageRange" property inferring from other properties: // case 1: "Pages" set from UNO API -> @@ -402,7 +402,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr PropertyValue* pReverseVal = i_pController->getValue( OUString( "PrintReverse" ) ); if( pReverseVal ) { - sal_Bool bReverse = sal_False; + bool bReverse = false; pReverseVal->Value >>= bReverse; pController->setReversePrint( bReverse ); } @@ -410,7 +410,7 @@ void Printer::ImplPrintJob( const boost::shared_ptr<PrinterController>& i_pContr PropertyValue* pPapersizeFromSetupVal = i_pController->getValue( OUString( "PapersizeFromSetup" ) ); if( pPapersizeFromSetupVal ) { - sal_Bool bPapersizeFromSetup = sal_False; + bool bPapersizeFromSetup = false; pPapersizeFromSetupVal->Value >>= bPapersizeFromSetup; pController->setPapersizeFromSetup( bPapersizeFromSetup ); } @@ -560,7 +560,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print if ( !mpPrinter ) return false; - sal_Bool bSinglePrintJobs = sal_False; + bool bSinglePrintJobs = false; PropertyValue* pSingleValue = i_pController->getValue( OUString( "PrintCollateAsSingleJobs" ) ); if( pSingleValue ) { @@ -574,9 +574,9 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print pFileValue->Value >>= aFile; if( !aFile.isEmpty() ) { - mbPrintFile = sal_True; + mbPrintFile = true; maPrintFile = aFile; - bSinglePrintJobs = sal_False; + bSinglePrintJobs = false; } } @@ -588,10 +588,10 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print maJobName = i_rJobName; mnCurPage = 1; mnCurPrintPage = 1; - mbPrinting = sal_True; + mbPrinting = true; if( GetCapabilities( PRINTER_CAPABILITIES_USEPULLMODEL ) ) { - mbJobActive = sal_True; + mbJobActive = true; // sallayer does all necessary page printing // and also handles showing a dialog // that also means it must call jobStarted when the dialog is finished @@ -612,12 +612,12 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print pSVData->mpDefInst->DestroyPrinter( mpPrinter ); mnCurPage = 0; mnCurPrintPage = 0; - mbPrinting = sal_False; + mbPrinting = false; mpPrinter = NULL; - mbJobActive = sal_False; + mbJobActive = false; GDIMetaFile aDummyFile; - i_pController->setLastPage(sal_True); + i_pController->setLastPage(true); i_pController->getFilteredPageFile(0, aDummyFile); return false; @@ -658,7 +658,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print i_pController->isDirectPrint(), maJobSetup.ImplGetConstData() ) ) { - mbJobActive = sal_True; + mbJobActive = true; i_pController->createProgressDialog(); const int nPages = i_pController->getFilteredPageCount(); // abort job, if no pages will be printed. @@ -678,7 +678,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print nInnerIteration == nInnerRepeatCount-1 && nJobIteration == nJobs-1 ) { - i_pController->setLastPage( sal_True ); + i_pController->setLastPage( true ); } i_pController->printFilteredPage( nPage ); if( i_pController->isProgressCanceled() ) @@ -705,7 +705,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print maJobName = i_rJobName; mnCurPage = 1; mnCurPrintPage = 1; - mbPrinting = sal_True; + mbPrinting = true; } else bError = true; @@ -726,7 +726,7 @@ bool Printer::StartJob( const OUString& i_rJobName, boost::shared_ptr<vcl::Print pSVData->mpDefInst->DestroyPrinter( mpPrinter ); mnCurPage = 0; mnCurPrintPage = 0; - mbPrinting = sal_False; + mbPrinting = false; mpPrinter = NULL; return false; @@ -863,7 +863,7 @@ PrinterController::PageSize vcl::ImplPrinterControllerData::modifyJobSetup( cons } else if ( i_rProps[ nProperty ].Name == "PageIncludesNonprintableArea" ) { - sal_Bool bVal = sal_False; + bool bVal = false; i_rProps[ nProperty ].Value >>= bVal; aPageSize.bFullPaper = static_cast<bool>(bVal); } @@ -985,7 +985,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag o_rMtf.SetPrefSize( aPageSize.aSize ); o_rMtf.SetPrefMapMode( aMapMode ); - mpImplData->mpPrinter->EnableOutput( sal_False ); + mpImplData->mpPrinter->EnableOutput( false ); o_rMtf.Record( mpImplData->mpPrinter.get() ); @@ -999,7 +999,7 @@ PrinterController::PageSize PrinterController::getPageFile( int i_nUnfilteredPag mpImplData->maPageCache.insert( i_nUnfilteredPage, o_rMtf, aPageSize ); // reset "FirstPage" property to false now we've gotten at least our first one - mpImplData->mbFirstPage = sal_False; + mpImplData->mbFirstPage = false; return aPageSize; } @@ -1014,7 +1014,7 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD o_rMtf.AddAction( new MetaPushAction( PUSH_ALL ) ); // clip to page rect - o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), sal_True ) ); + o_rMtf.AddAction( new MetaClipRegionAction( Region( i_rClipRect ), true ) ); // append the subpage io_rSubPage.WindStart(); @@ -1031,8 +1031,8 @@ static void appendSubPage( GDIMetaFile& o_rMtf, const Rectangle& i_rClipRect, GD o_rMtf.AddAction( new MetaMapModeAction( MapMode( MAP_100TH_MM ) ) ); Rectangle aBorderRect( i_rClipRect ); - o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), sal_True ) ); - o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), sal_False ) ); + o_rMtf.AddAction( new MetaLineColorAction( Color( COL_BLACK ), true ) ); + o_rMtf.AddAction( new MetaFillColorAction( Color( COL_TRANSPARENT ), false ) ); o_rMtf.AddAction( new MetaRectAction( aBorderRect ) ); // restore gstate @@ -1085,8 +1085,8 @@ PrinterController::PageSize PrinterController::getFilteredPageFile( int i_nFilte // set last page property really only on the very last page to be rendered // that is on the last subpage of a NUp run - sal_Bool bIsLastPage = mpImplData->mbLastPage; - mpImplData->mbLastPage = sal_False; + bool bIsLastPage = mpImplData->mbLastPage; + mpImplData->mbLastPage = false; Size aPaperSize( mpImplData->getRealPaperSize( mpImplData->maMultiPage.aPaperSize, false ) ); @@ -1298,7 +1298,7 @@ void PrinterController::printFilteredPage( int i_nPage ) GDIMetaFile aCleanedFile; sal_uLong nRestoreDrawMode = removeTransparencies( aPageFile, aCleanedFile ); - mpImplData->mpPrinter->EnableOutput( sal_True ); + mpImplData->mpPrinter->EnableOutput( true ); // actually print the page mpImplData->mpPrinter->ImplStartPage(); @@ -1326,19 +1326,19 @@ void PrinterController::abortJob() setJobState( view::PrintableState_JOB_ABORTED ); // applications (well, sw) depend on a page request with "IsLastPage" = true // to free resources, else they (well, sw) will crash eventually - setLastPage( sal_True ); + setLastPage( true ); delete mpImplData->mpProgress; mpImplData->mpProgress = NULL; GDIMetaFile aMtf; getPageFile( 0, aMtf, false ); } -void PrinterController::setLastPage( sal_Bool i_bLastPage ) +void PrinterController::setLastPage( bool i_bLastPage ) { mpImplData->mbLastPage = i_bLastPage; } -void PrinterController::setReversePrint( sal_Bool i_bReverse ) +void PrinterController::setReversePrint( bool i_bReverse ) { mpImplData->mbReversePageOrder = i_bReverse; } @@ -1348,7 +1348,7 @@ bool PrinterController::getReversePrint() const return mpImplData->mbReversePageOrder; } -void PrinterController::setPapersizeFromSetup( sal_Bool i_bPapersizeFromSetup ) +void PrinterController::setPapersizeFromSetup( bool i_bPapersizeFromSetup ) { mpImplData->mbPapersizeFromSetup = i_bPapersizeFromSetup; } @@ -1475,7 +1475,7 @@ void PrinterController::setUIOptions( const Sequence< PropertyValue >& i_rOption } else if ( rEntry.Name == "Enabled" ) { - sal_Bool bValue = sal_True; + bool bValue = true; rEntry.Value >>= bValue; bIsEnabled = bValue; } @@ -1537,7 +1537,7 @@ bool PrinterController::isUIOptionEnabled( const OUString& i_rProperty ) const if( pVal ) { sal_Int32 nDepVal = 0; - sal_Bool bDepVal = sal_False; + bool bDepVal = false; if( pVal->Value >>= nDepVal ) { bEnabled = (nDepVal == it->second.mnDependsOnEntry) || (it->second.mnDependsOnEntry == -1); @@ -1605,7 +1605,7 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty ) if( pVal ) { sal_Int32 nDepVal = 0; - sal_Bool bDepVal = sal_False; + bool bDepVal = false; if( pVal->Value >>= nDepVal ) { if( it->second.mnDependsOnEntry != -1 ) @@ -1615,7 +1615,7 @@ OUString PrinterController::makeEnabled( const OUString& i_rProperty ) } else if( pVal->Value >>= bDepVal ) { - setValue( aDependency, makeAny( sal_Bool( it->second.mnDependsOnEntry != 0 ) ) ); + setValue( aDependency, makeAny( it->second.mnDependsOnEntry != 0 ) ); } else { @@ -1638,7 +1638,7 @@ void PrinterController::createProgressDialog() { if( ! mpImplData->mpProgress ) { - sal_Bool bShow = sal_True; + bool bShow = true; PropertyValue* pMonitor = getValue( OUString( "MonitorVisible" ) ); if( pMonitor ) pMonitor->Value >>= bShow; @@ -1647,7 +1647,7 @@ void PrinterController::createProgressDialog() const css::beans::PropertyValue* pVal = getValue( OUString( "IsApi" ) ); if( pVal ) { - sal_Bool bApi = sal_False; + bool bApi = false; pVal->Value >>= bApi; bShow = ! bApi; } @@ -1690,7 +1690,7 @@ void PrinterController::pushPropertiesToPrinter() const css::beans::PropertyValue* pVal = getValue( OUString( "CopyCount" ) ); if( pVal ) pVal->Value >>= nCopyCount; - sal_Bool bCollate = sal_False; + bool bCollate = false; pVal = getValue( OUString( "Collate" ) ); if( pVal ) pVal->Value >>= bCollate; @@ -1713,19 +1713,19 @@ void PrinterController::pushPropertiesToPrinter() bool PrinterController::isShowDialogs() const { - sal_Bool bApi = getBoolProperty( OUString( "IsApi" ), sal_False ); + bool bApi = getBoolProperty( OUString( "IsApi" ), false ); return ! bApi && ! Application::IsHeadlessModeEnabled(); } bool PrinterController::isDirectPrint() const { - sal_Bool bDirect = getBoolProperty( OUString( "IsDirect" ), sal_False ); - return bDirect == sal_True; + bool bDirect = getBoolProperty( OUString( "IsDirect" ), false ); + return bDirect; } -sal_Bool PrinterController::getBoolProperty( const OUString& i_rProperty, sal_Bool i_bFallback ) const +bool PrinterController::getBoolProperty( const OUString& i_rProperty, bool i_bFallback ) const { - sal_Bool bRet = i_bFallback; + bool bRet = i_bFallback; const css::beans::PropertyValue* pVal = getValue( i_rProperty ); if( pVal ) pVal->Value >>= bRet; @@ -1754,9 +1754,9 @@ Any PrinterOptionsHelper::getValue( const OUString& i_rPropertyName ) const return aRet; } -sal_Bool PrinterOptionsHelper::getBoolValue( const OUString& i_rPropertyName, sal_Bool i_bDefault ) const +bool PrinterOptionsHelper::getBoolValue( const OUString& i_rPropertyName, bool i_bDefault ) const { - sal_Bool bRet = sal_False; + bool bRet = false; Any aVal( getValue( i_rPropertyName ) ); return (aVal >>= bRet) ? bRet : i_bDefault; } @@ -1945,7 +1945,7 @@ Any PrinterOptionsHelper::setBoolControlOpt(const OUString& i_rID, const OUString& i_rTitle, const OUString& i_rHelpId, const OUString& i_rProperty, - sal_Bool i_bValue, + bool i_bValue, const PrinterOptionsHelper::UIControlOptions& i_rControlOptions) { Sequence< OUString > aHelpId; diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index e35f0b424ceb..6e3f7fe06d3d 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1598,9 +1598,9 @@ SvStream& ReadRegion(SvStream& rIStrm, Region& rRegion) if(aCompat.GetVersion() >= 2) { - sal_Bool bHasPolyPolygon(sal_False); + bool bHasPolyPolygon(false); - rIStrm.ReadUChar( bHasPolyPolygon ); + rIStrm.ReadCharAsBool( bHasPolyPolygon ); if(bHasPolyPolygon) { @@ -1674,7 +1674,7 @@ SvStream& WriteRegion( SvStream& rOStrm, const Region& rRegion ) } // write polypolygon if available - const sal_Bool bHasPolyPolygon(rRegion.HasPolyPolygonOrB2DPolyPolygon()); + const bool bHasPolyPolygon(rRegion.HasPolyPolygonOrB2DPolyPolygon()); rOStrm.WriteUChar( bHasPolyPolygon ); if(bHasPolyPolygon) diff --git a/vcl/source/gdi/salgdilayout.cxx b/vcl/source/gdi/salgdilayout.cxx index ab522688e0f5..35f66b58924a 100644 --- a/vcl/source/gdi/salgdilayout.cxx +++ b/vcl/source/gdi/salgdilayout.cxx @@ -167,7 +167,7 @@ void SalGraphics::mirror( long& x, long& nWidth, const OutputDevice *pOutDev, bo } } -sal_Bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const +bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoint *pPtAry2, const OutputDevice *pOutDev, bool bBack ) const { long w; if( pOutDev && pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) @@ -240,10 +240,10 @@ sal_Bool SalGraphics::mirror( sal_uInt32 nPoints, const SalPoint *pPtAry, SalPoi pPtAry2[j].mnY = pPtAry[i].mnY; } } - return sal_True; + return true; } else - return sal_False; + return false; } void SalGraphics::mirror( Region& rRgn, const OutputDevice *pOutDev, bool bBack ) const @@ -422,7 +422,7 @@ void SalGraphics::DrawPolyLine( sal_uInt32 nPoints, const SalPoint* pPtAry, cons if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); drawPolyLine( nPoints, bCopied ? pPtAry2 : pPtAry ); delete [] pPtAry2; } @@ -435,7 +435,7 @@ void SalGraphics::DrawPolygon( sal_uInt32 nPoints, const SalPoint* pPtAry, const if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); drawPolygon( nPoints, bCopied ? pPtAry2 : pPtAry ); delete [] pPtAry2; } @@ -480,13 +480,13 @@ bool SalGraphics::DrawPolyPolygon( const basegfx::B2DPolyPolygon& i_rPolyPolygon return bRet; } -sal_Bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) +bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) { - sal_Bool bResult = sal_False; + bool bResult = false; if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); bResult = drawPolyLineBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry ); delete [] pPtAry2; } @@ -495,13 +495,13 @@ sal_Bool SalGraphics::DrawPolyLineBezier( sal_uInt32 nPoints, const SalPoint* pP return bResult; } -sal_Bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) +bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPtAry, const sal_uInt8* pFlgAry, const OutputDevice* pOutDev ) { - sal_Bool bResult = sal_False; + bool bResult = false; if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); bResult = drawPolygonBezier( nPoints, bCopied ? pPtAry2 : pPtAry, pFlgAry ); delete [] pPtAry2; } @@ -510,10 +510,10 @@ sal_Bool SalGraphics::DrawPolygonBezier( sal_uInt32 nPoints, const SalPoint* pPt return bResult; } -sal_Bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints, +bool SalGraphics::DrawPolyPolygonBezier( sal_uInt32 i_nPoly, const sal_uInt32* i_pPoints, const SalPoint* const* i_pPtAry, const sal_uInt8* const* i_pFlgAry, const OutputDevice* i_pOutDev ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (i_pOutDev && i_pOutDev->IsRTLEnabled()) ) { // TODO: optimize, reduce new/delete calls @@ -645,7 +645,7 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInve if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) { SalPoint* pPtAry2 = new SalPoint[nPoints]; - sal_Bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); + bool bCopied = mirror( nPoints, pPtAry, pPtAry2, pOutDev ); invert( nPoints, bCopied ? pPtAry2 : pPtAry, nFlags ); delete [] pPtAry2; } @@ -653,14 +653,14 @@ void SalGraphics::Invert( sal_uInt32 nPoints, const SalPoint* pPtAry, SalInve invert( nPoints, pPtAry, nFlags ); } -sal_Bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev ) +bool SalGraphics::DrawEPS( long nX, long nY, long nWidth, long nHeight, void* pPtr, sal_uLong nSize, const OutputDevice *pOutDev ) { if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) mirror( nX, nWidth, pOutDev ); return drawEPS( nX, nY, nWidth, nHeight, pPtr, nSize ); } -sal_Bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool SalGraphics::HitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside, const OutputDevice *pOutDev ) { if( (m_nLayout & SAL_LAYOUT_BIDI_RTL) || (pOutDev && pOutDev->IsRTLEnabled()) ) @@ -710,7 +710,7 @@ void SalGraphics::mirror( ImplControlValue& rVal, const OutputDevice* pOutDev, b } } -sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, const OutputDevice *pOutDev ) { @@ -720,14 +720,14 @@ sal_Bool SalGraphics::DrawNativeControl( ControlType nType, ControlPart nPart, c mirror( rgn, pOutDev ); boost::scoped_ptr< ImplControlValue > mirrorValue( aValue.clone()); mirror( *mirrorValue, pOutDev ); - sal_Bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption ); + bool bRet = drawNativeControl( nType, nPart, rgn, nState, *mirrorValue, aCaption ); return bRet; } else return drawNativeControl( nType, nPart, rControlRegion, nState, aValue, aCaption ); } -sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, +bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion, const OutputDevice *pOutDev ) { @@ -742,9 +742,9 @@ sal_Bool SalGraphics::GetNativeControlRegion( ControlType nType, ControlPart nPa { mirror( rNativeBoundingRegion, pOutDev, true ); mirror( rNativeContentRegion, pOutDev, true ); - return sal_True; + return true; } - return sal_False; + return false; } else return getNativeControlRegion( nType, nPart, rControlRegion, nState, aValue, aCaption, diff --git a/vcl/source/gdi/salnativewidgets-none.cxx b/vcl/source/gdi/salnativewidgets-none.cxx index bd97f0d67b7b..8e8ee1240caf 100644 --- a/vcl/source/gdi/salnativewidgets-none.cxx +++ b/vcl/source/gdi/salnativewidgets-none.cxx @@ -32,9 +32,9 @@ * Returns sal_True if the platform supports native * drawing of the control defined by nPart */ -sal_Bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) +bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) { - return( sal_False ); + return false; } @@ -45,13 +45,13 @@ sal_Bool SalGraphics::IsNativeControlSupported( ControlType, ControlPart ) * aPos was or was not inside the native widget specified by the * nType/nPart combination. */ -sal_Bool SalGraphics::hitTestNativeControl( ControlType, +bool SalGraphics::hitTestNativeControl( ControlType, ControlPart, const Rectangle&, const Point&, bool& ) { - return( sal_False ); + return false; } @@ -64,14 +64,14 @@ sal_Bool SalGraphics::hitTestNativeControl( ControlType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -sal_Bool SalGraphics::drawNativeControl( ControlType, +bool SalGraphics::drawNativeControl( ControlType, ControlPart, const Rectangle&, ControlState, const ImplControlValue&, const OUString& ) { - return( sal_False ); + return false; } /* @@ -87,7 +87,7 @@ sal_Bool SalGraphics::drawNativeControl( ControlType, * aValue: An optional value (tristate/numerical/string) * aCaption: A caption or title string (like button text etc) */ -sal_Bool SalGraphics::getNativeControlRegion( ControlType, +bool SalGraphics::getNativeControlRegion( ControlType, ControlPart, const Rectangle&, ControlState, @@ -96,7 +96,7 @@ sal_Bool SalGraphics::getNativeControlRegion( ControlType, Rectangle &, Rectangle & ) { - return( sal_False ); + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx index a7b3633ddf2d..2602dbc3d7f8 100644 --- a/vcl/source/gdi/virdev.cxx +++ b/vcl/source/gdi/virdev.cxx @@ -73,7 +73,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, mnBitCount = ( nBitCount ? nBitCount : pOutDev->GetBitCount() ); mnOutWidth = nDX; mnOutHeight = nDY; - mbScreenComp = sal_True; + mbScreenComp = true; mnAlphaDepth = -1; // #i59315# init vdev size from system object, when passed a @@ -86,7 +86,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev, SetAntialiasing( ANTIALIASING_DISABLE_TEXT ); if ( pOutDev->GetOutDevType() == OUTDEV_PRINTER ) - mbScreenComp = sal_False; + mbScreenComp = false; else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV ) mbScreenComp = ((VirtualDevice*)pOutDev)->mbScreenComp; @@ -203,24 +203,24 @@ VirtualDevice::~VirtualDevice() // ----------------------------------------------------------------------- -sal_Bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) +bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) { SAL_INFO( "vcl.gdi", "VirtualDevice::InnerImplSetOutputSizePixel( " << rNewSize.Width() << ", " << rNewSize.Height() << ", " << int(bErase) << " )" ); if ( !mpVirDev ) - return sal_False; + return false; else if ( rNewSize == GetOutputSizePixel() ) { if ( bErase ) Erase(); // Yeah, so trying to re-use a VirtualDevice but this time using a // pre-allocated buffer won't work. Big deal. - return sal_True; + return true; } - sal_Bool bRet; + bool bRet; long nNewWidth = rNewSize.Width(), nNewHeight = rNewSize.Height(); if ( nNewWidth < 1 ) @@ -252,7 +252,7 @@ sal_Bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, sal_B if ( !mpGraphics ) { if ( !ImplGetGraphics() ) - return sal_False; + return false; } pNewVirDev = pSVData->mpDefInst->CreateVirtualDevice( mpGraphics, nNewWidth, nNewHeight, mnBitCount ); @@ -288,16 +288,16 @@ sal_Bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, sal_B mpVirDev = pNewVirDev; mnOutWidth = rNewSize.Width(); mnOutHeight = rNewSize.Height(); - bRet = sal_True; + bRet = true; } else { - bRet = sal_False; + bRet = false; pSVData->mpDefInst->DestroyVirtualDevice( pNewVirDev ); } } else - bRet = sal_False; + bRet = false; } return bRet; @@ -321,7 +321,7 @@ void VirtualDevice::ImplFillOpaqueRectangle( const Rectangle& rRect ) // ----------------------------------------------------------------------- -sal_Bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) +bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, bool bErase, const basebmp::RawMemorySharedArray &pBuffer ) { if( InnerImplSetOutputSizePixel(rNewSize, bErase, pBuffer) ) { @@ -350,18 +350,18 @@ sal_Bool VirtualDevice::ImplSetOutputSizePixel( const Size& rNewSize, sal_Bool b mpAlphaVDev->SetMapMode( GetMapMode() ); } - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, sal_Bool bErase ) +bool VirtualDevice::SetOutputSizePixel( const Size& rNewSize, bool bErase ) { return ImplSetOutputSizePixel( rNewSize, bErase, basebmp::RawMemorySharedArray() ); } -sal_Bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer ) +bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNewSize, const Fraction& rScale, const Point& rNewOffset, const basebmp::RawMemorySharedArray &pBuffer ) { if (pBuffer) { MapMode mm = GetMapMode(); @@ -370,7 +370,7 @@ sal_Bool VirtualDevice::SetOutputSizePixelScaleOffsetAndBuffer( const Size& rNew mm.SetScaleY( rScale ); SetMapMode( mm ); } - return ImplSetOutputSizePixel( rNewSize, sal_True, pBuffer); + return ImplSetOutputSizePixel( rNewSize, true, pBuffer); } // ----------------------------------------------------------------------- @@ -408,8 +408,8 @@ void VirtualDevice::ImplSetReferenceDevice( RefDevMode i_eRefDevMode, sal_Int32 mnDPIY = i_nDPIY; mnDPIScaleFactor = 1; - EnableOutput( sal_False ); // prevent output on reference device - mbScreenComp = sal_False; + EnableOutput( false ); // prevent output on reference device + mbScreenComp = false; // invalidate currently selected fonts mbInitFont = true; diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index f6d7d59b34af..7c08e016b5cb 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -118,9 +118,9 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper ) // version 2 if( aCompat.GetVersion() >= 2 ) { - sal_Bool bRect, bGrad, bBmp, bDummy; + bool bRect, bGrad, bBmp, bDummy; - rIStm.ReadUChar( bRect ).ReadUChar( bGrad ).ReadUChar( bBmp ).ReadUChar( bDummy ).ReadUChar( bDummy ).ReadUChar( bDummy ); + rIStm.ReadCharAsBool( bRect ).ReadCharAsBool( bGrad ).ReadCharAsBool( bBmp ).ReadCharAsBool( bDummy ).ReadCharAsBool( bDummy ).ReadCharAsBool( bDummy ); if( bRect ) { @@ -155,10 +155,10 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper ) SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpaper ) { VersionCompat aCompat( rOStm, STREAM_WRITE, 3 ); - sal_Bool bRect = ( rImplWallpaper.mpRect != NULL ); - sal_Bool bGrad = ( rImplWallpaper.mpGradient != NULL ); - sal_Bool bBmp = ( rImplWallpaper.mpBitmap != NULL ); - sal_Bool bDummy = sal_False; + bool bRect = ( rImplWallpaper.mpRect != NULL ); + bool bGrad = ( rImplWallpaper.mpGradient != NULL ); + bool bBmp = ( rImplWallpaper.mpBitmap != NULL ); + bool bDummy = false; // version 1 WriteColor( rOStm, rImplWallpaper.maColor ); @@ -184,7 +184,7 @@ SvStream& WriteImplWallpaper( SvStream& rOStm, const ImplWallpaper& rImplWallpap // ----------------------------------------------------------------------- -inline void Wallpaper::ImplMakeUnique( sal_Bool bReleaseCache ) +inline void Wallpaper::ImplMakeUnique( bool bReleaseCache ) { // copy them if other references exist if ( mpImplWallpaper->mnRefCount != 1 ) @@ -292,7 +292,7 @@ const Color& Wallpaper::GetColor() const void Wallpaper::SetStyle( WallpaperStyle eStyle ) { - ImplMakeUnique( sal_False ); + ImplMakeUnique( false ); if( eStyle == WALLPAPER_APPLICATIONGRADIENT ) // set a dummy gradient, the correct gradient @@ -353,7 +353,7 @@ BitmapEx Wallpaper::GetBitmap() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsBitmap() const +bool Wallpaper::IsBitmap() const { return (mpImplWallpaper->mpBitmap != 0); @@ -394,7 +394,7 @@ Gradient Wallpaper::GetGradient() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsGradient() const +bool Wallpaper::IsGradient() const { return (mpImplWallpaper->mpGradient != 0); @@ -422,7 +422,7 @@ Gradient Wallpaper::ImplGetApplicationGradient() const void Wallpaper::SetRect( const Rectangle& rRect ) { - ImplMakeUnique( sal_False ); + ImplMakeUnique( false ); if ( rRect.IsEmpty() ) { @@ -457,7 +457,7 @@ Rectangle Wallpaper::GetRect() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsRect() const +bool Wallpaper::IsRect() const { return (mpImplWallpaper->mpRect != 0); @@ -466,26 +466,26 @@ sal_Bool Wallpaper::IsRect() const // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsFixed() const +bool Wallpaper::IsFixed() const { if ( mpImplWallpaper->meStyle == WALLPAPER_NULL ) - return sal_False; + return false; else return (!mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient); } // ----------------------------------------------------------------------- -sal_Bool Wallpaper::IsScrollable() const +bool Wallpaper::IsScrollable() const { if ( mpImplWallpaper->meStyle == WALLPAPER_NULL ) - return sal_False; + return false; else if ( !mpImplWallpaper->mpBitmap && !mpImplWallpaper->mpGradient ) - return sal_True; + return true; else if ( mpImplWallpaper->mpBitmap ) return (mpImplWallpaper->meStyle == WALLPAPER_TILE); else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -515,35 +515,35 @@ Wallpaper& Wallpaper::operator=( const Wallpaper& rWallpaper ) // ----------------------------------------------------------------------- -sal_Bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const +bool Wallpaper::operator==( const Wallpaper& rWallpaper ) const { if ( mpImplWallpaper == rWallpaper.mpImplWallpaper ) - return sal_True; + return true; if ( ( mpImplWallpaper->meStyle != rWallpaper.mpImplWallpaper->meStyle ) || ( mpImplWallpaper->maColor != rWallpaper.mpImplWallpaper->maColor ) ) - return sal_False; + return false; if ( mpImplWallpaper->mpRect != rWallpaper.mpImplWallpaper->mpRect && ( !mpImplWallpaper->mpRect || !rWallpaper.mpImplWallpaper->mpRect || *(mpImplWallpaper->mpRect) != *(rWallpaper.mpImplWallpaper->mpRect) ) ) - return sal_False; + return false; if ( mpImplWallpaper->mpBitmap != rWallpaper.mpImplWallpaper->mpBitmap && ( !mpImplWallpaper->mpBitmap || !rWallpaper.mpImplWallpaper->mpBitmap || *(mpImplWallpaper->mpBitmap) != *(rWallpaper.mpImplWallpaper->mpBitmap) ) ) - return sal_False; + return false; if ( mpImplWallpaper->mpGradient != rWallpaper.mpImplWallpaper->mpGradient && ( !mpImplWallpaper->mpGradient || !rWallpaper.mpImplWallpaper->mpGradient || *(mpImplWallpaper->mpGradient) != *(rWallpaper.mpImplWallpaper->mpGradient) ) ) - return sal_False; + return false; - return sal_True; + return true; } // ----------------------------------------------------------------------- diff --git a/vcl/source/helper/lazydelete.cxx b/vcl/source/helper/lazydelete.cxx index e3676dcb3ccd..996463b84eb7 100644 --- a/vcl/source/helper/lazydelete.cxx +++ b/vcl/source/helper/lazydelete.cxx @@ -57,7 +57,7 @@ void LazyDelete::flush() // specialized is_less function for Window template<> bool LazyDeletor<Window>::is_less( Window* left, Window* right ) { - return (left != right && right->IsChild( left, sal_True )) ? true : false; + return (left != right && right->IsChild( left, true )) ? true : false; } #ifndef LINUX diff --git a/vcl/source/window/accel.cxx b/vcl/source/window/accel.cxx index 345b0aba8fe9..4ded993eb491 100644 --- a/vcl/source/window/accel.cxx +++ b/vcl/source/window/accel.cxx @@ -161,7 +161,7 @@ void Accelerator::ImplInit() { mnCurId = 0; mnCurRepeat = 0; - mbIsCancel = sal_False; + mbIsCancel = false; mpDel = NULL; } @@ -217,7 +217,7 @@ void Accelerator::ImplDeleteData() // ----------------------------------------------------------------------- void Accelerator::ImplInsertAccel( sal_uInt16 nItemId, const KeyCode& rKeyCode, - sal_Bool bEnable, Accelerator* pAutoAccel ) + bool bEnable, Accelerator* pAutoAccel ) { DBG_ASSERT( nItemId, "Accelerator::InsertItem(): ItemId == 0" ); @@ -356,7 +356,7 @@ void Accelerator::Select() void Accelerator::InsertItem( sal_uInt16 nItemId, const KeyCode& rKeyCode ) { - ImplInsertAccel( nItemId, rKeyCode, sal_True, NULL ); + ImplInsertAccel( nItemId, rKeyCode, true, NULL ); } // ----------------------------------------------------------------------- @@ -447,7 +447,7 @@ Accelerator& Accelerator::operator=( const Accelerator& rAccel ) maCurKeyCode = KeyCode(); mnCurId = 0; mnCurRepeat = 0; - mbIsCancel = sal_False; + mbIsCancel = false; // delete and copy tables ImplDeleteData(); diff --git a/vcl/source/window/accmgr.cxx b/vcl/source/window/accmgr.cxx index 8c0cb32888a0..5fe29c0e3341 100644 --- a/vcl/source/window/accmgr.cxx +++ b/vcl/source/window/accmgr.cxx @@ -37,20 +37,20 @@ ImplAccelManager::~ImplAccelManager() // ----------------------------------------------------------------------- -sal_Bool ImplAccelManager::InsertAccel( Accelerator* pAccel ) +bool ImplAccelManager::InsertAccel( Accelerator* pAccel ) { if ( !mpAccelList ) { mpAccelList = new ImplAccelList; } else { for ( size_t i = 0, n = mpAccelList->size(); i < n; ++i ) { if ( (*mpAccelList)[ i ] == pAccel ) { - return sal_False; + return false; } } } mpAccelList->insert( mpAccelList->begin(), pAccel ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -92,7 +92,7 @@ void ImplAccelManager::RemoveAccel( Accelerator* pAccel ) // ----------------------------------------------------------------------- -void ImplAccelManager::EndSequence( sal_Bool bCancel ) +void ImplAccelManager::EndSequence( bool bCancel ) { // are we in a list ? if ( !mpSequenceList ) @@ -108,7 +108,7 @@ void ImplAccelManager::EndSequence( sal_Bool bCancel ) pTempAccel->Deactivate(); if ( !bDel ) { - pTempAccel->mbIsCancel = sal_False; + pTempAccel->mbIsCancel = false; pTempAccel->mpDel = NULL; } } @@ -120,15 +120,15 @@ void ImplAccelManager::EndSequence( sal_Bool bCancel ) // ----------------------------------------------------------------------- -sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) +bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepeat ) { Accelerator* pAccel; // do we have accelerators ?? if ( !mpAccelList ) - return sal_False; + return false; if ( mpAccelList->empty() ) - return sal_False; + return false; // are we in a sequence ? if ( mpSequenceList ) @@ -140,7 +140,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe { // abort sequence FlushAccel(); - return sal_False; + return false; } // can the entry be found ? @@ -157,7 +157,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe // call Activate-Handler of the new one pNextAccel->Activate(); - return sal_True; + return true; } else { @@ -185,14 +185,14 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe pAccel->mpDel = NULL; } - return sal_True; + return true; } else { // stop sequence as the accelerator was disbled // transfer the key (to the system) FlushAccel(); - return sal_False; + return false; } } } @@ -200,7 +200,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe { // wrong key => stop sequence FlushAccel(); - return sal_False; + return false; } } @@ -227,7 +227,7 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe // call activate-Handler of the new one pNextAccel->Activate(); - return sal_True; + return true; } else { @@ -256,15 +256,15 @@ sal_Bool ImplAccelManager::IsAccelKey( const KeyCode& rKeyCode, sal_uInt16 nRepe pAccel->mpDel = NULL; } - return sal_True; + return true; } else - return sal_False; + return false; } } } - return sal_False; + return false; } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index c9ead5972c9b..b68b4ab9ae51 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -43,7 +43,7 @@ using namespace ::com::sun::star::uno; // ======================================================================= -static void ImplGetPinImage( sal_uInt16 nStyle, sal_Bool bPinIn, Image& rImage ) +static void ImplGetPinImage( sal_uInt16 nStyle, bool bPinIn, Image& rImage ) { // load ImageList if not available yet ImplSVData* pSVData = ImplGetSVData(); @@ -132,7 +132,7 @@ static void ImplDrawBrdWinSymbolButton( OutputDevice* pDev, pWin->SetLineColor(); pWin->DrawRect( rRect ); pWin->DrawSelectionBackground( rRect, 2, (nState & BUTTON_DRAW_PRESSED) ? sal_True : sal_False, - sal_True, sal_False ); + true, false ); } aTempRect = rRect; aTempRect.Left()+=3; @@ -161,23 +161,23 @@ ImplBorderWindowView::~ImplBorderWindowView() // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::MouseMove( const MouseEvent& ) +bool ImplBorderWindowView::MouseMove( const MouseEvent& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::MouseButtonDown( const MouseEvent& ) +bool ImplBorderWindowView::MouseButtonDown( const MouseEvent& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::Tracking( const TrackingEvent& ) +bool ImplBorderWindowView::Tracking( const TrackingEvent& ) { - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -311,7 +311,7 @@ sal_uInt16 ImplBorderWindowView::ImplHitTest( ImplBorderFrameData* pData, const // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { sal_uInt16 oldCloseState = pData->mnCloseState; sal_uInt16 oldMenuState = pData->mnMenuState; @@ -348,12 +348,12 @@ sal_Bool ImplBorderWindowView::ImplMouseMove( ImplBorderFrameData* pData, const if( pData->mnMenuState != oldMenuState ) pData->mpBorderWindow->Invalidate( pData->maMenuRect ); - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) +bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, const MouseEvent& rMEvt ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; @@ -458,9 +458,9 @@ sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, if ( bTracking ) { - pData->mbDragFull = sal_False; + pData->mbDragFull = false; if ( nDragFullTest ) - pData->mbDragFull = sal_True; // always fulldrag for proper docking, ignore system settings + pData->mbDragFull = true; // always fulldrag for proper docking, ignore system settings pBorderWindow->StartTracking(); } else if ( bHitTest ) @@ -468,12 +468,12 @@ sal_Bool ImplBorderWindowView::ImplMouseButtonDown( ImplBorderFrameData* pData, } } - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ) +bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const TrackingEvent& rTEvt ) { ImplBorderWindow* pBorderWindow = pData->mpBorderWindow; @@ -921,7 +921,7 @@ sal_Bool ImplBorderWindowView::ImplTracking( ImplBorderFrameData* pData, const T } } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1167,16 +1167,16 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei if( mnWidth && mnHeight ) { - mpBorderWindow->SetPaintTransparent( sal_True ); + mpBorderWindow->SetPaintTransparent( true ); mpBorderWindow->SetBackground(); - pCtrl->SetPaintTransparent( sal_True ); + pCtrl->SetPaintTransparent( true ); Window* pCompoundParent = NULL; if( pWin->GetParent() && pWin->GetParent()->IsCompoundControl() ) pCompoundParent = pWin->GetParent(); if( pCompoundParent ) - pCompoundParent->SetPaintTransparent( sal_True ); + pCompoundParent->SetPaintTransparent( true ); if( mnWidth < aBounds.GetWidth() || mnHeight < aBounds.GetHeight() ) { @@ -1260,7 +1260,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* if ( nBorderStyle & WINDOW_BORDER_NOBORDER ) return; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; // for native widget drawing we must find out what // control this border belongs to Window *pWin = NULL, *pCtrl = NULL; @@ -1352,9 +1352,9 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* nState |= CTRL_STATE_FOCUSED; } - sal_Bool bMouseOver = sal_False; + bool bMouseOver = false; Window *pCtrlChild = pCtrl->GetWindow( WINDOW_FIRSTCHILD ); - while( pCtrlChild && (bMouseOver = pCtrlChild->IsMouseOver()) == sal_False ) + while( pCtrlChild && !(bMouseOver = pCtrlChild->IsMouseOver()) ) pCtrlChild = pCtrlChild->GetWindow( WINDOW_NEXT ); if( bMouseOver ) @@ -1423,7 +1423,7 @@ void ImplSmallBorderWindowView::DrawWindow( sal_uInt16 nDrawFlags, OutputDevice* ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindow ) { maFrameData.mpBorderWindow = pBorderWindow; - maFrameData.mbDragFull = sal_False; + maFrameData.mbDragFull = false; maFrameData.mnHitTest = 0; maFrameData.mnPinState = 0; maFrameData.mnCloseState = 0; @@ -1432,7 +1432,7 @@ ImplStdBorderWindowView::ImplStdBorderWindowView( ImplBorderWindow* pBorderWindo maFrameData.mnMenuState = 0; maFrameData.mnHideState = 0; maFrameData.mnHelpState = 0; - maFrameData.mbTitleClipped = 0; + maFrameData.mbTitleClipped = false; mpATitleVirDev = NULL; mpDTitleVirDev = NULL; @@ -1448,21 +1448,21 @@ ImplStdBorderWindowView::~ImplStdBorderWindowView() // ----------------------------------------------------------------------- -sal_Bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) +bool ImplStdBorderWindowView::MouseMove( const MouseEvent& rMEvt ) { return ImplMouseMove( &maFrameData, rMEvt ); } // ----------------------------------------------------------------------- -sal_Bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) +bool ImplStdBorderWindowView::MouseButtonDown( const MouseEvent& rMEvt ) { return ImplMouseButtonDown( &maFrameData, rMEvt ); } // ----------------------------------------------------------------------- -sal_Bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) +bool ImplStdBorderWindowView::Tracking( const TrackingEvent& rTEvt ) { return ImplTracking( &maFrameData, rTEvt ); } @@ -1545,7 +1545,7 @@ void ImplStdBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHeigh if ( pBorderWindow->GetStyle() & WB_PINABLE ) { Image aImage; - ImplGetPinImage( 0, 0, aImage ); + ImplGetPinImage( 0, false, aImage ); pData->maPinRect.Top() = nItemTop; pData->maPinRect.Bottom() = nItemBottom; pData->maPinRect.Left() = nLeft; @@ -1868,14 +1868,14 @@ void ImplBorderWindow::ImplInit( Window* pParent, nStyle &= nTestStyle; mpWindowImpl->mbBorderWin = true; - mbSmallOutBorder = sal_False; + mbSmallOutBorder = false; if ( nTypeStyle & BORDERWINDOW_STYLE_FRAME ) { if( (nStyle & WB_SYSTEMCHILDWINDOW) ) { mpWindowImpl->mbOverlapWin = true; mpWindowImpl->mbFrame = true; - mbFrameBorder = sal_False; + mbFrameBorder = false; } else if( (nStyle & (WB_OWNERDRAWDECORATION | WB_POPUP)) ) { @@ -1887,24 +1887,24 @@ void ImplBorderWindow::ImplInit( Window* pParent, { mpWindowImpl->mbOverlapWin = true; mpWindowImpl->mbFrame = true; - mbFrameBorder = sal_False; + mbFrameBorder = false; // closeable windows may have a border as well, eg. system floating windows without caption if ( (nOrgStyle & (WB_BORDER | WB_NOBORDER | WB_MOVEABLE | WB_SIZEABLE/* | WB_CLOSEABLE*/)) == WB_BORDER ) - mbSmallOutBorder = sal_True; + mbSmallOutBorder = true; } } else if ( nTypeStyle & BORDERWINDOW_STYLE_OVERLAP ) { mpWindowImpl->mbOverlapWin = true; - mbFrameBorder = sal_True; + mbFrameBorder = true; } else - mbFrameBorder = sal_False; + mbFrameBorder = false; if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) - mbFloatWindow = sal_True; + mbFloatWindow = true; else - mbFloatWindow = sal_False; + mbFloatWindow = false; Window::ImplInit( pParent, nStyle, pSystemParentData ); SetBackground(); @@ -1917,12 +1917,12 @@ void ImplBorderWindow::ImplInit( Window* pParent, mnMaxHeight = SHRT_MAX; mnRollHeight = 0; mnOrgMenuHeight = 0; - mbPined = sal_False; - mbRollUp = sal_False; - mbMenuHide = sal_False; - mbDockBtn = sal_False; - mbMenuBtn = sal_False; - mbHideBtn = sal_False; + mbPined = false; + mbRollUp = false; + mbMenuHide = false; + mbDockBtn = false; + mbMenuBtn = false; + mbHideBtn = false; mbDisplayActive = IsActive(); if ( nTypeStyle & BORDERWINDOW_STYLE_FLOAT ) @@ -1996,7 +1996,7 @@ void ImplBorderWindow::Draw( const Rectangle&, OutputDevice* pOutDev, const Poin void ImplBorderWindow::Activate() { - SetDisplayActive( sal_True ); + SetDisplayActive( true ); Window::Activate(); } @@ -2007,7 +2007,7 @@ void ImplBorderWindow::Deactivate() // remove active windows from the ruler, also ignore the Deactivate // if a menu becomes active if ( GetActivateMode() && !ImplGetSVData()->maWinData.mbNoDeactivate ) - SetDisplayActive( sal_False ); + SetDisplayActive( false ); Window::Deactivate(); } @@ -2121,7 +2121,7 @@ void ImplBorderWindow::DataChanged( const DataChangedEvent& rDCEvt ) (rDCEvt.GetFlags() & SETTINGS_STYLE)) ) { if ( !mpWindowImpl->mbFrame || (GetStyle() & (WB_OWNERDRAWDECORATION | WB_POPUP)) ) - UpdateView( sal_True, ImplGetWindow()->GetOutputSizePixel() ); + UpdateView( true, ImplGetWindow()->GetOutputSizePixel() ); } Window::DataChanged( rDCEvt ); @@ -2150,7 +2150,7 @@ void ImplBorderWindow::InitView() // ----------------------------------------------------------------------- -void ImplBorderWindow::UpdateView( sal_Bool bNewView, const Size& rNewOutSize ) +void ImplBorderWindow::UpdateView( bool bNewView, const Size& rNewOutSize ) { sal_Int32 nLeftBorder; sal_Int32 nTopBorder; @@ -2226,7 +2226,7 @@ void ImplBorderWindow::InvalidateBorder() // ----------------------------------------------------------------------- -void ImplBorderWindow::SetDisplayActive( sal_Bool bActive ) +void ImplBorderWindow::SetDisplayActive( bool bActive ) { if ( mbDisplayActive != bActive ) { @@ -2241,7 +2241,7 @@ void ImplBorderWindow::SetDisplayActive( sal_Bool bActive ) void ImplBorderWindow::SetTitleType( sal_uInt16 nTitleType, const Size& rSize ) { mnTitleType = nTitleType; - UpdateView( sal_False, rSize ); + UpdateView( false, rSize ); } // ----------------------------------------------------------------------- @@ -2251,13 +2251,13 @@ void ImplBorderWindow::SetBorderStyle( sal_uInt16 nStyle ) if ( !mbFrameBorder && (mnBorderStyle != nStyle) ) { mnBorderStyle = nStyle; - UpdateView( sal_False, ImplGetWindow()->GetOutputSizePixel() ); + UpdateView( false, ImplGetWindow()->GetOutputSizePixel() ); } } // ----------------------------------------------------------------------- -void ImplBorderWindow::SetPin( sal_Bool bPin ) +void ImplBorderWindow::SetPin( bool bPin ) { mbPined = bPin; InvalidateBorder(); @@ -2265,11 +2265,11 @@ void ImplBorderWindow::SetPin( sal_Bool bPin ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetRollUp( sal_Bool bRollUp, const Size& rSize ) +void ImplBorderWindow::SetRollUp( bool bRollUp, const Size& rSize ) { mbRollUp = bRollUp; mnRollHeight = rSize.Height(); - UpdateView( sal_False, rSize ); + UpdateView( false, rSize ); } // ----------------------------------------------------------------------- @@ -2284,7 +2284,7 @@ void ImplBorderWindow::SetCloser() // ----------------------------------------------------------------------- -void ImplBorderWindow::SetDockButton( sal_Bool bDockButton ) +void ImplBorderWindow::SetDockButton( bool bDockButton ) { mbDockBtn = bDockButton; Size aSize = GetOutputSizePixel(); @@ -2294,7 +2294,7 @@ void ImplBorderWindow::SetDockButton( sal_Bool bDockButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetHideButton( sal_Bool bHideButton ) +void ImplBorderWindow::SetHideButton( bool bHideButton ) { mbHideBtn = bHideButton; Size aSize = GetOutputSizePixel(); @@ -2304,7 +2304,7 @@ void ImplBorderWindow::SetHideButton( sal_Bool bHideButton ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetMenuButton( sal_Bool bMenuButton ) +void ImplBorderWindow::SetMenuButton( bool bMenuButton ) { mbMenuBtn = bMenuButton; Size aSize = GetOutputSizePixel(); @@ -2331,7 +2331,7 @@ void ImplBorderWindow::SetMenuBarWindow( Window* pWindow ) // ----------------------------------------------------------------------- -void ImplBorderWindow::SetMenuBarMode( sal_Bool bHide ) +void ImplBorderWindow::SetMenuBarMode( bool bHide ) { mbMenuHide = bHide; UpdateMenuHeight(); diff --git a/vcl/source/window/btndlg.cxx b/vcl/source/window/btndlg.cxx index af5bead656c2..9bc6a3eedccf 100644 --- a/vcl/source/window/btndlg.cxx +++ b/vcl/source/window/btndlg.cxx @@ -42,7 +42,7 @@ void ButtonDialog::ImplInitButtonDialogData() mnButtonSize = 0; mnCurButtonId = 0; mnFocusButtonId = BUTTONDIALOG_BUTTON_NOTFOUND; - mbFormat = sal_True; + mbFormat = true; } ButtonDialog::ButtonDialog( WindowType nType ) : @@ -204,7 +204,7 @@ void ButtonDialog::ImplPosControls() SetOutputSizePixel( aDlgSize ); - mbFormat = sal_False; + mbFormat = false; } IMPL_LINK( ButtonDialog, ImplClickHdl, PushButton*, pBtn ) @@ -285,7 +285,7 @@ void ButtonDialog::AddButton( const OUString& rText, sal_uInt16 nId, if ( nBtnFlags & BUTTONDIALOG_FOCUSBUTTON ) mnFocusButtonId = nId; - mbFormat = sal_True; + mbFormat = true; } void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId, @@ -318,7 +318,7 @@ void ButtonDialog::AddButton( StandardButtonType eType, sal_uInt16 nId, maItemList.push_back(pItem); - mbFormat = sal_True; + mbFormat = true; } void ButtonDialog::RemoveButton( sal_uInt16 nId ) @@ -353,7 +353,7 @@ void ButtonDialog::Clear() } maItemList.clear(); - mbFormat = sal_True; + mbFormat = true; } sal_uInt16 ButtonDialog::GetButtonId( sal_uInt16 nButton ) const @@ -381,7 +381,7 @@ void ButtonDialog::SetButtonText( sal_uInt16 nId, const OUString& rText ) if ( pItem ) { pItem->mpPushButton->SetText( rText ); - mbFormat = sal_True; + mbFormat = true; } } diff --git a/vcl/source/window/decoview.cxx b/vcl/source/window/decoview.cxx index 37c6b8c4b5da..169aeb2dea96 100644 --- a/vcl/source/window/decoview.cxx +++ b/vcl/source/window/decoview.cxx @@ -841,7 +841,7 @@ void DecorationView::DrawSymbol( const Rectangle& rRect, SymbolType eType, const Color aOldFillColor = mpOutDev->GetFillColor(); const bool bOldMapMode = mpOutDev->IsMapModeEnabled(); Color nColor(rColor); - mpOutDev->EnableMapMode( sal_False ); + mpOutDev->EnableMapMode( false ); if ( (rStyleSettings.GetOptions() & STYLE_OPTION_MONO) || (mpOutDev->GetOutDevType() == OUTDEV_PRINTER) ) @@ -945,11 +945,11 @@ void DecorationView::DrawHighlightFrame( const Rectangle& rRect, Rectangle DecorationView::DrawFrame( const Rectangle& rRect, sal_uInt16 nStyle ) { Rectangle aRect = rRect; - sal_Bool bOldMap = mpOutDev->IsMapModeEnabled(); + bool bOldMap = mpOutDev->IsMapModeEnabled(); if ( bOldMap ) { aRect = mpOutDev->LogicToPixel( aRect ); - mpOutDev->EnableMapMode( sal_False ); + mpOutDev->EnableMapMode( false ); } if ( !rRect.IsEmpty() ) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index d9b66f3053c3..e2a18ba7f977 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -356,10 +356,10 @@ void Dialog::ImplInitDialogData() mpWindowImpl->mbDialog = true; mpDialogParent = NULL; mpPrevExecuteDlg = NULL; - mbInExecute = sal_False; - mbOldSaveBack = sal_False; - mbInClose = sal_False; - mbModalMode = sal_False; + mbInExecute = false; + mbOldSaveBack = false; + mbInClose = false; + mbModalMode = false; mpContentArea = NULL; mpActionArea = NULL; mbIsCalculatingInitialLayoutSize = false; @@ -401,7 +401,7 @@ void Dialog::ImplInit( Window* pParent, WinBits nStyle ) while ( pExeDlg ) { // only if visible and enabled - if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, sal_True ) && + if ( pParent->ImplGetFirstOverlapWindow()->IsWindowOrChild( pExeDlg, true ) && pExeDlg->IsReallyVisible() && pExeDlg->IsEnabled() && pExeDlg->IsInputEnabled() && !pExeDlg->IsInModalMode() ) { @@ -467,7 +467,7 @@ void Dialog::ImplInitSettings() else if( IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_DIALOG ) ) { mpWindowImpl->mnNativeBackground = PART_BACKGROUND_DIALOG; - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); } // fallback to settings color else @@ -627,8 +627,8 @@ bool Dialog::Notify( NotifyEvent& rNEvt ) if( mbInExecute && mbModalMode ) { // do not change modal counter (pSVData->maAppData.mnModalDialog) - SetModalInputMode( sal_False ); - SetModalInputMode( sal_True ); + SetModalInputMode( false ); + SetModalInputMode( true ); // #93022# def-button might have changed after show if( !mnMousePositioned ) @@ -753,23 +753,23 @@ void Dialog::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -sal_Bool Dialog::Close() +bool Dialog::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDead() ) - return sal_False; + return false; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() && !IsInExecute() ) - return sal_False; + return false; - mbInClose = sal_True; + mbInClose = true; if ( !(GetStyle() & WB_CLOSEABLE) ) { - sal_Bool bRet = sal_True; + bool bRet = true; ImplAddDel( &aDelData ); PushButton* pButton = ImplGetCancelButton( this ); if ( pButton ) @@ -780,10 +780,10 @@ sal_Bool Dialog::Close() if ( pButton ) pButton->Click(); else - bRet = sal_False; + bRet = false; } if ( aDelData.IsDead() ) - return sal_True; + return true; ImplRemoveDel( &aDelData ); return bRet; } @@ -791,19 +791,19 @@ sal_Bool Dialog::Close() if ( IsInExecute() ) { EndDialog( sal_False ); - mbInClose = sal_False; - return sal_True; + mbInClose = false; + return true; } else { - mbInClose = sal_False; + mbInClose = false; return SystemWindow::Close(); } } // ----------------------------------------------------------------------- -sal_Bool Dialog::ImplStartExecuteModal() +bool Dialog::ImplStartExecuteModal() { if ( mbInExecute ) { @@ -813,7 +813,7 @@ sal_Bool Dialog::ImplStartExecuteModal() aErrorStr.append(ImplGetDialogText(this)); OSL_FAIL(aErrorStr.getStr()); #endif - return sal_False; + return false; } switch ( Application::GetDialogCancelMode() ) @@ -825,7 +825,7 @@ sal_Bool Dialog::ImplStartExecuteModal() "vcl", "Dialog \"" << ImplGetDialogText(this).getStr() << "\"cancelled in silent mode"); - return sal_False; + return false; default: assert(false); // this cannot happen // fall through @@ -859,15 +859,15 @@ sal_Bool Dialog::ImplStartExecuteModal() pSVData->maWinData.mpTrackWin->EndTracking( ENDTRACK_CANCEL ); if ( pSVData->maWinData.mpCaptureWin ) pSVData->maWinData.mpCaptureWin->ReleaseMouse(); - EnableInput( true, sal_True ); + EnableInput( true, true ); if ( GetParent() ) { NotifyEvent aNEvt( EVENT_EXECUTEDIALOG, this ); GetParent()->Notify( aNEvt ); } - mbInExecute = sal_True; - SetModalInputMode( sal_True ); + mbInExecute = true; + SetModalInputMode( true ); mbOldSaveBack = IsSaveBackgroundEnabled(); EnableSaveBackground(); @@ -877,7 +877,7 @@ sal_Bool Dialog::ImplStartExecuteModal() Show(); pSVData->maAppData.mnModalMode++; - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1007,7 +1007,7 @@ void Dialog::EndDialog( long nResult ) { if ( mbInExecute ) { - SetModalInputMode( sal_False ); + SetModalInputMode( false ); // remove dialog from the list of dialogs which are being executed ImplSVData* pSVData = ImplGetSVData(); @@ -1055,7 +1055,7 @@ void Dialog::EndDialog( long nResult ) mpDialogImpl->mbStartedModal = false; mpDialogImpl->mnResult = -1; } - mbInExecute = sal_False; + mbInExecute = false; } } @@ -1076,7 +1076,7 @@ void Dialog::EndAllDialogs( Window* pParent ) while ( pModDialog ) { pTempModDialog = pModDialog->mpPrevExecuteDlg; - if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, sal_True ) ) ) + if( !pParent || ( pParent && pParent->IsWindowOrChild( pModDialog, true ) ) ) { pModDialog->EndDialog( sal_False ); pModDialog->PostUserEvent( Link() ); @@ -1087,7 +1087,7 @@ void Dialog::EndAllDialogs( Window* pParent ) // ----------------------------------------------------------------------- -void Dialog::SetModalInputMode( sal_Bool bModal ) +void Dialog::SetModalInputMode( bool bModal ) { if ( bModal == mbModalMode ) return; @@ -1101,8 +1101,8 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) // Diable the prev Modal Dialog, because our dialog must close at first, // before the other dialog can be closed (because the other dialog // is on stack since our dialog returns) - if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) ) - mpPrevExecuteDlg->EnableInput( false, sal_True, sal_True, this ); + if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, true ) ) + mpPrevExecuteDlg->EnableInput( false, true, true, this ); // determine next overlap dialog parent Window* pParent = GetParent(); @@ -1129,9 +1129,9 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) } // Enable the prev Modal Dialog - if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, sal_True ) ) + if ( mpPrevExecuteDlg && !mpPrevExecuteDlg->IsWindowOrChild( this, true ) ) { - mpPrevExecuteDlg->EnableInput( true, sal_True, sal_True, this ); + mpPrevExecuteDlg->EnableInput( true, true, true, this ); // ensure continued modality of prev dialog // do not change modality counter @@ -1144,10 +1144,10 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) if( pPrevModalDlg && ( pPrevModalDlg == mpPrevExecuteDlg - || !pPrevModalDlg->IsWindowOrChild( this, sal_True ) ) ) + || !pPrevModalDlg->IsWindowOrChild( this, true ) ) ) { - mpPrevExecuteDlg->SetModalInputMode( sal_False ); - mpPrevExecuteDlg->SetModalInputMode( sal_True ); + mpPrevExecuteDlg->SetModalInputMode( false ); + mpPrevExecuteDlg->SetModalInputMode( true ); } } } @@ -1155,7 +1155,7 @@ void Dialog::SetModalInputMode( sal_Bool bModal ) // ----------------------------------------------------------------------- -void Dialog::SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs ) +void Dialog::SetModalInputMode( bool bModal, bool bSubModalDialogs ) { if ( bSubModalDialogs ) { @@ -1164,7 +1164,7 @@ void Dialog::SetModalInputMode( sal_Bool bModal, sal_Bool bSubModalDialogs ) while ( pOverlap ) { if ( pOverlap->IsDialog() ) - ((Dialog*)pOverlap)->SetModalInputMode( bModal, sal_True ); + ((Dialog*)pOverlap)->SetModalInputMode( bModal, true ); pOverlap = pOverlap->mpWindowImpl->mpNext; } } @@ -1237,7 +1237,7 @@ void Dialog::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, sal ImplBorderWindow aImplWin( this, WB_BORDER|WB_STDWORK, BORDERWINDOW_STYLE_OVERLAP ); aImplWin.SetText( GetText() ); aImplWin.setPosSizePixel( aPos.X(), aPos.Y(), aSize.Width(), aSize.Height() ); - aImplWin.SetDisplayActive( sal_True ); + aImplWin.SetDisplayActive( true ); aImplWin.InitView(); aImplWin.Draw( Rectangle( aPos, aSize ), pDev, aPos ); diff --git a/vcl/source/window/dlgctrl.cxx b/vcl/source/window/dlgctrl.cxx index b4ac50f920e4..0fc9c9617f89 100644 --- a/vcl/source/window/dlgctrl.cxx +++ b/vcl/source/window/dlgctrl.cxx @@ -151,7 +151,7 @@ static Window* ImplGetSubChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& // ----------------------------------------------------------------------- -static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable ) +static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) { pParent = ImplGetTopParentOfTabHierarchy( pParent ); @@ -185,7 +185,7 @@ static Window* ImplGetChildWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nI // ----------------------------------------------------------------------- -static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, sal_Bool bTestEnable ) +static Window* ImplGetNextWindow( Window* pParent, sal_uInt16 n, sal_uInt16& nIndex, bool bTestEnable ) { Window* pWindow = ImplGetChildWindow( pParent, n+1, nIndex, bTestEnable ); if ( n == nIndex ) @@ -219,7 +219,7 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, i--; else i = nFormEnd; - pWindow = ImplGetChildWindow( this, i, nTemp, sal_True ); + pWindow = ImplGetChildWindow( this, i, nTemp, true ); if ( !pWindow ) break; if ( (i == nTemp) && (pWindow->GetStyle() & WB_TABSTOP) ) @@ -239,12 +239,12 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, { if ( i < nFormEnd ) { - pWindow = ImplGetNextWindow( this, i, i, sal_True ); + pWindow = ImplGetNextWindow( this, i, i, true ); if ( (i > nFormEnd) || (i < nFormStart) ) - pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( this, nFormStart, i, true ); } else - pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( this, nFormStart, i, true ); } if ( i <= nFormEnd ) @@ -264,9 +264,9 @@ Window* Window::ImplGetDlgWindow( sal_uInt16 nIndex, sal_uInt16 nType, } nOldIndex = i; if ( (i > nFormEnd) || (i < nFormStart) ) - pWindow = ImplGetChildWindow( this, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( this, nFormStart, i, true ); else - pWindow = ImplGetNextWindow( this, i, i, sal_True ); + pWindow = ImplGetNextWindow( this, i, i, true ); } while ( (i != nStartIndex) && (i != nStartIndex2) ); @@ -317,7 +317,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt sal_uInt16 nFormEnd; // Focus-Fenster in der Child-Liste suchen - Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, sal_False ); + Window* pFirstChildWindow = pSWindow = ImplGetChildWindow( pParent, 0, i, false ); if( pWindow == NULL ) pWindow = pSWindow; @@ -340,7 +340,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt break; } - pSWindow = ImplGetNextWindow( pParent, i, i, sal_False ); + pSWindow = ImplGetNextWindow( pParent, i, i, false ); if ( !i ) pSWindow = NULL; } @@ -370,7 +370,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt do { nFormEnd = i; - pTempWindow = ImplGetNextWindow( pParent, i, i, sal_False ); + pTempWindow = ImplGetNextWindow( pParent, i, i, false ); // the DialogControlStart mark is only accepted for the direct children if ( !i @@ -403,7 +403,7 @@ static Window* ImplFindDlgCtrlWindow( Window* pParent, Window* pWindow, sal_uInt // ----------------------------------------------------------------------- static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Unicode cCharCode, - sal_uInt16 nFormStart, sal_uInt16 nFormEnd, sal_Bool bCheckEnable = sal_True ) + sal_uInt16 nFormStart, sal_uInt16 nFormEnd, bool bCheckEnable = true ) { DBG_ASSERT( (rIndex >= nFormStart) && (rIndex <= nFormEnd), "Window::ImplFindAccelWindow() - rIndex not in Form" ); @@ -422,9 +422,9 @@ static Window* ImplFindAccelWindow( Window* pParent, sal_uInt16& rIndex, sal_Uni cCharCode = xCharClass->toUpper( OUString(cCharCode), 0, 1, rLocale )[0]; if ( i < nFormEnd ) - pWindow = ImplGetNextWindow( pParent, i, i, sal_True ); + pWindow = ImplGetNextWindow( pParent, i, i, true ); else - pWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_True ); + pWindow = ImplGetChildWindow( pParent, nFormStart, i, true ); while( pWindow ) { const OUString aStr = pWindow->GetText(); @@ -501,7 +501,7 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) if ( GetType() == WINDOW_RADIOBUTTON ) { if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( sal_True, nFlags ); + ((RadioButton*)this)->ImplCallClick( true, nFlags ); else ImplGrabFocus( nFlags ); } @@ -514,8 +514,8 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) ((CheckBox*)this)->ImplCheck(); else if ( mpWindowImpl->mbPushButton ) { - ((PushButton*)this)->SetPressed( sal_True ); - ((PushButton*)this)->SetPressed( sal_False ); + ((PushButton*)this)->SetPressed( true ); + ((PushButton*)this)->SetPressed( false ); ((PushButton*)this)->Click(); } } @@ -526,7 +526,7 @@ void Window::ImplControlFocus( sal_uInt16 nFlags ) if ( GetType() == WINDOW_RADIOBUTTON ) { if ( !((RadioButton*)this)->IsChecked() ) - ((RadioButton*)this)->ImplCallClick( sal_True, nFlags ); + ((RadioButton*)this)->ImplCallClick( true, nFlags ); else ImplGrabFocus( nFlags ); } @@ -600,7 +600,7 @@ namespace } } -sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) +bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, bool bKeyInput ) { KeyCode aKeyCode = rKEvt.GetKeyCode(); sal_uInt16 nKeyCode = aKeyCode.GetCode(); @@ -619,13 +619,13 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) // Ohne Focus-Window koennen wir auch keine Steuerung uebernehmen Window* pFocusWindow = Application::GetFocusWindow(); if ( !pFocusWindow || !ImplIsWindowOrChild( pFocusWindow ) ) - return sal_False; + return false; // Focus-Fenster in der Child-Liste suchen pSWindow = ::ImplFindDlgCtrlWindow( this, pFocusWindow, nIndex, nFormStart, nFormEnd ); if ( !pSWindow ) - return sal_False; + return false; i = nIndex; nDlgCtrlFlags = 0; @@ -644,7 +644,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( nKeyCode == KEY_RETURN ) { // Wir suchen zuerst nach einem DefPushButton/CancelButton - pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True ); + pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, true ); iButtonStart = iButton; while ( pButtonWindow ) { @@ -652,7 +652,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) pButtonWindow->mpWindowImpl->mbPushButton ) break; - pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True ); + pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true ); if ( (iButton <= iButtonStart) || (iButton > nFormEnd) ) pButtonWindow = NULL; } @@ -691,7 +691,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) nGetFocusFlags |= GETFOCUS_AROUND; } pTempWindow->ImplControlFocus( nGetFocusFlags ); - return sal_True; + return true; } else { @@ -713,21 +713,21 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->GetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = 0; - return sal_True; + return true; } } } else if ( nKeyCode == KEY_ESCAPE ) { // Wir suchen zuerst nach einem DefPushButton/CancelButton - pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, sal_True ); + pButtonWindow = ImplGetChildWindow( this, nFormStart, iButton, true ); iButtonStart = iButton; while ( pButtonWindow ) { if ( pButtonWindow->GetType() == WINDOW_CANCELBUTTON ) break; - pButtonWindow = ImplGetNextWindow( this, iButton, iButton, sal_True ); + pButtonWindow = ImplGetNextWindow( this, iButton, iButton, true ); if ( (iButton <= iButtonStart) || (iButton > nFormEnd) ) pButtonWindow = NULL; } @@ -736,9 +736,9 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; - return sal_True; + return true; } } } @@ -761,7 +761,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) // Gruppe suchen Window* pFormularFirstWindow = NULL; Window* pLastFormularFirstWindow = NULL; - pTempWindow = ImplGetChildWindow( this, 0, iTemp, sal_False ); + pTempWindow = ImplGetChildWindow( this, 0, iTemp, false ); Window* pPrevFirstFormularFirstWindow = NULL; Window* pFirstFormularFirstWindow = pTempWindow; while ( pTempWindow ) @@ -784,7 +784,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) pLastFormularFirstWindow = pTempWindow; } - pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, sal_False ); + pTempWindow = ImplGetNextWindow( this, iTemp, iTemp, false ); if ( !iTemp ) pTempWindow = NULL; } @@ -810,7 +810,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( pFormularFirstWindow ) { pFormularFirstWindow->ImplControlFocus(); - return sal_True; + return true; } } } @@ -846,7 +846,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( !ImplCallPreNotify( aNEvt2 ) ) pSWindow->GetFocus(); pSWindow->mpWindowImpl->mnGetFocusFlags = 0; - return sal_True; + return true; } else if ( pWindow ) { @@ -862,7 +862,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) nGetFocusFlags |= GETFOCUS_AROUND; } pWindow->ImplControlFocus( nGetFocusFlags ); - return sal_True; + return true; } } } @@ -888,7 +888,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { if ( pWindow != pSWindow ) pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD ); - return sal_True; + return true; } if ( nStyle & WB_GROUP ) @@ -918,7 +918,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if (isSuitableDestination(pWindow)) { pWindow->ImplControlFocus( GETFOCUS_CURSOR | GETFOCUS_BACKWARD ); - return sal_True; + return true; } pWindow = nextLogicalChildOfParent(this, pWindow); @@ -937,7 +937,7 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) if ( pSWindow == ::ImplFindAccelWindow( this, i, c, nFormStart, nFormEnd ) ) nGetFocusFlags |= GETFOCUS_UNIQUEMNEMONIC; pSWindow->ImplControlFocus( nGetFocusFlags ); - return sal_True; + return true; } } } @@ -949,30 +949,30 @@ sal_Bool Window::ImplDlgCtrl( const KeyEvent& rKEvt, sal_Bool bKeyInput ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && (mpWindowImpl->mpDlgCtrlDownWindow != pButtonWindow) ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } - ((PushButton*)pButtonWindow)->SetPressed( sal_True ); + ((PushButton*)pButtonWindow)->SetPressed( true ); mpWindowImpl->mpDlgCtrlDownWindow = pButtonWindow; } else if ( mpWindowImpl->mpDlgCtrlDownWindow == pButtonWindow ) { mpWindowImpl->mpDlgCtrlDownWindow = NULL; - ((PushButton*)pButtonWindow)->SetPressed( sal_False ); + ((PushButton*)pButtonWindow)->SetPressed( false ); ((PushButton*)pButtonWindow)->Click(); } - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- // checks if this window has dialog control -sal_Bool Window::ImplHasDlgCtrl() +bool Window::ImplHasDlgCtrl() { Window* pDlgCtrlParent; @@ -984,9 +984,9 @@ sal_Bool Window::ImplHasDlgCtrl() pDlgCtrlParent = pDlgCtrlParent->ImplGetParent(); if ( !pDlgCtrlParent || ((pDlgCtrlParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) != WB_DIALOGCONTROL) ) - return sal_False; + return false; else - return sal_True; + return true; } void Window::ImplDlgCtrlNextWindow() @@ -1023,7 +1023,7 @@ if ( !pDlgCtrlParent || (GetStyle() & WB_NODIALOGCONTROL) || ((pDlgCtrlParent->G // ----------------------------------------------------------------------- static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, - sal_Bool bGetFocus ) + bool bGetFocus ) { PushButton* pOldDefButton = NULL; PushButton* pNewDefButton = NULL; @@ -1040,7 +1040,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, nFormEnd = 0xFFFF; } - pSWindow = ImplGetChildWindow( pParent, nFormStart, i, sal_False ); + pSWindow = ImplGetChildWindow( pParent, nFormStart, i, false ); while ( pSWindow ) { if ( pSWindow->ImplIsPushButton() ) @@ -1054,7 +1054,7 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, pNewDefButton = pPushButton; } - pSWindow = ImplGetNextWindow( pParent, i, i, sal_False ); + pSWindow = ImplGetNextWindow( pParent, i, i, false ); if ( !i || (i > nFormEnd) ) pSWindow = NULL; } @@ -1073,19 +1073,19 @@ static void ImplDlgCtrlUpdateDefButton( Window* pParent, Window* pFocusWindow, if ( pOldDefButton != pNewDefButton ) { if ( pOldDefButton ) - pOldDefButton->ImplSetDefButton( sal_False ); + pOldDefButton->ImplSetDefButton( false ); if ( pNewDefButton ) - pNewDefButton->ImplSetDefButton( sal_True ); + pNewDefButton->ImplSetDefButton( true ); } } // ----------------------------------------------------------------------- -void Window::ImplDlgCtrlFocusChanged( Window* pWindow, sal_Bool bGetFocus ) +void Window::ImplDlgCtrlFocusChanged( Window* pWindow, bool bGetFocus ) { if ( mpWindowImpl->mpDlgCtrlDownWindow && !bGetFocus ) { - ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( sal_False ); + ((PushButton*)mpWindowImpl->mpDlgCtrlDownWindow)->SetPressed( false ); mpWindowImpl->mpDlgCtrlDownWindow = NULL; } @@ -1162,7 +1162,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window nAccel, nFormStart, nFormEnd, - sal_False ); + false ); } else { @@ -1174,7 +1174,7 @@ static Window* ImplGetLabelFor( Window* pFrameWindow, WindowType nMyType, Window pSWindow = ::ImplGetChildWindow( pFrameWindow, nIndex, nIndex, - sal_False ); + false ); if( pSWindow && isVisibleInLayout(pSWindow) && ! (pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); @@ -1257,7 +1257,7 @@ static Window* ImplGetLabeledBy( Window* pFrameWindow, WindowType nMyType, Windo pSWindow = ::ImplGetChildWindow( pFrameWindow, nSearchIndex, nFoundIndex, - sal_False ); + false ); if( pSWindow && isVisibleInLayout(pSWindow) && !(pSWindow->GetStyle() & WB_NOLABEL) ) { WindowType nType = pSWindow->GetType(); @@ -1348,7 +1348,7 @@ Window* Window::getLegacyNonLayoutAccessibleRelationMemberOf() const pSWindow = ::ImplGetChildWindow( pFrameWindow, nSearchIndex, nFoundIndex, - sal_False ); + false ); if( pSWindow && pSWindow->IsVisible() && ( pSWindow->GetType() == WINDOW_FIXEDLINE || pSWindow->GetType() == WINDOW_GROUPBOX ) ) @@ -1390,7 +1390,7 @@ KeyEvent Window::GetActivationKey() const nCode = KEY_POINT; else if( nAccel == '-' ) nCode = KEY_SUBTRACT; - KeyCode aKeyCode( nCode, sal_False, sal_False, sal_True, sal_False ); + KeyCode aKeyCode( nCode, false, false, true, false ); aKeyEvent = KeyEvent( nAccel, aKeyCode ); } return aKeyEvent; diff --git a/vcl/source/window/dndlcon.cxx b/vcl/source/window/dndlcon.cxx index cb79e140e7b4..130ee3d774b9 100644 --- a/vcl/source/window/dndlcon.cxx +++ b/vcl/source/window/dndlcon.cxx @@ -32,7 +32,7 @@ using namespace ::com::sun::star::datatransfer::dnd; DNDListenerContainer::DNDListenerContainer( sal_Int8 nDefaultActions ) : WeakComponentImplHelper4< XDragGestureRecognizer, XDropTargetDragContext, XDropTargetDropContext, XDropTarget >(GetMutex()) { - m_bActive = sal_True; + m_bActive = true; m_nDefaultActions = nDefaultActions; } diff --git a/vcl/source/window/dockingarea.cxx b/vcl/source/window/dockingarea.cxx index a1a18dbd8254..13bca4abecd9 100644 --- a/vcl/source/window/dockingarea.cxx +++ b/vcl/source/window/dockingarea.cxx @@ -140,7 +140,7 @@ void DockingAreaWindow::StateChanged( StateChangedType nType ) // ----------------------------------------------------------------------- -sal_Bool DockingAreaWindow::IsHorizontal() const +bool DockingAreaWindow::IsHorizontal() const { return ( mpImplData->meAlign == WINDOWALIGN_TOP || mpImplData->meAlign == WINDOWALIGN_BOTTOM ); } @@ -164,7 +164,7 @@ WindowAlign DockingAreaWindow::GetAlign() const void DockingAreaWindow::Paint( const Rectangle& ) { - EnableNativeWidget( sal_True ); // only required because the toolkit curently switches this flag off + EnableNativeWidget( true ); // only required because the toolkit curently switches this flag off if( IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL ) ) { ToolbarValue aControlValue; @@ -173,7 +173,7 @@ void DockingAreaWindow::Paint( const Rectangle& ) { // give NWF a hint that this dockingarea is adjacent to the menubar // useful for special gradient effects that should cover both windows - aControlValue.mbIsTopDockingArea = sal_True; + aControlValue.mbIsTopDockingArea = true; } ControlState nState = CTRL_STATE_ENABLED; diff --git a/vcl/source/window/dockmgr.cxx b/vcl/source/window/dockmgr.cxx index 6fd6295a2c7b..cb5fd3334170 100644 --- a/vcl/source/window/dockmgr.cxx +++ b/vcl/source/window/dockmgr.cxx @@ -73,7 +73,7 @@ public: virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); virtual void setPosSizePixel( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags = WINDOW_POSSIZE_ALL ); @@ -96,8 +96,8 @@ ImplDockFloatWin2::ImplDockFloatWin2( Window* pParent, WinBits nWinBits, { SetSettings( pDockingWin->GetWindow()->GetSettings() ); Enable( pDockingWin->GetWindow()->IsEnabled(), false ); - EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), sal_False ); - AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), sal_False ); + EnableInput( pDockingWin->GetWindow()->IsInputEnabled(), false ); + AlwaysEnableInput( pDockingWin->GetWindow()->IsAlwaysEnableInput(), false ); EnableAlwaysOnTop( pDockingWin->GetWindow()->IsAlwaysOnTopEnabled() ); SetActivateMode( pDockingWin->GetWindow()->GetActivateMode() ); } @@ -137,7 +137,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockTimerHdl) else if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, sal_False ); + mpDockWin->EndDocking( maDockRect, false ); } else { @@ -157,7 +157,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, EndDockTimerHdl) if( ! ( aState.mnState & ( MOUSE_LEFT | MOUSE_MIDDLE | MOUSE_RIGHT ) ) ) { mpDockWin->GetWindow()->GetParent()->ImplGetFrameWindow()->HideTracking(); - mpDockWin->EndDocking( maDockRect, sal_True ); + mpDockWin->EndDocking( maDockRect, true ); } else { @@ -219,7 +219,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin2, DockingHdl) if( ! mpDockWin->IsDocking() ) mpDockWin->StartDocking( aMousePos, maDockRect ); - sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); + bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { @@ -327,7 +327,7 @@ void ImplDockFloatWin2::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -sal_Bool ImplDockFloatWin2::Close() +bool ImplDockFloatWin2::Close() { return mpDockWin->Close(); } @@ -363,7 +363,7 @@ ImplDockingWindowWrapper* DockingManager::GetDockingWindowWrapper( const Window return NULL; } -sal_Bool DockingManager::IsDockable( const Window *pWindow ) +bool DockingManager::IsDockable( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); @@ -374,22 +374,22 @@ sal_Bool DockingManager::IsDockable( const Window *pWindow ) return (pWrapper != NULL); } -sal_Bool DockingManager::IsFloating( const Window *pWindow ) +bool DockingManager::IsFloating( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) return pWrapper->IsFloatingMode(); else - return sal_False; + return false; } -sal_Bool DockingManager::IsLocked( const Window *pWindow ) +bool DockingManager::IsLocked( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsLocked() ) - return sal_True; + return true; else - return sal_False; + return false; } void DockingManager::Lock( const Window *pWindow ) @@ -406,7 +406,7 @@ void DockingManager::Unlock( const Window *pWindow ) pWrapper->Unlock(); } -void DockingManager::SetFloatingMode( const Window *pWindow, sal_Bool bFloating ) +void DockingManager::SetFloatingMode( const Window *pWindow, bool bFloating ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper ) @@ -428,13 +428,13 @@ void DockingManager::StartPopupMode( ToolBox *pParentToolBox, const Window *pWin FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE ); } -sal_Bool DockingManager::IsInPopupMode( const Window *pWindow ) +bool DockingManager::IsInPopupMode( const Window *pWindow ) { ImplDockingWindowWrapper* pWrapper = GetDockingWindowWrapper( pWindow ); if( pWrapper && pWrapper->IsInPopupMode() ) - return sal_True; + return true; else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -669,9 +669,9 @@ void ImplPopupFloatWin::DrawBorder() void ImplPopupFloatWin::DrawGrip() { - sal_Bool bLinecolor = IsLineColor(); + bool bLinecolor = IsLineColor(); Color aLinecolor = GetLineColor(); - sal_Bool bFillcolor = IsFillColor(); + bool bFillcolor = IsFillColor(); Color aFillcolor = GetFillColor(); // draw background @@ -684,7 +684,7 @@ void ImplPopupFloatWin::DrawGrip() if( mbHighlight ) { Erase( aRect ); - DrawSelectionBackground( aRect, 2, sal_False, sal_True, sal_False ); + DrawSelectionBackground( aRect, 2, false, true, false ); } else { @@ -846,15 +846,15 @@ ImplDockingWindowWrapper::ImplDockingWindowWrapper( const Window *pWindow ) mpDockingWindow = (Window*) pWindow; mpParent = pWindow->GetParent(); - mbDockable = sal_True; - mbLocked = sal_False; + mbDockable = true; + mbLocked = false; mnFloatBits = WB_BORDER | WB_CLOSEABLE | WB_SIZEABLE | (pWindow->GetStyle() & DOCKWIN_FLOATSTYLES); DockingWindow *pDockWin = dynamic_cast< DockingWindow* > ( mpDockingWindow ); if( pDockWin ) mnFloatBits = pDockWin->GetFloatStyle(); // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = sal_False; + mbStartDockingEnabled = false; } ImplDockingWindowWrapper::~ImplDockingWindowWrapper() @@ -862,23 +862,23 @@ ImplDockingWindowWrapper::~ImplDockingWindowWrapper() if ( IsFloatingMode() ) { GetWindow()->Show( false, SHOW_NOFOCUSCHANGE ); - SetFloatingMode( sal_False ); + SetFloatingMode( false ); } } // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) +bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return sal_False; + return false; if( !mbStartDockingEnabled ) - return sal_False; + return false; maMouseOff = rPos; maMouseStart = maMouseOff; - mbDocking = sal_True; + mbDocking = true; mbLastFloatMode = IsFloatingMode(); mbStartFloat = mbLastFloatMode; @@ -922,7 +922,7 @@ sal_Bool ImplDockingWindowWrapper::ImplStartDocking( const Point& rPos ) GetWindow()->ImplGetFrameWindow()->ImplUpdateAll(); GetWindow()->StartTracking( STARTTRACK_KEYMOD ); - return sal_True; + return true; } // ======================================================================= @@ -933,13 +933,13 @@ void ImplDockingWindowWrapper::ImplInitData() //GetWindow()->mpWindowImpl->mbDockWin = sal_True; // TODO: must be eliminated mpFloatWin = NULL; - mbDockCanceled = sal_False; - mbFloatPrevented = sal_False; - mbDocking = sal_False; - mbPined = sal_False; - mbRollUp = sal_False; - mbDockBtn = sal_False; - mbHideBtn = sal_False; + mbDockCanceled = false; + mbFloatPrevented = false; + mbDocking = false; + mbPined = false; + mbRollUp = false; + mbDockBtn = false; + mbHideBtn = false; maMaxOutSize = Size( SHRT_MAX, SHRT_MAX ); } @@ -952,13 +952,13 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbDocking = sal_False; + mbDocking = false; GetWindow()->HideTracking(); if ( rTEvt.IsTrackingCanceled() ) { - mbDockCanceled = sal_True; + mbDockCanceled = true; EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); - mbDockCanceled = sal_False; + mbDockCanceled = false; } else EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); @@ -986,9 +986,9 @@ void ImplDockingWindowWrapper::Tracking( const TrackingEvent& rTEvt ) aPos.X() += maMouseOff.X(); aPos.Y() += maMouseOff.Y(); - sal_Bool bFloatMode = Docking( aPos, aTrackRect ); + bool bFloatMode = Docking( aPos, aTrackRect ); - mbFloatPrevented = sal_False; + mbFloatPrevented = false; if ( mbLastFloatMode != bFloatMode ) { if ( bFloatMode ) @@ -1042,12 +1042,12 @@ void ImplDockingWindowWrapper::StartDocking( const Point& rPoint, Rectangle& rRe DockingData data( rPoint, rRect, IsFloatingMode() ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_STARTDOCKING, &data ); - mbDocking = sal_True; + mbDocking = true; } // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) +bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRect ) { DockingData data( rPoint, rRect, IsFloatingMode() ); @@ -1058,7 +1058,7 @@ sal_Bool ImplDockingWindowWrapper::Docking( const Point& rPoint, Rectangle& rRec // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) +void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, bool bFloatMode ) { Rectangle aRect( rRect ); @@ -1091,15 +1091,15 @@ void ImplDockingWindowWrapper::EndDocking( const Rectangle& rRect, sal_Bool bFlo EndDockingData data( aRect, IsFloatingMode(), IsDockingCanceled() ); GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_ENDDOCKING, &data ); - mbDocking = sal_False; + mbDocking = false; // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = sal_False; + mbStartDockingEnabled = false; } // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() +bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() { sal_Bool bFloating = sal_True; GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_PREPARETOGGLEFLOATING, &bFloating ); @@ -1108,10 +1108,10 @@ sal_Bool ImplDockingWindowWrapper::PrepareToggleFloatingMode() // ----------------------------------------------------------------------- -sal_Bool ImplDockingWindowWrapper::Close() +bool ImplDockingWindowWrapper::Close() { // TODO: send event - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -1128,7 +1128,7 @@ void ImplDockingWindowWrapper::ToggleFloatingMode() GetWindow()->ImplCallEventListeners( VCLEVENT_WINDOW_TOGGLEFLOATING ); // must be enabled in Window::Notify to prevent permanent docking during mouse move - mbStartDockingEnabled = sal_False; + mbStartDockingEnabled = false; } // ----------------------------------------------------------------------- @@ -1182,7 +1182,7 @@ void ImplDockingWindowWrapper::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) +void ImplDockingWindowWrapper::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) { if ( mpFloatWin ) mpFloatWin->ShowTitleButton( nButton, bVisible ); @@ -1291,17 +1291,17 @@ IMPL_LINK_NOARG(ImplDockingWindowWrapper, PopupModeEnd) } -sal_Bool ImplDockingWindowWrapper::IsInPopupMode() const +bool ImplDockingWindowWrapper::IsInPopupMode() const { if( GetFloatingWindow() ) return GetFloatingWindow()->IsInPopupMode(); else - return sal_False; + return false; } // ----------------------------------------------------------------------- -void ImplDockingWindowWrapper::SetFloatingMode( sal_Bool bFloatMode ) +void ImplDockingWindowWrapper::SetFloatingMode( bool bFloatMode ) { // do nothing if window is docked and locked if( !IsFloatingMode() && IsLocked() ) @@ -1311,7 +1311,7 @@ void ImplDockingWindowWrapper::SetFloatingMode( sal_Bool bFloatMode ) { if ( PrepareToggleFloatingMode() ) { - sal_Bool bVisible = GetWindow()->IsVisible(); + bool bVisible = GetWindow()->IsVisible(); if ( bFloatMode ) { @@ -1478,7 +1478,7 @@ void ImplDockingWindowWrapper::SetMaxOutputSizePixel( const Size& rSize ) maMaxOutSize = rSize; } -sal_Bool ImplDockingWindowWrapper::IsFloatingMode() const +bool ImplDockingWindowWrapper::IsFloatingMode() const { return (mpFloatWin != NULL); } @@ -1496,7 +1496,7 @@ Rectangle ImplDockingWindowWrapper::GetDragArea() const void ImplDockingWindowWrapper::Lock() { - mbLocked = sal_True; + mbLocked = true; // only toolbars support locking ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() ); if( pToolBox ) @@ -1505,14 +1505,14 @@ void ImplDockingWindowWrapper::Lock() void ImplDockingWindowWrapper::Unlock() { - mbLocked = sal_False; + mbLocked = false; // only toolbars support locking ToolBox *pToolBox = dynamic_cast< ToolBox * >( GetWindow() ); if( pToolBox ) pToolBox->Lock( mbLocked ); } -sal_Bool ImplDockingWindowWrapper::IsLocked() const +bool ImplDockingWindowWrapper::IsLocked() const { return mbLocked; } diff --git a/vcl/source/window/dockwin.cxx b/vcl/source/window/dockwin.cxx index 4d852f7c86c4..3346751b751c 100644 --- a/vcl/source/window/dockwin.cxx +++ b/vcl/source/window/dockwin.cxx @@ -90,7 +90,7 @@ public: virtual void Roll(); virtual void PopupModeEnd(); virtual void Resizing( Size& rSize ); - virtual sal_Bool Close(); + virtual bool Close(); sal_uLong GetLastTicks() const { return mnLastTicks; } }; @@ -109,8 +109,8 @@ ImplDockFloatWin::ImplDockFloatWin( Window* pParent, WinBits nWinBits, { SetSettings( pDockingWin->GetSettings() ); Enable( pDockingWin->IsEnabled(), false ); - EnableInput( pDockingWin->IsInputEnabled(), sal_False ); - AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), sal_False ); + EnableInput( pDockingWin->IsInputEnabled(), false ); + AlwaysEnableInput( pDockingWin->IsAlwaysEnableInput(), false ); EnableAlwaysOnTop( pDockingWin->IsAlwaysOnTopEnabled() ); SetActivateMode( pDockingWin->GetActivateMode() ); } @@ -180,7 +180,7 @@ IMPL_LINK_NOARG(ImplDockFloatWin, DockingHdl) // mouse pos also in screen pixels Point aMousePos = mpDockWin->GetParent()->OutputToScreenPixel( aState.maPos ); - sal_Bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); + bool bFloatMode = mpDockWin->Docking( aMousePos, maDockRect ); if( ! bFloatMode ) { mpDockWin->GetParent()->ImplGetFrameWindow()->ShowTracking( maDockRect, SHOWTRACK_OBJECT | SHOWTRACK_WINDOW ); @@ -271,21 +271,21 @@ void ImplDockFloatWin::Resizing( Size& rSize ) // ----------------------------------------------------------------------- -sal_Bool ImplDockFloatWin::Close() +bool ImplDockFloatWin::Close() { return mpDockWin->Close(); } // ======================================================================= -sal_Bool DockingWindow::ImplStartDocking( const Point& rPos ) +bool DockingWindow::ImplStartDocking( const Point& rPos ) { if ( !mbDockable ) - return sal_False; + return false; maMouseOff = rPos; maMouseStart = maMouseOff; - mbDocking = sal_True; + mbDocking = true; mbLastFloatMode = IsFloatingMode(); mbStartFloat = mbLastFloatMode; @@ -318,17 +318,17 @@ sal_Bool DockingWindow::ImplStartDocking( const Point& rPos ) if ( GetSettings().GetStyleSettings().GetDragFullOptions() & DRAGFULL_OPTION_DOCKING && !( mnFloatBits & ( WB_MOVEABLE | WB_SIZEABLE | WB_CLOSEABLE ) ) ) // no full drag when migrating to system window - mbDragFull = sal_True; + mbDragFull = true; else { StartDocking(); - mbDragFull = sal_False; + mbDragFull = false; ImplUpdateAll(); ImplGetFrameWindow()->ImplUpdateAll(); } StartTracking( STARTTRACK_KEYMOD ); - return sal_True; + return true; } // ======================================================================= @@ -339,14 +339,14 @@ void DockingWindow::ImplInitDockingWindowData() mpWindowImpl->mbDockWin = true; mpFloatWin = NULL; - mbDockCanceled = sal_False; - mbDockPrevented = sal_False; - mbFloatPrevented = sal_False; - mbDocking = sal_False; - mbPined = sal_False; - mbRollUp = sal_False; - mbDockBtn = sal_False; - mbHideBtn = sal_False; + mbDockCanceled = false; + mbDockPrevented = false; + mbFloatPrevented = false; + mbDocking = false; + mbPined = false; + mbRollUp = false; + mbDockBtn = false; + mbHideBtn = false; } // ----------------------------------------------------------------------- @@ -424,8 +424,8 @@ void DockingWindow::ImplLoadRes( const ResId& rResId ) if ( nMask & RSC_DOCKINGWINDOW_FLOATING ) { - if ( (sal_Bool)ReadShortRes() ) - SetFloatingMode( sal_True ); + if ( ReadShortRes() != 0 ) + SetFloatingMode( true ); } } @@ -468,7 +468,7 @@ DockingWindow::~DockingWindow() if ( IsFloatingMode() ) { Show( false, SHOW_NOFOCUSCHANGE ); - SetFloatingMode( sal_False ); + SetFloatingMode( false ); } delete mpImplData; } @@ -484,7 +484,7 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbDocking = sal_False; + mbDocking = false; if ( mbDragFull ) { // Bei Abbruch alten Zustand wieder herstellen @@ -500,9 +500,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) HideTracking(); if ( rTEvt.IsTrackingCanceled() ) { - mbDockCanceled = sal_True; + mbDockCanceled = true; EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); - mbDockCanceled = sal_False; + mbDockCanceled = false; } else EndDocking( Rectangle( Point( mnTrackX, mnTrackY ), Size( mnTrackWidth, mnTrackHeight ) ), mbLastFloatMode ); @@ -532,9 +532,9 @@ void DockingWindow::Tracking( const TrackingEvent& rTEvt ) aFramePos.Y() += maMouseOff.Y(); if ( mbDragFull ) StartDocking(); - sal_Bool bFloatMode = Docking( aFramePos, aTrackRect ); - mbDockPrevented = sal_False; - mbFloatPrevented = sal_False; + bool bFloatMode = Docking( aFramePos, aTrackRect ); + mbDockPrevented = false; + mbFloatPrevented = false; if ( mbLastFloatMode != bFloatMode ) { if ( bFloatMode ) @@ -653,12 +653,12 @@ bool DockingWindow::Notify( NotifyEvent& rNEvt ) void DockingWindow::StartDocking() { - mbDocking = sal_True; + mbDocking = true; } // ----------------------------------------------------------------------- -sal_Bool DockingWindow::Docking( const Point&, Rectangle& ) +bool DockingWindow::Docking( const Point&, Rectangle& ) { return IsFloatingMode(); } @@ -670,7 +670,7 @@ void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) if ( !IsDockingCanceled() ) { bool bShow = false; - if ( bFloatMode != IsFloatingMode() ) + if ( bool(bFloatMode) != IsFloatingMode() ) { Show( false, SHOW_NOFOCUSCHANGE ); SetFloatingMode( bFloatMode ); @@ -688,32 +688,32 @@ void DockingWindow::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) if ( bShow ) Show(); } - mbDocking = sal_False; + mbDocking = false; } // ----------------------------------------------------------------------- -sal_Bool DockingWindow::PrepareToggleFloatingMode() +bool DockingWindow::PrepareToggleFloatingMode() { - return sal_True; + return true; } // ----------------------------------------------------------------------- -sal_Bool DockingWindow::Close() +bool DockingWindow::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDead() ) - return sal_False; + return false; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return sal_False; + return false; Show( false, SHOW_NOFOCUSCHANGE ); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -790,7 +790,7 @@ void DockingWindow::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -void DockingWindow::SetFloatingMode( sal_Bool bFloatMode ) +void DockingWindow::SetFloatingMode( bool bFloatMode ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) @@ -802,7 +802,7 @@ void DockingWindow::SetFloatingMode( sal_Bool bFloatMode ) { if ( PrepareToggleFloatingMode() ) // changes to floating mode can be vetoed { - sal_Bool bVisible = IsVisible(); + bool bVisible = IsVisible(); if ( bFloatMode ) { @@ -1053,7 +1053,7 @@ Point DockingWindow::GetFloatingPos() const return maFloatPos; } -sal_Bool DockingWindow::IsFloatingMode() const +bool DockingWindow::IsFloatingMode() const { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( pWrapper ) diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index c91cfea9a3a4..8aa30f8bf7fc 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -67,8 +67,8 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) mpImplData = new ImplData; mpWindowImpl->mbFloatWin = true; - mbInCleanUp = sal_False; - mbGrabFocus = sal_False; + mbInCleanUp = false; + mbGrabFocus = false; DBG_ASSERT( pParent, "FloatWindow::FloatingWindow(): - pParent == NULL!" ); @@ -116,7 +116,7 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) SystemWindow::ImplInit( pBorderWin, nStyle & ~WB_BORDER, NULL ); pBorderWin->mpWindowImpl->mpClientWindow = this; pBorderWin->GetBorder( mpWindowImpl->mnLeftBorder, mpWindowImpl->mnTopBorder, mpWindowImpl->mnRightBorder, mpWindowImpl->mnBottomBorder ); - pBorderWin->SetDisplayActive( sal_True ); + pBorderWin->SetDisplayActive( true ); mpWindowImpl->mpBorderWindow = pBorderWin; mpWindowImpl->mpRealParent = pParent; } @@ -129,11 +129,11 @@ void FloatingWindow::ImplInit( Window* pParent, WinBits nStyle ) mnTitle = (nStyle & (WB_MOVEABLE | WB_POPUP)) ? FLOATWIN_TITLE_NORMAL : FLOATWIN_TITLE_NONE; mnOldTitle = mnTitle; mnPopupModeFlags = 0; - mbInPopupMode = sal_False; - mbPopupMode = sal_False; - mbPopupModeCanceled = sal_False; - mbPopupModeTearOff = sal_False; - mbMouseDown = sal_False; + mbInPopupMode = false; + mbPopupMode = false; + mbPopupModeCanceled = false; + mbPopupModeTearOff = false; + mbMouseDown = false; ImplInitSettings(); } @@ -253,7 +253,7 @@ Point FloatingWindow::ImplCalcPos( Window* pWindow, Rectangle normRect( rRect ); // rRect is already relative to top-level window normRect.SetPos( pW->ScreenToOutputPixel( normRect.TopLeft() ) ); - sal_Bool bRTL = Application::GetSettings().GetLayoutRTL(); + bool bRTL = Application::GetSettings().GetLayoutRTL(); Rectangle devRect( pW->OutputToAbsoluteScreenPixel( normRect.TopLeft() ), pW->OutputToAbsoluteScreenPixel( normRect.BottomRight() ) ); @@ -526,20 +526,20 @@ FloatingWindow* FloatingWindow::ImplFindLastLevelFloat() // ----------------------------------------------------------------------- -sal_Bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) +bool FloatingWindow::ImplIsFloatPopupModeWindow( const Window* pWindow ) { FloatingWindow* pWin = this; do { if ( pWin->mpFirstPopupModeWin == pWindow ) - return sal_True; + return true; pWin = pWin->mpNextFloat; } while ( pWin ); - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -548,7 +548,7 @@ IMPL_LINK_NOARG(FloatingWindow, ImplEndPopupModeHdl) { mnPostId = 0; mnPopupModeFlags = 0; - mbPopupMode = sal_False; + mbPopupMode = false; PopupModeEnd(); return 0; } @@ -610,7 +610,7 @@ void FloatingWindow::DataChanged( const DataChangedEvent& rDCEvt ) void FloatingWindow::ImplCallPopupModeEnd() { // PopupMode wurde beendet - mbInPopupMode = sal_False; + mbInPopupMode = false; // Handler asyncron rufen if ( !mnPostId ) @@ -708,11 +708,11 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) maFloatRect.Right() += 2; maFloatRect.Bottom() += 2; mnPopupModeFlags = nFlags; - mbInPopupMode = sal_True; - mbPopupMode = sal_True; - mbPopupModeCanceled = sal_False; - mbPopupModeTearOff = sal_False; - mbMouseDown = sal_False; + mbInPopupMode = true; + mbPopupMode = true; + mbPopupModeCanceled = false; + mbPopupModeTearOff = false; + mbMouseDown = false; mbOldSaveBackMode = IsSaveBackgroundEnabled(); EnableSaveBackground(); @@ -724,7 +724,7 @@ void FloatingWindow::StartPopupMode( const Rectangle& rRect, sal_uLong nFlags ) if( nFlags & FLOATWIN_POPUPMODE_GRABFOCUS ) { // force key input even without focus (useful for menus) - mbGrabFocus = sal_True; + mbGrabFocus = true; } Show( true, SHOW_NOACTIVATE ); } @@ -739,7 +739,7 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, sal_uLong nFlags ) return; mpImplData->mpBox = pBox; - pBox->ImplFloatControl( sal_True, this ); + pBox->ImplFloatControl( true, this ); // retrieve some data from the ToolBox Rectangle aRect = pBox->GetItemRect( nItemId ); @@ -785,7 +785,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) ImplSVData* pSVData = ImplGetSVData(); - mbInCleanUp = sal_True; // prevent killing this window due to focus change while working with it + mbInCleanUp = true; // prevent killing this window due to focus change while working with it // Bei allen nachfolgenden PopupMode-Fenster den Modus auch beenden while ( pSVData->maWinData.mpFirstFloat && pSVData->maWinData.mpFirstFloat != this ) @@ -810,13 +810,13 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) else if ( pSVData->maWinData.mpFocusWin && pSVData->maWinData.mpFirstFloat && ImplIsWindowOrChild( pSVData->maWinData.mpFocusWin ) ) pSVData->maWinData.mpFirstFloat->GrabFocus(); - mbPopupModeTearOff = sal_False; + mbPopupModeTearOff = false; } else { - mbPopupModeTearOff = sal_True; + mbPopupModeTearOff = true; if ( nFocusId ) - Window::EndSaveFocus( nFocusId, sal_False ); + Window::EndSaveFocus( nFocusId, false ); } EnableSaveBackground( mbOldSaveBackMode ); @@ -828,7 +828,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) // ToolBox wieder auf normal schalten if ( mpImplData->mpBox ) { - mpImplData->mpBox->ImplFloatControl( sal_False, this ); + mpImplData->mpBox->ImplFloatControl( false, this ); mpImplData->mpBox = NULL; } @@ -849,7 +849,7 @@ void FloatingWindow::ImplEndPopupMode( sal_uInt16 nFlags, sal_uLong nFocusId ) } } - mbInCleanUp = sal_False; + mbInCleanUp = false; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index bf0f1911be44..e4b1998d445f 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -123,11 +123,11 @@ struct MenuItemData sal_uLong nUserValue; // User value Image aImage; // Image KeyCode aAccelKey; // Accelerator-Key - sal_Bool bChecked; // Checked - sal_Bool bEnabled; // Enabled - sal_Bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) + bool bChecked; // Checked + bool bEnabled; // Enabled + bool bVisible; // Visible (note: this flag will not override MENU_FLAG_HIDEDISABLEDENTRIES when true) bool bIsTemporary; // Temporary inserted ('No selection possible') - sal_Bool bMirrorMode; + bool bMirrorMode; long nItemImageAngle; Size aSz; // only temporarily valid OUString aAccessibleName; // accessible name @@ -267,11 +267,11 @@ MenuItemData* MenuItemList::Insert( pData->pSubMenu = NULL; pData->pAutoSubMenu = NULL; pData->nUserValue = 0; - pData->bChecked = sal_False; - pData->bEnabled = sal_True; - pData->bVisible = sal_True; + pData->bChecked = false; + pData->bEnabled = true; + pData->bVisible = true; pData->bIsTemporary = false; - pData->bMirrorMode = sal_False; + pData->bMirrorMode = false; pData->nItemImageAngle = 0; SalItemParams aSalMIData; @@ -303,11 +303,11 @@ void MenuItemList::InsertSeparator(const OString &rIdent, size_t nPos) pData->pSubMenu = NULL; pData->pAutoSubMenu = NULL; pData->nUserValue = 0; - pData->bChecked = sal_False; - pData->bEnabled = sal_True; - pData->bVisible = sal_True; + pData->bChecked = false; + pData->bEnabled = true; + pData->bVisible = true; pData->bIsTemporary = false; - pData->bMirrorMode = sal_False; + pData->bMirrorMode = false; pData->nItemImageAngle = 0; SalItemParams aSalMIData; @@ -502,9 +502,9 @@ private: sal_uInt16 nPosInParent; bool bInExecute; - sal_Bool bScrollMenu; - sal_Bool bScrollUp; - sal_Bool bScrollDown; + bool bScrollMenu; + bool bScrollUp; + bool bScrollDown; bool bIgnoreFirstMove; bool bKeyInput; @@ -517,14 +517,14 @@ private: void StateChanged( StateChangedType nType ); void DataChanged( const DataChangedEvent& rDCEvt ); protected: - Region ImplCalcClipRegion( sal_Bool bIncludeLogo = sal_True ) const; + Region ImplCalcClipRegion( bool bIncludeLogo = true ) const; void ImplInitClipRegion(); - void ImplDrawScroller( sal_Bool bUp ); + void ImplDrawScroller( bool bUp ); using Window::ImplScroll; void ImplScroll( const Point& rMousePos ); - void ImplScroll( sal_Bool bUp ); - void ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd = sal_False ); - void ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown ); + void ImplScroll( bool bUp ); + void ImplCursorUpDown( bool bUp, bool bHomeEnd = false ); + void ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown ); long ImplGetStartY() const; Rectangle ImplGetItemRect( sal_uInt16 nPos ); @@ -546,8 +546,8 @@ public: void SetFocusId( sal_uLong nId ) { nSaveFocusId = nId; } sal_uLong GetFocusId() const { return nSaveFocusId; } - void EnableScrollMenu( sal_Bool b ); - sal_Bool IsScrollMenu() const { return bScrollMenu; } + void EnableScrollMenu( bool b ); + bool IsScrollMenu() const { return bScrollMenu; } sal_uInt16 GetScrollerHeight() const { return nScrollerHeight; } void Execute(); @@ -558,8 +558,8 @@ public: PopupMenu* GetActivePopup() const { return pActivePopup; } void KillActivePopup( PopupMenu* pThisOnly = NULL ); - void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ); - void ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer ); + void HighlightItem( sal_uInt16 nPos, bool bHighlight ); + void ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTimer ); sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } void SetPosInParent( sal_uInt16 nPos ) { nPosInParent = nPos; } @@ -704,7 +704,7 @@ private: sal_uInt16 nHighlightedItem; sal_uInt16 nRolloveredItem; sal_uLong nSaveFocusId; - sal_Bool mbAutoPopup; + bool mbAutoPopup; bool bIgnoreFirstMove; bool bStayActive; @@ -714,12 +714,12 @@ private: std::map< sal_uInt16, AddButtonEntry > m_aAddButtons; - void HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ); - void ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectPopupEntry, sal_Bool bAllowRestoreFocus = sal_True, sal_Bool bDefaultToDocument = sal_True ); + void HighlightItem( sal_uInt16 nPos, bool bHighlight ); + void ChangeHighlightItem( sal_uInt16 n, bool bSelectPopupEntry, bool bAllowRestoreFocus = true, bool bDefaultToDocument = true ); sal_uInt16 ImplFindEntry( const Point& rMousePos ) const; - void ImplCreatePopup( sal_Bool bPreSelectFirst ); - sal_Bool ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu = sal_True ); + void ImplCreatePopup( bool bPreSelectFirst ); + bool ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu = true ); Rectangle ImplGetItemRect( sal_uInt16 nPos ); void ImplInitStyleSettings(); @@ -739,7 +739,7 @@ public: MenuBarWindow( Window* pParent ); ~MenuBarWindow(); - void ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ); + void ShowButtons( bool bClose, bool bFloat, bool bHide ); virtual void MouseMove( const MouseEvent& rMEvt ); virtual void MouseButtonDown( const MouseEvent& rMEvt ); @@ -759,7 +759,7 @@ public: sal_uInt16 GetHighlightedItem() const { return nHighlightedItem; } virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > CreateAccessible(); - void SetAutoPopup( sal_Bool bAuto ) { mbAutoPopup = bAuto; } + void SetAutoPopup( bool bAuto ) { mbAutoPopup = bAuto; } void ImplLayoutChanged(); Size MinCloseButtonSize(); @@ -916,13 +916,13 @@ static int ImplGetTopDockingAreaHeight( Window *pWindow ) Menu::Menu() { - bIsMenuBar = sal_False; + bIsMenuBar = false; ImplInit(); } // this constructor makes sure we're creating the native menu // with the correct type (ie, MenuBar vs. PopupMenu) -Menu::Menu( sal_Bool bMenubar ) +Menu::Menu( bool bMenubar ) { bIsMenuBar = bMenubar; ImplInit(); @@ -964,7 +964,7 @@ Menu::~Menu() pDelData = pDelData->mpNext; } - bKilled = sal_True; + bKilled = true; delete pItemList; delete pLogo; @@ -987,9 +987,9 @@ void Menu::ImplInit() pStartedFrom = NULL; pWindow = NULL; nEventId = 0; - bCanceled = sal_False; - bInCallback = sal_False; - bKilled = sal_False; + bCanceled = false; + bInCallback = false; + bKilled = false; mpLayoutData = NULL; mpFirstDel = NULL; // Dtor notification list // Native-support: returns NULL if not supported @@ -1049,7 +1049,7 @@ void Menu::CreateAutoMnemonics() void Menu::Activate() { - bInCallback = sal_True; + bInCallback = true; ImplMenuDelData aDelData( this ); @@ -1064,14 +1064,14 @@ void Menu::Activate() Menu* pStartMenu = ImplGetStartMenu(); if ( pStartMenu && ( pStartMenu != this ) ) { - pStartMenu->bInCallback = sal_True; + pStartMenu->bInCallback = true; // MT 11/01: Call EventListener here? I don't know... pStartMenu->aActivateHdl.Call( this ); - pStartMenu->bInCallback = sal_False; + pStartMenu->bInCallback = false; } } } - bInCallback = sal_False; + bInCallback = false; } } @@ -1084,7 +1084,7 @@ void Menu::Deactivate() pItemList->Remove( n ); } - bInCallback = sal_True; + bInCallback = true; ImplMenuDelData aDelData( this ); @@ -1099,9 +1099,9 @@ void Menu::Deactivate() { if ( pStartMenu && ( pStartMenu != this ) ) { - pStartMenu->bInCallback = sal_True; + pStartMenu->bInCallback = true; pStartMenu->aDeactivateHdl.Call( this ); - pStartMenu->bInCallback = sal_False; + pStartMenu->bInCallback = false; } } } @@ -1109,7 +1109,7 @@ void Menu::Deactivate() if( !aDelData.isDeleted() ) { - bInCallback = sal_False; + bInCallback = false; } } @@ -1130,11 +1130,11 @@ void Menu::ImplSelect() MenuItemData* pData = GetItemList()->GetData( nSelectedId ); if ( pData && (pData->nBits & MIB_AUTOCHECK) ) { - sal_Bool bChecked = IsItemChecked( nSelectedId ); + bool bChecked = IsItemChecked( nSelectedId ); if ( pData->nBits & MIB_RADIOCHECK ) { if ( !bChecked ) - CheckItem( nSelectedId, sal_True ); + CheckItem( nSelectedId, true ); } else CheckItem( nSelectedId, !bChecked ); @@ -1278,9 +1278,9 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) GetRes( rResId.SetRT( RSC_MENUITEM ) ); nObjMask = ReadLongRes(); - sal_Bool bSep = sal_False; + bool bSep = false; if ( nObjMask & RSC_MENUITEM_SEPARATOR ) - bSep = (sal_Bool)ReadShortRes(); + bSep = ReadShortRes() != 0; sal_uInt16 nItemId = 1; if ( nObjMask & RSC_MENUITEM_ID ) @@ -1340,12 +1340,12 @@ void Menu::InsertItem( const ResId& rResId, sal_uInt16 nPos ) if( nObjMask & RSC_MENUITEM_CHECKED ) { if ( !bSep ) - CheckItem( nItemId, (sal_Bool)ReadShortRes() ); + CheckItem( nItemId, ReadShortRes() != 0 ); } if ( nObjMask & RSC_MENUITEM_DISABLE ) { if ( !bSep ) - EnableItem( nItemId, !(sal_Bool)ReadShortRes() ); + EnableItem( nItemId, ReadShortRes() == 0 ); } if ( nObjMask & RSC_MENUITEM_COMMAND ) { @@ -1450,9 +1450,9 @@ void ImplCopyItem( Menu* pThis, const Menu& rMenu, sal_uInt16 nPos, sal_uInt16 n pThis->InsertItem( nId, pData->aImage, pData->nBits, pData->sIdent, nNewPos ); if ( rMenu.IsItemChecked( nId ) ) - pThis->CheckItem( nId, sal_True ); + pThis->CheckItem( nId, true ); if ( !rMenu.IsItemEnabled( nId ) ) - pThis->EnableItem( nId, sal_False ); + pThis->EnableItem( nId, false ); pThis->SetHelpId( nId, pData->aHelpId ); pThis->SetHelpText( nId, pData->aHelpText ); pThis->SetAccelKey( nId, pData->aAccelKey ); @@ -1594,14 +1594,14 @@ OUString Menu::GetItemAccKeyStrFromPos(sal_uInt16 nPos) const return OUString(); } -sal_Bool Menu::IsTemporaryItemFromPos(sal_uInt16 nPos ) const +bool Menu::IsTemporaryItemFromPos(sal_uInt16 nPos ) const { MenuItemData* pData = pItemList->GetDataFromPos( nPos ); if (pData) { return pData->bIsTemporary; } - return sal_False; + return false; } sal_uInt16 Menu::GetCurItemId() const @@ -1745,7 +1745,7 @@ KeyEvent Menu::GetActivationKey( sal_uInt16 nItemId ) const return aRet; } -void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) +void Menu::CheckItem( sal_uInt16 nItemId, bool bCheck ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -1760,7 +1760,7 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) MenuItemData* pGroupData; sal_uInt16 nGroupPos; sal_uInt16 nItemCount = GetItemCount(); - sal_Bool bFound = sal_False; + bool bFound = false; nGroupPos = nPos; while ( nGroupPos ) @@ -1770,8 +1770,8 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) { if ( IsItemChecked( pGroupData->nId ) ) { - CheckItem( pGroupData->nId, sal_False ); - bFound = sal_True; + CheckItem( pGroupData->nId, false ); + bFound = true; break; } } @@ -1790,7 +1790,7 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) { if ( IsItemChecked( pGroupData->nId ) ) { - CheckItem( pGroupData->nId, sal_False ); + CheckItem( pGroupData->nId, false ); break; } } @@ -1810,18 +1810,18 @@ void Menu::CheckItem( sal_uInt16 nItemId, sal_Bool bCheck ) ImplCallEventListeners( bCheck ? VCLEVENT_MENU_ITEMCHECKED : VCLEVENT_MENU_ITEMUNCHECKED, nPos ); } -sal_Bool Menu::IsItemChecked( sal_uInt16 nItemId ) const +bool Menu::IsItemChecked( sal_uInt16 nItemId ) const { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) - return sal_False; + return false; return pData->bChecked; } -void Menu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) +void Menu::EnableItem( sal_uInt16 nItemId, bool bEnable ) { size_t nPos; MenuItemData* pItemData = pItemList->GetData( nItemId, nPos ); @@ -1855,18 +1855,18 @@ void Menu::EnableItem( sal_uInt16 nItemId, sal_Bool bEnable ) } } -sal_Bool Menu::IsItemEnabled( sal_uInt16 nItemId ) const +bool Menu::IsItemEnabled( sal_uInt16 nItemId ) const { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); if ( !pData ) - return sal_False; + return false; return pData->bEnabled; } -void Menu::ShowItem( sal_uInt16 nItemId, sal_Bool bVisible ) +void Menu::ShowItem( sal_uInt16 nItemId, bool bVisible ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -1981,7 +1981,7 @@ static inline Image ImplMirrorImage( const Image& rImage ) return Image( aBmpEx ); } -void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ) +void Menu::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ) { size_t nPos; MenuItemData* pData = pItemList->GetData( nItemId, nPos ); @@ -2143,19 +2143,19 @@ Menu& Menu::operator=( const Menu& rMenu ) return *this; } -sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const +bool Menu::ImplIsVisible( sal_uInt16 nPos ) const { - sal_Bool bVisible = sal_True; + bool bVisible = true; MenuItemData* pData = pItemList->GetDataFromPos( nPos ); // check general visibility first if( pData && !pData->bVisible ) - bVisible = sal_False; + bVisible = false; if ( bVisible && pData && pData->eType == MENUITEM_SEPARATOR ) { if( nPos == 0 ) // no separator should be shown at the very beginning - bVisible = sal_False; + bVisible = false; else { // always avoid adjacent separators @@ -2173,10 +2173,10 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const } } if( n == nCount ) // no next visible item - bVisible = sal_False; + bVisible = false; // check for separator if( pNextData && pNextData->bVisible && pNextData->eType == MENUITEM_SEPARATOR ) - bVisible = sal_False; + bVisible = false; if( bVisible ) { @@ -2190,7 +2190,7 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const } } if( n == 0 ) // no previous visible item - bVisible = sal_False; + bVisible = false; } } } @@ -2201,7 +2201,7 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const !( nMenuFlags & MENU_FLAG_ALWAYSSHOWDISABLEDENTRIES ) ) { if( !pData ) // e.g. nPos == ITEMPOS_INVALID - bVisible = sal_False; + bVisible = false; else if ( pData->eType != MENUITEM_SEPARATOR ) // separators handled above { // bVisible = pData->bEnabled && ( !pData->pSubMenu || pData->pSubMenu->HasValidEntries( sal_True ) ); @@ -2212,24 +2212,24 @@ sal_Bool Menu::ImplIsVisible( sal_uInt16 nPos ) const return bVisible; } -sal_Bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const +bool Menu::IsItemPosVisible( sal_uInt16 nItemPos ) const { return IsMenuVisible() && ImplIsVisible( nItemPos ); } -sal_Bool Menu::IsMenuVisible() const +bool Menu::IsMenuVisible() const { return pWindow && pWindow->IsReallyVisible(); } -sal_Bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const +bool Menu::ImplIsSelectable( sal_uInt16 nPos ) const { - sal_Bool bSelectable = sal_True; + bool bSelectable = true; MenuItemData* pData = pItemList->GetDataFromPos( nPos ); // check general visibility first if ( pData && ( pData->nBits & MIB_NOSELECT ) ) - bSelectable = sal_False; + bSelectable = false; return bSelectable; } @@ -2327,7 +2327,7 @@ Size Menu::ImplGetNativeCheckAndRadioSize( const Window* pWin, long& rCheckHeigh return Size(std::max(nCheckWidth, nRadioWidth), std::max(rCheckHeight, rRadioHeight)); } -sal_Bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const +bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, long& rArrowSpacing ) const { ImplControlValue aVal; Rectangle aNativeBounds; @@ -2352,10 +2352,10 @@ sal_Bool Menu::ImplGetNativeSubmenuArrowSize( Window* pWin, Size& rArrowSize, lo rArrowSize = aSize; rArrowSpacing = aNativeBounds.GetWidth() - aNativeContent.GetWidth(); - return sal_True; + return true; } } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -2601,7 +2601,7 @@ Size Menu::ImplCalcSize( const Window* pWin ) static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRect, bool i_bHighlight ) { - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( i_pWindow->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -2619,7 +2619,7 @@ static void ImplPaintCheckBackground( Window* i_pWindow, const Rectangle& i_rRec { const StyleSettings& rSettings = i_pWindow->GetSettings().GetStyleSettings(); Color aColor( i_bHighlight ? rSettings.GetMenuHighlightTextColor() : rSettings.GetHighlightColor() ); - i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, sal_True, sal_False, 2, NULL, &aColor ); + i_pWindow->DrawSelectionBackground( i_rRect, 0, i_bHighlight, true, false, 2, NULL, &aColor ); } } @@ -2643,7 +2643,7 @@ static OUString getShortenedString( const OUString& i_rLong, Window* i_pWin, lon return aNonMnem; } -void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, sal_Bool bHighlighted, bool bLayout, bool bRollover ) const +void Menu::ImplPaint( Window* pWin, sal_uInt16 nBorder, long nStartY, MenuItemData* pThisItemOnly, bool bHighlighted, bool bLayout, bool bRollover ) const { // for symbols: nFontHeight x nFontHeight long nFontHeight = pWin->GetTextHeight(); @@ -3065,7 +3065,7 @@ Menu* Menu::ImplFindMenu( sal_uInt16 nItemId ) return pSelMenu; } -void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPopups ) +void Menu::RemoveDisabledEntries( bool bCheckPopups, bool bRemoveEmptyPopups ) { for ( sal_uInt16 n = 0; n < GetItemCount(); n++ ) { @@ -3081,7 +3081,7 @@ void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPo if ( bCheckPopups && pItem->pSubMenu ) { - pItem->pSubMenu->RemoveDisabledEntries( sal_True ); + pItem->pSubMenu->RemoveDisabledEntries( true ); if ( bRemoveEmptyPopups && !pItem->pSubMenu->GetItemCount() ) bRemove = true; } @@ -3100,9 +3100,9 @@ void Menu::RemoveDisabledEntries( sal_Bool bCheckPopups, sal_Bool bRemoveEmptyPo delete mpLayoutData, mpLayoutData = NULL; } -sal_Bool Menu::HasValidEntries( sal_Bool bCheckPopups ) +bool Menu::HasValidEntries( bool bCheckPopups ) { - sal_Bool bValidEntries = sal_False; + bool bValidEntries = false; sal_uInt16 nCount = GetItemCount(); for ( sal_uInt16 n = 0; !bValidEntries && ( n < nCount ); n++ ) { @@ -3110,9 +3110,9 @@ sal_Bool Menu::HasValidEntries( sal_Bool bCheckPopups ) if ( pItem->bEnabled && ( pItem->eType != MENUITEM_SEPARATOR ) ) { if ( bCheckPopups && pItem->pSubMenu ) - bValidEntries = pItem->pSubMenu->HasValidEntries( sal_True ); + bValidEntries = pItem->pSubMenu->HasValidEntries( true ); else - bValidEntries = sal_True; + bValidEntries = true; } } return bValidEntries; @@ -3130,12 +3130,12 @@ void Menu::ImplFillLayoutData() const mpLayoutData = new MenuLayoutData(); if( bIsMenuBar ) { - ImplPaint( pWindow, 0, 0, 0, sal_False, true ); + ImplPaint( pWindow, 0, 0, 0, false, true ); } else { MenuFloatingWindow* pFloat = (MenuFloatingWindow*)pWindow; - ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, sal_False, true ); + ImplPaint( pWindow, pFloat->nScrollerHeight, pFloat->ImplGetStartY(), 0, false, true ); } } } @@ -3228,16 +3228,16 @@ void Menu::ImplSetSalMenu( SalMenu *pSalMenu ) mpSalMenu = pSalMenu; } -sal_Bool Menu::GetSystemMenuData( SystemMenuData* pData ) const +bool Menu::GetSystemMenuData( SystemMenuData* pData ) const { Menu* pMenu = (Menu*)this; if( pData && pMenu->ImplGetSalMenu() ) { pMenu->ImplGetSalMenu()->GetSystemMenuData( pData ); - return sal_True; + return true; } else - return sal_False; + return false; } bool Menu::IsHighlighted( sal_uInt16 nItemPos ) const @@ -3262,12 +3262,12 @@ void Menu::HighlightItem( sal_uInt16 nItemPos ) if ( bIsMenuBar ) { MenuBarWindow* pMenuWin = static_cast< MenuBarWindow* >( pWindow ); - pMenuWin->SetAutoPopup( sal_False ); - pMenuWin->ChangeHighlightItem( nItemPos, sal_False ); + pMenuWin->SetAutoPopup( false ); + pMenuWin->ChangeHighlightItem( nItemPos, false ); } else { - static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, sal_False ); + static_cast< MenuFloatingWindow* >( pWindow )->ChangeHighlightItem( nItemPos, false ); } } } @@ -3277,35 +3277,35 @@ void Menu::HighlightItem( sal_uInt16 nItemPos ) // - MenuBar - // ----------- -MenuBar::MenuBar() : Menu( sal_True ) +MenuBar::MenuBar() : Menu( true ) { - mbDisplayable = sal_True; - mbCloserVisible = sal_False; - mbFloatBtnVisible = sal_False; - mbHideBtnVisible = sal_False; + mbDisplayable = true; + mbCloserVisible = false; + mbFloatBtnVisible = false; + mbHideBtnVisible = false; } -MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( sal_True ) +MenuBar::MenuBar( const MenuBar& rMenu ) : Menu( true ) { - mbDisplayable = sal_True; - mbCloserVisible = sal_False; - mbFloatBtnVisible = sal_False; - mbHideBtnVisible = sal_False; + mbDisplayable = true; + mbCloserVisible = false; + mbFloatBtnVisible = false; + mbHideBtnVisible = false; *this = rMenu; - bIsMenuBar = sal_True; + bIsMenuBar = true; } MenuBar::~MenuBar() { - ImplDestroy( this, sal_True ); + ImplDestroy( this, true ); } -void MenuBar::ShowCloser( sal_Bool bShow ) +void MenuBar::ShowCloser( bool bShow ) { ShowButtons( bShow, mbFloatBtnVisible, mbHideBtnVisible ); } -void MenuBar::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) +void MenuBar::ShowButtons( bool bClose, bool bFloat, bool bHide ) { if ( (bClose != mbCloserVisible) || (bFloat != mbFloatBtnVisible) || @@ -3319,7 +3319,7 @@ void MenuBar::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) } } -void MenuBar::SetDisplayable( sal_Bool bDisplayable ) +void MenuBar::SetDisplayable( bool bDisplayable ) { if( bDisplayable != mbDisplayable ) { @@ -3350,7 +3350,7 @@ Window* MenuBar::ImplCreate( Window* pParent, Window* pWindow, MenuBar* pMenu ) return pWindow; } -void MenuBar::ImplDestroy( MenuBar* pMenu, sal_Bool bDelete ) +void MenuBar::ImplDestroy( MenuBar* pMenu, bool bDelete ) { MenuBarWindow* pWindow = (MenuBarWindow*) pMenu->ImplGetWindow(); if ( pWindow && bDelete ) @@ -3361,9 +3361,9 @@ void MenuBar::ImplDestroy( MenuBar* pMenu, sal_Bool bDelete ) pMenu->pWindow = NULL; } -sal_Bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu ) +bool MenuBar::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) { - sal_Bool bDone = sal_False; + bool bDone = false; // No keyboard processing when system handles the menu or our menubar is invisible if( !IsDisplayable() || @@ -3389,14 +3389,14 @@ void MenuBar::SelectEntry( sal_uInt16 nId ) nId = GetItemPos( nId ); // #99705# popup the selected menu - pMenuWin->SetAutoPopup( sal_True ); + pMenuWin->SetAutoPopup( true ); if( ITEMPOS_INVALID != pMenuWin->nHighlightedItem ) { pMenuWin->KillActivePopup(); - pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + pMenuWin->ChangeHighlightItem( ITEMPOS_INVALID, false ); } if( nId != ITEMPOS_INVALID ) - pMenuWin->ChangeHighlightItem( nId, sal_False ); + pMenuWin->ChangeHighlightItem( nId, false ); } } @@ -3404,38 +3404,38 @@ void MenuBar::SelectEntry( sal_uInt16 nId ) // handler for native menu selection and command events -sal_Bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const +bool MenuBar::HandleMenuActivateEvent( Menu *pMenu ) const { if( pMenu ) { ImplMenuDelData aDelData( this ); pMenu->pStartedFrom = (Menu*)this; - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Activate(); if( !aDelData.isDeleted() ) - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; } - return sal_True; + return true; } -sal_Bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const +bool MenuBar::HandleMenuDeActivateEvent( Menu *pMenu ) const { if( pMenu ) { ImplMenuDelData aDelData( this ); pMenu->pStartedFrom = (Menu*)this; - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Deactivate(); if( !aDelData.isDeleted() ) - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; } - return sal_True; + return true; } -sal_Bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventId ) const +bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEventId ) const { if( !pMenu ) pMenu = ((Menu*) this)->ImplFindMenu( nHighlightEventId ); @@ -3453,13 +3453,13 @@ sal_Bool MenuBar::HandleMenuHighlightEvent( Menu *pMenu, sal_uInt16 nHighlightEv pMenu->pStartedFrom = (Menu*)this; pMenu->ImplCallHighlight( pMenu->mnHighlightedItemPos ); } - return sal_True; + return true; } else - return sal_False; + return false; } -sal_Bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const +bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventId ) const { if( !pMenu ) pMenu = ((Menu*) this)->ImplFindMenu( nCommandEventId ); @@ -3468,10 +3468,10 @@ sal_Bool MenuBar::HandleMenuCommandEvent( Menu *pMenu, sal_uInt16 nCommandEventI pMenu->nSelectedId = nCommandEventId; pMenu->pStartedFrom = (Menu*)this; pMenu->ImplSelect(); - return sal_True; + return true; } else - return sal_False; + return false; } sal_uInt16 MenuBar::AddMenuBarButton( const Image& i_rImage, const Link& i_rLink, const OUString& i_rToolTip, sal_uInt16 i_nPos ) @@ -3496,7 +3496,7 @@ void MenuBar::RemoveMenuBarButton( sal_uInt16 nId ) static_cast<MenuBarWindow*>(pWindow)->RemoveMenuBarButton( nId ); } -sal_Bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) const +bool MenuBar::HandleMenuButtonEvent( Menu *, sal_uInt16 i_nButtonId ) const { return static_cast<MenuBarWindow*>(pWindow)->HandleMenuButtonEvent( i_nButtonId ); } @@ -3528,7 +3528,7 @@ PopupMenu::~PopupMenu() *pRefAutoSubMenu = NULL; // #111060# avoid second delete in ~MenuItemData } -sal_Bool PopupMenu::IsInExecute() +bool PopupMenu::IsInExecute() { return GetActivePopupMenu() ? sal_True : sal_False; } @@ -3554,7 +3554,7 @@ void PopupMenu::SelectEntry( sal_uInt16 nId ) size_t nPos = 0; MenuItemData* pData = GetItemList()->GetData( nId, nPos ); if ( pData->pSubMenu ) - ImplGetFloatingWindow()->ChangeHighlightItem( nPos, sal_True ); + ImplGetFloatingWindow()->ChangeHighlightItem( nPos, true ); else ImplGetFloatingWindow()->EndExecute( nId ); } @@ -3571,7 +3571,7 @@ void PopupMenu::SelectEntry( sal_uInt16 nId ) pFloat->KillActivePopup(); } } - pFloat->ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + pFloat->ChangeHighlightItem( ITEMPOS_INVALID, false ); } } } @@ -3608,10 +3608,10 @@ sal_uInt16 PopupMenu::Execute( Window* pExecWindow, const Rectangle& rRect, sal_ if (nFlags & POPUPMENU_NOHORZ_PLACEMENT) nPopupModeFlags |= FLOATWIN_POPUPMODE_NOHORZPLACEMENT; - return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, sal_False ); + return ImplExecute( pExecWindow, rRect, nPopupModeFlags, 0, false ); } -sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nPopupModeFlags, Menu* pSFrom, sal_Bool bPreSelectFirst ) +sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nPopupModeFlags, Menu* pSFrom, bool bPreSelectFirst ) { if ( !pSFrom && ( PopupMenu::IsInExecute() || !GetItemCount() ) ) return 0; @@ -3622,13 +3622,13 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong pStartedFrom = pSFrom; nSelectedId = 0; - bCanceled = sal_False; + bCanceled = false; sal_uLong nFocusId = 0; bool bRealExecute = false; if ( !pStartedFrom ) { - pSVData->maWinData.mbNoDeactivate = sal_True; + pSVData->maWinData.mbNoDeactivate = true; nFocusId = Window::SaveFocus(); bRealExecute = true; } @@ -3657,9 +3657,9 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong ImplDelData aDelData; pW->ImplAddDel( &aDelData ); - bInCallback = sal_True; // set it here, if Activate overloaded + bInCallback = true; // set it here, if Activate overloaded Activate(); - bInCallback = sal_False; + bInCallback = false; if ( aDelData.IsDead() ) return 0; // Error @@ -3753,7 +3753,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong nMaxHeight -= nTop+nBottom; if ( aSz.Height() > nMaxHeight ) { - pWin->EnableScrollMenu( sal_True ); + pWin->EnableScrollMenu( true ); sal_uInt16 nStart = ImplGetFirstVisible(); sal_uInt16 nEntries = ImplCalcVisEntries( nMaxHeight, nStart ); aSz.Height() = ImplCalcHeight( nEntries ); @@ -3808,7 +3808,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong && ImplIsSelectable( n ) ) { - pWin->ChangeHighlightItem( n, sal_False ); + pWin->ChangeHighlightItem( n, false ); break; } } @@ -3838,7 +3838,7 @@ sal_uInt16 PopupMenu::ImplExecute( Window* pW, const Rectangle& rRect, sal_uLong if ( nFocusId ) { pWin->SetFocusId( 0 ); - pSVData->maWinData.mbNoDeactivate = sal_False; + pSVData->maWinData.mbNoDeactivate = false; } pWin->ImplEndPopupMode( 0, nFocusId ); @@ -3934,7 +3934,7 @@ static void ImplInitMenuWindow( Window* pWin, bool bFont, bool bMenuBar ) aWallpaper.SetColor( Application::GetSettings().GetStyleSettings().GetWorkspaceColor() ); pWin->SetBackground( aWallpaper ); - pWin->SetPaintTransparent( sal_False ); + pWin->SetPaintTransparent( false ); pWin->SetParentClipMode( 0 ); } else if ( pWin->IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL ) ) @@ -3946,7 +3946,7 @@ static void ImplInitMenuWindow( Window* pWin, bool bFont, bool bMenuBar ) Wallpaper aWallpaper; aWallpaper.SetStyle( WALLPAPER_APPLICATIONGRADIENT ); pWin->SetBackground( aWallpaper ); - pWin->SetPaintTransparent( sal_False ); + pWin->SetPaintTransparent( false ); pWin->SetParentClipMode( 0 ); } } @@ -3976,15 +3976,15 @@ MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, Window* pParent, WinBits nSt pActivePopup = 0; nSaveFocusId = 0; bInExecute = false; - bScrollMenu = sal_False; + bScrollMenu = false; nHighlightedItem = ITEMPOS_INVALID; nMBDownPos = ITEMPOS_INVALID; nPosInParent = ITEMPOS_INVALID; nScrollerHeight = 0; nBorder = EXTRASPACEY; nFirstEntry = 0; - bScrollUp = sal_False; - bScrollDown = sal_False; + bScrollUp = false; + bScrollDown = false; bIgnoreFirstMove = true; bKeyInput = false; @@ -4026,7 +4026,7 @@ void MenuFloatingWindow::doShutdown() { MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow(); if( pPWin ) - pPWin->HighlightItem( i, sal_False ); + pPWin->HighlightItem( i, false ); } } @@ -4068,7 +4068,7 @@ long MenuFloatingWindow::ImplGetStartY() const return -nY; } -Region MenuFloatingWindow::ImplCalcClipRegion( sal_Bool bIncludeLogo ) const +Region MenuFloatingWindow::ImplCalcClipRegion( bool bIncludeLogo ) const { Size aOutSz = GetOutputSizePixel(); Point aPos; @@ -4098,7 +4098,7 @@ void MenuFloatingWindow::ImplInitClipRegion() } } -void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bMBDown ) +void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, bool bMBDown ) { if( ! pMenu ) return; @@ -4120,7 +4120,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM nY += pItemData->aSz.Height(); if ( ( nOldY <= nMouseY ) && ( nY > nMouseY ) && pMenu->ImplIsSelectable( n ) ) { - sal_Bool bPopupArea = sal_True; + bool bPopupArea = true; if ( pItemData->nBits & MIB_POPUPSELECT ) { // only when clicked over the arrow... @@ -4133,10 +4133,10 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM { if ( n != nHighlightedItem ) { - ChangeHighlightItem( (sal_uInt16)n, sal_False ); + ChangeHighlightItem( (sal_uInt16)n, false ); } - sal_Bool bAllowNewPopup = sal_True; + bool bAllowNewPopup = true; if ( pActivePopup ) { MenuItemData* pData = pMenu->pItemList->GetDataFromPos( n ); @@ -4154,7 +4154,7 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM { if ( n != nHighlightedItem ) { - ChangeHighlightItem( (sal_uInt16)n, sal_True ); + ChangeHighlightItem( (sal_uInt16)n, true ); } else if ( pItemData->nBits & MIB_POPUPSELECT ) { @@ -4167,12 +4167,12 @@ void MenuFloatingWindow::ImplHighlightItem( const MouseEvent& rMEvt, sal_Bool bM } } if ( !bHighlighted ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); + ChangeHighlightItem( ITEMPOS_INVALID, true ); } else { ImplScroll( rMEvt.GetPosPixel() ); - ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); + ChangeHighlightItem( ITEMPOS_INVALID, true ); } } @@ -4189,9 +4189,9 @@ IMPL_LINK_NOARG(MenuFloatingWindow, PopupEnd) //pActivePopup->bCanceled = sal_True; } bInExecute = false; - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Deactivate(); - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; } else { @@ -4317,11 +4317,11 @@ IMPL_LINK( MenuFloatingWindow, ShowHideListener, VclWindowEvent*, pEvent ) return 0; } -void MenuFloatingWindow::EnableScrollMenu( sal_Bool b ) +void MenuFloatingWindow::EnableScrollMenu( bool b ) { bScrollMenu = b; nScrollerHeight = b ? (sal_uInt16) GetSettings().GetStyleSettings().GetScrollBarSize() /2 : 0; - bScrollDown = sal_True; + bScrollDown = true; ImplInitClipRegion(); } @@ -4346,12 +4346,12 @@ void MenuFloatingWindow::StopExecute( sal_uLong nFocusId ) // (could have been restored in Select) if ( nSaveFocusId ) { - Window::EndSaveFocus( nFocusId, sal_False ); + Window::EndSaveFocus( nFocusId, false ); nFocusId = nSaveFocusId; if ( nFocusId ) { nSaveFocusId = 0; - ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; + ImplGetSVData()->maWinData.mbNoDeactivate = false; } } ImplEndPopupMode( 0, nFocusId ); @@ -4375,15 +4375,15 @@ void MenuFloatingWindow::KillActivePopup( PopupMenu* pThisOnly ) if( ((FloatingWindow *) pActivePopup->pWindow)->IsInCleanUp() ) return; // kill it later if ( pActivePopup->bInCallback ) - pActivePopup->bCanceled = sal_True; + pActivePopup->bCanceled = true; // For all actions pActivePopup = 0, if e.g. // PopupModeEndHdl the popups to destroy were called synchronous PopupMenu* pPopup = pActivePopup; pActivePopup = NULL; - pPopup->bInCallback = sal_True; + pPopup->bInCallback = true; pPopup->Deactivate(); - pPopup->bInCallback = sal_False; + pPopup->bInCallback = false; if ( pPopup->ImplGetWindow() ) { pPopup->ImplGetFloatingWindow()->StopExecute(); @@ -4406,7 +4406,7 @@ void MenuFloatingWindow::EndExecute() if ( nFocusId ) { ((MenuBarWindow*)((MenuBar*)pStart)->ImplGetWindow())->SetFocusId( 0 ); - ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; + ImplGetSVData()->maWinData.mbNoDeactivate = false; } } @@ -4460,7 +4460,7 @@ void MenuFloatingWindow::MouseButtonDown( const MouseEvent& rMEvt ) //if ( pActivePopup && pActivePopup->ImplGetWindow() && !pActivePopup->ImplGetFloatingWindow()->pActivePopup ) // pActivePopup->ImplGetFloatingWindow()->ToTop( TOTOP_NOGRABFOCUS ); - ImplHighlightItem( rMEvt, sal_True ); + ImplHighlightItem( rMEvt, true ); nMBDownPos = nHighlightedItem; } @@ -4504,7 +4504,7 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt ) pActivePopup->ImplGetFloatingWindow()->aSubmenuCloseTimer.Start(); if( !pActivePopup || (pData && pData->pSubMenu != pActivePopup ) ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); if ( IsScrollMenu() ) ImplScroll( rMEvt.GetPosPixel() ); @@ -4515,11 +4515,11 @@ void MenuFloatingWindow::MouseMove( const MouseEvent& rMEvt ) if( bIgnoreFirstMove ) bIgnoreFirstMove = false; else - ImplHighlightItem( rMEvt, sal_False ); + ImplHighlightItem( rMEvt, false ); } } -void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) +void MenuFloatingWindow::ImplScroll( bool bUp ) { KillActivePopup(); Update(); @@ -4527,7 +4527,7 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) if( ! pMenu ) return; - HighlightItem( nHighlightedItem, sal_False ); + HighlightItem( nHighlightedItem, false ); pMenu->ImplKillLayoutData(); @@ -4540,17 +4540,17 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) if ( !bScrollDown ) { - bScrollDown = sal_True; - ImplDrawScroller( sal_False ); + bScrollDown = true; + ImplDrawScroller( false ); } if ( pMenu->ImplGetPrevVisible( nFirstEntry ) == ITEMPOS_INVALID ) { - bScrollUp = sal_False; - ImplDrawScroller( sal_True ); + bScrollUp = false; + ImplDrawScroller( true ); } - Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP ); + Scroll( 0, nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP ); } else if ( bScrollDown && !bUp ) { @@ -4562,8 +4562,8 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) if ( !bScrollUp ) { - bScrollUp = sal_True; - ImplDrawScroller( sal_True ); + bScrollUp = true; + ImplDrawScroller( true ); } long nHeight = GetOutputSizePixel().Height(); @@ -4571,14 +4571,14 @@ void MenuFloatingWindow::ImplScroll( sal_Bool bUp ) ((PopupMenu*)pMenu)->ImplCalcVisEntries( nHeight, nFirstEntry, &nLastVisible ); if ( pMenu->ImplGetNextVisible( nLastVisible ) == ITEMPOS_INVALID ) { - bScrollDown = sal_False; - ImplDrawScroller( sal_False ); + bScrollDown = false; + ImplDrawScroller( false ); } - Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( sal_False ).GetBoundRect(), SCROLL_CLIP ); + Scroll( 0, -nScrollEntryHeight, ImplCalcClipRegion( false ).GetBoundRect(), SCROLL_CLIP ); } - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); } void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) @@ -4591,12 +4591,12 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) if ( bScrollUp && ( nMouseY < nY ) ) { - ImplScroll( sal_True ); + ImplScroll( true ); nDelta = nY - nMouseY; } else if ( bScrollDown && ( nMouseY > ( aOutSz.Height() - nY ) ) ) { - ImplScroll( sal_False ); + ImplScroll( false ); nDelta = nMouseY - ( aOutSz.Height() - nY ); } @@ -4618,7 +4618,7 @@ void MenuFloatingWindow::ImplScroll( const Point& rMousePos ) aScrollTimer.Start(); } } -void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopupTimer ) +void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, bool bStartPopupTimer ) { // #57934# ggf. immediately close the active, as TH's backgroundstorage works. // #65750# we prefer to refrain from the background storage of small lines. @@ -4633,7 +4633,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup if ( nHighlightedItem != ITEMPOS_INVALID ) { - HighlightItem( nHighlightedItem, sal_False ); + HighlightItem( nHighlightedItem, false ); pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } @@ -4657,12 +4657,12 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup MenuFloatingWindow* pPWin = (MenuFloatingWindow*)pMenu->pStartedFrom->ImplGetWindow(); if( pPWin && pPWin->nHighlightedItem != i ) { - pPWin->HighlightItem( i, sal_True ); + pPWin->HighlightItem( i, true ); pPWin->nHighlightedItem = i; } } } - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); pMenu->SetHightlightItem(nHighlightedItem); pMenu->ImplCallHighlight( nHighlightedItem ); } @@ -4682,7 +4682,7 @@ void MenuFloatingWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bStartPopup } } -void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) +void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight ) { if( ! pMenu ) return; @@ -4733,7 +4733,7 @@ void MenuFloatingWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) IsNativeControlSupported( CTRL_MENU_POPUP, PART_MENU_ITEM ) ) { bDrawItemRect = false; - if( sal_False == DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, + if( !DrawNativeControl( CTRL_MENU_POPUP, PART_MENU_ITEM, aItemRect, CTRL_STATE_SELECTED | ( pData->bEnabled? CTRL_STATE_ENABLED: 0 ), aVal, @@ -4814,7 +4814,7 @@ Rectangle MenuFloatingWindow::ImplGetItemRect( sal_uInt16 nPos ) } -void MenuFloatingWindow::ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd ) +void MenuFloatingWindow::ImplCursorUpDown( bool bUp, bool bHomeEnd ) { if( ! pMenu ) return; @@ -4878,21 +4878,21 @@ void MenuFloatingWindow::ImplCursorUpDown( sal_Bool bUp, sal_Bool bHomeEnd ) // Is selection in visible area? if ( IsScrollMenu() ) { - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); while ( n < nFirstEntry ) - ImplScroll( sal_True ); + ImplScroll( true ); Size aOutSz = GetOutputSizePixel(); sal_uInt16 nLastVisible; ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); while ( n > nLastVisible ) { - ImplScroll( sal_False ); + ImplScroll( false ); ((PopupMenu*)pMenu)->ImplCalcVisEntries( aOutSz.Height(), nFirstEntry, &nLastVisible ); } } - ChangeHighlightItem( n, sal_False ); + ChangeHighlightItem( n, false ); break; } } while ( n != nLoop ); @@ -4916,7 +4916,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) case KEY_END: case KEY_HOME: { - ImplCursorUpDown( nCode == KEY_END, sal_True ); + ImplCursorUpDown( nCode == KEY_END, true ); } break; case KEY_F6: @@ -4965,7 +4965,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) pFloat->GrabFocus(); pFloat->KillActivePopup(); sal_uInt16 highlightItem = pFloat->GetHighlightedItem(); - pFloat->ChangeHighlightItem(highlightItem, sal_False); + pFloat->ChangeHighlightItem(highlightItem, false); } } } @@ -5036,7 +5036,7 @@ void MenuFloatingWindow::KeyInput( const KeyEvent& rKEvent ) { if ( pData->pSubMenu || nDuplicates > 1 ) { - ChangeHighlightItem( nPos, sal_False ); + ChangeHighlightItem( nPos, false ); HighlightChanged( 0 ); } else @@ -5078,16 +5078,16 @@ void MenuFloatingWindow::Paint( const Rectangle& ) } if ( IsScrollMenu() ) { - ImplDrawScroller( sal_True ); - ImplDrawScroller( sal_False ); + ImplDrawScroller( true ); + ImplDrawScroller( false ); } SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); pMenu->ImplPaint( this, nScrollerHeight, ImplGetStartY() ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); } -void MenuFloatingWindow::ImplDrawScroller( sal_Bool bUp ) +void MenuFloatingWindow::ImplDrawScroller( bool bUp ) { if( ! pMenu ) return; @@ -5192,7 +5192,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : nSaveFocusId = 0; nHighlightedItem = ITEMPOS_INVALID; nRolloveredItem = ITEMPOS_INVALID; - mbAutoPopup = sal_True; + mbAutoPopup = true; nSaveFocusId = 0; bIgnoreFirstMove = true; bStayActive = false; @@ -5206,7 +5206,7 @@ MenuBarWindow::MenuBarWindow( Window* pParent ) : aCloser.SetOutStyle( TOOLBOX_STYLE_FLAT ); aCloser.SetBackground(); - aCloser.SetPaintTransparent( sal_True ); + aCloser.SetPaintTransparent( true ); aCloser.SetParentClipMode( PARENTCLIPMODE_NOCLIP ); aCloser.InsertItem( IID_DOCUMENTCLOSE, aCloser.maImage, 0 ); @@ -5259,7 +5259,7 @@ void MenuBarWindow::SetMenu( MenuBar* pMen ) } } -void MenuBarWindow::ShowButtons( sal_Bool bClose, sal_Bool bFloat, sal_Bool bHide ) +void MenuBarWindow::ShowButtons( bool bClose, bool bFloat, bool bHide ) { aCloser.ShowItem( IID_DOCUMENTCLOSE, bClose ); aCloser.Show( bClose || ! m_aAddButtons.empty() ); @@ -5346,7 +5346,7 @@ IMPL_LINK_NOARG(MenuBarWindow, HideHdl) return pMenu ? ((MenuBar*)pMenu)->GetHideButtonClickHdl().Call( pMenu ) : 0; } -void MenuBarWindow::ImplCreatePopup( sal_Bool bPreSelectFirst ) +void MenuBarWindow::ImplCreatePopup( bool bPreSelectFirst ) { MenuItemData* pItemData = pMenu ? pMenu->GetItemList()->GetDataFromPos( nHighlightedItem ) : NULL; if ( pItemData ) @@ -5406,11 +5406,11 @@ void MenuBarWindow::KillActivePopup() return; // kill it later if ( pActivePopup->bInCallback ) - pActivePopup->bCanceled = sal_True; + pActivePopup->bCanceled = true; - pActivePopup->bInCallback = sal_True; + pActivePopup->bInCallback = true; pActivePopup->Deactivate(); - pActivePopup->bInCallback = sal_False; + pActivePopup->bInCallback = false; // check for pActivePopup, if stopped by deactivate... if ( pActivePopup->ImplGetWindow() ) { @@ -5428,22 +5428,22 @@ void MenuBarWindow::PopupClosed( Menu* pPopup ) if ( pPopup == pActivePopup ) { KillActivePopup(); - ChangeHighlightItem( ITEMPOS_INVALID, sal_False, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false, ImplGetFrameWindow()->ImplGetFrameData()->mbHasFocus, false ); } } void MenuBarWindow::MouseButtonDown( const MouseEvent& rMEvt ) { - mbAutoPopup = sal_True; + mbAutoPopup = true; sal_uInt16 nEntry = ImplFindEntry( rMEvt.GetPosPixel() ); if ( ( nEntry != ITEMPOS_INVALID ) && !pActivePopup ) { - ChangeHighlightItem( nEntry, sal_False ); + ChangeHighlightItem( nEntry, false ); } else { KillActivePopup(); - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); } } @@ -5459,7 +5459,7 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if ( rMEvt.IsLeaveWindow() ) { if ( nRolloveredItem != ITEMPOS_INVALID && nRolloveredItem != nHighlightedItem ) - HighlightItem( nRolloveredItem, sal_False ); + HighlightItem( nRolloveredItem, false ); nRolloveredItem = ITEMPOS_INVALID; return; @@ -5471,10 +5471,10 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if ( nRolloveredItem != nEntry ) { if ( nRolloveredItem != ITEMPOS_INVALID ) - HighlightItem( nRolloveredItem, sal_False ); + HighlightItem( nRolloveredItem, false ); nRolloveredItem = nEntry; - HighlightItem( nRolloveredItem, sal_True ); + HighlightItem( nRolloveredItem, true ); } return; } @@ -5488,10 +5488,10 @@ void MenuBarWindow::MouseMove( const MouseEvent& rMEvt ) if ( ( nEntry != ITEMPOS_INVALID ) && ( nEntry != nHighlightedItem ) ) - ChangeHighlightItem( nEntry, sal_False ); + ChangeHighlightItem( nEntry, false ); } -void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sal_Bool bAllowRestoreFocus, sal_Bool bDefaultToDocument) +void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, bool bSelectEntry, bool bAllowRestoreFocus, bool bDefaultToDocument) { if( ! pMenu ) return; @@ -5505,7 +5505,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa bool bJustActivated = false; if ( ( nHighlightedItem == ITEMPOS_INVALID ) && ( n != ITEMPOS_INVALID ) ) { - ImplGetSVData()->maWinData.mbNoDeactivate = sal_True; + ImplGetSVData()->maWinData.mbNoDeactivate = true; if( !bStayActive ) { // #105406# avoid saving the focus when we already have the focus @@ -5516,7 +5516,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa if( !ImplGetSVData()->maWinData.mbNoSaveFocus ) { // we didn't clean up last time - Window::EndSaveFocus( nSaveFocusId, sal_False ); // clean up + Window::EndSaveFocus( nSaveFocusId, false ); // clean up nSaveFocusId = 0; if( !bNoSaveFocus ) nSaveFocusId = Window::SaveFocus(); // only save focus when initially activated @@ -5533,17 +5533,17 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa } else bStayActive = false; - pMenu->bInCallback = sal_True; // set here if Activate overloaded + pMenu->bInCallback = true; // set here if Activate overloaded pMenu->Activate(); - pMenu->bInCallback = sal_False; + pMenu->bInCallback = false; bJustActivated = true; } else if ( ( nHighlightedItem != ITEMPOS_INVALID ) && ( n == ITEMPOS_INVALID ) ) { - pMenu->bInCallback = sal_True; + pMenu->bInCallback = true; pMenu->Deactivate(); - pMenu->bInCallback = sal_False; - ImplGetSVData()->maWinData.mbNoDeactivate = sal_False; + pMenu->bInCallback = false; + ImplGetSVData()->maWinData.mbNoDeactivate = false; if( !ImplGetSVData()->maWinData.mbNoSaveFocus ) { sal_uLong nTempFocusId = nSaveFocusId; @@ -5558,7 +5558,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa if ( nHighlightedItem != ITEMPOS_INVALID ) { if ( nHighlightedItem != nRolloveredItem ) - HighlightItem( nHighlightedItem, sal_False ); + HighlightItem( nHighlightedItem, false ); pMenu->ImplCallEventListeners( VCLEVENT_MENU_DEHIGHLIGHT, nHighlightedItem ); } @@ -5566,9 +5566,9 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa nHighlightedItem = (sal_uInt16)n; DBG_ASSERT( ( nHighlightedItem == ITEMPOS_INVALID ) || pMenu->ImplIsVisible( nHighlightedItem ), "ChangeHighlightItem: Not visible!" ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); else if ( nRolloveredItem != ITEMPOS_INVALID ) - HighlightItem( nRolloveredItem, sal_True ); + HighlightItem( nRolloveredItem, true ); pMenu->SetHightlightItem(nHighlightedItem); pMenu->ImplCallHighlight(nHighlightedItem); @@ -5580,7 +5580,7 @@ void MenuBarWindow::ChangeHighlightItem( sal_uInt16 n, sal_Bool bSelectEntry, sa GrabFocus(); } -void MenuBarWindow::HighlightItem( sal_uInt16 nPos, sal_Bool bHighlight ) +void MenuBarWindow::HighlightItem( sal_uInt16 nPos, bool bHighlight ) { if( ! pMenu ) return; @@ -5709,15 +5709,15 @@ void MenuBarWindow::KeyInput( const KeyEvent& rKEvent ) Window::KeyInput( rKEvent ); } -sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bFromMenu ) +bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, bool bFromMenu ) { if( ! pMenu ) - return sal_False; + return false; if ( pMenu->bInCallback ) - return sal_True; // swallow + return true; // swallow - sal_Bool bDone = sal_False; + bool bDone = false; sal_uInt16 nCode = rKEvent.GetKeyCode().GetCode(); if( GetParent() ) @@ -5727,7 +5727,7 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF SystemWindow *pSysWin = (SystemWindow*)GetParent()->GetWindow( WINDOW_CLIENT ); if( pSysWin->GetTaskPaneList() ) if( pSysWin->GetTaskPaneList()->HandleKeyEvent( rKEvent ) ) - return sal_True; + return true; } } @@ -5736,15 +5736,15 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF mbAutoPopup = ImplGetSVData()->maNWFData.mbOpenMenuOnF10; if ( nHighlightedItem == ITEMPOS_INVALID ) { - ChangeHighlightItem( 0, sal_False ); + ChangeHighlightItem( 0, false ); GrabFocus(); } else { - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); nSaveFocusId = 0; } - bDone = sal_True; + bDone = true; } else if ( bFromMenu ) { @@ -5797,14 +5797,14 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF MenuItemData* pData = (MenuItemData*)pMenu->GetItemList()->GetDataFromPos( n ); if ( ( pData->eType != MENUITEM_SEPARATOR ) && pMenu->ImplIsVisible( n ) ) { - sal_Bool bDoSelect = sal_True; + bool bDoSelect = true; if( ImplGetSVData()->maNWFData.mbOpenMenuOnF10 ) bDoSelect = bWasHighlight; ChangeHighlightItem( n, bDoSelect ); break; } } while ( n != nLoop ); - bDone = sal_True; + bDone = true; } else if ( nCode == KEY_RETURN ) { @@ -5812,36 +5812,36 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF else if ( !mbAutoPopup ) { - ImplCreatePopup( sal_True ); - mbAutoPopup = sal_True; + ImplCreatePopup( true ); + mbAutoPopup = true; } - bDone = sal_True; + bDone = true; } else if ( ( nCode == KEY_UP ) || ( nCode == KEY_DOWN ) ) { if ( !mbAutoPopup ) { - ImplCreatePopup( sal_True ); - mbAutoPopup = sal_True; + ImplCreatePopup( true ); + mbAutoPopup = true; } - bDone = sal_True; + bDone = true; } else if ( nCode == KEY_ESCAPE || ( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) ) { if( pActivePopup ) { // bring focus to menu bar without any open popup - mbAutoPopup = sal_False; + mbAutoPopup = false; sal_uInt16 n = nHighlightedItem; nHighlightedItem = ITEMPOS_INVALID; bStayActive = true; - ChangeHighlightItem( n, sal_False ); + ChangeHighlightItem( n, false ); bStayActive = false; KillActivePopup(); GrabFocus(); } else - ChangeHighlightItem( ITEMPOS_INVALID, sal_False ); + ChangeHighlightItem( ITEMPOS_INVALID, false ); if( nCode == KEY_F6 && rKEvent.GetKeyCode().IsMod1() ) { @@ -5849,7 +5849,7 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF GrabFocusToDocument(); } - bDone = sal_True; + bDone = true; } } @@ -5862,9 +5862,9 @@ sal_Bool MenuBarWindow::ImplHandleKeyEvent( const KeyEvent& rKEvent, sal_Bool bF MenuItemData* pData = pMenu->GetItemList()->SearchItem( nCharCode, rKEvent.GetKeyCode(), nEntry, nDuplicates, nHighlightedItem ); if ( pData && (nEntry != ITEMPOS_INVALID) ) { - mbAutoPopup = sal_True; - ChangeHighlightItem( nEntry, sal_True ); - bDone = sal_True; + mbAutoPopup = true; + ChangeHighlightItem( nEntry, true ); + bDone = true; } } } @@ -5903,7 +5903,7 @@ void MenuBarWindow::Paint( const Rectangle& ) SetFillColor( GetSettings().GetStyleSettings().GetMenuColor() ); pMenu->ImplPaint( this, 0 ); if ( nHighlightedItem != ITEMPOS_INVALID ) - HighlightItem( nHighlightedItem, sal_True ); + HighlightItem( nHighlightedItem, true ); // in high contrast mode draw a separating line on the lower edge if( ! IsNativeControlSupported( CTRL_MENUBAR, PART_ENTIRE_CONTROL) && @@ -5979,7 +5979,7 @@ void MenuBarWindow::RequestHelp( const HelpEvent& rHEvt ) { sal_uInt16 nId = nHighlightedItem; if ( rHEvt.GetMode() & (HELPMODE_CONTEXT | HELPMODE_EXTENDED) ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_True ); + ChangeHighlightItem( ITEMPOS_INVALID, true ); Rectangle aHighlightRect( ImplGetItemRect( nHighlightedItem ) ); if( !ImplHandleHelpEvent( this, pMenu, nId, rHEvt, aHighlightRect ) ) @@ -6057,16 +6057,16 @@ void MenuBarWindow::DataChanged( const DataChangedEvent& rDCEvt ) void MenuBarWindow::LoseFocus() { - if ( !HasChildPathFocus( sal_True ) ) - ChangeHighlightItem( ITEMPOS_INVALID, sal_False, sal_False ); + if ( !HasChildPathFocus( true ) ) + ChangeHighlightItem( ITEMPOS_INVALID, false, false ); } void MenuBarWindow::GetFocus() { if ( nHighlightedItem == ITEMPOS_INVALID ) { - mbAutoPopup = sal_False; // do not open menu when activated by focus handling like taskpane cycling - ChangeHighlightItem( 0, sal_False ); + mbAutoPopup = false; // do not open menu when activated by focus handling like taskpane cycling + ChangeHighlightItem( 0, false ); } } diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx index fe45ae8928cd..2fe22fbee90c 100644 --- a/vcl/source/window/mnemonic.cxx +++ b/vcl/source/window/mnemonic.cxx @@ -137,7 +137,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) OUString aKey = xCharClass->toUpper( _rKey, 0, _rKey.getLength(), rLocale ); - sal_Bool bChanged = sal_False; + bool bChanged = false; sal_Int32 nLen = aKey.getLength(); bool bCJK = MsLangId::isCJK(Application::GetSettings().GetUILanguageTag().getLanguageType()); @@ -202,7 +202,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) { maMnemonics[nMnemonicIndex] = 0; rKey = rKey.replaceAt( nIndex, 0, OUString(MNEMONIC_CHAR) ); - bChanged = sal_True; + bChanged = true; break; } } @@ -254,7 +254,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) { maMnemonics[nBestMnemonicIndex] = 0; rKey = rKey.replaceAt( nBestIndex, 0, OUString(MNEMONIC_CHAR) ); - bChanged = sal_True; + bChanged = true; } } } @@ -299,7 +299,7 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey ) nIndex--; } rKey = rKey.replaceAt( nIndex, 0, aStr ); - bChanged = sal_True; + bChanged = true; break; } } diff --git a/vcl/source/window/mnemonicengine.cxx b/vcl/source/window/mnemonicengine.cxx index b903c31837d8..3fbf5923c4d1 100644 --- a/vcl/source/window/mnemonicengine.cxx +++ b/vcl/source/window/mnemonicengine.cxx @@ -81,7 +81,7 @@ namespace vcl bool MnemonicEngine::HandleKeyEvent( const KeyEvent& _rKEvt ) { - sal_Bool bAccelKey = _rKEvt.GetKeyCode().IsMod2(); + bool bAccelKey = _rKEvt.GetKeyCode().IsMod2(); if ( !bAccelKey ) return false; diff --git a/vcl/source/window/msgbox.cxx b/vcl/source/window/msgbox.cxx index 1f3019a09fc5..3a700f10e711 100644 --- a/vcl/source/window/msgbox.cxx +++ b/vcl/source/window/msgbox.cxx @@ -60,9 +60,9 @@ void MessBox::ImplInitMessBoxData() { mpVCLMultiLineEdit = NULL; mpFixedImage = NULL; - mbHelpBtn = sal_False; + mbHelpBtn = false; mpCheckBox = NULL; - mbCheck = sal_False; + mbCheck = false; } // ----------------------------------------------------------------------- @@ -209,7 +209,7 @@ void MessBox::ImplPosControls() if ( !mbHelpBtn ) { AddButton( BUTTON_HELP, RET_HELP, BUTTONDIALOG_HELPBUTTON, 3 ); - mbHelpBtn = sal_True; + mbHelpBtn = true; } } else @@ -217,7 +217,7 @@ void MessBox::ImplPosControls() if ( mbHelpBtn ) { RemoveButton( RET_HELP ); - mbHelpBtn = sal_False; + mbHelpBtn = false; } } @@ -393,8 +393,8 @@ void MessBox::ImplPosControls() mpVCLMultiLineEdit->SetText( aMessText ); mpVCLMultiLineEdit->SetPosSizePixel( aTextPos, aMEditSize ); mpVCLMultiLineEdit->Show(); - mpVCLMultiLineEdit->SetPaintTransparent(sal_True); - mpVCLMultiLineEdit->EnableCursor(sal_False); + mpVCLMultiLineEdit->SetPaintTransparent(true); + mpVCLMultiLineEdit->EnableCursor(false); SetPageSizePixel( aPageSize ); } @@ -411,14 +411,14 @@ void MessBox::StateChanged( StateChangedType nType ) // ----------------------------------------------------------------------- -sal_Bool MessBox::GetCheckBoxState() const +bool MessBox::GetCheckBoxState() const { return mpCheckBox ? mpCheckBox->IsChecked() : mbCheck; } // ----------------------------------------------------------------------- -void MessBox::SetCheckBoxState( sal_Bool bCheck ) +void MessBox::SetCheckBoxState( bool bCheck ) { if( mpCheckBox ) mpCheckBox->Check( bCheck ); mbCheck = bCheck; diff --git a/vcl/source/window/printdlg.cxx b/vcl/source/window/printdlg.cxx index ff5121212b39..371fceab8a6d 100644 --- a/vcl/source/window/printdlg.cxx +++ b/vcl/source/window/printdlg.cxx @@ -70,7 +70,7 @@ PrintDialog::PrintPreviewWindow::PrintPreviewWindow( Window* i_pParent ) , maHorzDim( this, WB_HORZ | WB_CENTER ) , maVertDim( this, WB_VERT | WB_VCENTER ) { - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); maPageVDev.SetBackground( Color( COL_WHITE ) ); maHorzDim.Show(); @@ -140,7 +140,7 @@ void PrintDialog::PrintPreviewWindow::Resize() aScaledSize.Width() = PREVIEW_BITMAP_WIDTH; aScaledSize.Height() = PREVIEW_BITMAP_WIDTH * aAspectRatio; - maPageVDev.SetOutputSizePixel( aScaledSize, sal_False ); + maPageVDev.SetOutputSizePixel( aScaledSize, false ); // position dimension lines Point aRef( nTextHeight + (aNewSize.Width() - maPreviewSize.Width())/2, @@ -219,7 +219,7 @@ void PrintDialog::PrintPreviewWindow::setPreview( const GDIMetaFile& i_rNewPrevi maReplacementString = i_rReplacement; mbGreyscale = i_bGreyscale; maPageVDev.SetReferenceDevice( i_nDPIX, i_nDPIY ); - maPageVDev.EnableOutput( sal_True ); + maPageVDev.EnableOutput( true ); // use correct measurements const LocaleDataWrapper& rLocWrap( GetSettings().GetLocaleDataWrapper() ); @@ -436,7 +436,7 @@ void PrintDialog::NUpTabPage::showAdvancedControls( bool i_bShow ) void PrintDialog::NUpTabPage::initFromMultiPageSetup( const vcl::PrinterController::MultiPageSetup& i_rMPS ) { mpNupOrderWin->Show(); - mpPagesBtn->Check( sal_True ); + mpPagesBtn->Check( true ); mpBrochureBtn->Show( false ); // setup field units for metric fields @@ -509,7 +509,7 @@ void PrintDialog::JobTabPage::readFromSettings() if( aValue.equalsIgnoreAsciiCase("alwaysoff") ) { mnCollateUIMode = 1; - mpCollateBox->Check( sal_False ); + mpCollateBox->Check( false ); mpCollateBox->Enable( false ); } else @@ -548,11 +548,11 @@ void PrintDialog::OutputOptPage::readFromSettings() OUString( "CollateSingleJobs" ) ); if ( aValue.equalsIgnoreAsciiCase("true") ) { - mpCollateSingleJobsBox->Check( sal_True ); + mpCollateSingleJobsBox->Check( true ); } else { - mpCollateSingleJobsBox->Check( sal_False ); + mpCollateSingleJobsBox->Check( false ); } } @@ -581,7 +581,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont , mnCachedPages( 0 ) , maPrintToFileText( VclResId( SV_PRINT_TOFILE_TXT ).toString() ) , maDefPrtText( VclResId( SV_PRINT_DEFPRT_TXT ).toString() ) - , mbShowLayoutPage( sal_True ) + , mbShowLayoutPage( true ) { get(mpOKButton, "ok"); get(mpCancelButton, "cancel"); @@ -710,7 +710,7 @@ PrintDialog::PrintDialog( Window* i_pParent, const boost::shared_ptr<PrinterCont // setup dependencies checkControlDependencies(); - if ( maPController->getBoolProperty( OUString( "HideHelpButton" ), sal_False ) ) + if ( maPController->getBoolProperty( OUString( "HideHelpButton" ), false ) ) mpHelpButton->Hide(); // set initial focus to "Number of copies" maJobPage.mpCopyCountField->GrabFocus(); @@ -846,7 +846,7 @@ void PrintDialog::setupOptionalUI() OUString aGroupingHint; OUString aDependsOnName; sal_Int32 nDependsOnValue = 0; - sal_Bool bUseDependencyRow = sal_False; + bool bUseDependencyRow = false; for( int n = 0; n < aOptProp.getLength(); n++ ) { @@ -880,7 +880,7 @@ void PrintDialog::setupOptionalUI() } else if ( rEntry.Name == "Enabled" ) { - sal_Bool bValue = sal_True; + bool bValue = true; rEntry.Value >>= bValue; } else if ( rEntry.Name == "GroupingHint" ) @@ -933,7 +933,7 @@ void PrintDialog::setupOptionalUI() } else if ( rEntry.Name == "HintNoLayoutPage" ) { - sal_Bool bNoLayoutPage = sal_False; + bool bNoLayoutPage = false; rEntry.Value >>= bNoLayoutPage; mbShowLayoutPage = ! bNoLayoutPage; } @@ -979,7 +979,7 @@ void PrintDialog::setupOptionalUI() maNUpPage.mpBrochureBtn->SetText( aText ); maNUpPage.mpBrochureBtn->Show(); - sal_Bool bVal = sal_False; + bool bVal = false; PropertyValue* pVal = maPController->getValue( aPropertyName ); if( pVal ) pVal->Value >>= bVal; @@ -1005,7 +1005,7 @@ void PrintDialog::setupOptionalUI() pNewBox->SetText( aText ); pNewBox->Show(); - sal_Bool bVal = sal_False; + bool bVal = false; PropertyValue* pVal = maPController->getValue( aPropertyName ); if( pVal ) pVal->Value >>= bVal; @@ -1543,7 +1543,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) } else if( pButton == maOptionsPage.mpPapersizeFromSetup ) { - sal_Bool bChecked = maOptionsPage.mpPapersizeFromSetup->IsChecked(); + bool bChecked = maOptionsPage.mpPapersizeFromSetup->IsChecked(); maPController->setPapersizeFromSetup( bChecked ); maPController->setValue( OUString( "PapersizeFromSetup" ), makeAny( bChecked ) ); @@ -1554,7 +1554,7 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) PropertyValue* pVal = getValueForWindow( pButton ); if( pVal ) { - sal_Bool bVal = maNUpPage.mpBrochureBtn->IsChecked(); + bool bVal = maNUpPage.mpBrochureBtn->IsChecked(); pVal->Value <<= bVal; checkOptionalControlDependencies(); @@ -1578,12 +1578,12 @@ IMPL_LINK( PrintDialog, ClickHdl, Button*, pButton ) else if( pButton == maJobPage.mpCollateBox ) { maPController->setValue( OUString( "Collate" ), - makeAny( sal_Bool(isCollate()) ) ); + makeAny( isCollate() ) ); checkControlDependencies(); } else if( pButton == maJobPage.mpReverseOrderBox ) { - sal_Bool bChecked = maJobPage.mpReverseOrderBox->IsChecked(); + bool bChecked = maJobPage.mpReverseOrderBox->IsChecked(); maPController->setReversePrint( bChecked ); maPController->setValue( OUString( "PrintReverse" ), makeAny( bChecked ) ); @@ -1624,7 +1624,7 @@ IMPL_LINK( PrintDialog, ModifyHdl, Edit*, pEdit ) maPController->setValue( OUString( "CopyCount" ), makeAny( sal_Int32(maJobPage.mpCopyCountField->GetValue()) ) ); maPController->setValue( OUString( "Collate" ), - makeAny( sal_Bool(isCollate()) ) ); + makeAny( isCollate() ) ); } return 0; } @@ -1660,7 +1660,7 @@ void PrintDialog::updateWindowFromProperty( const OUString& i_rProperty ) const std::vector< Window* >& rWindows( it->second ); if( ! rWindows.empty() ) { - sal_Bool bVal = sal_False; + bool bVal = false; sal_Int32 nVal = -1; if( pValue->Value >>= bVal ) { @@ -1721,7 +1721,7 @@ IMPL_LINK( PrintDialog, UIOption_CheckHdl, CheckBox*, i_pBox ) { makeEnabled( i_pBox ); - sal_Bool bVal = i_pBox->IsChecked(); + bool bVal = i_pBox->IsChecked(); pVal->Value <<= bVal; checkOptionalControlDependencies(); diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index f07ccaa203d6..77448d15f921 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -27,7 +27,7 @@ FunctionSet::~FunctionSet() } -inline sal_Bool SelectionEngine::ShouldDeselect( sal_Bool bModifierKey1 ) const +inline bool SelectionEngine::ShouldDeselect( bool bModifierKey1 ) const { // return !( eSelMode == MULTIPLE_SELECTION && bModifierKey1 ); return eSelMode != MULTIPLE_SELECTION || !bModifierKey1; @@ -97,7 +97,7 @@ void SelectionEngine::SetSelectionMode( SelectionMode eMode ) |* *************************************************************************/ -void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ) +void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) { if ( !pFunctionSet ) return; @@ -151,15 +151,15 @@ void SelectionEngine::CursorPosChanging( sal_Bool bShift, sal_Bool bMod1 ) |* *************************************************************************/ -sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) +bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_CMDEVT); if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) - return sal_False; + return false; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; if ( nModifier & KEY_MOD2 ) - return sal_False; + return false; // in SingleSelection: Control-Taste filtern (damit auch // mit Ctrl-Click ein D&D gestartet werden kann) if ( nModifier == KEY_MOD1 && eSelMode == SINGLE_SELECTION ) @@ -182,14 +182,14 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { case 0: // KEY_NO_KEY { - sal_Bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); + bool bSelAtPoint = pFunctionSet->IsSelectionAtPoint( aPos ); nFlags &= (~SELENG_IN_ADD); if ( (nFlags & SELENG_DRG_ENAB) && bSelAtPoint ) { nFlags |= SELENG_WAIT_UPEVT; nFlags &= ~(SELENG_IN_SEL); pWin->ReleaseMouse(); - return sal_True; //auf STARTDRAG-Command-Event warten + return true; //auf STARTDRAG-Command-Event warten } if ( eSelMode != SINGLE_SELECTION ) { @@ -204,7 +204,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) // in einem Zug moeglich ist if (eSelMode == SINGLE_SELECTION && (nFlags & SELENG_DRG_ENAB)) nFlags |= SELENG_WAIT_UPEVT; - return sal_True; + return true; } case KEY_SHIFT: @@ -212,7 +212,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { pWin->ReleaseMouse(); nFlags &= (~SELENG_IN_SEL); - return sal_False; + return false; } if ( nFlags & SELENG_ADD_ALW ) nFlags |= SELENG_IN_ADD; @@ -227,7 +227,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) nFlags |= SELENG_HAS_ANCH; } pFunctionSet->SetCursorAtPoint( aPos ); - return sal_True; + return true; case KEY_MOD1: // Control nur bei Mehrfachselektion erlaubt @@ -235,7 +235,7 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= (~SELENG_IN_SEL); pWin->ReleaseMouse(); - return sal_True; // Mausclick verschlucken + return true; // Mausclick verschlucken } if ( nFlags & SELENG_HAS_ANCH ) { @@ -252,14 +252,14 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { pFunctionSet->SetCursorAtPoint( aPos ); } - return sal_True; + return true; case KEY_SHIFT + KEY_MOD1: if ( eSelMode != MULTIPLE_SELECTION ) { pWin->ReleaseMouse(); nFlags &= (~SELENG_IN_SEL); - return sal_False; + return false; } nFlags |= SELENG_IN_ADD; //bIsInAddMode = sal_True; if ( !(nFlags & SELENG_HAS_ANCH) ) @@ -268,10 +268,10 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) nFlags |= SELENG_HAS_ANCH; } pFunctionSet->SetCursorAtPoint( aPos ); - return sal_True; + return true; } - return sal_False; + return false; } /************************************************************************* @@ -280,14 +280,14 @@ sal_Bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) |* *************************************************************************/ -sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) +bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) { aWTimer.Stop(); //DbgOut("Up"); if( !pFunctionSet || !pWin ) { nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL); - return sal_False; + return false; } if( !rMEvt.IsRight() ) @@ -321,7 +321,7 @@ sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) } nFlags &= ~(SELENG_CMDEVT | SELENG_WAIT_UPEVT | SELENG_IN_SEL); - return sal_True; + return true; } /************************************************************************* @@ -330,21 +330,21 @@ sal_Bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt ) |* *************************************************************************/ -sal_Bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) +bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) { if ( !pFunctionSet || !(nFlags & SELENG_IN_SEL) || (nFlags & (SELENG_CMDEVT | SELENG_WAIT_UPEVT)) ) - return sal_False; + return false; if( !(nFlags & SELENG_EXPANDONMOVE) ) - return sal_False; // auf DragEvent warten! + return false; // auf DragEvent warten! aLastMove = rMEvt; // wenn die Maus ausserhalb der Area steht, dann wird die // Frequenz des SetCursorAtPoint() nur durch den Timer bestimmt if( aWTimer.IsActive() && !aArea.IsInside( rMEvt.GetPosPixel() )) - return sal_True; + return true; aWTimer.SetTimeout( nUpdateInterval ); aWTimer.Start(); @@ -361,7 +361,7 @@ sal_Bool SelectionEngine::SelMouseMove( const MouseEvent& rMEvt ) //DbgOut("Move:SetCursor"); pFunctionSet->SetCursorAtPoint( rMEvt.GetPosPixel() ); - return sal_True; + return true; } /************************************************************************* diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx index 4cb24ee0e702..5b2480e50747 100644 --- a/vcl/source/window/split.cxx +++ b/vcl/source/window/split.cxx @@ -58,8 +58,8 @@ void Splitter::ImplInitSplitterData() mnSplitPos = 0; mnLastSplitPos = 0; mnStartSplitPos = 0; - mbDragFull = sal_False; - mbKbdSplitting = sal_False; + mbDragFull = false; + mbKbdSplitting = false; mbInKeyEvent = 0; mnKeyboardStepSize = SPLITTER_DEFAULTSTEPSIZE; } @@ -226,11 +226,11 @@ Splitter* Splitter::ImplFindSibling() // ----------------------------------------------------------------------- -sal_Bool Splitter::ImplSplitterActive() +bool Splitter::ImplSplitterActive() { // is splitter in document or at scrollbar handle ? - sal_Bool bActive = sal_True; + bool bActive = true; const StyleSettings& rSettings = GetSettings().GetStyleSettings(); long nA = rSettings.GetScrollBarSize(); long nB = rSettings.GetSplitSize(); @@ -239,12 +239,12 @@ sal_Bool Splitter::ImplSplitterActive() if ( mbHorzSplit ) { if( aSize.Width() == nB && aSize.Height() == nA ) - bActive = sal_False; + bActive = false; } else { if( aSize.Width() == nA && aSize.Height() == nB ) - bActive = sal_False; + bActive = false; } return bActive; } @@ -366,7 +366,7 @@ void Splitter::ImplKbdTracking( KeyCode aKeyCode ) if( !mbKbdSplitting ) return; else - mbKbdSplitting = sal_False; + mbKbdSplitting = false; if ( nCode != KEY_ESCAPE ) { @@ -554,7 +554,7 @@ void Splitter::ImplStartKbdSplitting() if( mbKbdSplitting ) return; - mbKbdSplitting = sal_True; + mbKbdSplitting = true; StartSplit(); @@ -626,7 +626,7 @@ void Splitter::LoseFocus() { KeyCode aReturnKey( KEY_RETURN ); ImplKbdTracking( aReturnKey ); - mbKbdSplitting = sal_False; + mbKbdSplitting = false; } Invalidate(); } diff --git a/vcl/source/window/splitwin.cxx b/vcl/source/window/splitwin.cxx index 55b934382fc4..d5fc03b5d16a 100644 --- a/vcl/source/window/splitwin.cxx +++ b/vcl/source/window/splitwin.cxx @@ -108,7 +108,7 @@ namespace { #define SPLIT_WINDOW ((sal_uInt16)0x0004) #define SPLIT_NOSPLIT ((sal_uInt16)0x8000) -static void ImplCalcBorder( WindowAlign eAlign, sal_Bool bNoAlign, +static void ImplCalcBorder( WindowAlign eAlign, bool bNoAlign, long& rLeft, long& rTop, long& rRight, long& rBottom ) { @@ -310,7 +310,7 @@ static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, Window* pWindow ) } static sal_uInt16 ImplFindItem( ImplSplitSet* pSet, const Point& rPos, - sal_Bool bRows, sal_Bool bDown = sal_True ) + bool bRows, bool bDown = true ) { sal_uInt16 i; sal_uInt16 nItems = pSet->mnItems; @@ -379,7 +379,7 @@ static void ImplDeleteSet( ImplSplitSet* pSet ) static void ImplCalcSet( ImplSplitSet* pSet, long nSetLeft, long nSetTop, long nSetWidth, long nSetHeight, - sal_Bool bRows, sal_Bool bDown = sal_True ) + bool bRows, bool bDown = true ) { if ( !pSet->mpItems ) return; @@ -753,8 +753,8 @@ static void ImplCalcSet( ImplSplitSet* pSet, } } -void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bool bHide, - sal_Bool bRows, sal_Bool /*bDown*/ ) +void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, bool bHide, + bool bRows, bool /*bDown*/ ) { sal_uInt16 i; sal_uInt16 nItems = pSet->mnItems; @@ -827,9 +827,9 @@ void SplitWindow::ImplCalcSet2( SplitWindow* pWindow, ImplSplitSet* pSet, sal_Bo { if ( pItems[i].mpSet ) { - sal_Bool bTempHide = bHide; + bool bTempHide = bHide; if ( !pItems[i].mnWidth || !pItems[i].mnHeight ) - bTempHide = sal_True; + bTempHide = true; ImplCalcSet2( pWindow, pItems[i].mpSet, bTempHide, ((pItems[i].mnBits & SWIB_COLSET) == 0) ); } @@ -958,7 +958,7 @@ void SplitWindow::ImplDrawBack( SplitWindow* pWindow, ImplSplitSet* pSet ) } static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, - sal_Bool bRows, sal_Bool bDown = sal_True ) + bool bRows, bool bDown = true ) { if ( !pSet->mpItems ) return; @@ -1052,7 +1052,7 @@ static void ImplDrawSplit( SplitWindow* pWindow, ImplSplitSet* pSet, sal_uInt16 SplitWindow::ImplTestSplit( ImplSplitSet* pSet, const Point& rPos, long& rMouseOff, ImplSplitSet** ppFoundSet, sal_uInt16& rFoundPos, - sal_Bool bRows, sal_Bool /*bDown*/ ) + bool bRows, bool /*bDown*/ ) { if ( !pSet->mpItems ) return 0; @@ -1258,29 +1258,29 @@ void SplitWindow::ImplInit( Window* pParent, WinBits nStyle ) mnMouseModifier = 0; mnMStartPos = 0; mnMSplitPos = 0; - mbDragFull = sal_False; - mbHorz = sal_True; - mbBottomRight = sal_False; - mbCalc = sal_False; - mbRecalc = sal_True; - mbInvalidate = sal_True; - mbAutoHide = sal_False; - mbFadeIn = sal_False; - mbFadeOut = sal_False; - mbAutoHideIn = sal_False; - mbAutoHideDown = sal_False; - mbFadeInDown = sal_False; - mbFadeOutDown = sal_False; - mbAutoHidePressed = sal_False; - mbFadeInPressed = sal_False; - mbFadeOutPressed = sal_False; - mbFadeNoButtonMode = sal_False; - mbNoAlign = sal_False; + mbDragFull = false; + mbHorz = true; + mbBottomRight = false; + mbCalc = false; + mbRecalc = true; + mbInvalidate = true; + mbAutoHide = false; + mbFadeIn = false; + mbFadeOut = false; + mbAutoHideIn = false; + mbAutoHideDown = false; + mbFadeInDown = false; + mbFadeOutDown = false; + mbAutoHidePressed = false; + mbFadeInPressed = false; + mbFadeOutPressed = false; + mbFadeNoButtonMode = false; + mbNoAlign = false; if ( nStyle & WB_NOSPLITDRAW ) { pNewSet->mnSplitSize -= 2; - mbInvalidate = sal_False; + mbInvalidate = false; } if ( nStyle & WB_BORDER ) @@ -1479,9 +1479,9 @@ void SplitWindow::ImplCalcLayout() nCurSize -= nSplitSize; nCurSize -= (mpMainSet->mnItems-1)*mpMainSet->mnSplitSize; - mbRecalc = sal_False; + mbRecalc = false; ImplSetWindowSize( nCalcSize-nCurSize ); - mbRecalc = sal_True; + mbRecalc = true; } } @@ -1522,13 +1522,13 @@ void SplitWindow::ImplCalcLayout() // Sets rekursiv berechnen ImplCalcSet( mpMainSet, nL, nT, nW, nH, mbHorz, !mbBottomRight ); - ImplCalcSet2( this, mpMainSet, sal_False, mbHorz, !mbBottomRight ); - mbCalc = sal_False; + ImplCalcSet2( this, mpMainSet, false, mbHorz, !mbBottomRight ); + mbCalc = false; } void SplitWindow::ImplUpdate() { - mbCalc = sal_True; + mbCalc = true; if ( IsReallyShown() && IsUpdateMode() && mbRecalc ) { @@ -1562,7 +1562,7 @@ void SplitWindow::ImplSplitMousePos( Point& rMousePos ) } } -void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest ) const +void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, bool bTest ) const { long nSplitSize = mpMainSet->mnSplitSize-1; if ( mbAutoHide || mbFadeOut || mbFadeIn ) @@ -1632,7 +1632,7 @@ void SplitWindow::ImplGetButtonRect( Rectangle& rRect, long nEx, sal_Bool bTest } } -void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const +void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, bool bTest ) const { Rectangle aRect; @@ -1647,7 +1647,7 @@ void SplitWindow::ImplGetAutoHideRect( Rectangle& rRect, sal_Bool bTest ) const rRect = aRect; } -void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const +void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, bool bTest ) const { Rectangle aRect; @@ -1657,12 +1657,12 @@ void SplitWindow::ImplGetFadeInRect( Rectangle& rRect, sal_Bool bTest ) const rRect = aRect; } -void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, sal_Bool ) const +void SplitWindow::ImplGetFadeOutRect( Rectangle& rRect, bool ) const { Rectangle aRect; if ( mbFadeOut ) - ImplGetButtonRect( aRect, 0, sal_False ); + ImplGetButtonRect( aRect, 0, false ); rRect = aRect; } @@ -1733,7 +1733,7 @@ void SplitWindow::ImplDrawButtonRect( const Rectangle& rRect, long nSize ) } } -void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) +void SplitWindow::ImplDrawAutoHide( bool bInPaint ) { if ( mbAutoHide ) { @@ -1808,7 +1808,7 @@ void SplitWindow::ImplDrawAutoHide( sal_Bool bInPaint ) } } -void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool bLeft ) +void SplitWindow::ImplDrawFadeArrow( const Point& rPt, bool bHorz, bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -1864,14 +1864,14 @@ void SplitWindow::ImplDrawFadeArrow( const Point& rPt, sal_Bool bHorz, sal_Bool } } -void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool bLeft ) +void SplitWindow::ImplDrawGrip( const Rectangle& rRect, bool bHorz, bool bLeft ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); if( rRect.IsInside( GetPointerPosPixel() ) ) { DrawWallpaper( rRect, Wallpaper( Color( COL_WHITE ) ) ); - DrawSelectionBackground( rRect, 2, sal_False, sal_False, sal_False ); + DrawSelectionBackground( rRect, 2, false, false, false ); } if( bHorz ) @@ -1922,24 +1922,24 @@ void SplitWindow::ImplDrawGrip( const Rectangle& rRect, sal_Bool bHorz, sal_Bool } } -void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint ) +void SplitWindow::ImplDrawFadeIn( bool bInPaint ) { if ( mbFadeIn ) { Rectangle aTempRect; ImplGetFadeInRect( aTempRect ); - sal_Bool bLeft = sal_True; + bool bLeft = true; switch ( meAlign ) { case WINDOWALIGN_TOP: case WINDOWALIGN_LEFT: - bLeft = sal_False; + bLeft = false; break; case WINDOWALIGN_BOTTOM: case WINDOWALIGN_RIGHT: default: - bLeft = sal_True; + bLeft = true; break; } @@ -1950,24 +1950,24 @@ void SplitWindow::ImplDrawFadeIn( sal_Bool bInPaint ) } } -void SplitWindow::ImplDrawFadeOut( sal_Bool bInPaint ) +void SplitWindow::ImplDrawFadeOut( bool bInPaint ) { if ( mbFadeOut ) { Rectangle aTempRect; ImplGetFadeOutRect( aTempRect ); - sal_Bool bLeft = sal_True; + bool bLeft = true; switch ( meAlign ) { case WINDOWALIGN_BOTTOM: case WINDOWALIGN_RIGHT: - bLeft = sal_False; + bLeft = false; break; case WINDOWALIGN_TOP: case WINDOWALIGN_LEFT: default: - bLeft = sal_True; + bLeft = true; break; } @@ -2208,35 +2208,35 @@ void SplitWindow::MouseButtonDown( const MouseEvent& rMEvt ) Point aMousePosPixel = rMEvt.GetPosPixel(); Rectangle aTestRect; - mbFadeNoButtonMode = sal_False; - ImplGetAutoHideRect( aTestRect, sal_True ); + mbFadeNoButtonMode = false; + ImplGetAutoHideRect( aTestRect, true ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbAutoHideDown = sal_True; - mbAutoHidePressed = sal_True; - ImplDrawAutoHide( sal_False ); + mbAutoHideDown = true; + mbAutoHidePressed = true; + ImplDrawAutoHide( false ); } else { - ImplGetFadeOutRect( aTestRect, sal_True ); + ImplGetFadeOutRect( aTestRect, true ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbFadeOutDown = sal_True; - mbFadeOutPressed = sal_True; - ImplDrawFadeOut( sal_False ); + mbFadeOutDown = true; + mbFadeOutPressed = true; + ImplDrawFadeOut( false ); } else { - ImplGetFadeInRect( aTestRect, sal_True ); + ImplGetFadeInRect( aTestRect, true ); if ( aTestRect.IsInside( aMousePosPixel ) ) { - mbFadeInDown = sal_True; - mbFadeInPressed = sal_True; - ImplDrawFadeIn( sal_False ); + mbFadeInDown = true; + mbFadeInPressed = true; + ImplDrawFadeIn( false ); } else if ( !aTestRect.IsEmpty() && !(mnWinStyle & WB_SIZEABLE) ) { - mbFadeNoButtonMode = sal_True; + mbFadeNoButtonMode = true; FadeIn(); return; } @@ -2292,30 +2292,30 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbAutoHideDown = sal_False; + mbAutoHideDown = false; if ( mbAutoHidePressed ) { - mbAutoHidePressed = sal_False; + mbAutoHidePressed = false; if ( !rTEvt.IsTrackingCanceled() ) { mbAutoHideIn = !mbAutoHideIn; - ImplDrawAutoHide( sal_False ); + ImplDrawAutoHide( false ); AutoHide(); } else - ImplDrawAutoHide( sal_False ); + ImplDrawAutoHide( false ); } } else { Rectangle aTestRect; - ImplGetAutoHideRect( aTestRect, sal_True ); - sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + ImplGetAutoHideRect( aTestRect, true ); + bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbAutoHidePressed ) { mbAutoHidePressed = bNewPressed; - ImplDrawAutoHide( sal_False ); + ImplDrawAutoHide( false ); } } } @@ -2323,11 +2323,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbFadeInDown = sal_False; + mbFadeInDown = false; if ( mbFadeInPressed ) { - mbFadeInPressed = sal_False; - ImplDrawFadeIn( sal_False ); + mbFadeInPressed = false; + ImplDrawFadeIn( false ); if ( !rTEvt.IsTrackingCanceled() ) FadeIn(); @@ -2336,12 +2336,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { Rectangle aTestRect; - ImplGetFadeInRect( aTestRect, sal_True ); - sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + ImplGetFadeInRect( aTestRect, true ); + bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); if ( bNewPressed != mbFadeInPressed ) { mbFadeInPressed = bNewPressed; - ImplDrawFadeIn( sal_False ); + ImplDrawFadeIn( false ); } } } @@ -2349,11 +2349,11 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) { if ( rTEvt.IsTrackingEnded() ) { - mbFadeOutDown = sal_False; + mbFadeOutDown = false; if ( mbFadeOutPressed ) { - mbFadeOutPressed = sal_False; - ImplDrawFadeOut( sal_False ); + mbFadeOutPressed = false; + ImplDrawFadeOut( false ); if ( !rTEvt.IsTrackingCanceled() ) FadeOut(); @@ -2362,12 +2362,12 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) else { Rectangle aTestRect; - ImplGetFadeOutRect( aTestRect, sal_True ); - sal_Bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); - if ( bNewPressed == sal_False ) + ImplGetFadeOutRect( aTestRect, true ); + bool bNewPressed = aTestRect.IsInside( aMousePosPixel ); + if ( !bNewPressed ) { mbFadeOutPressed = bNewPressed; - ImplDrawFadeOut( sal_False ); + ImplDrawFadeOut( false ); // We need a mouseevent with a position inside the button for the // ImplStartSplit function! @@ -2377,7 +2377,7 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) aOrgMEvt.GetModifier() ); ImplStartSplit( aNewMEvt ); - mbFadeOutDown = sal_False; + mbFadeOutDown = false; } } } @@ -2420,8 +2420,8 @@ void SplitWindow::Tracking( const TrackingEvent& rTEvt ) if ( bSplit ) { - sal_Bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? sal_True : sal_False; - sal_Bool bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True : sal_False; + bool bPropSmaller = (mnMouseModifier & KEY_SHIFT) ? sal_True : sal_False; + bool bPropGreater = (mnMouseModifier & KEY_MOD1) ? sal_True : sal_False; long nDelta = mnMSplitPos-mnMStartPos; if ( (mnSplitTest & SPLIT_WINDOW) && !mpMainSet->mpItems ) @@ -2500,9 +2500,9 @@ void SplitWindow::Paint( const Rectangle& ) ImplDrawBorder( this ); ImplDrawBorderLine( this ); - ImplDrawFadeOut( sal_True ); - ImplDrawFadeIn( sal_True ); - ImplDrawAutoHide( sal_True ); + ImplDrawFadeOut( true ); + ImplDrawFadeIn( true ); + ImplDrawAutoHide( true ); // FrameSet-Hintergruende zeichnen ImplDrawBack( this, mpMainSet ); @@ -2536,7 +2536,7 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) Rectangle aHelpRect; sal_uInt16 nHelpResId = 0; - ImplGetAutoHideRect( aHelpRect, sal_True ); + ImplGetAutoHideRect( aHelpRect, true ); if ( aHelpRect.IsInside( aMousePosPixel ) ) { if ( mbAutoHideIn ) @@ -2546,12 +2546,12 @@ void SplitWindow::RequestHelp( const HelpEvent& rHEvt ) } else { - ImplGetFadeInRect( aHelpRect, sal_True ); + ImplGetFadeInRect( aHelpRect, true ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEIN; else { - ImplGetFadeOutRect( aHelpRect, sal_True ); + ImplGetFadeOutRect( aHelpRect, true ); if ( aHelpRect.IsInside( aMousePosPixel ) ) nHelpResId = SV_HELPTEXT_FADEOUT; } @@ -2690,7 +2690,7 @@ void SplitWindow::InsertItem( sal_uInt16 nId, long nSize, InsertItem( nId, NULL, nSize, nPos, nSetId, nBits ); } -void SplitWindow::RemoveItem( sal_uInt16 nId, sal_Bool bHide ) +void SplitWindow::RemoveItem( sal_uInt16 nId, bool bHide ) { #ifdef DBG_UTIL sal_uInt16 nDbgDummy; @@ -2760,7 +2760,7 @@ void SplitWindow::Clear() } void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, - sal_Bool bPropSmall, sal_Bool bPropGreat ) + bool bPropSmall, bool bPropGreat ) { sal_uInt16 nItems; sal_uInt16 nPos; @@ -2841,7 +2841,7 @@ void SplitWindow::SplitItem( sal_uInt16 nId, long nNewSize, { nPos--; nDelta *= -1; - sal_Bool bTemp = bPropSmall; + bool bTemp = bPropSmall; bPropSmall = bPropGreat; bPropGreat = bTemp; } @@ -3101,15 +3101,15 @@ sal_uInt16 SplitWindow::GetSet( sal_uInt16 nId ) const return 0; } -sal_Bool SplitWindow::IsItemValid( sal_uInt16 nId ) const +bool SplitWindow::IsItemValid( sal_uInt16 nId ) const { sal_uInt16 nPos; ImplSplitSet* pSet = mpBaseSet ? ImplFindItem(mpBaseSet, nId, nPos) : NULL; if ( pSet ) - return sal_True; + return true; else - return sal_False; + return false; } sal_uInt16 SplitWindow::GetItemId( Window* pWindow ) const @@ -3164,28 +3164,28 @@ void SplitWindow::ImplNewAlign() { if ( mbNoAlign ) { - mbHorz = sal_False; - mbBottomRight = sal_False; + mbHorz = false; + mbBottomRight = false; } else { switch ( meAlign ) { case WINDOWALIGN_TOP: - mbHorz = sal_True; - mbBottomRight = sal_False; + mbHorz = true; + mbBottomRight = false; break; case WINDOWALIGN_BOTTOM: - mbHorz = sal_True; - mbBottomRight = sal_True; + mbHorz = true; + mbBottomRight = true; break; case WINDOWALIGN_LEFT: - mbHorz = sal_False; - mbBottomRight = sal_False; + mbHorz = false; + mbBottomRight = false; break; case WINDOWALIGN_RIGHT: - mbHorz = sal_False; - mbBottomRight = sal_True; + mbHorz = false; + mbBottomRight = true; break; } } @@ -3210,25 +3210,25 @@ void SplitWindow::SetAlign( WindowAlign eNewAlign ) } } -void SplitWindow::ShowAutoHideButton( sal_Bool bShow ) +void SplitWindow::ShowAutoHideButton( bool bShow ) { mbAutoHide = bShow; ImplUpdate(); } -void SplitWindow::ShowFadeInHideButton( sal_Bool bShow ) +void SplitWindow::ShowFadeInHideButton( bool bShow ) { mbFadeIn = bShow; ImplUpdate(); } -void SplitWindow::ShowFadeOutButton( sal_Bool bShow ) +void SplitWindow::ShowFadeOutButton( bool bShow ) { mbFadeOut = bShow; ImplUpdate(); } -void SplitWindow::SetAutoHideState( sal_Bool bAutoHide ) +void SplitWindow::SetAutoHideState( bool bAutoHide ) { mbAutoHideIn = bAutoHide; if ( IsReallyVisible() ) diff --git a/vcl/source/window/status.cxx b/vcl/source/window/status.cxx index 81ee2495d9e6..5cac8f0da7ff 100644 --- a/vcl/source/window/status.cxx +++ b/vcl/source/window/status.cxx @@ -79,7 +79,7 @@ struct ImplStatusItem OUString maQuickHelpText; OString maHelpId; void* mpUserData; - sal_Bool mbVisible; + bool mbVisible; OUString maAccessibleName; OUString maCommand; }; @@ -114,12 +114,12 @@ static Point ImplGetItemTextPos( const Size& rRectSize, const Size& rTextSize, // ----------------------------------------------------------------------- -sal_Bool StatusBar::ImplIsItemUpdate() +bool StatusBar::ImplIsItemUpdate() { if ( !mbProgressMode && mbVisibleItems && IsReallyVisible() && IsUpdateMode() ) - return sal_True; + return true; else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -138,10 +138,10 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) mpItemList = new ImplStatusItemList; mpImplData->mpVirDev = new VirtualDevice( *this ); mnCurItemId = 0; - mbFormat = sal_True; - mbVisibleItems = sal_True; - mbProgressMode = sal_False; - mbInUserDraw = sal_False; + mbFormat = true; + mbVisibleItems = true; + mbProgressMode = false; + mbInUserDraw = false; mnItemsWidth = STATUSBAR_OFFSET_X; mnDX = 0; mnDY = 0; @@ -149,7 +149,7 @@ void StatusBar::ImplInit( Window* pParent, WinBits nStyle ) mnItemY = STATUSBAR_OFFSET_Y; mnTextY = STATUSBAR_OFFSET_TEXTY; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); SetLineColor(); SetOutputSizePixel( CalcWindowSizePixel() ); @@ -180,8 +180,8 @@ StatusBar::~StatusBar() // ----------------------------------------------------------------------- -void StatusBar::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void StatusBar::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); @@ -228,7 +228,7 @@ void StatusBar::ImplInitSettings( sal_Bool bFont, IsNativeControlSupported( CTRL_WINDOW_BACKGROUND, PART_BACKGROUND_WINDOW ) ) { ImplGetWindowImpl()->mnNativeBackground = PART_BACKGROUND_WINDOW; - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); } } } @@ -306,7 +306,7 @@ void StatusBar::ImplFormat() } } - mbFormat = sal_False; + mbFormat = false; } // ----------------------------------------------------------------------- @@ -351,7 +351,7 @@ sal_uInt16 StatusBar::ImplGetFirstVisiblePos() const // ----------------------------------------------------------------------- -void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth ) +void StatusBar::ImplDrawText( bool bOffScreen, long nOldTextWidth ) { // prevent item box from being overwritten Rectangle aTextRect; @@ -388,7 +388,7 @@ void StatusBar::ImplDrawText( sal_Bool bOffScreen, long nOldTextWidth ) // ----------------------------------------------------------------------- -void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDrawText, sal_Bool bDrawFrame ) +void StatusBar::ImplDrawItem( bool bOffScreen, sal_uInt16 nPos, bool bDrawText, bool bDrawFrame ) { Rectangle aRect = ImplGetItemRectPos( nPos ); @@ -430,12 +430,12 @@ void StatusBar::ImplDrawItem( sal_Bool bOffScreen, sal_uInt16 nPos, sal_Bool bDr { if ( bOffScreen ) { - mbInUserDraw = sal_True; + mbInUserDraw = true; mpImplData->mpVirDev->EnableRTL( IsRTLEnabled() ); UserDrawEvent aODEvt( mpImplData->mpVirDev, Rectangle( Point(), aTextRectSize ), pItem->mnId ); UserDraw( aODEvt ); - mpImplData->mpVirDev->EnableRTL( sal_False ); - mbInUserDraw = sal_False; + mpImplData->mpVirDev->EnableRTL( false ); + mbInUserDraw = false; } else { @@ -529,7 +529,7 @@ void DrawProgress( Window* pWindow, const Point& rPos, pWindow->Push( PUSH_CLIPREGION ); pWindow->IntersectClipRegion( rFramePosSize ); } - sal_Bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, + bool bNativeOK = pWindow->DrawNativeControl( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, OUString() ); if( bNeedErase ) pWindow->Pop(); @@ -607,7 +607,7 @@ void DrawProgress( Window* pWindow, const Point& rPos, // ----------------------------------------------------------------------- -void StatusBar::ImplDrawProgress( sal_Bool bPaint, +void StatusBar::ImplDrawProgress( bool bPaint, sal_uInt16 nPercent1, sal_uInt16 nPercent2 ) { bool bNative = IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ); @@ -664,7 +664,7 @@ void StatusBar::ImplCalcProgressRect() // save the divisor for later mnPercentCount = 10000 / nMaxPercent; - sal_Bool bNativeOK = sal_False; + bool bNativeOK = false; if( IsNativeControlSupported( CTRL_PROGRESS, PART_ENTIRE_CONTROL ) ) { ImplControlValue aValue; @@ -672,7 +672,7 @@ void StatusBar::ImplCalcProgressRect() Rectangle aNativeControlRegion, aNativeContentRegion; if( (bNativeOK = GetNativeControlRegion( CTRL_PROGRESS, PART_ENTIRE_CONTROL, aControlRegion, CTRL_STATE_ENABLED, aValue, OUString(), - aNativeControlRegion, aNativeContentRegion ) ) != sal_False ) + aNativeControlRegion, aNativeContentRegion ) ) ) { long nProgressHeight = aNativeControlRegion.GetHeight(); if( nProgressHeight > maPrgsFrameRect.GetHeight() ) @@ -737,18 +737,18 @@ void StatusBar::Paint( const Rectangle& ) sal_uInt16 nItemCount = sal_uInt16( mpItemList->size() ); if ( mbProgressMode ) - ImplDrawProgress( sal_True, 0, mnPercent ); + ImplDrawProgress( true, 0, mnPercent ); else { // draw text if ( !mbVisibleItems || (GetStyle() & WB_RIGHT) ) - ImplDrawText( sal_False, 0 ); + ImplDrawText( false, 0 ); // draw items if ( mbVisibleItems ) { for ( sal_uInt16 i = 0; i < nItemCount; i++ ) - ImplDrawItem( sal_False, i, sal_True, sal_True ); + ImplDrawItem( false, i, true, true ); } } @@ -780,7 +780,7 @@ void StatusBar::Resize() mnTextY = (mnCalcHeight-GetTextHeight())/2; // provoke re-formatting - mbFormat = sal_True; + mbFormat = true; if ( mbProgressMode ) ImplCalcProgressRect(); @@ -868,18 +868,18 @@ void StatusBar::StateChanged( StateChangedType nType ) else if ( (nType == STATE_CHANGE_ZOOM) || (nType == STATE_CHANGE_CONTROLFONT) ) { - mbFormat = sal_True; - ImplInitSettings( sal_True, sal_False, sal_False ); + mbFormat = true; + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); Invalidate(); } } @@ -898,8 +898,8 @@ void StatusBar::DataChanged( const DataChangedEvent& rDCEvt ) ) ) { - mbFormat = sal_True; - ImplInitSettings( sal_True, sal_True, sal_True ); + mbFormat = true; + ImplInitSettings( true, true, true ); long nFudge = GetTextHeight() / 4; for ( size_t i = 0, n = mpItemList->size(); i < n; ++i ) { @@ -963,7 +963,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth, pItem->mnWidth = (long)nWidth+nFudge+STATUSBAR_OFFSET; pItem->mnOffset = nOffset; pItem->mpUserData = 0; - pItem->mbVisible = sal_True; + pItem->mbVisible = true; // add item to list if ( nPos < mpItemList->size() ) { @@ -972,7 +972,7 @@ void StatusBar::InsertItem( sal_uInt16 nItemId, sal_uLong nWidth, mpItemList->push_back( pItem ); } - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -989,7 +989,7 @@ void StatusBar::RemoveItem( sal_uInt16 nItemId ) delete (*mpItemList)[ nPos ]; mpItemList->erase( mpItemList->begin() + nPos ); - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1008,9 +1008,9 @@ void StatusBar::ShowItem( sal_uInt16 nItemId ) ImplStatusItem* pItem = (*mpItemList)[ nPos ]; if ( !pItem->mbVisible ) { - pItem->mbVisible = sal_True; + pItem->mbVisible = true; - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1030,9 +1030,9 @@ void StatusBar::HideItem( sal_uInt16 nItemId ) ImplStatusItem* pItem = (*mpItemList)[ nPos ]; if ( pItem->mbVisible ) { - pItem->mbVisible = sal_False; + pItem->mbVisible = false; - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1043,14 +1043,14 @@ void StatusBar::HideItem( sal_uInt16 nItemId ) // ----------------------------------------------------------------------- -sal_Bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const +bool StatusBar::IsItemVisible( sal_uInt16 nItemId ) const { sal_uInt16 nPos = GetItemPos( nItemId ); if ( nPos != STATUSBAR_ITEM_NOTFOUND ) return (*mpItemList)[ nPos ]->mbVisible; else - return sal_False; + return false; } void StatusBar::Clear() @@ -1061,7 +1061,7 @@ void StatusBar::Clear() } mpItemList->clear(); - mbFormat = sal_True; + mbFormat = true; if ( ImplIsItemUpdate() ) Invalidate(); @@ -1237,7 +1237,7 @@ void StatusBar::SetItemText( sal_uInt16 nItemId, const OUString& rText ) if ( pItem->mbVisible && !mbFormat && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( sal_True, nPos, sal_True, sal_False ); + ImplDrawItem( true, nPos, true, false ); Flush(); } } @@ -1298,7 +1298,7 @@ void StatusBar::SetItemData( sal_uInt16 nItemId, void* pNewData ) !mbFormat && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( sal_True, nPos, sal_False, sal_False ); + ImplDrawItem( true, nPos, false, false ); Flush(); } } @@ -1328,7 +1328,7 @@ void StatusBar::RedrawItem( sal_uInt16 nItemId ) pItem->mbVisible && ImplIsItemUpdate() ) { Update(); - ImplDrawItem( sal_True, nPos, sal_False, sal_False ); + ImplDrawItem( true, nPos, false, false ); Flush(); } } @@ -1422,7 +1422,7 @@ void StatusBar::StartProgressMode( const OUString& rText ) { DBG_ASSERT( !mbProgressMode, "StatusBar::StartProgressMode(): progress mode is active" ); - mbProgressMode = sal_True; + mbProgressMode = true; mnPercent = 0; maPrgsTxt = rText; @@ -1457,7 +1457,7 @@ void StatusBar::SetProgressValue( sal_uInt16 nNewPercent ) { Update(); SetLineColor(); - ImplDrawProgress( sal_False, mnPercent, nNewPercent ); + ImplDrawProgress( false, mnPercent, nNewPercent ); Flush(); } mnPercent = nNewPercent; @@ -1469,7 +1469,7 @@ void StatusBar::EndProgressMode() { DBG_ASSERT( mbProgressMode, "StatusBar::EndProgressMode(): no progress mode" ); - mbProgressMode = sal_False; + mbProgressMode = false; maPrgsTxt = ""; // re-trigger Paint to recreate StatusBar @@ -1499,7 +1499,7 @@ void StatusBar::SetText( const OUString& rText ) Update(); long nOldTextWidth = GetTextWidth( GetText() ); Window::SetText( rText ); - ImplDrawText( sal_True, nOldTextWidth ); + ImplDrawText( true, nOldTextWidth ); Flush(); } } diff --git a/vcl/source/window/syschild.cxx b/vcl/source/window/syschild.cxx index 0b7aa9f7dfa2..203ccc5e70c7 100644 --- a/vcl/source/window/syschild.cxx +++ b/vcl/source/window/syschild.cxx @@ -67,33 +67,33 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, // Focus holen und zwar so, das alle Handler gerufen // werden, als ob dieses Fenster den Focus bekommt, // ohne das der Frame den Focus wieder klaut - pWindow->ImplGetFrameData()->mbSysObjFocus = sal_True; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True; + pWindow->ImplGetFrameData()->mbSysObjFocus = true; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = true; pWindow->ToTop( TOTOP_NOGRABFOCUS ); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False; - pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_True; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = false; + pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = true; pWindow->GrabFocus(); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = sal_False; + pWindow->ImplGetFrameData()->mbInSysObjFocusHdl = false; break; case SALOBJ_EVENT_LOSEFOCUS: // Hintenrum einen LoseFocus ausloesen, das der Status // der Fenster dem entsprechenden Activate-Status // entspricht - pWindow->ImplGetFrameData()->mbSysObjFocus = sal_False; + pWindow->ImplGetFrameData()->mbSysObjFocus = false; if ( !pWindow->ImplGetFrameData()->mnFocusId ) { - pWindow->ImplGetFrameData()->mbStartFocusState = sal_True; + pWindow->ImplGetFrameData()->mbStartFocusState = true; Application::PostUserEvent( pWindow->ImplGetFrameData()->mnFocusId, LINK( pWindow->ImplGetFrameWindow(), Window, ImplAsyncFocusHdl ) ); } break; case SALOBJ_EVENT_TOTOP: - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_True; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = true; if ( !Application::GetFocusWindow() || pWindow->HasChildPathFocus() ) pWindow->ToTop( TOTOP_NOGRABFOCUS ); else @@ -103,7 +103,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, pWindow->GrabFocus(); if( aDogTag.IsDead() ) break; - pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = sal_False; + pWindow->ImplGetFrameData()->mbInSysObjToTopHdl = false; break; } @@ -112,7 +112,7 @@ long ImplSysChildProc( void* pInst, SalObject* /* pObject */, // ======================================================================= -void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) +void SystemChildWindow::ImplInitSysChild( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) { mpWindowImpl->mpSysObj = ImplGetSVData()->mpDefInst->CreateObject( pParent->ImplGetFrame(), pData, bShow ); @@ -137,7 +137,7 @@ SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle ) : // ----------------------------------------------------------------------- -SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, sal_Bool bShow ) : +SystemChildWindow::SystemChildWindow( Window* pParent, WinBits nStyle, SystemWindowData *pData, bool bShow ) : Window( WINDOW_SYSTEMCHILDWINDOW ) { ImplInitSysChild( pParent, nStyle, pData, bShow ); @@ -167,7 +167,7 @@ const SystemEnvData* SystemChildWindow::GetSystemData() const // ----------------------------------------------------------------------- -void SystemChildWindow::EnableEraseBackground( sal_Bool bEnable ) +void SystemChildWindow::EnableEraseBackground( bool bEnable ) { if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->EnableEraseBackground( bEnable ); @@ -207,7 +207,7 @@ void SystemChildWindow::ImplTestJavaException( void* pEnv ) #endif // HAVE_FEATURE_JAVA } -void SystemChildWindow::SetForwardKey( sal_Bool bEnable ) +void SystemChildWindow::SetForwardKey( bool bEnable ) { if ( mpWindowImpl->mpSysObj ) mpWindowImpl->mpSysObj->SetForwardKey( bEnable ); @@ -215,7 +215,7 @@ void SystemChildWindow::SetForwardKey( sal_Bool bEnable ) // ----------------------------------------------------------------------- -sal_IntPtr SystemChildWindow::GetParentWindowHandle( sal_Bool bUseJava ) +sal_IntPtr SystemChildWindow::GetParentWindowHandle( bool bUseJava ) { sal_IntPtr nRet = 0; diff --git a/vcl/source/window/syswin.cxx b/vcl/source/window/syswin.cxx index 6b03cf7115a8..94ae46949227 100644 --- a/vcl/source/window/syswin.cxx +++ b/vcl/source/window/syswin.cxx @@ -71,12 +71,12 @@ SystemWindow::SystemWindow( WindowType nType ) : mpWindowImpl->mnActivateMode = ACTIVATE_MODE_GRABFOCUS; mpMenuBar = NULL; - mbPined = sal_False; - mbRollUp = sal_False; - mbRollFunc = sal_False; - mbDockBtn = sal_False; - mbHideBtn = sal_False; - mbSysChild = sal_False; + mbPined = false; + mbRollUp = false; + mbRollFunc = false; + mbDockBtn = false; + mbHideBtn = false; + mbSysChild = false; mnMenuBarMode = MENUBAR_MODE_NORMAL; mnIcon = 0; } @@ -101,7 +101,7 @@ bool SystemWindow::Notify( NotifyEvent& rNEvt ) if( pWin && pWin->IsSystemWindow() ) pMBar = ((SystemWindow*)pWin)->GetMenuBar(); } - if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), sal_False ) ) + if ( pMBar && pMBar->ImplHandleKeyEvent( *rNEvt.GetKeyEvent(), false ) ) return true; } @@ -176,17 +176,17 @@ TaskPaneList* SystemWindow::GetTaskPaneList() // ----------------------------------------------------------------------- -sal_Bool SystemWindow::Close() +bool SystemWindow::Close() { ImplDelData aDelData; ImplAddDel( &aDelData ); ImplCallEventListeners( VCLEVENT_WINDOW_CLOSE ); if ( aDelData.IsDead() ) - return sal_False; + return false; ImplRemoveDel( &aDelData ); if ( mpWindowImpl->mxWindowPeer.is() && IsCreatedWithToolkit() ) - return sal_False; + return false; // Is Window not closeable, ignore close Window* pBorderWin = ImplGetBorderWindow(); @@ -196,11 +196,11 @@ sal_Bool SystemWindow::Close() else nStyle = GetStyle(); if ( !(nStyle & WB_CLOSEABLE) ) - return sal_False; + return false; Hide(); - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -266,7 +266,7 @@ void SystemWindow::SetIcon( sal_uInt16 nIcon ) // ----------------------------------------------------------------------- -void SystemWindow::EnableSaveBackground( sal_Bool bSave ) +void SystemWindow::EnableSaveBackground( bool bSave ) { if( ImplGetSVData()->maWinData.mbNoSaveBackground ) bSave = false; @@ -284,7 +284,7 @@ void SystemWindow::EnableSaveBackground( sal_Bool bSave ) // ----------------------------------------------------------------------- -sal_Bool SystemWindow::IsSaveBackgroundEnabled() const +bool SystemWindow::IsSaveBackgroundEnabled() const { const Window* pWindow = this; while ( pWindow->mpWindowImpl->mpBorderWindow ) @@ -292,12 +292,12 @@ sal_Bool SystemWindow::IsSaveBackgroundEnabled() const if ( pWindow->mpWindowImpl->mpOverlapData ) return pWindow->mpWindowImpl->mpOverlapData->mbSaveBack; else - return sal_False; + return false; } // ----------------------------------------------------------------------- -void SystemWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) +void SystemWindow::ShowTitleButton( sal_uInt16 nButton, bool bVisible ) { if ( nButton == TITLE_BUTTON_DOCKING ) { @@ -328,7 +328,7 @@ void SystemWindow::ShowTitleButton( sal_uInt16 nButton, sal_Bool bVisible ) // ----------------------------------------------------------------------- -sal_Bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const +bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const { if ( nButton == TITLE_BUTTON_DOCKING ) return mbDockBtn; @@ -338,7 +338,7 @@ sal_Bool SystemWindow::IsTitleButtonVisible( sal_uInt16 nButton ) const // ----------------------------------------------------------------------- -void SystemWindow::SetPin( sal_Bool bPin ) +void SystemWindow::SetPin( bool bPin ) { if ( bPin != mbPined ) { @@ -355,16 +355,16 @@ void SystemWindow::RollUp() if ( !mbRollUp ) { maOrgSize = GetOutputSizePixel(); - mbRollFunc = sal_True; + mbRollFunc = true; Size aSize = maRollUpOutSize; if ( !aSize.Width() ) aSize.Width() = GetOutputSizePixel().Width(); - mbRollUp = sal_True; + mbRollUp = true; if ( mpWindowImpl->mpBorderWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_True, aSize ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( true, aSize ); else SetOutputSizePixel( aSize ); - mbRollFunc = sal_False; + mbRollFunc = false; } } @@ -374,9 +374,9 @@ void SystemWindow::RollDown() { if ( mbRollUp ) { - mbRollUp = sal_False; + mbRollUp = false; if ( mpWindowImpl->mpBorderWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( sal_False, maOrgSize ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetRollUp( false, maOrgSize ); else SetOutputSizePixel( maOrgSize ); } @@ -707,7 +707,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) Rectangle aDesktop = GetDesktopRectPixel(); ImplSVData *pSVData = ImplGetSVData(); Window *pWin = pSVData->maWinData.mpFirstFrame; - sal_Bool bWrapped = sal_False; + bool bWrapped = false; while( pWin ) { if( !pWin->ImplIsRealParentPath( this ) && ( pWin != this ) && @@ -728,7 +728,7 @@ void SystemWindow::SetWindowStateData( const WindowStateData& rData ) (unsigned long) (aState.mnY + displacement + aState.mnHeight + g.nBottomDecoration) > (unsigned long) aDesktop.Bottom() ) break; // further displacement not possible -> break // avoid endless testing - bWrapped = sal_True; + bWrapped = true; } else { @@ -949,7 +949,7 @@ void SystemWindow::SetMenuBar( MenuBar* pMenuBar ) ImplToBottomChild(); if ( pOldMenuBar ) { - sal_Bool bDelete = (pMenuBar == 0) ? sal_True : sal_False; + bool bDelete = (pMenuBar == 0) ? sal_True : sal_False; if( bDelete && pOldWindow ) { if( mpImplData->mpTaskPaneList ) @@ -990,20 +990,20 @@ void SystemWindow::SetMenuBarMode( sal_uInt16 nMode ) if ( mpWindowImpl->mpBorderWindow && (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) ) { if ( nMode == MENUBAR_MODE_HIDE ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_True ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( true ); else - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( sal_False ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->SetMenuBarMode( false ); } } } // ----------------------------------------------------------------------- -sal_Bool SystemWindow::ImplIsInTaskPaneList( Window* pWin ) +bool SystemWindow::ImplIsInTaskPaneList( Window* pWin ) { if( mpImplData && mpImplData->mpTaskPaneList ) return mpImplData->mpTaskPaneList->IsInList( pWin ); - return sal_False; + return false; } unsigned int SystemWindow::GetScreenNumber() const diff --git a/vcl/source/window/tabdlg.cxx b/vcl/source/window/tabdlg.cxx index c0b4d9ead371..9bb2f242abc8 100644 --- a/vcl/source/window/tabdlg.cxx +++ b/vcl/source/window/tabdlg.cxx @@ -32,7 +32,7 @@ void TabDialog::ImplInitTabDialogData() mpFixedLine = NULL; mpViewWindow = NULL; meViewAlign = WINDOWALIGN_LEFT; - mbPosControls = sal_True; + mbPosControls = true; } // ----------------------------------------------------------------------- @@ -149,7 +149,7 @@ void TabDialog::ImplPosControls() pTabControl->SetPosPixel( aTabOffset ); // Alle anderen Children positionieren - sal_Bool bTabCtrl = sal_False; + bool bTabCtrl = false; int nLines = 0; long nX; long nY = aDlgSize.Height(); @@ -167,7 +167,7 @@ void TabDialog::ImplPosControls() if ( pChild2->IsVisible() && (pChild2 != mpViewWindow) ) { if ( pChild2 == pTabControl ) - bTabCtrl = sal_True; + bTabCtrl = true; else if ( bTabCtrl ) { if ( !nLines ) @@ -209,7 +209,7 @@ void TabDialog::ImplPosControls() mpFixedLine->Show(); } - mbPosControls = sal_False; + mbPosControls = false; } // ----------------------------------------------------------------------- diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 5a59ac6506b5..8c64ba7e20e2 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -46,7 +46,7 @@ void TabPage::ImplInit( Window* pParent, WinBits nStyle ) // if the tabpage is drawn (ie filled) by a native widget, make sure all contols will have transparent background // otherwise they will paint with a wrong background if( IsNativeControlSupported(CTRL_TAB_BODY, PART_ENTIRE_CONTROL) && GetParent() && (GetParent()->GetType() == WINDOW_TABCONTROL) ) - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); } // ----------------------------------------------------------------------- @@ -56,16 +56,16 @@ void TabPage::ImplInitSettings() Window* pParent = GetParent(); if ( pParent->IsChildTransparentModeEnabled() && !IsControlBackground() ) { - EnableChildTransparentMode( sal_True ); + EnableChildTransparentMode( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetBackground(); } else { - EnableChildTransparentMode( sal_False ); + EnableChildTransparentMode( false ); SetParentClipMode( 0 ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); if ( IsControlBackground() ) SetBackground( GetControlBackground() ); diff --git a/vcl/source/window/taskpanelist.cxx b/vcl/source/window/taskpanelist.cxx index 459f557272d0..b111106dac21 100644 --- a/vcl/source/window/taskpanelist.cxx +++ b/vcl/source/window/taskpanelist.cxx @@ -132,7 +132,7 @@ void TaskPaneList::AddWindow( Window *pWindow ) } mTaskPanes.insert( insertionPos, pWindow ); - pWindow->ImplIsInTaskPaneList( sal_True ); + pWindow->ImplIsInTaskPaneList( true ); } } @@ -145,25 +145,25 @@ void TaskPaneList::RemoveWindow( Window *pWindow ) if( p != mTaskPanes.end() ) { mTaskPanes.erase( p ); - pWindow->ImplIsInTaskPaneList( sal_False ); + pWindow->ImplIsInTaskPaneList( false ); } } // -------------------------------------------------- -sal_Bool TaskPaneList::IsInList( Window *pWindow ) +bool TaskPaneList::IsInList( Window *pWindow ) { ::std::vector< Window* >::iterator p; p = ::std::find( mTaskPanes.begin(), mTaskPanes.end(), pWindow ); if( p != mTaskPanes.end() ) - return sal_True; + return true; else - return sal_False; + return false; } // -------------------------------------------------- -sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) +bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { // F6 cycles through everything and works always @@ -175,10 +175,10 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) // // Since the design of Ctrl-Tab looks to be inconsistent ( non-modal dialogs are not reachable // and the shortcut conflicts with tab-control shortcut ), it is no more supported - sal_Bool bSplitterOnly = sal_False; - sal_Bool bFocusInList = sal_False; + bool bSplitterOnly = false; + bool bFocusInList = false; KeyCode aKeyCode = aKeyEvent.GetKeyCode(); - sal_Bool bForward = !aKeyCode.IsShift(); + bool bForward = !aKeyCode.IsShift(); if( aKeyCode.GetCode() == KEY_F6 && ! aKeyCode.IsMod2() ) // F6 { bSplitterOnly = aKeyCode.IsMod1() && aKeyCode.IsShift(); @@ -188,43 +188,43 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) while( p != mTaskPanes.end() ) { Window *pWin = *p; - if( pWin->HasChildPathFocus( sal_True ) ) + if( pWin->HasChildPathFocus( true ) ) { - bFocusInList = sal_True; + bFocusInList = true; // Ctrl-F6 goes directly to the document if( !pWin->IsDialog() && aKeyCode.IsMod1() && !aKeyCode.IsShift() ) { pWin->ImplGrabFocusToDocument( GETFOCUS_F6 ); - return sal_True; + return true; } // activate next task pane Window *pNextWin = NULL; if( bSplitterOnly ) - pNextWin = FindNextSplitter( *p, sal_True ); + pNextWin = FindNextSplitter( *p, true ); else pNextWin = FindNextFloat( *p, bForward ); if( pNextWin != pWin ) { - ImplGetSVData()->maWinData.mbNoSaveFocus = sal_True; + ImplGetSVData()->maWinData.mbNoSaveFocus = true; ImplTaskPaneListGrabFocus( pNextWin, bForward ); - ImplGetSVData()->maWinData.mbNoSaveFocus = sal_False; + ImplGetSVData()->maWinData.mbNoSaveFocus = false; } else { // forward key if no splitter found if( bSplitterOnly ) - return sal_False; + return false; // we did not find another taskpane, so // put focus back into document pWin->ImplGrabFocusToDocument( GETFOCUS_F6 | (bForward ? GETFOCUS_FORWARD : GETFOCUS_BACKWARD)); } - return sal_True; + return true; } else ++p; @@ -235,24 +235,24 @@ sal_Bool TaskPaneList::HandleKeyEvent( KeyEvent aKeyEvent ) { Window *pWin; if( bSplitterOnly ) - pWin = FindNextSplitter( NULL, sal_True ); + pWin = FindNextSplitter( NULL, true ); else pWin = FindNextFloat( NULL, bForward ); if( pWin ) { ImplTaskPaneListGrabFocus( pWin, bForward ); - return sal_True; + return true; } } } - return sal_False; + return false; } // -------------------------------------------------- // returns next splitter -Window* TaskPaneList::FindNextSplitter( Window *pWindow, sal_Bool bForward ) +Window* TaskPaneList::FindNextSplitter( Window *pWindow, bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); @@ -291,7 +291,7 @@ Window* TaskPaneList::FindNextSplitter( Window *pWindow, sal_Bool bForward ) // -------------------------------------------------- // returns first valid item (regardless of type) if pWindow==0, otherwise returns next valid float -Window* TaskPaneList::FindNextFloat( Window *pWindow, sal_Bool bForward ) +Window* TaskPaneList::FindNextFloat( Window *pWindow, bool bForward ) { if( bForward ) ::std::stable_sort( mTaskPanes.begin(), mTaskPanes.end(), LTRSort() ); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index 509de9750fa2..c89bb59c9298 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -92,7 +92,7 @@ // ----------------------------------------------------------------------- -static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow ); +static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow ); // ----------------------------------------------------------------------- typedef ::std::vector< ToolBox* > ImplTBList; @@ -111,9 +111,9 @@ private: sal_uInt16 mnLineMode; sal_uInt16 mnStartLines; void* mpCustomizeData; - sal_Bool mbCustomizeMode; - sal_Bool mbResizeMode; - sal_Bool mbShowDragRect; + bool mbCustomizeMode; + bool mbResizeMode; + bool mbShowDragRect; public: ImplTBDragMgr(); @@ -137,16 +137,16 @@ public: void StartDragging( ToolBox* pDragBox, const Point& rPos, const Rectangle& rRect, - sal_uInt16 nLineMode, sal_Bool bResizeItem, + sal_uInt16 nLineMode, bool bResizeItem, void* pData = NULL ); void Dragging( const Point& rPos ); - void EndDragging( sal_Bool bOK = sal_True ); + void EndDragging( bool bOK = true ); void HideDragRect() { if ( mbShowDragRect ) mpDragBox->HideTracking(); } void UpdateDragRect(); DECL_LINK( SelectHdl, Accelerator* ); - sal_Bool IsCustomizeMode() { return mbCustomizeMode; } - sal_Bool IsResizeMode() { return mbResizeMode; } + bool IsCustomizeMode() { return mbCustomizeMode; } + bool IsResizeMode() { return mbResizeMode; } }; // ----------------------------------------------------------------------- @@ -291,7 +291,7 @@ void ToolBox::ImplDrawGrip( ToolBox* pThis ) // execute pending paint requests ImplCheckUpdate( pThis ); - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( pThis->IsNativeControlSupported( CTRL_TOOLBAR, pThis->mbHorz ? PART_THUMB_HORZ : PART_THUMB_VERT ) ) { ToolbarValue aToolbarValue; @@ -375,7 +375,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp g.SetStartColor( startCol ); g.SetEndColor( endCol ); - sal_Bool bLineColor = pThis->IsLineColor(); + bool bLineColor = pThis->IsLineColor(); Color aOldCol = pThis->GetLineColor(); pThis->SetLineColor( pThis->GetSettings().GetStyleSettings().GetShadowColor() ); @@ -480,7 +480,7 @@ void ToolBox::ImplDrawGradientBackground( ToolBox* pThis, ImplDockingWindowWrapp } -sal_Bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) +bool ToolBox::ImplDrawNativeBackground( ToolBox* pThis, const Region & ) { // use NWF Point aPt; @@ -504,7 +504,7 @@ void ToolBox::ImplDrawTransparentBackground( ToolBox* pThis, const Region &rRegi pThis->mpData->mbIsPaintLocked = bOldPaintLock; } -void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, sal_Bool bIsInPopupMode ) +void ToolBox::ImplDrawConstantBackground( ToolBox* pThis, const Region &rRegion, bool bIsInPopupMode ) { // draw a constant color if( !bIsInPopupMode ) @@ -525,7 +525,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) ImplCheckUpdate( pThis ); ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( pThis ); - sal_Bool bIsInPopupMode = pThis->ImplIsInPopupMode(); + bool bIsInPopupMode = pThis->ImplIsInPopupMode(); Region aPaintRegion( rRect ); @@ -550,7 +550,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) // toolbars known to the dockingmanager will be drawn using NWF or a gradient // docked toolbars are transparent and NWF is already used in the docking area which is their common background // so NWF is used here for floating toolbars only - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( pThis->ImplIsFloatingMode() && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_ENTIRE_CONTROL) ) bNativeOk = ImplDrawNativeBackground( pThis, aPaintRegion ); @@ -571,7 +571,7 @@ void ToolBox::ImplDrawBackground( ToolBox* pThis, const Rectangle &rRect ) pThis->Pop(); } -void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, sal_Bool bHighlight, sal_Bool bHasOpenPopup ) +void ToolBox::ImplErase( ToolBox* pThis, const Rectangle &rRect, bool bHighlight, bool bHasOpenPopup ) { // the background of non NWF buttons is painted in a constant color // to have the same highlight color (transparency in DrawSelectionBackground()) @@ -700,19 +700,19 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn Size aSize; WindowAlign eOldAlign = pThis->meAlign; bool bOldHorz = pThis->mbHorz; - sal_Bool bOldAssumeDocked = pThis->mpData->mbAssumeDocked; - sal_Bool bOldAssumeFloating = pThis->mpData->mbAssumeFloating; + bool bOldAssumeDocked = pThis->mpData->mbAssumeDocked; + bool bOldAssumeFloating = pThis->mpData->mbAssumeFloating; if ( nCalcMode ) { - sal_Bool bOldFloatingMode = pThis->ImplIsFloatingMode(); + bool bOldFloatingMode = pThis->ImplIsFloatingMode(); - pThis->mpData->mbAssumeDocked = sal_False; - pThis->mpData->mbAssumeFloating = sal_False; + pThis->mpData->mbAssumeDocked = false; + pThis->mpData->mbAssumeFloating = false; if ( nCalcMode == TB_CALCMODE_HORZ ) { - pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation + pThis->mpData->mbAssumeDocked = true; // force non-floating mode during calculation ImplCalcBorder( WINDOWALIGN_TOP, nLeft, nTop, nRight, nBottom, pThis ); ((ToolBox*)pThis)->mbHorz = true; if ( pThis->mbHorz != bOldHorz ) @@ -720,7 +720,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn } else if ( nCalcMode == TB_CALCMODE_VERT ) { - pThis->mpData->mbAssumeDocked = sal_True; // force non-floating mode during calculation + pThis->mpData->mbAssumeDocked = true; // force non-floating mode during calculation ImplCalcBorder( WINDOWALIGN_LEFT, nLeft, nTop, nRight, nBottom, pThis ); ((ToolBox*)pThis)->mbHorz = false; if ( pThis->mbHorz != bOldHorz ) @@ -728,7 +728,7 @@ Size ToolBox::ImplCalcSize( const ToolBox* pThis, sal_uInt16 nCalcLines, sal_uIn } else if ( nCalcMode == TB_CALCMODE_FLOAT ) { - pThis->mpData->mbAssumeFloating = sal_True; // force non-floating mode during calculation + pThis->mpData->mbAssumeFloating = true; // force non-floating mode during calculation nLeft = nTop = nRight = nBottom = 0; ((ToolBox*)pThis)->mbHorz = true; if ( pThis->mbHorz != bOldHorz ) @@ -844,7 +844,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) sal_uInt16 nCalcLines; sal_uInt16 nTempLines; long nMaxLineWidth; - nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True ); + nCalcLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, true ); pThis->maFloatSizes.reserve( nCalcLines ); @@ -864,7 +864,7 @@ void ToolBox::ImplCalcFloatSizes( ToolBox* pThis ) do { nCalcSize += pThis->mnMaxItemWidth; - nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, sal_True ); + nTempLines = pThis->ImplCalcBreaks( nCalcSize, &nMaxLineWidth, true ); } while ( (nCalcSize < upperBoundWidth) && (nLines < nTempLines) && (nTempLines != 1) ); if ( nTempLines < nLines ) @@ -1015,7 +1015,7 @@ sal_uInt16 ToolBox::ImplTestLineSize( ToolBox* pThis, const Point& rPos ) void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRect, sal_uInt16 nLineMode ) { - sal_Bool mbHorz; + bool mbHorz; long nOneLineSize; long nCurSize; long nMaxSize; @@ -1025,27 +1025,27 @@ void ToolBox::ImplLineSizing( ToolBox* pThis, const Point& rPos, Rectangle& rRec if ( nLineMode & DOCK_LINERIGHT ) { nCurSize = rPos.X() - rRect.Left(); - mbHorz = sal_False; + mbHorz = false; } else if ( nLineMode & DOCK_LINEBOTTOM ) { nCurSize = rPos.Y() - rRect.Top(); - mbHorz = sal_True; + mbHorz = true; } else if ( nLineMode & DOCK_LINELEFT ) { nCurSize = rRect.Right() - rPos.X(); - mbHorz = sal_False; + mbHorz = false; } else if ( nLineMode & DOCK_LINETOP ) { nCurSize = rRect.Bottom() - rPos.Y(); - mbHorz = sal_True; + mbHorz = true; } else { OSL_FAIL( "ImplLineSizing: Trailing else" ); nCurSize = 0; - mbHorz = sal_False; + mbHorz = false; } Size aWinSize = pThis->GetSizePixel(); @@ -1177,9 +1177,9 @@ ImplTBDragMgr::ImplTBDragMgr() mpBoxList = new ImplTBList(); mnLineMode = 0; mnStartLines = 0; - mbCustomizeMode = sal_False; - mbResizeMode = sal_False; - mbShowDragRect = sal_False; + mbCustomizeMode = false; + mbResizeMode = false; + mbShowDragRect = false; mpDragBox = NULL; maAccel.InsertItem( KEY_RETURN, KeyCode( KEY_RETURN ) ); @@ -1229,7 +1229,7 @@ ToolBox* ImplTBDragMgr::FindToolBox( const Rectangle& rRect ) void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, const Point& rPos, const Rectangle& rRect, - sal_uInt16 nDragLineMode, sal_Bool bResizeItem, + sal_uInt16 nDragLineMode, bool bResizeItem, void* pData ) { mpDragBox = pToolBox; @@ -1266,7 +1266,7 @@ void ImplTBDragMgr::StartDragging( ToolBox* pToolBox, maMouseOff.Y() = rRect.Top() - rPos.Y(); maRect = rRect; maStartRect = rRect; - mbShowDragRect = sal_True; + mbShowDragRect = true; pToolBox->ShowTracking( maRect ); } @@ -1306,12 +1306,12 @@ void ImplTBDragMgr::Dragging( const Point& rPos ) // ----------------------------------------------------------------------- -void ImplTBDragMgr::EndDragging( sal_Bool bOK ) +void ImplTBDragMgr::EndDragging( bool bOK ) { mpDragBox->HideTracking(); mpDragBox->ReleaseMouse(); mpDragBox->mbDragging = false; - mbShowDragRect = sal_False; + mbShowDragRect = false; Application::RemoveAccel( &maAccel ); if ( mnLineMode ) @@ -1346,7 +1346,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK ) pItem->mpWindow->SetSizePixel( aSize ); // re-calculate and show ToolBox - mpDragBox->ImplInvalidate( sal_True ); + mpDragBox->ImplInvalidate( true ); mpDragBox->Customize( ToolBoxCustomizeEvent( mpDragBox, nTempItem, TOOLBOX_CUSTOMIZE_RESIZE, mpCustomizeData ) ); @@ -1385,7 +1385,7 @@ void ImplTBDragMgr::EndDragging( sal_Bool bOK ) } } mpCustomizeData = NULL; - mbResizeMode = sal_False; + mbResizeMode = false; mpDragBox->Deactivate(); } @@ -1408,9 +1408,9 @@ void ImplTBDragMgr::UpdateDragRect() IMPL_LINK( ImplTBDragMgr, SelectHdl, Accelerator*, pAccel ) { if ( pAccel->GetCurItemId() == KEY_ESCAPE ) - EndDragging( sal_False ); + EndDragging( false ); else - EndDragging( sal_True ); + EndDragging( true ); return sal_True; } @@ -1493,13 +1493,13 @@ void ToolBox::ImplInit( Window* pParent, WinBits nStyle ) ImplGetWindowImpl()->mnStyle &= ~WB_DIALOGCONTROL; } - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } // ----------------------------------------------------------------------- -void ToolBox::ImplInitSettings( sal_Bool bFont, - sal_Bool bForeground, sal_Bool bBackground ) +void ToolBox::ImplInitSettings( bool bFont, + bool bForeground, bool bBackground ) { mpData->mbNativeButtons = IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ); @@ -1533,7 +1533,7 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, { aColor = GetControlBackground(); SetBackground( aColor ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); SetParentClipMode( 0 ); } else @@ -1542,7 +1542,7 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, ( GetAlign() == WINDOWALIGN_TOP && !Application::GetSettings().GetStyleSettings().GetPersonaHeader().IsEmpty() ) ) { SetBackground(); - SetPaintTransparent( sal_True ); + SetPaintTransparent( true ); SetParentClipMode( PARENTCLIPMODE_NOCLIP ); mpData->maDisplayBackground = Wallpaper( rStyleSettings.GetFaceColor() ); } @@ -1554,7 +1554,7 @@ void ToolBox::ImplInitSettings( sal_Bool bFont, aColor = rStyleSettings.GetWindowColor(); SetBackground( aColor ); - SetPaintTransparent( sal_False ); + SetPaintTransparent( false ); SetParentClipMode( 0 ); ImplUpdateImageList(); @@ -1704,7 +1704,7 @@ ImplToolItem* ToolBox::ImplGetItem( sal_uInt16 nItemId ) const } // ----------------------------------------------------------------------- -static void ImplAddButtonBorder( long &rWidth, long& rHeight, sal_Bool bNativeButtons ) +static void ImplAddButtonBorder( long &rWidth, long& rHeight, bool bNativeButtons ) { rWidth += SMALLBUTTON_HSIZE; rHeight += SMALLBUTTON_VSIZE; @@ -1719,12 +1719,12 @@ static void ImplAddButtonBorder( long &rWidth, long& rHeight, sal_Bool bNativeBu // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplCalcItem() +bool ToolBox::ImplCalcItem() { // recalc required ? if ( !mbCalc ) - return sal_False; + return false; ImplDisableFlatButtons(); @@ -1815,8 +1815,8 @@ sal_Bool ToolBox::ImplCalcItem() std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while ( it != mpData->m_aItems.end() ) { - sal_Bool bImage; - sal_Bool bText; + bool bImage; + bool bText; it->mbVisibleText = false; // indicates if text will definitely be drawn, influences dropdown pos @@ -1824,13 +1824,13 @@ sal_Bool ToolBox::ImplCalcItem() { // check if image and/or text exists if ( !(it->maImage) ) - bImage = sal_False; + bImage = false; else - bImage = sal_True; + bImage = true; if ( it->maText.isEmpty() ) - bText = sal_False; + bText = false; else - bText = sal_True; + bText = true; ButtonType tmpButtonType = determineButtonType( &(*it), meButtonType ); // default to toolbox setting if ( bImage || bText ) { @@ -1999,15 +1999,15 @@ sal_Bool ToolBox::ImplCalcItem() mnMaxItemWidth = nMaxWidth; mnMaxItemHeight = nMaxHeight; - return sal_True; + return true; } else - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool bCalcHorz ) +sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, bool bCalcHorz ) { sal_uLong nLineStart = 0; sal_uLong nGroupStart = 0; @@ -2016,8 +2016,8 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b long nLastGroupLineWidth = 0; long nMaxLineWidth = 0; sal_uInt16 nLines = 1; - sal_Bool bWindow; - sal_Bool bBreak = sal_False; + bool bWindow; + bool bBreak = false; long nWidthTotal = nWidth; long nMenuWidth = 0; @@ -2038,12 +2038,12 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b while ( it != mpData->m_aItems.end() ) { it->mbBreak = bBreak; - bBreak = sal_False; + bBreak = false; if ( it->mbVisible ) { - bWindow = sal_False; - bBreak = sal_False; + bWindow = false; + bBreak = false; nCurWidth = 0; if ( it->meType == TOOLBOXITEM_BUTTON || it->meType == TOOLBOXITEM_SPACE ) @@ -2059,7 +2059,7 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b if ( !mbScroll || (nWinItemWidth <= nWidthTotal) ) { nCurWidth = nWinItemWidth; - bWindow = sal_True; + bWindow = true; } else { @@ -2074,17 +2074,17 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b // to show the toolbar's menu; otherwise yes if ( ( ( it == lastVisible ) && (nLineWidth+nCurWidth > nWidthTotal) && mbScroll ) || ( ( it != lastVisible ) && (nLineWidth+nCurWidth+nMenuWidth > nWidthTotal) && mbScroll ) ) - bBreak = sal_True; + bBreak = true; } else if ( it->meType == TOOLBOXITEM_SEPARATOR ) { nCurWidth = it->mnSepSize; if ( !ImplIsFloatingMode() && ( it != lastVisible ) && (nLineWidth+nCurWidth+nMenuWidth > nWidthTotal) ) - bBreak = sal_True; + bBreak = true; } // treat breaks as separators, except when using old style toolbars (ie. no menu button) else if ( (it->meType == TOOLBOXITEM_BREAK) && !IsMenuEnabled() ) - bBreak = sal_True; + bBreak = true; if ( bBreak ) { @@ -2101,7 +2101,7 @@ sal_uInt16 ToolBox::ImplCalcBreaks( long nWidth, long* pMaxLineWidth, sal_Bool b nLineStart = it - mpData->m_aItems.begin(); nGroupStart = nLineStart; it->mbBreak = true; - bBreak = sal_False; + bBreak = false; } else { @@ -2253,7 +2253,7 @@ static void lcl_hideDoubleSeparators( std::vector< ImplToolItem >& rItems ) } } -void ToolBox::ImplFormat( sal_Bool bResize ) +void ToolBox::ImplFormat( bool bResize ) { // Has to re-formatted if ( !mbFormat ) @@ -2268,12 +2268,12 @@ void ToolBox::ImplFormat( sal_Bool bResize ) long nTop; long nMax; // width of layoutarea in pixels sal_uInt16 nFormatLine; - sal_Bool bMustFullPaint; + bool bMustFullPaint; std::vector< ImplToolItem >::iterator it; ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); - sal_Bool bIsInPopupMode = ImplIsInPopupMode(); + bool bIsInPopupMode = ImplIsInPopupMode(); maFloatSizes.clear(); @@ -2287,9 +2287,9 @@ void ToolBox::ImplFormat( sal_Bool bResize ) ImplUpdateDragArea( this ); if ( ImplCalcItem() ) - bMustFullPaint = sal_True; + bMustFullPaint = true; else - bMustFullPaint = sal_False; + bMustFullPaint = false; // calculate new size during interactive resize or @@ -2716,7 +2716,7 @@ IMPL_LINK_NOARG(ToolBox, ImplDropdownLongClickHdl) (mpData->m_aItems[ mnCurPos ].mnBits & TIB_DROPDOWN) ) { - mpData->mbDropDownByKeyboard = sal_False; + mpData->mbDropDownByKeyboard = false; GetDropdownClickHdl().Call( this ); // do not reset data if the dropdown handler opened a floating window @@ -2751,7 +2751,7 @@ IMPL_LINK_NOARG(ToolBox, ImplUpdateHdl) } // ----------------------------------------------------------------------- -static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, sal_Bool bSetColor, sal_Bool bRotate ) +static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, bool bSetColor, bool bRotate ) { Color aOldFillColor = pBox->GetFillColor(); Color aOldLineColor = pBox->GetLineColor(); @@ -2823,10 +2823,10 @@ static void ImplDrawMoreIndicator( ToolBox *pBox, const Rectangle& rRect, sal_Bo pBox->SetLineColor( aOldLineColor ); } -static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, sal_Bool bSetColor, sal_Bool bRotate ) +static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect, bool bSetColor, bool bRotate ) { - sal_Bool bLineColor = pBox->IsLineColor(); - sal_Bool bFillColor = pBox->IsFillColor(); + bool bLineColor = pBox->IsLineColor(); + bool bFillColor = pBox->IsFillColor(); Color aOldFillColor = pBox->GetFillColor(); Color aOldLineColor = pBox->GetLineColor(); pBox->SetLineColor(); @@ -2880,7 +2880,7 @@ static void ImplDrawDropdownArrow( ToolBox *pBox, const Rectangle& rDropDownRect // ----------------------------------------------------------------------- -void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) +void ToolBox::ImplDrawMenubutton( ToolBox *pThis, bool bHighlight ) { if( !pThis->mpData->maMenubuttonItem.maRect.IsEmpty() ) { @@ -2891,8 +2891,8 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) // execute pending paint requests ImplCheckUpdate( pThis ); - sal_Bool bFillColor = pThis->IsFillColor(); - sal_Bool bLineColor = pThis->IsLineColor(); + bool bFillColor = pThis->IsFillColor(); + bool bLineColor = pThis->IsLineColor(); Color aOldFillCol = pThis->GetFillColor(); Color aOldLineCol = pThis->GetLineColor(); @@ -2900,10 +2900,10 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) ImplErase( pThis, pThis->mpData->maMenubuttonItem.maRect, bHighlight ); if( bHighlight ) - ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, sal_False, sal_True, sal_False ); + ImplDrawButton( pThis, pThis->mpData->maMenubuttonItem.maRect, 2, false, true, false ); if( pThis->ImplHasClippedItems() ) - ImplDrawMoreIndicator( pThis, pThis->mpData->maMenubuttonItem.maRect, sal_True, !pThis->mbHorz ); + ImplDrawMoreIndicator( pThis, pThis->mpData->maMenubuttonItem.maRect, true, !pThis->mbHorz ); // store highlight state pThis->mpData->mbMenubuttonSelected = bHighlight; @@ -2922,29 +2922,29 @@ void ToolBox::ImplDrawMenubutton( ToolBox *pThis, sal_Bool bHighlight ) // ----------------------------------------------------------------------- -void ToolBox::ImplDrawSpin( sal_Bool bUpperIn, sal_Bool bLowerIn ) +void ToolBox::ImplDrawSpin( bool bUpperIn, bool bLowerIn ) { - sal_Bool bTmpUpper; - sal_Bool bTmpLower; + bool bTmpUpper; + bool bTmpLower; if ( maUpperRect.IsEmpty() || maLowerRect.IsEmpty() ) return; if ( mnCurLine > 1 ) - bTmpUpper = sal_True; + bTmpUpper = true; else - bTmpUpper = sal_False; + bTmpUpper = false; if ( mnCurLine+mnVisLines-1 < mnCurLines ) - bTmpLower = sal_True; + bTmpLower = true; else - bTmpLower = sal_False; + bTmpLower = false; if ( !IsEnabled() ) { - bTmpUpper = sal_False; - bTmpLower = sal_False; + bTmpUpper = false; + bTmpLower = false; } ImplDrawSpinButton( this, maUpperRect, maLowerRect, @@ -3002,12 +3002,12 @@ void ToolBox::ImplDrawSeparator( sal_uInt16 nPos, Rectangle rRect ) // ----------------------------------------------------------------------- -static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bEnabled, sal_Bool bIsWindow ) +static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 highlight, bool bChecked, bool bEnabled, bool bIsWindow ) { // draws toolbar button background either native or using a coloured selection // if bIsWindow is sal_True, the corresponding item is a control and only a selection border will be drawn - sal_Bool bNativeOk = sal_False; + bool bNativeOk = false; if( !bIsWindow && pThis->IsNativeControlSupported( CTRL_TOOLBAR, PART_BUTTON ) ) { ImplControlValue aControlValue; @@ -3025,10 +3025,10 @@ static void ImplDrawButton( ToolBox* pThis, const Rectangle &rRect, sal_uInt16 h } if( !bNativeOk ) - pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, sal_True, bIsWindow, 2, NULL, NULL ); + pThis->DrawSelectionBackground( rRect, bIsWindow ? 3 : highlight, bChecked, true, bIsWindow, 2, NULL, NULL ); } -void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPaint, sal_Bool bLayout ) +void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, bool bPaint, bool bLayout ) { if( nPos >= mpData->m_aItems.size() ) @@ -3055,13 +3055,13 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings(); // no gradient background for items that have a popup open - sal_Bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId); + bool bHasOpenPopup = (mpFloatWin != NULL) && (mnDownItemId==pItem->mnId); - sal_Bool bHighContrastWhite = sal_False; + bool bHighContrastWhite = false; // check the face color as highcontrast indicator // because the toolbox itself might have a gradient if( rStyleSettings.GetFaceColor() == Color( COL_WHITE ) ) - bHighContrastWhite = sal_True; + bHighContrastWhite = true; // Compute buttons area. Size aBtnSize = pItem->maRect.GetSize(); @@ -3129,18 +3129,18 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa Size aSize( GetCtrlTextWidth( pItem->maText ), GetTextHeight() ); Point aPos( pItem->maRect.Left()+2, pItem->maRect.Top() ); aPos.Y() += (pItem->maRect.GetHeight()-aSize.Height())/2; - sal_Bool bClip; + bool bClip; if ( (aSize.Width() > pItem->maRect.GetWidth()-2) || (aSize.Height() > pItem->maRect.GetHeight()-2) ) { - bClip = sal_True; + bClip = true; Rectangle aTempRect( pItem->maRect.Left()+1, pItem->maRect.Top()+1, pItem->maRect.Right()-1, pItem->maRect.Bottom()-1 ); Region aTempRegion( aTempRect ); SetClipRegion( aTempRegion ); } else - bClip = sal_False; + bClip = false; if( bLayout ) { mpData->m_pLayoutData->m_aLineIndices.push_back( mpData->m_pLayoutData->m_aDisplayText.getLength() ); @@ -3192,8 +3192,8 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa nOffY += pItem->maRect.Top(); // determine what has to be drawn on the button: image, text or both - sal_Bool bImage; - sal_Bool bText; + bool bImage; + bool bText; ButtonType tmpButtonType = determineButtonType( pItem, meButtonType ); // default to toolbox setting pItem->DetermineButtonDrawStyle( tmpButtonType, bImage, bText ); @@ -3212,7 +3212,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if ( bImage && ! bLayout ) { const Image* pImage; - if ( (nHighlight != 0) && (!(pItem->maHighImage)) == sal_False ) + if ( (nHighlight != 0) && !!(pItem->maHighImage) ) pImage = &(pItem->maHighImage); else pImage = &(pItem->maImage); @@ -3261,7 +3261,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa } // draw the text - sal_Bool bRotate = sal_False; + bool bRotate = false; if ( bText ) { long nTextOffX = nOffX; @@ -3272,7 +3272,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if( pItem->mbVisibleText && !ImplIsFloatingMode() && ((meAlign == WINDOWALIGN_LEFT) || (meAlign == WINDOWALIGN_RIGHT)) ) { - bRotate = sal_True; + bRotate = true; Font aRotateFont = aOldFont; aRotateFont.SetOrientation( 2700 ); @@ -3328,10 +3328,10 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if ( pItem->mnBits & TIB_DROPDOWN ) { Rectangle aDropDownRect( pItem->GetDropDownRect( mbHorz ) ); - sal_Bool bSetColor = sal_True; + bool bSetColor = true; if ( !pItem->mbEnabled || !IsEnabled() ) { - bSetColor = sal_False; + bSetColor = false; SetFillColor( rStyleSettings.GetShadowColor() ); } @@ -3345,7 +3345,7 @@ void ToolBox::ImplDrawItem( sal_uInt16 nPos, sal_uInt16 nHighlight, sal_Bool bPa if( bHasOpenPopup ) ImplDrawFloatwinBorder( pItem ); else - ImplDrawButton( this, aDropDownRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), sal_False ); + ImplDrawButton( this, aDropDownRect, nHighlight, pItem->meState == STATE_CHECK, pItem->mbEnabled && IsEnabled(), false ); } } ImplDrawDropdownArrow( this, aDropDownRect, bSetColor, bRotate ); @@ -3393,7 +3393,7 @@ void ToolBox::ImplDrawFloatwinBorder( ImplToolItem* pItem ) } } -void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) +void ToolBox::ImplFloatControl( bool bStart, FloatingWindow* pFloatWindow ) { if ( bStart ) @@ -3413,7 +3413,7 @@ void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) // if focus is still in this toolbox, then the floater was opened by keyboard // draw current item with highlight and keep old state - sal_Bool bWasKeyboardActivate = mpData->mbDropDownByKeyboard; + bool bWasKeyboardActivate = mpData->mbDropDownByKeyboard; if ( mnCurPos != TOOLBOX_ITEM_NOTFOUND ) @@ -3433,7 +3433,7 @@ void ToolBox::ImplFloatControl( sal_Bool bStart, FloatingWindow* pFloatWindow ) // ----------------------------------------------------------------------- -void ToolBox::ShowLine( sal_Bool bNext ) +void ToolBox::ShowLine( bool bNext ) { mbFormat = true; @@ -3468,7 +3468,7 @@ void ToolBox::ShowLine( sal_Bool bNext ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat ) +bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, bool bRepeat ) { Point aMousePos = rMEvt.GetPosPixel(); @@ -3500,7 +3500,7 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat } } - return sal_True; + return true; } if ( mbUpper ) @@ -3509,9 +3509,9 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat if ( bNewIn != mbIn ) { mbIn = bNewIn; - ImplDrawSpin( mbIn, sal_False ); + ImplDrawSpin( mbIn, false ); } - return sal_True; + return true; } if ( mbLower ) @@ -3520,17 +3520,17 @@ sal_Bool ToolBox::ImplHandleMouseMove( const MouseEvent& rMEvt, sal_Bool bRepeat if ( bNewIn != mbIn ) { mbIn = bNewIn; - ImplDrawSpin( sal_False, mbIn ); + ImplDrawSpin( false, mbIn ); } - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCancel ) +bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, bool bCancel ) { ImplDisableFlatButtons(); @@ -3559,7 +3559,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa { mbSelection = false; if ( mnCurPos == TOOLBOX_ITEM_NOTFOUND ) - return sal_True; + return true; } // has mouse been released on top of item? @@ -3597,7 +3597,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa ImplAddDel( &aDelData ); Select(); if ( aDelData.IsDead() ) - return sal_True; + return true; ImplRemoveDel( &aDelData ); } } @@ -3630,7 +3630,7 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa mnDownItemId = 0; mnMouseClicks = 0; mnMouseModifier = 0; - return sal_True; + return true; } else if ( mbUpper || mbLower ) { @@ -3639,11 +3639,11 @@ sal_Bool ToolBox::ImplHandleMouseButtonUp( const MouseEvent& rMEvt, sal_Bool bCa mbUpper = false; mbLower = false; mbIn = false; - ImplDrawSpin( sal_False, sal_False ); - return sal_True; + ImplDrawSpin( false, false ); + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -3665,10 +3665,10 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) // only highlight when the focus is not inside a child window of a toolbox // eg, in a edit control // and do not hilight when focus is in a different toolbox - sal_Bool bDrawHotSpot = sal_True; + bool bDrawHotSpot = true; Window *pWin = Application::GetFocusWindow(); if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this ) - bDrawHotSpot = sal_False; + bDrawHotSpot = false; if ( mbSelection && bDrawHotSpot ) { @@ -3785,7 +3785,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( bDrawHotSpot && ( (mnOutStyle & TOOLBOX_STYLE_FLAT) || !mnOutStyle ) ) { - sal_Bool bClearHigh = sal_True; + bool bClearHigh = true; if ( !rMEvt.IsLeaveWindow() && (mnCurPos == TOOLBOX_ITEM_NOTFOUND) ) { std::vector< ImplToolItem >::const_iterator it = mpData->m_aItems.begin(); @@ -3797,7 +3797,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) { if ( !mnOutStyle || (mnOutStyle & TOOLBOX_STYLE_FLAT) ) { - bClearHigh = sal_False; + bClearHigh = false; if ( mnHighItemId != it->mnId ) { sal_uInt16 nTempPos = sal::static_int_cast<sal_uInt16>(it - mpData->m_aItems.begin()); @@ -3811,7 +3811,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if ( mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); } mnHighItemId = it->mnId; ImplDrawItem( nTempPos, 2 ); @@ -3828,13 +3828,13 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) } // only clear highlight when focus is not in toolbar - sal_Bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos ) && ImplHasClippedItems(); + bool bMenuButtonHit = mpData->maMenubuttonItem.maRect.IsInside( aMousePos ) && ImplHasClippedItems(); if ( bClearHigh || bMenuButtonHit ) { if ( !bMenuButtonHit && mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); } if( mnHighItemId ) @@ -3852,7 +3852,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) if( bMenuButtonHit ) { - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } } } @@ -3923,12 +3923,12 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) Rectangle aItemRect = GetItemRect( it->mnId ); mnConfigItem = it->mnId; - sal_Bool bResizeItem; + bool bResizeItem; if ( mbCustomizeMode && it->mbShowWindow && (it->maRect.Right()-TB_RESIZE_OFFSET <= aMousePos.X()) ) - bResizeItem = sal_True; + bResizeItem = true; else - bResizeItem = sal_False; + bResizeItem = false; pMgr->StartDragging( this, aMousePos, aItemRect, 0, bResizeItem ); return; } @@ -3983,7 +3983,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // dropdownonly always triggers the dropdown handler, over the whole button area // the drop down arrow should not trigger the item action - mpData->mbDropDownByKeyboard = sal_False; + mpData->mbDropDownByKeyboard = false; GetDropdownClickHdl().Call( this ); // do not reset data if the dropdown handler opened a floating window @@ -4043,7 +4043,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) StartTracking(); mbUpper = true; mbIn = true; - ImplDrawSpin( sal_True, sal_False ); + ImplDrawSpin( true, false ); } return; } @@ -4054,7 +4054,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) StartTracking(); mbLower = true; mbIn = true; - ImplDrawSpin( sal_False, sal_True ); + ImplDrawSpin( false, true ); } return; } @@ -4077,7 +4077,7 @@ void ToolBox::MouseButtonDown( const MouseEvent& rMEvt ) // start dragging pMgr->StartDragging( this, aMousePos, Rectangle( aPos, aSize ), - nLineMode, sal_False ); + nLineMode, false ); return; } } @@ -4156,7 +4156,7 @@ void ToolBox::Paint( const Rectangle& rPaintRect ) if ( mnWinStyle & WB_SCROLL ) { if ( mnCurLines > mnLines ) - ImplDrawSpin( sal_False, sal_False ); + ImplDrawSpin( false, false ); } // draw buttons @@ -4446,9 +4446,9 @@ bool ToolBox::Notify( NotifyEvent& rNEvt ) } else if( (GetGetFocusFlags() & (GETFOCUS_BACKWARD|GETFOCUS_TAB) ) == (GETFOCUS_BACKWARD|GETFOCUS_TAB)) // Shift-TAB was pressed in the parent - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); else - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); mnLastFocusItemId = 0; @@ -4540,10 +4540,10 @@ void ToolBox::Command( const CommandEvent& rCEvt ) if ( pData->GetMode() == COMMAND_WHEEL_SCROLL ) { if ( (mnCurLine > 1) && (pData->GetDelta() > 0) ) - ShowLine( sal_False ); + ShowLine( false ); else if ( (mnCurLine+mnVisLines-1 < mnCurLines) && (pData->GetDelta() < 0) ) - ShowLine( sal_True ); - ImplDrawSpin( sal_False, sal_False ); + ShowLine( true ); + ImplDrawSpin( false, false ); return; } } @@ -4572,17 +4572,17 @@ void ToolBox::StateChanged( StateChangedType nType ) { mbCalc = true; mbFormat = true; - ImplInitSettings( sal_True, sal_False, sal_False ); + ImplInitSettings( true, false, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLFOREGROUND ) { - ImplInitSettings( sal_False, sal_True, sal_False ); + ImplInitSettings( false, true, false ); Invalidate(); } else if ( nType == STATE_CHANGE_CONTROLBACKGROUND ) { - ImplInitSettings( sal_False, sal_False, sal_True ); // font, foreground, background + ImplInitSettings( false, false, true ); // font, foreground, background Invalidate(); } @@ -4604,7 +4604,7 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) { mbCalc = true; mbFormat = true; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); Invalidate(); } @@ -4614,7 +4614,7 @@ void ToolBox::DataChanged( const DataChangedEvent& rDCEvt ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::PrepareToggleFloatingMode() +bool ToolBox::PrepareToggleFloatingMode() { return DockingWindow::PrepareToggleFloatingMode(); } @@ -4656,7 +4656,7 @@ void ToolBox::ToggleFloatingMode() // if orientation changes, the toolbox has to be initialized again // to update the direction of the gradient mbCalc = true; - ImplInitSettings( sal_True, sal_True, sal_True ); + ImplInitSettings( true, true, true ); } mbFormat = true; @@ -4675,13 +4675,13 @@ void ToolBox::StartDocking() // ----------------------------------------------------------------------- -sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) +bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) { // do nothing during dragging, it was calculated before if ( mbDragging ) - return sal_False; + return false; - sal_Bool bFloatMode = sal_False; + bool bFloatMode = false; DockingWindow::Docking( rPos, rRect ); @@ -4728,7 +4728,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) // become a floating window Rectangle aIntersect = aInRect.GetIntersection( aDockingRect ); if ( aIntersect == aDockingRect ) - bFloatMode = sal_True; + bFloatMode = true; else { // docking rectangle is in the "sensible area" @@ -4781,7 +4781,7 @@ sal_Bool ToolBox::Docking( const Point& rPos, Rectangle& rRect ) } } else - bFloatMode = sal_True; + bFloatMode = true; if ( bFloatMode ) { @@ -4810,7 +4810,7 @@ void ToolBox::EndDocking( const Rectangle& rRect, sal_Bool bFloatMode ) if ( meAlign != meDockAlign ) SetAlign( meDockAlign ); } - if ( bFloatMode || (bFloatMode != ImplIsFloatingMode()) ) + if ( bFloatMode || (bool(bFloatMode) != ImplIsFloatingMode()) ) DockingWindow::EndDocking( rRect, bFloatMode ); } @@ -4924,9 +4924,9 @@ Size ToolBox::CalcPopupWindowSizePixel() const nLines = (sal_uInt16) ceil( sqrt( (double) GetItemCount() ) ); } - sal_Bool bPopup = mpData->mbAssumePopupMode; + bool bPopup = mpData->mbAssumePopupMode; ToolBox *pThis = (ToolBox*) this; - pThis->mpData->mbAssumePopupMode = sal_True; + pThis->mpData->mbAssumePopupMode = true; Size aSize = CalcFloatingWindowSizePixel( nLines ); @@ -4943,13 +4943,13 @@ Size ToolBox::CalcFloatingWindowSizePixel() const Size ToolBox::CalcFloatingWindowSizePixel( sal_uInt16 nCalcLines ) const { - sal_Bool bFloat = mpData->mbAssumeFloating; - sal_Bool bDocking = mpData->mbAssumeDocked; + bool bFloat = mpData->mbAssumeFloating; + bool bDocking = mpData->mbAssumeDocked; // simulate floating mode and force reformat before calculating ToolBox *pThis = (ToolBox*) this; - pThis->mpData->mbAssumeFloating = sal_True; - pThis->mpData->mbAssumeDocked = sal_False; + pThis->mpData->mbAssumeFloating = true; + pThis->mpData->mbAssumeDocked = false; Size aSize = ImplCalcFloatSize( (ToolBox*) this, nCalcLines ); @@ -5030,7 +5030,7 @@ void ToolBox::GetFocus() void ToolBox::LoseFocus() { - ImplChangeHighlight( NULL, sal_True ); + ImplChangeHighlight( NULL, true ); DockingWindow::LoseFocus(); } @@ -5038,7 +5038,7 @@ void ToolBox::LoseFocus() // ----------------------------------------------------------------------- // performs the action associated with an item, ie simulates clicking the item -void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl ) +void ToolBox::TriggerItem( sal_uInt16 nItemId, bool bShift, bool bCtrl ) { mnHighItemId = nItemId; sal_uInt16 nModifier = 0; @@ -5054,16 +5054,16 @@ void ToolBox::TriggerItem( sal_uInt16 nItemId, sal_Bool bShift, sal_Bool bCtrl ) // calls the button's action handler // returns sal_True if action was called -sal_Bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) +bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) { - sal_Bool bRet = sal_True; + bool bRet = true; if( mnHighItemId ) { ImplToolItem *pToolItem = ImplGetItem( mnHighItemId ); // #107712#, activate can also be called for disabled entries if( pToolItem && !pToolItem->mbEnabled ) - return sal_True; + return true; if( pToolItem && pToolItem->mpWindow && HasFocus() ) { @@ -5110,13 +5110,13 @@ sal_Bool ToolBox::ImplActivateItem( KeyCode aKeyCode ) } } else - bRet = sal_False; + bRet = false; return bRet; } // ----------------------------------------------------------------------- -sal_Bool ImplCloseLastPopup( Window *pParent ) +bool ImplCloseLastPopup( Window *pParent ) { // close last popup toolbox (see also: // ImplHandleMouseFloatMode(...) in winproc.cxx ) @@ -5128,23 +5128,23 @@ sal_Bool ImplCloseLastPopup( Window *pParent ) if( pLastLevelFloat && pLastLevelFloat != pParent ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - return sal_True; + return true; } } - return sal_False; + return false; } // opens a drop down toolbox item // returns sal_True if item was opened -sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) +bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) { sal_uInt16 nCode = aKeyCode.GetCode(); - sal_Bool bRet = sal_True; + bool bRet = true; // arrow keys should work only in the opposite direction of alignment (to not break cursor travelling) if ( ((nCode == KEY_LEFT || nCode == KEY_RIGHT) && IsHorizontal()) || ((nCode == KEY_UP || nCode == KEY_DOWN) && !IsHorizontal()) ) - return sal_False; + return false; if( IsMenuEnabled() && mpData->mbMenubuttonSelected ) { @@ -5168,7 +5168,7 @@ sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) mbIsKeyEvent = true; Activate(); - mpData->mbDropDownByKeyboard = sal_True; + mpData->mbDropDownByKeyboard = true; GetDropdownClickHdl().Call( this ); mbIsKeyEvent = false; @@ -5176,7 +5176,7 @@ sal_Bool ToolBox::ImplOpenItem( KeyCode aKeyCode ) mnMouseModifier = 0; } else - bRet = sal_False; + bRet = false; return bRet; } @@ -5193,8 +5193,8 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) bool bOldSchoolContainer = ((pParent->GetStyle() & (WB_DIALOGCONTROL | WB_NODIALOGCONTROL)) == WB_DIALOGCONTROL); bool bParentIsContainer = bOldSchoolContainer || isContainerWindow(pParent); - sal_Bool bForwardKey = sal_False; - sal_Bool bGrabFocusToDocument = sal_False; + bool bForwardKey = false; + bool bGrabFocusToDocument = false; // #107776# we might be destroyed in the keyhandler ImplDelData aDelData; @@ -5208,7 +5208,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( !IsHorizontal() ) - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); else ImplOpenItem( aKeyCode ); } @@ -5218,7 +5218,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( IsHorizontal() ) - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); else ImplOpenItem( aKeyCode ); } @@ -5228,7 +5228,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( !IsHorizontal() ) - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); else ImplOpenItem( aKeyCode ); } @@ -5238,7 +5238,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) if( aKeyCode.GetModifier() ) // allow only pure cursor keys break; if( IsHorizontal() ) - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); else ImplOpenItem( aKeyCode ); } @@ -5252,7 +5252,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = 1; mbFormat = true; ImplFormat(); - ImplDrawSpin( sal_False, sal_False ); + ImplDrawSpin( false, false ); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; @@ -5265,20 +5265,20 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) mnCurLine = mnCurLines; mbFormat = true; ImplFormat(); - ImplDrawSpin( sal_False, sal_False ); + ImplDrawSpin( false, false ); ImplChangeHighlight( ImplGetFirstValidItem( mnCurLine ) ); } break; case KEY_END: { ImplChangeHighlight( NULL ); - ImplChangeHighlightUpDn( sal_False ); + ImplChangeHighlightUpDn( false ); } break; case KEY_HOME: { ImplChangeHighlight( NULL ); - ImplChangeHighlightUpDn( sal_True ); + ImplChangeHighlightUpDn( true ); } break; case KEY_ESCAPE: @@ -5310,7 +5310,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) ImplToolItem *pItem = ImplGetItem( mnHighItemId ); if( !pItem->mbEnabled ) { - bGrabFocusToDocument = sal_True; + bGrabFocusToDocument = true; } } if( !bGrabFocusToDocument ) @@ -5340,7 +5340,7 @@ void ToolBox::KeyInput( const KeyEvent& rKEvt ) // while the toolbox has the focus // just forward function and special keys and combinations with Alt-key if( aKeyGroup == KEYGROUP_FKEYS || aKeyGroup == KEYGROUP_MISC || aKeyCode.IsMod2() ) - bForwardKey = sal_True; + bForwardKey = true; } } } @@ -5439,11 +5439,11 @@ void ToolBox::ChangeHighlight( sal_uInt16 nPos ) { if ( nPos < GetItemCount() ) { ImplGrabFocus( 0 ); - ImplChangeHighlight ( ImplGetItem ( GetItemId ( (sal_uInt16) nPos ) ), sal_False ); + ImplChangeHighlight ( ImplGetItem ( GetItemId ( (sal_uInt16) nPos ) ), false ); } } -void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus ) +void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, bool bNoGrabFocus ) { // avoid recursion due to focus change if( mbChangingHighlight ) @@ -5522,17 +5522,17 @@ void ToolBox::ImplChangeHighlight( ImplToolItem* pItem, sal_Bool bNoGrabFocus ) // ----------------------------------------------------------------------- // check for keyboard accessible items -static sal_Bool ImplIsValidItem( const ImplToolItem* pItem, sal_Bool bNotClipped ) +static bool ImplIsValidItem( const ImplToolItem* pItem, bool bNotClipped ) { - sal_Bool bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem )); + bool bValid = (pItem && pItem->meType == TOOLBOXITEM_BUTTON && pItem->mbVisible && !ImplIsFixedControl( pItem )); if( bValid && bNotClipped && pItem->IsClipped() ) - bValid = sal_False; + bValid = false; return bValid; } // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) +bool ToolBox::ImplChangeHighlightUpDn( bool bUp, bool bNoCycle ) { ImplToolItem* pToolItem = ImplGetItem( mnHighItemId ); @@ -5549,13 +5549,13 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) while( it != mpData->m_aItems.begin() ) { --it; - if ( ImplIsValidItem( &(*it), sal_True ) ) + if ( ImplIsValidItem( &(*it), true ) ) { pItem = &(*it); break; } } - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); ImplChangeHighlight( pItem ); } else @@ -5564,17 +5564,17 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - if ( ImplIsValidItem( &(*it), sal_True ) ) + if ( ImplIsValidItem( &(*it), true ) ) break; ++it; } if( it != mpData->m_aItems.end() ) { - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); ImplChangeHighlight( &(*it) ); } } - return sal_True; + return true; } if( bUp ) @@ -5583,7 +5583,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) std::vector< ImplToolItem >::iterator it = mpData->m_aItems.begin(); while( it != mpData->m_aItems.end() ) { - if ( ImplIsValidItem( &(*it), sal_False ) ) + if ( ImplIsValidItem( &(*it), false ) ) break; ++it; } @@ -5592,11 +5592,11 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( (it != mpData->m_aItems.end() && &(*it) == ImplGetFirstClippedItem( this )) && IsMenuEnabled() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } else ImplChangeHighlight( (it != mpData->m_aItems.end()) ? &(*it) : NULL ); - return sal_True; + return true; } else { @@ -5606,7 +5606,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } else { @@ -5615,7 +5615,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) while( it != mpData->m_aItems.begin() ) { --it; - if ( ImplIsValidItem( &(*it), sal_False ) ) + if ( ImplIsValidItem( &(*it), false ) ) { pItem = &(*it); break; @@ -5623,7 +5623,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) } ImplChangeHighlight( pItem ); } - return sal_True; + return true; } } @@ -5640,14 +5640,14 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( !pos-- ) { if( bNoCycle ) - return sal_False; + return false; // highlight the menu button if it is the last item if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); - return sal_True; + ImplDrawMenubutton( this, true ); + return true; } else pos = nCount-1; @@ -5658,14 +5658,14 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) if( ++pos >= nCount ) { if( bNoCycle ) - return sal_False; + return false; // highlight the menu button if it is the last item if( IsMenuEnabled() && !ImplIsFloatingMode() ) { ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); - return sal_True; + ImplDrawMenubutton( this, true ); + return true; } else pos = 0; @@ -5674,7 +5674,7 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) pToolItem = &mpData->m_aItems[pos]; - if ( ImplIsValidItem( pToolItem, sal_False ) ) + if ( ImplIsValidItem( pToolItem, false ) ) break; } while( ++i < nCount); @@ -5683,14 +5683,14 @@ sal_Bool ToolBox::ImplChangeHighlightUpDn( sal_Bool bUp, sal_Bool bNoCycle ) { // select the menu button if a clipped item would be selected ImplChangeHighlight( NULL ); - ImplDrawMenubutton( this, sal_True ); + ImplDrawMenubutton( this, true ); } else if( i != nCount ) ImplChangeHighlight( pToolItem ); else - return sal_False; + return false; } - return sal_True; + return true; } // ----------------------------------------------------------------------- @@ -5727,7 +5727,7 @@ void ToolBox::ImplHideFocus() if ( mpData->mbMenubuttonSelected ) { // remove highlight from menubutton - ImplDrawMenubutton( this, sal_False ); + ImplDrawMenubutton( this, false ); } } diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 277d5cf8c09f..9c5667a96209 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -76,17 +76,17 @@ ImplToolBoxPrivateData::ImplToolBoxPrivateData() : mnMenuButtonWidth = TB_MENUBUTTON_SIZE; - mbIsLocked = sal_False; - mbNativeButtons = sal_False; - mbIsPaintLocked = sal_False; - mbAssumeDocked = sal_False; - mbAssumePopupMode = sal_False; - mbAssumeFloating = sal_False; - mbKeyInputDisabled = sal_False; - mbMenubuttonSelected = sal_False; - mbPageScroll = sal_False; - mbWillUsePopupMode = sal_False; - mbDropDownByKeyboard = sal_False; + mbIsLocked = false; + mbNativeButtons = false; + mbIsPaintLocked = false; + mbAssumeDocked = false; + mbAssumePopupMode = false; + mbAssumeFloating = false; + mbKeyInputDisabled = false; + mbMenubuttonSelected = false; + mbPageScroll = false; + mbWillUsePopupMode = false; + mbDropDownByKeyboard = false; } ImplToolBoxPrivateData::~ImplToolBoxPrivateData() @@ -98,7 +98,7 @@ ImplToolBoxPrivateData::~ImplToolBoxPrivateData() // ----------------------------------------------------------------------- void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, - sal_Bool bEmptyBtn) + bool bEmptyBtn) { mnId = nItemId; mpWindow = NULL; @@ -121,7 +121,7 @@ void ImplToolItem::init(sal_uInt16 nItemId, ToolBoxItemBits nItemBits, ImplToolItem::ImplToolItem() { - init(0, 0, sal_True); + init(0, 0, true); } // ----------------------------------------------------------------------- @@ -130,7 +130,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, ToolBoxItemBits nItemBits ) : maImage( rImage ) { - init(nItemId, nItemBits, sal_False); + init(nItemId, nItemBits, false); } // ----------------------------------------------------------------------- @@ -139,7 +139,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const OUString& rText, ToolBoxItemBits nItemBits ) : maText( rText ) { - init(nItemId, nItemBits, sal_False); + init(nItemId, nItemBits, false); } // ----------------------------------------------------------------------- @@ -149,7 +149,7 @@ ImplToolItem::ImplToolItem( sal_uInt16 nItemId, const Image& rImage, maImage( rImage ), maText( rText ) { - init(nItemId, nItemBits, sal_False); + init(nItemId, nItemBits, false); } // ----------------------------------------------------------------------- @@ -231,7 +231,7 @@ ImplToolItem& ImplToolItem::operator=( const ImplToolItem& rItem ) // ----------------------------------------------------------------------- -Size ImplToolItem::GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) +Size ImplToolItem::GetSize( bool bHorz, bool bCheckMaxWidth, long maxWidth, const Size& rDefaultSize ) { Size aSize( rDefaultSize ); // the size of 'standard' toolbox items // non-standard items are eg windows or buttons with text @@ -285,27 +285,27 @@ Size ImplToolItem::GetSize( sal_Bool bHorz, sal_Bool bCheckMaxWidth, long maxWid // ----------------------------------------------------------------------- -void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& rbImage, sal_Bool& rbText ) const +void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, bool& rbImage, bool& rbText ) const { if ( meType != TOOLBOXITEM_BUTTON ) { // no button -> draw nothing - rbImage = rbText = sal_False; + rbImage = rbText = false; return; } - sal_Bool bHasImage; - sal_Bool bHasText; + bool bHasImage; + bool bHasText; // check for image and/or text if ( !(maImage) ) - bHasImage = sal_False; + bHasImage = false; else - bHasImage = sal_True; + bHasImage = true; if ( maText.isEmpty() ) - bHasText = sal_False; + bHasText = false; else - bHasText = sal_True; + bHasText = true; // prefer images if symbolonly buttons are drawn // prefer texts if textonly buttons are dreawn @@ -314,38 +314,38 @@ void ImplToolItem::DetermineButtonDrawStyle( ButtonType eButtonType, sal_Bool& r { if( bHasImage || !bHasText ) { - rbImage = sal_True; - rbText = sal_False; + rbImage = true; + rbText = false; } else { - rbImage = sal_False; - rbText = sal_True; + rbImage = false; + rbText = true; } } else if ( eButtonType == BUTTON_TEXT ) // drawing text only { if( bHasText || !bHasImage ) { - rbImage = sal_False; - rbText = sal_True; + rbImage = false; + rbText = true; } else { - rbImage = sal_True; - rbText = sal_False; + rbImage = true; + rbText = false; } } else // drawing icons and text both { - rbImage = sal_True; - rbText = sal_True; + rbImage = true; + rbText = true; } } // ----------------------------------------------------------------------- -Rectangle ImplToolItem::GetDropDownRect( sal_Bool bHorz ) const +Rectangle ImplToolItem::GetDropDownRect( bool bHorz ) const { Rectangle aRect; if( (mnBits & TIB_DROPDOWN) && !maRect.IsEmpty() ) @@ -363,14 +363,14 @@ Rectangle ImplToolItem::GetDropDownRect( sal_Bool bHorz ) const // ----------------------------------------------------------------------- -sal_Bool ImplToolItem::IsClipped() const +bool ImplToolItem::IsClipped() const { return ( meType == TOOLBOXITEM_BUTTON && mbVisible && maRect.IsEmpty() ); } // ----------------------------------------------------------------------- -sal_Bool ImplToolItem::IsItemHidden() const +bool ImplToolItem::IsItemHidden() const { return ( meType == TOOLBOXITEM_BUTTON && !mbVisible ); } @@ -389,7 +389,7 @@ const OUString ToolBox::ImplConvertMenuString( const OUString& rStr ) // ----------------------------------------------------------------------- -void ToolBox::ImplInvalidate( sal_Bool bNewCalc, sal_Bool bFullPaint ) +void ToolBox::ImplInvalidate( bool bNewCalc, bool bFullPaint ) { ImplUpdateInputEnable(); @@ -529,7 +529,7 @@ void ToolBox::UserDraw( const UserDrawEvent& ) void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) { sal_uLong nObjMask; - sal_Bool bImage = sal_False; // Wurde Image gesetzt + bool bImage = false; // Wurde Image gesetzt // Item anlegen ImplToolItem aItem; @@ -564,22 +564,22 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) Bitmap aBmp = Bitmap( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); aItem.maImage = Image( aBmp, IMAGE_STDBTN_COLOR ); - bImage = sal_True; + bImage = true; } if ( nObjMask & RSC_TOOLBOXITEM_IMAGE ) { aItem.maImage = Image( ResId( (RSHEADER_TYPE*)GetClassRes(), *rResId.GetResMgr() ) ); IncrementRes( GetObjSizeRes( (RSHEADER_TYPE*)GetClassRes() ) ); - bImage = sal_True; + bImage = true; } if ( nObjMask & RSC_TOOLBOXITEM_DISABLE ) - aItem.mbEnabled = !(sal_Bool)ReadShortRes(); + aItem.mbEnabled = ReadShortRes() == 0; if ( nObjMask & RSC_TOOLBOXITEM_STATE ) aItem.meState = (TriState)ReadLongRes(); if ( nObjMask & RSC_TOOLBOXITEM_HIDE ) - aItem.mbVisible = !((sal_Bool)ReadShortRes()); + aItem.mbVisible = ReadShortRes() == 0; if ( nObjMask & RSC_TOOLBOXITEM_COMMAND ) aItem.maCommandStr = ReadStringRes(); @@ -590,15 +590,15 @@ void ToolBox::InsertItem( const ResId& rResId, sal_uInt16 nPos ) aItem.maImage = maImageList.GetImage( aItem.mnId ); // Wenn es sich um ein ButtonItem handelt, die ID ueberpruefen - sal_Bool bNewCalc; + bool bNewCalc; if ( aItem.meType != TOOLBOXITEM_BUTTON ) { - bNewCalc = sal_False; + bNewCalc = false; aItem.mnId = 0; } else { - bNewCalc = sal_True; + bNewCalc = true; DBG_ASSERT( aItem.mnId, "ToolBox::InsertItem(): ItemId == 0" ); DBG_ASSERT( GetItemPos( aItem.mnId ) == TOOLBOX_ITEM_NOTFOUND, @@ -631,7 +631,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, SetItemImage(nItemId, rImage); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -653,7 +653,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const Image& rImage, SetItemImage(nItemId, rImage); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -673,7 +673,7 @@ void ToolBox::InsertItem( sal_uInt16 nItemId, const OUString& rText, mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), ImplToolItem( nItemId, ImplConvertMenuString( rText ), nBits ) ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -818,7 +818,7 @@ void ToolBox::InsertWindow( sal_uInt16 nItemId, Window* pWindow, if ( pWindow ) pWindow->Hide(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -836,7 +836,7 @@ void ToolBox::InsertSpace( sal_uInt16 nPos ) mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -856,7 +856,7 @@ void ToolBox::InsertSeparator( sal_uInt16 nPos, sal_uInt16 nPixSize ) mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -874,7 +874,7 @@ void ToolBox::InsertBreak( sal_uInt16 nPos ) mpData->m_aItems.insert( (nPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nPos : mpData->m_aItems.end(), aItem ); mpData->ImplClearLayoutData(); - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos = sal::static_int_cast<sal_uInt16>(( nPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nPos); @@ -887,11 +887,11 @@ void ToolBox::RemoveItem( sal_uInt16 nPos ) { if( nPos < mpData->m_aItems.size() ) { - sal_Bool bMustCalc; + bool bMustCalc; if ( mpData->m_aItems[nPos].meType == TOOLBOXITEM_BUTTON ) - bMustCalc = sal_True; + bMustCalc = true; else - bMustCalc = sal_False; + bMustCalc = false; if ( mpData->m_aItems[nPos].mpWindow ) mpData->m_aItems[nPos].mpWindow->Hide(); @@ -937,7 +937,7 @@ void ToolBox::CopyItem( const ToolBox& rToolBox, sal_uInt16 nItemId, mpData->m_aItems.insert( (nNewPos < mpData->m_aItems.size()) ? mpData->m_aItems.begin()+nNewPos : mpData->m_aItems.end(), aNewItem ); mpData->ImplClearLayoutData(); // ToolBox neu ausgeben - ImplInvalidate( sal_False ); + ImplInvalidate( false ); // Notify sal_uInt16 nNewPos2 = sal::static_int_cast<sal_uInt16>(( nNewPos == TOOLBOX_APPEND ) ? ( mpData->m_aItems.size() - 1 ) : nNewPos); @@ -956,7 +956,7 @@ void ToolBox::Clear() mnCurItemId = 0; mnHighItemId = 0; - ImplInvalidate( sal_True, sal_True ); + ImplInvalidate( true, true ); // Notify ImplCallEventListeners( VCLEVENT_TOOLBOX_ALLITEMSCHANGED ); @@ -972,7 +972,7 @@ void ToolBox::SetButtonType( ButtonType eNewType ) // Hier besser alles neu ausgeben, da es ansonsten zu Problemen // mit den per CopyBits kopierten Bereichen geben kann - ImplInvalidate( sal_True ); + ImplInvalidate( true ); } } @@ -1052,7 +1052,7 @@ void ToolBox::SetAlign( WindowAlign eNewAlign ) mbHorz = true; // Update the background according to Persona if necessary - ImplInitSettings( sal_False, sal_False, sal_True ); + ImplInitSettings( false, false, true ); // Hier alles neu ausgeben, da sich Border auch aendert mbCalc = true; @@ -1076,13 +1076,13 @@ void ToolBox::SetLineCount( sal_uInt16 nNewLines ) // Hier besser alles neu ausgeben, da es ansonsten zu Problemen // mit den per CopyBits kopierten Bereichen geben kann - ImplInvalidate( sal_False ); + ImplInvalidate( false ); } } // ----------------------------------------------------------------------- -void ToolBox::SetPageScroll( sal_Bool b ) +void ToolBox::SetPageScroll( bool b ) { mpData->mbPageScroll = b; } @@ -1278,16 +1278,16 @@ Size ToolBox::GetItemContentSize( sal_uInt16 nItemId ) const // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHasExternalMenubutton() +bool ToolBox::ImplHasExternalMenubutton() { // check if the borderwindow (i.e. the decoration) provides the menu button - sal_Bool bRet = sal_False; + bool bRet = false; if( ImplIsFloatingMode() ) { // custom menu is placed in the decoration ImplBorderWindow *pBorderWin = dynamic_cast<ImplBorderWindow*>( GetWindow( WINDOW_BORDER ) ); if( pBorderWin && !pBorderWin->GetMenuRect().IsEmpty() ) - bRet = sal_True; + bRet = true; } return bRet; } @@ -1304,9 +1304,9 @@ void ToolBox::SetItemBits( sal_uInt16 nItemId, ToolBoxItemBits nBits ) nBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; nOldBits &= TIB_LEFT | TIB_AUTOSIZE | TIB_DROPDOWN; // trigger reformat when the item width has changed (dropdown arrow) - sal_Bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); + bool bFormat = (nBits & TIB_DROPDOWN) != (nOldBits & TIB_DROPDOWN); if ( nBits != nOldBits ) - ImplInvalidate( sal_True, bFormat ); + ImplInvalidate( true, bFormat ); } } @@ -1401,7 +1401,7 @@ void ToolBox::SetItemImage( sal_uInt16 nItemId, const Image& rImage ) Size aOldSize = pItem->maImage.GetSizePixel(); pItem->maImage = aImage; if ( aOldSize != pItem->maImage.GetSizePixel() ) - ImplInvalidate( sal_True ); + ImplInvalidate( true ); else ImplUpdateItem( nPos ); } @@ -1463,7 +1463,7 @@ void ToolBox::SetItemImageAngle( sal_uInt16 nItemId, long nAngle10 ) if ( !mbCalc ) { if ( aOldSize != pItem->maImage.GetSizePixel() ) - ImplInvalidate( sal_True ); + ImplInvalidate( true ); else ImplUpdateItem( nPos ); } @@ -1482,7 +1482,7 @@ static Image ImplMirrorImage( const Image& rImage ) return Image( aMirrBitmapEx ); } -void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, sal_Bool bMirror ) +void ToolBox::SetItemImageMirrorMode( sal_uInt16 nItemId, bool bMirror ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1537,7 +1537,7 @@ void ToolBox::SetItemText( sal_uInt16 nItemId, const OUString& rText ) pItem->maText = ImplConvertMenuString( rText ); mpData->ImplClearLayoutData(); if ( nOldWidth != GetCtrlTextWidth( pItem->maText ) ) - ImplInvalidate( sal_True ); + ImplInvalidate( true ); else ImplUpdateItem( nPos ); } @@ -1576,7 +1576,7 @@ void ToolBox::SetItemWindow( sal_uInt16 nItemId, Window* pNewWindow ) pItem->mpWindow = pNewWindow; if ( pNewWindow ) pNewWindow->Hide(); - ImplInvalidate( sal_True ); + ImplInvalidate( true ); ImplCallEventListeners( VCLEVENT_TOOLBOX_ITEMWINDOWCHANGED, reinterpret_cast< void* >( nPos ) ); } } @@ -1636,7 +1636,7 @@ void ToolBox::EndSelection() // ----------------------------------------------------------------------- -void ToolBox::SetItemDown( sal_uInt16 nItemId, sal_Bool bDown, sal_Bool bRelease ) +void ToolBox::SetItemDown( sal_uInt16 nItemId, bool bDown, bool bRelease ) { sal_uInt16 nPos = GetItemPos( nItemId ); @@ -1789,14 +1789,14 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const +bool ToolBox::IsItemEnabled( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbEnabled; else - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -1812,36 +1812,36 @@ void ToolBox::ShowItem( sal_uInt16 nItemId, bool bVisible ) if ( pItem->mbVisible != bVisible ) { pItem->mbVisible = bVisible; - ImplInvalidate( sal_False ); + ImplInvalidate( false ); } } } // ----------------------------------------------------------------------- -sal_Bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const +bool ToolBox::IsItemVisible( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem ) return pItem->mbVisible; else - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const +bool ToolBox::IsItemReallyVisible( sal_uInt16 nItemId ) const { // is the item on the visible area of the toolbox? - sal_Bool bRet = sal_False; + bool bRet = false; Rectangle aRect( mnLeftBorder, mnTopBorder, mnDX-mnRightBorder, mnDY-mnBottomBorder ); ImplToolItem* pItem = ImplGetItem( nItemId ); if ( pItem && pItem->mbVisible && !pItem->maRect.IsEmpty() && aRect.IsOver( pItem->maRect ) ) { - bRet = sal_True; + bRet = true; } return bRet; @@ -1958,7 +1958,7 @@ void ToolBox::SetOutStyle( sal_uInt16 nNewStyle ) mnMaxItemHeight = 1; } - ImplInvalidate( sal_True, sal_True ); + ImplInvalidate( true, true ); } } @@ -1974,11 +1974,11 @@ void ToolBox::ImplUpdateInputEnable() if( it->mbEnabled ) { // at least one useful entry - mpData->mbKeyInputDisabled = sal_False; + mpData->mbKeyInputDisabled = false; return; } } - mpData->mbKeyInputDisabled = sal_True; + mpData->mbKeyInputDisabled = true; } // ----------------------------------------------------------------------- @@ -1994,7 +1994,7 @@ void ToolBox::ImplFillLayoutData() const // Nur malen, wenn Rechteck im PaintRectangle liegt if ( !pItem->maRect.IsEmpty() ) - const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, sal_False, sal_True ); + const_cast<ToolBox*>(this)->ImplDrawItem( i, sal_False, false, true ); } } @@ -2096,7 +2096,7 @@ sal_uInt16 ToolBox::GetMenuType() const return mpData->maMenuType; } -sal_Bool ToolBox::IsMenuEnabled() const +bool ToolBox::IsMenuEnabled() const { return mpData->maMenuType != TOOLBOX_MENUTYPE_NONE; } @@ -2113,7 +2113,7 @@ void ToolBox::SetMenuButtonHdl( const Link& rLink ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::ImplHasClippedItems() +bool ToolBox::ImplHasClippedItems() { // are any items currently clipped ? ImplFormat(); @@ -2121,10 +2121,10 @@ sal_Bool ToolBox::ImplHasClippedItems() while ( it != mpData->m_aItems.end() ) { if( it->IsClipped() ) - return sal_True; + return true; ++it; } - return sal_False; + return false; } void ToolBox::UpdateCustomMenu() @@ -2190,7 +2190,7 @@ IMPL_LINK( ToolBox, ImplCustomMenuListener, VclMenuEvent*, pEvent ) { sal_uInt16 id = GetMenu()->GetItemId( pEvent->GetItemPos() ); if( id >= TOOLBOX_MENUITEM_START ) - TriggerItem( id - TOOLBOX_MENUITEM_START, sal_False, sal_False ); + TriggerItem( id - TOOLBOX_MENUITEM_START, false, false ); } return 0; } @@ -2275,24 +2275,24 @@ void ToolBox::ExecuteCustomMenu() // ----------------------------------------------------------------------- // checks override first, useful during calculation of sizes -sal_Bool ToolBox::ImplIsFloatingMode() const +bool ToolBox::ImplIsFloatingMode() const { DBG_ASSERT( !(mpData->mbAssumeDocked && mpData->mbAssumeFloating), "ToolBox::ImplIsFloatingMode(): cannot assume docked and floating" ); if( mpData->mbAssumeDocked ) - return sal_False; + return false; else if( mpData->mbAssumeFloating ) - return sal_True; + return true; else return IsFloatingMode(); } // checks override first, useful during calculation of sizes -sal_Bool ToolBox::ImplIsInPopupMode() const +bool ToolBox::ImplIsInPopupMode() const { if( mpData->mbAssumePopupMode ) - return sal_True; + return true; else { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); @@ -2302,7 +2302,7 @@ sal_Bool ToolBox::ImplIsInPopupMode() const // ----------------------------------------------------------------------- -void ToolBox::Lock( sal_Bool bLock ) +void ToolBox::Lock( bool bLock ) { ImplDockingWindowWrapper *pWrapper = ImplGetDockingManager()->GetDockingWindowWrapper( this ); if( !pWrapper ) @@ -2322,7 +2322,7 @@ void ToolBox::Lock( sal_Bool bLock ) // ----------------------------------------------------------------------- -sal_Bool ToolBox::AlwaysLocked() +bool ToolBox::AlwaysLocked() { // read config item to determine toolbox behaviour, used for subtoolbars @@ -2338,21 +2338,21 @@ sal_Bool ToolBox::AlwaysLocked() if ( aNode.isValid() ) { // feature enabled ? - sal_Bool bStatesEnabled = sal_Bool(); + bool bStatesEnabled = bool(); ::com::sun::star::uno::Any aValue = aNode.getNodeValue( OUString("StatesEnabled") ); if( aValue >>= bStatesEnabled ) { - if( bStatesEnabled == sal_True ) + if( bStatesEnabled ) { // now read the locking state utl::OConfigurationNode aNode2 = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( comphelper::getProcessComponentContext(), OUString("/org.openoffice.Office.UI.GlobalSettings/Toolbars/States") ); // note: case sensitive ! - sal_Bool bLocked = sal_Bool(); + bool bLocked = bool(); ::com::sun::star::uno::Any aValue2 = aNode2.getNodeValue( OUString("Locked") ); if( aValue2 >>= bLocked ) - nAlwaysLocked = (bLocked == sal_True) ? 1 : 0; + nAlwaysLocked = bLocked ? 1 : 0; } } } @@ -2361,12 +2361,12 @@ sal_Bool ToolBox::AlwaysLocked() return nAlwaysLocked == 1 ? sal_True : sal_False; } -sal_Bool ToolBox::WillUsePopupMode() const +bool ToolBox::WillUsePopupMode() const { return mpData->mbWillUsePopupMode; } -void ToolBox::WillUsePopupMode( sal_Bool b ) +void ToolBox::WillUsePopupMode( bool b ) { mpData->mbWillUsePopupMode = b; } diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 1d93c80dd9cd..ed057f78fcd5 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -450,10 +450,10 @@ bool Window::ImplCheckUIFont( const Font& rFont ) // ----------------------------------------------------------------------- -void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl ) +void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) { StyleSettings aTmpSt( rSettings.GetStyleSettings() ); - aTmpSt.SetHighContrastMode( sal_False ); + aTmpSt.SetHighContrastMode( false ); rSettings.SetStyleSettings( aTmpSt ); ImplGetFrame()->UpdateSettings( rSettings ); // reset default border width for layouters @@ -635,7 +635,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl // (see above) then accept that if( !rSettings.GetStyleSettings().GetHighContrastMode() ) { - sal_Bool bTmp = sal_False, bAutoHCMode = sal_True; + bool bTmp = false, bAutoHCMode = true; utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( comphelper::getProcessComponentContext(), OUString("org.openoffice.Office.Common/Accessibility") ); // note: case sensitive ! @@ -660,7 +660,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl if( bForceHCMode ) { aStyleSettings = rSettings.GetStyleSettings(); - aStyleSettings.SetHighContrastMode( sal_True ); + aStyleSettings.SetHighContrastMode( true ); aStyleSettings.SetSymbolsStyle( STYLE_SYMBOLS_HICONTRAST ); rSettings.SetStyleSettings( aStyleSettings ); } @@ -790,7 +790,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpOverlapData->mpSaveBackRgn = NULL; mpWindowImpl->mpOverlapData->mpNextBackWin = NULL; mpWindowImpl->mpOverlapData->mnSaveBackSize = 0; - mpWindowImpl->mpOverlapData->mbSaveBack = sal_False; + mpWindowImpl->mpOverlapData->mbSaveBack = false; mpWindowImpl->mpOverlapData->mnTopLevel = 1; } @@ -906,21 +906,21 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste mpWindowImpl->mpFrameData->mnMouseCode = 0; mpWindowImpl->mpFrameData->mnMouseMode = 0; mpWindowImpl->mpFrameData->meMapUnit = MAP_PIXEL; - mpWindowImpl->mpFrameData->mbHasFocus = sal_False; - mpWindowImpl->mpFrameData->mbInMouseMove = sal_False; - mpWindowImpl->mpFrameData->mbMouseIn = sal_False; - mpWindowImpl->mpFrameData->mbStartDragCalled = sal_False; - mpWindowImpl->mpFrameData->mbNeedSysWindow = sal_False; - mpWindowImpl->mpFrameData->mbMinimized = sal_False; - mpWindowImpl->mpFrameData->mbStartFocusState = sal_False; - mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = sal_False; - mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = sal_False; - mpWindowImpl->mpFrameData->mbSysObjFocus = sal_False; + mpWindowImpl->mpFrameData->mbHasFocus = false; + mpWindowImpl->mpFrameData->mbInMouseMove = false; + mpWindowImpl->mpFrameData->mbMouseIn = false; + mpWindowImpl->mpFrameData->mbStartDragCalled = false; + mpWindowImpl->mpFrameData->mbNeedSysWindow = false; + mpWindowImpl->mpFrameData->mbMinimized = false; + mpWindowImpl->mpFrameData->mbStartFocusState = false; + mpWindowImpl->mpFrameData->mbInSysObjFocusHdl = false; + mpWindowImpl->mpFrameData->mbInSysObjToTopHdl = false; + mpWindowImpl->mpFrameData->mbSysObjFocus = false; mpWindowImpl->mpFrameData->maPaintTimer.SetTimeout( 30 ); mpWindowImpl->mpFrameData->maPaintTimer.SetTimeoutHdl( LINK( this, Window, ImplHandlePaintHdl ) ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeout( 50 ); mpWindowImpl->mpFrameData->maResizeTimer.SetTimeoutHdl( LINK( this, Window, ImplHandleResizeTimerHdl ) ); - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_False; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = false; if ( pRealParent && IsTopWindow() ) { @@ -966,7 +966,7 @@ void Window::ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSyste // side effect: ImplUpdateGlobalSettings does an ImplGetFrame()->UpdateSettings ImplUpdateGlobalSettings( *pSVData->maAppData.mpSettings ); OutputDevice::SetSettings( *pSVData->maAppData.mpSettings ); - pSVData->maAppData.mbSettingsInit = sal_True; + pSVData->maAppData.mbSettingsInit = true; } // If we create a Window with default size, query this @@ -1095,7 +1095,7 @@ void Window::ImplInsertWindow( Window* pParent ) // ----------------------------------------------------------------------- -void Window::ImplRemoveWindow( sal_Bool bRemoveFrameData ) +void Window::ImplRemoveWindow( bool bRemoveFrameData ) { // remove window from the lists if ( !mpWindowImpl->mbFrame ) @@ -1295,8 +1295,8 @@ void Window::ImplLoadRes( const ResId& rResId ) sal_uLong nObjMask = aHeader.nObjMask; - sal_Bool bPos = sal_False; - sal_Bool bSize = sal_False; + bool bPos = false; + bool bSize = false; Point aPos; Size aSize; @@ -1305,7 +1305,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // use size as per resource MapUnit ePosMap = MAP_PIXEL; - bPos = sal_True; + bPos = true; if ( nObjMask & WINDOW_XYMAPMODE ) ePosMap = (MapUnit)ReadLongRes(); @@ -1320,7 +1320,7 @@ void Window::ImplLoadRes( const ResId& rResId ) // use size as per resource MapUnit eSizeMap = MAP_PIXEL; - bSize = sal_True; + bSize = true; if ( nObjMask & WINDOW_WHMAPMODE ) eSizeMap = (MapUnit)ReadLongRes(); @@ -1393,7 +1393,7 @@ ImplWinData* Window::ImplGetWinData() const mpWindowImpl->mpWinData->mpTrackRect = NULL; mpWindowImpl->mpWinData->mnTrackFlags = 0; mpWindowImpl->mpWinData->mnIsTopWindow = (sal_uInt16) ~0; // not initialized yet, 0/1 will indicate TopWindow (see IsTopWindow()) - mpWindowImpl->mpWinData->mbMouseOver = sal_False; + mpWindowImpl->mpWinData->mbMouseOver = false; mpWindowImpl->mpWinData->mbEnableNativeWidget = (pNoNWF && *pNoNWF) ? sal_False : sal_True; // sal_True: try to draw this control with native theme API } @@ -1491,22 +1491,22 @@ sal_uInt16 Window::ImplHitTest( const Point& rFramePos ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplIsRealParentPath( const Window* pWindow ) const +bool Window::ImplIsRealParentPath( const Window* pWindow ) const { pWindow = pWindow->GetParent(); while ( pWindow ) { if ( pWindow == this ) - return sal_True; + return true; pWindow = pWindow->GetParent(); } - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::ImplIsChild( const Window* pWindow, bool bSystemWindow ) const { do { @@ -1516,19 +1516,19 @@ sal_Bool Window::ImplIsChild( const Window* pWindow, sal_Bool bSystemWindow ) co pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return sal_True; + return true; } while ( pWindow ); - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Window::ImplIsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::ImplIsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const { if ( this == pWindow ) - return sal_True; + return true; return ImplIsChild( pWindow, bSystemWindow ); } @@ -1553,7 +1553,7 @@ int Window::ImplTestMousePointerSet() PointerStyle Window::ImplGetMousePointer() const { PointerStyle ePointerStyle; - sal_Bool bWait = sal_False; + bool bWait = false; if ( IsEnabled() && IsInputEnabled() && ! IsInModalMode() ) ePointerStyle = GetPointer().GetStyle(); @@ -1573,7 +1573,7 @@ PointerStyle Window::ImplGetMousePointer() const if ( pWindow->mpWindowImpl->mnWaitCount ) { ePointerStyle = POINTER_WAIT; - bWait = sal_True; + bWait = true; } else { @@ -1596,7 +1596,7 @@ PointerStyle Window::ImplGetMousePointer() const void Window::ImplResetReallyVisible() { - sal_Bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; + bool bBecameReallyInvisible = mpWindowImpl->mbReallyVisible; mbDevOutput = false; mpWindowImpl->mbReallyVisible = false; @@ -1637,7 +1637,7 @@ void Window::ImplSetReallyVisible() if( !mpWindowImpl->mbReallyShown ) ImplCallInitShow(); - sal_Bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; + bool bBecameReallyVisible = !mpWindowImpl->mbReallyVisible; mbDevOutput = true; mpWindowImpl->mbReallyVisible = true; @@ -1814,9 +1814,9 @@ void Window::ImplLogicToPoint( Font& rFont ) const // ----------------------------------------------------------------------- -sal_Bool Window::ImplSysObjClip( const Region* pOldRegion ) +bool Window::ImplSysObjClip( const Region* pOldRegion ) { - sal_Bool bUpdate = sal_True; + bool bUpdate = true; if ( mpWindowImpl->mpSysObj ) { @@ -1955,9 +1955,9 @@ void Window::ImplUpdateSysObjClip() // ----------------------------------------------------------------------- -sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) +bool Window::ImplSetClipFlagChildren( bool bSysObjOnlySmaller ) { - sal_Bool bUpdate = sal_True; + bool bUpdate = true; if ( mpWindowImpl->mpSysObj ) { Region* pOldRegion = NULL; @@ -1971,7 +1971,7 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } @@ -1979,7 +1979,7 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) { mbInitClipRegion = true; mpWindowImpl->mbInitWinClipRegion = true; - bUpdate = sal_False; + bUpdate = false; } delete pOldRegion; @@ -1993,7 +1993,7 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2002,15 +2002,15 @@ sal_Bool Window::ImplSetClipFlagChildren( sal_Bool bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller ) +bool Window::ImplSetClipFlagOverlapWindows( bool bSysObjOnlySmaller ) { - sal_Bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); + bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); Window* pWindow = mpWindowImpl->mpFirstOverlap; while ( pWindow ) { if ( !pWindow->ImplSetClipFlagOverlapWindows( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } @@ -2019,11 +2019,11 @@ sal_Bool Window::ImplSetClipFlagOverlapWindows( sal_Bool bSysObjOnlySmaller ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller ) +bool Window::ImplSetClipFlag( bool bSysObjOnlySmaller ) { if ( !ImplIsOverlapWindow() ) { - sal_Bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); + bool bUpdate = ImplSetClipFlagChildren( bSysObjOnlySmaller ); Window* pParent = ImplGetParent(); if ( pParent && @@ -2040,7 +2040,7 @@ sal_Bool Window::ImplSetClipFlag( sal_Bool bSysObjOnlySmaller ) while ( pWindow ) { if ( !pWindow->ImplSetClipFlagChildren( bSysObjOnlySmaller ) ) - bUpdate = sal_False; + bUpdate = false; pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2120,7 +2120,7 @@ void Window::ImplExcludeOverlapWindows2( Region& rRegion ) // ----------------------------------------------------------------------- -void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOverlaps ) +void Window::ImplClipBoundaries( Region& rRegion, bool bThis, bool bOverlaps ) { if ( bThis ) ImplIntersectWindowClipRegion( rRegion ); @@ -2155,9 +2155,9 @@ void Window::ImplClipBoundaries( Region& rRegion, sal_Bool bThis, sal_Bool bOver // ----------------------------------------------------------------------- -sal_Bool Window::ImplClipChildren( Region& rRegion ) +bool Window::ImplClipChildren( Region& rRegion ) { - sal_Bool bOtherClip = sal_False; + bool bOtherClip = false; Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { @@ -2169,7 +2169,7 @@ sal_Bool Window::ImplClipChildren( Region& rRegion ) ((nClipMode & PARENTCLIPMODE_CLIP) || (GetStyle() & WB_CLIPCHILDREN)) ) pWindow->ImplExcludeWindowRegion( rRegion ); else - bOtherClip = sal_True; + bOtherClip = true; } pWindow = pWindow->mpWindowImpl->mpNext; @@ -2223,7 +2223,7 @@ void Window::ImplInitWinClipRegion() ImplClipSiblings( mpWindowImpl->maWinClipRegion ); // Clip Parent Boundaries - ImplClipBoundaries( mpWindowImpl->maWinClipRegion, sal_False, sal_True ); + ImplClipBoundaries( mpWindowImpl->maWinClipRegion, false, true ); // Clip Children if ( (GetStyle() & WB_CLIPCHILDREN) || mpWindowImpl->mbClipChildren ) @@ -2335,7 +2335,7 @@ void Window::ImplCalcOverlapRegionOverlaps( const Region& rInterRegion, Region& // ----------------------------------------------------------------------- void Window::ImplCalcOverlapRegion( const Rectangle& rSourceRect, Region& rRegion, - sal_Bool bChildren, sal_Bool bParent, sal_Bool bSiblings ) + bool bChildren, bool bParent, bool bSiblings ) { Region aRegion( rSourceRect ); if ( mpWindowImpl->mbWinRegion ) @@ -2554,7 +2554,7 @@ void Window::ImplCallPaint( const Region* pRegion, sal_uInt16 nPaintFlags ) // #98943# draw toolbox selection if( !aSelectionRect.IsEmpty() ) - DrawSelectionBackground( aSelectionRect, 3, sal_False, sal_True, sal_False ); + DrawSelectionBackground( aSelectionRect, 3, false, true, false ); delete pChildRegion; @@ -2695,7 +2695,7 @@ void Window::ImplInvalidateOverlapFrameRegion( const Region& rRegion ) { Region aRegion = rRegion; - ImplClipBoundaries( aRegion, sal_True, sal_True ); + ImplClipBoundaries( aRegion, true, true ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); @@ -2733,7 +2733,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) ImplInvalidateAllOverlapBackgrounds(); // check what has to be redrawn - sal_Bool bInvalidateAll = !pRegion; + bool bInvalidateAll = !pRegion; // take Transparent-Invalidate into account Window* pOpaqueWindow = this; @@ -2746,7 +2746,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) { pOpaqueWindow = pTempWindow; nFlags |= INVALIDATE_CHILDREN; - bInvalidateAll = sal_False; + bInvalidateAll = false; break; } @@ -2767,7 +2767,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) nFlags |= INVALIDATE_CHILDREN; } if ( (nFlags & INVALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bInvalidateAll = sal_False; + bInvalidateAll = false; if ( bInvalidateAll ) ImplInvalidateFrameRegion( NULL, nFlags ); else @@ -2788,7 +2788,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) else aRegion.Intersect( *pRegion ); } - ImplClipBoundaries( aRegion, sal_True, sal_True ); + ImplClipBoundaries( aRegion, true, true ); if ( nFlags & INVALIDATE_NOCHILDREN ) { nFlags &= ~INVALIDATE_CHILDREN; @@ -2815,7 +2815,7 @@ void Window::ImplInvalidate( const Region* pRegion, sal_uInt16 nFlags ) void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - sal_Bool bChildren ) + bool bChildren ) { if ( (mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINT | IMPL_PAINT_PAINTALL)) == IMPL_PAINT_PAINT ) { @@ -2830,7 +2830,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, Window* pWindow = mpWindowImpl->mpFirstChild; while ( pWindow ) { - pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, sal_True ); + pWindow->ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, true ); pWindow = pWindow->mpWindowImpl->mpNext; } } @@ -2840,7 +2840,7 @@ void Window::ImplMoveInvalidateRegion( const Rectangle& rRect, void Window::ImplMoveAllInvalidateRegions( const Rectangle& rRect, long nHorzScroll, long nVertScroll, - sal_Bool bChildren ) + bool bChildren ) { // also shift Paint-Region when paints need processing ImplMoveInvalidateRegion( rRect, nHorzScroll, nVertScroll, bChildren ); @@ -2924,7 +2924,7 @@ void Window::ImplValidateFrameRegion( const Region* pRegion, sal_uInt16 nFlags ) void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) { // assemble region - sal_Bool bValidateAll = !pRegion; + bool bValidateAll = !pRegion; sal_uInt16 nOrgFlags = nFlags; if ( !(nFlags & (VALIDATE_CHILDREN | VALIDATE_NOCHILDREN)) ) { @@ -2934,7 +2934,7 @@ void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) nFlags |= VALIDATE_CHILDREN; } if ( (nFlags & VALIDATE_NOCHILDREN) && mpWindowImpl->mpFirstChild ) - bValidateAll = sal_False; + bValidateAll = false; if ( bValidateAll ) ImplValidateFrameRegion( NULL, nFlags ); else @@ -2943,7 +2943,7 @@ void Window::ImplValidate( const Region* pRegion, sal_uInt16 nFlags ) Region aRegion( aRect ); if ( pRegion ) aRegion.Intersect( *pRegion ); - ImplClipBoundaries( aRegion, sal_True, sal_True ); + ImplClipBoundaries( aRegion, true, true ); if ( nFlags & VALIDATE_NOCHILDREN ) { nFlags &= ~VALIDATE_CHILDREN; @@ -2991,16 +2991,16 @@ void Window::ImplScroll( const Rectangle& rRect, } Region aInvalidateRegion; - sal_Bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0; - sal_Bool bErase = (nFlags & SCROLL_NOERASE) == 0; + bool bScrollChildren = (nFlags & SCROLL_CHILDREN) != 0; + bool bErase = (nFlags & SCROLL_NOERASE) == 0; if ( !mpWindowImpl->mpFirstChild ) - bScrollChildren = sal_False; + bScrollChildren = false; OutputDevice *pOutDev = GetOutDev(); // --- RTL --- check if this window requires special action - sal_Bool bReMirror = ( ImplIsAntiparallel() ); + bool bReMirror = ( ImplIsAntiparallel() ); Rectangle aRectMirror( rRect ); if( bReMirror ) @@ -3015,7 +3015,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !(nFlags & SCROLL_NOINVALIDATE) ) { - ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, sal_True, sal_False ); + ImplCalcOverlapRegion( aRectMirror, aInvalidateRegion, !bScrollChildren, true, false ); // --- RTL --- // if the scrolling on the device is performed in the opposite direction @@ -3025,7 +3025,7 @@ void Window::ImplScroll( const Rectangle& rRect, if ( !aInvalidateRegion.IsEmpty() ) { aInvalidateRegion.Move( bReMirror ? -nHorzScroll : nHorzScroll, nVertScroll ); - bErase = sal_True; + bErase = true; } if ( !(nFlags & SCROLL_NOWINDOWINVALIDATE) ) { @@ -3047,7 +3047,7 @@ void Window::ImplScroll( const Rectangle& rRect, aRegion.Exclude( aInvalidateRegion ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !bScrollChildren ) { if ( nOrgFlags & SCROLL_NOCHILDREN ) @@ -3133,19 +3133,19 @@ void Window::ImplScroll( const Rectangle& rRect, // ----------------------------------------------------------------------- -void Window::ImplUpdateAll( sal_Bool bOverlapWindows ) +void Window::ImplUpdateAll( bool bOverlapWindows ) { if ( !mpWindowImpl->mbReallyVisible ) return; - sal_Bool bFlush = sal_False; + bool bFlush = false; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = sal_True; + bFlush = true; } // an update changes the OverlapWindow, such that for later paints @@ -3204,9 +3204,9 @@ void Window::ImplUpdateWindowPtr() // ----------------------------------------------------------------------- -void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ) +void Window::ImplUpdateOverlapWindowPtr( bool bNewFrame ) { - sal_Bool bVisible = IsVisible(); + bool bVisible = IsVisible(); Show( false ); ImplRemoveWindow( bNewFrame ); Window* pRealParent = mpWindowImpl->mpRealParent; @@ -3233,9 +3233,9 @@ void Window::ImplUpdateOverlapWindowPtr( sal_Bool bNewFrame ) // ----------------------------------------------------------------------- -sal_Bool Window::ImplUpdatePos() +bool Window::ImplUpdatePos() { - sal_Bool bSysChild = sal_False; + bool bSysChild = false; if ( ImplIsOverlapWindow() ) { @@ -3254,12 +3254,12 @@ sal_Bool Window::ImplUpdatePos() while ( pChild ) { if ( pChild->ImplUpdatePos() ) - bSysChild = sal_True; + bSysChild = true; pChild = pChild->mpWindowImpl->mpNext; } if ( mpWindowImpl->mpSysObj ) - bSysChild = sal_True; + bSysChild = true; return bSysChild; } @@ -3283,9 +3283,9 @@ void Window::ImplUpdateSysObjPos() void Window::ImplPosSizeWindow( long nX, long nY, long nWidth, long nHeight, sal_uInt16 nFlags ) { - sal_Bool bNewPos = sal_False; - sal_Bool bNewSize = sal_False; - sal_Bool bCopyBits = sal_False; + bool bNewPos = false; + bool bNewSize = false; + bool bCopyBits = false; long nOldOutOffX = mnOutOffX; long nOldOutOffY = mnOutOffY; long nOldOutWidth = mnOutWidth; @@ -3307,17 +3307,17 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mnOutWidth && mnOutHeight && !mpWindowImpl->mbPaintTransparent && !mpWindowImpl->mbInitWinClipRegion && !mpWindowImpl->maWinClipRegion.IsEmpty() && !HasPaintEvent() ) - bCopyBits = sal_True; + bCopyBits = true; } - sal_Bool bnXRecycled = sal_False; // avoid duplicate mirroring in RTL case + bool bnXRecycled = false; // avoid duplicate mirroring in RTL case if ( nFlags & WINDOW_POSSIZE_WIDTH ) { if(!( nFlags & WINDOW_POSSIZE_X )) { nX = mpWindowImpl->mnX; nFlags |= WINDOW_POSSIZE_X; - bnXRecycled = sal_True; // we're using a mnX which was already mirrored in RTL case + bnXRecycled = true; // we're using a mnX which was already mirrored in RTL case } if ( nWidth < 0 ) @@ -3325,8 +3325,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nWidth != mnOutWidth ) { mnOutWidth = nWidth; - bNewSize = sal_True; - bCopyBits = sal_False; + bNewSize = true; + bCopyBits = false; } } if ( nFlags & WINDOW_POSSIZE_HEIGHT ) @@ -3336,8 +3336,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( nHeight != mnOutHeight ) { mnOutHeight = nHeight; - bNewSize = sal_True; - bCopyBits = sal_False; + bNewSize = true; + bCopyBits = false; } } @@ -3388,12 +3388,12 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, sal_False, sal_True, sal_True ); + *pOverlapRegion, false, true, true ); } mpWindowImpl->mnX = nX; mpWindowImpl->maPos.X() = nOrgX; mpWindowImpl->mnAbsScreenX = aPtDev.X(); // --- RTL --- (store real screen pos) - bNewPos = sal_True; + bNewPos = true; } } if ( nFlags & WINDOW_POSSIZE_Y ) @@ -3406,17 +3406,17 @@ void Window::ImplPosSizeWindow( long nX, long nY, pOverlapRegion = new Region(); ImplCalcOverlapRegion( Rectangle( Point( mnOutOffX, mnOutOffY ), Size( mnOutWidth, mnOutHeight ) ), - *pOverlapRegion, sal_False, sal_True, sal_True ); + *pOverlapRegion, false, true, true ); } mpWindowImpl->mnY = nY; mpWindowImpl->maPos.Y() = nY; - bNewPos = sal_True; + bNewPos = true; } } if ( bNewPos || bNewSize ) { - sal_Bool bUpdateSysObjPos = sal_False; + bool bUpdateSysObjPos = false; if ( bNewPos ) bUpdateSysObjPos = ImplUpdatePos(); @@ -3469,7 +3469,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, mpWindowImpl->mbCallResize = true; } - sal_Bool bUpdateSysObjClip = sal_False; + bool bUpdateSysObjClip = false; if ( IsReallyVisible() ) { if ( bNewPos || bNewSize ) @@ -3480,7 +3480,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, if ( mpWindowImpl->mpFrameData->mpFirstBackWin ) ImplInvalidateAllOverlapBackgrounds(); // set Clip-Flag - bUpdateSysObjClip = !ImplSetClipFlag( sal_True ); + bUpdateSysObjClip = !ImplSetClipFlag( true ); } // invalidate window content ? @@ -3488,8 +3488,8 @@ void Window::ImplPosSizeWindow( long nX, long nY, { if ( bNewPos ) { - sal_Bool bInvalidate = sal_False; - sal_Bool bParentPaint = sal_True; + bool bInvalidate = false; + bool bParentPaint = true; if ( !ImplIsOverlapWindow() ) bParentPaint = mpWindowImpl->mpParent->IsPaintEnabled(); if ( bCopyBits && bParentPaint && !HasPaintEvent() ) @@ -3499,7 +3499,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Size( mnOutWidth, mnOutHeight ) ) ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !pOverlapRegion->IsEmpty() ) { pOverlapRegion->Move( mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY ); @@ -3511,7 +3511,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, ImplMoveAllInvalidateRegions( Rectangle( Point( nOldOutOffX, nOldOutOffY ), Size( nOldOutWidth, nOldOutHeight ) ), mnOutOffX-nOldOutOffX, mnOutOffY-nOldOutOffY, - sal_True ); + true ); SalGraphics* pGraphics = ImplGetFrameGraphics(); if ( pGraphics ) { @@ -3526,10 +3526,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, SAL_COPYAREA_WINDOWINVALIDATE, this ); } else - bInvalidate = sal_True; + bInvalidate = true; } else - bInvalidate = sal_True; + bInvalidate = true; if ( !bInvalidate ) { if ( !pOverlapRegion->IsEmpty() ) @@ -3537,10 +3537,10 @@ void Window::ImplPosSizeWindow( long nX, long nY, } } else - bInvalidate = sal_True; + bInvalidate = true; } else - bInvalidate = sal_True; + bInvalidate = true; if ( bInvalidate ) ImplInvalidateFrameRegion( NULL, INVALIDATE_CHILDREN ); } @@ -3552,7 +3552,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, aRegion.Exclude( *pOldRegion ); if ( mpWindowImpl->mbWinRegion ) aRegion.Intersect( ImplPixelToDevicePixel( mpWindowImpl->maWinRegion ) ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !aRegion.IsEmpty() ) ImplInvalidateFrameRegion( &aRegion, INVALIDATE_CHILDREN ); } @@ -3565,7 +3565,7 @@ void Window::ImplPosSizeWindow( long nX, long nY, Region aRegion( *pOldRegion ); if ( !mpWindowImpl->mbPaintTransparent ) ImplExcludeWindowRegion( aRegion ); - ImplClipBoundaries( aRegion, sal_False, sal_True ); + ImplClipBoundaries( aRegion, false, true ); if ( !aRegion.IsEmpty() && !mpWindowImpl->mpBorderWindow ) ImplInvalidateParentFrameRegion( aRegion ); } @@ -3673,7 +3673,7 @@ void Window::ImplToTop( sal_uInt16 nFlags ) mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpLastOverlap = mpWindowImpl->mpPrev; // take AlwaysOnTop into account - sal_Bool bOnTop = IsAlwaysOnTopEnabled(); + bool bOnTop = IsAlwaysOnTopEnabled(); Window* pNextWin = mpWindowImpl->mpOverlapWindow->mpWindowImpl->mpFirstOverlap; if ( !bOnTop ) { @@ -3781,7 +3781,7 @@ void Window::ImplStartToTop( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ) +void Window::ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible ) { // do we need to fetch the focus? if ( !(nFlags & TOTOP_NOGRABFOCUS) ) @@ -3800,7 +3800,7 @@ void Window::ImplFocusToTop( sal_uInt16 nFlags, sal_Bool bReallyVisible ) pFocusWindow = pFocusWindow->ImplGetParent(); } if ( (pFocusWindow->mpWindowImpl->mnActivateMode & ACTIVATE_MODE_GRABFOCUS) && - !pFocusWindow->HasChildPathFocus( sal_True ) ) + !pFocusWindow->HasChildPathFocus( true ) ) pFocusWindow->GrabFocus(); } @@ -3844,7 +3844,7 @@ void Window::ImplHideAllOverlaps() // ----------------------------------------------------------------------- -void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged ) +void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, bool bModChanged ) { if ( mpWindowImpl->mpFrameData->mbMouseIn && mpWindowImpl->mpFrameWindow->mpWindowImpl->mbReallyVisible ) { @@ -3853,15 +3853,15 @@ void Window::ImplCallMouseMove( sal_uInt16 nMouseCode, sal_Bool bModChanged ) long nY = mpWindowImpl->mpFrameData->mnLastMouseY; sal_uInt16 nCode = nMouseCode; sal_uInt16 nMode = mpWindowImpl->mpFrameData->mnMouseMode; - sal_Bool bLeave; + bool bLeave; // check for MouseLeave if ( ((nX < 0) || (nY < 0) || (nX >= mpWindowImpl->mpFrameWindow->mnOutWidth) || (nY >= mpWindowImpl->mpFrameWindow->mnOutHeight)) && !ImplGetSVData()->maWinData.mpCaptureWin ) - bLeave = sal_True; + bLeave = true; else - bLeave = sal_False; + bLeave = false; nMode |= MOUSE_SYNTHETIC; if ( bModChanged ) nMode |= MOUSE_MODIFIERCHANGED; @@ -4051,13 +4051,13 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) // which is done using ToTop ImplSVData* pSVData = ImplGetSVData(); - sal_Bool bAsyncFocusWaiting = sal_False; + bool bAsyncFocusWaiting = false; Window *pFrame = pSVData->maWinData.mpFirstFrame; while( pFrame ) { if( pFrame != mpWindowImpl->mpFrameWindow && pFrame->mpWindowImpl->mpFrameData->mnFocusId ) { - bAsyncFocusWaiting = sal_True; + bAsyncFocusWaiting = true; break; } pFrame = pFrame->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4065,7 +4065,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) bool bHasFocus = IsWindowFocused(*mpWindowImpl); - sal_Bool bMustNotGrabFocus = sal_False; + bool bMustNotGrabFocus = false; // #100242#, check parent hierarchy if some floater prohibits grab focus Window *pParent = this; @@ -4075,7 +4075,7 @@ void Window::ImplGrabFocus( sal_uInt16 nFlags ) // otherwise we cannot set the focus in a floating toolbox if( ( (pParent->mpWindowImpl->mbFloatWin && ((FloatingWindow*)pParent)->GrabsFocus()) || ( pParent->GetStyle() & WB_SYSTEMFLOATWIN ) ) && !( pParent->GetStyle() & WB_MOVEABLE ) ) { - bMustNotGrabFocus = sal_True; + bMustNotGrabFocus = true; break; } pParent = pParent->mpWindowImpl->mpParent; @@ -4397,7 +4397,7 @@ Window::~Window() } } - UnoWrapperBase* pWrapper = Application::GetUnoWrapper( sal_False ); + UnoWrapperBase* pWrapper = Application::GetUnoWrapper( false ); if ( pWrapper ) pWrapper->WindowDestroyed( this ); @@ -4436,7 +4436,7 @@ Window::~Window() if ( true ) // always perform these tests in non-pro versions { OStringBuffer aErrorStr; - sal_Bool bError = sal_False; + bool bError = false; Window* pTempWin; if (mpWindowImpl->mpFrameData != 0) { @@ -4445,7 +4445,7 @@ Window::~Window() { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = sal_True; + bError = true; aErrorStr.append(lcl_createWindowInfo(*pTempWin)); } pTempWin = pTempWin->mpWindowImpl->mpNextOverlap; @@ -4465,13 +4465,13 @@ Window::~Window() } } - bError = sal_False; + bError = false; pTempWin = pSVData->maWinData.mpFirstFrame; while ( pTempWin ) { if ( ImplIsRealParentPath( pTempWin ) ) { - bError = sal_True; + bError = true; aErrorStr.append(lcl_createWindowInfo(*pTempWin)); } pTempWin = pTempWin->mpWindowImpl->mpFrameData->mpNextFrame; @@ -4589,11 +4589,11 @@ Window::~Window() } // check if the focus window is our child - sal_Bool bHasFocussedChild = sal_False; + bool bHasFocussedChild = false; if( pSVData->maWinData.mpFocusWin && ImplIsRealParentPath( pSVData->maWinData.mpFocusWin ) ) { // #122232#, this must not happen and is an application bug ! but we try some cleanup to hopefully avoid crashes, see below - bHasFocussedChild = sal_True; + bHasFocussedChild = true; #if OSL_DEBUG_LEVEL > 0 OStringBuffer aTempStr("Window ("); aTempStr.append(OUStringToOString(GetText(), @@ -4684,18 +4684,18 @@ Window::~Window() ImplDelData* pDelData = mpWindowImpl->mpFirstDel; while ( pDelData ) { - pDelData->mbDel = sal_True; + pDelData->mbDel = true; pDelData->mpWindow = NULL; // #112873# pDel is not associated with a Window anymore pDelData = pDelData->mpNext; } // remove window from the lists - ImplRemoveWindow( sal_True ); + ImplRemoveWindow( true ); // de-register as "top window child" at our parent, if necessary if ( mpWindowImpl->mbFrame ) { - sal_Bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); + bool bIsTopWindow = mpWindowImpl->mpWinData && ( mpWindowImpl->mpWinData->mnIsTopWindow == 1 ); if ( mpWindowImpl->mpRealParent && bIsTopWindow ) { ImplWinData* pParentWinData = mpWindowImpl->mpRealParent->ImplGetWinData(); @@ -5100,11 +5100,11 @@ bool Window::PreNotify( NotifyEvent& rNEvt ) { if( rNEvt.GetType() == EVENT_GETFOCUS ) { - sal_Bool bCompoundFocusChanged = sal_False; + bool bCompoundFocusChanged = false; if ( mpWindowImpl->mbCompoundControl && !mpWindowImpl->mbCompoundControlHasFocus && HasChildPathFocus() ) { mpWindowImpl->mbCompoundControlHasFocus = true; - bCompoundFocusChanged = sal_True; + bCompoundFocusChanged = true; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5112,11 +5112,11 @@ bool Window::PreNotify( NotifyEvent& rNEvt ) } else if( rNEvt.GetType() == EVENT_LOSEFOCUS ) { - sal_Bool bCompoundFocusChanged = sal_False; + bool bCompoundFocusChanged = false; if ( mpWindowImpl->mbCompoundControl && mpWindowImpl->mbCompoundControlHasFocus && !HasChildPathFocus() ) { mpWindowImpl->mbCompoundControlHasFocus = false ; - bCompoundFocusChanged = sal_True; + bCompoundFocusChanged = true; } if ( bCompoundFocusChanged || ( rNEvt.GetWindow() == this ) ) @@ -5145,7 +5145,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) if ( rNEvt.GetType() == EVENT_MOUSEBUTTONDOWN ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { if ( pMEvt->IsMod1() && (pMEvt->GetClicks() == 2) ) @@ -5165,7 +5165,7 @@ bool Window::Notify( NotifyEvent& rNEvt ) else if ( rNEvt.GetType() == EVENT_MOUSEMOVE ) { const MouseEvent* pMEvt = rNEvt.GetMouseEvent(); - sal_Bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); + bool bHit = pWrapper->GetDragArea().IsInside( pMEvt->GetPosPixel() ); if ( pMEvt->IsLeft() ) { // check if a single click initiated this sequence ( ImplStartDockingEnabled() ) @@ -5336,7 +5336,7 @@ sal_uLong Window::PostUserEvent( const Link& rLink, void* pCaller ) // ----------------------------------------------------------------------- -sal_Bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) +bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pCaller ) { ImplSVEvent* pSVEvent = new ImplSVEvent; @@ -5344,17 +5344,17 @@ sal_Bool Window::PostUserEvent( sal_uLong& rEventId, const Link& rLink, void* pC pSVEvent->mpData = pCaller; pSVEvent->mpLink = new Link( rLink ); pSVEvent->mpWindow = this; - pSVEvent->mbCall = sal_True; + pSVEvent->mbCall = true; ImplAddDel( &(pSVEvent->maDelData) ); rEventId = (sal_uLong)pSVEvent; if ( mpWindowImpl->mpFrame->PostEvent( pSVEvent ) ) - return sal_True; + return true; else { rEventId = 0; ImplRemoveDel( &(pSVEvent->maDelData) ); delete pSVEvent; - return sal_False; + return false; } } @@ -5376,28 +5376,28 @@ void Window::RemoveUserEvent( sal_uLong nUserEvent ) pSVEvent->mpWindow = NULL; } - pSVEvent->mbCall = sal_False; + pSVEvent->mbCall = false; } // ----------------------------------------------------------------------- -sal_Bool Window::IsLocked( sal_Bool bChildren ) const +bool Window::IsLocked( bool bChildren ) const { if ( mpWindowImpl->mnLockCount != 0 ) - return sal_True; + return true; if ( bChildren || mpWindowImpl->mbChildNotify ) { Window* pChild = mpWindowImpl->mpFirstChild; while ( pChild ) { - if ( pChild->IsLocked( sal_True ) ) - return sal_True; + if ( pChild->IsLocked( true ) ) + return true; pChild = pChild->mpWindowImpl->mpNext; } } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -5540,7 +5540,7 @@ long Window::CalcTitleWidth() const // ----------------------------------------------------------------------- -void Window::EnableClipSiblings( sal_Bool bClipSiblings ) +void Window::EnableClipSiblings( bool bClipSiblings ) { if ( mpWindowImpl->mpBorderWindow ) @@ -5551,7 +5551,7 @@ void Window::EnableClipSiblings( sal_Bool bClipSiblings ) // ----------------------------------------------------------------------- -void Window::SetMouseTransparent( sal_Bool bTransparent ) +void Window::SetMouseTransparent( bool bTransparent ) { if ( mpWindowImpl->mpBorderWindow ) @@ -5565,7 +5565,7 @@ void Window::SetMouseTransparent( sal_Bool bTransparent ) // ----------------------------------------------------------------------- -void Window::SetPaintTransparent( sal_Bool bTransparent ) +void Window::SetPaintTransparent( bool bTransparent ) { // transparency is not useful for frames as the background would have to be provided by a different frame @@ -5643,7 +5643,7 @@ long Window::GetCursorExtTextInputWidth() const // ----------------------------------------------------------------------- -void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, sal_Bool bVertical ) { +void Window::SetCompositionCharRect( const Rectangle* pRect, long nCompositionLength, bool bVertical ) { ImplWinData* pWinData = ImplGetWinData(); delete[] pWinData->mpCompositionCharRects; @@ -5701,15 +5701,15 @@ void Window::SetSettings( const AllSettings& rSettings, sal_Bool bChild ) // ----------------------------------------------------------------------- -void Window::UpdateSettings( const AllSettings& rSettings, sal_Bool bChild ) +void Window::UpdateSettings( const AllSettings& rSettings, bool bChild ) { if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, sal_False ); + mpWindowImpl->mpBorderWindow->UpdateSettings( rSettings, false ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, sal_True ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->UpdateSettings( rSettings, true ); } AllSettings aOldSettings(*mxSettings); @@ -5970,7 +5970,7 @@ const Region& Window::GetWindowRegionPixel() const // ----------------------------------------------------------------------- -sal_Bool Window::IsWindowRegionPixel() const +bool Window::IsWindowRegionPixel() const { if ( mpWindowImpl->mpBorderWindow ) @@ -6091,13 +6091,13 @@ void Window::SetParent( Window* pNewParent ) // check if the taskpanelist would change and move the window pointer accordingly SystemWindow *pSysWin = ImplGetLastSystemWindow(this); SystemWindow *pNewSysWin = NULL; - sal_Bool bChangeTaskPaneList = sal_False; + bool bChangeTaskPaneList = false; if( pSysWin && pSysWin->ImplIsInTaskPaneList( this ) ) { pNewSysWin = ImplGetLastSystemWindow( pNewParent ); if( pNewSysWin && pNewSysWin != pSysWin ) { - bChangeTaskPaneList = sal_True; + bChangeTaskPaneList = true; pSysWin->GetTaskPaneList()->RemoveWindow( this ); } } @@ -6126,7 +6126,7 @@ void Window::SetParent( Window* pNewParent ) if ( mpWindowImpl->mbFrame ) mpWindowImpl->mpFrame->SetParent( pNewParent->mpWindowImpl->mpFrame ); - sal_Bool bVisible = IsVisible(); + bool bVisible = IsVisible(); Show( false, SHOW_NOFOCUSCHANGE ); // check if the overlap window changes @@ -6144,9 +6144,9 @@ void Window::SetParent( Window* pNewParent ) } // convert windows in the hierarchy - sal_Bool bFocusOverlapWin = HasChildPathFocus( sal_True ); - sal_Bool bFocusWin = HasChildPathFocus(); - sal_Bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; + bool bFocusOverlapWin = HasChildPathFocus( true ); + bool bFocusWin = HasChildPathFocus(); + bool bNewFrame = pNewParent->mpWindowImpl->mpFrameWindow != mpWindowImpl->mpFrameWindow; if ( bNewFrame ) { if ( mpWindowImpl->mpFrameData->mpFocusWin ) @@ -6207,7 +6207,7 @@ void Window::SetParent( Window* pNewParent ) } // update activate-status at next overlap window - if ( HasChildPathFocus( sal_True ) ) + if ( HasChildPathFocus( true ) ) ImplCallFocusChangeActivate( pNewOverlapWindow, pOldOverlapWindow ); } @@ -6256,7 +6256,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) ImplDelData aDogTag( this ); - sal_Bool bRealVisibilityChanged = sal_False; + bool bRealVisibilityChanged = false; mpWindowImpl->mbVisible = bVisible; if ( !bVisible ) @@ -6284,12 +6284,12 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) if ( mpWindowImpl->mbReallyVisible ) { Region aInvRegion; - sal_Bool bSaveBack = sal_False; + bool bSaveBack = false; if ( ImplIsOverlapWindow() && !mpWindowImpl->mbFrame ) { if ( ImplRestoreOverlapBackground( aInvRegion ) ) - bSaveBack = sal_True; + bSaveBack = true; } if ( !bSaveBack ) @@ -6383,7 +6383,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) if ( ImplIsOverlapWindow() && !(nFlags & SHOW_NOACTIVATE) ) { ImplStartToTop(( nFlags & SHOW_FOREGROUNDTASK ) ? TOTOP_FOREGROUNDTASK : 0 ); - ImplFocusToTop( 0, sal_False ); + ImplFocusToTop( 0, false ); } // save background @@ -6428,7 +6428,7 @@ void Window::Show( bool bVisible, sal_uInt16 nFlags ) mpWindowImpl->mbSuppressAccessibilityEvents = false; mpWindowImpl->mbPaintFrame = true; - sal_Bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False; + bool bNoActivate = (nFlags & (SHOW_NOACTIVATE|SHOW_NOFOCUSCHANGE)) ? sal_True : sal_False; mpWindowImpl->mpFrame->Show( sal_True, bNoActivate ); if( aDogTag.IsDead() ) return; @@ -6617,16 +6617,16 @@ bool Window::IsCallHandlersOnInputDisabled() const // ----------------------------------------------------------------------- -void Window::EnableInput( bool bEnable, sal_Bool bChild ) +void Window::EnableInput( bool bEnable, bool bChild ) { - sal_Bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled); + bool bNotify = (bEnable != mpWindowImpl->mbInputDisabled); if ( mpWindowImpl->mpBorderWindow ) { - mpWindowImpl->mpBorderWindow->EnableInput( bEnable, sal_False ); + mpWindowImpl->mpBorderWindow->EnableInput( bEnable, false ); if ( (mpWindowImpl->mpBorderWindow->GetType() == WINDOW_BORDERWINDOW) && ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow ) - ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, sal_True ); + ((ImplBorderWindow*)mpWindowImpl->mpBorderWindow)->mpMenuBarWindow->EnableInput( bEnable, true ); } if ( (! bEnable && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled) || @@ -6682,7 +6682,7 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild ) // ----------------------------------------------------------------------- -void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, +void Window::EnableInput( bool bEnable, bool bChild, bool bSysWin, const Window* pExcludeWindow ) { @@ -6697,11 +6697,11 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, while ( pSysWin ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, sal_True ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pSysWin, true ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, sal_True ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pSysWin, true ) ) pSysWin->EnableInput( bEnable, bChild ); } pSysWin = pSysWin->mpWindowImpl->mpNextOverlap; @@ -6714,11 +6714,11 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, if( pFrameWin->ImplIsFloatingWindow() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, sal_True ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( pFrameWin, true ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, sal_True ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( pFrameWin, true ) ) pFrameWin->EnableInput( bEnable, bChild ); } } @@ -6733,11 +6733,11 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, while( p != rList.end() ) { // Is Window in the path from this window - if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), sal_True ) ) + if ( ImplGetFirstOverlapWindow()->ImplIsWindowOrChild( (*p), true ) ) { // Is Window not in the exclude window path or not the // exclude window, than change the status - if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), sal_True ) ) + if ( !pExcludeWindow || !pExcludeWindow->ImplIsWindowOrChild( (*p), true ) ) (*p)->EnableInput( bEnable, bChild ); } ++p; @@ -6748,18 +6748,18 @@ void Window::EnableInput( bool bEnable, sal_Bool bChild, sal_Bool bSysWin, // ----------------------------------------------------------------------- -void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild ) +void Window::AlwaysEnableInput( bool bAlways, bool bChild ) { if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, sal_False ); + mpWindowImpl->mpBorderWindow->AlwaysEnableInput( bAlways, false ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputEnabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputEnabled; if ( bAlways ) - EnableInput( true, sal_False ); + EnableInput( true, false ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled ) { @@ -6779,18 +6779,18 @@ void Window::AlwaysEnableInput( sal_Bool bAlways, sal_Bool bChild ) // ----------------------------------------------------------------------- -void Window::AlwaysDisableInput( sal_Bool bAlways, sal_Bool bChild ) +void Window::AlwaysDisableInput( bool bAlways, bool bChild ) { if ( mpWindowImpl->mpBorderWindow ) - mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, sal_False ); + mpWindowImpl->mpBorderWindow->AlwaysDisableInput( bAlways, false ); if( bAlways && mpWindowImpl->meAlwaysInputMode != AlwaysInputDisabled ) { mpWindowImpl->meAlwaysInputMode = AlwaysInputDisabled; if ( bAlways ) - EnableInput( false, sal_False ); + EnableInput( false, false ); } else if( ! bAlways && mpWindowImpl->meAlwaysInputMode == AlwaysInputDisabled ) { @@ -6824,7 +6824,7 @@ void Window::SetActivateMode( sal_uInt16 nMode ) if ( mpWindowImpl->mnActivateMode ) { if ( (mpWindowImpl->mbActive || (GetType() == WINDOW_BORDERWINDOW)) && - !HasChildPathFocus( sal_True ) ) + !HasChildPathFocus( true ) ) { mpWindowImpl->mbActive = false; Deactivate(); @@ -6969,7 +6969,7 @@ void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) if ( mpWindowImpl->mbInitWinClipRegion || !mpWindowImpl->maWinClipRegion.IsEmpty() ) { - sal_Bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; + bool bInitWinClipRegion = mpWindowImpl->mbInitWinClipRegion; ImplSetClipFlag(); // When ClipRegion was not initialised, assume @@ -7027,7 +7027,7 @@ void Window::SetZOrder( Window* pRefWindow, sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -void Window::EnableAlwaysOnTop( sal_Bool bEnable ) +void Window::EnableAlwaysOnTop( bool bEnable ) { mpWindowImpl->mbAlwaysOnTop = bEnable; @@ -7292,18 +7292,18 @@ Rectangle Window::ImplOutputToUnmirroredAbsoluteScreenPixel( const Rectangle &rR Rectangle Window::GetWindowExtentsRelative( Window *pRelativeWindow ) const { // with decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, sal_False ); + return ImplGetWindowExtentsRelative( pRelativeWindow, false ); } Rectangle Window::GetClientWindowExtentsRelative( Window *pRelativeWindow ) const { // without decoration - return ImplGetWindowExtentsRelative( pRelativeWindow, sal_True ); + return ImplGetWindowExtentsRelative( pRelativeWindow, true ); } // ----------------------------------------------------------------------- -Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, sal_Bool bClientOnly ) const +Rectangle Window::ImplGetWindowExtentsRelative( Window *pRelativeWindow, bool bClientOnly ) const { SalFrameGeometry g = mpWindowImpl->mpFrame->GetGeometry(); // make sure we use the extent of our border window, @@ -7414,17 +7414,17 @@ void Window::Validate( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -sal_Bool Window::HasPaintEvent() const +bool Window::HasPaintEvent() const { if ( !mpWindowImpl->mbReallyVisible ) - return sal_False; + return false; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) - return sal_True; + return true; if ( mpWindowImpl->mnPaintFlags & IMPL_PAINT_PAINT ) - return sal_True; + return true; if ( !ImplIsOverlapWindow() ) { @@ -7433,12 +7433,12 @@ sal_Bool Window::HasPaintEvent() const { pTempWindow = pTempWindow->ImplGetParent(); if ( pTempWindow->mpWindowImpl->mnPaintFlags & (IMPL_PAINT_PAINTCHILDREN | IMPL_PAINT_PAINTALLCHILDREN) ) - return sal_True; + return true; } while ( !pTempWindow->ImplIsOverlapWindow() ); } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -7455,14 +7455,14 @@ void Window::Update() if ( !mpWindowImpl->mbReallyVisible ) return; - sal_Bool bFlush = sal_False; + bool bFlush = false; if ( mpWindowImpl->mpFrameWindow->mpWindowImpl->mbPaintFrame ) { Point aPoint( 0, 0 ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); ImplInvalidateOverlapFrameRegion( aRegion ); if ( mpWindowImpl->mbFrame || (mpWindowImpl->mpBorderWindow && mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) - bFlush = sal_True; + bFlush = true; } // First we should skip all windows which are Paint-Transparent @@ -7503,7 +7503,7 @@ void Window::Update() } pUpdateWindow->ImplCallPaint( NULL, pUpdateWindow->mpWindowImpl->mnPaintFlags ); - bFlush = sal_True; + bFlush = true; } if ( bFlush ) @@ -7529,7 +7529,7 @@ void Window::Sync() // ----------------------------------------------------------------------- -void Window::SetUpdateMode( sal_Bool bUpdate ) +void Window::SetUpdateMode( bool bUpdate ) { mpWindowImpl->mbNoUpdate = !bUpdate; @@ -7546,7 +7546,7 @@ void Window::GrabFocus() // ----------------------------------------------------------------------- -sal_Bool Window::HasFocus() const +bool Window::HasFocus() const { // #107575# the first floating window always has the keyboard focus, see also winproc.cxx: ImplGetKeyInputWindow() @@ -7578,7 +7578,7 @@ void Window::SetFakeFocus( bool bFocus ) // ----------------------------------------------------------------------- -sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const +bool Window::HasChildPathFocus( bool bSystemWindow ) const { // #107575#, the first floating window always has the keyboard focus, see also winproc.cxx: ImplGetKeyInputWindow() @@ -7593,7 +7593,7 @@ sal_Bool Window::HasChildPathFocus( sal_Bool bSystemWindow ) const Window* pFocusWin = ImplGetSVData()->maWinData.mpFocusWin; if ( pFocusWin ) return ImplIsWindowOrChild( pFocusWin, bSystemWindow ); - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -7637,7 +7637,7 @@ void Window::ReleaseMouse() // ----------------------------------------------------------------------- -sal_Bool Window::IsMouseCaptured() const +bool Window::IsMouseCaptured() const { return (this == ImplGetSVData()->maWinData.mpCaptureWin); @@ -7728,7 +7728,7 @@ Point Window::GetLastPointerPosPixel() // ----------------------------------------------------------------------- -void Window::ShowPointer( sal_Bool bVisible ) +void Window::ShowPointer( bool bVisible ) { if ( mpWindowImpl->mbNoPtrVisible != !bVisible ) @@ -7767,7 +7767,7 @@ Window::PointerState Window::GetPointerState() // ----------------------------------------------------------------------- -sal_Bool Window::IsMouseOver() +bool Window::IsMouseOver() { return ImplGetWinData()->mbMouseOver; } @@ -8069,7 +8069,7 @@ Window* Window::GetWindow( sal_uInt16 nType ) const // ----------------------------------------------------------------------- -sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::IsChild( const Window* pWindow, bool bSystemWindow ) const { do @@ -8080,20 +8080,20 @@ sal_Bool Window::IsChild( const Window* pWindow, sal_Bool bSystemWindow ) const pWindow = pWindow->ImplGetParent(); if ( pWindow == this ) - return sal_True; + return true; } while ( pWindow ); - return sal_False; + return false; } // ----------------------------------------------------------------------- -sal_Bool Window::IsWindowOrChild( const Window* pWindow, sal_Bool bSystemWindow ) const +bool Window::IsWindowOrChild( const Window* pWindow, bool bSystemWindow ) const { if ( this == pWindow ) - return sal_True; + return true; return ImplIsChild( pWindow, bSystemWindow ); } @@ -8265,7 +8265,7 @@ uno::Reference< XDropTarget > Window::GetDropTarget() uno::Reference< XDragGestureListener > (mpWindowImpl->mpFrameData->mxDropTargetListener, UNO_QUERY)); } else - mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = sal_True; + mpWindowImpl->mpFrameData->mbInternalDragGestureRecognizer = true; } catch (const RuntimeException&) @@ -8438,7 +8438,7 @@ uno::Reference< XClipboard > Window::GetPrimarySelection() // Accessibility // ----------------------------------------------------------------------- -::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( sal_Bool bCreate ) +::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > Window::GetAccessible( bool bCreate ) { // do not optimize hierarchy for the top level border win (ie, when there is no parent) /* // do not optimize accessible hierarchy at all to better reflect real VCL hierarchy @@ -8468,28 +8468,28 @@ void Window::SetAccessible( ::com::sun::star::uno::Reference< ::com::sun::star:: } // skip all border windows that are no top level frames -sal_Bool Window::ImplIsAccessibleCandidate() const +bool Window::ImplIsAccessibleCandidate() const { if( !mpWindowImpl->mbBorderWin ) - return sal_True; + return true; else // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable if( mpWindowImpl->mbFrame && mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) - return sal_True; + return true; else - return sal_False; + return false; } -sal_Bool Window::ImplIsAccessibleNativeFrame() const +bool Window::ImplIsAccessibleNativeFrame() const { if( mpWindowImpl->mbFrame ) // #101741 do not check for WB_CLOSEABLE because undecorated floaters (like menus!) are closeable if( (mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE)) ) - return sal_True; + return true; else - return sal_False; + return false; else - return sal_False; + return false; } sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirstWindowType ) const @@ -8507,7 +8507,7 @@ sal_uInt16 Window::ImplGetAccessibleCandidateChildWindowCount( sal_uInt16 nFirst return nChildren; } -Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, sal_Bool bTopLevel ) const +Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& rChildCount, sal_uInt16 nFirstWindowType, bool bTopLevel ) const { if( bTopLevel ) @@ -8519,7 +8519,7 @@ Window* Window::ImplGetAccessibleCandidateChild( sal_uInt16 nChild, sal_uInt16& Window *pTmpChild = pChild; if( !pChild->ImplIsAccessibleCandidate() ) - pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, sal_False ); + pTmpChild = pChild->ImplGetAccessibleCandidateChild( nChild, rChildCount, WINDOW_FIRSTCHILD, false ); if ( nChild == rChildCount ) return pTmpChild; @@ -9018,7 +9018,7 @@ Window* Window::GetAccessibleRelationLabeledBy() const return NULL; } -sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) +bool Window::IsAccessibilityEventsSuppressed( bool bTraverseParentPath ) { if( !bTraverseParentPath ) return mpWindowImpl->mbSuppressAccessibilityEvents; @@ -9028,15 +9028,15 @@ sal_Bool Window::IsAccessibilityEventsSuppressed( sal_Bool bTraverseParentPath ) while ( pParent && pParent->mpWindowImpl) { if( pParent->mpWindowImpl->mbSuppressAccessibilityEvents ) - return sal_True; + return true; else pParent = pParent->mpWindowImpl->mpParent; // do not use GetParent() to find borderwindows that are frames } - return sal_False; + return false; } } -void Window::SetAccessibilityEventsSuppressed(sal_Bool bSuppressed) +void Window::SetAccessibilityEventsSuppressed(bool bSuppressed) { mpWindowImpl->mbSuppressAccessibilityEvents = bSuppressed; } @@ -9057,21 +9057,21 @@ void Window::RecordLayoutData( vcl::ControlLayoutData* pLayout, const Rectangle& // ----------------------------------------------------------------------- -void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, NULL, NULL ); } -void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, sal_Bool bChecked, sal_Bool bDrawBorder, sal_Bool bDrawExtBorderOnly, Color* pSelectionTextColor ) +void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, bool bChecked, bool bDrawBorder, bool bDrawExtBorderOnly, Color* pSelectionTextColor ) { DrawSelectionBackground( rRect, highlight, bChecked, bDrawBorder, bDrawExtBorderOnly, 0, pSelectionTextColor, NULL ); } void Window::DrawSelectionBackground( const Rectangle& rRect, sal_uInt16 highlight, - sal_Bool bChecked, - sal_Bool bDrawBorder, - sal_Bool bDrawExtBorderOnly, + bool bChecked, + bool bDrawBorder, + bool bDrawExtBorderOnly, long nCornerRadius, Color* pSelectionTextColor, Color* pPaintColor @@ -9089,8 +9089,8 @@ void Window::DrawSelectionBackground( const Rectangle& rRect, Color aSelectionBorderCol( pPaintColor ? *pPaintColor : rStyles.GetHighlightColor() ); Color aSelectionFillCol( aSelectionBorderCol ); - sal_Bool bDark = rStyles.GetFaceColor().IsDark(); - sal_Bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); + bool bDark = rStyles.GetFaceColor().IsDark(); + bool bBright = ( rStyles.GetFaceColor() == Color( COL_WHITE ) ); int c1 = aSelectionBorderCol.GetLuminance(); int c2 = GetDisplayBackground().GetColor().GetLuminance(); @@ -9236,7 +9236,7 @@ Window* Window::GetPreferredKeyInputWindow() } -sal_Bool Window::IsScrollable() const +bool Window::IsScrollable() const { // check for scrollbars Window *pChild = mpWindowImpl->mpFirstChild; @@ -9250,14 +9250,14 @@ sal_Bool Window::IsScrollable() const return false; } -sal_Bool Window::IsTopWindow() const +bool Window::IsTopWindow() const { if ( mpWindowImpl->mbInDtor ) - return sal_False; + return false; // topwindows must be frames or they must have a borderwindow which is a frame if( !mpWindowImpl->mbFrame && (!mpWindowImpl->mpBorderWindow || (mpWindowImpl->mpBorderWindow && !mpWindowImpl->mpBorderWindow->mpWindowImpl->mbFrame) ) ) - return sal_False; + return false; ImplGetWinData(); if( mpWindowImpl->mpWinData->mnIsTopWindow == (sal_uInt16)~0) // still uninitialized @@ -9276,7 +9276,7 @@ void Window::ImplMirrorFramePos( Point &pt ) const } // frame based modal counter (dialogs are not modal to the whole application anymore) -sal_Bool Window::IsInModalMode() const +bool Window::IsInModalMode() const { return (mpWindowImpl->mpFrameWindow->mpWindowImpl->mpFrameData->mnModalMode != 0); } @@ -9318,12 +9318,12 @@ void Window::ImplDecModalCount() } } -void Window::ImplIsInTaskPaneList( sal_Bool mbIsInTaskList ) +void Window::ImplIsInTaskPaneList( bool mbIsInTaskList ) { mpWindowImpl->mbIsInTaskPaneList = mbIsInTaskList; } -void Window::ImplNotifyIconifiedState( sal_Bool bIconified ) +void Window::ImplNotifyIconifiedState( bool bIconified ) { mpWindowImpl->mpFrameWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); // #109206# notify client window as well to have toolkit topwindow listeners notified @@ -9331,15 +9331,15 @@ void Window::ImplNotifyIconifiedState( sal_Bool bIconified ) mpWindowImpl->mpFrameWindow->mpWindowImpl->mpClientWindow->ImplCallEventListeners( bIconified ? VCLEVENT_WINDOW_MINIMIZE : VCLEVENT_WINDOW_NORMALIZE ); } -sal_Bool Window::HasActiveChildFrame() +bool Window::HasActiveChildFrame() { - sal_Bool bRet = sal_False; + bool bRet = false; Window *pFrameWin = ImplGetSVData()->maWinData.mpFirstFrame; while( pFrameWin ) { if( pFrameWin != mpWindowImpl->mpFrameWindow ) { - sal_Bool bDecorated = sal_False; + bool bDecorated = false; Window *pChildFrame = pFrameWin->ImplGetWindow(); // #i15285# unfortunately WB_MOVEABLE is the same as WB_TABSTOP which can // be removed for ToolBoxes to influence the keyboard accessibility @@ -9351,9 +9351,9 @@ sal_Bool Window::HasActiveChildFrame() if( bDecorated || (pFrameWin->mpWindowImpl->mnStyle & (WB_MOVEABLE | WB_SIZEABLE) ) ) if( pChildFrame && pChildFrame->IsVisible() && pChildFrame->IsActive() ) { - if( ImplIsChild( pChildFrame, sal_True ) ) + if( ImplIsChild( pChildFrame, true ) ) { - bRet = sal_True; + bRet = true; break; } } @@ -9368,11 +9368,11 @@ LanguageType Window::GetInputLanguage() const return mpWindowImpl->mpFrame->GetInputLanguage(); } -void Window::EnableNativeWidget( sal_Bool bEnable ) +void Window::EnableNativeWidget( bool bEnable ) { static const char* pNoNWF = getenv( "SAL_NO_NWF" ); if( pNoNWF && *pNoNWF ) - bEnable = sal_False; + bEnable = false; if( bEnable != ImplGetWinData()->mbEnableNativeWidget ) { @@ -9397,7 +9397,7 @@ void Window::EnableNativeWidget( sal_Bool bEnable ) } } -sal_Bool Window::IsNativeWidgetEnabled() const +bool Window::IsNativeWidgetEnabled() const { return ImplGetWinData()->mbEnableNativeWidget; } @@ -9517,9 +9517,9 @@ uno::Reference< rendering::XSpriteCanvas > Window::GetSpriteCanvas() const void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rPos ) { - sal_Bool bRVisible = mpWindowImpl->mbReallyVisible; + bool bRVisible = mpWindowImpl->mbReallyVisible; mpWindowImpl->mbReallyVisible = mpWindowImpl->mbVisible; - sal_Bool bDevOutput = mbDevOutput; + bool bDevOutput = mbDevOutput; mbDevOutput = true; const OutputDevice *pOutDev = GetOutDev(); @@ -9527,7 +9527,7 @@ void Window::ImplPaintToDevice( OutputDevice* i_pTargetOutDev, const Point& i_rP long nOldDPIY = pOutDev->ImplGetDPIY(); mnDPIX = i_pTargetOutDev->ImplGetDPIX(); mnDPIY = i_pTargetOutDev->ImplGetDPIY(); - sal_Bool bOutput = IsOutputEnabled(); + bool bOutput = IsOutputEnabled(); EnableOutput(); DBG_ASSERT( GetMapMode().GetMapUnit() == MAP_PIXEL, "MapMode must be PIXEL based" ); @@ -9658,7 +9658,7 @@ void Window::PaintToDevice( OutputDevice* pDev, const Point& rPos, const Size& / Hide(); } - sal_Bool bVisible = mpWindowImpl->mbVisible; + bool bVisible = mpWindowImpl->mbVisible; mpWindowImpl->mbVisible = true; if( mpWindowImpl->mpBorderWindow ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 2c2a8f05f61b..05c237571eea 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -62,18 +62,18 @@ struct ImplFocusDelData : public ImplDelData // ======================================================================= -sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const +bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const { // check for overlapping window pTestWindow = pTestWindow->ImplGetFirstOverlapWindow(); const Window* pTempWindow = pTestWindow; const Window* pThisWindow = ImplGetFirstOverlapWindow(); if ( pTempWindow == pThisWindow ) - return sal_False; + return false; do { if ( pTempWindow == pThisWindow ) - return sal_True; + return true; if ( pTempWindow->mpWindowImpl->mbFrame ) break; pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow; @@ -83,7 +83,7 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const do { if ( pTempWindow == pTestWindow ) - return sal_False; + return false; if ( pTempWindow->mpWindowImpl->mbFrame ) break; pTempWindow = pTempWindow->mpWindowImpl->mpOverlapWindow; @@ -141,12 +141,12 @@ sal_Bool Window::ImplIsWindowInFront( const Window* pTestWindow ) const do { if ( pTempWindow == pThisWindow ) - return sal_True; + return true; pTempWindow = pTempWindow->mpWindowImpl->mpNext; } while ( pTempWindow ); - return sal_False; + return false; } // ======================================================================= @@ -194,7 +194,7 @@ void Window::ImplSaveOverlapBackground() // ----------------------------------------------------------------------- -sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) +bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) { if ( mpWindowImpl->mpOverlapData->mpSaveBackDev ) { @@ -227,10 +227,10 @@ sal_Bool Window::ImplRestoreOverlapBackground( Region& rInvRegion ) ImplDeleteOverlapBackground(); } - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -532,7 +532,7 @@ void Window::InvertTracking( const Rectangle& rRect, sal_uInt16 nFlags ) Point aPoint( mnOutOffX, mnOutOffY ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - ImplClipBoundaries( aRegion, sal_False, sal_False ); + ImplClipBoundaries( aRegion, false, false ); pOutDev->ImplSelectClipRegion( aRegion, pGraphics ); } } @@ -598,7 +598,7 @@ void Window::InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags ) Point aPoint( mnOutOffX, mnOutOffY ); Region aRegion( Rectangle( aPoint, Size( mnOutWidth, mnOutHeight ) ) ); - ImplClipBoundaries( aRegion, sal_False, sal_False ); + ImplClipBoundaries( aRegion, false, false ); pOutDev->ImplSelectClipRegion( aRegion, pGraphics ); } } @@ -708,7 +708,7 @@ void Window::EndTracking( sal_uInt16 nFlags ) // ----------------------------------------------------------------------- -sal_Bool Window::IsTracking() const +bool Window::IsTracking() const { return (ImplGetSVData()->maWinData.mpTrackWin == this); } @@ -763,13 +763,13 @@ void Window::SaveBackground( const Point& rPos, const Size& rSize, { const Region aOldClip( rSaveDevice.GetClipRegion() ); const Point aPixOffset( rSaveDevice.LogicToPixel( rDestOff ) ); - const sal_Bool bMap = rSaveDevice.IsMapModeEnabled(); + const bool bMap = rSaveDevice.IsMapModeEnabled(); // move clip region to have the same distance to DestOffset aClip.Move( aPixOffset.X() - aPixPos.X(), aPixOffset.Y() - aPixPos.Y() ); // set pixel clip region - rSaveDevice.EnableMapMode( sal_False ); + rSaveDevice.EnableMapMode( false ); rSaveDevice.SetClipRegion( aClip ); rSaveDevice.EnableMapMode( bMap ); rSaveDevice.DrawOutDev( rDestOff, rSize, rPos, rSize, *this ); @@ -798,13 +798,13 @@ sal_uIntPtr Window::SaveFocus() // ----------------------------------------------------------------------- -sal_Bool Window::EndSaveFocus( sal_uIntPtr nSaveId, sal_Bool bRestore ) +bool Window::EndSaveFocus( sal_uIntPtr nSaveId, bool bRestore ) { if ( !nSaveId ) - return sal_False; + return false; else { - sal_Bool bOK = sal_True; + bool bOK = true; ImplFocusDelData* pDelData = (ImplFocusDelData*)(void*)nSaveId; if ( !pDelData->IsDead() ) { @@ -1094,10 +1094,10 @@ static void lcl_HandleScrollHelper( ScrollBar* pScrl, long nN, bool isMultiplyBy } -sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, +bool Window::HandleScrollCommand( const CommandEvent& rCmd, ScrollBar* pHScrl, ScrollBar* pVScrl ) { - sal_Bool bRet = sal_False; + bool bRet = false; if ( pHScrl || pVScrl ) { @@ -1122,7 +1122,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, if ( nFlags ) { StartAutoScroll( nFlags ); - bRet = sal_True; + bRet = true; } } break; @@ -1152,7 +1152,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, 0L, pData->IsHorz() ? pHScrl : pVScrl, nLines ); - bRet = sal_True; + bRet = true; } } else @@ -1192,7 +1192,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, bool isMultiplyByLineSize = false; #endif lcl_HandleScrollHelper( pHScrl, deltaXInLogic, isMultiplyByLineSize ); - bRet = sal_True; + bRet = true; } } if(pVScrl) @@ -1224,7 +1224,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, #endif lcl_HandleScrollHelper( pVScrl, deltaYInLogic, isMultiplyByLineSize ); - bRet = sal_True; + bRet = true; } } } @@ -1239,7 +1239,7 @@ sal_Bool Window::HandleScrollCommand( const CommandEvent& rCmd, { ImplHandleScroll( pHScrl, pData->GetDeltaX(), pVScrl, pData->GetDeltaY() ); - bRet = sal_True; + bRet = true; } } break; @@ -1274,7 +1274,7 @@ DockingManager* Window::GetDockingManager() return ImplGetDockingManager(); } -void Window::EnableDocking( sal_Bool bEnable ) +void Window::EnableDocking( bool bEnable ) { // update list of dockable windows if( bEnable ) @@ -1374,32 +1374,32 @@ Window* Window::ImplGetFrameWindow() const return mpWindowImpl->mpFrameWindow; } -sal_Bool Window::ImplIsDockingWindow() const +bool Window::ImplIsDockingWindow() const { return mpWindowImpl->mbDockWin; } -sal_Bool Window::ImplIsFloatingWindow() const +bool Window::ImplIsFloatingWindow() const { return mpWindowImpl->mbFloatWin; } -sal_Bool Window::ImplIsSplitter() const +bool Window::ImplIsSplitter() const { return mpWindowImpl->mbSplitter; } -sal_Bool Window::ImplIsPushButton() const +bool Window::ImplIsPushButton() const { return mpWindowImpl->mbPushButton; } -sal_Bool Window::ImplIsOverlapWindow() const +bool Window::ImplIsOverlapWindow() const { return mpWindowImpl->mbOverlapWin; } -void Window::ImplSetMouseTransparent( sal_Bool bTransparent ) +void Window::ImplSetMouseTransparent( bool bTransparent ) { mpWindowImpl->mbMouseTransparent = bTransparent; } @@ -1414,7 +1414,7 @@ Point Window::ImplFrameToOutput( const Point& rPos ) return Point( rPos.X()-mnOutOffX, rPos.Y()-mnOutOffY ); } -void Window::SetCompoundControl( sal_Bool bCompound ) +void Window::SetCompoundControl( bool bCompound ) { mpWindowImpl->mbCompoundControl = bCompound; } @@ -1469,57 +1469,57 @@ Dialog* Window::GetParentDialog() const return const_cast<Dialog *>(dynamic_cast<const Dialog*>(pWindow)); } -sal_Bool Window::IsSystemWindow() const +bool Window::IsSystemWindow() const { return mpWindowImpl->mbSysWin; } -sal_Bool Window::IsDialog() const +bool Window::IsDialog() const { return mpWindowImpl->mbDialog; } -sal_Bool Window::IsMenuFloatingWindow() const +bool Window::IsMenuFloatingWindow() const { return mpWindowImpl->mbMenuFloatingWindow; } -sal_Bool Window::IsToolbarFloatingWindow() const +bool Window::IsToolbarFloatingWindow() const { return mpWindowImpl->mbToolbarFloatingWindow; } -void Window::EnableAllResize( sal_Bool bEnable ) +void Window::EnableAllResize( bool bEnable ) { mpWindowImpl->mbAllResize = bEnable; } -void Window::EnableChildTransparentMode( sal_Bool bEnable ) +void Window::EnableChildTransparentMode( bool bEnable ) { mpWindowImpl->mbChildTransparent = bEnable; } -sal_Bool Window::IsChildTransparentModeEnabled() const +bool Window::IsChildTransparentModeEnabled() const { return mpWindowImpl->mbChildTransparent; } -sal_Bool Window::IsMouseTransparent() const +bool Window::IsMouseTransparent() const { return mpWindowImpl->mbMouseTransparent; } -sal_Bool Window::IsPaintTransparent() const +bool Window::IsPaintTransparent() const { return mpWindowImpl->mbPaintTransparent; } -void Window::SetDialogControlStart( sal_Bool bStart ) +void Window::SetDialogControlStart( bool bStart ) { mpWindowImpl->mbDlgCtrlStart = bStart; } -sal_Bool Window::IsDialogControlStart() const +bool Window::IsDialogControlStart() const { return mpWindowImpl->mbDlgCtrlStart; } @@ -1539,7 +1539,7 @@ const InputContext& Window::GetInputContext() const return mpWindowImpl->maInputContext; } -sal_Bool Window::IsControlFont() const +bool Window::IsControlFont() const { return (mpWindowImpl->mpControlFont != 0); } @@ -1549,7 +1549,7 @@ Color Window::GetControlForeground() const return mpWindowImpl->maControlForeground; } -sal_Bool Window::IsControlForeground() const +bool Window::IsControlForeground() const { return mpWindowImpl->mbControlForeground; } @@ -1559,12 +1559,12 @@ Color Window::GetControlBackground() const return mpWindowImpl->maControlBackground; } -sal_Bool Window::IsControlBackground() const +bool Window::IsControlBackground() const { return mpWindowImpl->mbControlBackground; } -sal_Bool Window::IsInPaint() const +bool Window::IsInPaint() const { return mpWindowImpl->mbInPaint; } @@ -1574,37 +1574,37 @@ Window* Window::GetParent() const return mpWindowImpl->mpRealParent; } -sal_Bool Window::IsVisible() const +bool Window::IsVisible() const { return mpWindowImpl->mbVisible; } -sal_Bool Window::IsReallyVisible() const +bool Window::IsReallyVisible() const { return mpWindowImpl->mbReallyVisible; } -sal_Bool Window::IsReallyShown() const +bool Window::IsReallyShown() const { return mpWindowImpl->mbReallyShown; } -sal_Bool Window::IsInInitShow() const +bool Window::IsInInitShow() const { return mpWindowImpl->mbInInitShow; } -sal_Bool Window::IsEnabled() const +bool Window::IsEnabled() const { return !mpWindowImpl->mbDisabled; } -sal_Bool Window::IsInputEnabled() const +bool Window::IsInputEnabled() const { return !mpWindowImpl->mbInputDisabled; } -sal_Bool Window::IsAlwaysEnableInput() const +bool Window::IsAlwaysEnableInput() const { return mpWindowImpl->meAlwaysInputMode == AlwaysInputEnabled; } @@ -1615,42 +1615,42 @@ sal_uInt16 Window::GetActivateMode() const } -sal_Bool Window::IsAlwaysOnTopEnabled() const +bool Window::IsAlwaysOnTopEnabled() const { return mpWindowImpl->mbAlwaysOnTop; } -sal_Bool Window::IsDefaultPos() const +bool Window::IsDefaultPos() const { return mpWindowImpl->mbDefPos; } -sal_Bool Window::IsDefaultSize() const +bool Window::IsDefaultSize() const { return mpWindowImpl->mbDefSize; } -void Window::EnablePaint( sal_Bool bEnable ) +void Window::EnablePaint( bool bEnable ) { mpWindowImpl->mbPaintDisabled = !bEnable; } -sal_Bool Window::IsPaintEnabled() const +bool Window::IsPaintEnabled() const { return !mpWindowImpl->mbPaintDisabled; } -sal_Bool Window::IsUpdateMode() const +bool Window::IsUpdateMode() const { return !mpWindowImpl->mbNoUpdate; } -void Window::SetParentUpdateMode( sal_Bool bUpdate ) +void Window::SetParentUpdateMode( bool bUpdate ) { mpWindowImpl->mbNoParentUpdate = !bUpdate; } -sal_Bool Window::IsActive() const +bool Window::IsActive() const { return mpWindowImpl->mbActive; } @@ -1660,12 +1660,12 @@ sal_uInt16 Window::GetGetFocusFlags() const return mpWindowImpl->mnGetFocusFlags; } -sal_Bool Window::IsCompoundControl() const +bool Window::IsCompoundControl() const { return mpWindowImpl->mbCompoundControl; } -sal_Bool Window::IsWait() const +bool Window::IsWait() const { return (mpWindowImpl->mnWaitCount != 0); } @@ -1680,7 +1680,7 @@ const Fraction& Window::GetZoom() const return mpWindowImpl->maZoom; } -sal_Bool Window::IsZoom() const +bool Window::IsZoom() const { return mpWindowImpl->maZoom.GetNumerator() != mpWindowImpl->maZoom.GetDenominator(); } @@ -1711,12 +1711,12 @@ void* Window::GetData() const return mpWindowImpl->mpUserData; } -sal_Bool Window::IsCreatedWithToolkit() const +bool Window::IsCreatedWithToolkit() const { return mpWindowImpl->mbCreatedWithToolkit; } -void Window::SetCreatedWithToolkit( sal_Bool b ) +void Window::SetCreatedWithToolkit( bool b ) { mpWindowImpl->mbCreatedWithToolkit = b; diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 2d299cd3faa1..33d764d1bc5e 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -64,9 +64,9 @@ bool ImplCallPreNotify( NotifyEvent& rEvt ) || rEvt.GetWindow()->PreNotify( rEvt ); } -static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, +static bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos, sal_uInt16 nCode, sal_uInt16 nSVEvent, - sal_Bool bMouseLeave ) + bool bMouseLeave ) { ImplSVData* pSVData = ImplGetSVData(); @@ -84,14 +84,14 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos if ( nSVEvent == EVENT_MOUSEMOVE ) { if ( bMouseLeave ) - return sal_True; + return true; if ( !pFloat || (nHitTest & IMPL_FLOATWIN_HITTEST_RECT) ) { if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) ImplDestroyHelpWindow( true ); pChild->ImplGetFrame()->SetPointer( POINTER_ARROW ); - return sal_True; + return true; } } else @@ -109,13 +109,13 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos // if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ) // return sal_False; // else - return sal_True; + return true; } else if ( nHitTest & IMPL_FLOATWIN_HITTEST_RECT ) { if ( !(pFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOMOUSERECTCLOSE) ) pFloat->ImplSetMouseDown(); - return sal_True; + return true; } } else @@ -126,7 +126,7 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos { if ( pFloat->ImplIsMouseDown() ) pFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL ); - return sal_True; + return true; } } else @@ -136,7 +136,7 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos if ( !(nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) ) { pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); - return sal_True; + return true; } } } @@ -151,21 +151,21 @@ static sal_Bool ImplHandleMouseFloatMode( Window* pChild, const Point& rMousePos { if ( (nPopupFlags & FLOATWIN_POPUPMODE_NOMOUSEUPCLOSE) && (nSVEvent == EVENT_MOUSEBUTTONUP) ) - return sal_True; + return true; pLastLevelFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); if ( nPopupFlags & FLOATWIN_POPUPMODE_PATHMOUSECANCELCLICK ) - return sal_False; + return false; else - return sal_True; + return true; } else - return sal_True; + return true; } } } } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -187,9 +187,9 @@ static void ImplHandleMouseHelpRequest( Window* pChild, const Point& rMousePos ) if ( pChild->IsInputEnabled() && !pChild->IsInModalNonRefMode() ) { HelpEvent aHelpEvent( rMousePos, nHelpMode ); - pSVData->maHelpData.mbRequestingHelp = sal_True; + pSVData->maHelpData.mbRequestingHelp = true; pChild->RequestHelp( aHelpEvent ); - pSVData->maHelpData.mbRequestingHelp = sal_False; + pSVData->maHelpData.mbRequestingHelp = false; } // #104172# do not kill keyboard activated tooltips else if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp) @@ -213,8 +213,8 @@ static void ImplSetMousePointer( Window* pChild ) // ----------------------------------------------------------------------- -static sal_Bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL, - sal_Bool bMouse = sal_False, Point* pPos = NULL ) +static bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = NULL, + bool bMouse = false, Point* pPos = NULL ) { Point aPos; if ( pPos ) @@ -236,22 +236,22 @@ static sal_Bool ImplCallCommand( Window* pChild, sal_uInt16 nEvt, void* pData = ImplDelData aDelData( pChild ); bool bPreNotify = ImplCallPreNotify( aNCmdEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( !bPreNotify ) { pChild->ImplGetWindowImpl()->mbCommand = false; pChild->Command( aCEvt ); if( aDelData.IsDead() ) - return sal_False; + return false; pChild->ImplNotifyKeyMouseCommandEventListeners( aNCmdEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( pChild->ImplGetWindowImpl()->mbCommand ) - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -274,14 +274,14 @@ static long ContextMenuEventLink( void* pCEvent, void* ) if( ! pEv->aDelData.IsDead() ) { pEv->pWindow->ImplRemoveDel( &pEv->aDelData ); - ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, sal_True, &pEv->aChildPos ); + ImplCallCommand( pEv->pWindow, COMMAND_CONTEXTMENU, NULL, true, &pEv->aChildPos ); } delete pEv; return 0; } -bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouseLeave, +bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, bool bMouseLeave, long nX, long nY, sal_uLong nMsgTime, sal_uInt16 nCode, sal_uInt16 nMode ) { @@ -314,7 +314,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( (pWinFrameData->mnLastMouseX != nX) || (pWinFrameData->mnLastMouseY != nY) ) { - ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, nX, nY, nMsgTime, nCode, nMode ); + ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, false, nX, nY, nMsgTime, nCode, nMode ); } } @@ -327,7 +327,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse pWinFrameData->mnMouseMode = nMode & ~(MOUSE_SYNTHETIC | MOUSE_MODIFIERCHANGED); if ( bMouseLeave ) { - pWinFrameData->mbMouseIn = sal_False; + pWinFrameData->mbMouseIn = false; if ( pSVData->maHelpData.mpHelpWin && !pSVData->maHelpData.mbKeyboardHelp ) { ImplDelData aDelData( pWindow ); @@ -339,7 +339,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } } else - pWinFrameData->mbMouseIn = sal_True; + pWinFrameData->mbMouseIn = true; DBG_ASSERT( !pSVData->maWinData.mpTrackWin || (pSVData->maWinData.mpTrackWin == pSVData->maWinData.mpCaptureWin), @@ -490,7 +490,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse !(((nMouseY-nDragH) <= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY) && ((nMouseY+nDragH) >= pMouseDownWin->ImplGetFrameData()->mnFirstMouseY)) ) { - pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True; + pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = true; // Check if drag source provides it's own recognizer if( pMouseDownWin->ImplGetFrameData()->mbInternalDragGestureRecognizer ) @@ -539,7 +539,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } } else - pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = sal_True; + pMouseDownWin->ImplGetFrameData()->mbStartDragCalled = true; } // test for mouseleave and mouseenter @@ -553,8 +553,8 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse NotifyEvent aNLeaveEvt( EVENT_MOUSEMOVE, pMouseMoveWin, &aMLeaveEvt ); ImplDelData aDelData; ImplDelData aDelData2; - pWinFrameData->mbInMouseMove = sal_True; - pMouseMoveWin->ImplGetWinData()->mbMouseOver = sal_False; + pWinFrameData->mbInMouseMove = true; + pMouseMoveWin->ImplGetWinData()->mbMouseOver = false; pMouseMoveWin->ImplAddDel( &aDelData ); // A MouseLeave can destroy this window @@ -569,7 +569,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } pWinFrameData->mpMouseMoveWin = NULL; - pWinFrameData->mbInMouseMove = sal_False; + pWinFrameData->mbInMouseMove = false; if ( pChild ) { @@ -587,7 +587,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } pWinFrameData->mpMouseMoveWin = pChild; if( pChild ) - pChild->ImplGetWinData()->mbMouseOver = sal_True; + pChild->ImplGetWinData()->mbMouseOver = true; // MouseLeave if ( !pChild ) @@ -616,7 +616,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse ((nMouseY+nDblClkH) >= pChild->ImplGetFrameData()->mnFirstMouseY) ) { pChild->ImplGetFrameData()->mnClickCount++; - pChild->ImplGetFrameData()->mbStartDragCalled = sal_True; + pChild->ImplGetFrameData()->mbStartDragCalled = true; } else { @@ -655,7 +655,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( !aDelData.IsDead() ) { pChild->ImplRemoveDel( &aDelData ); - pChild->ImplGetFrameData()->mbStartDragCalled = sal_True; + pChild->ImplGetFrameData()->mbStartDragCalled = true; } return true; } @@ -664,15 +664,15 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse } // call handler - sal_Bool bDrag = sal_False; - sal_Bool bCallHelpRequest = sal_True; + bool bDrag = false; + bool bCallHelpRequest = true; DBG_ASSERT( pChild, "ImplHandleMouseEvent: pChild is NULL" ); ImplDelData aDelData; NotifyEvent aNEvt( nSVEvent, pChild, &aMEvt ); pChild->ImplAddDel( &aDelData ); if ( nSVEvent == EVENT_MOUSEMOVE ) - pChild->ImplGetFrameData()->mbInMouseMove = sal_True; + pChild->ImplGetFrameData()->mbInMouseMove = true; // bring window into foreground on mouseclick if ( nSVEvent == EVENT_MOUSEBUTTONDOWN ) @@ -702,7 +702,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse (pSVData->maWinData.mnTrackFlags & STARTTRACK_SCROLLREPEAT) ) pSVData->maWinData.mpTrackTimer->Start(); } - bCallHelpRequest = sal_False; + bCallHelpRequest = false; nRet = true; } else @@ -713,7 +713,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse pChild->ToTop( TOTOP_NOGRABFOCUS ); if( aDelData.IsDead() ) - bCallHelpRequest = sal_False; + bCallHelpRequest = false; else { // if the MouseMove handler changes the help window's visibility @@ -722,7 +722,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse pChild->ImplGetWindowImpl()->mbMouseMove = false; pChild->MouseMove( aMEvt ); if ( pOldHelpTextWin != pSVData->maHelpData.mpHelpWin ) - bCallHelpRequest = sal_False; + bCallHelpRequest = false; } } } @@ -761,7 +761,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( nSVEvent == EVENT_MOUSEMOVE ) - pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = sal_False; + pChild->ImplGetWindowImpl()->mpFrameData->mbInMouseMove = false; if ( nSVEvent == EVENT_MOUSEMOVE ) { @@ -801,9 +801,9 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse { sal_uInt16 nMiddleAction = pChild->GetSettings().GetMouseSettings().GetMiddleButtonAction(); if ( nMiddleAction == MOUSE_MIDDLE_AUTOSCROLL ) - nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, sal_True, &aChildPos ); + nRet = !ImplCallCommand( pChild, COMMAND_STARTAUTOSCROLL, NULL, true, &aChildPos ); else if ( nMiddleAction == MOUSE_MIDDLE_PASTESELECTION ) - nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, sal_True, &aChildPos ); + nRet = !ImplCallCommand( pChild, COMMAND_PASTESELECTION, NULL, true, &aChildPos ); } else { @@ -812,7 +812,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse if ( (nCode == rMSettings.GetContextMenuCode()) && (nClicks == rMSettings.GetContextMenuClicks()) ) { - sal_Bool bContextMenu; + bool bContextMenu; if ( rMSettings.GetContextMenuDown() ) bContextMenu = (nSVEvent == EVENT_MOUSEBUTTONDOWN); else @@ -836,7 +836,7 @@ bool ImplHandleMouseEvent( Window* pWindow, sal_uInt16 nSVEvent, sal_Bool bMouse Application::PostUserEvent( Link( pEv, ContextMenuEventLink ) ); } else - nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_True, &aChildPos ); + nRet = ! ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, true, &aChildPos ); } } } @@ -892,7 +892,7 @@ static Window* ImplGetKeyInputWindow( Window* pWindow ) // ----------------------------------------------------------------------- static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, - sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, sal_Bool bForward ) + sal_uInt16 nKeyCode, sal_uInt16 nCharCode, sal_uInt16 nRepeat, bool bForward ) { ImplSVData* pSVData = ImplGetSVData(); KeyCode aKeyCode( nKeyCode, nKeyCode ); @@ -931,7 +931,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, } } - sal_Bool bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1(); + bool bCtrlF6 = (aKeyCode.GetCode() == KEY_F6) && aKeyCode.IsMod1(); // determine last input time pSVData->maAppData.mnLastInputTime = Time::GetSystemTicks(); @@ -1068,7 +1068,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, sal_uInt16 nCode = aKeyCode.GetCode(); // #101999# is focus in or below toolbox - sal_Bool bToolboxFocus=sal_False; + bool bToolboxFocus=false; if( (nCode == KEY_F1) && aKeyCode.IsShift() ) { Window *pWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; @@ -1076,7 +1076,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, { if( pWin->ImplGetWindowImpl()->mbToolBox ) { - bToolboxFocus = sal_True; + bToolboxFocus = true; break; } else @@ -1086,7 +1086,7 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, // ContextMenu if ( (nCode == KEY_CONTEXTMENU) || ((nCode == KEY_F10) && aKeyCode.IsShift() && !aKeyCode.IsMod1() && !aKeyCode.IsMod2() ) ) - nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, sal_False ); + nRet = !ImplCallCommand( pChild, COMMAND_CONTEXTMENU, NULL, false ); else if ( ( (nCode == KEY_F2) && aKeyCode.IsShift() ) || ( (nCode == KEY_F1) && aKeyCode.IsMod1() ) || // #101999# no active help when focus in toolbox, simulate BallonHelp instead ( (nCode == KEY_F1) && aKeyCode.IsShift() && bToolboxFocus ) ) @@ -1099,10 +1099,10 @@ static bool ImplHandleKey( Window* pWindow, sal_uInt16 nSVEvent, aPos = pChild->OutputToScreenPixel( aPos ); HelpEvent aHelpEvent( aPos, HELPMODE_BALLOON ); - aHelpEvent.SetKeyboardActivated( sal_True ); - pSVData->maHelpData.mbSetKeyboardHelp = sal_True; + aHelpEvent.SetKeyboardActivated( true ); + pSVData->maHelpData.mbSetKeyboardHelp = true; pChild->RequestHelp( aHelpEvent ); - pSVData->maHelpData.mbSetKeyboardHelp = sal_False; + pSVData->maHelpData.mbSetKeyboardHelp = false; } else if ( (nCode == KEY_F1) || (nCode == KEY_HELP) ) { @@ -1362,7 +1362,7 @@ static bool ImplHandleInputContextChange( Window* pWindow, LanguageType eNewLang // ----------------------------------------------------------------------- -static sal_Bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, +static bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, const CommandWheelData* pWheelData ) { Point aCmdMousePos = pWindow->ImplFrameToOutput( rPos ); @@ -1371,17 +1371,17 @@ static sal_Bool ImplCallWheelCommand( Window* pWindow, const Point& rPos, ImplDelData aDelData( pWindow ); bool bPreNotify = ImplCallPreNotify( aNCmdEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( !bPreNotify ) { pWindow->ImplGetWindowImpl()->mbCommand = false; pWindow->Command( aCEvt ); if ( aDelData.IsDead() ) - return sal_False; + return false; if ( pWindow->ImplGetWindowImpl()->mbCommand ) - return sal_True; + return true; } - return sal_False; + return false; } // ----------------------------------------------------------------------- @@ -1418,7 +1418,7 @@ static bool ImplHandleWheelEvent( Window* pWindow, const SalWheelMouseEvent& rEv CommandWheelData aWheelData( rEvt.mnDelta, rEvt.mnNotchDelta, rEvt.mnScrollLines, nMode, nCode, bHorz, bPixel ); Point aMousePos( rEvt.mnX, rEvt.mnY ); - sal_Bool bRet = sal_True; + bool bRet = true; // first check any floating window ( eg. drop down listboxes) bool bIsFloat = false; @@ -1531,7 +1531,7 @@ static void KillOwnPopups( Window* pWindow ) ImplSVData* pSVData = ImplGetSVData(); Window *pParent = pWindow->ImplGetWindowImpl()->mpFrameWindow; Window *pChild = pSVData->maWinData.mpFirstFloat; - if ( pChild && pParent->ImplIsWindowOrChild( pChild, sal_True ) ) + if ( pChild && pParent->ImplIsWindowOrChild( pChild, true ) ) { if ( !(pSVData->maWinData.mpFirstFloat->GetPopupModeFlags() & FLOATWIN_POPUPMODE_NOAPPFOCUSCLOSE) ) pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); @@ -1601,7 +1601,7 @@ void ImplHandleResize( Window* pWindow, long nNewWidth, long nNewHeight ) pWindow->ImplGetWindowImpl()->mpFrameData->mbNeedSysWindow = (nNewWidth < IMPL_MIN_NEEDSYSWIN) || (nNewHeight < IMPL_MIN_NEEDSYSWIN); - sal_Bool bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0); + bool bMinimized = (nNewWidth <= 0) || (nNewHeight <= 0); if( bMinimized != pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized ) pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplNotifyIconifiedState( bMinimized ); pWindow->ImplGetWindowImpl()->mpFrameData->mbMinimized = bMinimized; @@ -1644,7 +1644,7 @@ static void ImplHandleMoveResize( Window* pWindow, long nNewWidth, long nNewHeig // ----------------------------------------------------------------------- -static void ImplActivateFloatingWindows( Window* pWindow, sal_Bool bActive ) +static void ImplActivateFloatingWindows( Window* pWindow, bool bActive ) { // First check all overlapping windows Window* pTempWindow = pWindow->ImplGetWindowImpl()->mpFirstOverlap; @@ -1671,7 +1671,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) // If the status has been preserved, because we got back the focus // in the meantime, we do nothing - sal_Bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus; + bool bHasFocus = ImplGetWindowImpl()->mpFrameData->mbHasFocus || ImplGetWindowImpl()->mpFrameData->mbSysObjFocus; // next execute the delayed functions if ( bHasFocus ) @@ -1682,21 +1682,21 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin ) { - sal_Bool bHandled = sal_False; + bool bHandled = false; if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInputEnabled() && ! ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsInModalMode() ) { if ( ImplGetWindowImpl()->mpFrameData->mpFocusWin->IsEnabled() ) { ImplGetWindowImpl()->mpFrameData->mpFocusWin->GrabFocus(); - bHandled = sal_True; + bHandled = true; } else if( ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplHasDlgCtrl() ) { // #109094# if the focus is restored to a disabled dialog control (was disabled meanwhile) // try to move it to the next control ImplGetWindowImpl()->mpFrameData->mpFocusWin->ImplDlgCtrlNextWindow(); - bHandled = sal_True; + bHandled = true; } } if ( !bHandled ) @@ -1777,7 +1777,7 @@ IMPL_LINK_NOARG(Window, ImplAsyncFocusHdl) static void ImplHandleGetFocus( Window* pWindow ) { - pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_True; + pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = true; // execute Focus-Events after a delay, such that SystemChildWindows @@ -1817,7 +1817,7 @@ static void ImplHandleLoseFocus( Window* pWindow ) pSVData->maWinData.mpFirstFloat->EndPopupMode( FLOATWIN_POPUPMODEEND_CANCEL | FLOATWIN_POPUPMODEEND_CLOSEALL ); } - pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = sal_False; + pWindow->ImplGetWindowImpl()->mpFrameData->mbHasFocus = false; // execute Focus-Events after a delay, such that SystemChildWindows // do not flicker when they receive focus @@ -1978,7 +1978,7 @@ static sal_uInt16 ImplGetMouseButtonMode( SalMouseEvent* pEvent ) inline bool ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_True, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, true, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -1988,7 +1988,7 @@ inline bool ImplHandleSalMouseLeave( Window* pWindow, SalMouseEvent* pEvent ) inline bool ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, sal_False, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEMOVE, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, pEvent->mnCode, ImplGetMouseMoveMode( pEvent ) ); @@ -1998,7 +1998,7 @@ inline bool ImplHandleSalMouseMove( Window* pWindow, SalMouseEvent* pEvent ) inline bool ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, sal_False, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONDOWN, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2013,7 +2013,7 @@ inline bool ImplHandleSalMouseButtonDown( Window* pWindow, SalMouseEvent* pEvent inline bool ImplHandleSalMouseButtonUp( Window* pWindow, SalMouseEvent* pEvent ) { - return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, sal_False, + return ImplHandleMouseEvent( pWindow, EVENT_MOUSEBUTTONUP, false, pEvent->mnX, pEvent->mnY, pEvent->mnTime, #ifdef MACOSX @@ -2095,7 +2095,7 @@ static void ImplHandleSalKeyMod( Window* pWindow, SalKeyModEvent* pEvent ) #else nNewCode |= pWindow->ImplGetWindowImpl()->mpFrameData->mnMouseCode & ~(KEY_SHIFT | KEY_MOD1 | KEY_MOD2); #endif - pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, sal_True ); + pWindow->ImplGetWindowImpl()->mpFrameWindow->ImplCallMouseMove( nNewCode, true ); } // #105224# send commandevent to allow special treatment of Ctrl-LeftShift/Ctrl-RightShift etc. @@ -2328,7 +2328,7 @@ static void ImplHandleSalQueryCharPosition( Window *pWindow, pEvt->mnCursorBoundY = aAbsScreenPos.Y(); pEvt->mnCursorBoundWidth = aDeviceRect.GetWidth(); pEvt->mnCursorBoundHeight = aDeviceRect.GetHeight(); - pEvt->mbVertical = (pWinData->mbVertical != sal_False); + pEvt->mbVertical = pWinData->mbVertical; pEvt->mbValid = true; } } @@ -2412,28 +2412,28 @@ bool ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, { SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT, - pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True ); + pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, true ); } break; case SALEVENT_EXTERNALKEYINPUT: { KeyEvent* pKeyEvt = (KeyEvent*) pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYINPUT, - pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False ); + pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), false ); } break; case SALEVENT_KEYUP: { SalKeyEvent* pKeyEvt = (SalKeyEvent*)pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYUP, - pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, sal_True ); + pKeyEvt->mnCode, pKeyEvt->mnCharCode, pKeyEvt->mnRepeat, true ); } break; case SALEVENT_EXTERNALKEYUP: { KeyEvent* pKeyEvt = (KeyEvent*) pEvent; nRet = ImplHandleKey( pWindow, EVENT_KEYUP, - pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), sal_False ); + pKeyEvt->GetKeyCode().GetFullCode(), pKeyEvt->GetCharCode(), pKeyEvt->GetRepeat(), false ); } break; case SALEVENT_KEYMODCHANGE: @@ -2604,7 +2604,7 @@ bool ImplWindowFrameProc( Window* pWindow, SalFrame* /*pFrame*/, ScrollEvent* pScrollEvent = (ScrollEvent*) pEvent; SalWheelMouseEvent aSalWheelMouseEvent; aSalWheelMouseEvent.mnTime = Time::GetSystemTicks(); - aSalWheelMouseEvent.mbDeltaIsPixel = sal_True; + aSalWheelMouseEvent.mbDeltaIsPixel = true; // event location holds delta values instead aSalWheelMouseEvent.mnX = long(pScrollEvent->GetXOffset()); aSalWheelMouseEvent.mnY = long(pScrollEvent->GetYOffset()); diff --git a/vcl/source/window/wrkwin.cxx b/vcl/source/window/wrkwin.cxx index 8d27cd69b749..4f6eee505780 100644 --- a/vcl/source/window/wrkwin.cxx +++ b/vcl/source/window/wrkwin.cxx @@ -41,10 +41,10 @@ void WorkWindow::ImplInitWorkWindowData() mnIcon = 0; // Should be removed in the next top level update - now in SystemWindow mnPresentationFlags = 0; - mbPresentationMode = sal_False; - mbPresentationVisible = sal_False; - mbPresentationFull = sal_False; - mbFullScreenMode = sal_False; + mbPresentationMode = false; + mbPresentationVisible = false; + mbPresentationFull = false; + mbFullScreenMode = false; } // ----------------------------------------------------------------------- @@ -113,7 +113,7 @@ WorkWindow::WorkWindow( Window* pParent, const ::com::sun::star::uno::Any& aSyst SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); - mbSysChild = sal_True; + mbSysChild = true; ImplInit( pParent, nStyle, aSystemWorkWindowToken ); } @@ -123,7 +123,7 @@ WorkWindow::WorkWindow( SystemParentData* pParent ) : SystemWindow( WINDOW_WORKWINDOW ) { ImplInitWorkWindowData(); - mbSysChild = sal_True; + mbSysChild = true; ImplInit( NULL, 0, pParent ); } @@ -141,17 +141,17 @@ WorkWindow::~WorkWindow() // ----------------------------------------------------------------------- -void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode ) +void WorkWindow::ShowFullScreenMode( bool bFullScreenMode ) { return ShowFullScreenMode( bFullScreenMode, GetScreenNumber()); } -void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDisplayScreen ) +void WorkWindow::ShowFullScreenMode( bool bFullScreenMode, sal_Int32 nDisplayScreen ) { if ( !mbFullScreenMode == !bFullScreenMode ) return; - mbFullScreenMode = bFullScreenMode != 0; + mbFullScreenMode = bFullScreenMode; if ( !mbSysChild ) { // Dispose of the canvas implementation, which might rely on @@ -173,25 +173,25 @@ void WorkWindow::ShowFullScreenMode( sal_Bool bFullScreenMode, sal_Int32 nDispla // ----------------------------------------------------------------------- -void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags ) +void WorkWindow::StartPresentationMode( bool bPresentation, sal_uInt16 nFlags ) { return StartPresentationMode( bPresentation, nFlags, GetScreenNumber()); } -void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplayScreen ) +void WorkWindow::StartPresentationMode( bool bPresentation, sal_uInt16 nFlags, sal_Int32 nDisplayScreen ) { if ( !bPresentation == !mbPresentationMode ) return; if ( bPresentation ) { - mbPresentationMode = sal_True; + mbPresentationMode = true; mbPresentationVisible = IsVisible(); mbPresentationFull = mbFullScreenMode; mnPresentationFlags = nFlags; if ( !(mnPresentationFlags & PRESENTATION_NOFULLSCREEN) ) - ShowFullScreenMode( sal_True, nDisplayScreen ); + ShowFullScreenMode( true, nDisplayScreen ); if ( !mbSysChild ) { if ( mnPresentationFlags & PRESENTATION_HIDEALLAPPS ) @@ -215,16 +215,16 @@ void WorkWindow::StartPresentationMode( sal_Bool bPresentation, sal_uInt16 nFlag } ShowFullScreenMode( mbPresentationFull, nDisplayScreen ); - mbPresentationMode = sal_False; - mbPresentationVisible = sal_False; - mbPresentationFull = sal_False; + mbPresentationMode = false; + mbPresentationVisible = false; + mbPresentationFull = false; mnPresentationFlags = 0; } } // ----------------------------------------------------------------------- -sal_Bool WorkWindow::IsMinimized() const +bool WorkWindow::IsMinimized() const { //return mpWindowImpl->mpFrameData->mbMinimized; SalFrameState aState; @@ -234,15 +234,15 @@ sal_Bool WorkWindow::IsMinimized() const // ----------------------------------------------------------------------- -sal_Bool WorkWindow::SetPluginParent( SystemParentData* pParent ) +bool WorkWindow::SetPluginParent( SystemParentData* pParent ) { DBG_ASSERT( ! mbPresentationMode && ! mbFullScreenMode, "SetPluginParent in fullscreen or presentation mode !" ); bool bWasDnd = Window::ImplStopDnd(); - sal_Bool bShown = IsVisible(); + bool bShown = IsVisible(); Show( false ); - sal_Bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); + bool bRet = mpWindowImpl->mpFrame->SetPluginParent( pParent ); Show( bShown ); if( bWasDnd ) @@ -270,9 +270,9 @@ void WorkWindow::Restore() ImplSetFrameState( WINDOWSTATE_STATE_NORMAL ); } -sal_Bool WorkWindow::Close() +bool WorkWindow::Close() { - sal_Bool bCanClose = SystemWindow::Close(); + bool bCanClose = SystemWindow::Close(); // Ist es das Applikationsfenster, dann beende die Applikation if ( bCanClose && ( ImplGetSVData()->maWinData.mpAppWin == this ) ) @@ -281,14 +281,14 @@ sal_Bool WorkWindow::Close() return bCanClose; } -void WorkWindow::Maximize( sal_Bool bMaximize ) +void WorkWindow::Maximize( bool bMaximize ) { ImplSetFrameState( bMaximize ? WINDOWSTATE_STATE_MAXIMIZED : WINDOWSTATE_STATE_NORMAL ); } -sal_Bool WorkWindow::IsMaximized() const +bool WorkWindow::IsMaximized() const { - sal_Bool bRet = sal_False; + bool bRet = false; SalFrameState aState; if( mpWindowImpl->mpFrame->GetWindowState( &aState ) ) @@ -296,7 +296,7 @@ sal_Bool WorkWindow::IsMaximized() const if( aState.mnState & (WINDOWSTATE_STATE_MAXIMIZED | WINDOWSTATE_STATE_MAXIMIZED_HORZ | WINDOWSTATE_STATE_MAXIMIZED_VERT ) ) - bRet = sal_True; + bRet = true; } return bRet; } diff --git a/vcl/unx/generic/app/i18n_status.cxx b/vcl/unx/generic/app/i18n_status.cxx index 85bbdeef7771..3446d18472dc 100644 --- a/vcl/unx/generic/app/i18n_status.cxx +++ b/vcl/unx/generic/app/i18n_status.cxx @@ -373,7 +373,7 @@ IIIMPStatusWindow::IIIMPStatusWindow( SalFrame* pParent, bool bOn ) : else fprintf( stderr, "Warning: could not reposition status window since no frame\n" ); #endif - EnableAlwaysOnTop( sal_True ); + EnableAlwaysOnTop( true ); } IIIMPStatusWindow::~IIIMPStatusWindow() diff --git a/vcl/unx/generic/app/i18n_xkb.cxx b/vcl/unx/generic/app/i18n_xkb.cxx index 6886c793a7cb..9a12c97c2d3a 100644 --- a/vcl/unx/generic/app/i18n_xkb.cxx +++ b/vcl/unx/generic/app/i18n_xkb.cxx @@ -24,7 +24,7 @@ #include "unx/i18n_xkb.hxx" SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay ) - : mbUseExtension( sal_True ), + : mbUseExtension( true ), mnDefaultGroup( 0 ) { mpDisplay = pDisplay; @@ -53,9 +53,9 @@ SalI18N_KeyboardExtension::SalI18N_KeyboardExtension( Display* pDisplay ) int nExtMajorVersion = XkbMajorVersion; int nExtMinorVersion = XkbMinorVersion; - mbUseExtension = (sal_Bool)XkbQueryExtension( mpDisplay, + mbUseExtension = XkbQueryExtension( mpDisplay, &nMajorExtOpcode, (int*)&mnEventBase, (int*)&mnErrorBase, - &nExtMajorVersion, &nExtMinorVersion ); + &nExtMajorVersion, &nExtMinorVersion ) != 0; } // query notification for changes of the keyboard group diff --git a/vcl/unx/generic/app/saldisp.cxx b/vcl/unx/generic/app/saldisp.cxx index 607f413acfc5..2ea2c4c61141 100644 --- a/vcl/unx/generic/app/saldisp.cxx +++ b/vcl/unx/generic/app/saldisp.cxx @@ -126,7 +126,7 @@ static int sal_significantBits( Pixel nMask ) return nBits; } -static sal_Bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI ) +static bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI ) { int nInfos; XVisualInfo aTemplate; @@ -136,14 +136,14 @@ static sal_Bool sal_GetVisualInfo( Display *pDisplay, XID nVID, XVisualInfo &rVI pInfos = XGetVisualInfo( pDisplay, VisualIDMask, &aTemplate, &nInfos ); if( !pInfos ) - return sal_False; + return false; rVI = *pInfos; XFree( pInfos ); DBG_ASSERT( rVI.visualid == nVID, "sal_GetVisualInfo: could not get correct visual by visualId" ); - return sal_True; + return true; } // --------------------------------------------------------------------------- @@ -175,7 +175,7 @@ sal_GetServerVendor( Display *p_display ) return vendor_unknown; } -sal_Bool SalDisplay::BestVisual( Display *pDisplay, +bool SalDisplay::BestVisual( Display *pDisplay, int nScreen, XVisualInfo &rVI ) { @@ -200,22 +200,22 @@ sal_Bool SalDisplay::BestVisual( Display *pDisplay, int i; for( i = 0; i < nVisuals; i++ ) { - sal_Bool bUsable = sal_False; + bool bUsable = false; int nTrueColor = 1; if ( pVInfos[i].screen != nScreen ) { - bUsable = sal_False; + bUsable = false; } else if( pVInfos[i].c_class == TrueColor ) { nTrueColor = 2048; if( pVInfos[i].depth == 24 ) - bUsable = sal_True; + bUsable = true; } else if( pVInfos[i].c_class == PseudoColor ) { - bUsable = sal_True; + bUsable = true; } pWeight[ i ] = bUsable ? nTrueColor*pVInfos[i].depth : -1024; pWeight[ i ] -= pVInfos[ i ].visualid; @@ -332,12 +332,12 @@ static int DisplayHasEvent( int fd, SalX11Display *pDisplay ) if( ! pDisplay->IsDisplay() ) return 0; - int result; + bool result; GetSalData()->m_pInstance->GetYieldMutex()->acquire(); result = pDisplay->IsEvent(); GetSalData()->m_pInstance->GetYieldMutex()->release(); - return result; + return int(result); } static int DisplayQueue( int fd, SalX11Display *pDisplay ) { @@ -1833,13 +1833,13 @@ int SalDisplay::CaptureMouse( SalFrame *pCapture ) // Events -sal_Bool SalX11Display::IsEvent() +bool SalX11Display::IsEvent() { if( HasUserEvents() || XEventsQueued( pDisp_, QueuedAlready ) ) - return sal_True; + return true; XFlush( pDisp_ ); - return sal_False; + return false; } void SalX11Display::Yield() @@ -2752,7 +2752,7 @@ SalColor SalColormap::GetColor( Pixel nPixel ) const return MAKE_SALCOLOR( aColor.red>>8, aColor.green>>8, aColor.blue>>8 ); } -inline sal_Bool SalColormap::GetXPixel( XColor &rColor, +inline bool SalColormap::GetXPixel( XColor &rColor, int r, int g, int b ) const @@ -2763,15 +2763,15 @@ inline sal_Bool SalColormap::GetXPixel( XColor &rColor, return XAllocColor( GetXDisplay(), m_hColormap, &rColor ); } -sal_Bool SalColormap::GetXPixels( XColor &rColor, +bool SalColormap::GetXPixels( XColor &rColor, int r, int g, int b ) const { if( !GetXPixel( rColor, r, g, b ) ) - return sal_False; + return false; if( rColor.pixel & 1 ) - return sal_True; + return true; return GetXPixel( rColor, r^0xFF, g^0xFF, b^0xFF ); } diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 9966c08e7128..487cd637f45d 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -84,7 +84,7 @@ X11SalInstance::~X11SalInstance() struct PredicateReturn { sal_uInt16 nType; - sal_Bool bRet; + bool bRet; }; extern "C" { @@ -121,7 +121,7 @@ Bool ImplPredicateEvent( Display *, XEvent *pEvent, char *pData ) } if ( (nType & pPre->nType) || ( ! nType && (pPre->nType & VCL_INPUT_OTHER) ) ) - pPre->bRet = sal_True; + pPre->bRet = true; return False; } @@ -131,16 +131,16 @@ bool X11SalInstance::AnyInput(sal_uInt16 nType) { SalGenericData *pData = GetGenericData(); Display *pDisplay = pData->GetSalDisplay()->GetDisplay(); - sal_Bool bRet = sal_False; + bool bRet = false; if( (nType & VCL_INPUT_TIMER) && (mpXLib && mpXLib->CheckTimeout(false)) ) - bRet = sal_True; + bRet = true; else if (XPending(pDisplay) ) { PredicateReturn aInput; XEvent aEvent; - aInput.bRet = sal_False; + aInput.bRet = false; aInput.nType = nType; XCheckIfEvent(pDisplay, &aEvent, ImplPredicateEvent, diff --git a/vcl/unx/generic/dtrans/X11_selection.cxx b/vcl/unx/generic/dtrans/X11_selection.cxx index ead695ce4d97..9ae8e0ebbd4e 100644 --- a/vcl/unx/generic/dtrans/X11_selection.cxx +++ b/vcl/unx/generic/dtrans/X11_selection.cxx @@ -2162,7 +2162,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) // some listener forgot to call dropComplete in the last operation // let us end it now and accept the new enter event aGuard.clear(); - dropComplete( sal_False, m_aCurrentDropWindow, m_nDropTime ); + dropComplete( false, m_aCurrentDropWindow, m_nDropTime ); aGuard.reset(); } @@ -2294,7 +2294,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) aGuard.clear(); it->second->dragExit( aEvent ); // reset the drop status, notify source - dropComplete( sal_False, m_aCurrentDropWindow, m_nDropTime ); + dropComplete( false, m_aCurrentDropWindow, m_nDropTime ); } } } @@ -2305,7 +2305,7 @@ bool SelectionManager::handleDropEvent( XClientMessageEvent& rMessage ) * methods for XDropTargetDropContext */ -void SelectionManager::dropComplete( sal_Bool bSuccess, XLIB_Window aDropWindow, XLIB_Time ) +void SelectionManager::dropComplete( bool bSuccess, XLIB_Window aDropWindow, XLIB_Time ) { osl::ClearableMutexGuard aGuard(m_aMutex); @@ -3880,7 +3880,7 @@ sal_Bool SelectionManager::handleEvent( const Any& event ) throw() m_nSelectionTimestamp = nTimestamp; } - return sal_Bool( handleXEvent( *pEvent ) ); + return handleXEvent( *pEvent ); } else { diff --git a/vcl/unx/generic/dtrans/X11_selection.hxx b/vcl/unx/generic/dtrans/X11_selection.hxx index 5b5ad959b842..cb968f24f147 100644 --- a/vcl/unx/generic/dtrans/X11_selection.hxx +++ b/vcl/unx/generic/dtrans/X11_selection.hxx @@ -465,7 +465,7 @@ namespace x11 { // for XDropTarget{Drag|Drop}Context void accept( sal_Int8 dragOperation, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); void reject( XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); - void dropComplete( sal_Bool success, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); + void dropComplete( bool success, XLIB_Window aDropXLIB_Window, XLIB_Time aXLIB_Timestamp ); // for XDragSourceContext sal_Int32 getCurrentCursor(); diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx index 29b5b47a8c1b..2bc1c65a16a0 100644 --- a/vcl/unx/generic/gdi/salgdi.cxx +++ b/vcl/unx/generic/gdi/salgdi.cxx @@ -130,20 +130,20 @@ X11SalGraphics::X11SalGraphics() pStippleGC_ = NULL; pTrackingGC_ = NULL; - bWindow_ = sal_False; - bPrinter_ = sal_False; - bVirDev_ = sal_False; - bPenGC_ = sal_False; - bFontGC_ = sal_False; - bBrushGC_ = sal_False; - bMonoGC_ = sal_False; - bCopyGC_ = sal_False; - bInvertGC_ = sal_False; - bInvert50GC_ = sal_False; - bStippleGC_ = sal_False; - bTrackingGC_ = sal_False; + bWindow_ = false; + bPrinter_ = false; + bVirDev_ = false; + bPenGC_ = false; + bFontGC_ = false; + bBrushGC_ = false; + bMonoGC_ = false; + bCopyGC_ = false; + bInvertGC_ = false; + bInvert50GC_ = false; + bStippleGC_ = false; + bTrackingGC_ = false; bXORMode_ = false; - bDitherBrush_ = sal_False; + bDitherBrush_ = false; } X11SalGraphics::~X11SalGraphics() @@ -216,7 +216,7 @@ void X11SalGraphics::Init( SalFrame *pFrame, Drawable aTarget, m_nXScreen = nXScreen; SetDrawable( aTarget, nXScreen ); - bWindow_ = sal_True; + bWindow_ = true; m_pFrame = pFrame; m_pVDev = NULL; } @@ -275,7 +275,7 @@ GC X11SalGraphics::SelectPen() XSetForeground( pDisplay, pPenGC_, nPenPixel_ ); XSetFunction ( pDisplay, pPenGC_, bXORMode_ ? GXxor : GXcopy ); SetClipRegion( pPenGC_ ); - bPenGC_ = sal_True; + bPenGC_ = true; } return pPenGC_; @@ -321,7 +321,7 @@ GC X11SalGraphics::SelectBrush() XSetFunction ( pDisplay, pBrushGC_, bXORMode_ ? GXxor : GXcopy ); SetClipRegion( pBrushGC_ ); - bBrushGC_ = sal_True; + bBrushGC_ = true; } return pBrushGC_; @@ -352,7 +352,7 @@ GC X11SalGraphics::GetTrackingGC() if( !bTrackingGC_ ) { SetClipRegion( pTrackingGC_ ); - bTrackingGC_ = sal_True; + bTrackingGC_ = true; } return pTrackingGC_; @@ -397,7 +397,7 @@ void X11SalGraphics::DrawLines( sal_uLong nPoints, #define P_DELTA 51 #define DMAP( v, m ) ((v % P_DELTA) > m ? (v / P_DELTA) + 1 : (v / P_DELTA)) -BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) +bool X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) { static const short nOrdDither8Bit[ 8 ][ 8 ] = { @@ -413,7 +413,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) // test for correct depth (8bit) if( GetColormap().GetVisual().GetDepth() != 8 ) - return sal_False; + return false; char pBits[64]; char *pBitsPtr = pBits; @@ -469,7 +469,7 @@ BOOL X11SalGraphics::GetDitherPixmap( SalColor nSalColor ) pImage->data = NULL; XDestroyImage( pImage ); - return sal_True; + return true; } void X11SalGraphics::GetResolution( sal_Int32 &rDPIX, sal_Int32 &rDPIY ) // const @@ -537,15 +537,15 @@ void X11SalGraphics::ResetClipRegion() { if( mpClipRegion ) { - bPenGC_ = sal_False; - bFontGC_ = sal_False; - bBrushGC_ = sal_False; - bMonoGC_ = sal_False; - bCopyGC_ = sal_False; - bInvertGC_ = sal_False; - bInvert50GC_ = sal_False; - bStippleGC_ = sal_False; - bTrackingGC_ = sal_False; + bPenGC_ = false; + bFontGC_ = false; + bBrushGC_ = false; + bMonoGC_ = false; + bCopyGC_ = false; + bInvertGC_ = false; + bInvert50GC_ = false; + bStippleGC_ = false; + bTrackingGC_ = false; XDestroyRegion( mpClipRegion ); mpClipRegion = NULL; @@ -601,15 +601,15 @@ bool X11SalGraphics::setClipRegion( const Region& i_rClip ) //} // done, invalidate GCs - bPenGC_ = sal_False; - bFontGC_ = sal_False; - bBrushGC_ = sal_False; - bMonoGC_ = sal_False; - bCopyGC_ = sal_False; - bInvertGC_ = sal_False; - bInvert50GC_ = sal_False; - bStippleGC_ = sal_False; - bTrackingGC_ = sal_False; + bPenGC_ = false; + bFontGC_ = false; + bBrushGC_ = false; + bMonoGC_ = false; + bCopyGC_ = false; + bInvertGC_ = false; + bInvert50GC_ = false; + bStippleGC_ = false; + bTrackingGC_ = false; if( XEmptyRegion( mpClipRegion ) ) { @@ -624,7 +624,7 @@ void X11SalGraphics::SetLineColor() if( nPenColor_ != SALCOLOR_NONE ) { nPenColor_ = SALCOLOR_NONE; - bPenGC_ = sal_False; + bPenGC_ = false; } } @@ -634,7 +634,7 @@ void X11SalGraphics::SetLineColor( SalColor nSalColor ) { nPenColor_ = nSalColor; nPenPixel_ = GetPixel( nSalColor ); - bPenGC_ = sal_False; + bPenGC_ = false; } } @@ -642,9 +642,9 @@ void X11SalGraphics::SetFillColor() { if( nBrushColor_ != SALCOLOR_NONE ) { - bDitherBrush_ = sal_False; + bDitherBrush_ = false; nBrushColor_ = SALCOLOR_NONE; - bBrushGC_ = sal_False; + bBrushGC_ = false; } } @@ -652,7 +652,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor ) { if( nBrushColor_ != nSalColor ) { - bDitherBrush_ = sal_False; + bDitherBrush_ = false; nBrushColor_ = nSalColor; nBrushPixel_ = GetPixel( nSalColor ); if( TrueColor != GetColormap().GetVisual().GetClass() @@ -674,7 +674,7 @@ void X11SalGraphics::SetFillColor( SalColor nSalColor ) && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0x00 ) // light brown && nSalColor != MAKE_SALCOLOR( 0xFF, 0xFF, 0xFF ) ) bDitherBrush_ = GetDitherPixmap(nSalColor); - bBrushGC_ = sal_False; + bBrushGC_ = false; } } @@ -693,7 +693,7 @@ void X11SalGraphics::SetROPLineColor( SalROPColor nROPColor ) break; } nPenColor_ = GetColormap().GetColor( nPenPixel_ ); - bPenGC_ = sal_False; + bPenGC_ = false; } void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) @@ -710,9 +710,9 @@ void X11SalGraphics::SetROPFillColor( SalROPColor nROPColor ) nBrushPixel_ = (Pixel)(1 << GetVisual().GetDepth()) - 1; break; } - bDitherBrush_ = sal_False; + bDitherBrush_ = false; nBrushColor_ = GetColormap().GetColor( nBrushPixel_ ); - bBrushGC_ = sal_False; + bBrushGC_ = false; } void X11SalGraphics::SetXORMode( bool bSet, bool ) @@ -720,15 +720,15 @@ void X11SalGraphics::SetXORMode( bool bSet, bool ) if( !bXORMode_ == bSet ) { bXORMode_ = bSet; - bPenGC_ = sal_False; - bFontGC_ = sal_False; - bBrushGC_ = sal_False; - bMonoGC_ = sal_False; - bCopyGC_ = sal_False; - bInvertGC_ = sal_False; - bInvert50GC_ = sal_False; - bStippleGC_ = sal_False; - bTrackingGC_ = sal_False; + bPenGC_ = false; + bFontGC_ = false; + bBrushGC_ = false; + bMonoGC_ = false; + bCopyGC_ = false; + bInvertGC_ = false; + bInvert50GC_ = false; + bStippleGC_ = false; + bTrackingGC_ = false; } } @@ -914,7 +914,7 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, GC pGC = SelectBrush(); SetClipRegion( pGC, pXRegA ); // ??? twice XDestroyRegion( pXRegA ); - bBrushGC_ = sal_False; + bBrushGC_ = false; XFillRectangle( GetXDisplay(), GetDrawable(), @@ -928,20 +928,20 @@ void X11SalGraphics::drawPolyPolygon( sal_uInt32 nPoly, drawPolyLine( pPoints[i], pPtAry[i], true ); } -sal_Bool X11SalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) +bool X11SalGraphics::drawPolyLineBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) { - return sal_False; + return false; } -sal_Bool X11SalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) +bool X11SalGraphics::drawPolygonBezier( sal_uInt32, const SalPoint*, const sal_uInt8* ) { - return sal_False; + return false; } -sal_Bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, +bool X11SalGraphics::drawPolyPolygonBezier( sal_uInt32, const sal_uInt32*, const SalPoint* const*, const sal_uInt8* const* ) { - return sal_False; + return false; } void X11SalGraphics::invert( sal_uInt32 nPoints, @@ -969,9 +969,9 @@ void X11SalGraphics::invert( sal_uInt32 nPoints, Complex, CoordModeOrigin ); } -BOOL X11SalGraphics::drawEPS( long,long,long,long,void*,sal_uLong ) +bool X11SalGraphics::drawEPS( long,long,long,long,void*,sal_uLong ) { - return sal_False; + return false; } XID X11SalGraphics::GetXRenderPicture() diff --git a/vcl/unx/generic/gdi/salgdi2.cxx b/vcl/unx/generic/gdi/salgdi2.cxx index 6b1aabe93a91..3daf71bbae57 100644 --- a/vcl/unx/generic/gdi/salgdi2.cxx +++ b/vcl/unx/generic/gdi/salgdi2.cxx @@ -118,7 +118,7 @@ inline GC X11SalGraphics::GetMonoGC( Pixmap hPixmap ) if( !bMonoGC_ ) { SetClipRegion( pMonoGC_ ); - bMonoGC_ = sal_True; + bMonoGC_ = true; } return pMonoGC_; @@ -134,7 +134,7 @@ inline GC X11SalGraphics::GetCopyGC() if( !bCopyGC_ ) { SetClipRegion( pCopyGC_ ); - bCopyGC_ = sal_True; + bCopyGC_ = true; } return pCopyGC_; } @@ -151,7 +151,7 @@ GC X11SalGraphics::GetInvertGC() if( !bInvertGC_ ) { SetClipRegion( pInvertGC_ ); - bInvertGC_ = sal_True; + bInvertGC_ = true; } return pInvertGC_; } @@ -198,7 +198,7 @@ GC X11SalGraphics::GetInvert50GC() if( !bInvert50GC_ ) { SetClipRegion( pInvert50GC_ ); - bInvert50GC_ = sal_True; + bInvert50GC_ = true; } return pInvert50GC_; } @@ -215,7 +215,7 @@ inline GC X11SalGraphics::GetStippleGC() { XSetFunction( GetXDisplay(), pStippleGC_, bXORMode_ ? GXxor : GXcopy ); SetClipRegion( pStippleGC_ ); - bStippleGC_ = sal_True; + bStippleGC_ = true; } return pStippleGC_; @@ -577,7 +577,7 @@ void X11SalGraphics::drawMaskedBitmap( const SalTwoRect& rPosAry, DBG_TESTTRANS( aBG ); // #105055# Disable XOR temporarily - sal_Bool bOldXORMode( bXORMode_ ); + bool bOldXORMode( bXORMode_ ); bXORMode_ = false; // copy pixmap #2 (result) to background diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx index 84ec4f657873..e0e1ff4bcc2a 100644 --- a/vcl/unx/generic/gdi/salgdi3.cxx +++ b/vcl/unx/generic/gdi/salgdi3.cxx @@ -118,7 +118,7 @@ X11SalGraphics::GetFontGC() { XSetForeground( pDisplay, pFontGC_, nTextPixel_ ); SetClipRegion( pFontGC_ ); - bFontGC_ = sal_True; + bFontGC_ = true; } return pFontGC_; @@ -492,7 +492,7 @@ X11SalGraphics::SetTextColor( SalColor nSalColor ) { nTextColor_ = nSalColor; nTextPixel_ = GetPixel( nSalColor ); - bFontGC_ = sal_False; + bFontGC_ = false; } } @@ -718,7 +718,7 @@ SystemFontData X11SalGraphics::GetSysFontData( int nFallbacklevel ) const //-------------------------------------------------------------------------- -sal_Bool X11SalGraphics::CreateFontSubset( +bool X11SalGraphics::CreateFontSubset( const OUString& rToFile, const PhysicalFontFace* pFont, sal_GlyphId* pGlyphIds, diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 96d8ed6db943..fde56609167d 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -115,10 +115,10 @@ void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, m_pFrame = NULL; bWindow_ = pDisplay->IsDisplay(); - bVirDev_ = sal_True; + bVirDev_ = true; } -sal_Bool X11SalVirtualDevice::Init( SalDisplay *pDisplay, +bool X11SalVirtualDevice::Init( SalDisplay *pDisplay, long nDX, long nDY, sal_uInt16 nBitCount, SalX11Screen nXScreen, @@ -157,7 +157,7 @@ sal_Bool X11SalVirtualDevice::Init( SalDisplay *pDisplay, else { hDrawable_ = hDrawable; - bExternPixmap_ = sal_True; + bExternPixmap_ = true; } pGraphics_->Init( this, pColormap, bDeleteColormap ); @@ -174,8 +174,8 @@ X11SalVirtualDevice::X11SalVirtualDevice() : nDX_ = 0; nDY_ = 0; nDepth_ = 0; - bGraphics_ = sal_False; - bExternPixmap_ = sal_False; + bGraphics_ = false; + bExternPixmap_ = false; } X11SalVirtualDevice::~X11SalVirtualDevice() @@ -194,18 +194,18 @@ SalGraphics* X11SalVirtualDevice::GetGraphics() return NULL; if( pGraphics_ ) - bGraphics_ = sal_True; + bGraphics_ = true; return pGraphics_; } void X11SalVirtualDevice::ReleaseGraphics( SalGraphics* ) -{ bGraphics_ = sal_False; } +{ bGraphics_ = false; } -sal_Bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) +bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) { if( bExternPixmap_ ) - return sal_False; + return false; if( !nDX ) nDX = 1; if( !nDY ) nDY = 1; @@ -224,7 +224,7 @@ sal_Bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) nDX_ = 1; nDY_ = 1; } - return sal_False; + return false; } if( GetDrawable() ) @@ -237,7 +237,7 @@ sal_Bool X11SalVirtualDevice::SetSize( long nDX, long nDY ) if( pGraphics_ ) InitGraphics( this ); - return sal_True; + return true; } void X11SalVirtualDevice::GetSize( long& rWidth, long& rHeight ) diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx index e06003daf599..481f44f7c612 100644 --- a/vcl/unx/generic/window/salframe.cxx +++ b/vcl/unx/generic/window/salframe.cxx @@ -193,12 +193,12 @@ void X11SalFrame::askForXEmbedFocus( sal_Int32 i_nTimeCode ) GetGenericData()->ErrorTrapPop(); } -static sal_Bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXScreen, +static bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXScreen, sal_uInt16 nIcon, sal_uInt16 iconSize, Pixmap& icon_pixmap, Pixmap& icon_mask) { if( ! ImplGetResMgr() ) - return sal_False; + return false; sal_uInt16 nIconSizeOffset; @@ -209,11 +209,11 @@ static sal_Bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXSc else if( iconSize >= 16 ) nIconSizeOffset = SV_ICON_SIZE16_START; else - return sal_False; + return false; BitmapEx aIcon( ResId(nIconSizeOffset + nIcon, *ImplGetResMgr())); - if( sal_True == aIcon.IsEmpty() ) - return sal_False; + if( aIcon.IsEmpty() ) + return false; SalTwoRect aRect; aRect.mnSrcX = 0; aRect.mnSrcY = 0; @@ -264,7 +264,7 @@ static sal_Bool lcl_SelectAppIconPixmap( SalDisplay *pDisplay, SalX11Screen nXSc XFreeGC( pDisplay->GetDisplay(), aMonoGC ); } - return sal_True; + return true; } void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemParentData* pParentData, bool bUseGeometry ) @@ -531,8 +531,8 @@ void X11SalFrame::Init( sal_uLong nSalFrameStyle, SalX11Screen nXScreen, SystemP } nShowState_ = SHOWSTATE_UNKNOWN; - bViewable_ = sal_True; - bMapped_ = sal_False; + bViewable_ = true; + bMapped_ = false; nVisibility_ = VisibilityFullyObscured; mhWindow = XCreateWindow( GetXDisplay(), aFrameParent, @@ -729,16 +729,16 @@ X11SalFrame::X11SalFrame( SalFrame *pParent, sal_uLong nSalFrameStyle, nHeight_ = 0; nStyle_ = 0; mnExtStyle = 0; - bAlwaysOnTop_ = sal_False; + bAlwaysOnTop_ = false; // set bViewable_ to sal_True: hack GetClientSize to report something // different to 0/0 before first map - bViewable_ = sal_True; - bMapped_ = sal_False; - bDefaultPosition_ = sal_True; + bViewable_ = true; + bMapped_ = false; + bDefaultPosition_ = true; nVisibility_ = VisibilityFullyObscured; m_nWorkArea = 0; - mbInShow = sal_False; + mbInShow = false; m_bXEmbed = false; nScreenSaversTimeout_ = 0; @@ -1009,7 +1009,7 @@ void X11SalFrame::SetIcon( sal_uInt16 nIcon ) } pHints = &Hints; - sal_Bool bOk = lcl_SelectAppIconPixmap( GetDisplay(), m_nXScreen, + bool bOk = lcl_SelectAppIconPixmap( GetDisplay(), m_nXScreen, nIcon, iconSize, pHints->icon_pixmap, pHints->icon_mask ); if ( !bOk ) @@ -1098,7 +1098,7 @@ void X11SalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate ) setXEmbedInfo(); if( bVisible ) { - mbInShow = sal_True; + mbInShow = true; if( ! (nStyle_ & SAL_FRAME_STYLE_INTRO) ) { // hide all INTRO frames @@ -1712,7 +1712,7 @@ void X11SalFrame::SetWindowState( const SalFrameState *pState ) } } -sal_Bool X11SalFrame::GetWindowState( SalFrameState* pState ) +bool X11SalFrame::GetWindowState( SalFrameState* pState ) { if( SHOWSTATE_MINIMIZED == nShowState_ ) pState->mnState = WINDOWSTATE_STATE_MINIMIZED; @@ -1751,7 +1751,7 @@ sal_Bool X11SalFrame::GetWindowState( SalFrameState* pState ) pState->mnMask |= _FRAMESTATE_MASK_MAXIMIZED_GEOMETRY; } - return sal_True; + return true; } // native menu implementation - currently empty @@ -2375,10 +2375,10 @@ X11SalFrame::HandleExtTextEvent (XClientMessageEvent *pEvent) // PostEvent -sal_Bool X11SalFrame::PostEvent( void *pData ) +bool X11SalFrame::PostEvent( void *pData ) { GetDisplay()->SendInternalEvent( this, pData ); - return sal_True; + return true; } // Title @@ -2460,10 +2460,10 @@ OUString X11SalFrame::GetKeyName( sal_uInt16 nKeyCode ) return GetDisplay()->GetKeyName( nKeyCode ); } -sal_Bool X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) +bool X11SalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) { // not supported yet - return sal_False; + return false; } LanguageType X11SalFrame::GetInputLanguage() @@ -3628,9 +3628,9 @@ long X11SalFrame::HandleReparentEvent( XReparentEvent *pEvent ) XLIB_Window hWM_Parent; XLIB_Window hRoot, *Children, hDummy; unsigned int nChildren; - sal_Bool bNone = pDisplay_->GetProperties() + bool bNone = pDisplay_->GetProperties() & PROPERTY_SUPPORT_WM_Parent_Pixmap_None; - sal_Bool bAccessParentWindow = ! (pDisplay_->GetProperties() + bool bAccessParentWindow = ! (pDisplay_->GetProperties() & PROPERTY_FEATURE_TrustedSolaris); static const char* pDisableStackingCheck = getenv( "SAL_DISABLE_STACKING_CHECK" ); @@ -4013,8 +4013,8 @@ long X11SalFrame::Dispatch( XEvent *pEvent ) XUnmapWindow( GetXDisplay(), GetShellWindow() ); break; } - bMapped_ = sal_True; - bViewable_ = sal_True; + bMapped_ = true; + bViewable_ = true; nRet = sal_True; if ( mpInputContext != NULL ) mpInputContext->Map( this ); @@ -4065,7 +4065,7 @@ long X11SalFrame::Dispatch( XEvent *pEvent ) RestackChildren(); - mbInShow = sal_False; + mbInShow = false; m_bSetFocusOnMap = false; } break; @@ -4073,8 +4073,8 @@ long X11SalFrame::Dispatch( XEvent *pEvent ) case UnmapNotify: if( pEvent->xunmap.window == GetShellWindow() ) { - bMapped_ = sal_False; - bViewable_ = sal_False; + bMapped_ = false; + bViewable_ = false; nRet = sal_True; if ( mpInputContext != NULL ) mpInputContext->Unmap( this ); diff --git a/vcl/unx/generic/window/salobj.cxx b/vcl/unx/generic/window/salobj.cxx index 6f61ced8c416..a694b91bd91b 100644 --- a/vcl/unx/generic/window/salobj.cxx +++ b/vcl/unx/generic/window/salobj.cxx @@ -47,7 +47,7 @@ SalObject* X11SalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pW return X11SalObject::CreateObject( pParent, pWindowData, bShow ); } -X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, sal_Bool bShow ) +X11SalObject* X11SalObject::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool bShow ) { int error_base, event_base; X11SalObject* pObject = new X11SalObject(); @@ -500,10 +500,10 @@ bool X11SalObject::Dispatch( XEvent* pEvent ) switch( pEvent->type ) { case UnmapNotify: - pObject->mbVisible = sal_False; + pObject->mbVisible = false; return true; case MapNotify: - pObject->mbVisible = sal_True; + pObject->mbVisible = true; return true; case ButtonPress: pObject->CallCallback( SALOBJ_EVENT_TOTOP, NULL ); diff --git a/vcl/unx/gtk/a11y/atktextattributes.cxx b/vcl/unx/gtk/a11y/atktextattributes.cxx index 365f1c9cdd2e..502d30ef125c 100644 --- a/vcl/unx/gtk/a11y/atktextattributes.cxx +++ b/vcl/unx/gtk/a11y/atktextattributes.cxx @@ -600,12 +600,12 @@ Bool2String( const uno::Any& rAny ) static bool String2Bool( uno::Any& rAny, const gchar * value ) { - sal_Bool bValue; + bool bValue; if( strncmp( value, STRNCMP_PARAM( "true" ) ) ) - bValue = sal_True; + bValue = true; else if( strncmp( value, STRNCMP_PARAM( "false" ) ) ) - bValue = sal_False; + bValue = false; else return false; diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index bdd24551b768..9df91e511925 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -99,7 +99,7 @@ SalGtkFilePicker::SalGtkFilePicker( const uno::Reference< uno::XComponentContext mnHID_FolderChange( 0 ), mnHID_SelectionChange( 0 ), bVersionWidthUnset( false ), - mbPreviewState( sal_False ), + mbPreviewState( false ), mHID_Preview( 0 ), m_pPreview( NULL ), m_pPseudoFilter( NULL ), @@ -393,7 +393,7 @@ public: OUString getFilter() const { return m_sFilter; } /// determines if the filter has sub filter (i.e., the filter is a filter group in real) - sal_Bool hasSubFilters( ) const; + bool hasSubFilters( ) const; /** retrieves the filters belonging to the entry @return @@ -416,7 +416,7 @@ FilterEntry::FilterEntry( const OUString& _rTitle, const UnoFilterList& _rSubFil } //--------------------------------------------------------------------- -sal_Bool FilterEntry::hasSubFilters() const +bool FilterEntry::hasSubFilters() const { return( 0 < m_aSubFilters.getLength() ); } @@ -518,7 +518,7 @@ namespace { //............................................................................ bool operator () ( const FilterEntry& _rEntry ) { - sal_Bool bMatch; + bool bMatch; if( !_rEntry.hasSubFilters() ) // a real filter bMatch = (_rEntry.getTitle() == rTitle) @@ -544,9 +544,9 @@ namespace { //------------------------------------------------------------------------------------ -sal_Bool SalGtkFilePicker::FilterNameExists( const OUString& rTitle ) +bool SalGtkFilePicker::FilterNameExists( const OUString& rTitle ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( m_pFilterList ) bRet = @@ -560,9 +560,9 @@ sal_Bool SalGtkFilePicker::FilterNameExists( const OUString& rTitle ) } //------------------------------------------------------------------------------------ -sal_Bool SalGtkFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters ) +bool SalGtkFilePicker::FilterNameExists( const UnoFilterList& _rGroupedFilters ) { - sal_Bool bRet = sal_False; + bool bRet = false; if( m_pFilterList ) { @@ -867,7 +867,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno OUString aNewFilter; OUString aOldFilter = getCurrentFilter(); - sal_Bool bChangeFilter = sal_True; + bool bChangeFilter = true; for ( FilterList::iterator aListIter = m_pFilterList->begin(); aListIter != m_pFilterList->end(); ++aListIter @@ -879,7 +879,7 @@ uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getSelectedFiles() throw( uno aNewFilter = aListIter->getTitle(); if( aOldFilter == aListIter->getTitle() ) - bChangeFilter = sal_False; + bChangeFilter = false; bExtensionTypedIn = true; } @@ -1345,7 +1345,7 @@ void SAL_CALL SalGtkFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nContr OSL_TRACE("enable unknown control %d", nControlId); else if( tType == GTK_TYPE_TOGGLE_BUTTON ) { - sal_Bool bChecked = false; + bool bChecked = false; rValue >>= bChecked; gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( pWidget ), bChecked ); } @@ -1373,7 +1373,7 @@ uno::Any SAL_CALL SalGtkFilePicker::getValue( sal_Int16 nControlId, sal_Int16 nC if( !( pWidget = getWidget( nControlId, &tType ) ) ) OSL_TRACE("enable unknown control %d", nControlId); else if( tType == GTK_TYPE_TOGGLE_BUTTON ) - aRetval <<= (sal_Bool) gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( pWidget ) ); + aRetval <<= bool( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( pWidget ) ) ); else if( tType == GTK_TYPE_COMBO_BOX ) aRetval = HandleGetListValue(GTK_COMBO_BOX(pWidget), nControlAction); else @@ -1619,7 +1619,7 @@ sal_Bool SAL_CALL SalGtkFilePicker::setShowState( sal_Bool bShowState ) throw( u OSL_ASSERT( m_pDialog != NULL ); // TODO return m_pImpl->setShowState( bShowState ); - if( bShowState != mbPreviewState ) + if( bool(bShowState) != mbPreviewState ) { if( bShowState ) { diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx index 60e886fed937..4e25b0e14df8 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.hxx @@ -206,8 +206,8 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base SalGtkFilePicker( const SalGtkFilePicker& ); SalGtkFilePicker& operator=( const SalGtkFilePicker& ); - sal_Bool FilterNameExists( const OUString& rTitle ); - sal_Bool FilterNameExists( const UnoFilterList& _rGroupedFilters ); + bool FilterNameExists( const OUString& rTitle ); + bool FilterNameExists( const UnoFilterList& _rGroupedFilters ); void ensureFilterList( const OUString& _rInitialCurrentFilter ); @@ -271,7 +271,7 @@ class SalGtkFilePicker : public SalGtkPicker, public SalGtkFilePicker_Base OUString m_aInitialFilter; bool bVersionWidthUnset; - sal_Bool mbPreviewState; + bool mbPreviewState; gulong mHID_Preview; GtkWidget* m_pPreview; GtkFileFilter* m_pPseudoFilter; diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx index 01915a7c5576..6056a84e0f7a 100644 --- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx @@ -44,8 +44,8 @@ typedef struct _cairo_font_options cairo_font_options_t; const char* const tabPrelitDataName="libreoffice-tab-is-prelit"; // initialize statics -sal_Bool GtkSalGraphics::bThemeChanged = sal_True; -sal_Bool GtkSalGraphics::bNeedPixmapPaint = sal_False; +bool GtkSalGraphics::bThemeChanged = true; +bool GtkSalGraphics::bNeedPixmapPaint = false; GtkSalGraphics::GtkSalGraphics( GtkSalFrame *pFrame, GtkWidget *pWindow ) : X11SalGraphics(), @@ -288,7 +288,7 @@ public: { delete [] pData; m_idx = 0; m_size = n; pData = new NWPixmapCacheData[m_size]; } int GetSize() const { return m_size; } - sal_Bool Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap ); + bool Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap ); void Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap ); void ThemeChanged(); @@ -341,7 +341,7 @@ void NWPixmapCache::ThemeChanged() pData[i].SetPixmap( NULL ); } -sal_Bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap ) +bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap** pPixmap ) { aState &= ~CTRL_CACHING_ALLOWED; // mask clipping flag int i; @@ -354,10 +354,10 @@ sal_Bool NWPixmapCache::Find( ControlType aType, ControlState aState, const Rec pData[i].m_pixmap != NULL ) { *pPixmap = pData[i].m_pixmap; - return sal_True; + return true; } } - return sal_False; + return false; } void NWPixmapCache::Fill( ControlType aType, ControlState aState, const Rectangle& r_pixmapRect, GdkPixmap* pPixmap ) @@ -552,7 +552,7 @@ void GtkSalGraphics::copyBits( const SalTwoRect& rPosAry, * Returns sal_True if the platform supports native * drawing of the control defined by nPart */ -sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) +bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) { switch(nType) { @@ -664,7 +664,7 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPar * * returns whether bIsInside was really set. */ -sal_Bool GtkSalGraphics::hitTestNativeControl( ControlType nType, +bool GtkSalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, @@ -752,17 +752,17 @@ sal_Bool GtkSalGraphics::hitTestNativeControl( ControlType nType, if ( has_forward2 ) rIsInside |= aForward.IsInside( aPos ); } - return ( sal_True ); + return true; } if( IsNativeControlSupported(nType, nPart) ) { rIsInside = rControlRegion.IsInside( aPos ); - return( sal_True ); + return true; } else { - return( sal_False ); + return false; } } @@ -776,7 +776,7 @@ sal_Bool GtkSalGraphics::hitTestNativeControl( ControlType nType, * aValue: An optional value (tristate/numerical/string) * rCaption: A caption or title string (like button text etc) */ -sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, +bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -793,7 +793,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, for( unsigned int i = 0; i < gWidgetData.size(); i++ ) if( gWidgetData[i].gNWPixmapCacheList ) gWidgetData[i].gNWPixmapCacheList->ThemeChanged(); - GtkSalGraphics::bThemeChanged = sal_False; + GtkSalGraphics::bThemeChanged = false; } Rectangle aCtrlRect( rControlRegion ); @@ -820,7 +820,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, Size( aCtrlRect.GetWidth()+2, aCtrlRect.GetHeight()+2) ); pixmap = NWGetPixmapFromScreen( aPixmapRect ); if( ! pixmap ) - return sal_False; + return false; gdkDrawable = GDK_DRAWABLE( pixmap ); aCtrlRect = Rectangle( Point(1,1), aCtrlRect.GetSize() ); aClip.push_back( aCtrlRect ); @@ -843,7 +843,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, if (gdkDrawable == 0) return false; - sal_Bool returnVal = sal_False; + bool returnVal = false; if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) ) { returnVal = NWPaintGTKButton( gdkDrawable, nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption ); @@ -886,7 +886,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, else if ( (nType==CTRL_TAB_ITEM) || (nType==CTRL_TAB_PANE) || (nType==CTRL_TAB_BODY) ) { if ( nType == CTRL_TAB_BODY ) - returnVal = sal_True; + returnVal = true; else returnVal = NWPaintGTKTabItem( nType, nPart, aCtrlRect, aClip, nState, aValue, rCaption); } @@ -977,7 +977,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, * aValue: An optional value (tristate/numerical/string) * rCaption: A caption or title string (like button text etc) */ -sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, +bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, @@ -986,7 +986,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) { - sal_Bool returnVal = sal_False; + bool returnVal = false; if ( (nType==CTRL_PUSHBUTTON) && (nPart==PART_ENTIRE_CONTROL) && (rControlRegion.GetWidth() > 16) @@ -996,13 +996,13 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, nState, aValue, rCaption ); rNativeContentRegion = rControlRegion; - returnVal = sal_True; + returnVal = true; } if (nType == CTRL_TAB_ITEM && nPart == PART_ENTIRE_CONTROL) { rNativeBoundingRegion = NWGetTabItemRect(m_nXScreen, rControlRegion); rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if ( (nType==CTRL_COMBOBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) ) { @@ -1010,7 +1010,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, aValue, rCaption ); rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if ( (nType==CTRL_SPINBOX) && ((nPart==PART_BUTTON_UP) || (nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) ) { @@ -1019,7 +1019,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, aValue, rCaption ); rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if ( (nType==CTRL_LISTBOX) && ((nPart==PART_BUTTON_DOWN) || (nPart==PART_SUB_EDIT)) ) { @@ -1027,7 +1027,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, aValue, rCaption ); rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if ( (nType==CTRL_TOOLBAR) && ((nPart==PART_DRAW_BACKGROUND_HORZ) || @@ -1039,7 +1039,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, { rNativeBoundingRegion = NWGetToolbarRect( m_nXScreen, nType, nPart, rControlRegion, nState, aValue, rCaption ); rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if ( (nType==CTRL_SCROLLBAR) && ((nPart==PART_BUTTON_LEFT) || (nPart==PART_BUTTON_RIGHT) || (nPart==PART_BUTTON_UP) || (nPart==PART_BUTTON_DOWN) ) ) @@ -1052,7 +1052,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, rNativeContentRegion.Right() = rNativeContentRegion.Left() + 1; if (!rNativeContentRegion.GetHeight()) rNativeContentRegion.Bottom() = rNativeContentRegion.Top() + 1; - returnVal = sal_True; + returnVal = true; } if( (nType == CTRL_MENUBAR) && (nPart == PART_ENTIRE_CONTROL) ) { @@ -1064,7 +1064,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, Size( aMenuBarRect.GetWidth(), aReq.height+1 ) ); rNativeBoundingRegion = aMenuBarRect; rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if( nType == CTRL_MENU_POPUP ) { @@ -1084,7 +1084,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; - returnVal = sal_True; + returnVal = true; } else if( nPart == PART_MENU_SUBMENU_ARROW ) { @@ -1128,7 +1128,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, Size( arrow_extent, arrow_extent )); rNativeBoundingRegion = Rectangle( Point( 0, 0 ), Size( arrow_extent + horizontal_padding, arrow_extent )); - returnVal = sal_True; + returnVal = true; } } if( (nType == CTRL_RADIOBUTTON || nType == CTRL_CHECKBOX) ) @@ -1149,7 +1149,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, (rControlRegion.GetHeight()-indicator_size)/2), Size( indicator_size, indicator_size ) ); rNativeContentRegion = aIndicatorRect; - returnVal = sal_True; + returnVal = true; } if( (nType == CTRL_EDITBOX || nType == CTRL_SPINBOX || nType == CTRL_COMBOBOX) && nPart == PART_ENTIRE_CONTROL ) { @@ -1163,7 +1163,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, Size( aEditRect.GetWidth(), nHeight ) ); rNativeBoundingRegion = aEditRect; rNativeContentRegion = rNativeBoundingRegion; - returnVal = sal_True; + returnVal = true; } if( (nType == CTRL_SLIDER) && (nPart == PART_THUMB_HORZ || nPart == PART_THUMB_VERT) ) { @@ -1187,7 +1187,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, aRect.Right() = aRect.Left() + slider_width - 1; } rNativeBoundingRegion = rNativeContentRegion = aRect; - returnVal = sal_True; + returnVal = true; } if( nType == CTRL_FRAME && nPart == PART_BORDER ) { @@ -1217,7 +1217,7 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, /************************************************************************ * Individual control drawing functions ************************************************************************/ -sal_Bool GtkSalGraphics::NWPaintGTKArrow( +bool GtkSalGraphics::NWPaintGTKArrow( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& rControlRectangle, @@ -1246,7 +1246,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKArrow( return true; } -sal_Bool GtkSalGraphics::NWPaintGTKListHeader( +bool GtkSalGraphics::NWPaintGTKListHeader( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& rControlRectangle, @@ -1287,7 +1287,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKListHeader( return true; } -sal_Bool GtkSalGraphics::NWPaintGTKFixedLine( +bool GtkSalGraphics::NWPaintGTKFixedLine( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, const Rectangle& rControlRectangle, @@ -1303,7 +1303,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKFixedLine( return true; } -sal_Bool GtkSalGraphics::NWPaintGTKFrame( +bool GtkSalGraphics::NWPaintGTKFrame( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& rControlRectangle, @@ -1367,10 +1367,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKFrame( rControlRectangle.GetHeight()); } - return sal_True; + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKWindowBackground( +bool GtkSalGraphics::NWPaintGTKWindowBackground( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& /* rControlRectangle */, @@ -1391,10 +1391,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKWindowBackground( gtk_paint_flat_box(m_pWindow->style,gdkDrawable,GTK_STATE_NORMAL,GTK_SHADOW_NONE,&clipRect,m_pWindow,"base",0,0,w,h); } - return sal_True; + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKButtonReal( +bool GtkSalGraphics::NWPaintGTKButtonReal( GtkWidget* button, GdkDrawable* gdkDrawable, ControlType, ControlPart, @@ -1408,7 +1408,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKButtonReal( gboolean interiorFocus; gint focusWidth; gint focusPad; - sal_Bool bDrawFocus = sal_True; + bool bDrawFocus = true; gint x, y, w, h; GtkBorder aDefBorder; GtkBorder* pBorder; @@ -1477,7 +1477,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKButtonReal( // If the button is too small, don't ever draw focus or grab more space if ( (w < 16) || (h < 16) ) - bDrawFocus = sal_False; + bDrawFocus = false; gint xi = x, yi = y, wi = w, hi = h; if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus ) @@ -1528,10 +1528,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKButtonReal( } } - return( sal_True ); + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKButton( +bool GtkSalGraphics::NWPaintGTKButton( GdkDrawable* gdkDrawable, ControlType type, ControlPart part, const Rectangle& rControlRectangle, @@ -1558,7 +1558,7 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen, gint focusPad; GtkBorder aDefBorder; GtkBorder * pBorder; - sal_Bool bDrawFocus = sal_True; + bool bDrawFocus = true; Rectangle aRect; gint x, y, w, h; @@ -1585,7 +1585,7 @@ static Rectangle NWGetButtonArea( SalX11Screen nScreen, // If the button is too small, don't ever draw focus or grab more space if ( (w < 16) || (h < 16) ) - bDrawFocus = sal_False; + bDrawFocus = false; if ( (nState & CTRL_STATE_DEFAULT) && bDrawFocus ) { @@ -1624,7 +1624,7 @@ static Rectangle NWGetTabItemRect( SalX11Screen nScreen, Rectangle aAreaRect ) //------------------------------------- -sal_Bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, +bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& rControlRectangle, const clipList& rClipList, @@ -1634,7 +1634,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, { GtkStateType stateType; GtkShadowType shadowType; - sal_Bool isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON); + bool isChecked = (aValue.getTristateVal()==BUTTONVALUE_ON); gint x, y; GdkRectangle clipRect; @@ -1677,12 +1677,12 @@ sal_Bool GtkSalGraphics::NWPaintGTKRadio( GdkDrawable* gdkDrawable, x, y, indicator_size, indicator_size ); } - return( sal_True ); + return true; } //------------------------------------- -sal_Bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, +bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& rControlRectangle, const clipList& rClipList, @@ -1724,7 +1724,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKCheck( GdkDrawable* gdkDrawable, x, y, indicator_size, indicator_size ); } - return( sal_True ); + return true; } //------------------------------------- @@ -1740,7 +1740,7 @@ static void NWCalcArrowRect( const Rectangle& rButton, Rectangle& rArrow ) ) ); } -sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, +bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList&, ControlState nState, @@ -1793,7 +1793,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, scrollbarRect = pixmapRect; if ( (scrollbarRect.GetWidth() <= 1) || (scrollbarRect.GetHeight() <= 1) ) - return( sal_True ); + return true; // Grab some button style attributes gtk_widget_style_get( gWidgetData[m_nXScreen].gScrollHorizWidget, @@ -1906,7 +1906,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, thumbRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 ); } - sal_Bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 ); + bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 ); scrollbarValues = gtk_range_get_adjustment( GTK_RANGE(scrollbarWidget) ); if ( scrollbarValues == NULL ) @@ -1931,7 +1931,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, // painting them directly to the window flickers pixmap = NWGetPixmapFromScreen( pixmapRect ); if( ! pixmap ) - return sal_False; + return false; x = y = 0; w = pixmapRect.GetWidth(); @@ -2061,11 +2061,11 @@ sal_Bool GtkSalGraphics::NWPaintGTKScrollbar( ControlType, ControlPart nPart, if( !NWRenderPixmapToScreen(pixmap, pixmapRect) ) { g_object_unref( pixmap ); - return( sal_False ); + return false; } g_object_unref( pixmap ); - return( sal_True ); + return true; } //--- @@ -2153,7 +2153,7 @@ static Rectangle NWGetScrollButtonRect( SalX11Screen nScreen, ControlPart nPa //------------------------------------- -sal_Bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, +bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, @@ -2178,7 +2178,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKEditBox( GdkDrawable* gdkDrawable, NWPaintOneEditBox( m_nXScreen, gdkDrawable, &clipRect, nType, nPart, pixmapRect, nState, aValue, rCaption ); } - return( sal_True ); + return true; } @@ -2292,7 +2292,7 @@ static void NWPaintOneEditBox( SalX11Screen nScreen, //------------------------------------- -sal_Bool GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart, +bool GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList&, ControlState nState, @@ -2343,7 +2343,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart pixmap = NWGetPixmapFromScreen( pixmapRect ); if ( !pixmap ) - return( sal_False ); + return false; // First render background gtk_paint_flat_box(m_pWindow->style,pixmap,GTK_STATE_NORMAL,GTK_SHADOW_NONE,NULL,m_pWindow,"base", @@ -2389,11 +2389,11 @@ sal_Bool GtkSalGraphics::NWPaintGTKSpinBox( ControlType nType, ControlPart nPart if( !NWRenderPixmapToScreen(pixmap, pixmapRect) ) { g_object_unref( pixmap ); - return( sal_False ); + return false; } g_object_unref( pixmap ); - return( sal_True ); + return true; } //--- @@ -2490,7 +2490,7 @@ static void NWPaintOneSpinButton( SalX11Screen nScreen, //------------------------------------- -sal_Bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, +bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, @@ -2565,7 +2565,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKComboBox( GdkDrawable* gdkDrawable, arrowRect.GetWidth(), arrowRect.GetHeight() ); } - return( sal_True ); + return true; } //---- @@ -2630,7 +2630,7 @@ static Rectangle NWGetComboBoxButtonRect( SalX11Screen nScreen, -sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, +bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, const Rectangle& rControlRectangle, const clipList&, ControlState nState, @@ -2776,14 +2776,14 @@ sal_Bool GtkSalGraphics::NWPaintGTKTabItem( ControlType nType, ControlPart, else aCachePage.Fill( nType, nState, pixmapRect, pixmap ); - sal_Bool bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect); + bool bSuccess = NWRenderPixmapToScreen(pixmap, pixmapRect); g_object_unref( pixmap ); return bSuccess; } //------------------------------------- -sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, +bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, ControlType nType, ControlPart nPart, const Rectangle& rControlRectangle, const clipList& rClipList, @@ -2856,10 +2856,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKListBox( GdkDrawable* gdkDrawable, } } - return( sal_True ); + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKToolbar( +bool GtkSalGraphics::NWPaintGTKToolbar( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, const Rectangle& rControlRectangle, @@ -3029,12 +3029,12 @@ sal_Bool GtkSalGraphics::NWPaintGTKToolbar( } } - return( sal_True ); + return true; } //---- -sal_Bool GtkSalGraphics::NWPaintGTKMenubar( +bool GtkSalGraphics::NWPaintGTKMenubar( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, const Rectangle& rControlRectangle, @@ -3117,10 +3117,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKMenubar( } } - return( sal_True ); + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKPopupMenu( +bool GtkSalGraphics::NWPaintGTKPopupMenu( GdkDrawable* gdkDrawable, ControlType, ControlPart nPart, const Rectangle& rControlRectangle, @@ -3132,7 +3132,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKPopupMenu( // even crashes) in very old (Fedora Core 4 vintage) gtk's if (gtk_major_version <= 2 && gtk_minor_version <= 8 && nPart == PART_MENU_ITEM && ! (nState & CTRL_STATE_ENABLED) ) - return sal_True; + return true; GtkStateType stateType; GtkShadowType shadowType; @@ -3282,10 +3282,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKPopupMenu( } } - return( sal_True ); + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKTooltip( +bool GtkSalGraphics::NWPaintGTKTooltip( GdkDrawable* gdkDrawable, ControlType, ControlPart, const Rectangle& rControlRectangle, @@ -3320,10 +3320,10 @@ sal_Bool GtkSalGraphics::NWPaintGTKTooltip( x, y, w, h ); } - return( sal_True ); + return true; } -sal_Bool GtkSalGraphics::NWPaintGTKListNode( +bool GtkSalGraphics::NWPaintGTKListNode( GdkDrawable*, ControlType, ControlPart, const Rectangle& rControlRectangle, @@ -3359,7 +3359,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKListNode( GdkPixmap* pixmap = NWGetPixmapFromScreen( aRect ); if( ! pixmap ) - return sal_False; + return false; GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap ); gtk_paint_expander( gWidgetData[m_nXScreen].gTreeView->style, @@ -3371,13 +3371,13 @@ sal_Bool GtkSalGraphics::NWPaintGTKListNode( w/2, h/2, eStyle ); - sal_Bool bRet = NWRenderPixmapToScreen( pixmap, aRect ); + bool bRet = NWRenderPixmapToScreen( pixmap, aRect ); g_object_unref( pixmap ); return bRet; } -sal_Bool GtkSalGraphics::NWPaintGTKProgress( +bool GtkSalGraphics::NWPaintGTKProgress( GdkDrawable*, ControlType, ControlPart, const Rectangle& rControlRectangle, @@ -3395,7 +3395,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKProgress( GdkPixmap* pixmap = NWGetPixmapFromScreen( Rectangle( Point( 0, 0 ), Size( w, h ) ) ); if( ! pixmap ) - return sal_False; + return false; GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap ); @@ -3440,13 +3440,13 @@ sal_Bool GtkSalGraphics::NWPaintGTKProgress( } } - sal_Bool bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle ); + bool bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle ); g_object_unref( pixmap ); return bRet; } -sal_Bool GtkSalGraphics::NWPaintGTKSlider( +bool GtkSalGraphics::NWPaintGTKSlider( GdkDrawable*, ControlType, ControlPart nPart, const Rectangle& rControlRectangle, @@ -3465,7 +3465,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKSlider( GdkPixmap* pixmap = NWGetPixmapFromScreen( rControlRectangle ); if( ! pixmap ) - return sal_False; + return false; GdkDrawable* const &pixDrawable = GDK_DRAWABLE( pixmap ); GtkWidget* pWidget = (nPart == PART_TRACK_HORZ_AREA) @@ -3529,7 +3529,7 @@ sal_Bool GtkSalGraphics::NWPaintGTKSlider( } - sal_Bool bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle ); + bool bRet = NWRenderPixmapToScreen( pixmap, rControlRectangle ); g_object_unref( pixmap ); return bRet; @@ -3872,8 +3872,8 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) aStyleSet.SetInactiveTabColor( aSelectedBackColor ); // menu disabled entries handling - aStyleSet.SetSkipDisabledInMenus( sal_True ); - aStyleSet.SetAcceleratorsInContextMenus( sal_False ); + aStyleSet.SetSkipDisabledInMenus( true ); + aStyleSet.SetAcceleratorsInContextMenus( false ); // menu colors GtkStyle* pMenuStyle = gtk_widget_get_style( gWidgetData[m_nXScreen].gMenuWidget ); GtkStyle* pMenuItemStyle = gtk_rc_get_style( gWidgetData[m_nXScreen].gMenuItemMenuWidget ); @@ -4145,18 +4145,18 @@ GdkPixmap* GtkSalGraphics::NWGetPixmapFromScreen( Rectangle srcRect ) * Copy an alpha pixmap to screen using a gc with clipping ************************************************************************/ -sal_Bool GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ) +bool GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle dstRect ) { // The GC can't be null, otherwise we'd have no clip region GC aFontGC = GetFontGC(); if( aFontGC == NULL ) { std::fprintf(stderr, "salnativewidgets.cxx: no valid GC\n" ); - return( sal_False ); + return false; } if ( !pPixmap ) - return( sal_False ); + return false; // Copy the background of the screen into a composite pixmap CopyScreenArea( GetXDisplay(), @@ -4167,7 +4167,7 @@ sal_Bool GtkSalGraphics::NWRenderPixmapToScreen( GdkPixmap* pPixmap, Rectangle d aFontGC, 0, 0, dstRect.GetWidth(), dstRect.GetHeight(), dstRect.Left(), dstRect.Top() ); - return( sal_True ); + return true; } diff --git a/vcl/unx/gtk/gdi/salprn-gtk.cxx b/vcl/unx/gtk/gdi/salprn-gtk.cxx index b0a6a9f5cf99..eb6609098960 100644 --- a/vcl/unx/gtk/gdi/salprn-gtk.cxx +++ b/vcl/unx/gtk/gdi/salprn-gtk.cxx @@ -198,7 +198,7 @@ GtkSalPrinter::impl_doJob( for (int nPage(0); nPage != nPages; ++nPage) { if (nPage == nPages - 1) - io_rController.setLastPage(sal_True); + io_rController.setLastPage(true); io_rController.printFilteredPage(nPage); } io_rController.setJobState(view::PrintableState_JOB_COMPLETED); @@ -208,7 +208,7 @@ GtkSalPrinter::impl_doJob( } -sal_Bool +bool GtkSalPrinter::StartJob( const OUString* const i_pFileName, const OUString& i_rJobName, @@ -232,7 +232,7 @@ GtkSalPrinter::StartJob( if (!aDialog.run()) { io_rController.abortJob(); - return sal_False; + return false; } aDialog.updateControllerPrintRange(); m_pImpl->m_pPrinter = aDialog.getPrinter(); @@ -267,10 +267,10 @@ GtkSalPrinter::StartJob( } -sal_Bool +bool GtkSalPrinter::EndJob() { - sal_Bool bRet = PspSalPrinter::EndJob(); + bool bRet = PspSalPrinter::EndJob(); if (!lcl_useSystemPrintDialog()) return bRet; @@ -478,8 +478,8 @@ GtkPrintDialog::impl_initCustomTab() sal_Int32 nCurHelpText = 0; OUString aDependsOnName; sal_Int32 nDependsOnValue = 0; - sal_Bool bUseDependencyRow = sal_False; - sal_Bool bIgnore = sal_False; + bool bUseDependencyRow = false; + bool bIgnore = false; GtkWidget* pGroup = NULL; bool bGtkInternal = false; @@ -607,7 +607,7 @@ GtkPrintDialog::impl_initCustomTab() lcl_setHelpText(pWidget, aHelpTexts, 0); m_aControlToPropertyMap[pWidget] = aPropertyName; - sal_Bool bVal = sal_False; + bool bVal = false; pVal = m_rController.getValue(aPropertyName); if (pVal) pVal->Value >>= bVal; diff --git a/vcl/unx/gtk/window/gtkobject.cxx b/vcl/unx/gtk/window/gtkobject.cxx index 3ba5b0631a87..c89848b69ebd 100644 --- a/vcl/unx/gtk/window/gtkobject.cxx +++ b/vcl/unx/gtk/window/gtkobject.cxx @@ -30,7 +30,7 @@ #include <unx/gtk/gtkinst.hxx> #include <unx/gtk/gtkgdi.hxx> -GtkSalObject::GtkSalObject( GtkSalFrame* pParent, sal_Bool bShow ) +GtkSalObject::GtkSalObject( GtkSalFrame* pParent, bool bShow ) : m_pSocket( NULL ), m_pRegion( NULL ) { diff --git a/vcl/unx/gtk/window/gtksalframe.cxx b/vcl/unx/gtk/window/gtksalframe.cxx index 37d1bfad73da..324a06635f84 100644 --- a/vcl/unx/gtk/window/gtksalframe.cxx +++ b/vcl/unx/gtk/window/gtksalframe.cxx @@ -786,7 +786,7 @@ void on_registrar_available( GDBusConnection * /*connection*/, if ( pSalMenu != NULL ) { GtkSalMenu* pGtkSalMenu = static_cast<GtkSalMenu*>(pSalMenu); - pGtkSalMenu->Display( sal_True ); + pGtkSalMenu->Display( true ); pGtkSalMenu->UpdateFull(); } } @@ -807,7 +807,7 @@ void on_registrar_unavailable( GDBusConnection * /*connection*/, if ( pSalMenu ) { GtkSalMenu* pGtkSalMenu = static_cast< GtkSalMenu* >( pSalMenu ); - pGtkSalMenu->Display( sal_False ); + pGtkSalMenu->Display( false ); } } #endif @@ -1534,10 +1534,10 @@ void GtkSalFrame::ReleaseGraphics( SalGraphics* pGraphics ) } } -sal_Bool GtkSalFrame::PostEvent( void* pData ) +bool GtkSalFrame::PostEvent( void* pData ) { getDisplay()->SendInternalEvent( this, pData ); - return sal_True; + return true; } void GtkSalFrame::SetTitle( const OUString& rTitle ) @@ -1806,7 +1806,7 @@ void GtkSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate ) * showing the float (cannot grab it to the float * before show). */ - m_pParent->grabPointer( sal_True, sal_True ); + m_pParent->grabPointer( true, true ); } guint32 nUserTime = 0; @@ -1853,7 +1853,7 @@ void GtkSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate ) { m_nFloats++; if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 1 ) - grabPointer( sal_True, sal_True ); + grabPointer( true, true ); // #i44068# reset parent's IM context if( m_pParent ) m_pParent->EndExtTextInput(0); @@ -1867,7 +1867,7 @@ void GtkSalFrame::Show( sal_Bool bVisible, sal_Bool bNoActivate ) { m_nFloats--; if( ! getDisplay()->GetCaptureFrame() && m_nFloats == 0) - grabPointer( sal_False ); + grabPointer( false ); } gtk_widget_hide( m_pWindow ); if( m_pIMHandler ) @@ -2191,7 +2191,7 @@ void GtkSalFrame::SetWindowState( const SalFrameState* pState ) } } -sal_Bool GtkSalFrame::GetWindowState( SalFrameState* pState ) +bool GtkSalFrame::GetWindowState( SalFrameState* pState ) { pState->mnState = WINDOWSTATE_STATE_NORMAL; pState->mnMask = WINDOWSTATE_MASK_STATE; @@ -2226,7 +2226,7 @@ sal_Bool GtkSalFrame::GetWindowState( SalFrameState* pState ) WINDOWSTATE_MASK_WIDTH | WINDOWSTATE_MASK_HEIGHT; - return sal_True; + return true; } typedef enum { @@ -2681,13 +2681,13 @@ void GtkSalFrame::SetPointer( PointerStyle ePointerStyle ) // #i80791# use grabPointer the same way as CaptureMouse, respective float grab if( getDisplay()->MouseCaptured( this ) ) - grabPointer( sal_True, sal_False ); + grabPointer( true, false ); else if( m_nFloats > 0 ) - grabPointer( sal_True, sal_True ); + grabPointer( true, true ); } } -void GtkSalFrame::grabPointer( sal_Bool bGrab, sal_Bool bOwnerEvents ) +void GtkSalFrame::grabPointer( bool bGrab, bool bOwnerEvents ) { #if !GTK_CHECK_VERSION(3,0,0) static const char* pEnv = getenv( "SAL_NO_MOUSEGRABS" ); @@ -2869,10 +2869,10 @@ void GtkSalFrame::EndExtTextInput( sal_uInt16 nFlags ) m_pIMHandler->endExtTextInput( nFlags ); } -sal_Bool GtkSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) +bool GtkSalFrame::MapUnicodeToKeyCode( sal_Unicode , LanguageType , KeyCode& ) { // not supported yet - return sal_False; + return false; } LanguageType GtkSalFrame::GetInputLanguage() @@ -3898,7 +3898,7 @@ void GtkSalFrame::signalStyleSet( GtkWidget*, GtkStyle* pPrevious, gpointer fram { // signalize theme changed for NWF caches // FIXME: should be called only once for a style change - GtkSalGraphics::bThemeChanged = sal_True; + GtkSalGraphics::bThemeChanged = true; } #endif } diff --git a/vcl/unx/gtk/window/gtksalmenu.cxx b/vcl/unx/gtk/window/gtksalmenu.cxx index 976465e74f91..258e1d97cfac 100644 --- a/vcl/unx/gtk/window/gtksalmenu.cxx +++ b/vcl/unx/gtk/window/gtksalmenu.cxx @@ -28,7 +28,7 @@ const sal_uInt16 START_ITEMID_WINDOWLIST = 4600; const sal_uInt16 END_ITEMID_WINDOWLIST = 4699; -static sal_Bool bMenuVisibility = sal_False; +static bool bMenuVisibility = false; /* * This function generates the proper command name for all actions, including @@ -271,7 +271,7 @@ void GtkSalMenu::ImplUpdate( gboolean bRecurse ) sal_Int32 nItem; for ( nItem = 0; nItem < ( sal_Int32 ) GetItemCount(); nItem++ ) { - if ( IsItemVisible( nItem ) == sal_False ) + if ( !IsItemVisible( nItem ) ) continue; GtkSalMenuItem *pSalMenuItem = GetItemAtPos( nItem ); @@ -384,7 +384,7 @@ void GtkSalMenu::UpdateFull() * GtkSalMenu */ -GtkSalMenu::GtkSalMenu( sal_Bool bMenuBar ) : +GtkSalMenu::GtkSalMenu( bool bMenuBar ) : mbMenuBar( bMenuBar ), mpVCLMenu( NULL ), mpOldSalMenu( NULL ), @@ -399,7 +399,7 @@ GtkSalMenu::~GtkSalMenu() { SolarMutexGuard aGuard; - if ( mbMenuBar == sal_True ) + if ( mbMenuBar ) { if ( mpMenuModel ) { @@ -411,7 +411,7 @@ GtkSalMenu::~GtkSalMenu() maItems.clear(); } -sal_Bool GtkSalMenu::VisibleMenuBar() +bool GtkSalMenu::VisibleMenuBar() { return bMenuVisibility; } @@ -713,7 +713,7 @@ void GtkSalMenu::Activate() void GtkSalMenu::Deactivate( const gchar* aMenuCommand ) { - if ( mbMenuBar == sal_False ) + if ( !mbMenuBar ) return; GtkSalMenu* pSalSubMenu = GetMenuForItemCommand( (gchar*) aMenuCommand, TRUE ); @@ -724,23 +724,23 @@ void GtkSalMenu::Deactivate( const gchar* aMenuCommand ) } } -void GtkSalMenu::Display( sal_Bool bVisible ) +void GtkSalMenu::Display( bool bVisible ) { - if ( mbMenuBar == sal_False || mpVCLMenu == NULL ) + if ( !mbMenuBar || mpVCLMenu == NULL ) return; bMenuVisibility = bVisible; - sal_Bool bVCLMenuVisible = ( bVisible == sal_True ) ? sal_False : sal_True; + bool bVCLMenuVisible = ( bVisible ) ? sal_False : sal_True; MenuBar* pMenuBar = static_cast< MenuBar* >( mpVCLMenu ); pMenuBar->SetDisplayable( bVCLMenuVisible ); } -sal_Bool GtkSalMenu::IsItemVisible( unsigned nPos ) +bool GtkSalMenu::IsItemVisible( unsigned nPos ) { SolarMutexGuard aGuard; - sal_Bool bVisible = sal_False; + bool bVisible = false; if ( nPos < maItems.size() ) bVisible = ( ( GtkSalMenuItem* ) maItems[ nPos ])->mbVisible; @@ -789,7 +789,7 @@ void GtkSalMenu::GetSystemMenuData( SystemMenuData* ) GtkSalMenuItem::GtkSalMenuItem( const SalItemParams* pItemData ) : mnId( pItemData->nId ), mnType( pItemData->eType ), - mbVisible( sal_True ), + mbVisible( true ), mpVCLMenu( pItemData->pMenu ), mpParentMenu( NULL ), mpSubMenu( NULL ) diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index e91c748196cd..6ba0ec33145b 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -396,7 +396,7 @@ void GtkSalGraphics::PaintScrollbar(GtkStyleContext *context, thumbRect.Move( (scrollbarRect.GetWidth() - slider_width) / 2, 0 ); } - sal_Bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 ); + bool has_slider = ( thumbRect.GetWidth() > 0 && thumbRect.GetHeight() > 0 ); // ----------------- TROUGH gtk_style_context_save(context); @@ -785,7 +785,7 @@ void GtkSalGraphics::PaintCheckOrRadio(GtkStyleContext *context, gtk_render_option(context, cr, x, y, indicator_size, indicator_size); } -sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, +bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& ) { @@ -823,7 +823,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart renderType = RENDER_COMBOBOX; break; default: - return sal_False; + return false; } break; case CTRL_MENU_POPUP: @@ -864,7 +864,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart context = mpToolButtonStyle; break; default: - return sal_False; + return false; } break; case CTRL_CHECKBOX: @@ -898,7 +898,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart } break; default: - return sal_False; + return false; } cairo_rectangle_int_t translatedRegion = { (int) rControlRegion.Left() - 1, (int) rControlRegion.Top() - 1, @@ -959,7 +959,7 @@ sal_Bool GtkSalGraphics::drawNativeControl( ControlType nType, ControlPart nPart renderAreaToPix(cr, &translatedRegion); cairo_destroy(cr); // unref - return sal_True; + return true; } // FIXME: This is incredibly lame ... but so is cairo's insistance on -exactly- @@ -1007,7 +1007,7 @@ void GtkSalGraphics::renderAreaToPix( cairo_t *cr, gtk_widget_queue_draw_area( mpFrame->getWindow(), ax, ay, awidth, aheight ); } -sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState, +bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState, const ImplControlValue&, const OUString&, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) { @@ -1099,13 +1099,13 @@ sal_Bool GtkSalGraphics::getNativeControlRegion( ControlType nType, ControlPart } else { - return sal_False; + return false; } rNativeBoundingRegion = aEditRect; rNativeContentRegion = rNativeBoundingRegion; - return sal_True; + return true; } /************************************************************************ * helper for GtkSalFrame @@ -1197,8 +1197,8 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) } // menu disabled entries handling - aStyleSet.SetSkipDisabledInMenus( sal_True ); - aStyleSet.SetAcceleratorsInContextMenus( sal_False ); + aStyleSet.SetSkipDisabledInMenus( true ); + aStyleSet.SetAcceleratorsInContextMenus( false ); // menu colors gtk_style_context_get_background_color( mpMenuStyle, GTK_STATE_FLAG_NORMAL, &background_color ); @@ -1439,7 +1439,7 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) } -sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) +bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) { if( (nType == CTRL_EDITBOX) || @@ -1463,12 +1463,12 @@ sal_Bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPar (nType == CTRL_MENU_POPUP && ((nPart == PART_MENU_ITEM_CHECK_MARK) || (nPart == PART_MENU_ITEM_RADIO_MARK) || (nPart == PART_MENU_SEPARATOR) || (nPart == PART_MENU_SUBMENU_ARROW)))) - return sal_True; + return true; printf( "Unhandled is native supported for Type: %d, Part %d\n", (int)nType, (int)nPart ); - return sal_False; + return false; } void GtkData::initNWF() {} diff --git a/vcl/unx/kde/UnxCommandThread.cxx b/vcl/unx/kde/UnxCommandThread.cxx index d281949f6e37..4d63289e908d 100644 --- a/vcl/unx/kde/UnxCommandThread.cxx +++ b/vcl/unx/kde/UnxCommandThread.cxx @@ -43,7 +43,7 @@ UnxFilePickerCommandThread::~UnxFilePickerCommandThread() { } -sal_Bool SAL_CALL UnxFilePickerCommandThread::result() +bool SAL_CALL UnxFilePickerCommandThread::result() { ::osl::MutexGuard aGuard( m_aMutex ); @@ -115,10 +115,10 @@ void SAL_CALL UnxFilePickerCommandThread::run() sal_Char *pWhereToRead = pBuffer; sal_Char *pEntryBegin = pBuffer; sal_Int32 nBytesRead = 0; - sal_Bool bShouldExit = sal_False; + bool bShouldExit = false; while ( !bShouldExit && ( nBytesRead = read( m_nReadFD, pWhereToRead, pBufferEnd - pWhereToRead ) ) > 0 ) { - sal_Bool bFoundNL = sal_False; + bool bFoundNL = false; sal_Char *pWhereToReadEnd = pWhereToRead + nBytesRead; sal_Char *pEntryEnd = pWhereToRead; do { @@ -127,11 +127,11 @@ void SAL_CALL UnxFilePickerCommandThread::run() if ( pEntryEnd < pWhereToReadEnd ) { - bFoundNL = sal_True; + bFoundNL = true; *pEntryEnd = 0; if ( strcmp( pEntryBegin, "exited" ) == 0 ) - bShouldExit = sal_True; + bShouldExit = true; else handleCommand( OUString( pEntryBegin, pEntryEnd - pEntryBegin, RTL_TEXTENCODING_UTF8 )/*, bQuit*/ ); @@ -181,12 +181,12 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const OUString &rComman if ( aCommandName == "accept" ) { - m_aResult = sal_True; + m_aResult = true; m_aExecCondition.set(); } else if ( aCommandName == "reject" ) { - m_aResult = sal_False; + m_aResult = false; m_aExecCondition.set(); } else if ( aCommandName == "fileSelectionChanged" ) @@ -210,7 +210,7 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const OUString &rComman if ( aType == "bool" ) { - sal_Bool bValue = !aList.empty() && aList.front().equalsIgnoreAsciiCase("true"); + bool bValue = !aList.empty() && aList.front().equalsIgnoreAsciiCase("true"); m_aGetValue <<= bValue; m_aGetValueCondition.set(); @@ -275,7 +275,7 @@ void SAL_CALL UnxFilePickerCommandThread::handleCommand( const OUString &rComman const sal_Unicode *pUnicode = rCommand.getStr(); const sal_Unicode *pEnd = pUnicode + rCommand.getLength(); - sal_Bool bQuoted = sal_False; + bool bQuoted = false; for ( ; pUnicode != pEnd; ++pUnicode ) { diff --git a/vcl/unx/kde/UnxCommandThread.hxx b/vcl/unx/kde/UnxCommandThread.hxx index b893eb3559d7..5a3670564abf 100644 --- a/vcl/unx/kde/UnxCommandThread.hxx +++ b/vcl/unx/kde/UnxCommandThread.hxx @@ -81,7 +81,7 @@ protected: ::osl::Mutex m_aMutex; YieldingCondition m_aExecCondition; - sal_Bool m_aResult; + bool m_aResult; ::osl::Condition m_aGetCurrentFilterCondition; OUString m_aGetCurrentFilter; @@ -100,7 +100,7 @@ public: ~UnxFilePickerCommandThread(); YieldingCondition& SAL_CALL execCondition() { return m_aExecCondition; } - sal_Bool SAL_CALL result(); + bool SAL_CALL result(); ::osl::Condition& SAL_CALL getCurrentFilterCondition() { return m_aGetCurrentFilterCondition; } OUString SAL_CALL getCurrentFilter(); diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx index dbf371d673a3..cfd5e3783b8f 100644 --- a/vcl/unx/kde/UnxFilePicker.cxx +++ b/vcl/unx/kde/UnxFilePicker.cxx @@ -21,6 +21,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp> +#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> #include <com/sun/star/ui/dialogs/ControlActions.hpp> @@ -171,7 +172,9 @@ sal_Int16 SAL_CALL UnxFilePicker::execute() m_pCommandThread->execCondition().wait(); - return m_pCommandThread->result(); + return m_pCommandThread->result() + ? css::ui::dialogs::ExecutableDialogResults::OK + : css::ui::dialogs::ExecutableDialogResults::CANCEL; } void SAL_CALL UnxFilePicker::setMultiSelectionMode( sal_Bool bMode ) @@ -326,7 +329,7 @@ void SAL_CALL UnxFilePicker::setValue( sal_Int16 nControlId, sal_Int16 nControlA if ( aType == "checkbox" ) { - sal_Bool bControlValue; + bool bControlValue; if ( ( rValue >>= bControlValue ) && bControlValue ) aBuffer.appendAscii( " true" ); else @@ -808,7 +811,7 @@ void UnxFilePicker::appendEscaped( OUStringBuffer &rBuffer, const OUString &rStr rBuffer.appendAscii( "\"", 1 ); } -sal_Bool UnxFilePicker::controlIdInfo( sal_Int16 nControlId, OUString &rType, sal_Int32 &rTitleId ) +bool UnxFilePicker::controlIdInfo( sal_Int16 nControlId, OUString &rType, sal_Int32 &rTitleId ) { typedef struct { sal_Int16 nId; @@ -856,13 +859,13 @@ sal_Bool UnxFilePicker::controlIdInfo( sal_Int16 nControlId, OUString &rType, sa rType = *(pPtr->pType); rTitleId = pPtr->nTitle; - return sal_True; + return true; } - return sal_False; + return false; } -sal_Bool UnxFilePicker::controlActionInfo( sal_Int16 nControlAction, OUString &rType ) +bool UnxFilePicker::controlActionInfo( sal_Int16 nControlAction, OUString &rType ) { typedef struct { sal_Int16 nId; @@ -890,7 +893,7 @@ sal_Bool UnxFilePicker::controlActionInfo( sal_Int16 nControlAction, OUString &r rType = pPtr->pType; - return sal_True; + return true; } void UnxFilePicker::sendAppendControlCommand( sal_Int16 nControlId ) diff --git a/vcl/unx/kde/UnxFilePicker.hxx b/vcl/unx/kde/UnxFilePicker.hxx index 3459e64a7476..58aec56647e4 100644 --- a/vcl/unx/kde/UnxFilePicker.hxx +++ b/vcl/unx/kde/UnxFilePicker.hxx @@ -162,8 +162,8 @@ protected: void appendEscaped( OUStringBuffer &rBuffer, const OUString &rString ); private: - sal_Bool controlIdInfo( sal_Int16 nControlId, OUString &rType, sal_Int32 &rTitleId ); - sal_Bool controlActionInfo( sal_Int16 nControlId, OUString &rType ); + bool controlIdInfo( sal_Int16 nControlId, OUString &rType, sal_Int32 &rTitleId ); + bool controlActionInfo( sal_Int16 nControlId, OUString &rType ); void sendAppendControlCommand( sal_Int16 nControlId ); }; diff --git a/vcl/unx/kde/UnxNotifyThread.cxx b/vcl/unx/kde/UnxNotifyThread.cxx index ad838405639b..60eb14933082 100644 --- a/vcl/unx/kde/UnxNotifyThread.cxx +++ b/vcl/unx/kde/UnxNotifyThread.cxx @@ -28,7 +28,7 @@ using namespace ::com::sun::star; UnxFilePickerNotifyThread::UnxFilePickerNotifyThread( UnxFilePicker *pUnxFilePicker ) : m_pUnxFilePicker( pUnxFilePicker ), - m_bExit( sal_False ), + m_bExit( false ), m_eNotifyType( Nothing ), m_nControlId( 0 ) { @@ -54,7 +54,7 @@ void SAL_CALL UnxFilePickerNotifyThread::exit() { ::osl::MutexGuard aGuard( m_aMutex ); - m_bExit = sal_True; + m_bExit = true; m_aExitCondition.reset(); m_aNotifyCondition.set(); diff --git a/vcl/unx/kde/UnxNotifyThread.hxx b/vcl/unx/kde/UnxNotifyThread.hxx index a4529453f94e..993bcd61c6c6 100644 --- a/vcl/unx/kde/UnxNotifyThread.hxx +++ b/vcl/unx/kde/UnxNotifyThread.hxx @@ -45,7 +45,7 @@ protected: ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener > m_xListener; - sal_Bool m_bExit; + bool m_bExit; ::osl::Condition m_aExitCondition; NotifyType m_eNotifyType; diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx index 8d458e56c055..86096366d563 100644 --- a/vcl/unx/kde/salnativewidgets-kde.cxx +++ b/vcl/unx/kde/salnativewidgets-kde.cxx @@ -270,7 +270,7 @@ class WidgetPainter @param gc The graphics context. */ - sal_Bool drawStyledWidget( QWidget *pWidget, + bool drawStyledWidget( QWidget *pWidget, ControlState nState, const ImplControlValue& aValue, Display *dpy, XLIB_Window drawable, SalX11Screen nXScreen, int nDepth, GC gc, @@ -284,7 +284,7 @@ class WidgetPainter @return valid push button. */ - QPushButton *pushButton( const Rectangle& rControlRegion, sal_Bool bDefault ); + QPushButton *pushButton( const Rectangle& rControlRegion, bool bDefault ); /** 'Get' method for radio button. @@ -305,7 +305,7 @@ class WidgetPainter @see pushButton(), m_pEditableComboBox */ - QComboBox *comboBox( const Rectangle& rControlRegion, sal_Bool bEditable ); + QComboBox *comboBox( const Rectangle& rControlRegion, bool bEditable ); /** 'Get' method for line edit box. @@ -342,13 +342,13 @@ class WidgetPainter @see pushButton() */ QScrollBar *scrollBar( const Rectangle& rControlRegion, - sal_Bool bHorizontal, const ImplControlValue& aValue ); + bool bHorizontal, const ImplControlValue& aValue ); /** 'Get' method for tool bar. @see pushButton() */ - QToolBar *toolBar( const Rectangle& rControlRegion, sal_Bool bHorizontal ); + QToolBar *toolBar( const Rectangle& rControlRegion, bool bHorizontal ); /** 'Get' method for tool button. @@ -463,13 +463,13 @@ WidgetPainter::~WidgetPainter( void ) delete m_pProgressBar, m_pProgressBar = NULL; } -sal_Bool WidgetPainter::drawStyledWidget( QWidget *pWidget, +bool WidgetPainter::drawStyledWidget( QWidget *pWidget, ControlState nState, const ImplControlValue& aValue, Display *dpy, XLIB_Window drawable, SalX11Screen nXScreen, int nDepth, GC gc, ControlPart nPart ) { if ( !pWidget ) - return sal_False; + return false; // Normalize the widget QPoint qWidgetPos( pWidget->pos() ); @@ -625,7 +625,7 @@ sal_Bool WidgetPainter::drawStyledWidget( QWidget *pWidget, pTab = m_pTabMiddle; } if ( !pTab ) - return sal_False; + return false; pTab->setRect( qRect ); @@ -817,7 +817,7 @@ sal_Bool WidgetPainter::drawStyledWidget( QWidget *pWidget, pWidget->colorGroup(), nStyle ); } else - return sal_False; + return false; // Bitblt it to the screen X11SalGraphics::CopyScreenArea( @@ -830,11 +830,11 @@ sal_Bool WidgetPainter::drawStyledWidget( QWidget *pWidget, // Restore widget's position pWidget->move( qWidgetPos ); - return sal_True; + return true; } QPushButton *WidgetPainter::pushButton( const Rectangle& rControlRegion, - sal_Bool bDefault ) + bool bDefault ) { if ( !m_pPushButton ) m_pPushButton = new QPushButton( NULL, "push_button" ); @@ -929,7 +929,7 @@ QCheckBox *WidgetPainter::checkBox( const Rectangle& rControlRegion ) } QComboBox *WidgetPainter::comboBox( const Rectangle& rControlRegion, - sal_Bool bEditable ) + bool bEditable ) { QComboBox *pComboBox = NULL; if ( bEditable ) @@ -1041,7 +1041,7 @@ QListView *WidgetPainter::listView( const Rectangle& rControlRegion ) } QScrollBar *WidgetPainter::scrollBar( const Rectangle& rControlRegion, - sal_Bool bHorizontal, const ImplControlValue& aValue ) + bool bHorizontal, const ImplControlValue& aValue ) { if ( !m_pScrollBar ) { @@ -1068,7 +1068,7 @@ QScrollBar *WidgetPainter::scrollBar( const Rectangle& rControlRegion, return m_pScrollBar; } -QToolBar *WidgetPainter::toolBar( const Rectangle& rControlRegion, sal_Bool bHorizontal ) +QToolBar *WidgetPainter::toolBar( const Rectangle& rControlRegion, bool bHorizontal ) { if ( !m_pMainWindow ) m_pMainWindow = new QMainWindow( NULL, "main_window" ); @@ -1209,15 +1209,15 @@ class KDESalGraphics : public X11SalGraphics public: KDESalGraphics() {} virtual ~KDESalGraphics() {} - virtual sal_Bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); - virtual sal_Bool hitTestNativeControl( ControlType nType, ControlPart nPart, + virtual bool IsNativeControlSupported( ControlType nType, ControlPart nPart ); + virtual bool hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) SAL_OVERRIDE; - virtual sal_Bool drawNativeControl( ControlType nType, ControlPart nPart, + virtual bool drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption ); - virtual sal_Bool getNativeControlRegion( ControlType nType, ControlPart nPart, + virtual bool getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& aCaption, @@ -1235,7 +1235,7 @@ class KDESalGraphics : public X11SalGraphics @return sal_True if the platform supports native drawing of the widget nType defined by nPart. */ -sal_Bool KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) +bool KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) { return ( (nType == CTRL_PUSHBUTTON) && (nPart == PART_ENTIRE_CONTROL) ) || @@ -1270,7 +1270,7 @@ sal_Bool KDESalGraphics::IsNativeControlSupported( ControlType nType, ControlPar aPos was or was not inside the native widget specified by the nType/nPart combination. */ -sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, +bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& rPos, bool& rIsInside ) { @@ -1280,7 +1280,7 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP Point aPos = rPos - rControlRegion.TopLeft(); rIsInside = false; - sal_Bool bHorizontal = ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT ); + bool bHorizontal = ( nPart == PART_BUTTON_LEFT || nPart == PART_BUTTON_RIGHT ); QScrollBar *pScrollBar = pWidgetPainter->scrollBar( rControlRegion, bHorizontal, ImplControlValue() ); @@ -1290,10 +1290,10 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddLine ); // There are 2 buttons on the right/bottom side of the scrollbar - sal_Bool bTwoSubButtons = sal_False; + bool bTwoSubButtons = false; // It is a Platinum style scroll bar - sal_Bool bPlatinumStyle = sal_False; + bool bPlatinumStyle = false; // Workaround for Platinum and 3 button style scroll bars. // It makes the right/down button bigger. @@ -1303,9 +1303,9 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddPage ).right() + 1 ); if ( qRectAddLine.width() > qRectSubLine.width() ) - bTwoSubButtons = sal_True; + bTwoSubButtons = true; if ( qRectSubLine.left() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).left() ) - bPlatinumStyle = sal_True; + bPlatinumStyle = true; } else { @@ -1313,9 +1313,9 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarAddPage ).bottom() + 1 ); if ( qRectAddLine.height() > qRectSubLine.height() ) - bTwoSubButtons = sal_True; + bTwoSubButtons = true; if ( qRectSubLine.top() > kapp->style().querySubControlMetrics( QStyle::CC_ScrollBar, pScrollBar, QStyle::SC_ScrollBarSubPage ).top() ) - bPlatinumStyle = sal_True; + bPlatinumStyle = true; } switch ( nPart ) @@ -1356,13 +1356,13 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP // cases PART_TRACK_HORZ_AREA and PART_TRACK_VERT_AREA default: - return sal_False; + return false; } - return sal_True; + return true; } - return sal_False; + return false; } @@ -1377,12 +1377,12 @@ sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nP @param aCaption A caption or title string (like button text etc.) */ -sal_Bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, +bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue& aValue, const OUString& ) { - sal_Bool bReturn = sal_False; + bool bReturn = false; Display *dpy = GetXDisplay(); XLIB_Window drawable = GetDrawable(); @@ -1412,7 +1412,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart else if ( (nType == CTRL_COMBOBOX) && (nPart == PART_ENTIRE_CONTROL) ) { bReturn = pWidgetPainter->drawStyledWidget( - pWidgetPainter->comboBox( rControlRegion, sal_True ), + pWidgetPainter->comboBox( rControlRegion, true ), nState, aValue, dpy, drawable, GetScreenNumber(), GetVisual().GetDepth(), gc ); } @@ -1426,7 +1426,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart else if ( (nType == CTRL_LISTBOX) && (nPart == PART_ENTIRE_CONTROL) ) { bReturn = pWidgetPainter->drawStyledWidget( - pWidgetPainter->comboBox( rControlRegion, sal_False ), + pWidgetPainter->comboBox( rControlRegion, false ), nState, aValue, dpy, drawable, GetScreenNumber(), GetVisual().GetDepth(), gc ); } @@ -1521,13 +1521,13 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType nType, ControlPart nPart @param aCaption A caption or title string (like button text etc.) */ -sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, +bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, ControlState nState, const ImplControlValue&, const OUString&, Rectangle &rNativeBoundingRegion, Rectangle &rNativeContentRegion ) { - sal_Bool bReturn = sal_False; + bool bReturn = false; QRect qBoundingRect = WidgetPainter::region2QRect( rControlRegion ); QRect qRect; @@ -1549,7 +1549,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart QStyle::PM_ButtonDefaultIndicator, pWidget ); qBoundingRect.addCoords( -nIndicatorSize, -nIndicatorSize, nIndicatorSize, nIndicatorSize ); - bReturn = sal_True; + bReturn = true; } break; } @@ -1564,7 +1564,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart qRect.setWidth( kapp->style().pixelMetric( QStyle::PM_ExclusiveIndicatorWidth, pWidget ) ); qRect.setHeight( kapp->style().pixelMetric( QStyle::PM_ExclusiveIndicatorHeight, pWidget ) ); - bReturn = sal_True; + bReturn = true; } break; @@ -1577,7 +1577,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart qRect.setWidth( kapp->style().pixelMetric( QStyle::PM_IndicatorWidth, pWidget ) ); qRect.setHeight( kapp->style().pixelMetric( QStyle::PM_IndicatorHeight, pWidget ) ); - bReturn = sal_True; + bReturn = true; } break; @@ -1594,14 +1594,14 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart QStyle::CC_ComboBox, pWidget, QStyle::SC_ComboBoxEditField ).right() + 1 ); qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); - bReturn = sal_True; + bReturn = true; break; case PART_SUB_EDIT: qRect = kapp->style().querySubControlMetrics( QStyle::CC_ComboBox, pWidget, QStyle::SC_ComboBoxEditField ); qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); - bReturn = sal_True; + bReturn = true; break; } break; @@ -1614,14 +1614,14 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart case PART_BUTTON_UP: qRect = kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetUp ); - bReturn = sal_True; + bReturn = true; qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); break; case PART_BUTTON_DOWN: qRect = kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetDown ); - bReturn = sal_True; + bReturn = true; qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); break; @@ -1629,7 +1629,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart qRect = kapp->style().querySubControlMetrics( QStyle::CC_SpinWidget, pWidget, QStyle::SC_SpinWidgetEditField ); qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); - bReturn = sal_True; + bReturn = true; break; } break; @@ -1671,7 +1671,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); - bReturn = sal_True; + bReturn = true; break; case PART_BUTTON_RIGHT: @@ -1692,7 +1692,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType nType, ControlPart qRect.moveBy( qBoundingRect.left(), qBoundingRect.top() ); - bReturn = sal_True; + bReturn = true; break; } break; @@ -1962,7 +1962,7 @@ void KDESalFrame::UpdateSettings( AllSettings& rSettings ) qMainWindow.createGUI( "/dev/null" ); // hack // Menu - aStyleSettings.SetSkipDisabledInMenus( sal_True ); + aStyleSettings.SetSkipDisabledInMenus( true ); KMenuBar *pMenuBar = qMainWindow.menuBar(); if ( pMenuBar ) { diff --git a/vcl/unx/kde4/KDE4FilePicker.hxx b/vcl/unx/kde4/KDE4FilePicker.hxx index 6dc97df86cc2..7c29af7a1fee 100644 --- a/vcl/unx/kde4/KDE4FilePicker.hxx +++ b/vcl/unx/kde4/KDE4FilePicker.hxx @@ -152,7 +152,7 @@ private Q_SLOTS: sal_Int16 executeSlot() throw( ::com::sun::star::uno::RuntimeException ) { return execute(); } // XFilePicker functions - void setMultiSelectionModeSlot( sal_Bool bMode ) throw( ::com::sun::star::uno::RuntimeException ) { return setMultiSelectionMode( bMode ); } + void setMultiSelectionModeSlot( bool bMode ) throw( ::com::sun::star::uno::RuntimeException ) { return setMultiSelectionMode( bMode ); } void setDefaultNameSlot( const OUString &rName ) throw( ::com::sun::star::uno::RuntimeException ) { return setDefaultName( rName ); } void setDisplayDirectorySlot( const OUString &rDirectory ) throw( ::com::sun::star::uno::RuntimeException ) { return setDisplayDirectory( rDirectory ); } OUString getDisplayDirectorySlot() throw( ::com::sun::star::uno::RuntimeException ) { return getDisplayDirectory(); } @@ -169,7 +169,7 @@ private Q_SLOTS: // XFilePickerControlAccess functions void setValueSlot( sal_Int16 nControlId, sal_Int16 nControlAction, const ::com::sun::star::uno::Any &rValue ) throw (::com::sun::star::uno::RuntimeException) { return setValue( nControlId, nControlAction, rValue ); } ::com::sun::star::uno::Any getValueSlot( sal_Int16 nControlId, sal_Int16 nControlAction ) throw (::com::sun::star::uno::RuntimeException) { return getValue( nControlId, nControlAction ); } - void enableControlSlot( sal_Int16 nControlId, sal_Bool bEnable ) throw( ::com::sun::star::uno::RuntimeException ) { return enableControl( nControlId, bEnable ); } + void enableControlSlot( sal_Int16 nControlId, bool bEnable ) throw( ::com::sun::star::uno::RuntimeException ) { return enableControl( nControlId, bEnable ); } void setLabelSlot( sal_Int16 nControlId, const OUString &rLabel ) throw (::com::sun::star::uno::RuntimeException) { return setLabel( nControlId, rLabel ); } OUString getLabelSlot( sal_Int16 nControlId ) throw (::com::sun::star::uno::RuntimeException) { return getLabel( nControlId ); } @@ -185,7 +185,7 @@ Q_SIGNALS: sal_Int16 executeSignal(); // XFilePicker functions - void setMultiSelectionModeSignal( sal_Bool bMode ); + void setMultiSelectionModeSignal( bool bMode ); void setDefaultNameSignal( const OUString &rName ); void setDisplayDirectorySignal( const OUString &rDirectory ); OUString getDisplayDirectorySignal(); @@ -202,7 +202,7 @@ Q_SIGNALS: // XFilePickerControlAccess functions void setValueSignal( sal_Int16 nControlId, sal_Int16 nControlAction, const ::com::sun::star::uno::Any &rValue ); ::com::sun::star::uno::Any getValueSignal( sal_Int16 nControlId, sal_Int16 nControlAction ); - void enableControlSignal( sal_Int16 nControlId, sal_Bool bEnable ); + void enableControlSignal( sal_Int16 nControlId, bool bEnable ); void setLabelSignal( sal_Int16 nControlId, const OUString &rLabel ); OUString getLabelSignal( sal_Int16 nControlId ); diff --git a/vcl/unx/kde4/KDESalGraphics.cxx b/vcl/unx/kde4/KDESalGraphics.cxx index abee781cab1b..a1fa6fd280fc 100644 --- a/vcl/unx/kde4/KDESalGraphics.cxx +++ b/vcl/unx/kde4/KDESalGraphics.cxx @@ -88,7 +88,7 @@ KDESalGraphics::~KDESalGraphics() delete m_image; } -sal_Bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part ) +bool KDESalGraphics::IsNativeControlSupported( ControlType type, ControlPart part ) { if (type == CTRL_PUSHBUTTON) return true; @@ -242,7 +242,7 @@ static QRegion XRegionToQRegion( XLIB_Region xr ) } #endif -sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, +bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, const Rectangle& rControlRegion, ControlState nControlState, const ImplControlValue& value, const OUString& ) @@ -256,7 +256,7 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, return false; } - sal_Bool returnVal = true; + bool returnVal = true; QRect widgetRect = region2QRect(rControlRegion); if( type == CTRL_SPINBOX && part == PART_ALL_BUTTONS ) @@ -672,13 +672,13 @@ sal_Bool KDESalGraphics::drawNativeControl( ControlType type, ControlPart part, return returnVal; } -sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, +bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart part, const Rectangle& controlRegion, ControlState controlState, const ImplControlValue& val, const OUString&, Rectangle &nativeBoundingRegion, Rectangle &nativeContentRegion ) { - sal_Bool retVal = false; + bool retVal = false; QRect boundingRect = region2QRect( controlRegion ); QRect contentRect = boundingRect; @@ -950,7 +950,7 @@ sal_Bool KDESalGraphics::getNativeControlRegion( ControlType type, ControlPart p aPos was or was not inside the native widget specified by the nType/nPart combination. */ -sal_Bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, +bool KDESalGraphics::hitTestNativeControl( ControlType nType, ControlPart nPart, const Rectangle& rControlRegion, const Point& rPos, bool& rIsInside ) { diff --git a/vcl/unx/kde4/KDESalGraphics.hxx b/vcl/unx/kde4/KDESalGraphics.hxx index 0fce28980a74..d865d43204e7 100644 --- a/vcl/unx/kde4/KDESalGraphics.hxx +++ b/vcl/unx/kde4/KDESalGraphics.hxx @@ -43,14 +43,14 @@ class KDESalGraphics : public X11SalGraphics @param part Specification of the widget's part if it consists of more than one. @return true if the platform supports native drawing of the widget type defined by part. */ - virtual sal_Bool IsNativeControlSupported( ControlType type, ControlPart part ); + virtual bool IsNativeControlSupported( ControlType type, ControlPart part ); /** Test whether the position is in the native widget. If the return value is TRUE, bIsInside contains information whether aPos was or was not inside the native widget specified by the type/part combination. */ - virtual sal_Bool hitTestNativeControl( ControlType type, ControlPart part, + virtual bool hitTestNativeControl( ControlType type, ControlPart part, const Rectangle& rControlRegion, const Point& aPos, bool& rIsInside ) SAL_OVERRIDE; /** Draw the requested control described by part/nControlState. @@ -64,7 +64,7 @@ class KDESalGraphics : public X11SalGraphics @param aCaption A caption or title string (like button text etc.) */ - virtual sal_Bool drawNativeControl( ControlType type, ControlPart part, + virtual bool drawNativeControl( ControlType type, ControlPart part, const Rectangle& rControlRegion, ControlState nControlState, const ImplControlValue& aValue, const OUString& aCaption ); @@ -86,7 +86,7 @@ class KDESalGraphics : public X11SalGraphics @param aCaption A caption or title string (like button text etc.) */ - virtual sal_Bool getNativeControlRegion( ControlType type, ControlPart part, + virtual bool getNativeControlRegion( ControlType type, ControlPart part, const Rectangle& rControlRegion, ControlState nControlState, const ImplControlValue& aValue, const OUString& aCaption, |