summaryrefslogtreecommitdiff
path: root/sw/source/ui/vba/vbarows.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-12 20:13:41 +0100
commit0ae2d98d1f6d29c80bd1ee830db4c333e4ee1e1d (patch)
treed9b77eece17b7b144a4ea50592b639b9f7c87095 /sw/source/ui/vba/vbarows.cxx
parent506856ca50e676520bcc80a8b498355663d0388f (diff)
More loplugin:cstylecast: sw
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: I0f49d21dfdf82742f11b27709f74294feb1e419e
Diffstat (limited to 'sw/source/ui/vba/vbarows.cxx')
-rw-r--r--sw/source/ui/vba/vbarows.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/vba/vbarows.cxx b/sw/source/ui/vba/vbarows.cxx
index f40255cb29af..4b9b98ce66f1 100644
--- a/sw/source/ui/vba/vbarows.cxx
+++ b/sw/source/ui/vba/vbarows.cxx
@@ -197,7 +197,7 @@ void SAL_CALL SwVbaRows::Delete( )
void SAL_CALL SwVbaRows::SetLeftIndent( float LeftIndent, ::sal_Int32 RulerStyle )
{
uno::Reference< word::XColumns > xColumns( new SwVbaColumns( getParent(), mxContext, mxTextTable, mxTextTable->getColumns() ) );
- sal_Int32 nIndent = (sal_Int32) LeftIndent;
+ sal_Int32 nIndent = static_cast<sal_Int32>(LeftIndent);
switch( RulerStyle )
{
case word::WdRulerStyle::wdAdjustFirstColumn:
@@ -263,7 +263,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent )
"(nNewWidth <= 0) || (nWidth <= 0)"
);
}
- double propFactor = (double)nNewWidth/(double)nWidth;
+ double propFactor = static_cast<double>(nNewWidth)/static_cast<double>(nWidth);
// get all columns, calculate and set the new width of the columns
uno::Reference< XCollection > xCol( xColumns, uno::UNO_QUERY_THROW );
@@ -272,7 +272,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent )
{
uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( i ), uno::Any() ), uno::UNO_QUERY_THROW );
sal_Int32 nColWidth = xColumn->getWidth();
- sal_Int32 nNewColWidth = ( sal_Int32 )( propFactor * nColWidth );
+ sal_Int32 nNewColWidth = static_cast<sal_Int32>( propFactor * nColWidth );
xColumn->setWidth( nNewColWidth );
}
@@ -292,7 +292,7 @@ void SwVbaRows::setIndentWithAdjustNone( sal_Int32 indent )
// get all columns, calculate and set the new width of the columns
uno::Reference< XCollection > xCol( xColumns, uno::UNO_QUERY_THROW );
sal_Int32 nColCount = xCol->getCount();
- sal_Int32 nNewColWidth = (sal_Int32)( double( nNewWidth )/nColCount );
+ sal_Int32 nNewColWidth = static_cast<sal_Int32>( double( nNewWidth )/nColCount );
for( sal_Int32 i = 0; i < nColCount; i++ )
{
uno::Reference< word::XColumn > xColumn( xCol->Item( uno::makeAny( i ), uno::Any() ), uno::UNO_QUERY_THROW );