diff options
Diffstat (limited to 'chart2/source/controller')
13 files changed, 43 insertions, 42 deletions
diff --git a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx index 63abadee1b85..b49c5177dc2e 100644 --- a/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx +++ b/chart2/source/controller/chartapiwrapper/WrappedGapwidthProperty.cxx @@ -20,6 +20,7 @@ #include "WrappedGapwidthProperty.hxx" #include "Chart2ModelContact.hxx" #include <DiagramHelper.hxx> +#include <tools/long.hxx> using namespace ::com::sun::star; using ::com::sun::star::uno::Reference; @@ -82,7 +83,7 @@ void WrappedBarPositionProperty_Base::setPropertyValue( const Any& rOuterValue, Sequence< sal_Int32 > aBarPositionSequence; xProp->getPropertyValue( m_InnerSequencePropertyName ) >>= aBarPositionSequence; - long nOldLength = aBarPositionSequence.getLength(); + tools::Long nOldLength = aBarPositionSequence.getLength(); if( nOldLength <= m_nAxisIndex ) { aBarPositionSequence.realloc( m_nAxisIndex+1 ); diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx index 89036649c500..9efa33d2d726 100644 --- a/chart2/source/controller/dialogs/DataBrowser.cxx +++ b/chart2/source/controller/dialogs/DataBrowser.cxx @@ -70,7 +70,7 @@ const BrowserMode BrowserStdFlags = BrowserMode::COLUMNSELECTION | BrowserMode::AUTO_HSCROLL | BrowserMode::AUTO_VSCROLL | BrowserMode::HIDESELECT; -sal_Int32 lcl_getRowInData( long nRow ) +sal_Int32 lcl_getRowInData( tools::Long nRow ) { return static_cast< sal_Int32 >( nRow ); } @@ -607,7 +607,7 @@ void DataBrowser::RenewTable() if (!m_apDataBrowserModel) return; - long nOldRow = GetCurRow(); + tools::Long nOldRow = GetCurRow(); sal_uInt16 nOldColId = GetCurColumnId(); bool bLastUpdateMode = GetUpdateMode(); @@ -684,7 +684,7 @@ OUString DataBrowser::GetColString( sal_Int32 nColumnId ) const return OUString(); } -OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const +OUString DataBrowser::GetCellText( tools::Long nRow, sal_uInt16 nColumnId ) const { OUString aResult; @@ -744,7 +744,7 @@ OUString DataBrowser::GetCellText( long nRow, sal_uInt16 nColumnId ) const return aResult; } -double DataBrowser::GetCellNumber( long nRow, sal_uInt16 nColumnId ) const +double DataBrowser::GetCellNumber( tools::Long nRow, sal_uInt16 nColumnId ) const { double fResult; ::rtl::math::setNan( & fResult ); @@ -1063,7 +1063,7 @@ void DataBrowser::PaintCell( rDev.SetClipRegion(); } -bool DataBrowser::SeekRow( long nRow ) +bool DataBrowser::SeekRow( tools::Long nRow ) { if( ! EditBrowseBox::SeekRow( nRow )) return false; @@ -1078,14 +1078,14 @@ bool DataBrowser::SeekRow( long nRow ) bool DataBrowser::IsTabAllowed( bool bForward ) const { - long nRow = GetCurRow(); - long nCol = GetCurColumnId(); + tools::Long nRow = GetCurRow(); + tools::Long nCol = GetCurColumnId(); // column 0 is header-column - long nBadCol = bForward + tools::Long nBadCol = bForward ? GetColumnCount() - 1 : 1; - long nBadRow = bForward + tools::Long nBadRow = bForward ? GetRowCount() - 1 : 0; @@ -1099,7 +1099,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const nCol != nBadCol ); } -::svt::CellController* DataBrowser::GetController( long /*nRow*/, sal_uInt16 nCol ) +::svt::CellController* DataBrowser::GetController( tools::Long /*nRow*/, sal_uInt16 nCol ) { if( m_bIsReadOnly ) return nullptr; @@ -1116,7 +1116,7 @@ bool DataBrowser::IsTabAllowed( bool bForward ) const } void DataBrowser::InitController( - ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) + ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) { if( rController == m_rTextEditController ) { diff --git a/chart2/source/controller/dialogs/DataBrowser.hxx b/chart2/source/controller/dialogs/DataBrowser.hxx index 4a0888e3821c..e94ff26983ae 100644 --- a/chart2/source/controller/dialogs/DataBrowser.hxx +++ b/chart2/source/controller/dialogs/DataBrowser.hxx @@ -55,10 +55,10 @@ class DataBrowser : public ::svt::EditBrowseBox protected: // EditBrowseBox overridables virtual void PaintCell( OutputDevice& rDev, const tools::Rectangle& rRect, sal_uInt16 nColumnId ) const override; - virtual bool SeekRow( long nRow ) override; + virtual bool SeekRow( tools::Long nRow ) override; virtual bool IsTabAllowed( bool bForward ) const override; - virtual ::svt::CellController* GetController( long nRow, sal_uInt16 nCol ) override; - virtual void InitController( ::svt::CellControllerRef& rController, long nRow, sal_uInt16 nCol ) override; + virtual ::svt::CellController* GetController( tools::Long nRow, sal_uInt16 nCol ) override; + virtual void InitController( ::svt::CellControllerRef& rController, tools::Long nRow, sal_uInt16 nCol ) override; virtual bool SaveModified() override; virtual void CursorMoved() override; // called whenever the control of the current cell has been modified @@ -82,12 +82,12 @@ public: @return the text out of the cell */ - virtual OUString GetCellText(long nRow, sal_uInt16 nColId) const override; + virtual OUString GetCellText(tools::Long nRow, sal_uInt16 nColId) const override; /** returns the number in the given cell. If a cell is empty or contains a string, the result will be Nan */ - double GetCellNumber( long nRow, sal_uInt16 nColumnId ) const; + double GetCellNumber( tools::Long nRow, sal_uInt16 nColumnId ) const; bool isDateTimeString( const OUString& aInputString, double& fOutDateTimeValue ); @@ -154,7 +154,7 @@ private: std::shared_ptr< NumberFormatterWrapper > m_spNumberFormatterWrapper; /// the row that is currently painted - long m_nSeekRow; + tools::Long m_nSeekRow; bool m_bIsReadOnly; bool m_bDataValid; diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx index 281beb86dd6f..8afe2a8b2e68 100644 --- a/chart2/source/controller/dialogs/res_DataLabel.cxx +++ b/chart2/source/controller/dialogs/res_DataLabel.cxx @@ -236,7 +236,7 @@ void DataLabelResources::EnableControls() // Enable or disable separator, placement and direction based on the check // box states. Note that the check boxes are tri-state. { - long nNumberOfCheckedLabelParts = 0; + tools::Long nNumberOfCheckedLabelParts = 0; if (m_xCBNumber->get_state() != TRISTATE_FALSE) ++nNumberOfCheckedLabelParts; if (m_xCBPercent->get_state() != TRISTATE_FALSE && m_xCBPercent->get_sensitive()) diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx index f94f09b98690..d4e7fa218023 100644 --- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx +++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx @@ -101,8 +101,8 @@ bool AxisPositionsTabPage::FillItemSet(SfxItemSet* rOutAttrs) rOutAttrs->Put( SfxInt32Item( SCHATTR_AXIS_LABEL_POSITION, nLabelPos )); // tick marks - long nTicks=0; - long nMinorTicks=0; + tools::Long nTicks=0; + tools::Long nMinorTicks=0; if(m_xCB_MinorInner->get_active()) nMinorTicks|=CHAXIS_MARK_INNER; @@ -211,7 +211,7 @@ void AxisPositionsTabPage::Reset(const SfxItemSet* rInAttrs) PlaceLabelsSelectHdl( *m_xLB_PlaceLabels ); // Tick marks - long nTicks = 0, nMinorTicks = 0; + tools::Long nTicks = 0, nMinorTicks = 0; if (rInAttrs->GetItemState(SCHATTR_AXIS_TICKS,true, &pPoolItem)== SfxItemState::SET) nTicks = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); if (rInAttrs->GetItemState(SCHATTR_AXIS_HELPTICKS,true, &pPoolItem)== SfxItemState::SET) diff --git a/chart2/source/controller/dialogs/tp_PointGeometry.cxx b/chart2/source/controller/dialogs/tp_PointGeometry.cxx index 6d2ac1b45332..88116ee890e1 100644 --- a/chart2/source/controller/dialogs/tp_PointGeometry.cxx +++ b/chart2/source/controller/dialogs/tp_PointGeometry.cxx @@ -49,7 +49,7 @@ bool SchLayoutTabPage::FillItemSet(SfxItemSet* rOutAttrs) int nShape = m_pGeometryResources ? m_pGeometryResources->get_selected_index() : -1; if (nShape != -1) { - long nSegs=32; + tools::Long nSegs=32; if (nShape==CHART_SHAPE3D_PYRAMID) nSegs=4; @@ -66,7 +66,7 @@ void SchLayoutTabPage::Reset(const SfxItemSet* rInAttrs) if (rInAttrs->GetItemState(SCHATTR_STYLE_SHAPE,true, &pPoolItem) == SfxItemState::SET) { - long nVal = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); + tools::Long nVal = static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); if(m_pGeometryResources) { m_pGeometryResources->select(static_cast<sal_uInt16>(nVal)); diff --git a/chart2/source/controller/dialogs/tp_PolarOptions.cxx b/chart2/source/controller/dialogs/tp_PolarOptions.cxx index e858813bb39f..f96d9c614450 100644 --- a/chart2/source/controller/dialogs/tp_PolarOptions.cxx +++ b/chart2/source/controller/dialogs/tp_PolarOptions.cxx @@ -74,7 +74,7 @@ void PolarOptionsTabPage::Reset(const SfxItemSet* rInAttrs) if (rInAttrs->GetItemState(SCHATTR_STARTING_ANGLE, true, &pPoolItem) == SfxItemState::SET) { - long nTmp = static_cast<long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); + tools::Long nTmp = static_cast<tools::Long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); m_xAngleDial->SetRotation( nTmp*100 ); } else diff --git a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx index 82bd80ab6542..36d86c4873ef 100644 --- a/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx +++ b/chart2/source/controller/dialogs/tp_SeriesToAxis.cxx @@ -119,7 +119,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) m_xRbtAxis2->set_active(false); if (rInAttrs->GetItemState(SCHATTR_AXIS,true, &pPoolItem) == SfxItemState::SET) { - long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); + tools::Long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); if(nVal==CHART_AXIS_SECONDARY_Y) { m_xRbtAxis2->set_active(true); @@ -127,16 +127,16 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) } } - long nTmp; + tools::Long nTmp; if (rInAttrs->GetItemState(SCHATTR_BAR_GAPWIDTH, true, &pPoolItem) == SfxItemState::SET) { - nTmp = static_cast<long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); + nTmp = static_cast<tools::Long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); m_xMTGap->set_value(nTmp, FieldUnit::PERCENT); } if (rInAttrs->GetItemState(SCHATTR_BAR_OVERLAP, true, &pPoolItem) == SfxItemState::SET) { - nTmp = static_cast<long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); + nTmp = static_cast<tools::Long>(static_cast<const SfxInt32Item*>(pPoolItem)->GetValue()); m_xMTOverlap->set_value(nTmp, FieldUnit::PERCENT); } @@ -185,7 +185,7 @@ void SchOptionTabPage::Reset(const SfxItemSet* rInAttrs) m_xRB_ContinueLine->set_sensitive(true); } - long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); + tools::Long nVal=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue(); if(nVal==css::chart::MissingValueTreatment::LEAVE_GAP) m_xRB_DontPaint->set_active(true); else if(nVal==css::chart::MissingValueTreatment::USE_ZERO) diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx index 62078d4a877a..04646b69acb6 100644 --- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx +++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx @@ -305,7 +305,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI break; case SCHATTR_AXIS_TIME_RESOLUTION: { - long nTimeResolution=0; + tools::Long nTimeResolution=0; if( rTimeIncrement.TimeResolution >>= nTimeResolution ) rOutItemSet.Put( SfxInt32Item( nWhichId, nTimeResolution ) ); else if( m_pExplicitScale ) diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx index 52664c356257..c6af3878bdd7 100644 --- a/chart2/source/controller/main/ChartController_Position.cxx +++ b/chart2/source/controller/main/ChartController_Position.cxx @@ -47,10 +47,10 @@ using namespace ::com::sun::star::chart2; static void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectangle& rPosAndSize, const awt::Size& rOriginalSize ) { - long nPosX(0); - long nPosY(0); - long nSizX(0); - long nSizY(0); + tools::Long nPosX(0); + tools::Long nPosY(0); + tools::Long nSizX(0); + tools::Long nSizY(0); RectPoint eRP = RectPoint::LT; diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx index bd5167766097..51de2bd9ee92 100644 --- a/chart2/source/controller/main/ChartController_Window.cxx +++ b/chart2/source/controller/main/ChartController_Window.cxx @@ -1549,8 +1549,8 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt ) awt::Point aPos( xShape->getPosition() ); awt::Size aSize( xShape->getSize() ); awt::Size aPageSize( ChartModelHelper::getPageSize( getModel() ) ); - aPos.X = static_cast< long >( static_cast< double >( aPos.X ) + fShiftAmountX ); - aPos.Y = static_cast< long >( static_cast< double >( aPos.Y ) + fShiftAmountY ); + aPos.X = static_cast< tools::Long >( static_cast< double >( aPos.X ) + fShiftAmountX ); + aPos.Y = static_cast< tools::Long >( static_cast< double >( aPos.Y ) + fShiftAmountY ); if( aPos.X + aSize.Width > aPageSize.Width ) aPos.X = aPageSize.Width - aSize.Width; if( aPos.X < 0 ) diff --git a/chart2/source/controller/main/DragMethod_PieSegment.cxx b/chart2/source/controller/main/DragMethod_PieSegment.cxx index 9814a5db6595..100846ba9357 100644 --- a/chart2/source/controller/main/DragMethod_PieSegment.cxx +++ b/chart2/source/controller/main/DragMethod_PieSegment.cxx @@ -98,7 +98,7 @@ void DragMethod_PieSegment::MoveSdrDrag(const Point& rPnt) m_fAdditionalOffset = 1.0 - m_fInitialOffset; B2DVector aNewPosVector = m_aStartVector + (m_aDragDirection * m_fAdditionalOffset); - Point aNewPos( static_cast<long>(aNewPosVector.getX()), static_cast<long>(aNewPosVector.getY()) ); + Point aNewPos( static_cast<tools::Long>(aNewPosVector.getX()), static_cast<tools::Long>(aNewPosVector.getY()) ); if( aNewPos != DragStat().GetNow() ) { Hide(); diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx index 24ed7095707f..dd690aa1cf1c 100644 --- a/chart2/source/controller/main/DrawCommandDispatch.cxx +++ b/chart2/source/controller/main/DrawCommandDispatch.cxx @@ -81,8 +81,8 @@ static ::basegfx::B2DPolyPolygon getPolygon(const char* pResId, const SdrModel& if ( pLineEndList.is() ) { OUString aName(SvxResId(pResId)); - long nCount = pLineEndList->Count(); - for ( long nIndex = 0; nIndex < nCount; ++nIndex ) + tools::Long nCount = pLineEndList->Count(); + for ( tools::Long nIndex = 0; nIndex < nCount; ++nIndex ) { const XLineEndEntry* pEntry = pLineEndList->GetLineEnd(nIndex); if ( pEntry->GetName() == aName ) @@ -191,10 +191,10 @@ void DrawCommandDispatch::setLineEnds( SfxItemSet& rAttr ) SfxItemSet aSet( pDrawViewWrapper->GetModel()->GetItemPool() ); pDrawViewWrapper->GetAttributes( aSet ); - long nWidth = 300; // (1/100th mm) + tools::Long nWidth = 300; // (1/100th mm) if ( aSet.GetItemState( XATTR_LINEWIDTH ) != SfxItemState::DONTCARE ) { - long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue(); + tools::Long nValue = aSet.Get( XATTR_LINEWIDTH ).GetValue(); if ( nValue > 0 ) { nWidth = nValue * 3; |