diff options
author | Noel <noelgrandin@gmail.com> | 2020-10-21 15:31:38 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-10-23 08:48:52 +0200 |
commit | 0d79d216886a71436e705c93829ed66a33270a9c (patch) | |
tree | ef29702266bca9df9f39b442505479b013891517 /sd/source/ui/annotations | |
parent | e8205f38c611cfc97ca0e32c911b3d373a94d230 (diff) |
long->tools::Long in pyuno..sd
Change-Id: I67c1218d225f49ea9ce789433283ab85275e39a5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104627
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/annotations')
-rw-r--r-- | sd/source/ui/annotations/annotationtag.cxx | 10 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.cxx | 14 | ||||
-rw-r--r-- | sd/source/ui/annotations/annotationwindow.hxx | 6 |
3 files changed, 15 insertions, 15 deletions
diff --git a/sd/source/ui/annotations/annotationtag.cxx b/sd/source/ui/annotations/annotationtag.cxx index 61c8ac8b2a3d..9b5540dc73fb 100644 --- a/sd/source/ui/annotations/annotationtag.cxx +++ b/sd/source/ui/annotations/annotationtag.cxx @@ -402,8 +402,8 @@ void AnnotationTag::Move( int nDX, int nDY ) bool AnnotationTag::OnMove( const KeyEvent& rKEvt ) { - long nX = 0; - long nY = 0; + ::tools::Long nX = 0; + ::tools::Long nY = 0; switch( rKEvt.GetKeyCode().GetCode() ) { @@ -477,7 +477,7 @@ void AnnotationTag::addCustomHandles( SdrHdlList& rHandlerList ) pHdl->SetPageView( mrView.GetSdrPageView() ); RealPoint2D aPosition( mxAnnotation->getPosition() ); - Point aBasePos( static_cast<long>(aPosition.X * 100.0), static_cast<long>(aPosition.Y * 100.0) ); + Point aBasePos( static_cast<::tools::Long>(aPosition.X * 100.0), static_cast<::tools::Long>(aPosition.Y * 100.0) ); pHdl->SetPos( aBasePos ); rHandlerList.AddHdl( std::move(pHdl) ); @@ -511,7 +511,7 @@ void AnnotationTag::select() if( pWindow ) { RealPoint2D aPosition( mxAnnotation->getPosition() ); - Point aPos( static_cast<long>(aPosition.X * 100.0), static_cast<long>(aPosition.Y * 100.0) ); + Point aPos( static_cast<::tools::Long>(aPosition.X * 100.0), static_cast<::tools::Long>(aPosition.Y * 100.0) ); ::tools::Rectangle aVisRect( aPos, pWindow->PixelToLogic(maSize) ); mrView.MakeVisible(aVisRect, *pWindow); @@ -586,7 +586,7 @@ void AnnotationTag::OpenPopup( bool bEdit ) if( pWindow ) { RealPoint2D aPosition( mxAnnotation->getPosition() ); - Point aPos( pWindow->OutputToScreenPixel( pWindow->LogicToPixel( Point( static_cast<long>(aPosition.X * 100.0), static_cast<long>(aPosition.Y * 100.0) ) ) ) ); + Point aPos( pWindow->OutputToScreenPixel( pWindow->LogicToPixel( Point( static_cast<::tools::Long>(aPosition.X * 100.0), static_cast<::tools::Long>(aPosition.Y * 100.0) ) ) ) ); aPos.AdjustX(4 ); // magic! aPos.AdjustY(1 ); diff --git a/sd/source/ui/annotations/annotationwindow.cxx b/sd/source/ui/annotations/annotationwindow.cxx index 30193afc474a..5bafcbf1e6d5 100644 --- a/sd/source/ui/annotations/annotationwindow.cxx +++ b/sd/source/ui/annotations/annotationwindow.cxx @@ -137,7 +137,7 @@ void AnnotationTextWindow::KeyInput( const KeyEvent& rKeyEvt ) } else { - long aOldHeight = mpAnnotationWindow->GetPostItTextHeight(); + ::tools::Long aOldHeight = mpAnnotationWindow->GetPostItTextHeight(); bool bDone = false; /// HACK: need to switch off processing of Undo/Redo in Outliner @@ -341,7 +341,7 @@ void AnnotationWindow::Rescale() if ( mpMeta ) { vcl::Font aFont( mpMeta->GetSettings().GetStyleSettings().GetLabelFont() ); - sal_Int32 nHeight = long(aFont.GetFontHeight() * aMode.GetScaleY()); + sal_Int32 nHeight = ::tools::Long(aFont.GetFontHeight() * aMode.GetScaleY()); aFont.SetFontHeight( nHeight ); mpMeta->SetControlFont( aFont ); } @@ -350,10 +350,10 @@ void AnnotationWindow::Rescale() void AnnotationWindow::DoResize() { unsigned long aWidth = GetSizePixel().Width(); - long aHeight = GetSizePixel().Height() - POSTIT_META_HEIGHT; + ::tools::Long aHeight = GetSizePixel().Height() - POSTIT_META_HEIGHT; mpOutliner->SetPaperSize( PixelToLogic( Size(aWidth,aHeight) ) ) ; - long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height(); + ::tools::Long aTextHeight = LogicToPixel( mpOutliner->CalcTextSize()).Height(); if( aTextHeight > aHeight ) { // we need vertical scrollbars and have to reduce the width @@ -408,7 +408,7 @@ void AnnotationWindow::SetScrollbar() mpVScrollbar->SetThumbPos(mpOutlinerView->GetVisArea().Top()); } -void AnnotationWindow::ResizeIfNecessary(long aOldHeight, long aNewHeight) +void AnnotationWindow::ResizeIfNecessary(::tools::Long aOldHeight, ::tools::Long aNewHeight) { if (aOldHeight != aNewHeight) { @@ -447,14 +447,14 @@ void AnnotationWindow::ToggleInsMode() } } -long AnnotationWindow::GetPostItTextHeight() +::tools::Long AnnotationWindow::GetPostItTextHeight() { return mpOutliner ? LogicToPixel(mpOutliner->CalcTextSize()).Height() : 0; } IMPL_LINK(AnnotationWindow, ScrollHdl, ScrollBar*, pScroll, void) { - long nDiff = getView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); + ::tools::Long nDiff = getView()->GetEditView().GetVisArea().Top() - pScroll->GetThumbPos(); getView()->Scroll( 0, nDiff ); } diff --git a/sd/source/ui/annotations/annotationwindow.hxx b/sd/source/ui/annotations/annotationwindow.hxx index 0db64ef309a9..c57b4bdfce93 100644 --- a/sd/source/ui/annotations/annotationwindow.hxx +++ b/sd/source/ui/annotations/annotationwindow.hxx @@ -24,7 +24,7 @@ #include <vcl/floatwin.hxx> #include <vcl/fixed.hxx> #include <vcl/scrbar.hxx> - +#include <tools/long.hxx> #include <basegfx/polygon/b2dpolygon.hxx> namespace com::sun::star::office { class XAnnotation; } @@ -104,11 +104,11 @@ class AnnotationWindow : public FloatingWindow ::Outliner* Engine() { return mpOutliner.get(); } SdDrawDocument* Doc() { return mpDoc; } - long GetPostItTextHeight(); + ::tools::Long GetPostItTextHeight(); void InitControls(); void DoResize(); - void ResizeIfNecessary(long aOldHeight, long aNewHeight); + void ResizeIfNecessary(::tools::Long aOldHeight, ::tools::Long aNewHeight); void SetScrollbar(); void Rescale(); |