summaryrefslogtreecommitdiff
path: root/sfx2/source/dialog/filedlghelper.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:16:14 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:16:14 +0100
commit48db069fd7341ad8128d0e9a5fbcc5b092fe9860 (patch)
tree1e7e14069f35086928b11f48c0a67dedec8730bc /sfx2/source/dialog/filedlghelper.cxx
parent5e7e3c3bd7bd10a9f7216d4d9fa8f2c61bf2db3e (diff)
More loplugin:cstylecast: sfx2
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: Ia3bed56999f3d684f706ce0bd5be8a2269b06d22
Diffstat (limited to 'sfx2/source/dialog/filedlghelper.cxx')
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx18
1 files changed, 9 insertions, 9 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 4fbec31928ae..9871ab45cc3e 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -647,7 +647,7 @@ void FileDialogHelper_Impl::updateVersions()
ControlActions::ADD_ITEMS, aValue );
Any aPos;
- aPos <<= (sal_Int32) 0;
+ aPos <<= sal_Int32(0);
xDlg->setValue( ExtendedFilePickerElementIds::LISTBOX_VERSION,
ControlActions::SET_SELECT_ITEM, aPos );
}
@@ -693,8 +693,8 @@ IMPL_LINK_NOARG(FileDialogHelper_Impl, TimeOutHdl_Impl, Timer *, void)
sal_Int32 nBmpWidth = aBmp.GetSizePixel().Width();
sal_Int32 nBmpHeight = aBmp.GetSizePixel().Height();
- double nXRatio = (double) nOutWidth / nBmpWidth;
- double nYRatio = (double) nOutHeight / nBmpHeight;
+ double nXRatio = static_cast<double>(nOutWidth) / nBmpWidth;
+ double nYRatio = static_cast<double>(nOutHeight) / nBmpHeight;
if ( nXRatio < nYRatio )
aBmp.Scale( nXRatio, nXRatio );
@@ -1479,7 +1479,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
sal_Int32 nVersion = 0;
if ( ( aValue >>= nVersion ) && nVersion > 0 )
// open a special version; 0 == current version
- rpSet->Put( SfxInt16Item( SID_VERSION, (short)nVersion ) );
+ rpSet->Put( SfxInt16Item( SID_VERSION, static_cast<short>(nVersion) ) );
}
catch( const IllegalArgumentException& ){}
}
@@ -1970,7 +1970,7 @@ void FileDialogHelper_Impl::saveConfig()
aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0 );
bool bValue = false;
aValue >>= bValue;
- SetToken( aUserData, 1, ' ', OUString::number( (sal_Int32) bValue ) );
+ SetToken( aUserData, 1, ' ', OUString::number( static_cast<sal_Int32>(bValue) ) );
INetURLObject aObj( getPath() );
@@ -2006,7 +2006,7 @@ void FileDialogHelper_Impl::saveConfig()
aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0 );
bool bAutoExt = true;
aValue >>= bAutoExt;
- SetToken( aUserData, 0, ' ', OUString::number( (sal_Int32) bAutoExt ) );
+ SetToken( aUserData, 0, ' ', OUString::number( static_cast<sal_Int32>(bAutoExt) ) );
bWriteConfig = true;
}
catch( const IllegalArgumentException& ){}
@@ -2031,7 +2031,7 @@ void FileDialogHelper_Impl::saveConfig()
aValue >>= bSelection;
if ( comphelper::string::getTokenCount(aUserData, ' ') < 3 )
aUserData += " ";
- SetToken( aUserData, 2, ' ', OUString::number( (sal_Int32) bSelection ) );
+ SetToken( aUserData, 2, ' ', OUString::number( static_cast<sal_Int32>(bSelection) ) );
bWriteConfig = true;
}
catch( const IllegalArgumentException& ){}
@@ -2156,7 +2156,7 @@ void FileDialogHelper_Impl::loadConfig()
if ( mbHasAutoExt )
{
sal_Int32 nFlag = aUserData.getToken( 0, ' ' ).toInt32();
- aValue <<= (bool) nFlag;
+ aValue <<= static_cast<bool>(nFlag);
try
{
xDlg->setValue( ExtendedFilePickerElementIds::CHECKBOX_AUTOEXTENSION, 0, aValue );
@@ -2167,7 +2167,7 @@ void FileDialogHelper_Impl::loadConfig()
if( mbHasSelectionBox )
{
sal_Int32 nFlag = aUserData.getToken( 2, ' ' ).toInt32();
- aValue <<= (bool) nFlag;
+ aValue <<= static_cast<bool>(nFlag);
try
{
xDlg->setValue( ExtendedFilePickerElementIds::CHECKBOX_SELECTION, 0, aValue );