diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:16:14 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-01-12 20:16:14 +0100 |
commit | 48db069fd7341ad8128d0e9a5fbcc5b092fe9860 (patch) | |
tree | 1e7e14069f35086928b11f48c0a67dedec8730bc /sfx2/source/view | |
parent | 5e7e3c3bd7bd10a9f7216d4d9fa8f2c61bf2db3e (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/view')
-rw-r--r-- | sfx2/source/view/frame.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/frame2.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/view/lokhelper.cxx | 12 | ||||
-rw-r--r-- | sfx2/source/view/sfxbasecontroller.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/view/viewsh.cxx | 2 |
5 files changed, 11 insertions, 11 deletions
diff --git a/sfx2/source/view/frame.cxx b/sfx2/source/view/frame.cxx index ab0f73e38434..af0e596a2440 100644 --- a/sfx2/source/view/frame.cxx +++ b/sfx2/source/view/frame.cxx @@ -304,7 +304,7 @@ void SfxFrame::GetViewData_Impl() } if ( pViewFrame->GetCurViewId() ) - pSet->Put( SfxUInt16Item( SID_VIEW_ID, (sal_uInt16)pViewFrame->GetCurViewId() ) ); + pSet->Put( SfxUInt16Item( SID_VIEW_ID, static_cast<sal_uInt16>(pViewFrame->GetCurViewId()) ) ); } } diff --git a/sfx2/source/view/frame2.cxx b/sfx2/source/view/frame2.cxx index 51763ea50f03..663d9bfef299 100644 --- a/sfx2/source/view/frame2.cxx +++ b/sfx2/source/view/frame2.cxx @@ -242,7 +242,7 @@ SfxFrame* SfxFrame::Create( SfxObjectShell const & rDoc, vcl::Window& rWindow, S aArgs.put( "Model", rDoc.GetModel() ); aArgs.put( "Hidden", bHidden ); if ( nViewId != SFX_INTERFACE_NONE ) - aArgs.put( "ViewId", (sal_uInt16)nViewId ); + aArgs.put( "ViewId", static_cast<sal_uInt16>(nViewId) ); aLoadArgs = aArgs.getPropertyValues(); diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx index 6fd6a7699038..b84496be2c27 100644 --- a/sfx2/source/view/lokhelper.cxx +++ b/sfx2/source/view/lokhelper.cxx @@ -32,7 +32,7 @@ int SfxLokHelper::createView() SfxViewShell* pViewShell = SfxViewShell::Current(); if (!pViewShell) return -1; - return (sal_Int32)pViewShell->GetViewShellId(); + return static_cast<sal_Int32>(pViewShell->GetViewShellId()); } void SfxLokHelper::destroyView(int nId) @@ -46,7 +46,7 @@ void SfxLokHelper::destroyView(int nId) for (SfxViewShell* pViewShell : rViewArr) { - if ((sal_Int32)pViewShell->GetViewShellId() == nViewShellId) + if (static_cast<sal_Int32>(pViewShell->GetViewShellId()) == nViewShellId) { SfxViewFrame* pViewFrame = pViewShell->GetViewFrame(); SfxRequest aRequest(pViewFrame, SID_CLOSEWIN); @@ -67,7 +67,7 @@ void SfxLokHelper::setView(int nId) for (SfxViewShell* pViewShell : rViewArr) { - if ((sal_Int32)pViewShell->GetViewShellId() == nViewShellId) + if (static_cast<sal_Int32>(pViewShell->GetViewShellId()) == nViewShellId) { // update the current LOK language for the dialog tunneling comphelper::LibreOfficeKit::setLanguageTag(pViewShell->GetLOKLanguageTag()); @@ -96,7 +96,7 @@ int SfxLokHelper::getView(SfxViewShell* pViewShell) if (!pViewShell) return -1; - return (sal_Int32)pViewShell->GetViewShellId(); + return static_cast<sal_Int32>(pViewShell->GetViewShellId()); } std::size_t SfxLokHelper::getViewsCount() @@ -118,7 +118,7 @@ bool SfxLokHelper::getViewIds(int* pArray, size_t nSize) for (std::size_t i = 0; i < rViewArr.size(); ++i) { SfxViewShell* pViewShell = rViewArr[i]; - pArray[i] = (sal_Int32)pViewShell->GetViewShellId(); + pArray[i] = static_cast<sal_Int32>(pViewShell->GetViewShellId()); } return true; } @@ -194,7 +194,7 @@ void SfxLokHelper::notifyInvalidation(SfxViewShell const* pThisView, const OStri if (comphelper::LibreOfficeKit::isPartInInvalidation()) { aBuf.append(", "); - aBuf.append((sal_Int32) pThisView->getPart()); + aBuf.append(static_cast<sal_Int32>(pThisView->getPart())); } pThisView->libreOfficeKitViewCallback(LOK_CALLBACK_INVALIDATE_TILES, aBuf.makeStringAndClear().getStr()); } diff --git a/sfx2/source/view/sfxbasecontroller.cxx b/sfx2/source/view/sfxbasecontroller.cxx index 145caa12f666..827ec6237081 100644 --- a/sfx2/source/view/sfxbasecontroller.cxx +++ b/sfx2/source/view/sfxbasecontroller.cxx @@ -173,7 +173,7 @@ sal_Int16 MapGroupIDToCommandGroup( SfxGroupId nGroupID ) sal_uInt32 Get10ThSec() { - sal_uInt32 n10Ticks = 10 * (sal_uInt32)clock(); + sal_uInt32 n10Ticks = 10 * static_cast<sal_uInt32>(clock()); return n10Ticks / CLOCKS_PER_SEC; } @@ -777,7 +777,7 @@ Reference< frame::XDispatch > SAL_CALL SfxBaseController::queryDispatch( const } else if ( aURL.Protocol == "slot:" ) { - sal_uInt16 nId = (sal_uInt16) aURL.Path.toInt32(); + sal_uInt16 nId = static_cast<sal_uInt16>(aURL.Path.toInt32()); pAct = m_pData->m_pViewShell->GetViewFrame() ; if (nId >= SID_VERB_START && nId <= SID_VERB_END) diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx index 7ebc86176495..0f05946039f2 100644 --- a/sfx2/source/view/viewsh.cxx +++ b/sfx2/source/view/viewsh.cxx @@ -1533,7 +1533,7 @@ void SfxViewShell::dumpAsXml(xmlTextWriterPtr pWriter) const { xmlTextWriterStartElement(pWriter, BAD_CAST("SfxViewShell")); xmlTextWriterWriteFormatAttribute(pWriter, BAD_CAST("ptr"), "%p", this); - xmlTextWriterWriteAttribute(pWriter, BAD_CAST("id"), BAD_CAST(OString::number((sal_Int32)GetViewShellId()).getStr())); + xmlTextWriterWriteAttribute(pWriter, BAD_CAST("id"), BAD_CAST(OString::number(static_cast<sal_Int32>(GetViewShellId())).getStr())); xmlTextWriterEndElement(pWriter); } |