diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/inc/doc.hxx | 4 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docfmt.cxx | 12 | ||||
-rw-r--r-- | sw/source/core/edit/edfmt.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unochart.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/unocore/unocoll.cxx | 18 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh1.cxx | 2 |
8 files changed, 27 insertions, 27 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 8ca9f643c72c..a7c8926cd4f2 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -880,8 +880,8 @@ public: // Table formatting const SwFrmFmts* GetTblFrmFmts() const { return mpTblFrmFmtTbl; } SwFrmFmts* GetTblFrmFmts() { return mpTblFrmFmtTbl; } - sal_uInt16 GetTblFrmFmtCount( bool bUsed ) const; - SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, bool bUsed ) const; + size_t GetTblFrmFmtCount( bool bUsed ) const; + SwFrmFmt& GetTblFrmFmt(size_t nFmt, bool bUsed ) const; SwTableFmt* MakeTblFrmFmt(const OUString &rFmtName, SwFrmFmt *pDerivedFrom); void DelTblFrmFmt( SwTableFmt* pFmt ); SwTableFmt* FindTblFmtByName( const OUString& rName, bool bAll = false ) const; diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index a8b4d7041e2c..815dfa1ac960 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -285,8 +285,8 @@ public: sal_uInt16 GetCurLang() const; /// TABLE - sal_uInt16 GetTblFrmFmtCount( bool bUsed = false ) const; - SwFrmFmt& GetTblFrmFmt(sal_uInt16 nFmt, bool bUsed = false ) const; + size_t GetTblFrmFmtCount( bool bUsed = false ) const; + SwFrmFmt& GetTblFrmFmt(size_t nFmt, bool bUsed = false ) const; OUString GetUniqueTblName() const; /// CHAR diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx index 0c7966e6bd69..54beda77f67f 100644 --- a/sw/source/core/doc/docfmt.cxx +++ b/sw/source/core/doc/docfmt.cxx @@ -754,13 +754,13 @@ SwDrawFrmFmt *SwDoc::MakeDrawFrmFmt( const OUString &rFmtName, return pFmt; } -sal_uInt16 SwDoc::GetTblFrmFmtCount(bool bUsed) const +size_t SwDoc::GetTblFrmFmtCount(bool bUsed) const { - sal_uInt16 nCount = mpTblFrmFmtTbl->size(); + size_t nCount = mpTblFrmFmtTbl->size(); if(bUsed) { SwAutoFmtGetDocNode aGetHt( &GetNodes() ); - for ( sal_uInt16 i = nCount; i; ) + for ( size_t i = nCount; i; ) { if((*mpTblFrmFmtTbl)[--i]->GetInfo( aGetHt )) --nCount; @@ -769,13 +769,13 @@ sal_uInt16 SwDoc::GetTblFrmFmtCount(bool bUsed) const return nCount; } -SwFrmFmt& SwDoc::GetTblFrmFmt(sal_uInt16 nFmt, bool bUsed ) const +SwFrmFmt& SwDoc::GetTblFrmFmt(size_t nFmt, bool bUsed ) const { - sal_uInt16 nRemoved = 0; + size_t nRemoved = 0; if(bUsed) { SwAutoFmtGetDocNode aGetHt( &GetNodes() ); - for ( sal_uInt16 i = 0; i <= nFmt; i++ ) + for ( size_t i = 0; i <= nFmt; ++i ) { while ( (*mpTblFrmFmtTbl)[ i + nRemoved]->GetInfo( aGetHt )) { diff --git a/sw/source/core/edit/edfmt.cxx b/sw/source/core/edit/edfmt.cxx index ad9748efa5b3..1c94fb77e469 100644 --- a/sw/source/core/edit/edfmt.cxx +++ b/sw/source/core/edit/edfmt.cxx @@ -105,12 +105,12 @@ void SwEditShell::FillByEx(SwCharFmt* pCharFmt, bool bReset) pCharFmt->SetFmtAttr( *pCNd->GetpSwAttrSet() ); } -sal_uInt16 SwEditShell::GetTblFrmFmtCount(bool bUsed) const +size_t SwEditShell::GetTblFrmFmtCount(bool bUsed) const { return GetDoc()->GetTblFrmFmtCount(bUsed); } -SwFrmFmt& SwEditShell::GetTblFrmFmt(sal_uInt16 nFmt, bool bUsed ) const +SwFrmFmt& SwEditShell::GetTblFrmFmt(size_t nFmt, bool bUsed ) const { return GetDoc()->GetTblFrmFmt(nFmt, bUsed ); } diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx index cec7d220a206..0fbd89f7a9dd 100644 --- a/sw/source/core/unocore/unochart.cxx +++ b/sw/source/core/unocore/unochart.cxx @@ -349,8 +349,8 @@ static void GetTableByName( const SwDoc &rDoc, const OUString &rTableName, // find frame format of table //! see SwXTextTables::getByName - const sal_uInt16 nCount = rDoc.GetTblFrmFmtCount(true); - for (sal_uInt16 i = 0; i < nCount && !pTblFmt; ++i) + const size_t nCount = rDoc.GetTblFrmFmtCount(true); + for (size_t i = 0; i < nCount && !pTblFmt; ++i) { SwFrmFmt& rTblFmt = rDoc.GetTblFrmFmt(i, true); if(rTableName == rTblFmt.GetName()) diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx index 3cc26eb2997b..589d3f25df17 100644 --- a/sw/source/core/unocore/unocoll.cxx +++ b/sw/source/core/unocore/unocoll.cxx @@ -851,7 +851,7 @@ sal_Int32 SwXTextTables::getCount(void) throw( uno::RuntimeException, std::excep SolarMutexGuard aGuard; sal_Int32 nRet = 0; if(IsValid()) - nRet = GetDoc()->GetTblFrmFmtCount(true); + nRet = static_cast<sal_Int32>(GetDoc()->GetTblFrmFmtCount(true)); return nRet; } @@ -862,7 +862,7 @@ uno::Any SAL_CALL SwXTextTables::getByIndex(sal_Int32 nIndex) uno::Any aRet; if(IsValid()) { - if(0 <= nIndex && GetDoc()->GetTblFrmFmtCount(true) > nIndex) + if(0 <= nIndex && GetDoc()->GetTblFrmFmtCount(true) > static_cast<size_t>(nIndex)) { SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(nIndex, true); uno::Reference< XTextTable > xTbl = SwXTextTables::GetObject(rFmt); @@ -884,9 +884,9 @@ uno::Any SwXTextTables::getByName(const OUString& rItemName) uno::Any aRet; if(IsValid()) { - const sal_uInt16 nCount = GetDoc()->GetTblFrmFmtCount(true); + const size_t nCount = GetDoc()->GetTblFrmFmtCount(true); uno::Reference< XTextTable > xTbl; - for( sal_uInt16 i = 0; i < nCount; i++) + for( size_t i = 0; i < nCount; ++i) { SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(i, true); if (rItemName == rFmt.GetName()) @@ -911,12 +911,12 @@ uno::Sequence< OUString > SwXTextTables::getElementNames(void) SolarMutexGuard aGuard; if(!IsValid()) throw uno::RuntimeException(); - const sal_uInt16 nCount = GetDoc()->GetTblFrmFmtCount(true); - uno::Sequence<OUString> aSeq(nCount); + const size_t nCount = GetDoc()->GetTblFrmFmtCount(true); + uno::Sequence<OUString> aSeq(static_cast<sal_Int32>(nCount)); if(nCount) { OUString* pArray = aSeq.getArray(); - for( sal_uInt16 i = 0; i < nCount; i++) + for( size_t i = 0; i < nCount; ++i) { SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(i, true); @@ -933,8 +933,8 @@ sal_Bool SwXTextTables::hasByName(const OUString& rName) bool bRet= false; if(IsValid()) { - const sal_uInt16 nCount = GetDoc()->GetTblFrmFmtCount(true); - for( sal_uInt16 i = 0; i < nCount; i++) + const size_t nCount = GetDoc()->GetTblFrmFmtCount(true); + for( size_t i = 0; i < nCount; ++i) { SwFrmFmt& rFmt = GetDoc()->GetTblFrmFmt(i, true); if (rName == rFmt.GetName()) diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index d05e2a39a4cf..3b4ebde35bc4 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -233,7 +233,7 @@ void SwContentType::Init(bool* pbInvalidateWindow) case CONTENT_TYPE_TABLE : sTypeToken = "table"; - nMemberCount = pWrtShell->GetTblFrmFmtCount(true); + nMemberCount = static_cast<sal_uInt16>(pWrtShell->GetTblFrmFmtCount(true)); bEdit = true; break; @@ -518,10 +518,10 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) case CONTENT_TYPE_TABLE : { - OSL_ENSURE(nMemberCount == pWrtShell->GetTblFrmFmtCount(true), + OSL_ENSURE(nMemberCount == static_cast<sal_uInt16>(pWrtShell->GetTblFrmFmtCount(true)), "MemberCount differs"); Point aNullPt; - nMemberCount = pWrtShell->GetTblFrmFmtCount(true); + nMemberCount = static_cast<sal_uInt16>(pWrtShell->GetTblFrmFmtCount(true)); for(sal_uInt16 i = 0; i < nMemberCount; i++) { const SwFrmFmt& rTblFmt = pWrtShell->GetTblFrmFmt(i, true); diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index e6972174cda7..3865697dc3aa 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx @@ -1475,7 +1475,7 @@ SwCharFmt *SwWrtShell::GetCharStyle(const OUString &rFmtName, GetStyle eCreate ) SwFrmFmt *SwWrtShell::GetTblStyle(const OUString &rFmtName) { SwFrmFmt *pFmt = 0; - for( sal_uInt16 i = GetTblFrmFmtCount(); i; ) + for( size_t i = GetTblFrmFmtCount(); i; ) if( !( pFmt = &GetTblFrmFmt( --i ) )->IsDefault() && pFmt->GetName() == rFmtName && IsUsed( *pFmt ) ) return pFmt; |