summaryrefslogtreecommitdiff
path: root/xmlhelp
diff options
context:
space:
mode:
authorJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 23:41:11 +0000
committerJens-Heiner Rechtien <hr@openoffice.org>2006-06-19 23:41:11 +0000
commite5b7af88db0de698d330ef15e11b3cb53f16f397 (patch)
treee9ef5137ff8c8f64dfffcd76069cbb47965bc3b6 /xmlhelp
parentaf0fada2415e1c6980eb8eeaa817242913d40008 (diff)
INTEGRATION: CWS warnings01 (1.6.18); FILE MERGED
2005/12/15 16:36:45 ab 1.6.18.1: #i53898# Removed warnings for unxlngi6/unxlngi6.pro
Diffstat (limited to 'xmlhelp')
-rw-r--r--xmlhelp/source/cxxhelp/qe/ContextTables.cxx54
-rw-r--r--xmlhelp/source/cxxhelp/qe/DocGenerator.cxx48
2 files changed, 52 insertions, 50 deletions
diff --git a/xmlhelp/source/cxxhelp/qe/ContextTables.cxx b/xmlhelp/source/cxxhelp/qe/ContextTables.cxx
index e3f07e76a61a..3187884fc7d3 100644
--- a/xmlhelp/source/cxxhelp/qe/ContextTables.cxx
+++ b/xmlhelp/source/cxxhelp/qe/ContextTables.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ContextTables.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 12:22:44 $
+ * last change: $Author: hr $ $Date: 2006-06-20 00:40:57 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -114,25 +114,25 @@ void Tables::setTables( ContextTables* p )
ContextTables::ContextTables( const std::vector< sal_Int32 >& offsets,
sal_Int32 contextDataL,sal_Int8 *contextData,
sal_Int32 linkNamesL,rtl::OUString *linkNames )
- : kTable_( 5 ),
- auxArray_( 4096 ),
- lastDocNo_( -1 ),
- offsets_( offsets ),
- contextDataL_( contextDataL ),
- contextData_( contextData ),
- linkNamesL_( linkNamesL ),
- linkNames_( linkNames ),
- cache_( offsets.size() ),
+ : lastDocNo_( -1 ),
initialWordsL_( 0 ),
- initialWords_( 0 ),
destsL_( 0 ),
- dests_( 0 ),
linkTypesL_( 0 ),
- linkTypes_( 0 ),
seqNumbersL_( 0 ),
- seqNumbers_( 0 ),
markersL_( 0 ),
- markers_( 0 )
+ initialWords_( 0 ),
+ dests_( 0 ),
+ linkTypes_( 0 ),
+ seqNumbers_( 0 ),
+ markers_( 0 ),
+ contextDataL_( contextDataL ),
+ contextData_( contextData ),
+ linkNamesL_( linkNamesL ),
+ linkNames_( linkNames ),
+ cache_( offsets.size() ),
+ kTable_( 5 ),
+ auxArray_( 4096 ),
+ offsets_( offsets )
{
for( sal_uInt32 i = 0; i < offsets_.size(); ++i )
cache_[i] = 0;
@@ -220,10 +220,10 @@ rtl::OUString ContextTables::linkName( sal_Int32 context )
}
-sal_Int32 ContextTables::linkCode( const rtl::OUString& linkName )
+sal_Int32 ContextTables::linkCode( const rtl::OUString& linkName_ )
{
for( sal_Int32 i = 0; i < linkNamesL_; ++i )
- if( linkName == linkNames_[i] )
+ if( linkName_ == linkNames_[i] )
return i;
return -1; // when not found
}
@@ -256,6 +256,8 @@ bool* ContextTables::getIgnoredElementsSet( sal_Int32& len,
bool ContextTables::notIgnored( sal_Int32 ctx,
sal_Int32 ignoredElementsL,bool* ignoredElements )
{
+ (void)ignoredElementsL;
+
do
{
if( ignoredElements[ linkTypes_[ ctx ] ] )
@@ -271,12 +273,12 @@ bool ContextTables::notIgnored( sal_Int32 ctx,
* context with the given linkCode
*/
-sal_Int32 ContextTables::firstParentWithCode( const sal_Int32 pos,const sal_Int32 linkCode )
+sal_Int32 ContextTables::firstParentWithCode( const sal_Int32 pos,const sal_Int32 linkCode_ )
{
sal_Int32 ctx = dests_[ wordContextLin(pos) ]; // first parent of text node
const sal_Int32 shift = nTextNodes_;
const sal_Int32 limit = destsL_ - 1;
- while( linkTypes_[ ctx - shift ] != linkCode )
+ while( linkTypes_[ ctx - shift ] != linkCode_ )
if( ( ctx = dests_[ ctx ] ) == limit )
return -1;
return ctx;
@@ -289,13 +291,13 @@ sal_Int32 ContextTables::firstParentWithCode( const sal_Int32 pos,const sal_Int3
* context with the given linkCode and given parent code
*/
-sal_Int32 ContextTables::firstParentWithCode2( sal_Int32 pos,const sal_Int32 linkCode,const sal_Int32 parentCode)
+sal_Int32 ContextTables::firstParentWithCode2( sal_Int32 pos,const sal_Int32 linkCode_,const sal_Int32 parentCode)
{
sal_Int32 ctx = dests_[ wordContextLin( pos ) ]; // first parent of text node
const sal_Int32 shift = nTextNodes_;
const sal_Int32 limit = destsL_ - 1;
for( sal_Int32 parent = dests_[ctx]; parent < limit; parent = dests_[ parent ] )
- if( linkTypes_[ parent - shift ] == parentCode && linkTypes_[ ctx - shift ] == linkCode )
+ if( linkTypes_[ parent - shift ] == parentCode && linkTypes_[ ctx - shift ] == linkCode_ )
return ctx;
else
ctx = parent;
@@ -308,13 +310,13 @@ sal_Int32 ContextTables::firstParentWithCode2( sal_Int32 pos,const sal_Int32 lin
* context with the given linkCode and given ancestor code
*/
-sal_Int32 ContextTables::firstParentWithCode3( sal_Int32 pos,sal_Int32 linkCode,sal_Int32 ancestorCode )
+sal_Int32 ContextTables::firstParentWithCode3( sal_Int32 pos,sal_Int32 linkCode_,sal_Int32 ancestorCode )
{
sal_Int32 ctx = dests_[ wordContextLin( pos ) ];
const sal_Int32 shift = nTextNodes_;
const sal_Int32 limit = destsL_ - 1;
// find first instance of linkCode
- while( ctx < limit && linkTypes_[ ctx - shift ] != linkCode )
+ while( ctx < limit && linkTypes_[ ctx - shift ] != linkCode_ )
ctx = dests_[ ctx ];
if( ctx < limit ) // found linkCode, check ancestry
for( sal_Int32 ancestor = dests_[ctx];
@@ -383,12 +385,12 @@ sal_Int32 ContextTables::firstParentWithCode5(sal_Int32 pos,sal_Int32 pathCodesL
* context with the given linkCode
*/
-sal_Int32 ContextTables::firstParentWithCode7( const sal_Int32 pos,const sal_Int32 linkCode,const sal_Int32 seq)
+sal_Int32 ContextTables::firstParentWithCode7( const sal_Int32 pos,const sal_Int32 linkCode_,const sal_Int32 seq)
{
sal_Int32 ctx = dests_[ wordContextLin(pos) ]; // first parent of text node
const sal_Int32 shift = nTextNodes_;
const sal_Int32 limit = destsL_ - 1;
- while (linkTypes_[ctx - shift] != linkCode || seqNumbers_[ctx] != seq)
+ while (linkTypes_[ctx - shift] != linkCode_ || seqNumbers_[ctx] != seq)
if ((ctx = dests_[ctx]) == limit)
return -1;
return ctx;
diff --git a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
index b8a9fc4f1caf..b8f7d1acad0d 100644
--- a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
+++ b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: DocGenerator.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: rt $ $Date: 2005-09-09 12:23:00 $
+ * last change: $Author: hr $ $Date: 2006-06-20 00:41:11 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -53,16 +53,16 @@ RoleFiller RoleFiller::roleFiller_;
RoleFiller::RoleFiller()
- : conceptData_( 0 ),
+ : m_nRefcount( 0 ),
fixedRole_( 0 ),
filled_( 0 ),
begin_( 0 ),
end_( 0 ),
- limit_( 0 ),
parentContext_( 0 ),
+ limit_( 0 ),
next_( 0 ),
fillers_( 0 ),
- m_nRefcount( 0 )
+ conceptData_( 0 )
{
}
@@ -73,11 +73,11 @@ RoleFiller::RoleFiller( sal_Int32 nColumns,
sal_Int32 pos,
sal_Int32 parentContext,
sal_Int32 limit )
- : next_( 0 ),
- conceptData_( first ),
+ : m_nRefcount( 0 ),
fixedRole_( sal_uInt8( role & 0xF ) ), // primary/constitutive concept/role
+ next_( 0 ),
fillers_( nColumns ),
- m_nRefcount( 0 )
+ conceptData_( first )
{
filled_ = sal_Int16( 1 << fixedRole_ );
begin_ = pos; // offset in file
@@ -112,33 +112,33 @@ void RoleFiller::scoreList( Query* query,sal_Int32 document )
// the loop's logic makes sure that at emit time there's no better/earlier filler
// to overlap with the candidate
- double penalty = candidateHit->penalty( query,nColumns );
+ double penalty_ = candidateHit->penalty( query,nColumns );
for( next = candidateHit->next_; next; next = next->next_ )
if( next->end_ < candidateHit->begin_ )
{ // no overlap
- candidateHit->makeQueryHit( query,document,penalty );
+ candidateHit->makeQueryHit( query,document,penalty_ );
candidateHit = next;
- penalty = candidateHit->penalty( query,nColumns );
+ penalty_ = candidateHit->penalty( query,nColumns );
}
else
{ // !!! can be computed in two steps
double penalty2 = next->penalty( query,nColumns );
- if( penalty2 <= penalty )
+ if( penalty2 <= penalty_ )
{ // prefer next, disregard candidateHit
- penalty = penalty2;
+ penalty_ = penalty2;
candidateHit = next;
}
}
- candidateHit->makeQueryHit(query,document,penalty);
+ candidateHit->makeQueryHit(query,document,penalty_);
}
-void RoleFiller::makeQueryHit( Query* query,sal_Int32 doc,double penalty )
+void RoleFiller::makeQueryHit( Query* query,sal_Int32 doc,double penalty_ )
{
- QueryHit* hit = query->maybeCreateQueryHit( penalty,doc,
+ QueryHit* hit = query->maybeCreateQueryHit( penalty_,doc,
begin_,end_,parentContext_ );
if( hit )
{
@@ -217,22 +217,22 @@ void RoleFiller::considerReplacementWith( RoleFiller* replacement )
double RoleFiller::penalty( Query* query,sal_Int32 nColumns )
{
sal_Int32 length = end_ - begin_ + 1;
- double penalty = query->lookupPenalty( filled_ );
+ double penalty_ = query->lookupPenalty( filled_ );
// !!! here is a chance to check against query
// if hit worth scoring further
// might not be if query already has lots of good hits
for( sal_Int32 i = 0; i < nColumns; ++i )
if( filled_ & ( 1 << i ) )
{
- penalty += fillers_[i]->conceptData_->getPenalty();
+ penalty_ += fillers_[i]->conceptData_->getPenalty();
//length -= _fillers[i]._conceptData.getConceptLength() + 1;
length -= 2; // !!! ??? c.length is not used ?
if( filled_ >> (i + 1) )
for( sal_Int32 j = i + 1; j < nColumns; ++j )
if( ( filled_ & 1 << j ) && fillers_[j]->begin_ < begin_ )
- penalty += query->getOutOufOrderPenalty();
+ penalty_ += query->getOutOufOrderPenalty();
}
- double result = penalty + length * query->getGapPenalty();
+ double result = penalty_ + length * query->getGapPenalty();
return result < 0.0 ? 0.0 : result; // !!! quick fix
}
@@ -337,8 +337,8 @@ ConceptGroupGenerator::ConceptGroupGenerator( sal_Int32 dataL,sal_Int8* data,sal
: last_( 0 ),
k1_( k ),
k2_( BitsInLabel ),
- bits_( new util::ByteArrayDecompressor( dataL,data,index ) ),
- table_( NConceptsInGroup )
+ table_( NConceptsInGroup ),
+ bits_( new util::ByteArrayDecompressor( dataL,data,index ) )
{
}
@@ -348,8 +348,8 @@ ConceptGroupGenerator::ConceptGroupGenerator()
: last_( 0 ),
k1_( 0 ),
k2_( BitsInLabel ),
- bits_( 0 ),
- table_( NConceptsInGroup )
+ table_( NConceptsInGroup ),
+ bits_( 0 )
{
}