[PATCH] Get rid of SvULongs in calc
Maciej Rumianowski
maciej.rumianowski at gmail.com
Sun Jul 17 14:24:45 PDT 2011
Instead of SvULongs use ::std::vector < sal_uLong >
---
.../itemsetwrapper/DataPointItemConverter.cxx | 6 +++---
.../itemsetwrapper/SeriesOptionsItemConverter.cxx | 6 +++---
chart2/source/view/main/ChartItemPool.cxx | 5 ++---
sc/source/ui/docshell/impex.cxx | 11 +++++------
sc/source/ui/view/tabvwsh3.cxx | 8 ++++----
5 files changed, 17 insertions(+), 19 deletions(-)
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 3802ffc..fb1c5f8 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -641,10 +641,10 @@ void DataPointItemConverter::FillSpecialItem(
case SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS:
{
- SvULongs aList;
+ /*SvULongs aList;
for ( sal_Int32 nN=0; nN<m_aAvailableLabelPlacements.getLength(); nN++ )
- aList.Insert( m_aAvailableLabelPlacements[nN], sal::static_int_cast< sal_uInt16 >(nN) );
- rOutItemSet.Put( SfxIntegerListItem( nWhichId, aList ) );
+ aList.Insert( m_aAvailableLabelPlacements[nN], sal::static_int_cast< sal_uInt16 >(nN) );*/
+ rOutItemSet.Put( SfxIntegerListItem( nWhichId, m_aAvailableLabelPlacements ) );
}
break;
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index a199b66..dd844c6 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -433,10 +433,10 @@ void SeriesOptionsItemConverter::FillSpecialItem(
}
case SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS:
{
- SvULongs aList;
+ /*SvULongs aList;
for ( sal_Int32 nN=0; nN<m_aSupportedMissingValueTreatments.getLength(); nN++ )
- aList.Insert( m_aSupportedMissingValueTreatments[nN], sal::static_int_cast< sal_uInt16 >(nN) );
- rOutItemSet.Put( SfxIntegerListItem( nWhichId, aList ) );
+ aList.Insert( m_aSupportedMissingValueTreatments[nN], sal::static_int_cast< sal_uInt16 >(nN) );*/
+ rOutItemSet.Put( SfxIntegerListItem( nWhichId, m_aSupportedMissingValueTreatments ) );
break;
}
case SCHATTR_INCLUDE_HIDDEN_CELLS:
diff --git a/chart2/source/view/main/ChartItemPool.cxx b/chart2/source/view/main/ChartItemPool.cxx
index 2cdac8f..da10db9 100644
--- a/chart2/source/view/main/ChartItemPool.cxx
+++ b/chart2/source/view/main/ChartItemPool.cxx
@@ -63,8 +63,7 @@ ChartItemPool::ChartItemPool():
ppPoolDefaults[SCHATTR_DATADESCR_SHOW_SYMBOL - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_SHOW_SYMBOL);
ppPoolDefaults[SCHATTR_DATADESCR_SEPARATOR - SCHATTR_START] = new SfxStringItem(SCHATTR_DATADESCR_SEPARATOR,C2U(" "));
ppPoolDefaults[SCHATTR_DATADESCR_PLACEMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_DATADESCR_PLACEMENT,0);
- SvULongs aTmp;
- ppPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS,aTmp);
+ ppPoolDefaults[SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_DATADESCR_AVAILABLE_PLACEMENTS, ::std::vector < sal_uLong >() );
ppPoolDefaults[SCHATTR_DATADESCR_NO_PERCENTVALUE - SCHATTR_START] = new SfxBoolItem(SCHATTR_DATADESCR_NO_PERCENTVALUE);
ppPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_VALUE - SCHATTR_START] = new SfxUInt32Item(SCHATTR_PERCENT_NUMBERFORMAT_VALUE, 0);
ppPoolDefaults[SCHATTR_PERCENT_NUMBERFORMAT_SOURCE - SCHATTR_START] = new SfxBoolItem(SCHATTR_PERCENT_NUMBERFORMAT_SOURCE);
@@ -157,7 +156,7 @@ ChartItemPool::ChartItemPool():
ppPoolDefaults[SCHATTR_CLOCKWISE - SCHATTR_START] = new SfxBoolItem( SCHATTR_CLOCKWISE, sal_False );
ppPoolDefaults[SCHATTR_MISSING_VALUE_TREATMENT - SCHATTR_START] = new SfxInt32Item(SCHATTR_MISSING_VALUE_TREATMENT, 0);
- ppPoolDefaults[SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS,aTmp);
+ ppPoolDefaults[SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS - SCHATTR_START] = new SfxIntegerListItem(SCHATTR_AVAILABLE_MISSING_VALUE_TREATMENTS, ::std::vector < sal_uLong >() );
ppPoolDefaults[SCHATTR_INCLUDE_HIDDEN_CELLS - SCHATTR_START] = new SfxBoolItem(SCHATTR_INCLUDE_HIDDEN_CELLS, sal_True);
ppPoolDefaults[SCHATTR_AXIS_FOR_ALL_SERIES - SCHATTR_START] = new SfxInt32Item(SCHATTR_AXIS_FOR_ALL_SERIES, 0);
diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx
index 7b0e30d..06fa392 100644
--- a/sc/source/ui/docshell/impex.cxx
+++ b/sc/source/ui/docshell/impex.cxx
@@ -49,8 +49,6 @@ class StarBASIC;
#include <rtl/math.hxx>
#include <svtools/htmlout.hxx>
#include <svl/zforlist.hxx>
-#define _SVSTDARR_ULONGS
-#include <svl/svstdarr.hxx>
#include <sot/formats.hxx>
#include <sfx2/mieclip.hxx>
#include <unotools/charclass.hxx>
@@ -58,6 +56,7 @@ class StarBASIC;
#include <unotools/calendarwrapper.hxx>
#include <com/sun/star/i18n/CalendarFieldIndex.hpp>
#include <unotools/transliterationwrapper.hxx>
+#include <vector>
#include "global.hxx"
#include "scerrors.hxx"
@@ -1544,7 +1543,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm )
SCROW nEndRow = aRange.aEnd.Row();
sal_uLong nOldPos = rStrm.Tell();
sal_Bool bData = sal_Bool( !bSingle );
- SvULongs aFormats;
+ std::vector< sal_uLong > aFormats;
if( !bSingle)
bOk = StartPaste();
@@ -1730,9 +1729,9 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm )
if( nCol > nEndCol )
nEndCol = nCol;
}
- if ( 0 <= nFormat && nFormat < aFormats.Count() )
+ if ( 0 <= nFormat && nFormat < (sal_Int32)aFormats.size() )
{
- sal_uLong nKey = aFormats[(sal_uInt16)nFormat];
+ sal_uLong nKey = aFormats[nFormat];
pDoc->ApplyAttr( nCol, nRow, aRange.aStart.Tab(),
SfxUInt32Item( ATTR_VALUE_FORMAT, nKey ) );
}
@@ -1759,7 +1758,7 @@ sal_Bool ScImportExport::Sylk2Doc( SvStream& rStrm )
ScGlobal::eLnge );
if ( nCheckPos )
nKey = 0;
- aFormats.Insert( nKey, aFormats.Count() );
+ aFormats.push_back( nKey );
}
}
else if( cTag == 'I' && *p == 'D' )
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 270542c..1efecc8 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -810,7 +810,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
SCTAB nTabCount = rDoc.GetTableCount();
SCTAB nTab;
- SvULongs aIndexList( 4, 4 );
+ ::std::vector < sal_uLong > aIndexList( 4, 4 );
SFX_REQUEST_ARG( rReq, pItem, SfxIntegerListItem, SID_SELECT_TABLES, false );
if ( pItem )
pItem->GetList( aIndexList );
@@ -839,7 +839,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
sal_uInt16 nSelCount = pDlg->GetSelectEntryCount();
sal_uInt16 nSelIx;
for( nSelIx = 0; nSelIx < nSelCount; ++nSelIx )
- aIndexList.Insert( pDlg->GetSelectEntryPos( nSelIx ), nSelIx );
+ aIndexList.insert( aIndexList.begin()+nSelIx, pDlg->GetSelectEntryPos( nSelIx ) );
delete pDlg;
rReq.AppendItem( SfxIntegerListItem( SID_SELECT_TABLES, aIndexList ) );
}
@@ -847,9 +847,9 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
rReq.Ignore();
}
- if ( aIndexList.Count() )
+ if ( aIndexList.size() )
{
- sal_uInt16 nSelCount = aIndexList.Count();
+ sal_uInt16 nSelCount = aIndexList.size();
sal_uInt16 nSelIx;
SCTAB nFirstVisTab = 0;
--
1.7.4.1
--=-6hG//ceUjPkPnjTTqojy
Content-Disposition: attachment; filename="0001-Port-SfxIntegerListItem-to-SvULongs.libs-gui.patch"
Content-Type: text/x-patch; name="0001-Port-SfxIntegerListItem-to-SvULongs.libs-gui.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit
More information about the LibreOffice
mailing list