summaryrefslogtreecommitdiff
path: root/dbaccess/source/ext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:25:56 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:25:56 +0100
commitd597bb77b271a0e9f2c3f4789517435f6b63f170 (patch)
treececc96dcd43d96a3a56b9ec28d55a2f844af0476 /dbaccess/source/ext
parent029149e9b7aa8ad66dca2972e26385c831153c80 (diff)
More loplugin:cstylecast: dbaccess
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: I96df8923f7791288bbd350d75582a9220006ece6
Diffstat (limited to 'dbaccess/source/ext')
-rw-r--r--dbaccess/source/ext/macromigration/macromigrationpages.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/migrationlog.cxx2
-rw-r--r--dbaccess/source/ext/macromigration/progressmixer.cxx7
-rw-r--r--dbaccess/source/ext/macromigration/rangeprogressbar.hxx2
4 files changed, 6 insertions, 7 deletions
diff --git a/dbaccess/source/ext/macromigration/macromigrationpages.cxx b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
index a82b941fea93..ea0ce74c1a5a 100644
--- a/dbaccess/source/ext/macromigration/macromigrationpages.cxx
+++ b/dbaccess/source/ext/macromigration/macromigrationpages.cxx
@@ -217,7 +217,7 @@ namespace dbmm
m_pCurrentObject->SetText( _rObjectName );
m_pCurrentAction->SetText( _rCurrentAction );
m_aCurrentProgress.SetRange( _nRange );
- m_aCurrentProgress.SetValue( (sal_uInt32)0 );
+ m_aCurrentProgress.SetValue( sal_uInt32(0) );
// since this is currently called from the main thread, which does not have the chance
// to re-schedule, we need to explicitly update the display
diff --git a/dbaccess/source/ext/macromigration/migrationlog.cxx b/dbaccess/source/ext/macromigration/migrationlog.cxx
index b46894ac0a58..a046a68c6ae9 100644
--- a/dbaccess/source/ext/macromigration/migrationlog.cxx
+++ b/dbaccess/source/ext/macromigration/migrationlog.cxx
@@ -127,7 +127,7 @@ namespace dbmm
OSL_ENSURE( !bAlreadyKnown, "MigrationLog::startedDocument: document is already known!" );
#endif
- DocumentID nID = (DocumentID)( m_pData->aDocumentLogs.size() + 1 );
+ DocumentID nID = static_cast<DocumentID>( m_pData->aDocumentLogs.size() + 1 );
while ( m_pData->aDocumentLogs.find( nID ) != m_pData->aDocumentLogs.end() )
++nID;
diff --git a/dbaccess/source/ext/macromigration/progressmixer.cxx b/dbaccess/source/ext/macromigration/progressmixer.cxx
index 4fd482c6cb1b..60318112bdb0 100644
--- a/dbaccess/source/ext/macromigration/progressmixer.cxx
+++ b/dbaccess/source/ext/macromigration/progressmixer.cxx
@@ -102,10 +102,10 @@ namespace dbmm
++phase
)
{
- phase->second.nGlobalStart = (sal_uInt32)( nRunningWeight * _rData.nOverallStretch );
+ phase->second.nGlobalStart = static_cast<sal_uInt32>( nRunningWeight * _rData.nOverallStretch );
nRunningWeight += phase->second.nWeight;
- sal_uInt32 nNextPhaseStart = (sal_uInt32)( nRunningWeight * _rData.nOverallStretch );
+ sal_uInt32 nNextPhaseStart = static_cast<sal_uInt32>( nRunningWeight * _rData.nOverallStretch );
phase->second.nGlobalRange = nNextPhaseStart - phase->second.nGlobalStart;
}
@@ -152,8 +152,7 @@ namespace dbmm
const PhaseData& rPhase( m_pData->pCurrentPhase->second );
double nLocalProgress = 1.0 * _nPhaseProgress / rPhase.nRange;
- sal_uInt32 nOverallProgress = (sal_uInt32)
- ( rPhase.nGlobalStart + nLocalProgress * rPhase.nGlobalRange );
+ sal_uInt32 nOverallProgress = static_cast<sal_uInt32>( rPhase.nGlobalStart + nLocalProgress * rPhase.nGlobalRange );
m_pData->rConsumer.advance( nOverallProgress );
}
diff --git a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
index b0c4d49fc682..c8800635c196 100644
--- a/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
+++ b/dbaccess/source/ext/macromigration/rangeprogressbar.hxx
@@ -56,7 +56,7 @@ namespace dbmm
void SetValue(sal_uInt32 _nValue)
{
- m_pBar->SetValue( (sal_uInt16)( 100.0 * _nValue / m_nRange ) );
+ m_pBar->SetValue( static_cast<sal_uInt16>( 100.0 * _nValue / m_nRange ) );
}
private: