binfilter/bf_forms/source/component/forms_imgprod.cxx | 4 +- binfilter/bf_sch/source/core/sch_chtmode2.cxx | 2 - binfilter/bf_sch/source/core/sch_chtmode3.cxx | 4 -- binfilter/bf_sch/source/core/sch_chtmode4.cxx | 4 +- binfilter/bf_sch/source/core/sch_chtmode9.cxx | 4 +- binfilter/bf_sch/source/core/sch_chtmodel.cxx | 4 +- binfilter/bf_sch/source/ui/app/sch_schopt.cxx | 7 +-- binfilter/bf_sch/source/ui/unoidl/sch_ChXChartAxis.cxx | 4 +- binfilter/bf_sch/source/ui/unoidl/sch_ChXChartData.cxx | 2 - binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx | 10 ++--- binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx | 6 +-- binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx | 18 ++++----- binfilter/bf_so3/source/persist/binddata.cxx | 4 +- binfilter/bf_so3/source/persist/transprt.cxx | 22 +++++------ binfilter/bf_svtools/source/items/svt_intitem.cxx | 6 +-- binfilter/bf_svtools/source/items1/svt_cintitem.cxx | 24 ++++++------- binfilter/bf_svtools/source/items1/svt_ctypeitm.cxx | 4 +- binfilter/bf_svtools/source/items1/svt_custritm.cxx | 2 - binfilter/bf_svtools/source/items1/svt_visitem.cxx | 2 - binfilter/inc/bf_svtools/ilstitem.hxx | 2 - 20 files changed, 65 insertions(+), 70 deletions(-)
New commits: commit 99e42be7c4afcff0177992aebe8de9559b7a5f45 Author: Thomas Arnhold <tho...@arnhold.org> Date: Fri May 4 06:15:30 2012 +0200 fdo#48253: Expand SAL_STATIC_CAST leftovers Change-Id: Ibda77aa3010928513bd7d0b57a1d1045343607b5 diff --git a/binfilter/bf_sch/source/core/sch_chtmode2.cxx b/binfilter/bf_sch/source/core/sch_chtmode2.cxx index 6dbbcc5..2bd471a 100644 --- a/binfilter/bf_sch/source/core/sch_chtmode2.cxx +++ b/binfilter/bf_sch/source/core/sch_chtmode2.cxx @@ -401,7 +401,7 @@ enum ChartStyleV0 /*N*/ if( bForceSolidLine ) /*N*/ { /*N*/ XLineStyle eLineStyle = -/*N*/ SAL_STATIC_CAST( const XLineStyleItem *, &(pSymbolAttr->Get( XATTR_LINESTYLE )) )->GetValue(); // bug in Win-C++ compiler: casting to pointer +/*N*/ (static_cast< const XLineStyleItem * >( &(pSymbolAttr->Get( XATTR_LINESTYLE )) ))->GetValue(); // bug in Win-C++ compiler: casting to pointer /*N*/ /*N*/ if( eLineStyle == XLINE_NONE ) /*N*/ { diff --git a/binfilter/bf_sch/source/core/sch_chtmode3.cxx b/binfilter/bf_sch/source/core/sch_chtmode3.cxx index 272021c..599d8a3 100644 --- a/binfilter/bf_sch/source/core/sch_chtmode3.cxx +++ b/binfilter/bf_sch/source/core/sch_chtmode3.cxx @@ -62,8 +62,6 @@ #define ITEMID_SIZE 0 #include <bf_svx/sizeitem.hxx> #endif -// header for SAL_STATIC_CAST -#include <sal/types.h> #include <bf_svx/xlnedit.hxx> #include <bf_svx/xlnstit.hxx> @@ -654,7 +652,7 @@ namespace binfilter { /*?*/ else // rectangle with border, if linesytle is NONE /*?*/ { /*?*/ XLineStyle eLineStyle = -/*?*/ SAL_STATIC_CAST( const XLineStyleItem *, &(rSymbolAttr.Get( XATTR_LINESTYLE )) )->GetValue(); // bug in Win-C++ compiler: casting to pointer +/*?*/ (static_cast< const XLineStyleItem * >( &(rSymbolAttr.Get( XATTR_LINESTYLE )) ))->GetValue(); // bug in Win-C++ compiler: casting to pointer /*?*/ /*?*/ if( eLineStyle == XLINE_NONE ) // clear items for defaults to take effect /*?*/ { diff --git a/binfilter/bf_sch/source/ui/app/sch_schopt.cxx b/binfilter/bf_sch/source/ui/app/sch_schopt.cxx index e1ddf98..89a5283 100644 --- a/binfilter/bf_sch/source/ui/app/sch_schopt.cxx +++ b/binfilter/bf_sch/source/ui/app/sch_schopt.cxx @@ -27,9 +27,6 @@ ************************************************************************/ #include <com/sun/star/uno/Sequence.hxx> -// header for SvStream -// header for SAL_STATIC_CAST -#include <sal/types.h> #include "schopt.hxx" @@ -66,7 +63,7 @@ using namespace ::com::sun::star; /*N*/ XColorEntry* SchColorTable::Get( ULONG nKey ) const /*N*/ { -/*N*/ return SAL_STATIC_CAST( XColorEntry*, Table::Get( nKey ) ); +/*N*/ return (static_cast< XColorEntry* >(Table::Get( nKey )) ); /*N*/ } /*N*/ Color SchColorTable::GetColor( ULONG nKey ) const @@ -145,7 +142,7 @@ using namespace ::com::sun::star; /*N*/ // set color values /*N*/ for( sal_Int32 i=0; i < nCount; i++ ) /*N*/ { -/*N*/ aCol.SetColor( SAL_STATIC_CAST( ColorData, aColorSeq[ i ] )); +/*N*/ aCol.SetColor( (static_cast< ColorData >( aColorSeq[ i ] ) )); /*N*/ /*N*/ aName = aPrefix; /*N*/ aName.Append( String::CreateFromInt32( i + 1 )); diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx index f7bc3f3..f6682ef 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx @@ -1111,8 +1111,8 @@ uno::Reference< chart::XChartData > SAL_CALL ChXChartDocument::getData() throw( { uno::Reference< lang::XComponent > xComp( (static_cast< SfxBaseModel* >(this))); // XChartData is inherited twice - m_xChartData = SAL_STATIC_CAST( chart::XChartDataArray*, - new ChXChartDataArray( xComp, m_pModel )); + m_xChartData = (static_cast< chart::XChartDataArray* >( + new ChXChartDataArray( xComp, m_pModel ))); } return m_xChartData; diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx index 6db181b..13d19e9 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx @@ -330,7 +330,7 @@ void SAL_CALL ChXChartObject::setPropertyValue( const ::rtl::OUString& aProperty mpModel->SetLegendHasBeenMoved( FALSE ); // note: SetShowLegend sets pos to CHLEGEND_RIGHT pSet->Put( SvxChartLegendPosItem( - SAL_STATIC_CAST( SvxChartLegendPos, (static_cast< int >(ePos))))); + (static_cast< SvxChartLegendPos >( (static_cast< int >(ePos)))))); } break; @@ -735,8 +735,8 @@ void SAL_CALL ChXChartObject::setPropertyValues ( mpModel->SetLegendHasBeenMoved (FALSE); // note: SetShowLegend sets pos to CHLEGEND_RIGHT aModifications.Put (SvxChartLegendPosItem ( - SAL_STATIC_CAST (SvxChartLegendPos, - (static_cast< int >(ePos))))); + (static_cast< SvxChartLegendPos >( + (static_cast< int >(ePos)))))); } break; diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx index 3cc842e..a488d30 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx @@ -252,7 +252,7 @@ uno::Any ChXDiagram::GetAnyByItem( SfxItemSet& aSet, const SfxItemPropertyMap* p { case CHATTR_DATA_SWITCH: // BM: SwitchData is enum now { - sal_Bool bIsOn = SAL_STATIC_CAST( const SfxBoolItem&, aSet.Get( CHATTR_DATA_SWITCH ) ).GetValue(); + sal_Bool bIsOn = (static_cast< const SfxBoolItem& >( aSet.Get( CHATTR_DATA_SWITCH ) )).GetValue(); chart::ChartDataRowSource eRowSource = bIsOn ? chart::ChartDataRowSource_COLUMNS : chart::ChartDataRowSource_ROWS; aAny <<= eRowSource; commit b5b4af6da1d44b47702ced8ea7cfc99c4788525a Author: Thomas Arnhold <tho...@arnhold.org> Date: Fri May 4 06:09:56 2012 +0200 fdo#48253: Expand SAL_STATIC_CAST Change-Id: Icbb4df924b79f2a3d903c640e2aae2119a91fcad diff --git a/binfilter/bf_forms/source/component/forms_imgprod.cxx b/binfilter/bf_forms/source/component/forms_imgprod.cxx index 82de344..4955b33 100644 --- a/binfilter/bf_forms/source/component/forms_imgprod.cxx +++ b/binfilter/bf_forms/source/component/forms_imgprod.cxx @@ -222,8 +222,8 @@ ImageProducer::~ImageProducer() ::com::sun::star::uno::Any ImageProducer::queryInterface( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException) { ::com::sun::star::uno::Any aRet = ::cppu::queryInterface( rType, - SAL_STATIC_CAST( ::com::sun::star::lang::XInitialization*, this ), - SAL_STATIC_CAST( ::com::sun::star::awt::XImageProducer*, this ) ); + (static_cast< ::com::sun::star::lang::XInitialization* >(this)), + (static_cast< ::com::sun::star::awt::XImageProducer* >(this)) ); return (aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType )); } diff --git a/binfilter/bf_sch/source/core/sch_chtmode9.cxx b/binfilter/bf_sch/source/core/sch_chtmode9.cxx index 90f3869..acd7c7c 100644 --- a/binfilter/bf_sch/source/core/sch_chtmode9.cxx +++ b/binfilter/bf_sch/source/core/sch_chtmode9.cxx @@ -1456,7 +1456,7 @@ namespace binfilter { /*N*/ // return true if item is not set (default) or it is set to TRUE /*N*/ return ( ( SFX_ITEM_SET != /*N*/ pItemSet->GetItemState( SID_ATTR_NUMBERFORMAT_SOURCE, FALSE, &pPoolItem )) || -/*N*/ ( SAL_STATIC_CAST( const SfxBoolItem*, pPoolItem )->GetValue() == TRUE )); +/*N*/ ( (static_cast< const SfxBoolItem* >(pPoolItem))->GetValue() == TRUE )); /*N*/ } /*N*/ /*N*/ return false; @@ -1523,7 +1523,7 @@ namespace binfilter { /*N*/ if( ! bBAxisFound && /*N*/ SFX_ITEM_SET == /*N*/ GetDataRowAttr( nRow ).GetItemState( SCHATTR_AXIS, FALSE, &pPoolItem ) && -/*N*/ SAL_STATIC_CAST( const SfxInt32Item*, pPoolItem )->GetValue() == CHART_AXIS_SECONDARY_Y ) +/*N*/ (static_cast< const SfxInt32Item* >(pPoolItem))->GetValue() == CHART_AXIS_SECONDARY_Y ) /*N*/ { /*N*/ if( UsesSourceFormat( CHAXIS_AXIS_B, &pItemSet ) && /*N*/ pItemSet ) diff --git a/binfilter/bf_sch/source/core/sch_chtmodel.cxx b/binfilter/bf_sch/source/core/sch_chtmodel.cxx index 3447299..3c93435 100644 --- a/binfilter/bf_sch/source/core/sch_chtmodel.cxx +++ b/binfilter/bf_sch/source/core/sch_chtmodel.cxx @@ -141,7 +141,7 @@ using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star; /*N*/ ChartModel::ChartModel( const String& rPalettePath, SfxObjectShell* pDocSh ) : -/*N*/ SdrModel( rPalettePath, NULL, SAL_STATIC_CAST( SvPersist*, pDocSh )), +/*N*/ SdrModel( rPalettePath, NULL, (static_cast< SvPersist* >(pDocSh))), /*N*/ bClearDepth(FALSE), /*N*/ bNewOrLoadCompleted(FALSE),//aus SchChartDocument:: /*N*/ pDocShell(pDocSh), //aus SchChartDocument:: @@ -677,7 +677,7 @@ void ChartModel::ClearItemSetLists() /*N*/ aEvent.EndColumn = 0; /*N*/ aEvent.StartRow = 0; /*N*/ aEvent.EndRow = 0; -/*N*/ SAL_STATIC_CAST( SchChartDocShell*, pDocShell )->DataModified( aEvent ); +/*N*/ (static_cast< SchChartDocShell* >(pDocShell))->DataModified( aEvent ); /*N*/ } /*N*/ /*N*/ if(!bDontBuild) diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartAxis.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartAxis.cxx index d878bdd..90cb635 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartAxis.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartAxis.cxx @@ -387,7 +387,7 @@ void SAL_CALL ChXChartAxis::setPropertyValue( const ::rtl::OUString& aPropertyNa sal_Int32 nIntVal = 0; if( aValue >>= nIntVal ) { - eArrOrder = SAL_STATIC_CAST( chart::ChartAxisArrangeOrderType, nIntVal ); + eArrOrder = (static_cast< chart::ChartAxisArrangeOrderType >(nIntVal)); } } switch( eArrOrder ) @@ -623,7 +623,7 @@ void SAL_CALL ChXChartAxis::setPropertyValues ( // basic might give us an int instead of the enum type sal_Int32 nIntVal = 0; if( *pValue >>= nIntVal ) - eArrOrder = SAL_STATIC_CAST (chart::ChartAxisArrangeOrderType, nIntVal); + eArrOrder = (static_cast< chart::ChartAxisArrangeOrderType >(nIntVal)); } switch( eArrOrder ) { diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartData.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartData.cxx index 39af1f0..9f4ec0a 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartData.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartData.cxx @@ -73,7 +73,7 @@ void ChXChartData::DataModified( chart::ChartDataChangeEvent& aEvent ) { if( !maListeners.getLength() ) return; - uno::Reference< uno::XInterface > xSrc( SAL_STATIC_CAST( cppu::OWeakObject*, this ), uno::UNO_QUERY ); + uno::Reference< uno::XInterface > xSrc( (static_cast< cppu::OWeakObject* >(this)), uno::UNO_QUERY ); if( xSrc.is() ) aEvent.Source = xSrc; diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx index cf8d39f..f7bc3f3 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartDocument.cxx @@ -224,7 +224,7 @@ void ChXChartDocument::RefreshData( const chart::ChartDataChangeEvent& /*aEvent* if( xDataArray.is() ) { // new data object using own doc shell - uno::Reference< lang::XComponent > xComp( SAL_STATIC_CAST( SfxBaseModel*, this )); + uno::Reference< lang::XComponent > xComp( (static_cast< SfxBaseModel* >(this))); ChXChartDataArray* pNewDataArray = new ChXChartDataArray( xComp, m_pModel ); chart::XChartDataArray* pSrcArray = xDataArray.get(); @@ -234,7 +234,7 @@ void ChXChartDocument::RefreshData( const chart::ChartDataChangeEvent& /*aEvent* pNewDataArray->setColumnDescriptions( pSrcArray->getColumnDescriptions() ); // remember the new data as member - m_xChartData = SAL_STATIC_CAST( ChXChartData*, pNewDataArray ); + m_xChartData = (static_cast< ChXChartData* >(pNewDataArray)); } } } @@ -1109,7 +1109,7 @@ uno::Reference< chart::XChartData > SAL_CALL ChXChartDocument::getData() throw( osl::Guard< osl::Mutex > aGuard( GetMutex()); if( ! m_xChartData.is()) { - uno::Reference< lang::XComponent > xComp( SAL_STATIC_CAST( SfxBaseModel*, this )); + uno::Reference< lang::XComponent > xComp( (static_cast< SfxBaseModel* >(this))); // XChartData is inherited twice m_xChartData = SAL_STATIC_CAST( chart::XChartDataArray*, new ChXChartDataArray( xComp, m_pModel )); diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx index 8704c6a..6db181b 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXChartObject.cxx @@ -330,7 +330,7 @@ void SAL_CALL ChXChartObject::setPropertyValue( const ::rtl::OUString& aProperty mpModel->SetLegendHasBeenMoved( FALSE ); // note: SetShowLegend sets pos to CHLEGEND_RIGHT pSet->Put( SvxChartLegendPosItem( - SAL_STATIC_CAST( SvxChartLegendPos, SAL_STATIC_CAST( int, ePos )))); + SAL_STATIC_CAST( SvxChartLegendPos, (static_cast< int >(ePos))))); } break; @@ -736,7 +736,7 @@ void SAL_CALL ChXChartObject::setPropertyValues ( // note: SetShowLegend sets pos to CHLEGEND_RIGHT aModifications.Put (SvxChartLegendPosItem ( SAL_STATIC_CAST (SvxChartLegendPos, - SAL_STATIC_CAST (int, ePos)))); + (static_cast< int >(ePos))))); } break; diff --git a/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx b/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx index f0dd23e..3cc842e 100644 --- a/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx +++ b/binfilter/bf_sch/source/ui/unoidl/sch_ChXDiagram.cxx @@ -184,7 +184,7 @@ sal_Bool ChXDiagram::SetDocShell( SchChartDocShell* pDocShell, sal_Bool bKeepMod if( bKeepModel && mpModel ) { // copy current model - ChartModel* pModel = SAL_STATIC_CAST( ChartModel*, mpModel->AllocModel()); + ChartModel* pModel = (static_cast< ChartModel* >(mpModel->AllocModel())); if( pModel ) { pDocShell->SetModelPtr( pModel ); @@ -260,7 +260,7 @@ uno::Any ChXDiagram::GetAnyByItem( SfxItemSet& aSet, const SfxItemPropertyMap* p break; case SCHATTR_STYLE_SHAPE: - aAny <<= SAL_STATIC_CAST( sal_Int32, mpModel->GetChartShapeType() ); + aAny <<= (static_cast< sal_Int32 >(mpModel->GetChartShapeType()) ); break; case SCHATTR_DATADESCR_DESCR: @@ -409,7 +409,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL ChXDiagram::getDataRowProperties( Row < mpModel->GetRowCount() ) { ChXDataRow* pRet = new ChXDataRow( Row, mpModel ); - return uno::Reference< beans::XPropertySet >( SAL_STATIC_CAST( beans::XPropertySet*, pRet )); + return uno::Reference< beans::XPropertySet >( (static_cast< beans::XPropertySet* >(pRet))); } else { @@ -439,7 +439,7 @@ uno::Reference< beans::XPropertySet > SAL_CALL ChXDiagram::getDataPointPropertie (Column < mpModel->GetColCount()) ) { ChXDataPoint* pRet = new ChXDataPoint( Column, Row, mpModel ); - return uno::Reference< beans::XPropertySet >( SAL_STATIC_CAST( beans::XPropertySet*, pRet )); + return uno::Reference< beans::XPropertySet >( (static_cast< beans::XPropertySet* >(pRet))); } else { @@ -940,21 +940,21 @@ void SAL_CALL ChXDiagram::setPropertyValue( const ::rtl::OUString& aPropertyName { chart::ChartErrorCategory eCat; cppu::any2enum< chart::ChartErrorCategory >( eCat, aValue ); - pSet->Put( SfxInt32Item( nWID, SAL_STATIC_CAST( sal_Int32, eCat ))); + pSet->Put( SfxInt32Item( nWID, (static_cast< sal_Int32 >(eCat)))); break; } case SCHATTR_STAT_INDICATE: { chart::ChartErrorIndicatorType eInd; cppu::any2enum< chart::ChartErrorIndicatorType >( eInd, aValue ); - pSet->Put( SfxInt32Item( nWID, SAL_STATIC_CAST( sal_Int32, eInd ))); + pSet->Put( SfxInt32Item( nWID, (static_cast< sal_Int32 >(eInd)))); break; } case SCHATTR_STAT_REGRESSTYPE: { chart::ChartRegressionCurveType eRegType; cppu::any2enum< chart::ChartRegressionCurveType >( eRegType, aValue ); - pSet->Put( SfxInt32Item( nWID, SAL_STATIC_CAST( sal_Int32, eRegType ))); + pSet->Put( SfxInt32Item( nWID, (static_cast< sal_Int32 >(eRegType)))); break; } case CHATTR_DATA_SWITCH: @@ -1127,7 +1127,7 @@ uno::Any SAL_CALL ChXDiagram::getPropertyValue( const ::rtl::OUString& PropertyN switch( nWID ) { case CHATTR_NUM_OF_LINES_FOR_BAR: - aAny <<= SAL_STATIC_CAST( sal_Int32, mpModel->GetNumLinesColChart() ); + aAny <<= (static_cast< sal_Int32 >(mpModel->GetNumLinesColChart()) ); return aAny; // RETURN case SCHATTR_DATADESCR_DESCR: diff --git a/binfilter/bf_so3/source/persist/binddata.cxx b/binfilter/bf_so3/source/persist/binddata.cxx index cf5056a..044875f 100644 --- a/binfilter/bf_so3/source/persist/binddata.cxx +++ b/binfilter/bf_so3/source/persist/binddata.cxx @@ -360,8 +360,8 @@ Any SAL_CALL SvBindingData_Impl::queryInterface ( { Any aRet (cppu::queryInterface ( rType, - SAL_STATIC_CAST(XEventListener*, this), - SAL_STATIC_CAST(XPropertyChangeListener*, this))); + (static_cast< XEventListener* >(this)), + (static_cast< XPropertyChangeListener* >(this)))); return aRet.hasValue() ? aRet : OWeakObject::queryInterface (rType); } diff --git a/binfilter/bf_so3/source/persist/transprt.cxx b/binfilter/bf_so3/source/persist/transprt.cxx index ed5f85a..2151d94 100644 --- a/binfilter/bf_so3/source/persist/transprt.cxx +++ b/binfilter/bf_so3/source/persist/transprt.cxx @@ -725,8 +725,8 @@ Any SAL_CALL UcbTransportDataSink_Impl::queryInterface ( { Any aRet (cppu::queryInterface ( rType, - // SAL_STATIC_CAST(XActiveDataControl*, this), - SAL_STATIC_CAST(XActiveDataSink*, this))); + // (static_cast< XActiveDataControl* >(this)), + (static_cast< XActiveDataSink* >(this)))); return aRet.hasValue() ? aRet : OWeakObject::queryInterface (rType); } @@ -893,8 +893,8 @@ Any SAL_CALL UcbTransportInputStream_Impl::queryInterface ( { Any aRet (cppu::queryInterface ( rType, - SAL_STATIC_CAST (XInputStream*, this), - SAL_STATIC_CAST (XSeekable*, this))); + (static_cast< XInputStream* >(this)), + (static_cast< XSeekable* >(this)))); return aRet.hasValue() ? aRet : OWeakObject::queryInterface (rType); } @@ -1372,7 +1372,7 @@ void UcbTransport_Impl::start (void) aArgument.Priority = m_rCtx.GetPriority(); m_xSink = new UcbTransportDataSink_Impl(); - aArgument.Sink = SAL_STATIC_CAST(OWeakObject*, m_xSink.get()); + aArgument.Sink = (static_cast< OWeakObject* >(m_xSink.get())); if (m_rCtx.GetBindMode() & SVBIND_NEWESTVERSION) m_aCommand.Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "synchronize" )); @@ -1434,10 +1434,10 @@ Any SAL_CALL UcbTransport_Impl::queryInterface ( const Type &rType) throw(Runtim { Any aRet (cppu::queryInterface ( rType, - SAL_STATIC_CAST(XCommandEnvironment*, this), - SAL_STATIC_CAST(XInteractionHandler*, this), - SAL_STATIC_CAST(XProgressHandler*, this), - SAL_STATIC_CAST(XPropertiesChangeListener*, this))); + (static_cast< XCommandEnvironment* >(this)), + (static_cast< XInteractionHandler* >(this)), + (static_cast< XProgressHandler* >(this)), + (static_cast< XPropertiesChangeListener* >(this)))); return aRet.hasValue() ? aRet : OWeakObject::queryInterface (rType); } @@ -1798,7 +1798,7 @@ void UcbHTTPTransport_Impl::start (void) OpenCommandArgument2 aArgument; aArgument.Mode = OpenMode::DOCUMENT; aArgument.Priority = m_rCtx.GetPriority(); - aArgument.Sink = SAL_STATIC_CAST(OWeakObject*, m_xSink.get()); + aArgument.Sink = (static_cast< OWeakObject* >(m_xSink.get())); m_aCommand.Argument <<= aArgument; m_nCommandId = xProcessor->createCommandIdentifier(); diff --git a/binfilter/bf_svtools/source/items/svt_intitem.cxx b/binfilter/bf_svtools/source/items/svt_intitem.cxx index 8da44c1..85992b2 100644 --- a/binfilter/bf_svtools/source/items/svt_intitem.cxx +++ b/binfilter/bf_svtools/source/items/svt_intitem.cxx @@ -122,7 +122,7 @@ int SfxInt16Item::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(SfxInt16Item, 0); DBG_ASSERT(SfxPoolItem::operator ==(rItem), "unequal type"); - return m_nValue == SAL_STATIC_CAST(const SfxInt16Item *, &rItem)-> + return m_nValue == (static_cast< const SfxInt16Item * >(&rItem))-> m_nValue; } @@ -132,10 +132,10 @@ int SfxInt16Item::Compare(const SfxPoolItem & rWith) const { DBG_CHKTHIS(SfxInt16Item, 0); DBG_ASSERT(SfxPoolItem::operator ==(rWith), "unequal type"); - return SAL_STATIC_CAST(const SfxInt16Item *, &rWith)->m_nValue + return (static_cast< const SfxInt16Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const SfxInt16Item *, &rWith)->m_nValue + (static_cast< const SfxInt16Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } diff --git a/binfilter/bf_svtools/source/items1/svt_cintitem.cxx b/binfilter/bf_svtools/source/items1/svt_cintitem.cxx index 0b2eb60..424309e 100644 --- a/binfilter/bf_svtools/source/items1/svt_cintitem.cxx +++ b/binfilter/bf_svtools/source/items1/svt_cintitem.cxx @@ -53,7 +53,7 @@ int CntByteItem::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntByteItem, 0); DBG_ASSERT(rItem.ISA(CntByteItem), "CntByteItem::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntByteItem *, &rItem)->m_nValue; + return m_nValue == (static_cast< const CntByteItem * >(&rItem))->m_nValue; } //============================================================================ @@ -62,9 +62,9 @@ int CntByteItem::Compare(const SfxPoolItem & rWith) const { DBG_CHKTHIS(CntByteItem, 0); DBG_ASSERT(rWith.ISA(CntByteItem), "CntByteItem::Compare(): Bad type"); - return SAL_STATIC_CAST(const CntByteItem *, &rWith)->m_nValue < m_nValue ? + return (static_cast< const CntByteItem * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntByteItem *, &rWith)->m_nValue + (static_cast< const CntByteItem * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } @@ -175,7 +175,7 @@ int CntUInt16Item::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntUInt16Item, 0); DBG_ASSERT(rItem.ISA(CntUInt16Item), "CntUInt16Item::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntUInt16Item *, &rItem)-> + return m_nValue == (static_cast< const CntUInt16Item * >(&rItem))-> m_nValue; } @@ -186,10 +186,10 @@ int CntUInt16Item::Compare(const SfxPoolItem & rWith) const DBG_CHKTHIS(CntUInt16Item, 0); DBG_ASSERT(rWith.ISA(CntUInt16Item), "CntUInt16Item::Compare(): Bad type"); - return SAL_STATIC_CAST(const CntUInt16Item *, &rWith)->m_nValue + return (static_cast< const CntUInt16Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntUInt16Item *, &rWith)->m_nValue + (static_cast< const CntUInt16Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } @@ -300,7 +300,7 @@ int CntInt32Item::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntInt32Item, 0); DBG_ASSERT(rItem.ISA(CntInt32Item), "CntInt32Item::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntInt32Item *, &rItem)-> + return m_nValue == (static_cast< const CntInt32Item * >(&rItem))-> m_nValue; } @@ -310,10 +310,10 @@ int CntInt32Item::Compare(const SfxPoolItem & rWith) const { DBG_CHKTHIS(CntInt32Item, 0); DBG_ASSERT(rWith.ISA(CntInt32Item), "CntInt32Item::Compare(): Bad type"); - return SAL_STATIC_CAST(const CntInt32Item *, &rWith)->m_nValue + return (static_cast< const CntInt32Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntInt32Item *, &rWith)->m_nValue + (static_cast< const CntInt32Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } @@ -422,7 +422,7 @@ int CntUInt32Item::operator ==(const SfxPoolItem & rItem) const DBG_CHKTHIS(CntUInt32Item, 0); DBG_ASSERT(rItem.ISA(CntUInt32Item), "CntUInt32Item::operator ==(): Bad type"); - return m_nValue == SAL_STATIC_CAST(const CntUInt32Item *, &rItem)-> + return m_nValue == (static_cast< const CntUInt32Item * >(&rItem))-> m_nValue; } @@ -433,10 +433,10 @@ int CntUInt32Item::Compare(const SfxPoolItem & rWith) const DBG_CHKTHIS(CntUInt32Item, 0); DBG_ASSERT(rWith.ISA(CntUInt32Item), "CntUInt32Item::operator ==(): Bad type"); - return SAL_STATIC_CAST(const CntUInt32Item *, &rWith)->m_nValue + return (static_cast< const CntUInt32Item * >(&rWith))->m_nValue < m_nValue ? -1 : - SAL_STATIC_CAST(const CntUInt32Item *, &rWith)->m_nValue + (static_cast< const CntUInt32Item * >(&rWith))->m_nValue == m_nValue ? 0 : 1; } diff --git a/binfilter/bf_svtools/source/items1/svt_custritm.cxx b/binfilter/bf_svtools/source/items1/svt_custritm.cxx index c6a2d98..b94e39c 100644 --- a/binfilter/bf_svtools/source/items1/svt_custritm.cxx +++ b/binfilter/bf_svtools/source/items1/svt_custritm.cxx @@ -56,7 +56,7 @@ int CntUnencodedStringItem::operator ==(const SfxPoolItem & rItem) const DBG_ASSERT(rItem.ISA(CntUnencodedStringItem), "CntUnencodedStringItem::operator ==(): Bad type"); return m_aValue - == SAL_STATIC_CAST(const CntUnencodedStringItem *, &rItem)-> + == (static_cast< const CntUnencodedStringItem * >(&rItem))-> m_aValue; } diff --git a/binfilter/bf_svtools/source/items1/svt_visitem.cxx b/binfilter/bf_svtools/source/items1/svt_visitem.cxx index 86c8040..a7616b9 100644 --- a/binfilter/bf_svtools/source/items1/svt_visitem.cxx +++ b/binfilter/bf_svtools/source/items1/svt_visitem.cxx @@ -60,7 +60,7 @@ int SfxVisibilityItem::operator ==(const SfxPoolItem & rItem) const { DBG_CHKTHIS(SfxVisibilityItem, 0); DBG_ASSERT(SfxPoolItem::operator ==(rItem), "unequal type"); - return m_nValue.bVisible == SAL_STATIC_CAST(const SfxVisibilityItem *, &rItem)-> + return m_nValue.bVisible == (static_cast< const SfxVisibilityItem * >(&rItem))-> m_nValue.bVisible; } commit 681db8e3a2c727a1c30fb597a50b265857040094 Author: Thomas Arnhold <tho...@arnhold.org> Date: Fri May 4 06:08:32 2012 +0200 fdo#48253: Expand SAL_CONST_CAST Change-Id: Id50acb05c4616ba735dbbbad8fe866ae8c8ef459 diff --git a/binfilter/bf_sch/source/core/sch_chtmode4.cxx b/binfilter/bf_sch/source/core/sch_chtmode4.cxx index 0cb69c4..bee767a 100644 --- a/binfilter/bf_sch/source/core/sch_chtmode4.cxx +++ b/binfilter/bf_sch/source/core/sch_chtmode4.cxx @@ -111,7 +111,7 @@ namespace binfilter { /*N*/ long nEndRow = GetRowCount(); /*N*/ for( long nRow = 0; nRow < nEndRow; nRow++ ) /*N*/ { -/*N*/ SfxItemSet &rAttr = SAL_CONST_CAST( SfxItemSet&, GetDataRowAttr( (short)nRow )); +/*N*/ SfxItemSet &rAttr = (const_cast< SfxItemSet& >( GetDataRowAttr( (short)nRow ))); /*N*/ /*N*/ rAttr.Put( SvxChartDataDescrItem( eDescr )); /*N*/ rAttr.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYM, bSym )); @@ -119,7 +119,7 @@ namespace binfilter { /*N*/ } /*N*/ else /*N*/ { -/*N*/ SfxItemSet &rAttr = SAL_CONST_CAST( SfxItemSet&, GetDataRowAttr( (short)nRowToChange )); +/*N*/ SfxItemSet &rAttr = (const_cast< SfxItemSet& >( GetDataRowAttr( (short)nRowToChange ))); /*N*/ /*N*/ rAttr.Put( SvxChartDataDescrItem( eDescr )); /*N*/ rAttr.Put( SfxBoolItem( SCHATTR_DATADESCR_SHOW_SYM, bSym )); diff --git a/binfilter/bf_so3/source/persist/transprt.cxx b/binfilter/bf_so3/source/persist/transprt.cxx index 5f09c41..ed5f85a 100644 --- a/binfilter/bf_so3/source/persist/transprt.cxx +++ b/binfilter/bf_so3/source/persist/transprt.cxx @@ -567,7 +567,7 @@ ErrCode UcbTransportLockBytes::ReadAt ( *pRead = ULONG(nSize); sal_uInt32 nRead = SAL_MAX(m_nRead, nPos + nSize); - SAL_CONST_CAST(UcbTransportLockBytes*, this)->m_nRead = nRead; + (const_cast< UcbTransportLockBytes* >(this))->m_nRead = nRead; return ERRCODE_NONE; } diff --git a/binfilter/bf_svtools/source/items1/svt_ctypeitm.cxx b/binfilter/bf_svtools/source/items1/svt_ctypeitm.cxx index 2ea232c..1d65a43 100644 --- a/binfilter/bf_svtools/source/items1/svt_ctypeitm.cxx +++ b/binfilter/bf_svtools/source/items1/svt_ctypeitm.cxx @@ -158,7 +158,7 @@ SfxItemPresentation CntContentTypeItem::GetPresentation( DBG_ASSERT(pIntlWrapper, "CntContentTypeItem::GetPresentation(): No IntlWrapper"); if (pIntlWrapper) - SAL_CONST_CAST(CntContentTypeItem *, this)->_aPresentation + (const_cast< CntContentTypeItem * >(this))->_aPresentation = INetContentTypes::GetPresentation(GetEnumValue(), pIntlWrapper-> getLocale()); @@ -181,7 +181,7 @@ INetContentType CntContentTypeItem::GetEnumValue() const { // Not yet initialized... Get enum value for string content type. - CntContentTypeItem* pVarThis = SAL_CONST_CAST( CntContentTypeItem*, this ); + CntContentTypeItem* pVarThis = (const_cast< CntContentTypeItem* >(this)); pVarThis->_eType = INetContentTypes::GetContentType( GetValue() ); } diff --git a/binfilter/inc/bf_svtools/ilstitem.hxx b/binfilter/inc/bf_svtools/ilstitem.hxx index ab547b9..96f0ab0 100644 --- a/binfilter/inc/bf_svtools/ilstitem.hxx +++ b/binfilter/inc/bf_svtools/ilstitem.hxx @@ -57,7 +57,7 @@ public: ::com::sun::star::uno::Sequence < sal_Int32 > GetSequence() { return m_aList; } ::com::sun::star::uno::Sequence < sal_Int32 > GetConstSequence() const - { return SAL_CONST_CAST(SfxIntegerListItem *, this)->GetSequence(); } + { return (const_cast< SfxIntegerListItem * >(this))->GetSequence(); } virtual int operator==( const SfxPoolItem& ) const; virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const; _______________________________________________ Libreoffice-commits mailing list Libreoffice-commits@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits