diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:29:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:29:48 +0100 |
commit | e662242ec057ef5f922507866a88819e984fd131 (patch) | |
tree | f2c65bdb822a7da6eb1675c684825f69fbbefeca /basctl/source/dlged | |
parent | More loplugin:cstylecast: basegfx (diff) | |
download | core-e662242ec057ef5f922507866a88819e984fd131.tar.gz core-e662242ec057ef5f922507866a88819e984fd131.zip |
More loplugin:cstylecast: basctl
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: I3bddf4b08e064dead05eae87619db2232744d7f8
Diffstat (limited to 'basctl/source/dlged')
-rw-r--r-- | basctl/source/dlged/dlged.cxx | 16 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedfac.cxx | 4 | ||||
-rw-r--r-- | basctl/source/dlged/dlgedobj.cxx | 6 |
3 files changed, 13 insertions, 13 deletions
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx index 8b698c407230..4aa1315223df 100644 --- a/basctl/source/dlged/dlged.cxx +++ b/basctl/source/dlged/dlged.cxx @@ -278,8 +278,8 @@ void DlgEditor::InitScrollBars() pHScroll->SetRange( Range( 0, aPgSize.Width() )); pVScroll->SetRange( Range( 0, aPgSize.Height() )); - pHScroll->SetVisibleSize( (sal_uLong)aOutSize.Width() ); - pVScroll->SetVisibleSize( (sal_uLong)aOutSize.Height() ); + pHScroll->SetVisibleSize( static_cast<sal_uLong>(aOutSize.Width()) ); + pVScroll->SetVisibleSize( static_cast<sal_uLong>(aOutSize.Height()) ); pHScroll->SetLineSize( aOutSize.Width() / 10 ); pVScroll->SetLineSize( aOutSize.Height() / 10 ); @@ -654,7 +654,7 @@ void implCopyStreamToByteSequence( const Reference< XInputStream >& xStream, sal_Int32 nPos = bytes.getLength(); bytes.realloc( nPos + nRead ); - memcpy( bytes.getArray() + nPos, readBytes.getConstArray(), (sal_uInt32)nRead ); + memcpy( bytes.getArray() + nPos, readBytes.getConstArray(), static_cast<sal_uInt32>(nRead) ); } } @@ -934,7 +934,7 @@ void DlgEditor::Paste() // set tabindex Reference< container::XNameAccess > xNA( m_xUnoControlDialogModel , UNO_QUERY ); Sequence< OUString > aNames_ = xNA->getElementNames(); - xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) aNames_.getLength()) ); + xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any(static_cast<sal_Int16>(aNames_.getLength())) ); if( bLocalized ) { @@ -1173,13 +1173,13 @@ void DlgEditor::Print( Printer* pPrinter, const OUString& rTitle ) // not wor Size aOutputSz; if( nBmpSzHeight * nScaleX <= nPaperSzHeight ) { - aOutputSz.Width() = (long)(nBmpSzWidth * nScaleX); - aOutputSz.Height() = (long)(nBmpSzHeight * nScaleX); + aOutputSz.Width() = static_cast<long>(nBmpSzWidth * nScaleX); + aOutputSz.Height() = static_cast<long>(nBmpSzHeight * nScaleX); } else { - aOutputSz.Width() = (long)(nBmpSzWidth * nScaleY); - aOutputSz.Height() = (long)(nBmpSzHeight * nScaleY); + aOutputSz.Width() = static_cast<long>(nBmpSzWidth * nScaleY); + aOutputSz.Height() = static_cast<long>(nBmpSzHeight * nScaleY); } Point aPosOffs( diff --git a/basctl/source/dlged/dlgedfac.cxx b/basctl/source/dlged/dlgedfac.cxx index 8e9ba230d6e8..beb6ba7bfbbf 100644 --- a/basctl/source/dlged/dlgedfac.cxx +++ b/basctl/source/dlged/dlgedfac.cxx @@ -156,7 +156,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY); if (xPSet.is()) { - xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, uno::Any((sal_Int32) css::awt::ScrollBarOrientation::VERTICAL) ); + xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, uno::Any(sal_Int32(css::awt::ScrollBarOrientation::VERTICAL)) ); } } catch(...) @@ -176,7 +176,7 @@ IMPL_LINK( DlgEdFactory, MakeObject, SdrObjCreatorParams, aParams, SdrObject* ) uno::Reference< beans::XPropertySet > xPSet(pNew->GetUnoControlModel(), uno::UNO_QUERY); if (xPSet.is()) { - xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, uno::Any((sal_Int32) 1) ); + xPSet->setPropertyValue( DLGED_PROP_ORIENTATION, uno::Any(sal_Int32(1)) ); } } catch(...) diff --git a/basctl/source/dlged/dlgedobj.cxx b/basctl/source/dlged/dlgedobj.cxx index 167c48c35cc7..1bdd8718d78b 100644 --- a/basctl/source/dlged/dlgedobj.cxx +++ b/basctl/source/dlged/dlgedobj.cxx @@ -602,7 +602,7 @@ void DlgEdObj::TabIndexChange( const beans::PropertyChangeEvent& evt ) SAL_WARN("basctl", "tab " << i << " > SAL_MAX_INT16"); continue; } - xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) i) ); + xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any(static_cast<sal_Int16>(i)) ); } } @@ -873,7 +873,7 @@ void DlgEdObj::clonedFrom(const DlgEdObj* _pSource) { // set tabindex Sequence< OUString > aNames = xCont->getElementNames(); - xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any((sal_Int16) aNames.getLength()) ); + xPSet->setPropertyValue( DLGED_PROP_TABINDEX, Any(static_cast<sal_Int16>(aNames.getLength())) ); // insert control model in dialog model Reference< awt::XControlModel > xCtrl( xPSet , UNO_QUERY ); @@ -999,7 +999,7 @@ void DlgEdObj::SetDefaults() // set tabindex Sequence< OUString > aNames = xCont->getElementNames(); uno::Any aTabIndex; - aTabIndex <<= (sal_Int16) aNames.getLength(); + aTabIndex <<= static_cast<sal_Int16>(aNames.getLength()); xPSet->setPropertyValue( DLGED_PROP_TABINDEX, aTabIndex ); // set step |