Kaydet (Commit) 49f78145 authored tarafından Michael Stahl's avatar Michael Stahl

SwGlobalTree::InsertRegion: -Werror=sign-compare

Change-Id: Ib00a12ba38334a1233c2894606c097bfa2891813
üst 0d3b54b6
...@@ -1284,10 +1284,11 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen ...@@ -1284,10 +1284,11 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
rSh.StartAction(); rSh.StartAction();
// after insertion of the first new content the 'pCont' parameter becomes invalid // after insertion of the first new content the 'pCont' parameter becomes invalid
// find the index of the 'anchor' content to always use a current anchor content // find the index of the 'anchor' content to always use a current anchor content
sal_uInt16 nAnchorContent = pSwGlblDocContents->size() - 1; size_t nAnchorContent = pSwGlblDocContents->size() - 1;
if ( !bMove ) if ( !bMove )
{ {
for( sal_uInt16 nContent = 0; nContent < pSwGlblDocContents->size(); ++nContent ) for (size_t nContent = 0; nContent < pSwGlblDocContents->size();
++nContent)
{ {
if( *_pContent == *(*pSwGlblDocContents)[ nContent ] ) if( *_pContent == *(*pSwGlblDocContents)[ nContent ] )
{ {
...@@ -1304,7 +1305,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen ...@@ -1304,7 +1305,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* _pContent, const Sequen
SwGlblDocContent* pAnchorContent = 0; SwGlblDocContent* pAnchorContent = 0;
OSL_ENSURE(aTempContents.size() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed"); OSL_ENSURE(aTempContents.size() > (nAnchorContent + nFile), "invalid anchor content -> last insertion failed");
if ( aTempContents.size() > (nAnchorContent + nFile) ) if ( aTempContents.size() > (nAnchorContent + nFile) )
pAnchorContent = aTempContents[nAnchorContent + (sal_uInt16)nFile]; pAnchorContent = aTempContents[nAnchorContent + nFile];
else else
pAnchorContent = aTempContents.back(); pAnchorContent = aTempContents.back();
String sFileName(pFileNames[nFile]); String sFileName(pFileNames[nFile]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment