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 /reportdesign | |
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 'reportdesign')
-rw-r--r-- | reportdesign/source/ui/dlg/GroupsSorting.cxx | 40 | ||||
-rw-r--r-- | reportdesign/source/ui/inc/SectionWindow.hxx | 2 | ||||
-rw-r--r-- | reportdesign/source/ui/report/DesignView.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/ui/report/EndMarker.cxx | 4 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ReportWindow.cxx | 24 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ScrollHelper.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/ui/report/SectionWindow.cxx | 10 | ||||
-rw-r--r-- | reportdesign/source/ui/report/StartMarker.cxx | 26 | ||||
-rw-r--r-- | reportdesign/source/ui/report/ViewsWindow.cxx | 40 | ||||
-rw-r--r-- | reportdesign/source/ui/report/dlgedfunc.cxx | 10 |
10 files changed, 88 insertions, 88 deletions
diff --git a/reportdesign/source/ui/dlg/GroupsSorting.cxx b/reportdesign/source/ui/dlg/GroupsSorting.cxx index 4b6777e83ef2..25b8cdd68b7d 100644 --- a/reportdesign/source/ui/dlg/GroupsSorting.cxx +++ b/reportdesign/source/ui/dlg/GroupsSorting.cxx @@ -133,18 +133,18 @@ public: */ void moveGroups(const uno::Sequence<uno::Any>& _aGroups,sal_Int32 _nRow,bool _bSelect = true); - virtual bool CursorMoving(long nNewRow, sal_uInt16 nNewCol) override; + virtual bool CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) override; using ::svt::EditBrowseBox::GetRowCount; protected: virtual bool IsTabAllowed(bool bForward) const override; - virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override; - virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; + virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override; + virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override; virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColId ) const override; - virtual bool SeekRow( long nRow ) override; + virtual bool SeekRow( tools::Long nRow ) override; virtual bool SaveModified() override; - virtual OUString GetCellText( long nRow, sal_uInt16 nColId ) const override; - virtual RowStatus GetRowStatus(long nRow) const override; + virtual OUString GetCellText( tools::Long nRow, sal_uInt16 nColId ) const override; + virtual RowStatus GetRowStatus(tools::Long nRow) const override; virtual void KeyInput(const KeyEvent& rEvt) override; virtual void Command( const CommandEvent& rEvt ) override; @@ -224,7 +224,7 @@ uno::Sequence<uno::Any> OFieldExpressionControl::fillSelectedGroups() sal_Int32 nCount = xGroups->getCount(); if ( nCount >= 1 ) { - for( long nIndex=FirstSelectedRow(); nIndex != SFX_ENDOFSELECTION; nIndex=NextSelectedRow() ) + for( tools::Long nIndex=FirstSelectedRow(); nIndex != SFX_ENDOFSELECTION; nIndex=NextSelectedRow() ) { try { @@ -483,7 +483,7 @@ bool OFieldExpressionControl::SaveModified() return true; } -OUString OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ ) const +OUString OFieldExpressionControl::GetCellText( tools::Long nRow, sal_uInt16 /*nColId*/ ) const { OUString sText; if ( nRow != BROWSER_ENDOFSELECTION && m_aGroupPositions[nRow] != NO_GROUP ) @@ -507,19 +507,19 @@ OUString OFieldExpressionControl::GetCellText( long nRow, sal_uInt16 /*nColId*/ return sText; } -void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, long nRow, sal_uInt16 nColumnId ) +void OFieldExpressionControl::InitController( CellControllerRef& /*rController*/, tools::Long nRow, sal_uInt16 nColumnId ) { weld::ComboBox& rComboBox = m_pComboCell->get_widget(); rComboBox.set_entry_text(GetCellText(nRow, nColumnId)); } -bool OFieldExpressionControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) +bool OFieldExpressionControl::CursorMoving(tools::Long nNewRow, sal_uInt16 nNewCol) { if (!EditBrowseBox::CursorMoving(nNewRow, nNewCol)) return false; m_nDataPos = nNewRow; - long nOldDataPos = GetCurRow(); + tools::Long nOldDataPos = GetCurRow(); InvalidateStatusCell( m_nDataPos ); InvalidateStatusCell( nOldDataPos ); @@ -528,14 +528,14 @@ bool OFieldExpressionControl::CursorMoving(long nNewRow, sal_uInt16 nNewCol) return true; } -CellController* OFieldExpressionControl::GetController( long /*nRow*/, sal_uInt16 /*nColumnId*/ ) +CellController* OFieldExpressionControl::GetController( tools::Long /*nRow*/, sal_uInt16 /*nColumnId*/ ) { ComboBoxCellController* pCellController = new ComboBoxCellController( m_pComboCell ); pCellController->GetComboBox().set_entry_editable(m_pParent->m_pController->isEditable()); return pCellController; } -bool OFieldExpressionControl::SeekRow( long _nRow ) +bool OFieldExpressionControl::SeekRow( tools::Long _nRow ) { // the basis class needs the call, because that's how the class knows which line will be painted EditBrowseBox::SeekRow(_nRow); @@ -560,11 +560,11 @@ void OFieldExpressionControl::PaintCell( OutputDevice& rDev, const tools::Rectan rDev.SetClipRegion(); } -EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(long nRow) const +EditBrowseBox::RowStatus OFieldExpressionControl::GetRowStatus(tools::Long nRow) const { if (nRow >= 0 && nRow == m_nDataPos) return EditBrowseBox::CURRENT; - if ( nRow != BROWSER_ENDOFSELECTION && nRow < static_cast<long>(m_aGroupPositions.size()) && m_aGroupPositions[nRow] != NO_GROUP ) + if ( nRow != BROWSER_ENDOFSELECTION && nRow < static_cast<tools::Long>(m_aGroupPositions.size()) && m_aGroupPositions[nRow] != NO_GROUP ) { try { @@ -682,7 +682,7 @@ void OFieldExpressionControl::Command(const CommandEvent& rEvt) if ( nColId == HANDLE_ID ) { bool bEnable = false; - long nIndex = FirstSelectedRow(); + tools::Long nIndex = FirstSelectedRow(); while( nIndex != SFX_ENDOFSELECTION && !bEnable ) { if ( m_aGroupPositions[nIndex] != NO_GROUP ) @@ -715,14 +715,14 @@ void OFieldExpressionControl::DeleteRows() { DeactivateCell(); } - long nIndex = FirstSelectedRow(); + tools::Long nIndex = FirstSelectedRow(); if (nIndex == SFX_ENDOFSELECTION) { nIndex = GetCurRow(); } bool bFirstTime = true; - long nOldDataPos = nIndex; + tools::Long nOldDataPos = nIndex; uno::Sequence< beans::PropertyValue > aArgs(1); aArgs[0].Name = PROPERTY_GROUP; m_bIgnoreEvent = true; @@ -844,7 +844,7 @@ OGroupsSortingDialog::~OGroupsSortingDialog() void OGroupsSortingDialog::UpdateData( ) { m_xFieldExpression->Invalidate(); - long nCurRow = m_xFieldExpression->GetCurRow(); + tools::Long nCurRow = m_xFieldExpression->GetCurRow(); m_xFieldExpression->DeactivateCell(); m_xFieldExpression->ActivateCell(nCurRow, m_xFieldExpression->GetCurColumnId()); DisplayData(nCurRow); @@ -973,7 +973,7 @@ IMPL_LINK(OGroupsSortingDialog, OnFormatAction, const OString&, rCommand, void) if ( !m_xFieldExpression ) return; - long nIndex = m_xFieldExpression->GetCurrRow(); + tools::Long nIndex = m_xFieldExpression->GetCurrRow(); sal_Int32 nGroupPos = m_xFieldExpression->getGroupPosition(nIndex); uno::Sequence<uno::Any> aClipboardList; if ( nIndex >= 0 && nGroupPos != NO_GROUP ) diff --git a/reportdesign/source/ui/inc/SectionWindow.hxx b/reportdesign/source/ui/inc/SectionWindow.hxx index 2ef3e8b17006..a202b0a19315 100644 --- a/reportdesign/source/ui/inc/SectionWindow.hxx +++ b/reportdesign/source/ui/inc/SectionWindow.hxx @@ -122,7 +122,7 @@ namespace rptui */ void zoom(const Fraction& _aZoom); - void scrollChildren(long _nThumbPosX); + void scrollChildren(tools::Long _nThumbPosX); }; } // rptui diff --git a/reportdesign/source/ui/report/DesignView.cxx b/reportdesign/source/ui/report/DesignView.cxx index 6332f8b49f48..dc85e34acd2d 100644 --- a/reportdesign/source/ui/report/DesignView.cxx +++ b/reportdesign/source/ui/report/DesignView.cxx @@ -223,7 +223,7 @@ void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground) || ( nSplitPos >= aPlaygroundSize.Width() ) ) { - long nMinWidth = static_cast<long>(0.1*aPlaygroundSize.Width()); + tools::Long nMinWidth = static_cast<tools::Long>(0.1*aPlaygroundSize.Width()); if ( m_pPropWin && m_pPropWin->IsVisible() ) nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width(); nSplitPos = static_cast<sal_Int32>(_rPlayground.Right() - nMinWidth); @@ -234,7 +234,7 @@ void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground) if ( m_aSplitWin->IsItemValid(TASKPANE_ID) ) { // normalize the split pos - const long nSplitterWidth = StyleSettings::GetSplitSize(); + const tools::Long nSplitterWidth = StyleSettings::GetSplitSize(); Point aTaskPanePos(nSplitPos + nSplitterWidth, _rPlayground.Top()); if (m_pTaskPane && m_pTaskPane->IsVisible() && m_pPropWin) { @@ -247,7 +247,7 @@ void ODesignView::resizeDocumentView(tools::Rectangle& _rPlayground) nSplitPos = aTaskPanePos.X() - nSplitterWidth; getController().setSplitPos(nSplitPos); - const long nTaskPaneSize = static_cast<long>((aPlaygroundSize.Width() - aTaskPanePos.X())*100/aPlaygroundSize.Width()); + const tools::Long nTaskPaneSize = static_cast<tools::Long>((aPlaygroundSize.Width() - aTaskPanePos.X())*100/aPlaygroundSize.Width()); if ( m_aSplitWin->GetItemSize( TASKPANE_ID ) != nTaskPaneSize ) { m_aSplitWin->SetItemSize( REPORT_ID, 99 - nTaskPaneSize ); @@ -399,8 +399,8 @@ void ODesignView::ImplInitSettings() IMPL_LINK_NOARG( ODesignView, SplitHdl, SplitWindow*, void ) { const Size aOutputSize = GetOutputSizePixel(); - const long nTest = aOutputSize.Width() * m_aSplitWin->GetItemSize(TASKPANE_ID) / 100; - long nMinWidth = static_cast<long>(0.1*aOutputSize.Width()); + const tools::Long nTest = aOutputSize.Width() * m_aSplitWin->GetItemSize(TASKPANE_ID) / 100; + tools::Long nMinWidth = static_cast<tools::Long>(0.1*aOutputSize.Width()); if ( m_pPropWin && m_pPropWin->IsVisible() ) nMinWidth = m_pPropWin->GetMinOutputSizePixel().Width(); diff --git a/reportdesign/source/ui/report/EndMarker.cxx b/reportdesign/source/ui/report/EndMarker.cxx index 4dd537fae143..ae79c968f12c 100644 --- a/reportdesign/source/ui/report/EndMarker.cxx +++ b/reportdesign/source/ui/report/EndMarker.cxx @@ -44,9 +44,9 @@ OEndMarker::~OEndMarker() void OEndMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { - Fraction aCornerSpace(long(CORNER_SPACE)); + Fraction aCornerSpace(tools::Long(CORNER_SPACE)); aCornerSpace *= rRenderContext.GetMapMode().GetScaleX(); - const long nCornerSpace = long(aCornerSpace); + const tools::Long nCornerSpace = tools::Long(aCornerSpace); Size aSize = GetSizePixel(); aSize.AdjustWidth(nCornerSpace ); diff --git a/reportdesign/source/ui/report/ReportWindow.cxx b/reportdesign/source/ui/report/ReportWindow.cxx index b0b6197015d7..e6bd5325b2df 100644 --- a/reportdesign/source/ui/report/ReportWindow.cxx +++ b/reportdesign/source/ui/report/ReportWindow.cxx @@ -135,9 +135,9 @@ void OReportWindow::showRuler(bool _bShow) sal_Int32 OReportWindow::getMaxMarkerWidth() const { - Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + Fraction aStartWidth(tools::Long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= m_aViewsWindow->GetMapMode().GetScaleX(); - return sal_Int32(static_cast<long>(aStartWidth)); + return sal_Int32(static_cast<tools::Long>(aStartWidth)); } sal_Int32 OReportWindow::GetTotalWidth() const @@ -145,13 +145,13 @@ sal_Int32 OReportWindow::GetTotalWidth() const sal_Int32 nWidth = 0; if ( !m_aViewsWindow->empty() ) { - Fraction aStartWidth(long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); + Fraction aStartWidth(tools::Long(REPORT_ENDMARKER_WIDTH + REPORT_STARTMARKER_WIDTH )); const Fraction aZoom(m_pView->getController().getZoomValue(),100); aStartWidth *= aZoom; sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(m_pView->getController().getReportDefinition(),PROPERTY_PAPERSIZE).Width; - nPaperWidth = long(nPaperWidth * aZoom); + nPaperWidth = tools::Long(nPaperWidth * aZoom); const Size aPageSize = LogicToPixel(Size(nPaperWidth,0)); - nWidth = aPageSize.Width() + long(aStartWidth); + nWidth = aPageSize.Width() + tools::Long(aStartWidth); } return nWidth; } @@ -163,10 +163,10 @@ void OReportWindow::Resize() return; const Size aTotalOutputSize = GetOutputSizePixel(); - Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); + Fraction aStartWidth(tools::Long(REPORT_STARTMARKER_WIDTH)*m_pView->getController().getZoomValue(),100); const Point aOffset = LogicToPixel(Point(SECTION_OFFSET, 0), MapMode(MapUnit::MapAppFont)); - Point aStartPoint(static_cast<long>(aStartWidth) + aOffset.X(),0); + Point aStartPoint(static_cast<tools::Long>(aStartWidth) + aOffset.X(),0); uno::Reference<report::XReportDefinition> xReportDefinition = getReportView()->getController().getReportDefinition(); const sal_Int32 nPaperWidth = getStyleProperty<awt::Size>(xReportDefinition,PROPERTY_PAPERSIZE).Width; sal_Int32 nLeftMargin = getStyleProperty<sal_Int32>(xReportDefinition,PROPERTY_LEFTMARGIN); @@ -177,8 +177,8 @@ void OReportWindow::Resize() aPageSize.setHeight( m_aHRuler->GetSizePixel().Height() ); - const long nTermp(m_aViewsWindow->getTotalHeight() + aPageSize.Height()); - long nSectionsHeight = ::std::max<long>(nTermp,aTotalOutputSize.Height()); + const tools::Long nTermp(m_aViewsWindow->getTotalHeight() + aPageSize.Height()); + tools::Long nSectionsHeight = ::std::max<long>(nTermp,aTotalOutputSize.Height()); m_aHRuler->SetPosSizePixel(aStartPoint,aPageSize); m_aHRuler->SetNullOffset(nLeftMargin); @@ -404,14 +404,14 @@ sal_uInt16 OReportWindow::getZoomFactor(SvxZoomType _eType) const break; case SvxZoomType::WHOLEPAGE: { - nZoom = static_cast<sal_uInt16>(static_cast<long>(Fraction(aSize.Width()*100,impl_getRealPixelWidth()))); + nZoom = static_cast<sal_uInt16>(static_cast<tools::Long>(Fraction(aSize.Width()*100,impl_getRealPixelWidth()))); MapMode aMap( MapUnit::Map100thMM ); const Size aHeight = m_aViewsWindow->LogicToPixel(m_aViewsWindow->PixelToLogic(Size(0,GetTotalHeight() + m_aHRuler->GetSizePixel().Height())),aMap); - nZoom = ::std::min(nZoom,static_cast<sal_uInt16>(static_cast<long>(Fraction(aSize.Height()*100,aHeight.Height())))); + nZoom = ::std::min(nZoom,static_cast<sal_uInt16>(static_cast<tools::Long>(Fraction(aSize.Height()*100,aHeight.Height())))); } break; case SvxZoomType::PAGEWIDTH: - nZoom = static_cast<sal_uInt16>(static_cast<long>(Fraction(aSize.Width()*100,impl_getRealPixelWidth()))); + nZoom = static_cast<sal_uInt16>(static_cast<tools::Long>(Fraction(aSize.Width()*100,impl_getRealPixelWidth()))); break; default: break; diff --git a/reportdesign/source/ui/report/ScrollHelper.cxx b/reportdesign/source/ui/report/ScrollHelper.cxx index 0f64f0ac1b8d..a7a8fda02ad3 100644 --- a/reportdesign/source/ui/report/ScrollHelper.cxx +++ b/reportdesign/source/ui/report/ScrollHelper.cxx @@ -110,7 +110,7 @@ void OScrollWindowHelper::setTotalSize(sal_Int32 _nWidth ,sal_Int32 _nHeight) // now set the ranges without start marker Fraction aStartWidth(REPORT_STARTMARKER_WIDTH * m_pParent->getController().getZoomValue(),100); - long nWidth = long(_nWidth - static_cast<double>(aStartWidth)); + tools::Long nWidth = tools::Long(_nWidth - static_cast<double>(aStartWidth)); m_aHScroll->SetRangeMax( nWidth ); m_aVScroll->SetRangeMax( m_aTotalPixelSize.Height() ); @@ -126,7 +126,7 @@ Size OScrollWindowHelper::ResizeScrollBars() aOutPixSz.AdjustHeight( -(m_aReportWindow->getRulerHeight()) ); // determine the size of the output-area and if we need scrollbars - const long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); + const tools::Long nScrSize = GetSettings().GetStyleSettings().GetScrollBarSize(); bool bVVisible = false; // by default no vertical-ScrollBar bool bHVisible = false; // by default no horizontal-ScrollBar bool bChanged; // determines if a visiblility was changed @@ -171,9 +171,9 @@ Size OScrollWindowHelper::ResizeScrollBars() const Point aOffset = LogicToPixel(Point(SECTION_OFFSET, SECTION_OFFSET), MapMode(MapUnit::MapAppFont)); // resize scrollbars and set their ranges { - Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); - const sal_Int32 nNewWidth = aOutPixSz.Width() - aOffset.X() - static_cast<long>(aStartWidth); - lcl_setScrollBar(nNewWidth,Point( static_cast<long>(aStartWidth) + aOffset.X(), aOutPixSz.Height() ), Size( nNewWidth, nScrSize ), *m_aHScroll); + Fraction aStartWidth(tools::Long(REPORT_STARTMARKER_WIDTH*m_pParent->getController().getZoomValue()),100); + const sal_Int32 nNewWidth = aOutPixSz.Width() - aOffset.X() - static_cast<tools::Long>(aStartWidth); + lcl_setScrollBar(nNewWidth,Point( static_cast<tools::Long>(aStartWidth) + aOffset.X(), aOutPixSz.Height() ), Size( nNewWidth, nScrSize ), *m_aHScroll); } { const sal_Int32 nNewHeight = aOutPixSz.Height() - m_aReportWindow->getRulerHeight(); diff --git a/reportdesign/source/ui/report/SectionWindow.cxx b/reportdesign/source/ui/report/SectionWindow.cxx index 627490e62f53..8d05c77f4c00 100644 --- a/reportdesign/source/ui/report/SectionWindow.cxx +++ b/reportdesign/source/ui/report/SectionWindow.cxx @@ -227,7 +227,7 @@ void OSectionWindow::Resize() Window::Resize(); Size aOutputSize = GetOutputSizePixel(); - long nEndWidth = long(REPORT_ENDMARKER_WIDTH * GetMapMode().GetScaleX()); + tools::Long nEndWidth = tools::Long(REPORT_ENDMARKER_WIDTH * GetMapMode().GetScaleX()); const Point aThumbPos = m_pParent->getView()->getThumbPos(); aOutputSize.AdjustWidth( -(aThumbPos.X()) ); @@ -242,7 +242,7 @@ void OSectionWindow::Resize() { const bool bShowEndMarker = m_pParent->getView()->GetTotalWidth() <= (aThumbPos.X() + aOutputSize.Width() ); - long nStartWidth = long(REPORT_STARTMARKER_WIDTH * GetMapMode().GetScaleX()); + tools::Long nStartWidth = tools::Long(REPORT_STARTMARKER_WIDTH * GetMapMode().GetScaleX()); // set start marker m_aStartMarker->SetPosSizePixel(Point(0,0),Size(nStartWidth,aOutputSize.Height())); @@ -260,7 +260,7 @@ void OSectionWindow::Resize() // set splitter aReportPos.AdjustY(aSectionSize.Height() ); m_aSplitter->SetPosSizePixel(aReportPos,Size(aSectionSize.Width(),m_aSplitter->GetSizePixel().Height())); - aSectionSize.setHeight( static_cast<long>(1000 * static_cast<double>(GetMapMode().GetScaleY())) ); + aSectionSize.setHeight( static_cast<tools::Long>(1000 * static_cast<double>(GetMapMode().GetScaleY())) ); m_aSplitter->SetDragRectPixel( tools::Rectangle(Point(nStartWidth,0),aSectionSize)); // set end marker @@ -357,14 +357,14 @@ static void lcl_scroll(vcl::Window& _rWindow,const Point& _aDelta) _rWindow.Invalidate(InvalidateFlags::Transparent); } -static void lcl_setOrigin(vcl::Window& _rWindow,long _nX, long _nY) +static void lcl_setOrigin(vcl::Window& _rWindow,tools::Long _nX, tools::Long _nY) { MapMode aMap = _rWindow.GetMapMode(); aMap.SetOrigin( Point(- _nX, - _nY)); _rWindow.SetMapMode( aMap ); } -void OSectionWindow::scrollChildren(long _nX) +void OSectionWindow::scrollChildren(tools::Long _nX) { const Point aDelta( _nX,0 ); diff --git a/reportdesign/source/ui/report/StartMarker.cxx b/reportdesign/source/ui/report/StartMarker.cxx index 09a118f41a97..fdc6ccbc4a63 100644 --- a/reportdesign/source/ui/report/StartMarker.cxx +++ b/reportdesign/source/ui/report/StartMarker.cxx @@ -99,15 +99,15 @@ void OStartMarker::dispose() sal_Int32 OStartMarker::getMinHeight() const { - Fraction aExtraWidth(long(2 * REPORT_EXTRA_SPACE)); + Fraction aExtraWidth(tools::Long(2 * REPORT_EXTRA_SPACE)); aExtraWidth *= GetMapMode().GetScaleX(); - return LogicToPixel(Size(0, m_aText->GetTextHeight())).Height() + long(aExtraWidth); + return LogicToPixel(Size(0, m_aText->GetTextHeight())).Height() + tools::Long(aExtraWidth); } void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& /*rRect*/) { Size aSize(GetOutputSizePixel()); - const long nCornerWidth = long(CORNER_SPACE * double(GetMapMode().GetScaleX())); + const tools::Long nCornerWidth = tools::Long(CORNER_SPACE * double(GetMapMode().GetScaleX())); if (isCollapsed()) { @@ -115,8 +115,8 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan } else { - const long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); - long nSize = aSize.Width() - nVRulerWidth; + const tools::Long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); + tools::Long nSize = aSize.Width() - nVRulerWidth; aSize.AdjustWidth(nCornerWidth ); rRenderContext.SetClipRegion(vcl::Region(rRenderContext.PixelToLogic(tools::Rectangle(Point(), Size(nSize, aSize.Height()))))); @@ -143,7 +143,7 @@ void OStartMarker::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan } if (m_bMarked) { - const long nCornerHeight = long(CORNER_SPACE * double(GetMapMode().GetScaleY())); + const tools::Long nCornerHeight = tools::Long(CORNER_SPACE * double(GetMapMode().GetScaleY())); tools::Rectangle aRect(Point(nCornerWidth, nCornerHeight), Size(aSize.Width() - nCornerWidth - nCornerWidth, aSize.Height() - nCornerHeight - nCornerHeight)); @@ -224,22 +224,22 @@ void OStartMarker::ImplInitSettings() void OStartMarker::Resize() { const Size aOutputSize( GetOutputSizePixel() ); - const long nOutputWidth = aOutputSize.Width(); - const long nOutputHeight = aOutputSize.Height(); + const tools::Long nOutputWidth = aOutputSize.Width(); + const tools::Long nOutputHeight = aOutputSize.Height(); - const long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); + const tools::Long nVRulerWidth = m_aVRuler->GetSizePixel().Width(); const Point aRulerPos(nOutputWidth - nVRulerWidth,0); m_aVRuler->SetPosSizePixel(aRulerPos,Size(nVRulerWidth,nOutputHeight)); Size aImageSize = m_aImage->GetImage().GetSizePixel(); const MapMode& rMapMode = GetMapMode(); - aImageSize.setWidth( long(aImageSize.Width() * static_cast<double>(rMapMode.GetScaleX())) ); - aImageSize.setHeight( long(aImageSize.Height() * static_cast<double>(rMapMode.GetScaleY())) ); + aImageSize.setWidth( tools::Long(aImageSize.Width() * static_cast<double>(rMapMode.GetScaleX())) ); + aImageSize.setHeight( tools::Long(aImageSize.Height() * static_cast<double>(rMapMode.GetScaleY())) ); - long nExtraWidth = long(REPORT_EXTRA_SPACE * rMapMode.GetScaleX()); + tools::Long nExtraWidth = tools::Long(REPORT_EXTRA_SPACE * rMapMode.GetScaleX()); Point aPos(aImageSize.Width() + (nExtraWidth * 2), nExtraWidth); - const long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText->GetTextHeight())).Height()); + const tools::Long nHeight = ::std::max<sal_Int32>(nOutputHeight - 2*aPos.Y(),LogicToPixel(Size(0,m_aText->GetTextHeight())).Height()); m_aText->SetPosSizePixel(aPos,Size(aRulerPos.X() - aPos.X(),nHeight)); aPos.setX( nExtraWidth ); diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index 51204671ba5f..db2b44b6d731 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -52,7 +52,7 @@ namespace rptui using namespace ::com::sun::star; using namespace ::comphelper; -static bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,long& _nXMov, long& _nYMov,SdrObject const * _pObj,SdrView const * _pView, ControlModification _nControlModification) +static bool lcl_getNewRectSize(const tools::Rectangle& _aObjRect,tools::Long& _nXMov, tools::Long& _nYMov,SdrObject const * _pObj,SdrView const * _pView, ControlModification _nControlModification) { bool bMoveAllowed = _nXMov != 0 || _nYMov != 0; if ( bMoveAllowed ) @@ -202,7 +202,7 @@ void OViewsWindow::impl_resizeSectionWindow(OSectionWindow& _rSectionWindow,Poin { aSectionSize.setHeight( nMinHeight ); } - aSectionSize.AdjustHeight(static_cast<long>(StyleSettings::GetSplitSize() * static_cast<double>(_rSectionWindow.GetMapMode().GetScaleY())) ); + aSectionSize.AdjustHeight(static_cast<tools::Long>(StyleSettings::GetSplitSize() * static_cast<double>(_rSectionWindow.GetMapMode().GetScaleY())) ); if ( _bSet ) _rSectionWindow.SetPosSizePixel(_rStartPoint,aSectionSize); @@ -257,7 +257,7 @@ void OViewsWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectan rRenderContext.SetTextFillColor(Application::GetSettings().GetStyleSettings().GetDialogColor()); Size aOut(GetOutputSizePixel()); - long nStartWidth = long(REPORT_STARTMARKER_WIDTH * rRenderContext.GetMapMode().GetScaleX()); + tools::Long nStartWidth = tools::Long(REPORT_STARTMARKER_WIDTH * rRenderContext.GetMapMode().GetScaleX()); aOut.AdjustWidth( -nStartWidth ); aOut = rRenderContext.PixelToLogic(aOut); @@ -755,9 +755,9 @@ void OViewsWindow::alignMarkedObjects(ControlModification _nControlModification, pObj->TakeObjInfo(aInfo); if (aInfo.bMoveAllowed && !pObj->IsMoveProtect()) { - long nXMov = 0; - long nYMov = 0; - long* pValue = &nXMov; + tools::Long nXMov = 0; + tools::Long nYMov = 0; + tools::Long* pValue = &nXMov; switch(_nControlModification) { case ControlModification::TOP : @@ -983,7 +983,7 @@ void OViewsWindow::BegDragObj_createInvisibleObjectAtPosition(const tools::Recta rView.MarkObj( pNewObj, rView.GetSdrPageView() ); } - const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewPos.AdjustY( -nSectionHeight ); } } @@ -1003,7 +1003,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi OSectionView* pView = &rReportSection.getSectionView(); if (pView == _pSection) break; - const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aAbsolutePnt.AdjustY(nSectionHeight ); } m_aDragDelta = Point(SAL_MAX_INT32, SAL_MAX_INT32); @@ -1054,7 +1054,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi aClipRect.SetTop( -aNewObjPos.Y() ); rView.SetWorkArea( aClipRect ); - const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewObjPos.AdjustY(nSectionHeight ); } @@ -1086,7 +1086,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi << nViewCount++); rReportSection.getSectionView().BegDragObj(aNewPos, nullptr, pHdl, nDrgLog); - const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewPos.AdjustY( -nSectionHeight ); } } @@ -1102,7 +1102,7 @@ void OViewsWindow::BegMarkObj(const Point& _aPnt,const OSectionView* _pSection) bool bAdd = true; Point aNewPos = _aPnt; - long nLastSectionHeight = 0; + tools::Long nLastSectionHeight = 0; for (const auto& rxSection : m_aSections) { OReportSection& rReportSection = rxSection->getReportSection(); @@ -1113,7 +1113,7 @@ void OViewsWindow::BegMarkObj(const Point& _aPnt,const OSectionView* _pSection) } else if ( bAdd ) { - const long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aNewPos.AdjustY(nSectionHeight ); } else @@ -1156,7 +1156,7 @@ OSectionView* OViewsWindow::getSectionRelativeToPosition(const OSectionView* _pS for (; aIter != aEnd; ++aIter) { OReportSection& rReportSection = (*aIter)->getReportSection(); - const long nHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nHeight = rReportSection.PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); if ( (_rPnt.Y() - nHeight) < 0 ) break; _rPnt.AdjustY( -nHeight ); @@ -1305,7 +1305,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection, b OReportSection& rReportSection = rxSection->getReportSection(); if ( &rReportSection.getSectionView() == _pSection ) break; - const long nSectionHeight = rxSection->PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rxSection->PixelToLogic(rReportSection.GetOutputSizePixel()).Height(); aCurrentSectionPos.AdjustY(nSectionHeight ); } aRealMousePos += aCurrentSectionPos; @@ -1316,7 +1316,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection, b { OReportSection& rReportSection = rxSection->getReportSection(); OSectionView& rView = rReportSection.getSectionView(); - const long nSectionHeight = rxSection->PixelToLogic(rxSection->GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rxSection->PixelToLogic(rxSection->GetOutputSizePixel()).Height(); if (_bControlKeySet) { @@ -1342,7 +1342,7 @@ void OViewsWindow::MovAction(const Point& _aPnt,const OSectionView* _pSection, b if ( pCurrentHdl && aRealMousePos.Y() > 0 ) aRealMousePos = _aPnt + pCurrentHdl->GetPos() - aHdlPos; rReportSection.getSectionView().MovAction ( aRealMousePos ); - const long nSectionHeight = rxSection->PixelToLogic(rxSection->GetOutputSizePixel()).Height(); + const tools::Long nSectionHeight = rxSection->PixelToLogic(rxSection->GetOutputSizePixel()).Height(); aRealMousePos.AdjustY( -nSectionHeight ); } } @@ -1382,8 +1382,8 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) for (const auto& rxSection : m_aSections) { OReportSection& rReportSection = rxSection->getReportSection(); - long nX = 0; - long nY = 0; + tools::Long nX = 0; + tools::Long nY = 0; if ( nCode == KEY_UP ) nY = -1; @@ -1617,7 +1617,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom) { const MapMode& aMapMode = GetMapMode(); - Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + Fraction aStartWidth(tools::Long(REPORT_STARTMARKER_WIDTH)); if ( _aZoom < aMapMode.GetScaleX() ) aStartWidth *= aMapMode.GetScaleX(); else @@ -1633,7 +1633,7 @@ void OViewsWindow::zoom(const Fraction& _aZoom) Resize(); Size aOut = GetOutputSizePixel(); - aOut.setWidth( long(aStartWidth) ); + aOut.setWidth( tools::Long(aStartWidth) ); aOut = PixelToLogic(aOut); tools::Rectangle aRect(PixelToLogic(Point(0,0)),aOut); diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx b/reportdesign/source/ui/report/dlgedfunc.cxx index 799d9e611155..4e653cb87930 100644 --- a/reportdesign/source/ui/report/dlgedfunc.cxx +++ b/reportdesign/source/ui/report/dlgedfunc.cxx @@ -70,10 +70,10 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) OScrollWindowHelper* pScrollWindow = pReportWindow->getScrollWindow(); Size aOut = pReportWindow->GetOutputSizePixel(); - Fraction aStartWidth(long(REPORT_STARTMARKER_WIDTH)); + Fraction aStartWidth(tools::Long(REPORT_STARTMARKER_WIDTH)); aStartWidth *= m_pParent->GetMapMode().GetScaleX(); - aOut.AdjustWidth( -static_cast<long>(aStartWidth) ); + aOut.AdjustWidth( -static_cast<tools::Long>(aStartWidth) ); aOut.setHeight( m_pParent->GetOutputSizePixel().Height() ); Point aPos = pScrollWindow->getThumbPos(); @@ -82,7 +82,7 @@ void DlgEdFunc::ForceScroll( const Point& rPos ) tools::Rectangle aOutRect( aPos, aOut ); aOutRect = m_pParent->PixelToLogic( aOutRect ); tools::Rectangle aWorkArea(Point(), pScrollWindow->getTotalSize()); - aWorkArea.AdjustRight( -static_cast<long>(aStartWidth) ); + aWorkArea.AdjustRight( -static_cast<tools::Long>(aStartWidth) ); aWorkArea = pScrollWindow->PixelToLogic( aWorkArea ); if( !aOutRect.IsInside( rPos ) && aWorkArea.IsInside( rPos ) ) { @@ -573,8 +573,8 @@ bool DlgEdFunc::isRectangleHit(const MouseEvent& rMEvt) && (dynamic_cast<OUnoObject*>(pObjIter) != nullptr || dynamic_cast<OOle2Obj*>(pObjIter) != nullptr) ) { tools::Rectangle aNewRect = pObjIter->GetLastBoundRect(); - long nDx = rDragStat.IsHorFixed() ? 0 : rDragStat.GetDX(); - long nDy = rDragStat.IsVerFixed() ? 0 : rDragStat.GetDY(); + tools::Long nDx = rDragStat.IsHorFixed() ? 0 : rDragStat.GetDX(); + tools::Long nDy = rDragStat.IsVerFixed() ? 0 : rDragStat.GetDY(); if ( (nDx + aNewRect.Left()) < 0 ) nDx = -aNewRect.Left(); if ( (nDy + aNewRect.Top()) < 0 ) |