summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sc/source/filter/excel/xehelper.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97rec.cxx2
-rw-r--r--sc/source/ui/drawfunc/drtxtob.cxx2
-rw-r--r--sc/source/ui/pagedlg/tphfedit.cxx2
-rw-r--r--sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx2
-rw-r--r--sc/source/ui/vba/vbarange.cxx6
-rw-r--r--sc/source/ui/vba/vbaworksheets.cxx2
-rw-r--r--sc/source/ui/view/formatsh.cxx66
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx4
9 files changed, 43 insertions, 45 deletions
diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx
index 2e6b4cf54fdb..8951e130fbe5 100644
--- a/sc/source/filter/excel/xehelper.cxx
+++ b/sc/source/filter/excel/xehelper.cxx
@@ -1040,7 +1040,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const
}
else if( SC_MATVAL_BOOLEAN == nMatVal.nType )
{
- sal_Int8 nBool = nMatVal.GetBoolean();
+ sal_Int8 nBool = sal_Int8(nMatVal.GetBoolean());
rStrm.SetSliceSize( 9 );
rStrm << EXC_CACHEDVAL_BOOL << nBool;
rStrm.WriteZeroBytes( 7 );
diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx
index 49f49bb4c537..88f722e316e4 100644
--- a/sc/source/filter/xcl97/xcl97rec.cxx
+++ b/sc/source/filter/xcl97/xcl97rec.cxx
@@ -556,7 +556,7 @@ VmlCommentExporter::VmlCommentExporter( sax_fastparser::FSHelperPtr p, ScAddress
void VmlCommentExporter::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect )
{
lcl_FillProps( rProps, mpCaption, mbVisible );
- rProps.AddOpt( ESCHER_Prop_fHidden, mbVisible ); // bool field
+ rProps.AddOpt( ESCHER_Prop_fHidden, sal_uInt32(mbVisible) ); // bool field
// shadow property value for comment ( set in lcl_FillProps [*] ) has been
// overwritten by new value ( 0x20000 ) in the generic part of the export
diff --git a/sc/source/ui/drawfunc/drtxtob.cxx b/sc/source/ui/drawfunc/drtxtob.cxx
index e4bafb00f6a4..2bb945f9c378 100644
--- a/sc/source/ui/drawfunc/drtxtob.cxx
+++ b/sc/source/ui/drawfunc/drtxtob.cxx
@@ -1254,7 +1254,7 @@ void ScDrawTextObjectBar::GetStatePropPanelAttr(SfxItemSet &rSet)
if(SFX_ITEM_DONTCARE != eVState)
{
SdrTextVertAdjust eTVA = (SdrTextVertAdjust)((const SdrTextVertAdjustItem&)aEditAttr.Get(SDRATTR_TEXT_VERTADJUST)).GetValue();
- sal_Bool bSet = nSlotId == (SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
+ sal_Bool bSet = (nSlotId == SID_TABLE_VERT_NONE && eTVA == SDRTEXTVERTADJUST_TOP) ||
(nSlotId == SID_TABLE_VERT_CENTER && eTVA == SDRTEXTVERTADJUST_CENTER) ||
(nSlotId == SID_TABLE_VERT_BOTTOM && eTVA == SDRTEXTVERTADJUST_BOTTOM);
rSet.Put(SfxBoolItem(nSlotId, bSet));
diff --git a/sc/source/ui/pagedlg/tphfedit.cxx b/sc/source/ui/pagedlg/tphfedit.cxx
index c0ec88091b8d..22ac0d4c92fd 100644
--- a/sc/source/ui/pagedlg/tphfedit.cxx
+++ b/sc/source/ui/pagedlg/tphfedit.cxx
@@ -368,7 +368,7 @@ ScExtIButton::ScExtIButton(Window* pParent, WinBits nBits )
{
nSelected=0;
aTimer.SetTimeout(600);
- SetDropDown( true);
+ SetDropDown(PUSHBUTTON_DROPDOWN_TOOLBOX);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeScExtIButton(Window *pParent, VclBuilder::stringmap &)
diff --git a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
index 34b823b48afa..00dc4d0641a4 100644
--- a/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
+++ b/sc/source/ui/sidebar/CellAppearancePropertyPanel.cxx
@@ -359,7 +359,7 @@ IMPL_LINK(CellAppearancePropertyPanel, CBOXGridShowClkHdl, void*, EMPTYARG)
{
bool bState = mpCBXShowGrid->IsChecked();
SfxBoolItem aItem( SID_SCGRIDSHOW , bState);
- GetBindings()->GetDispatcher()->Execute(SID_SCGRIDSHOW, SFX_CALLMODE_RECORD, &aItem, false, 0L);
+ GetBindings()->GetDispatcher()->Execute(SID_SCGRIDSHOW, SFX_CALLMODE_RECORD, &aItem, 0L);
return 0;
}
diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index e5c6b4961065..a474fffe692a 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -5638,7 +5638,7 @@ ScVbaRange::getServiceNames()
sal_Bool SAL_CALL
ScVbaRange::hasError() throw (uno::RuntimeException)
{
- double dResult = false;
+ double dResult = 0.0;
uno::Reference< excel::XApplication > xApplication( Application(), uno::UNO_QUERY_THROW );
uno::Reference< script::XInvocation > xInvoc( xApplication->WorksheetFunction(), uno::UNO_QUERY_THROW );
@@ -5649,9 +5649,7 @@ ScVbaRange::hasError() throw (uno::RuntimeException)
uno::Sequence< sal_Int16 > OutParamIndex;
uno::Sequence< uno::Any > OutParam;
xInvoc->invoke( FunctionName, Params, OutParamIndex, OutParam ) >>= dResult;
- if ( dResult > 0.0 )
- return sal_True;
- return false;
+ return dResult > 0.0;
}
namespace range
diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx
index 0eb7c4af24b4..4830e4401505 100644
--- a/sc/source/ui/vba/vbaworksheets.cxx
+++ b/sc/source/ui/vba/vbaworksheets.cxx
@@ -337,7 +337,7 @@ ScVbaWorksheets::getVisible() throw (uno::RuntimeException)
while ( xEnum->hasMoreElements() )
{
uno::Reference< excel::XWorksheet > xSheet( xEnum->nextElement(), uno::UNO_QUERY_THROW );
- if ( xSheet->getVisible() == false )
+ if ( xSheet->getVisible() == 0 )
{
bVisible = false;
break;
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index fdc054bbd202..3da636d842cf 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -497,12 +497,12 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
pTabViewShell->RemoveStyleSheetInUse( pStyleSheet );
pStylePool->Remove( pStyleSheet );
pTabViewShell->InvalidateAttribs();
- nRetMask = true;
+ nRetMask = sal_uInt16(true);
bAddUndo = true;
rReq.Done();
}
else
- nRetMask = false;
+ nRetMask = sal_uInt16(false);
}
break;
@@ -516,7 +516,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
rReq.Done();
}
else
- nRetMask = false;
+ nRetMask = sal_uInt16(false);
}
break;
@@ -659,7 +659,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
case SID_STYLE_DELETE:
{
- nRetMask = ( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( NULL != pStyleSheet );
if ( pStyleSheet )
{
if ( pDoc->RemovePageStyleInUse( pStyleSheet->GetName() ) )
@@ -680,7 +680,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_HIDE:
case SID_STYLE_SHOW:
{
- nRetMask = ( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( NULL != pStyleSheet );
if ( pStyleSheet )
{
pStyleSheet->SetHidden( nSlotId == SID_STYLE_HIDE );
@@ -693,7 +693,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_APPLY:
{
- nRetMask = ( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( NULL != pStyleSheet );
if ( pStyleSheet && !pScMod->GetIsWaterCan() )
{
ScUndoApplyPageStyle* pUndoAction = 0;
@@ -754,7 +754,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
aNewData.InitFromStyle( pStyleSheet );
bAddUndo = true;
rReq.Done();
- nRetMask = true;
+ nRetMask = sal_uInt16(true);
}
}
break;
@@ -1976,8 +1976,8 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
// rSet.Put( SvxColorItem( pLine ? pLine->GetColor() : Color(), SID_FRAME_LINECOLOR ) );
Color aCol = 0;
editeng::SvxBorderLine aLine(0,0,0,0);
- bool bCol = 0;
- bool bColDisable = 0, bStyleDisable = 0;
+ bool bCol = false;
+ bool bColDisable = false, bStyleDisable = false;
SvxBoxItem aBoxItem(ATTR_BORDER);
SvxBoxInfoItem aInfoItem(ATTR_BORDER_INNER);
@@ -1985,7 +1985,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
if( aBoxItem.GetTop() )
{
- bCol = 1;
+ bCol = true;
aCol = aBoxItem.GetTop()->GetColor() ;
aLine.SetColor(aCol);
aLine.SetWidth( aBoxItem.GetTop()->GetWidth());
@@ -1994,9 +1994,9 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
if( aBoxItem.GetBottom() )
{
- if(bCol == 0)
+ if(!bCol)
{
- bCol = 1;
+ bCol = true;
aCol = aBoxItem.GetBottom()->GetColor() ;
aLine.SetColor(aCol);
aLine.SetWidth( aBoxItem.GetBottom()->GetWidth());
@@ -2005,17 +2005,17 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
else
{
if(aCol != aBoxItem.GetBottom()->GetColor() )
- bColDisable = 1;
+ bColDisable = true;
if(!( aLine == *(aBoxItem.GetBottom())) )
- bStyleDisable = 1;
+ bStyleDisable = true;
}
}
if( aBoxItem.GetLeft() )
{
- if(bCol == 0)
+ if(!bCol)
{
- bCol = 1;
+ bCol = true;
aCol = aBoxItem.GetLeft()->GetColor() ;
aLine.SetColor(aCol);
aLine.SetWidth( aBoxItem.GetLeft()->GetWidth());
@@ -2024,17 +2024,17 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
else
{
if(aCol != aBoxItem.GetLeft()->GetColor() )
- bColDisable = 1;
+ bColDisable = true;
if(!( aLine == *(aBoxItem.GetLeft())) )
- bStyleDisable = 1;
+ bStyleDisable = true;
}
}
if( aBoxItem.GetRight() )
{
- if(bCol == 0)
+ if(!bCol)
{
- bCol = 1;
+ bCol = true;
aCol = aBoxItem.GetRight()->GetColor() ;
aLine.SetColor(aCol);
aLine.SetWidth( aBoxItem.GetRight()->GetWidth());
@@ -2043,17 +2043,17 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
else
{
if(aCol != aBoxItem.GetRight()->GetColor() )
- bColDisable = 1;
+ bColDisable = true;
if(!( aLine == *(aBoxItem.GetRight())) )
- bStyleDisable = 1;
+ bStyleDisable = true;
}
}
if( aInfoItem.GetVert())
{
- if(bCol == 0)
+ if(!bCol)
{
- bCol = 1;
+ bCol = true;
aCol = aInfoItem.GetVert()->GetColor() ;
aLine.SetColor(aCol);
aLine.SetWidth( aInfoItem.GetVert()->GetWidth());
@@ -2062,17 +2062,17 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
else
{
if(aCol != aInfoItem.GetVert()->GetColor() )
- bColDisable = 1;
+ bColDisable = true;
if(!( aLine == *(aInfoItem.GetVert())) )
- bStyleDisable = 1;
+ bStyleDisable = true;
}
}
if( aInfoItem.GetHori())
{
- if(bCol == 0)
+ if(!bCol)
{
- bCol = 1;
+ bCol = true;
aCol = aInfoItem.GetHori()->GetColor() ;
aLine.SetColor(aCol);
aLine.SetWidth( aInfoItem.GetHori()->GetWidth());
@@ -2081,9 +2081,9 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
else
{
if(aCol != aInfoItem.GetHori()->GetColor() )
- bColDisable = 1;
+ bColDisable = true;
if(!( aLine == *(aInfoItem.GetHori())) )
- bStyleDisable = 1;
+ bStyleDisable = true;
}
}
@@ -2094,8 +2094,8 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
|| !aInfoItem.IsValid( VALID_TOP )
|| !aInfoItem.IsValid( VALID_BOTTOM ) )
{
- bColDisable = 1;
- bStyleDisable = 1;
+ bColDisable = true;
+ bStyleDisable = true;
}
if(SID_FRAME_LINECOLOR == nWhich)
@@ -2106,7 +2106,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
rSet.Put( SvxColorItem(aCol, SID_FRAME_LINECOLOR ) );
rSet.InvalidateItem(SID_FRAME_LINECOLOR);
}
- else if( bCol == 0 && bColDisable == 0) // if no line available
+ else if( !bCol && !bColDisable) // if no line available
{
aCol = COL_AUTO;
rSet.Put( SvxColorItem(aCol, SID_FRAME_LINECOLOR ) );
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 601868432158..150e4b3f7a38 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -303,8 +303,8 @@ bool ScTabViewShell::PrepareClose(sal_Bool bUI)
if ( pFormShell )
{
- sal_uInt16 nRet = pFormShell->PrepareClose(bUI);
- if (nRet!=sal_True)
+ bool nRet = pFormShell->PrepareClose(bUI);
+ if (!nRet)
return nRet;
}
return SfxViewShell::PrepareClose(bUI);