summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-01-05 08:25:20 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-01-07 21:04:30 +0100
commit8229d5af3f7bc67366d70343f083d369b7c15274 (patch)
tree33e152ea602de27ba3cc74c58ceffde9621df0ae /sw
parent61e02d6ffc477174d9797ea45a41cc50c955372b (diff)
sal_uInt16/sal_uInt32 to more proper integer types
Change-Id: I07f9ae7f926d40a4a438e850832b6e9f09a1d1e3
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/writer/writer.cxx2
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx20
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.cxx2
-rw-r--r--sw/source/filter/ww8/docxtablestyleexport.hxx2
5 files changed, 14 insertions, 14 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index c928b9a6438e..8b5b0ed8f291 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -313,7 +313,7 @@ void Writer::PutNumFmtFontsInAttrPool()
const vcl::Font* pDefFont = &numfunc::GetDefBulletFont();
bool bCheck = false;
- for( sal_uInt16 nGet = rListTbl.size(); nGet; )
+ for( size_t nGet = rListTbl.size(); nGet; )
if( pDoc->IsUsed( *(pRule = rListTbl[ --nGet ] )))
for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
if( SVX_NUM_CHAR_SPECIAL == (pFmt = &pRule->Get( nLvl ))->GetNumberingType() ||
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 97a5d40d7dee..051a661feddb 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -235,21 +235,21 @@ WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows()
{
const SwTable * pTable = getTable();
const SwTableLines& rTableLines = pTable->GetTabLines();
- sal_uInt16 nNumOfLines = rTableLines.size();
+ const size_t nNumOfLines = rTableLines.size();
// Go over all the rows - and for each row - calculate where
// there is a separator between columns
WidthsPtr pSeparators(new Widths);
- for ( sal_uInt32 nLineIndex = 0; nLineIndex < nNumOfLines; nLineIndex++)
+ for ( size_t nLineIndex = 0; nLineIndex < nNumOfLines; ++nLineIndex )
{
const SwTableLine *pCurrentLine = rTableLines[nLineIndex];
const SwTableBoxes & rTabBoxes = pCurrentLine->GetTabBoxes();
- sal_uInt32 nBoxes = rTabBoxes.size();
+ size_t nBoxes = rTabBoxes.size();
if ( nBoxes > MAXTABLECELLS )
nBoxes = MAXTABLECELLS;
sal_uInt32 nSeparatorPosition = 0;
- for (sal_uInt32 nBoxIndex = 0; nBoxIndex < nBoxes; nBoxIndex++)
+ for (size_t nBoxIndex = 0; nBoxIndex < nBoxes; ++nBoxIndex)
{
const SwFrmFmt* pBoxFmt = rTabBoxes[ nBoxIndex ]->GetFrmFmt();
const SwFmtFrmSize& rLSz = pBoxFmt->GetFrmSize();
@@ -641,11 +641,11 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
{
const SwTableLines & rLines = pTable->GetTabLines();
- for (sal_uInt16 n = 0; n < rLines.size(); n++)
+ for (size_t n = 0; n < rLines.size(); ++n)
{
const SwTableLine * pLine = rLines[n];
- pPrev = processTableLine(pTable, pLine, n, 1, pPrev);
+ pPrev = processTableLine(pTable, pLine, static_cast<sal_uInt32>(n), 1, pPrev);
}
}
@@ -672,11 +672,11 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
WW8TableNodeInfo::Pointer_t pTextNodeInfo;
- for (sal_uInt16 n = 0; n < rBoxes.size(); n++)
+ for (size_t n = 0; n < rBoxes.size(); ++n)
{
const SwTableBox * pBox = rBoxes[n];
- pPrev = processTableBox(pTable, pBox, nRow, n, nDepth, n == rBoxes.size() - 1, pPrev);
+ pPrev = processTableBox(pTable, pBox, nRow, static_cast<sal_uInt32>(n), nDepth, n == rBoxes.size() - 1, pPrev);
}
SAL_INFO( "sw.ww8", "</processTableLine>" );
@@ -700,12 +700,12 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
if (!rLines.empty())
{
- for (sal_uInt32 n = 0; n < rLines.size(); n++)
+ for (size_t n = 0; n < rLines.size(); ++n)
{
const SwTableLine * pLine = rLines[n];
const SwTableBoxes & rBoxes = pLine->GetTabBoxes();
- for (sal_uInt16 nBox = 0; nBox < rBoxes.size(); nBox++)
+ for (size_t nBox = 0; nBox < rBoxes.size(); ++nBox)
pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth);
}
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index f44794a12d81..15b5dea6e8f6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -3994,7 +3994,7 @@ void DocxAttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
// Ms Office seems to have an internal limitation of 4091 styles
// and refuses to load .docx with more, even though the spec seems to allow that;
// so simply if there are more styles, don't export those
- sal_uInt16 nCountStylesToWrite = MSWORD_MAX_STYLES_LIMIT - nNumberOfStyles;
+ const sal_Int32 nCountStylesToWrite = MSWORD_MAX_STYLES_LIMIT - nNumberOfStyles;
m_pTableStyleExport->TableStyles(nCountStylesToWrite);
m_pSerializer->endElementNS( XML_w, XML_styles );
}
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index 53194d1fe0d6..c88bf4bf5ecb 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -101,7 +101,7 @@ void DocxTableStyleExport::CnfStyle(uno::Sequence<beans::PropertyValue>& rAttrib
m_pImpl->m_pSerializer->singleElementNS(XML_w, XML_cnfStyle, xAttributeList);
}
-void DocxTableStyleExport::TableStyles(sal_uInt16 nCountStylesToWrite)
+void DocxTableStyleExport::TableStyles(sal_Int32 nCountStylesToWrite)
{
// Do we have table styles from InteropGrabBag available?
uno::Reference<beans::XPropertySet> xPropertySet(m_pImpl->m_pDoc->GetDocShell()->GetBaseModel(), uno::UNO_QUERY_THROW);
diff --git a/sw/source/filter/ww8/docxtablestyleexport.hxx b/sw/source/filter/ww8/docxtablestyleexport.hxx
index 4b6e037222c5..c43a9bea5b1c 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.hxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.hxx
@@ -24,7 +24,7 @@ class DocxTableStyleExport
struct Impl;
boost::shared_ptr<Impl> m_pImpl;
public:
- void TableStyles(sal_uInt16 nCountStylesToWrite);
+ void TableStyles(sal_Int32 nCountStylesToWrite);
/// Writes <w:rPr>...</w:rPr> based on grab-bagged character properties.
void CharFormat(css::uno::Sequence<css::beans::PropertyValue>& rRPr);