diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-24 08:17:02 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-04-27 14:00:47 +0200 |
commit | b02d893cba1a4d02f38c0d5c0415a8ec35923946 (patch) | |
tree | 721c9eb66aca01a51c9266f328c8b9743cbe3f97 /sw | |
parent | 983e639260e77e01823798c2e5468578ac2e3ee4 (diff) |
sal_uInt16 to more proper types + constify
Change-Id: I26c7d23fc21fbf89b9bc66dda736f048fa2f90f1
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/filter/xml/xmlexpit.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index 4fd85d0abff2..f05f07cf1305 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -133,7 +133,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, OUStringBuffer aOut; const SfxBoolItem* pSplit = PTR_CAST(SfxBoolItem, &rItem); OSL_ENSURE( pSplit != NULL, "Wrong Which-ID" ); - sal_uInt16 eEnum = pSplit->GetValue() ? 1 : 0; + const unsigned int eEnum = pSplit->GetValue() ? 1 : 0; rUnitConverter.convertEnum( aOut, eEnum, aXML_KeepTogetherType ); aValue = aOut.makeStringAndClear(); } @@ -152,7 +152,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, const SvXMLAttrContainerItem *pUnknown = PTR_CAST( SvXMLAttrContainerItem, &rItem ); - sal_uInt16 nCount = pUnknown->GetAttrCount(); + const sal_uInt16 nCount = pUnknown->GetAttrCount(); OUStringBuffer sName; for( sal_uInt16 i=0; i < nCount; i++ ) { @@ -163,7 +163,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport, // if the prefix isn't defined yet or has another meaning, // we have to redefine it now. - sal_uInt16 nIdx = pNamespaceMap->GetIndexByPrefix( sPrefix ); + const sal_uInt16 nIdx = pNamespaceMap->GetIndexByPrefix( sPrefix ); if( USHRT_MAX == nIdx || pNamespaceMap->GetNameByIndex( nIdx ) != sNamespace ) { @@ -222,10 +222,10 @@ void SvXMLExportItemMapper::exportElementItems( sal_uInt16 nFlags, const std::vector<sal_uInt16> &rIndexArray ) const { - const sal_uInt16 nCount = rIndexArray.size(); + const size_t nCount = rIndexArray.size(); bool bItemsExported = false; - for( sal_uInt16 nIndex = 0; nIndex < nCount; nIndex++ ) + for( size_t nIndex = 0; nIndex < nCount; ++nIndex ) { const sal_uInt16 nElement = rIndexArray[ nIndex ]; SvXMLItemMapEntry* pEntry = mrMapEntries->getByIndex( nElement ); @@ -563,10 +563,10 @@ bool SvXMLExportItemMapper::QueryXMLValue( const SvxBorderLine* pRight = pBox->GetRight(); const SvxBorderLine* pTop = pBox->GetTop(); const SvxBorderLine* pBottom = pBox->GetBottom(); - sal_uInt16 nTopDist = pBox->GetDistance( BOX_LINE_TOP ); - sal_uInt16 nBottomDist = pBox->GetDistance( BOX_LINE_BOTTOM ); - sal_uInt16 nLeftDist = pBox->GetDistance( BOX_LINE_LEFT ); - sal_uInt16 nRightDist = pBox->GetDistance( BOX_LINE_RIGHT ); + const sal_uInt16 nTopDist = pBox->GetDistance( BOX_LINE_TOP ); + const sal_uInt16 nBottomDist = pBox->GetDistance( BOX_LINE_BOTTOM ); + const sal_uInt16 nLeftDist = pBox->GetDistance( BOX_LINE_LEFT ); + const sal_uInt16 nRightDist = pBox->GetDistance( BOX_LINE_RIGHT ); // check if we need to export it switch( nMemberId ) @@ -626,7 +626,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( const sal_uInt16 nDistance = pTop->GetDistance(); const sal_uInt16 nInWidth = pTop->GetInWidth(); const sal_uInt16 nOutWidth = pTop->GetOutWidth(); - const sal_uInt16 nWidth = pTop->GetWidth(); + const long nWidth = pTop->GetWidth(); bEqual = nDistance == pLeft->GetDistance() && nInWidth == pLeft->GetInWidth() && @@ -827,7 +827,7 @@ bool SvXMLExportItemMapper::QueryXMLValue( const SvxFmtBreakItem* pFmtBreak = PTR_CAST(SvxFmtBreakItem, &rItem); OSL_ENSURE( pFmtBreak != NULL, "Wrong Which-ID" ); - sal_uInt16 eEnum = 0; + unsigned int eEnum = 0; switch( nMemberId ) { |