diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-09 09:21:53 +1100 |
---|---|---|
committer | Chris Sherlock <chris.sherlock79@gmail.com> | 2016-02-09 08:11:34 +0000 |
commit | 538f276ae0414ea34ede6090b5f56e8fecd6fc65 (patch) | |
tree | efbfb952f3236a6f56540ddae6a896c8c73774a0 /hwpfilter | |
parent | f12e483589888f87843026ceff5ae3c1e615ca02 (diff) |
Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs
Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Diffstat (limited to 'hwpfilter')
-rw-r--r-- | hwpfilter/source/hwpfile.cxx | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/hwpfilter/source/hwpfile.cxx b/hwpfilter/source/hwpfile.cxx index fb989ad3476f..0c8a88c07be6 100644 --- a/hwpfilter/source/hwpfile.cxx +++ b/hwpfilter/source/hwpfile.cxx @@ -384,7 +384,7 @@ ColumnDef *HWPFile::GetColumnDef(int num) for(int i = 0; it != columnlist.end() ; ++it, i++){ if( i == num ) - break; + break; } if( it != columnlist.end() ) @@ -411,8 +411,8 @@ HyperText *HWPFile::GetHyperText() std::list<HyperText*>::iterator it = hyperlist.begin(); for( int i = 0; it != hyperlist.end(); ++it, i++ ){ - if( i == currenthyper ) - break; + if( i == currenthyper ) + break; } currenthyper++; @@ -468,8 +468,8 @@ ParaShape *HWPFile::getParaShape(int index) std::list<ParaShape*>::iterator it = pslist.begin(); for( int i = 0; it != pslist.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != pslist.end() ? *it : nullptr; @@ -481,8 +481,8 @@ CharShape *HWPFile::getCharShape(int index) std::list<CharShape*>::iterator it = cslist.begin(); for( int i = 0; it != cslist.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != cslist.end() ? *it : nullptr; @@ -494,8 +494,8 @@ FBoxStyle *HWPFile::getFBoxStyle(int index) std::list<FBoxStyle*>::iterator it = fbslist.begin(); for( int i = 0; it != fbslist.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != fbslist.end() ? *it : nullptr; @@ -506,8 +506,8 @@ DateCode *HWPFile::getDateCode(int index) std::list<DateCode*>::iterator it = datecodes.begin(); for( int i = 0; it != datecodes.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != datecodes.end() ? *it : nullptr; @@ -518,8 +518,8 @@ HeaderFooter *HWPFile::getHeaderFooter(int index) std::list<HeaderFooter*>::iterator it = headerfooters.begin(); for( int i = 0; it != headerfooters.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != headerfooters.end() ? *it : nullptr; @@ -530,8 +530,8 @@ ShowPageNum *HWPFile::getPageNumber(int index) std::list<ShowPageNum*>::iterator it = pagenumbers.begin(); for( int i = 0; it != pagenumbers.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != pagenumbers.end() ? *it : nullptr; @@ -543,8 +543,8 @@ Table *HWPFile::getTable(int index) std::list<Table*>::iterator it = tables.begin(); for( int i = 0; it != tables.end(); ++it, i++ ){ - if( i == index ) - break; + if( i == index ) + break; } return it != tables.end() ? *it : nullptr; @@ -555,22 +555,24 @@ void HWPFile::AddParaShape(ParaShape * pshape) int nscount = 0; for(int j = 0 ; j < MAXTABS-1 ; j++) { - if( j > 0 && pshape->tabs[j].position == 0 ) - break; - if( pshape->tabs[0].position == 0 ){ - if( pshape->tabs[j].type || pshape->tabs[j].dot_continue || - (pshape->tabs[j].position != 1000 *j) ) - nscount = j; - } - else{ - if( pshape->tabs[j].type || pshape->tabs[j].dot_continue || - (pshape->tabs[j].position != 1000 * (j + 1)) ) - nscount = j; + if( j > 0 && pshape->tabs[j].position == 0 ) + break; + if( pshape->tabs[0].position == 0 ){ + if( pshape->tabs[j].type || pshape->tabs[j].dot_continue || + (pshape->tabs[j].position != 1000 *j) ) + nscount = j; + } + else { + if( pshape->tabs[j].type || pshape->tabs[j].dot_continue || + (pshape->tabs[j].position != 1000 * (j + 1)) ) + nscount = j; } } if( nscount ) pshape->tabs[MAXTABS-1].type = sal::static_int_cast<char>(nscount); - int value = compareParaShape(pshape); + + int value = compareParaShape(pshape); + if( value == 0 || nscount ) { pshape->index = ++pcount; |