summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8
diff options
context:
space:
mode:
authorMatteo Casalin <matteo.casalin@yahoo.com>2015-01-05 09:55:16 +0100
committerMatteo Casalin <matteo.casalin@yahoo.com>2015-01-07 21:04:31 +0100
commitea404ac36ac36def92b5df27e42645af9e0eda68 (patch)
treea2f949db12e13391a34519bb98ba87686ee013a8 /sw/source/filter/ww8
parentc5f72002d186f2d195361541b5f3a6b0299f0683 (diff)
Use more proper integer types and avoid unneeded downcasts
Change-Id: Idcb8f5fd47ae4a7952f313a4402a980359c90a83
Diffstat (limited to 'sw/source/filter/ww8')
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx5
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx13
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx7
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx4
5 files changed, 14 insertions, 17 deletions
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 051a661feddb..13efc756540f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -201,11 +201,10 @@ GridColsPtr WW8TableNodeInfoInner::getGridColsOfRow(AttributeOutputBase & rBase,
const SwFmtFrmSize &rSize = pFmt->GetFrmSize();
unsigned long nTblSz = static_cast<unsigned long>(rSize.GetWidth());
- sal_uInt32 nPageSize = 0;
+ long nPageSize = 0;
bool bRelBoxSize = false;
- rBase.GetTablePageSize
- ( this, nPageSize, bRelBoxSize );
+ rBase.GetTablePageSize( this, nPageSize, bRelBoxSize );
SwTwips nSz = 0;
Widths::const_iterator aWidthsEnd = pWidths->end();
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index 1dffa6340def..3916eb32fa6e 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -647,7 +647,7 @@ public:
void GetTablePageSize
( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner,
- sal_uInt32& rPageSize, bool& rRelBoxSize );
+ long& rPageSize, bool& rRelBoxSize );
/// Exports the definition (image, size) of a single numbering picture bullet.
virtual void BulletDefinition(int /*nId*/, const Graphic& /*rGraphic*/, Size /*aSize*/) {}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 15b5dea6e8f6..a1c9832065ef 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -2598,8 +2598,8 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
pBorderLine->GetBorderLineStyle(), pBorderLine->GetWidth()));
// The unit is the 8th of point
sal_Int32 nWidth = sal_Int32( fConverted / 2.5 );
- sal_uInt16 nMinWidth = 2;
- sal_uInt16 nMaxWidth = 96;
+ const sal_Int32 nMinWidth = 2;
+ const sal_Int32 nMaxWidth = 96;
if ( nWidth > nMaxWidth )
nWidth = nMaxWidth;
@@ -2939,7 +2939,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
{
- sal_uInt32 nPageSize = 0;
+ long nPageSize = 0;
bool bRelBoxSize = false;
// Create the SwWriteTable instance to use col spans (and maybe other infos)
@@ -2947,14 +2947,13 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
const SwTable* pTable = pTableTextNodeInfoInner->getTable( );
const SwFrmFmt *pFmt = pTable->GetFrmFmt( );
- SwTwips nTblSz = pFmt->GetFrmSize( ).GetWidth( );
+ const sal_uInt32 nTblSz = static_cast<sal_uInt32>(pFmt->GetFrmSize( ).GetWidth( ));
const SwHTMLTableLayout *pLayout = pTable->GetHTMLTableLayout();
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
- (sal_uInt16)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), nPageSize, nTblSz, false);
}
void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -3115,7 +3114,7 @@ void DocxAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_pSerializer->mark( aSeqOrder );
- sal_uInt32 nPageSize = 0;
+ long nPageSize = 0;
const char* widthType = "dxa";
bool bRelBoxSize = false;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index d6e6115d235c..3ae033e35dd4 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -844,7 +844,7 @@ void RtfAttributeOutput::TableRowEnd(sal_uInt32 /*nDepth*/)
void RtfAttributeOutput::InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner)
{
- sal_uInt32 nPageSize = 0;
+ long nPageSize = 0;
bool bRelBoxSize = false;
// Create the SwWriteTable instance to use col spans
@@ -852,14 +852,13 @@ void RtfAttributeOutput::InitTableHelper(ww8::WW8TableNodeInfoInner::Pointer_t p
const SwTable* pTable = pTableTextNodeInfoInner->getTable();
const SwFrmFmt* pFmt = pTable->GetFrmFmt();
- SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
+ const sal_uInt32 nTblSz = static_cast<sal_uInt32>(pFmt->GetFrmSize().GetWidth());
const SwHTMLTableLayout* pLayout = pTable->GetHTMLTableLayout();
if (pLayout && pLayout->IsExportable())
m_pTableWrt = new SwWriteTable(pLayout);
else
- m_pTableWrt = new SwWriteTable(pTable->GetTabLines(), (sal_uInt16)nPageSize,
- (sal_uInt16)nTblSz, false);
+ m_pTableWrt = new SwWriteTable(pTable->GetTabLines(), nPageSize, nTblSz, false);
}
void RtfAttributeOutput::StartTable(ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/)
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index af4167581941..b724c243da0c 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -2330,9 +2330,9 @@ ww8::WidthsPtr AttributeOutputBase::GetColumnWidths( ww8::WW8TableNodeInfoInner:
return pTableTextNodeInfoInner->getGridColsOfRow(*this, true);
}
-void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, sal_uInt32& rPageSize, bool& rRelBoxSize )
+void AttributeOutputBase::GetTablePageSize( ww8::WW8TableNodeInfoInner * pTableTextNodeInfoInner, long& rPageSize, bool& rRelBoxSize )
{
- sal_uInt32 nPageSize = 0;
+ long nPageSize = 0;
const SwNode *pTxtNd = pTableTextNodeInfoInner->getNode( );
const SwTable *pTable = pTableTextNodeInfoInner->getTable( );