diff options
Diffstat (limited to 'sd/source/ui/slidesorter')
7 files changed, 17 insertions, 17 deletions
diff --git a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx index 5f044aaded4f..53fb945278a1 100644 --- a/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx +++ b/sd/source/ui/slidesorter/cache/SlsCacheConfiguration.cxx @@ -83,7 +83,7 @@ CacheConfiguration::CacheConfiguration() Sequence<Any> aCreationArguments(comphelper::InitAnyPropertySequence( { {"nodepath", makeAny(sPathToImpressConfigurationRoot)}, - {"depth", makeAny((sal_Int32)-1)} + {"depth", makeAny(sal_Int32(-1))} })); Reference<XInterface> xRoot (xProvider->createInstanceWithArguments( diff --git a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx index b65926d52844..66b518187ef5 100644 --- a/sd/source/ui/slidesorter/controller/SlsClipboard.cxx +++ b/sd/source/ui/slidesorter/controller/SlsClipboard.cxx @@ -307,7 +307,7 @@ sal_Int32 Clipboard::PasteTransferable (sal_Int32 nInsertPosition) const std::vector<OUString> &rBookmarkList = pClipTransferable->GetPageBookmarks(); const SolarMutexGuard aGuard; - nInsertPageCount = (sal_uInt16) rBookmarkList.size(); + nInsertPageCount = static_cast<sal_uInt16>(rBookmarkList.size()); rModel.GetDocument()->InsertBookmarkAsPage( rBookmarkList, nullptr, diff --git a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx index 9d34a23dbb2c..ebc6a5c2b109 100644 --- a/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsScrollBarManager.cxx @@ -143,7 +143,7 @@ void ScrollBarManager::PlaceHorizontalScrollBar (const ::tools::Rectangle& aAvai // Restore the relative position. mpHorizontalScrollBar->SetThumbPos( - (long)(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len())); + static_cast<long>(0.5 + mnHorizontalPosition * mpHorizontalScrollBar->GetRange().Len())); } void ScrollBarManager::PlaceVerticalScrollBar (const ::tools::Rectangle& aArea) @@ -278,8 +278,8 @@ void ScrollBarManager::SetWindowOrigin ( sd::Window *pWindow (mrSlideSorter.GetContentWindow().get()); Size aViewSize (pWindow->GetViewSize()); Point aOrigin ( - (long int) (mnHorizontalPosition * aViewSize.Width()), - (long int) (mnVerticalPosition * aViewSize.Height())); + static_cast<long int>(mnHorizontalPosition * aViewSize.Width()), + static_cast<long int>(mnVerticalPosition * aViewSize.Height())); pWindow->SetWinViewPos (aOrigin); pWindow->UpdateMapMode (); @@ -448,14 +448,14 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition) if (rMouseWindowPosition.X() < maScrollBorder.Width() && aWindowArea.Left() > aViewPixelArea.Left()) { - nDx = -1 + (int)(mnHorizontalScrollFactor + nDx = -1 + static_cast<int>(mnHorizontalScrollFactor * (rMouseWindowPosition.X() - maScrollBorder.Width())); } if (rMouseWindowPosition.X() >= (aWindowSize.Width() - maScrollBorder.Width()) && aWindowArea.Right() < aViewPixelArea.Right()) { - nDx = 1 + (int)(mnHorizontalScrollFactor + nDx = 1 + static_cast<int>(mnHorizontalScrollFactor * (rMouseWindowPosition.X() - aWindowSize.Width() + maScrollBorder.Width())); } @@ -467,14 +467,14 @@ void ScrollBarManager::CalcAutoScrollOffset (const Point& rMouseWindowPosition) if (rMouseWindowPosition.Y() < maScrollBorder.Height() && aWindowArea.Top() > aViewPixelArea.Top()) { - nDy = -1 + (int)(mnVerticalScrollFactor + nDy = -1 + static_cast<int>(mnVerticalScrollFactor * (rMouseWindowPosition.Y() - maScrollBorder.Height())); } if (rMouseWindowPosition.Y() >= (aWindowSize.Height() - maScrollBorder.Height()) && aWindowArea.Bottom() < aViewPixelArea.Bottom()) { - nDy = 1 + (int)(mnVerticalScrollFactor + nDy = 1 + static_cast<int>(mnVerticalScrollFactor * (rMouseWindowPosition.Y() - aWindowSize.Height() + maScrollBorder.Height())); } diff --git a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx index b299f00ed748..255b3a3792f8 100644 --- a/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx @@ -623,7 +623,7 @@ void SelectionFunction::GotoNextPage (int nOffset) void SelectionFunction::GotoPage (int nIndex) { - sal_uInt16 nPageCount = (sal_uInt16)mrSlideSorter.GetModel().GetPageCount(); + sal_uInt16 nPageCount = static_cast<sal_uInt16>(mrSlideSorter.GetModel().GetPageCount()); if (nIndex >= nPageCount) nIndex = nPageCount - 1; diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx index a21f520af711..461e079f8304 100644 --- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx +++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx @@ -500,7 +500,7 @@ void SlotManager::GetAttrState (SfxItemSet& rSet) rSet.Put ( SfxUInt16Item ( nSlotId, - (sal_uInt16)mrSlideSorter.GetView().GetLayouter().GetColumnCount() + static_cast<sal_uInt16>(mrSlideSorter.GetView().GetLayouter().GetColumnCount()) ) ); break; @@ -1054,7 +1054,7 @@ void SlotManager::InsertSlide (SfxRequest& rRequest) // Create shapes for the default layout. pNewPage = pDocument->GetMasterSdPage( - (sal_uInt16)(nInsertionIndex+1), PageKind::Standard); + static_cast<sal_uInt16>(nInsertionIndex+1), PageKind::Standard); pNewPage->CreateTitleAndLayout (true,true); } } diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx index 0267860dfecc..31d99706bd68 100644 --- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx +++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx @@ -635,9 +635,9 @@ SdPage* SlideSorterModel::GetPage (const sal_Int32 nSdIndex) const if (pModel != nullptr) { if (meEditMode == EditMode::Page) - return pModel->GetSdPage ((sal_uInt16)nSdIndex, PageKind::Standard); + return pModel->GetSdPage (static_cast<sal_uInt16>(nSdIndex), PageKind::Standard); else - return pModel->GetMasterSdPage ((sal_uInt16)nSdIndex, PageKind::Standard); + return pModel->GetMasterSdPage (static_cast<sal_uInt16>(nSdIndex), PageKind::Standard); } else return nullptr; diff --git a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx index b0f6bc32031a..bd5271954aa8 100644 --- a/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx +++ b/sd/source/ui/slidesorter/shell/SlideSorterViewShell.cxx @@ -547,7 +547,7 @@ void SlideSorterViewShell::WriteFrameViewData() if (mpFrameView != nullptr) { view::SlideSorterView& rView (mpSlideSorter->GetView()); - mpFrameView->SetSlidesPerRow((sal_uInt16)rView.GetLayouter().GetColumnCount()); + mpFrameView->SetSlidesPerRow(static_cast<sal_uInt16>(rView.GetLayouter().GetColumnCount())); // DrawMode for 'main' window if( mpFrameView->GetDrawMode() != GetActiveWindow()->GetDrawMode() ) @@ -567,7 +567,7 @@ void SlideSorterViewShell::WriteFrameViewData() // We have no current page to set but at least we can make sure // that the index of the frame view has a legal value. if (mpFrameView->GetSelectedPage() >= mpSlideSorter->GetModel().GetPageCount()) - mpFrameView->SetSelectedPage((sal_uInt16)mpSlideSorter->GetModel().GetPageCount()-1); + mpFrameView->SetSelectedPage(static_cast<sal_uInt16>(mpSlideSorter->GetModel().GetPageCount())-1); } } } @@ -738,7 +738,7 @@ void SlideSorterViewShell::ExecMovePageFirst (SfxRequest& /*rReq*/) SyncPageSelectionToDocument(xSelection); // Moves selected pages after page -1 - GetDoc()->MovePages( (sal_uInt16) -1 ); + GetDoc()->MovePages( sal_uInt16(-1) ); PostMoveSlidesActions(xSelection); } |