summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:16:33 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:16:33 +0100
commitb271fb5ba1a8f7da2120d7037de087b02eb16c91 (patch)
tree74f5c2f1a419311097eaa9c474f3e1a69fed7efe /sdext
parent48db069fd7341ad8128d0e9a5fbcc5b092fe9860 (diff)
More loplugin:cstylecast: sdext
auto-rewrite with <https://gerrit.libreoffice.org/#/c/47798/> "Enable loplugin:cstylecast for some more cases" plus solenv/clang-format/reformat-formatted-files Change-Id: Ie9eca6a78912a62f5a46ecacb1da052621c79ea4
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/minimizer/impoptimizer.cxx34
-rw-r--r--sdext/source/minimizer/informationdialog.cxx8
-rw-r--r--sdext/source/minimizer/optimizerdialog.cxx12
-rw-r--r--sdext/source/minimizer/optimizerdialogcontrols.cxx74
-rw-r--r--sdext/source/minimizer/pppoptimizertoken.cxx2
-rw-r--r--sdext/source/pdfimport/inc/pdfihelper.hxx2
-rw-r--r--sdext/source/pdfimport/pdfparse/pdfentries.cxx28
-rw-r--r--sdext/source/pdfimport/test/pdfunzip.cxx2
-rw-r--r--sdext/source/pdfimport/test/tests.cxx22
-rw-r--r--sdext/source/pdfimport/tree/imagecontainer.cxx12
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx26
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx2
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx2
-rw-r--r--sdext/source/presenter/PresenterConfigurationAccess.cxx2
-rw-r--r--sdext/source/presenter/PresenterNotesView.cxx2
-rw-r--r--sdext/source/presenter/PresenterScrollBar.cxx2
-rw-r--r--sdext/source/presenter/PresenterWindowManager.cxx2
17 files changed, 117 insertions, 117 deletions
diff --git a/sdext/source/minimizer/impoptimizer.cxx b/sdext/source/minimizer/impoptimizer.cxx
index 7a28481ba6d0..45321fcef7fe 100644
--- a/sdext/source/minimizer/impoptimizer.cxx
+++ b/sdext/source/minimizer/impoptimizer.cxx
@@ -150,7 +150,7 @@ void ImpDeleteNotesPages( const Reference< XModel >& rxModel )
while( xShapes->getCount() )
xShapes->remove( Reference< XShape >( xShapes->getByIndex( xShapes->getCount() - 1 ), UNO_QUERY_THROW ) );
- xPropSet->setPropertyValue( "Layout", Any( (sal_Int16)21 ) );
+ xPropSet->setPropertyValue( "Layout", Any( sal_Int16(21) ) );
}
}
catch( Exception& )
@@ -217,13 +217,13 @@ void ImpCompressGraphic( Reference< XGraphicProvider > const & rxGraphicProvider
aFilterData[ 0 ].Name = "ImageResolution";
aFilterData[ 0 ].Value <<= nImageResolution;
aFilterData[ 1 ].Name = "ColorMode"; // todo: jpeg color mode (0->true color, 1->greyscale)
- aFilterData[ 1 ].Value <<= (sal_Int32)0;
+ aFilterData[ 1 ].Value <<= sal_Int32(0);
aFilterData[ 2 ].Name = "Quality"; // quality that is used if we export to jpeg
aFilterData[ 2 ].Value <<= nJPEGQuality;
aFilterData[ 3 ].Name = "Compression"; // compression that is used if we export to png
- aFilterData[ 3 ].Value <<= (sal_Int32)6;
+ aFilterData[ 3 ].Value <<= sal_Int32(6);
aFilterData[ 4 ].Name = "Interlaced"; // interlaced is turned off if we export to png
- aFilterData[ 4 ].Value <<= (sal_Int32)0;
+ aFilterData[ 4 ].Value <<= sal_Int32(0);
aFilterData[ 5 ].Name = "LogicalSize";
aFilterData[ 5 ].Value <<= rLogicalSize;
aFilterData[ 6 ].Name = "RemoveCropArea";
@@ -289,10 +289,10 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >&
if ( aSize100thMM.Width && aSize100thMM.Height )
{
- aGraphicCropPixel.Left = static_cast< sal_Int32 >( ( (double)aSourceSizePixel.Width * aGraphicCropLogic.Left ) / aSize100thMM.Width );
- aGraphicCropPixel.Top = static_cast< sal_Int32 >( ( (double)aSourceSizePixel.Height* aGraphicCropLogic.Top ) / aSize100thMM.Height );
- aGraphicCropPixel.Right = static_cast< sal_Int32 >( ( (double)aSourceSizePixel.Width * ( aSize100thMM.Width - aGraphicCropLogic.Right ) ) / aSize100thMM.Width );
- aGraphicCropPixel.Bottom = static_cast< sal_Int32 >( ( (double)aSourceSizePixel.Height* ( aSize100thMM.Height - aGraphicCropLogic.Bottom ) ) / aSize100thMM.Height );
+ aGraphicCropPixel.Left = static_cast< sal_Int32 >( ( static_cast<double>(aSourceSizePixel.Width) * aGraphicCropLogic.Left ) / aSize100thMM.Width );
+ aGraphicCropPixel.Top = static_cast< sal_Int32 >( ( static_cast<double>(aSourceSizePixel.Height)* aGraphicCropLogic.Top ) / aSize100thMM.Height );
+ aGraphicCropPixel.Right = static_cast< sal_Int32 >( ( static_cast<double>(aSourceSizePixel.Width) * ( aSize100thMM.Width - aGraphicCropLogic.Right ) ) / aSize100thMM.Width );
+ aGraphicCropPixel.Bottom = static_cast< sal_Int32 >( ( static_cast<double>(aSourceSizePixel.Height)* ( aSize100thMM.Height - aGraphicCropLogic.Bottom ) ) / aSize100thMM.Height );
// first calculating new SourceSizePixel by removing the cropped area
aSourceSizePixel.Width = aGraphicCropPixel.Right - aGraphicCropPixel.Left;
@@ -316,16 +316,16 @@ Reference< XGraphic > ImpCompressGraphic( const Reference< XComponentContext >&
aDestSizePixel = aSourceSizePixel;
if ( rGraphicSettings.mnImageResolution && aLogicalSize.Width && aLogicalSize.Height )
{
- const double fSourceDPIX = ((double)aSourceSizePixel.Width / ((double)aLogicalSize.Width / 2540.0 ));
- const double fSourceDPIY = ((double)aSourceSizePixel.Height/ ((double)aLogicalSize.Height/ 2540.0 ));
+ const double fSourceDPIX = (static_cast<double>(aSourceSizePixel.Width) / (static_cast<double>(aLogicalSize.Width) / 2540.0 ));
+ const double fSourceDPIY = (static_cast<double>(aSourceSizePixel.Height)/ (static_cast<double>(aLogicalSize.Height)/ 2540.0 ));
// check, if the bitmap DPI exceeds the maximum DPI
if( ( fSourceDPIX > rGraphicSettings.mnImageResolution ) || ( fSourceDPIY > rGraphicSettings.mnImageResolution ) )
{
- const double fNewSizePixelX = ((double)aDestSizePixel.Width * rGraphicSettings.mnImageResolution ) / fSourceDPIX;
- const double fNewSizePixelY = ((double)aDestSizePixel.Height* rGraphicSettings.mnImageResolution ) / fSourceDPIY;
+ const double fNewSizePixelX = (static_cast<double>(aDestSizePixel.Width) * rGraphicSettings.mnImageResolution ) / fSourceDPIX;
+ const double fNewSizePixelY = (static_cast<double>(aDestSizePixel.Height)* rGraphicSettings.mnImageResolution ) / fSourceDPIY;
- aDestSizePixel = awt::Size( (sal_Int32)fNewSizePixelX, (sal_Int32)fNewSizePixelY );
+ aDestSizePixel = awt::Size( static_cast<sal_Int32>(fNewSizePixelX), static_cast<sal_Int32>(fNewSizePixelY) );
bNeedsOptimizing = true;
}
}
@@ -427,10 +427,10 @@ void CompressGraphics( ImpOptimizer& rOptimizer, const Reference< XComponentCont
if ( !aGraphicSettings.mbRemoveCropArea )
{
awt::Size aNewSize( GraphicCollector::GetOriginalSize( rxContext, xNewGraphic ) );
- aGraphicCropLogic.Left = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Left * ((double)aNewSize.Width / (double)aSize100thMM.Width));
- aGraphicCropLogic.Top = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Top * ((double)aNewSize.Height / (double)aSize100thMM.Height));
- aGraphicCropLogic.Right = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Right * ((double)aNewSize.Width / (double)aSize100thMM.Width));
- aGraphicCropLogic.Bottom = (sal_Int32)((double)aGraphicUserIter->maGraphicCropLogic.Bottom * ((double)aNewSize.Height / (double)aSize100thMM.Height));
+ aGraphicCropLogic.Left = static_cast<sal_Int32>(static_cast<double>(aGraphicUserIter->maGraphicCropLogic.Left) * (static_cast<double>(aNewSize.Width) / static_cast<double>(aSize100thMM.Width)));
+ aGraphicCropLogic.Top = static_cast<sal_Int32>(static_cast<double>(aGraphicUserIter->maGraphicCropLogic.Top) * (static_cast<double>(aNewSize.Height) / static_cast<double>(aSize100thMM.Height)));
+ aGraphicCropLogic.Right = static_cast<sal_Int32>(static_cast<double>(aGraphicUserIter->maGraphicCropLogic.Right) * (static_cast<double>(aNewSize.Width) / static_cast<double>(aSize100thMM.Width)));
+ aGraphicCropLogic.Bottom = static_cast<sal_Int32>(static_cast<double>(aGraphicUserIter->maGraphicCropLogic.Bottom) * (static_cast<double>(aNewSize.Height) / static_cast<double>(aSize100thMM.Height)));
}
xShapePropertySet->setPropertyValue( "GraphicCrop", Any( aGraphicCropLogic ) );
}
diff --git a/sdext/source/minimizer/informationdialog.cxx b/sdext/source/minimizer/informationdialog.cxx
index f53adf734957..45551141e275 100644
--- a/sdext/source/minimizer/informationdialog.cxx
+++ b/sdext/source/minimizer/informationdialog.cxx
@@ -68,7 +68,7 @@ OUString InsertFixedText( InformationDialog& rInformationDialog, const OUString&
Any( bMultiLine ),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -138,7 +138,7 @@ OUString InsertCheckBox( InformationDialog& rInformationDialog, const OUString&
Any( rLabel ),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -175,7 +175,7 @@ OUString InsertButton( InformationDialog& rInformationDialog, const OUString& rC
Any( nXPos ),
Any( nYPos ),
Any( static_cast< sal_Int16 >( PushButtonType_OK ) ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -301,7 +301,7 @@ void InformationDialog::InitDialog()
InsertButton( *this, "button", mxActionListener, DIALOG_WIDTH / 2 - 25, nDialogHeight - 20, 50, 2, STR_OK );
bool bOpenNewDocument = mrbOpenNewDocument;
- setControlProperty( "OpenNewDocument", "State", Any( (sal_Int16)bOpenNewDocument ) );
+ setControlProperty( "OpenNewDocument", "State", Any( static_cast<sal_Int16>(bOpenNewDocument) ) );
}
diff --git a/sdext/source/minimizer/optimizerdialog.cxx b/sdext/source/minimizer/optimizerdialog.cxx
index 50f4ab8acd27..bf2f30f78c70 100644
--- a/sdext/source/minimizer/optimizerdialog.cxx
+++ b/sdext/source/minimizer/optimizerdialog.cxx
@@ -115,7 +115,7 @@ void OptimizerDialog::InitRoadmap()
xPropertySet->setPropertyValue( "ImageURL", Any( sURL ) );
xPropertySet->setPropertyValue( "Activated", Any( true ) );
xPropertySet->setPropertyValue( "Complete", Any( true ) );
- xPropertySet->setPropertyValue( "CurrentItemID", Any( (sal_Int16)ITEM_ID_INTRODUCTION ) );
+ xPropertySet->setPropertyValue( "CurrentItemID", Any( sal_Int16(ITEM_ID_INTRODUCTION) ) );
xPropertySet->setPropertyValue( "Text", Any( getString( STR_STEPS ) ) );
}
catch( Exception& )
@@ -631,7 +631,7 @@ void TextListenerFormattedField0Pg1::textChanged( const TextEvent& /* rEvent */
double fDouble = 0;
Any aAny = mrOptimizerDialog.getControlProperty( "FormattedField0Pg1", "EffectiveValue" );
if ( aAny >>= fDouble )
- mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
+ mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( static_cast<sal_Int32>(fDouble) ) );
}
void TextListenerFormattedField0Pg1::disposing( const css::lang::EventObject& /* Source */ )
{
@@ -674,7 +674,7 @@ void SpinListenerFormattedField0Pg1::up( const SpinEvent& /* rEvent */ )
if ( fDouble > 100 )
fDouble = 100;
mrOptimizerDialog.setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( fDouble ) );
- mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
+ mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( static_cast<sal_Int32>(fDouble) ) );
}
}
void SpinListenerFormattedField0Pg1::down( const SpinEvent& /* rEvent */ )
@@ -687,18 +687,18 @@ void SpinListenerFormattedField0Pg1::down( const SpinEvent& /* rEvent */ )
if ( fDouble < 0 )
fDouble = 0;
mrOptimizerDialog.setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( fDouble ) );
- mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)fDouble ) );
+ mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( static_cast<sal_Int32>(fDouble) ) );
}
}
void SpinListenerFormattedField0Pg1::first( const SpinEvent& /* rEvent */ )
{
mrOptimizerDialog.setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( static_cast< double >( 0 ) ) );
- mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)0 ) );
+ mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( sal_Int32(0) ) );
}
void SpinListenerFormattedField0Pg1::last( const SpinEvent& /* rEvent */ )
{
mrOptimizerDialog.setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( static_cast< double >( 100 ) ) );
- mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( (sal_Int32)100 ) );
+ mrOptimizerDialog.SetConfigProperty( TK_JPEGQuality, Any( sal_Int32(100) ) );
}
void SpinListenerFormattedField0Pg1::disposing( const css::lang::EventObject& /* Source */ )
{
diff --git a/sdext/source/minimizer/optimizerdialogcontrols.cxx b/sdext/source/minimizer/optimizerdialogcontrols.cxx
index ecd944cedcfb..89434c4766a0 100644
--- a/sdext/source/minimizer/optimizerdialogcontrols.cxx
+++ b/sdext/source/minimizer/optimizerdialogcontrols.cxx
@@ -107,7 +107,7 @@ OUString InsertButton( OptimizerDialog& rOptimizerDialog, const OUString& rContr
Any( nXPos ),
Any( nYPos ),
Any( static_cast< sal_Int16 >(nPushButtonType) ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -141,7 +141,7 @@ OUString InsertFixedText( OptimizerDialog& rOptimizerDialog, const OUString& rCo
Any( bMultiLine ),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -178,7 +178,7 @@ OUString InsertCheckBox( OptimizerDialog& rOptimizerDialog, const OUString& rCon
Any( rLabel ),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -216,12 +216,12 @@ OUString InsertFormattedField( OptimizerDialog& rOptimizerDialog, const OUString
Any( fEffectiveMax ),
Any( fEffectiveMin ),
Any( true ),
- Any( (sal_Int32)12 ),
+ Any( sal_Int32(12) ),
Any( nXPos ),
Any( nYPos ),
Any( true ),
Any( true ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -264,10 +264,10 @@ OUString InsertComboBox( OptimizerDialog& rOptimizerDialog, const OUString& rCon
Any( true ),
Any( bEnabled ),
Any( nHeight ),
- Any( (sal_Int16)8),
+ Any( sal_Int16(8)),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( rItemList ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -304,7 +304,7 @@ OUString InsertRadioButton( OptimizerDialog& rOptimizerDialog, const OUString& r
Any( bMultiLine ),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -342,11 +342,11 @@ OUString InsertListBox( OptimizerDialog& rOptimizerDialog, const OUString& rCont
Any( true ),
Any( bEnabled ),
Any( nHeight ),
- Any( (sal_Int16)8),
+ Any( sal_Int16(8)),
Any( false ),
Any( nXPos ),
Any( nYPos ),
- Any( (sal_Int16)0 ),
+ Any( sal_Int16(0) ),
Any( rItemList ),
Any( nTabIndex ),
Any( nWidth ) };
@@ -435,9 +435,9 @@ void OptimizerDialog::UpdateControlStatesPage1()
bool bDeleteHiddenSlides( GetConfigProperty( TK_DeleteHiddenSlides, false ) );
bool bDeleteNotesPages( GetConfigProperty( TK_DeleteNotesPages, false ) );
- setControlProperty( "CheckBox0Pg3", "State", Any( (sal_Int16)bDeleteUnusedMasterPages ) );
- setControlProperty( "CheckBox1Pg3", "State", Any( (sal_Int16)bDeleteNotesPages ) );
- setControlProperty( "CheckBox2Pg3", "State", Any( (sal_Int16)bDeleteHiddenSlides ) );
+ setControlProperty( "CheckBox0Pg3", "State", Any( static_cast<sal_Int16>(bDeleteUnusedMasterPages) ) );
+ setControlProperty( "CheckBox1Pg3", "State", Any( static_cast<sal_Int16>(bDeleteNotesPages) ) );
+ setControlProperty( "CheckBox2Pg3", "State", Any( static_cast<sal_Int16>(bDeleteHiddenSlides) ) );
}
void OptimizerDialog::InitPage1()
{
@@ -473,9 +473,9 @@ void OptimizerDialog::UpdateControlStatesPage2()
bool bJPEGCompression( GetConfigProperty( TK_JPEGCompression, false ) );
bool bRemoveCropArea( GetConfigProperty( TK_RemoveCropArea, false ) );
bool bEmbedLinkedGraphics( GetConfigProperty( TK_EmbedLinkedGraphics, true ) );
- sal_Int32 nJPEGQuality( GetConfigProperty( TK_JPEGQuality, (sal_Int32)90 ) );
+ sal_Int32 nJPEGQuality( GetConfigProperty( TK_JPEGQuality, sal_Int32(90) ) );
- sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) );
+ sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, sal_Int32(0) ) );
sal_Int32 nI0, nI1, nI2, nI3;
nI0 = nI1 = nI2 = nI3 = 0;
@@ -497,14 +497,14 @@ void OptimizerDialog::UpdateControlStatesPage2()
if ( aResolutionText.isEmpty() )
aResolutionText = OUString::number( nImageResolution );
- setControlProperty( "RadioButton0Pg1", "State", Any( (sal_Int16)( !bJPEGCompression ) ) );
- setControlProperty( "RadioButton1Pg1", "State", Any( (sal_Int16) bJPEGCompression ) );
+ setControlProperty( "RadioButton0Pg1", "State", Any( static_cast<sal_Int16>( !bJPEGCompression ) ) );
+ setControlProperty( "RadioButton1Pg1", "State", Any( static_cast<sal_Int16>(bJPEGCompression) ) );
setControlProperty( "FixedText1Pg1", "Enabled", Any( bJPEGCompression ) );
setControlProperty( "FormattedField0Pg1", "Enabled", Any( bJPEGCompression ) );
- setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( (double)nJPEGQuality ) );
- setControlProperty( "CheckBox1Pg1", "State", Any( (sal_Int16)bRemoveCropArea ) );
+ setControlProperty( "FormattedField0Pg1", "EffectiveValue", Any( static_cast<double>(nJPEGQuality) ) );
+ setControlProperty( "CheckBox1Pg1", "State", Any( static_cast<sal_Int16>(bRemoveCropArea) ) );
setControlProperty( "ComboBox0Pg1", "Text", Any( aResolutionText ) );
- setControlProperty( "CheckBox2Pg1", "State", Any( (sal_Int16)bEmbedLinkedGraphics ) );
+ setControlProperty( "CheckBox2Pg1", "State", Any( static_cast<sal_Int16>(bEmbedLinkedGraphics) ) );
}
void OptimizerDialog::InitPage2()
{
@@ -535,13 +535,13 @@ void OptimizerDialog::InitPage2()
void OptimizerDialog::UpdateControlStatesPage3()
{
bool bConvertOLEObjects( GetConfigProperty( TK_OLEOptimization, false ) );
- sal_Int16 nOLEOptimizationType( GetConfigProperty( TK_OLEOptimizationType, (sal_Int16)0 ) );
+ sal_Int16 nOLEOptimizationType( GetConfigProperty( TK_OLEOptimizationType, sal_Int16(0) ) );
- setControlProperty( "CheckBox0Pg2", "State", Any( (sal_Int16)bConvertOLEObjects ) );
+ setControlProperty( "CheckBox0Pg2", "State", Any( static_cast<sal_Int16>(bConvertOLEObjects) ) );
setControlProperty( "RadioButton0Pg2", "Enabled", Any( bConvertOLEObjects ) );
- setControlProperty( "RadioButton0Pg2", "State", Any( (sal_Int16)( nOLEOptimizationType == 0 ) ) );
+ setControlProperty( "RadioButton0Pg2", "State", Any( static_cast<sal_Int16>( nOLEOptimizationType == 0 ) ) );
setControlProperty( "RadioButton1Pg2", "Enabled", Any( bConvertOLEObjects ) );
- setControlProperty( "RadioButton1Pg2", "State", Any( (sal_Int16)( nOLEOptimizationType == 1 ) ) );
+ setControlProperty( "RadioButton1Pg2", "State", Any( static_cast<sal_Int16>( nOLEOptimizationType == 1 ) ) );
}
void OptimizerDialog::InitPage3()
{
@@ -594,13 +594,13 @@ void OptimizerDialog::UpdateControlStatesPage4()
bool bSaveAs( GetConfigProperty( TK_SaveAs, true ) );
if ( mbIsReadonly )
{
- setControlProperty( "RadioButton0Pg4", "State", Any( (sal_Int16)false ) );
- setControlProperty( "RadioButton1Pg4", "State", Any( (sal_Int16)true ) );
+ setControlProperty( "RadioButton0Pg4", "State", Any( sal_Int16(false) ) );
+ setControlProperty( "RadioButton1Pg4", "State", Any( sal_Int16(true) ) );
}
else
{
- setControlProperty( "RadioButton0Pg4", "State", Any( (sal_Int16)( !bSaveAs ) ) );
- setControlProperty( "RadioButton1Pg4", "State", Any( (sal_Int16) bSaveAs ) );
+ setControlProperty( "RadioButton0Pg4", "State", Any( static_cast<sal_Int16>( !bSaveAs ) ) );
+ setControlProperty( "RadioButton1Pg4", "State", Any( static_cast<sal_Int16>(bSaveAs) ) );
}
setControlProperty( "ComboBox0Pg4", "Enabled", Any( false ) );
@@ -731,8 +731,8 @@ void OptimizerDialog::UpdateControlStatesPage4()
// generating graphic compression info
sal_Int32 nGraphics = 0;
bool bJPEGCompression( GetConfigProperty( TK_JPEGCompression, false ) );
- sal_Int32 nJPEGQuality( GetConfigProperty( TK_JPEGQuality, (sal_Int32)90 ) );
- sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, (sal_Int32)0 ) );
+ sal_Int32 nJPEGQuality( GetConfigProperty( TK_JPEGQuality, sal_Int32(90) ) );
+ sal_Int32 nImageResolution( GetConfigProperty( TK_ImageResolution, sal_Int32(0) ) );
GraphicSettings aGraphicSettings( bJPEGCompression, nJPEGQuality, GetConfigProperty( TK_RemoveCropArea, false ),
nImageResolution, GetConfigProperty( TK_EmbedLinkedGraphics, true ) );
GraphicCollector::CountGraphics( UnoDialog::mxContext, mxController->getModel(), aGraphicSettings, nGraphics );
@@ -834,14 +834,14 @@ void OptimizerDialog::InitPage4()
OUString("Width") };
Any pValues[] = {
- Any( (sal_Int32)12 ),
+ Any( sal_Int32(12) ),
Any( OUString("STR_SAVE_AS") ),
- Any( (sal_Int32)( PAGE_POS_X + 6 ) ),
- Any( (sal_Int32)( DIALOG_HEIGHT - 75 ) ),
- Any( (sal_Int32)0 ),
- Any( (sal_Int32)100 ),
- Any( (sal_Int32)0 ),
- Any( (sal_Int32)( PAGE_WIDTH - 12 ) ) };
+ Any( sal_Int32( PAGE_POS_X + 6 ) ),
+ Any( sal_Int32( DIALOG_HEIGHT - 75 ) ),
+ Any( sal_Int32(0) ),
+ Any( sal_Int32(100) ),
+ Any( sal_Int32(0) ),
+ Any( sal_Int32( PAGE_WIDTH - 12 ) ) };
sal_Int32 nCount = SAL_N_ELEMENTS( pNames );
diff --git a/sdext/source/minimizer/pppoptimizertoken.cxx b/sdext/source/minimizer/pppoptimizertoken.cxx
index d99c49bfb15b..79303918e775 100644
--- a/sdext/source/minimizer/pppoptimizertoken.cxx
+++ b/sdext/source/minimizer/pppoptimizertoken.cxx
@@ -175,7 +175,7 @@ PPPOptimizerTokenEnum TKGet( const OUString& rToken )
int i, nLen = rToken.getLength();
std::unique_ptr<char[]> pBuf(new char[ nLen + 1 ]);
for ( i = 0; i < nLen; i++ )
- pBuf[ i ] = (char)rToken[ i ];
+ pBuf[ i ] = static_cast<char>(rToken[ i ]);
pBuf[ i ] = 0;
TypeNameHashMap::iterator aHashIter( pHashMap->find( pBuf.get() ) );
if ( aHashIter != pHashMap->end() )
diff --git a/sdext/source/pdfimport/inc/pdfihelper.hxx b/sdext/source/pdfimport/inc/pdfihelper.hxx
index bcc42dd384b7..072a5bd01d50 100644
--- a/sdext/source/pdfimport/inc/pdfihelper.hxx
+++ b/sdext/source/pdfimport/inc/pdfihelper.hxx
@@ -82,7 +82,7 @@ namespace pdfi
{
size_t operator()(const FontAttributes& rFont ) const
{
- return (size_t)rFont.familyName.hashCode()
+ return static_cast<size_t>(rFont.familyName.hashCode())
^ size_t(rFont.isBold ? 0xd47be593 : 0)
^ size_t(rFont.isItalic ? 0x1efd51a1 : 0)
^ size_t(rFont.isUnderline ? 0xf6bd325a : 0)
diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
index 16563868f25c..b973bd40f9eb 100644
--- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx
+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx
@@ -205,8 +205,8 @@ bool PDFString::emit( EmitContext& rWriteContext ) const
// check for string or hex string
const sal_Char* pStr = aFiltered.getStr();
if( aFiltered.getLength() > 1 &&
- ( ((unsigned char)pStr[0] == 0xff && (unsigned char)pStr[1] == 0xfe) ||
- ((unsigned char)pStr[0] == 0xfe && (unsigned char)pStr[1] == 0xff) ) )
+ ( (static_cast<unsigned char>(pStr[0]) == 0xff && static_cast<unsigned char>(pStr[1]) == 0xfe) ||
+ (static_cast<unsigned char>(pStr[0]) == 0xfe && static_cast<unsigned char>(pStr[1]) == 0xff) ) )
{
static const char pHexTab[16] = { '0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F' };
@@ -351,8 +351,8 @@ bool PDFNumber::emit( EmitContext& rWriteContext ) const
fValue=-fValue;
}
- sal_Int64 nInt = (sal_Int64)fValue;
- fValue -= (double)nInt;
+ sal_Int64 nInt = static_cast<sal_Int64>(fValue);
+ fValue -= static_cast<double>(nInt);
// optimizing hardware may lead to a value of 1.0 after the subtraction
if( fValue == 1.0 || log10( 1.0-fValue ) <= -nPrecision )
{
@@ -362,8 +362,8 @@ bool PDFNumber::emit( EmitContext& rWriteContext ) const
sal_Int64 nFrac = 0;
if( fValue )
{
- fValue *= pow( 10.0, (double)nPrecision );
- nFrac = (sal_Int64)fValue;
+ fValue *= pow( 10.0, static_cast<double>(nPrecision) );
+ nFrac = static_cast<sal_Int64>(fValue);
}
if( bNeg && ( nInt || nFrac ) )
aBuf.append( '-' );
@@ -372,7 +372,7 @@ bool PDFNumber::emit( EmitContext& rWriteContext ) const
{
int i;
aBuf.append( '.' );
- sal_Int64 nBound = (sal_Int64)(pow( 10.0, nPrecision - 1.0 )+0.5);
+ sal_Int64 nBound = static_cast<sal_Int64>(pow( 10.0, nPrecision - 1.0 )+0.5);
for ( i = 0; ( i < nPrecision ) && nFrac; i++ )
{
sal_Int64 nNumb = nFrac / nBound;
@@ -817,7 +817,7 @@ bool PDFObject::emit( EmitContext& rWriteContext ) const
{
// nothing to deflate, but decryption has happened
pOutBytes = reinterpret_cast<sal_uInt8*>(pStream);
- nOutBytes = (sal_uInt32)nBytes;
+ nOutBytes = static_cast<sal_uInt32>(nBytes);
}
if( nOutBytes )
@@ -1282,7 +1282,7 @@ PDFFileImplData* PDFFile::impl_getData() const
#if OSL_DEBUG_LEVEL > 0
OUString aTmp;
for( int i = 0; i < m_pData->m_aDocID.getLength(); i++ )
- aTmp += OUString::number((unsigned int)sal_uInt8(m_pData->m_aDocID[i]), 16);
+ aTmp += OUString::number(static_cast<unsigned int>(sal_uInt8(m_pData->m_aDocID[i])), 16);
SAL_INFO("sdext.pdfimport.pdfparse", "DocId is <" << aTmp << ">");
#endif
}
@@ -1346,9 +1346,9 @@ PDFFileImplData* PDFFile::impl_getData() const
{
OUString aTmp;
for( int i = 0; i < aEnt.getLength(); i++ )
- aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt[i]), 16);
+ aTmp += " " + OUString::number(static_cast<unsigned int>(sal_uInt8(aEnt[i])), 16);
SAL_WARN("sdext.pdfimport.pdfparse",
- "O entry has length " << (int)aEnt.getLength() << ", should be 32 <" << aTmp << ">" );
+ "O entry has length " << static_cast<int>(aEnt.getLength()) << ", should be 32 <" << aTmp << ">" );
}
#endif
}
@@ -1366,9 +1366,9 @@ PDFFileImplData* PDFFile::impl_getData() const
{
OUString aTmp;
for( int i = 0; i < aEnt.getLength(); i++ )
- aTmp += " " + OUString::number((unsigned int)sal_uInt8(aEnt[i]), 16);
+ aTmp += " " + OUString::number(static_cast<unsigned int>(sal_uInt8(aEnt[i])), 16);
SAL_WARN("sdext.pdfimport.pdfparse",
- "U entry has length " << (int)aEnt.getLength() << ", should be 32 <" << aTmp << ">" );
+ "U entry has length " << static_cast<int>(aEnt.getLength()) << ", should be 32 <" << aTmp << ">" );
}
#endif
}
@@ -1387,7 +1387,7 @@ PDFFileImplData* PDFFile::impl_getData() const
SAL_INFO("sdext.pdfimport.pdfparse", "p entry is " << m_pData->m_nPEntry );
}
- SAL_INFO("sdext.pdfimport.pdfparse", "Encryption dict: sec handler: " << (pFilter ? pFilter->getFilteredName() : OUString("<unknown>")) << ", version = " << (int)m_pData->m_nAlgoVersion << ", revision = " << (int)m_pData->m_nStandardRevision << ", key length = " << m_pData->m_nKeyLength );
+ SAL_INFO("sdext.pdfimport.pdfparse", "Encryption dict: sec handler: " << (pFilter ? pFilter->getFilteredName() : OUString("<unknown>")) << ", version = " << static_cast<int>(m_pData->m_nAlgoVersion) << ", revision = " << static_cast<int>(m_pData->m_nStandardRevision) << ", key length = " << m_pData->m_nKeyLength );
break;
}
}
diff --git a/sdext/source/pdfimport/test/pdfunzip.cxx b/sdext/source/pdfimport/test/pdfunzip.cxx
index 0a2ff0819574..c6b24eda0414 100644
--- a/sdext/source/pdfimport/test/pdfunzip.cxx
+++ b/sdext/source/pdfimport/test/pdfunzip.cxx
@@ -406,7 +406,7 @@ int write_objects( const char* i_pInFile, const char* i_pOutFile, PDFFile* i_pPD
PDFObject* pStream = i_pPDFFile->findObject( nObject, nGeneration );
if( ! pStream )
{
- fprintf( stderr, "object %d %d not found !\n", (int)nObject, (int)nGeneration );
+ fprintf( stderr, "object %d %d not found !\n", static_cast<int>(nObject), static_cast<int>(nGeneration) );
continue;
}
diff --git a/sdext/source/pdfimport/test/tests.cxx b/sdext/source/pdfimport/test/tests.cxx
index bbc0a008c7b8..48e262ec2280 100644
--- a/sdext/source/pdfimport/test/tests.cxx
+++ b/sdext/source/pdfimport/test/tests.cxx
@@ -87,7 +87,7 @@ namespace
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "A4 page size (in 100th of points): Width", 79400, m_aPageSize.Width, 0.00000001);
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "A4 page size (in 100th of points): Height", 59500, m_aPageSize.Height, 0.0000001 );
CPPUNIT_ASSERT_MESSAGE( "endPage() called", m_bPageEnded );
- CPPUNIT_ASSERT_EQUAL_MESSAGE( "Num pages equal one", (sal_Int32) 1, m_nNumPages );
+ CPPUNIT_ASSERT_EQUAL_MESSAGE( "Num pages equal one", sal_Int32(1), m_nNumPages );
CPPUNIT_ASSERT_MESSAGE( "Correct hyperlink bounding box",
rtl::math::approxEqual(m_aHyperlinkBounds.X1,34.7 ) &&
rtl::math::approxEqual(m_aHyperlinkBounds.Y1,386.0) &&
@@ -268,7 +268,7 @@ namespace
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Flatness is 0",
1, rContext.Flatness, 0.00000001 );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
- (sal_Int32) 0, rContext.FontId );
+ sal_Int32(0), rContext.FontId );
}
virtual void fillPath( const uno::Reference<rendering::XPolyPolygon2D>& rPath ) override
@@ -287,7 +287,7 @@ namespace
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Flatness is 10",
10, rContext.Flatness, 0.00000001 );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
- (sal_Int32) 0, rContext.FontId );
+ sal_Int32(0), rContext.FontId );
}
virtual void eoFillPath( const uno::Reference<rendering::XPolyPolygon2D>& rPath ) override
@@ -306,7 +306,7 @@ namespace
CPPUNIT_ASSERT_DOUBLES_EQUAL_MESSAGE( "Flatness is 0",
1, rContext.Flatness, 0.00000001 );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "Font id is 0",
- (sal_Int32) 0, rContext.FontId );
+ sal_Int32(0), rContext.FontId );
const char sExportString[] = "m12050 49610c-4310 0-7800-3490-7800-7800 0-4300 "
"3490-7790 7800-7790 4300 0 7790 3490 7790 7790 0 4310-3490 7800-7790 7800z";
@@ -355,7 +355,7 @@ namespace
bool /*bInvert*/ ) override
{
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask received two properties",
- (sal_Int32) 3, xBitmap.getLength() );
+ sal_Int32(3), xBitmap.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask got URL param",
OUString("URL"), xBitmap[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMask got InputStream param",
@@ -365,7 +365,7 @@ namespace
virtual void drawImage(const uno::Sequence<beans::PropertyValue>& xBitmap ) override
{
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage received two properties",
- (sal_Int32) 3, xBitmap.getLength() );
+ sal_Int32(3), xBitmap.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage got URL param",
OUString("URL"), xBitmap[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawImage got InputStream param",
@@ -377,7 +377,7 @@ namespace
const uno::Sequence<uno::Any>& /*xMaskColors*/ ) override
{
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage received two properties",
- (sal_Int32) 3, xBitmap.getLength() );
+ sal_Int32(3), xBitmap.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage got URL param",
OUString("URL"), xBitmap[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawColorMaskedImage got InputStream param",
@@ -389,14 +389,14 @@ namespace
bool /*bInvertMask*/) override
{
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #1",
- (sal_Int32) 3, xBitmap.getLength() );
+ sal_Int32(3), xBitmap.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage got URL param #1",
OUString("URL"), xBitmap[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage got InputStream param #1",
OUString("InputStream"), xBitmap[1].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage received two properties #2",
- (sal_Int32) 3, xMask.getLength() );
+ sal_Int32(3), xMask.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage got URL param #2",
OUString("URL"), xMask[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawMaskedImage got InputStream param #2",
@@ -407,14 +407,14 @@ namespace
const uno::Sequence<beans::PropertyValue>& xMask) override
{
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #1",
- (sal_Int32) 3, xBitmap.getLength() );
+ sal_Int32(3), xBitmap.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage got URL param #1",
OUString("URL"), xBitmap[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage got InputStream param #1",
OUString("InputStream"), xBitmap[1].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage received two properties #2",
- (sal_Int32) 3, xMask.getLength() );
+ sal_Int32(3), xMask.getLength() );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage got URL param #2",
OUString("URL"), xMask[0].Name );
CPPUNIT_ASSERT_EQUAL_MESSAGE( "drawAlphaMaskedImage got InputStream param #2",
diff --git a/sdext/source/pdfimport/tree/imagecontainer.cxx b/sdext/source/pdfimport/tree/imagecontainer.cxx
index 6ff84263b502..2661544010fd 100644
--- a/sdext/source/pdfimport/tree/imagecontainer.cxx
+++ b/sdext/source/pdfimport/tree/imagecontainer.cxx
@@ -53,9 +53,9 @@ OUString encodeBase64( const sal_Int8* i_pBuffer, const sal_uInt32 i_nBufferLeng
sal_Int32 nBufPos( 0 );
for( sal_Int32 i = 0; i < nFullTripleLength; i += 3, nBufPos += 4 )
{
- const sal_Int32 nBinary = (((sal_uInt8)i_pBuffer[i + 0]) << 16) +
- (((sal_uInt8)i_pBuffer[i + 1]) << 8) +
- ((sal_uInt8)i_pBuffer[i + 2]);
+ const sal_Int32 nBinary = (static_cast<sal_uInt8>(i_pBuffer[i + 0]) << 16) +
+ (static_cast<sal_uInt8>(i_pBuffer[i + 1]) << 8) +
+ static_cast<sal_uInt8>(i_pBuffer[i + 2]);
aBuf.append("====");
@@ -78,10 +78,10 @@ OUString encodeBase64( const sal_Int8* i_pBuffer, const sal_uInt32 i_nBufferLeng
const sal_Int32 nStart(i_nBufferLength-nRemain);
switch(nRemain)
{
- case 1: nBinary = ((sal_uInt8)i_pBuffer[nStart + 0]) << 16;
+ case 1: nBinary = static_cast<sal_uInt8>(i_pBuffer[nStart + 0]) << 16;
break;
- case 2: nBinary = (((sal_uInt8)i_pBuffer[nStart + 0]) << 16) +
- (((sal_uInt8)i_pBuffer[nStart + 1]) << 8);
+ case 2: nBinary = (static_cast<sal_uInt8>(i_pBuffer[nStart + 0]) << 16) +
+ (static_cast<sal_uInt8>(i_pBuffer[nStart + 1]) << 8);
break;
}
sal_uInt8 nIndex (static_cast<sal_uInt8>((nBinary & 0xFC0000) >> 18));
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 4f6ff1d49b33..d55bd9ed1171 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -139,7 +139,7 @@ void writeBinaryBuffer( const OutputBuffer& rBuffer )
// put buffer to stderr
if( !rBuffer.empty() )
if( fwrite(&rBuffer[0], sizeof(char),
- rBuffer.size(), g_binary_out) != (size_t)rBuffer.size() )
+ rBuffer.size(), g_binary_out) != static_cast<size_t>(rBuffer.size()) )
exit(1); // error
// ---sync point--- see SYNC STREAMS above
@@ -163,7 +163,7 @@ bool ExtractJpegData(Stream* str, OutputBuffer& outBuf)
if (collectBytes)
{
- outBuf.push_back((Output_t)b1);
+ outBuf.push_back(static_cast<Output_t>(b1));
bytesToMarker--;
bytesToLen--;
@@ -183,8 +183,8 @@ bool ExtractJpegData(Stream* str, OutputBuffer& outBuf)
collectBytes = true;
bytesToMarker = 2;
- outBuf.push_back((Output_t)0xFF);
- outBuf.push_back((Output_t)0xD8);
+ outBuf.push_back(Output_t(0xFF));
+ outBuf.push_back(Output_t(0xD8));
}
else
{
@@ -225,7 +225,7 @@ void writeJpeg_( OutputBuffer& o_rOutputBuf, Stream* str, bool bWithLinefeed )
o_rOutputBuf.clear();
ExtractJpegData(str, o_rOutputBuf);
- printf( " JPEG %d", (int)o_rOutputBuf.size() );
+ printf( " JPEG %d", static_cast<int>(o_rOutputBuf.size()) );
if( bWithLinefeed )
printf("\n");
@@ -349,7 +349,7 @@ void writePng_( OutputBuffer& o_rOutputBuf,
// get png image
PngHelper::createPng( o_rOutputBuf, str, width, height, zeroColor, oneColor, bIsMask );
- printf( " PNG %d", (int)o_rOutputBuf.size() );
+ printf( " PNG %d", static_cast<int>(o_rOutputBuf.size()) );
if( bWithLinefeed )
printf("\n");
}
@@ -365,7 +365,7 @@ void writePng_( OutputBuffer& o_rOutputBuf,
// get png image
PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskColorMap );
- printf( " PNG %d", (int)o_rOutputBuf.size() );
+ printf( " PNG %d", static_cast<int>(o_rOutputBuf.size()) );
printf("\n");
}
@@ -380,7 +380,7 @@ void writePng_( OutputBuffer& o_rOutputBuf,
// get png image
PngHelper::createPng( o_rOutputBuf, str, width, height, colorMap, maskStr, maskWidth, maskHeight, maskInvert );
- printf( " PNG %d", (int)o_rOutputBuf.size() );
+ printf( " PNG %d", static_cast<int>(o_rOutputBuf.size()) );
printf("\n");
}
@@ -492,7 +492,7 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
// ---sync point--- see SYNC STREAMS above
fflush(stdout);
- if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != (size_t)nSize )
+ if( fwrite(pBuf, sizeof(char), nSize, g_binary_out) != static_cast<size_t>(nSize) )
{
gfree(pBuf);
exit(1); // error
@@ -744,7 +744,7 @@ void PDFOutDev::updateFont(GfxState *state)
Ref* pID = gfxFont->getID();
// TODO(Q3): Portability problem
- long long fontID = (long long)pID->gen << 32 | (long long)pID->num;
+ long long fontID = static_cast<long long>(pID->gen) << 32 | static_cast<long long>(pID->num);
std::unordered_map< long long, FontAttributes >::const_iterator it =
m_aFontMap.find( fontID );
if( it == m_aFontMap.end() )
@@ -993,8 +993,8 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
// lower bound values, second half upper bound values
if( colorMap->getColorSpace()->getMode() == csIndexed )
{
- aMaskBuf.push_back( (char)maskColors[0] );
- aMaskBuf.push_back( (char)maskColors[gfxColorMaxComps] );
+ aMaskBuf.push_back( static_cast<char>(maskColors[0]) );
+ aMaskBuf.push_back( static_cast<char>(maskColors[gfxColorMaxComps]) );
}
else
{
@@ -1017,7 +1017,7 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
}
}
- printf( " %d", (int)aMaskBuf.size() );
+ printf( " %d", static_cast<int>(aMaskBuf.size()) );
writeImageLF( aBuf, str, width, height, colorMap );
writeBinaryBuffer(aBuf);
writeBinaryBuffer(aMaskBuf);
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
index 08ff1958ad63..44f30c0bab28 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
@@ -123,7 +123,7 @@ void PngHelper::appendFileHeader( OutputBuffer& o_rOutputBuf )
size_t PngHelper::startChunk( const char* pChunkName, OutputBuffer& o_rOutputBuf )
{
size_t nIndex = sal_uInt32( o_rOutputBuf.size() );
- o_rOutputBuf.insert( o_rOutputBuf.end(), 4, (Output_t)0 );
+ o_rOutputBuf.insert( o_rOutputBuf.end(), 4, Output_t(0) );
o_rOutputBuf.push_back( pChunkName[0] );
o_rOutputBuf.push_back( pChunkName[1] );
o_rOutputBuf.push_back( pChunkName[2] );
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx
index 865428d4da03..e0f2ea98b6f0 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.hxx
@@ -40,7 +40,7 @@ namespace pdfi
static void append( sal_uInt32 i_nValue, OutputBuffer& o_rOutputBuf )
{
size_t nCur = o_rOutputBuf.size();
- o_rOutputBuf.insert( o_rOutputBuf.end(), 4, (Output_t)0 );
+ o_rOutputBuf.insert( o_rOutputBuf.end(), 4, Output_t(0) );
set( i_nValue, o_rOutputBuf, nCur );
}
diff --git a/sdext/source/presenter/PresenterConfigurationAccess.cxx b/sdext/source/presenter/PresenterConfigurationAccess.cxx
index a000eb9279dc..7855179b2d4c 100644
--- a/sdext/source/presenter/PresenterConfigurationAccess.cxx
+++ b/sdext/source/presenter/PresenterConfigurationAccess.cxx
@@ -49,7 +49,7 @@ PresenterConfigurationAccess::PresenterConfigurationAccess (
uno::Sequence<uno::Any> aCreationArguments(comphelper::InitAnyPropertySequence(
{
{"nodepath", uno::Any(rsRootName)},
- {"depth", uno::Any((sal_Int32)-1)}
+ {"depth", uno::Any(sal_Int32(-1))}
}));
OUString sAccessService;
diff --git a/sdext/source/presenter/PresenterNotesView.cxx b/sdext/source/presenter/PresenterNotesView.cxx
index ababf72265ae..7ea54d85cc7c 100644
--- a/sdext/source/presenter/PresenterNotesView.cxx
+++ b/sdext/source/presenter/PresenterNotesView.cxx
@@ -642,7 +642,7 @@ void PresenterNotesView::ChangeFontSize (const sal_Int32 nSizeChange)
return;
pConfiguration->GoToChild(OUString("Font"));
- pConfiguration->SetProperty("Size", Any((sal_Int32)(nNewSize+0.5)));
+ pConfiguration->SetProperty("Size", Any(static_cast<sal_Int32>(nNewSize+0.5)));
pConfiguration->CommitChanges();
}
catch (Exception&)
diff --git a/sdext/source/presenter/PresenterScrollBar.cxx b/sdext/source/presenter/PresenterScrollBar.cxx
index ec244a2ef520..5cc42ef5e64f 100644
--- a/sdext/source/presenter/PresenterScrollBar.cxx
+++ b/sdext/source/presenter/PresenterScrollBar.cxx
@@ -533,7 +533,7 @@ void PresenterScrollBar::UpdateWidthOrHeight (
if (xBitmap.is())
{
const geometry::IntegerSize2D aBitmapSize (xBitmap->getSize());
- const sal_Int32 nBitmapSize = (sal_Int32)GetMinor(aBitmapSize.Width, aBitmapSize.Height);
+ const sal_Int32 nBitmapSize = static_cast<sal_Int32>(GetMinor(aBitmapSize.Width, aBitmapSize.Height));
if (nBitmapSize > rSize)
rSize = nBitmapSize;
}
diff --git a/sdext/source/presenter/PresenterWindowManager.cxx b/sdext/source/presenter/PresenterWindowManager.cxx
index 31cfa9d337be..99b71da4dd26 100644
--- a/sdext/source/presenter/PresenterWindowManager.cxx
+++ b/sdext/source/presenter/PresenterWindowManager.cxx
@@ -173,7 +173,7 @@ void PresenterWindowManager::NotifyViewCreation (const Reference<XView>& rxView)
mpPresenterController->GetPaintManager()->Invalidate(
pDescriptor->mxContentWindow,
- (sal_Int16)(awt::InvalidateStyle::TRANSPARENT
+ sal_Int16(awt::InvalidateStyle::TRANSPARENT
| awt::InvalidateStyle::CHILDREN));
}
}