Kaydet (Commit) 04b3c70d authored tarafından Matteo Casalin's avatar Matteo Casalin

Use more proper integer types and constify

Change-Id: I7e51c1bc713f43bcd89bb6e5a098b2ced670681f
üst 44a18f6c
...@@ -125,7 +125,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock ) ...@@ -125,7 +125,7 @@ void SwChartLockController_Helper::LockUnlockAllCharts( bool bLock )
return; return;
const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts(); const SwFrmFmts& rTblFmts = *pDoc->GetTblFrmFmts();
for( sal_uInt16 n = 0; n < rTblFmts.size(); ++n ) for( size_t n = 0; n < rTblFmts.size(); ++n )
{ {
SwTable* pTmpTbl; SwTable* pTmpTbl;
const SwTableNode* pTblNd; const SwTableNode* pTblNd;
...@@ -352,7 +352,7 @@ static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName, ...@@ -352,7 +352,7 @@ static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName,
// find frame format of table // find frame format of table
//! see SwXTextTables::getByName //! see SwXTextTables::getByName
sal_uInt16 nCount = rDoc.GetTblFrmFmtCount(true); const sal_uInt16 nCount = rDoc.GetTblFrmFmtCount(true);
for (sal_uInt16 i = 0; i < nCount && !pTblFmt; ++i) for (sal_uInt16 i = 0; i < nCount && !pTblFmt; ++i)
{ {
SwFrmFmt& rTblFmt = rDoc.GetTblFrmFmt(i, true); SwFrmFmt& rTblFmt = rDoc.GetTblFrmFmt(i, true);
...@@ -1753,7 +1753,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange ...@@ -1753,7 +1753,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeToXML( const OUString& rRange
// "Table1.A1:A4;Table1.C2:C5" the same table must be used in all ranges! // "Table1.A1:A4;Table1.C2:C5" the same table must be used in all ranges!
sal_Int32 nNumRanges = comphelper::string::getTokenCount(aRangeRepresentation, ';'); sal_Int32 nNumRanges = comphelper::string::getTokenCount(aRangeRepresentation, ';');
SwTable* pFirstFoundTable = 0; // to check that only one table will be used SwTable* pFirstFoundTable = 0; // to check that only one table will be used
for (sal_uInt16 i = 0; i < nNumRanges; ++i) for (sal_Int32 i = 0; i < nNumRanges; ++i)
{ {
OUString aRange( aRangeRepresentation.getToken(i, ';') ); OUString aRange( aRangeRepresentation.getToken(i, ';') );
SwFrmFmt *pTblFmt = 0; // pointer to table format SwFrmFmt *pTblFmt = 0; // pointer to table format
...@@ -1821,7 +1821,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const OUString& rXML ...@@ -1821,7 +1821,7 @@ OUString SAL_CALL SwChartDataProvider::convertRangeFromXML( const OUString& rXML
// "Table1.$A$1:.$A$4 Table1.$C$2:.$C$5" the same table must be used in all ranges! // "Table1.$A$1:.$A$4 Table1.$C$2:.$C$5" the same table must be used in all ranges!
sal_Int32 nNumRanges = comphelper::string::getTokenCount(aXMLRange, ' '); sal_Int32 nNumRanges = comphelper::string::getTokenCount(aXMLRange, ' ');
OUString aFirstFoundTable; // to check that only one table will be used OUString aFirstFoundTable; // to check that only one table will be used
for (sal_uInt16 i = 0; i < nNumRanges; ++i) for (sal_Int32 i = 0; i < nNumRanges; ++i)
{ {
OUString aRange( aXMLRange.getToken(i, ' ') ); OUString aRange( aXMLRange.getToken(i, ' ') );
......
...@@ -120,9 +120,9 @@ OUString SwHyperlinkEventDescriptor::getImplementationName(void) ...@@ -120,9 +120,9 @@ OUString SwHyperlinkEventDescriptor::getImplementationName(void)
void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt( void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt(
const SwFmtINetFmt& aFmt) const SwFmtINetFmt& aFmt)
{ {
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++) for(sal_uInt16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; ++i)
{ {
sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent; const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
const SvxMacro* aMacro = aFmt.GetMacro(nEvent); const SvxMacro* aMacro = aFmt.GetMacro(nEvent);
if (NULL != aMacro) if (NULL != aMacro)
replaceByName(nEvent, *aMacro); replaceByName(nEvent, *aMacro);
...@@ -132,9 +132,9 @@ void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt( ...@@ -132,9 +132,9 @@ void SwHyperlinkEventDescriptor::copyMacrosFromINetFmt(
void SwHyperlinkEventDescriptor::copyMacrosIntoINetFmt( void SwHyperlinkEventDescriptor::copyMacrosIntoINetFmt(
SwFmtINetFmt& aFmt) SwFmtINetFmt& aFmt)
{ {
for(sal_Int16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; i++) for(sal_uInt16 i = 0; mpSupportedMacroItems[i].mnEvent != 0; ++i)
{ {
sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent; const sal_uInt16 nEvent = mpSupportedMacroItems[i].mnEvent;
if (hasByName(nEvent)) if (hasByName(nEvent))
{ {
SvxMacro aMacro(sEmpty, sEmpty); SvxMacro aMacro(sEmpty, sEmpty);
......
...@@ -276,7 +276,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c ...@@ -276,7 +276,7 @@ void SAL_CALL SwXFlatParagraph::changeText(::sal_Int32 nPos, ::sal_Int32 nLen, c
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() ) if ( xPropSet.is() )
{ {
for ( sal_uInt16 i = 0; i < aAttributes.getLength(); ++i ) for ( sal_Int32 i = 0; i < aAttributes.getLength(); ++i )
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value ); xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
} }
...@@ -306,7 +306,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n ...@@ -306,7 +306,7 @@ void SAL_CALL SwXFlatParagraph::changeAttributes(::sal_Int32 nPos, ::sal_Int32 n
uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY ); uno::Reference< beans::XPropertySet > xPropSet( xRange, uno::UNO_QUERY );
if ( xPropSet.is() ) if ( xPropSet.is() )
{ {
for ( sal_uInt16 i = 0; i < aAttributes.getLength(); ++i ) for ( sal_Int32 i = 0; i < aAttributes.getLength(); ++i )
xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value ); xPropSet->setPropertyValue( aAttributes[i].Name, aAttributes[i].Value );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment