summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-10-07 12:54:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-07 13:05:02 +0200
commit8ab5a090f632507802072b20660c8403bf4bfd39 (patch)
tree8ad6ce9216714eb7437d4047ebaa3e29022db068 /writerfilter
parentbd633f4c85dbb7750f10083f9240282059aaf491 (diff)
-Werror=sign-compare
Change-Id: Ic96b85c5c4995f47781eceb6a426a29d8b7679ea
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/DomainMapper.cxx6
-rw-r--r--writerfilter/source/dmapper/DomainMapperTableHandler.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.hxx2
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx10
-rw-r--r--writerfilter/source/dmapper/PropertyMap.hxx2
-rw-r--r--writerfilter/source/rtftok/rtfdocumentimpl.cxx4
7 files changed, 14 insertions, 14 deletions
diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx
index a6f76e7a8626..515a1cd4865b 100644
--- a/writerfilter/source/dmapper/DomainMapper.cxx
+++ b/writerfilter/source/dmapper/DomainMapper.cxx
@@ -537,7 +537,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
}
break;
case NS_ooxml::LN_CT_PageSz_orient:
- CT_PageSz.orient = (nIntValue != NS_ooxml::LN_Value_ST_PageOrientation_portrait);
+ CT_PageSz.orient = (nIntValue != static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_PageOrientation_portrait));
break;
case NS_ooxml::LN_CT_PageSz_w:
{
@@ -864,7 +864,7 @@ void DomainMapper::lcl_attribute(Id nName, Value & val)
pSectionContext->SetdxaLnn( nIntValue );
break;
case NS_ooxml::LN_CT_LineNumber_restart:
- aSettings.bRestartAtEachPage = nIntValue == NS_ooxml::LN_Value_ST_LineNumberRestart_newPage;
+ aSettings.bRestartAtEachPage = nIntValue == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_LineNumberRestart_newPage);
OSL_ENSURE(pSectionContext, "SectionContext unavailable!");
if( pSectionContext )
pSectionContext->SetLnc( nIntValue );
@@ -1653,7 +1653,7 @@ void DomainMapper::sprmWithProps( Sprm& rSprm, PropertyMapPtr rContext )
bHasPrevSection = true;
nPrevBreakType = pLastContext->GetBreakType();
}
- if (m_pImpl->GetParaSectpr() || nIntValue != NS_ooxml::LN_Value_ST_SectionMark_continuous || (bHasPrevSection && nPrevBreakType != nIntValue))
+ if (m_pImpl->GetParaSectpr() || nIntValue != static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous) || (bHasPrevSection && nPrevBreakType != nIntValue))
pSectionContext->SetBreakType( nIntValue );
}
break;
diff --git a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
index 3fc80f8546ed..835387d5a2d5 100644
--- a/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
+++ b/writerfilter/source/dmapper/DomainMapperTableHandler.cxx
@@ -809,7 +809,7 @@ CellPropertyValuesSeq_t DomainMapperTableHandler::endTableGetCellProperties(Tabl
const boost::optional<PropertyMap::Property> aCellDirectionVal = (*aCellIterator)->getProperty(PROP_CELL_DIRECTION);
if (aCellDirectionVal)
{
- if (aCellDirectionVal->second.get<sal_Int32>() == NS_ooxml::LN_Value_ST_TextDirection_btLr)
+ if (aCellDirectionVal->second.get<sal_Int32>() == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_TextDirection_btLr))
{
// btLr, so map ParagraphAdjust_CENTER to VertOrientation::CENTER.
uno::Reference<beans::XPropertySet> xPropertySet((*m_pTableSeq)[nRow][nCell][0], uno::UNO_QUERY);
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index bec154252e4a..1f98d0cc2553 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4516,7 +4516,7 @@ void DomainMapper_Impl::ImportGraphic(writerfilter::Reference< Properties >::Po
-void DomainMapper_Impl::SetLineNumbering( sal_Int32 nLnnMod, sal_Int32 nLnc, sal_Int32 ndxaLnn )
+void DomainMapper_Impl::SetLineNumbering( sal_Int32 nLnnMod, sal_uInt32 nLnc, sal_Int32 ndxaLnn )
{
if( !m_bLineNumberingSet )
{
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
index 817510c2f1ec..76d6c57470be 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx
@@ -680,7 +680,7 @@ public:
m_aTableManagers.pop( );
}
- void SetLineNumbering( sal_Int32 nLnnMod, sal_Int32 nLnc, sal_Int32 ndxaLnn );
+ void SetLineNumbering( sal_Int32 nLnnMod, sal_uInt32 nLnc, sal_Int32 ndxaLnn );
bool IsLineNumberingSet() const {return m_bLineNumberingSet;}
DeletableTabStop m_aCurrentTabStop;
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index a91f035d9e55..b28638e04851 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -1074,7 +1074,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
// depending on the break type no page styles should be created
// If the section type is missing, but we have columns, then this should be
// handled as a continuous section break.
- if(m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_continuous || (m_nBreakType == -1 && m_nColumnCount > 0))
+ if(m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous) || (m_nBreakType == -1 && m_nColumnCount > 0))
{
//todo: insert a section or access the already inserted section
uno::Reference< beans::XPropertySet > xSection =
@@ -1105,7 +1105,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
// If the section is of type "New column" (0x01), then simply insert a column break.
// But only if there actually are columns on the page, otherwise a column break
// seems to be handled like a page break by MSO.
- else if(m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_nextColumn && m_nColumnCount > 0 )
+ else if(m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_nextColumn) && m_nColumnCount > 0 )
{
uno::Reference< beans::XPropertySet > xRangeProperties;
if( m_xStartingRange.is() )
@@ -1252,7 +1252,7 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
// Handle page breaks with odd/even page numbering. We need to use an extra page style for setting the page style
// to left/right, because if we set it to the normal style, we'd set it to "First Page"/"Default Style", which would
// break them (all default pages would be only left or right).
- if (m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_evenPage || m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_oddPage)
+ if (m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_evenPage) || m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_oddPage))
{
OUString* pageStyle = m_bTitlePage ? &m_sFirstPageStyleName : &m_sFollowPageStyleName;
OUString evenOddStyleName = lcl_FindUnusedPageStyleName(rDM_Impl.GetPageStyles()->getElementNames());
@@ -1274,9 +1274,9 @@ void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )
evenOddStyle->setPropertyValue("FooterIsOn", uno::makeAny(sal_False));
CopyHeaderFooter( pageProperties, evenOddStyle );
*pageStyle = evenOddStyleName; // And use it instead of the original one (which is set as follow of this one).
- if (m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_evenPage)
+ if (m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_evenPage))
evenOddStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_STYLE_LAYOUT), uno::makeAny(style::PageStyleLayout_LEFT));
- else if (m_nBreakType == NS_ooxml::LN_Value_ST_SectionMark_oddPage)
+ else if (m_nBreakType == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_oddPage))
evenOddStyle->setPropertyValue(rPropNameSupplier.GetName(PROP_PAGE_STYLE_LAYOUT), uno::makeAny(style::PageStyleLayout_RIGHT));
}
diff --git a/writerfilter/source/dmapper/PropertyMap.hxx b/writerfilter/source/dmapper/PropertyMap.hxx
index dd6d2a7627de..339f740d3f7c 100644
--- a/writerfilter/source/dmapper/PropertyMap.hxx
+++ b/writerfilter/source/dmapper/PropertyMap.hxx
@@ -236,7 +236,7 @@ class SectionPropertyMap : public PropertyMap
//line numbering
sal_Int32 m_nLnnMod;
- sal_Int32 m_nLnc;
+ sal_uInt32 m_nLnc;
sal_Int32 m_ndxaLnn;
sal_Int32 m_nLnnMin;
diff --git a/writerfilter/source/rtftok/rtfdocumentimpl.cxx b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
index 8dd76c7f26f1..1c07fb898878 100644
--- a/writerfilter/source/rtftok/rtfdocumentimpl.cxx
+++ b/writerfilter/source/rtftok/rtfdocumentimpl.cxx
@@ -585,7 +585,7 @@ void RTFDocumentImpl::sectBreak(bool bFinal = false)
SAL_INFO("writerfilter", OSL_THIS_FUNC << ": final? " << bFinal << ", needed? " << m_bNeedSect);
bool bNeedSect = m_bNeedSect;
RTFValue::Pointer_t pBreak = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_type);
- bool bContinuous = pBreak.get() && pBreak->getInt() == NS_ooxml::LN_Value_ST_SectionMark_continuous;
+ bool bContinuous = pBreak.get() && pBreak->getInt() == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous);
// If there is no paragraph in this section, then insert a dummy one, as required by Writer,
// unless this is the end of the doc, we had nothing since the last section break and this is not a continuous one.
if (m_bNeedPar && !(bFinal && !m_bNeedSect && !bContinuous) && !isSubstream())
@@ -2329,7 +2329,7 @@ int RTFDocumentImpl::dispatchSymbol(RTFKeyword nKeyword)
RTFValue::Pointer_t pBreak = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_type);
// Unless we're on a title page.
RTFValue::Pointer_t pTitlePg = m_aStates.top().aSectionSprms.find(NS_ooxml::LN_EG_SectPrContents_titlePg);
- if (((pBreak.get() && pBreak->getInt() == NS_ooxml::LN_Value_ST_SectionMark_continuous)
+ if (((pBreak.get() && pBreak->getInt() == static_cast<sal_Int32>(NS_ooxml::LN_Value_ST_SectionMark_continuous))
|| m_nResetBreakOnSectBreak == RTF_SBKNONE)
&& !(pTitlePg.get() && pTitlePg->getInt()))
{