diff options
author | Noel Grandin <noel@peralex.com> | 2015-07-06 10:36:14 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2015-07-07 06:52:29 +0000 |
commit | fc0079ee90ab466ca5391292ed1be9e937ef6f2a (patch) | |
tree | 81b25d9d6b107525a8d8b179a32619a569fe4c45 /xmlhelp | |
parent | c4e74d50901eeaf979be4707815c1d3490b543ea (diff) |
loplugin:unusedmethods xmlhelp
Change-Id: Iaaeb6e6f928c6e40112b6c852a6868e1f4abdc47
Reviewed-on: https://gerrit.libreoffice.org/16793
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'xmlhelp')
-rw-r--r-- | xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx | 9 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx | 8 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/inc/qe/Query.hxx | 89 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/content.hxx | 4 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/databases.hxx | 2 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/provider/urlparameter.hxx | 5 | ||||
-rw-r--r-- | xmlhelp/source/cxxhelp/qe/DocGenerator.cxx | 3 |
7 files changed, 6 insertions, 114 deletions
diff --git a/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx b/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx index bddb024d4d4f..fedfae39fffd 100644 --- a/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx +++ b/xmlhelp/source/cxxhelp/inc/excep/XmlSearchExceptions.hxx @@ -30,20 +30,12 @@ namespace xmlsearch { class XmlSearchException { public: - XmlSearchException( const OUString& message ) : _message( message ) { } - OUString getMessage() const - { - return _message; - } - - private: - OUString _message; }; @@ -52,7 +44,6 @@ namespace xmlsearch { : public virtual XmlSearchException { public: - IOException( const OUString& message ) : XmlSearchException( message ) { diff --git a/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx b/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx index a1a6d065eacd..a3ad76024576 100644 --- a/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx +++ b/xmlhelp/source/cxxhelp/inc/qe/DocGenerator.hxx @@ -28,26 +28,18 @@ namespace xmlsearch { namespace qe { - class RoleFiller { public: - static RoleFiller* STOP() { return &roleFiller_; } RoleFiller(); ~RoleFiller(); - void acquire() { ++m_nRefcount; } - void release() { if( ! --m_nRefcount ) delete this; } - private: - static RoleFiller roleFiller_; - sal_uInt32 m_nRefcount; - std::vector< RoleFiller* > fillers_; }; } diff --git a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx index f4de3fee3ebc..986b568a267a 100644 --- a/xmlhelp/source/cxxhelp/inc/qe/Query.hxx +++ b/xmlhelp/source/cxxhelp/inc/qe/Query.hxx @@ -32,87 +32,19 @@ namespace xmlsearch { { public: - QueryHit( sal_Int32 nColumns,double penalty,sal_Int32 doc,sal_Int32 begin,sal_Int32 end ) - : doc_( doc ), - begin_( begin ), - end_( end ), - matchesL_( 2*nColumns ), - matches_( new sal_Int32[ 2*nColumns ] ), - penalty_( penalty ) + QueryHit( sal_Int32 nColumns ) + : matchesL_( 2*nColumns ), + matches_( new sal_Int32[ 2*nColumns ] ) { memset( matches_, 0, sizeof( sal_Int32 ) * matchesL_ ); } ~QueryHit() { delete[] matches_; } - sal_Int32 getDocument() const { return doc_; } - - sal_Int32 countOfMatches() const { return matchesL_; } - - sal_Int32 getBegin() const { return begin_; } - - sal_Int32 getEnd() const { return end_; } - - double getPenalty() const { return penalty_; } - - bool betterThan( const QueryHit* o ) - { - if( penalty_ != o->penalty_ ) - return penalty_ < o->penalty_; - else if( begin_ != o->begin_ ) - return begin_ < o->begin_; - else if( end_ != o->end_ ) - return end_ < o->end_; - else - return false; - } - - bool worseThan( const QueryHit* o ) - { - if( penalty_ != o->penalty_ ) - return penalty_ > o->penalty_; - else if( begin_ != o->begin_ ) - return begin_ > o->begin_; - else if( end_ != o->end_ ) - return end_ > o->end_; - else - return false; - } - - bool worseThan( double penalty,sal_Int32 begin,sal_Int32 end ) - { - if( penalty_ != penalty ) - return penalty_ > penalty; - else if( begin_ != begin ) - return begin_ > begin; - else if( end_ != end ) - return end_ > end; - else - return false; - } - - bool compareTo( const QueryHit* o ) const - { - if( penalty_ != o->penalty_ ) - return penalty_ < o->penalty_; - else if( begin_ != o->begin_ ) - return begin_ < o->begin_; - else if( end_ != o->end_ ) - return end_ < o->end_; - else - return false; - } - - private: - - sal_Int32 doc_,begin_,end_; - sal_Int32 matchesL_; sal_Int32 *matches_; // ...concept, word number, ... - double penalty_; - }; // end class QueryHit @@ -120,23 +52,13 @@ namespace xmlsearch { class QueryHitData { public: - - QueryHitData( double penalty,const OUString& document, OUString* terms ) - : penalty_( penalty ), - document_( document ), + QueryHitData( const OUString& document, OUString* terms ) + : document_( document ), terms_( terms ) { } ~QueryHitData() { delete[] terms_; } - OUString getDocument() const { return document_; } - - double getPenalty() const { return penalty_; } - - private: - - double penalty_; - const OUString document_; OUString* terms_; @@ -147,7 +69,6 @@ namespace xmlsearch { class PrefixTranslator { public: - static PrefixTranslator* makePrefixTranslator( const OUString*,sal_Int32 ) { return 0; diff --git a/xmlhelp/source/cxxhelp/provider/content.hxx b/xmlhelp/source/cxxhelp/provider/content.hxx index 542b69ba29c0..a385e49e6f8d 100644 --- a/xmlhelp/source/cxxhelp/provider/content.hxx +++ b/xmlhelp/source/cxxhelp/provider/content.hxx @@ -128,10 +128,6 @@ namespace chelp ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow > getPropertyValues( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& rProperties ); - void setPropertyValues( - const ::com::sun::star::uno::Sequence< - ::com::sun::star::beans::PropertyValue >& rValues ); - }; } diff --git a/xmlhelp/source/cxxhelp/provider/databases.hxx b/xmlhelp/source/cxxhelp/provider/databases.hxx index 38660c9efd74..b5ff8f29f90a 100644 --- a/xmlhelp/source/cxxhelp/provider/databases.hxx +++ b/xmlhelp/source/cxxhelp/provider/databases.hxx @@ -85,8 +85,6 @@ namespace chelp { OUString get_title() const { return m_aTitle; } OUString get_id() const { return m_aStartId; } OUString get_program() const { return m_aProgramSwitch; } - OUString get_heading() const { return m_aHeading; } - OUString get_fulltext() const { return m_aFulltext; } int get_order() const { return m_nOrder; } }; // end class StaticModuleInformation diff --git a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx index a6fb981e0977..a35e9410de44 100644 --- a/xmlhelp/source/cxxhelp/provider/urlparameter.hxx +++ b/xmlhelp/source/cxxhelp/provider/urlparameter.hxx @@ -119,14 +119,11 @@ namespace chelp { bool isPicture() const { return m_aModule == "picture"; } bool isActive() const { return !m_aActive.isEmpty() && m_aActive == "true"; } bool isQuery() const { return m_aId.isEmpty() && !m_aQuery.isEmpty(); } - bool isEntryForModule() const { return m_aId == "start" || m_bStart; } bool isFile() const { return !m_aId.isEmpty(); } bool isModule() const { return m_aId.isEmpty() && !m_aModule.isEmpty(); } bool isRoot() const { return m_aModule.isEmpty(); } bool isErrorDocument(); - OUString get_url() const { return m_aURL; } - OUString get_id(); OUString get_tag(); @@ -157,8 +154,6 @@ namespace chelp { OUString get_language(); - OUString get_device() const { return m_aDevice; } - OUString get_program(); OUString get_query() const { return m_aQuery; } diff --git a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx index 874a67e2ebb1..c82ac7158555 100644 --- a/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx +++ b/xmlhelp/source/cxxhelp/qe/DocGenerator.cxx @@ -29,8 +29,7 @@ RoleFiller RoleFiller::roleFiller_; RoleFiller::RoleFiller() - : m_nRefcount( 0 ), - fillers_( 0 ) + : fillers_( 0 ) { } |