Remove visual noise from lingucomponent

Change-Id: I6021eabab1474c99868f38ecd0d466eb0d97054e
Reviewed-on: https://gerrit.libreoffice.org/8279
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Alexander Wilms
2014-02-26 16:06:37 +01:00
committed by Caolán McNamara
parent 99e3bd454b
commit 412c47ded6
19 changed files with 29 additions and 222 deletions

View File

@@ -25,19 +25,13 @@
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::registry; using namespace com::sun::star::registry;
////////////////////////////////////////
// declaration of external RegEntry-functions defined by the service objects // declaration of external RegEntry-functions defined by the service objects
//
extern void * SAL_CALL Hyphenator_getFactory( extern void * SAL_CALL Hyphenator_getFactory(
const sal_Char * pImplName, const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, XMultiServiceFactory * pServiceManager,
void * /*pRegistryKey*/ ); void * /*pRegistryKey*/ );
////////////////////////////////////////
// definition of the two functions that are used to provide the services // definition of the two functions that are used to provide the services
//
extern "C" extern "C"
{ {
@@ -54,6 +48,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL hyphen_component_getFactory(
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -57,13 +57,9 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::linguistic2; using namespace com::sun::star::linguistic2;
using namespace linguistic; using namespace linguistic;
// min, max // min, max
#define Max(a,b) (a > b ? a : b) #define Max(a,b) (a > b ? a : b)
///////////////////////////////////////////////////////////////////////////
Hyphenator::Hyphenator() : Hyphenator::Hyphenator() :
aEvtListeners ( GetLinguMutex() ) aEvtListeners ( GetLinguMutex() )
{ {
@@ -105,7 +101,6 @@ PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl()
return *pPropHelper; return *pPropHelper;
} }
Sequence< Locale > SAL_CALL Hyphenator::getLocales() Sequence< Locale > SAL_CALL Hyphenator::getLocales()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -113,7 +108,6 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
// this routine should return the locales supported by the installed // this routine should return the locales supported by the installed
// dictionaries. // dictionaries.
if (!numdict) if (!numdict)
{ {
SvtLinguConfig aLinguCfg; SvtLinguConfig aLinguCfg;
@@ -217,7 +211,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
} }
else else
{ {
/* no dictionary found so register no dictionaries */ // no dictionary found so register no dictionaries
numdict = 0; numdict = 0;
aDicts = NULL; aDicts = NULL;
aSuppLocales.realloc(0); aSuppLocales.realloc(0);
@@ -227,8 +221,6 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
return aSuppLocales; return aSuppLocales;
} }
sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale) sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -251,7 +243,6 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
return bRes; return bRes;
} }
Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWord, Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWord,
const ::com::sun::star::lang::Locale& aLocale, const ::com::sun::star::lang::Locale& aLocale,
sal_Int16 nMaxLeading, sal_Int16 nMaxLeading,
@@ -373,7 +364,7 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) ); Max(dict->crhmin, Max(dict->crhmin, 2) + Max(0, minTrail - Max(dict->rhmin, 2))) );
if (bFailed) if (bFailed)
{ {
//whoops something did not work // whoops something did not work
delete[] hyphens; delete[] hyphens;
delete[] lcword; delete[] lcword;
if (rep) if (rep)
@@ -506,7 +497,6 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
return NULL; return NULL;
} }
Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling( Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling(
const OUString& aWord, const OUString& aWord,
const ::com::sun::star::lang::Locale& aLocale, const ::com::sun::star::lang::Locale& aLocale,
@@ -535,8 +525,8 @@ Reference< XPossibleHyphens > SAL_CALL Hyphenator::createPossibleHyphens( const
sal_Int16 minLead = rHelper.GetMinLeading(); sal_Int16 minLead = rHelper.GetMinLeading();
sal_Int16 minLen = rHelper.GetMinWordLength(); sal_Int16 minLen = rHelper.GetMinWordLength();
//Resolves: fdo#41083 honour MinWordLength in "createPossibleHyphens" as // Resolves: fdo#41083 honour MinWordLength in "createPossibleHyphens" as
//well as "hyphenate" // well as "hyphenate"
if (aWord.getLength() < minLen) if (aWord.getLength() < minLen)
{ {
return PossibleHyphens::CreatePossibleHyphens( aWord, LinguLocaleToLanguage( aLocale ), return PossibleHyphens::CreatePossibleHyphens( aWord, LinguLocaleToLanguage( aLocale ),
@@ -722,7 +712,6 @@ OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * p
return aTerm; return aTerm;
} }
OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC) OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
{ {
sal_Int32 tlen = aTerm.getLength(); sal_Int32 tlen = aTerm.getLength();
@@ -737,7 +726,6 @@ OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC
return aTerm; return aTerm;
} }
Reference< XInterface > SAL_CALL Hyphenator_CreateInstance( Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/ ) const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception) throw(Exception)
@@ -746,7 +734,6 @@ Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
return xService; return xService;
} }
sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener( sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
const Reference< XLinguServiceEventListener >& rxLstnr ) const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException) throw(RuntimeException)
@@ -761,7 +748,6 @@ sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
return bRes; return bRes;
} }
sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener( sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
const Reference< XLinguServiceEventListener >& rxLstnr ) const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException) throw(RuntimeException)
@@ -776,7 +762,6 @@ sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
return bRes; return bRes;
} }
OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ ) OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -784,7 +769,6 @@ OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
return OUString( "Libhyphen Hyphenator" ); return OUString( "Libhyphen Hyphenator" );
} }
void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments ) void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
throw(Exception, RuntimeException) throw(Exception, RuntimeException)
{ {
@@ -797,7 +781,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
{ {
Reference< XLinguProperties > xPropSet; Reference< XLinguProperties > xPropSet;
rArguments.getConstArray()[0] >>= xPropSet; rArguments.getConstArray()[0] >>= xPropSet;
//rArguments.getConstArray()[1] >>= xDicList; // rArguments.getConstArray()[1] >>= xDicList;
//! Pointer allows for access of the non-UNO functions. //! Pointer allows for access of the non-UNO functions.
//! And the reference to the UNO-functions while increasing //! And the reference to the UNO-functions while increasing
@@ -812,7 +796,6 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
} }
} }
void SAL_CALL Hyphenator::dispose() void SAL_CALL Hyphenator::dispose()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -832,7 +815,6 @@ void SAL_CALL Hyphenator::dispose()
} }
} }
void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& rxListener ) void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -842,7 +824,6 @@ void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& r
aEvtListeners.addInterface( rxListener ); aEvtListeners.addInterface( rxListener );
} }
void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener ) void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -880,7 +861,7 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
Sequence< OUString > aSNS( 1 ); // auch mehr als 1 Service moeglich Sequence< OUString > aSNS( 1 ); // more than 1 service is possible, too
aSNS.getArray()[0] = SN_HYPHENATOR; aSNS.getArray()[0] = SN_HYPHENATOR;
return aSNS; return aSNS;
} }
@@ -904,7 +885,4 @@ void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
return pRet; return pRet;
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#ifndef _LINGU2_HYPHENIMP_HXX_ #ifndef _LINGU2_HYPHENIMP_HXX_
#define _LINGU2_HYPHENIMP_HXX_ #define _LINGU2_HYPHENIMP_HXX_
@@ -47,10 +46,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star::linguistic2;
///////////////////////////////////////////////////////////////////////////
struct HDInfo { struct HDInfo {
HyphenDict * aPtr; HyphenDict * aPtr;
OUString aName; OUString aName;
@@ -59,8 +54,6 @@ struct HDInfo {
CharClass * apCC; CharClass * apCC;
}; };
class Hyphenator : class Hyphenator :
public cppu::WeakImplHelper6 public cppu::WeakImplHelper6
< <
@@ -125,11 +118,9 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException); virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
static inline OUString getImplementationName_Static() throw(); static inline OUString getImplementationName_Static() throw();
static Sequence< OUString > getSupportedServiceNames_Static() throw(); static Sequence< OUString > getSupportedServiceNames_Static() throw();
private: private:
OUString SAL_CALL makeLowerCase(const OUString&, CharClass *); OUString SAL_CALL makeLowerCase(const OUString&, CharClass *);
OUString SAL_CALL makeUpperCase(const OUString&, CharClass *); OUString SAL_CALL makeUpperCase(const OUString&, CharClass *);
@@ -141,9 +132,6 @@ inline OUString Hyphenator::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.LibHnjHyphenator" ); return OUString( "org.openoffice.lingu.LibHnjHyphenator" );
} }
///////////////////////////////////////////////////////////////////////////
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <iostream> #include <iostream>
#include <string.h> #include <string.h>
@@ -52,7 +51,6 @@ Guess::Guess()
* a string like those is made as : [language-country-encoding]... * a string like those is made as : [language-country-encoding]...
* *
*/ */
Guess::Guess(const char * guess_str) Guess::Guess(const char * guess_str)
{ {
Guess(); Guess();
@@ -62,10 +60,10 @@ Guess::Guess(const char * guess_str)
string enc; string enc;
//if the guess is not like "UNKNOWN" or "SHORT", go into the brackets //if the guess is not like "UNKNOWN" or "SHORT", go into the brackets
if(strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_UNKNOWN_STR) != 0 if(strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_UNKNOWN_STR) != 0
&& &&
strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_SHORT_STR) != 0) strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_SHORT_STR) != 0)
{ {
int current_pointer = 0; int current_pointer = 0;

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <iostream> #include <iostream>
#include <tools/debug.hxx> #include <tools/debug.hxx>
@@ -54,8 +53,6 @@ using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star::linguistic2;
//==================================================================================================
#define SERVICENAME "com.sun.star.linguistic2.LanguageGuessing" #define SERVICENAME "com.sun.star.linguistic2.LanguageGuessing"
#define IMPLNAME "com.sun.star.lingu2.LanguageGuessing" #define IMPLNAME "com.sun.star.lingu2.LanguageGuessing"
@@ -77,7 +74,6 @@ static osl::Mutex & GetLangGuessMutex()
return aMutex; return aMutex;
} }
class LangGuess_Impl : class LangGuess_Impl :
public ::cppu::WeakImplHelper2< public ::cppu::WeakImplHelper2<
XLanguageGuessing, XLanguageGuessing,
@@ -117,16 +113,12 @@ public:
}; };
//*************************************************************************
LangGuess_Impl::LangGuess_Impl(css::uno::Reference< css::uno::XComponentContext > const & rxContext) : LangGuess_Impl::LangGuess_Impl(css::uno::Reference< css::uno::XComponentContext > const & rxContext) :
m_bInitialized( false ), m_bInitialized( false ),
m_xContext( rxContext ) m_xContext( rxContext )
{ {
} }
//*************************************************************************
void LangGuess_Impl::EnsureInitialized() void LangGuess_Impl::EnsureInitialized()
{ {
if (!m_bInitialized) if (!m_bInitialized)
@@ -148,9 +140,8 @@ void LangGuess_Impl::EnsureInitialized()
SetFingerPrintsDB( aPhysPath ); SetFingerPrintsDB( aPhysPath );
#if !defined(EXTTEXTCAT_VERSION_MAJOR) #if !defined(EXTTEXTCAT_VERSION_MAJOR)
//
// disable currently not functional languages... // disable currently not functional languages...
//
struct LangCountry struct LangCountry
{ {
const char *pLang; const char *pLang;
@@ -160,7 +151,6 @@ void LangGuess_Impl::EnsureInitialized()
{ {
// not functional in modified libtextcat, but fixed in >= libexttextcat 3.1.0 // not functional in modified libtextcat, but fixed in >= libexttextcat 3.1.0
// which is the first with EXTTEXTCAT_VERSION_MAJOR defined // which is the first with EXTTEXTCAT_VERSION_MAJOR defined
{"sco", ""}, {"zh", "CN"}, {"zh", "TW"}, {"ja", ""}, {"ko", ""}, {"sco", ""}, {"zh", "CN"}, {"zh", "TW"}, {"ja", ""}, {"ko", ""},
{"ka", ""}, {"hi", ""}, {"mr", ""}, {"ne", ""}, {"sa", ""}, {"ka", ""}, {"hi", ""}, {"mr", ""}, {"ne", ""}, {"sa", ""},
{"ta", ""}, {"th", ""}, {"qu", ""}, {"yi", ""} {"ta", ""}, {"th", ""}, {"qu", ""}, {"yi", ""}
@@ -181,8 +171,6 @@ void LangGuess_Impl::EnsureInitialized()
} }
} }
//*************************************************************************
Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage( Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
const OUString& rText, const OUString& rText,
::sal_Int32 nStartPos, ::sal_Int32 nStartPos,
@@ -207,7 +195,6 @@ Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
return aRes; return aRes;
} }
//*************************************************************************
#define DEFAULT_CONF_FILE_NAME "fpdb.conf" #define DEFAULT_CONF_FILE_NAME "fpdb.conf"
void LangGuess_Impl::SetFingerPrintsDB( void LangGuess_Impl::SetFingerPrintsDB(
@@ -223,7 +210,6 @@ void LangGuess_Impl::SetFingerPrintsDB(
m_aGuesser.SetDBPath((const char*)conf_file_path.getStr(), (const char*)path.getStr()); m_aGuesser.SetDBPath((const char*)conf_file_path.getStr(), (const char*)path.getStr());
} }
//*************************************************************************
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( ) uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@@ -247,7 +233,6 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
return aRes; return aRes;
} }
//*************************************************************************
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( ) uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@@ -271,7 +256,6 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
return aRes; return aRes;
} }
//*************************************************************************
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( ) uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
throw (uno::RuntimeException) throw (uno::RuntimeException)
{ {
@@ -295,7 +279,6 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
return aRes; return aRes;
} }
//*************************************************************************
void SAL_CALL LangGuess_Impl::disableLanguages( void SAL_CALL LangGuess_Impl::disableLanguages(
const uno::Sequence< Locale >& rLanguages ) const uno::Sequence< Locale >& rLanguages )
throw (lang::IllegalArgumentException, uno::RuntimeException) throw (lang::IllegalArgumentException, uno::RuntimeException)
@@ -321,7 +304,6 @@ void SAL_CALL LangGuess_Impl::disableLanguages(
} }
} }
//*************************************************************************
void SAL_CALL LangGuess_Impl::enableLanguages( void SAL_CALL LangGuess_Impl::enableLanguages(
const uno::Sequence< Locale >& rLanguages ) const uno::Sequence< Locale >& rLanguages )
throw (lang::IllegalArgumentException, uno::RuntimeException) throw (lang::IllegalArgumentException, uno::RuntimeException)
@@ -384,10 +366,7 @@ Reference< XInterface > SAL_CALL LangGuess_Impl_create(
return static_cast< ::cppu::OWeakObject * >( new LangGuess_Impl(xContext) ); return static_cast< ::cppu::OWeakObject * >( new LangGuess_Impl(xContext) );
} }
//##################################################################################################
//#### EXPORTED ### functions to allow for registration and creation of the UNO component //#### EXPORTED ### functions to allow for registration and creation of the UNO component
//##################################################################################################
static const struct ::cppu::ImplementationEntry s_component_entries [] = static const struct ::cppu::ImplementationEntry s_component_entries [] =
{ {
{ {

View File

@@ -27,7 +27,6 @@
* - Not init h when implicit constructor is launched * - Not init h when implicit constructor is launched
*/ */
#include <string.h> #include <string.h>
#include <sstream> #include <sstream>
#include <iostream> #include <iostream>
@@ -53,11 +52,9 @@
using namespace std; using namespace std;
/** /**
* This 3 following structures are from fingerprint.c and textcat.c * This 3 following structures are from fingerprint.c and textcat.c
*/ */
typedef struct ngram_t { typedef struct ngram_t {
sint2 rank; sint2 rank;
@@ -83,7 +80,7 @@ typedef struct textcat_t{
char output[MAXOUTPUTSIZE]; char output[MAXOUTPUTSIZE];
} textcat_t; } textcat_t;
/** end of the 3 structs */ // end of the 3 structs
SimpleGuesser::SimpleGuesser() SimpleGuesser::SimpleGuesser()
{ {
@@ -93,7 +90,7 @@ SimpleGuesser::SimpleGuesser()
SimpleGuesser& SimpleGuesser::operator=(const SimpleGuesser& sg){ SimpleGuesser& SimpleGuesser::operator=(const SimpleGuesser& sg){
// Check for self-assignment! // Check for self-assignment!
if (this == &sg) // Same object? if (this == &sg) // Same object?
return *this; // Yes, so skip assignment, and just return *this. return *this; // Yes, so skip assignment, and just return *this.
if(h){textcat_Done(h);} if(h){textcat_Done(h);}
h = sg.h; h = sg.h;
@@ -105,7 +102,6 @@ SimpleGuesser::~SimpleGuesser()
if(h){textcat_Done(h);} if(h){textcat_Done(h);}
} }
/*! /*!
\fn SimpleGuesser::GuessLanguage(char* text) \fn SimpleGuesser::GuessLanguage(char* text)
*/ */
@@ -221,9 +217,6 @@ void SimpleGuesser::DisableLanguage(string lang)
XableLanguage(lang, sal::static_int_cast< char >( 0x0F )); XableLanguage(lang, sal::static_int_cast< char >( 0x0F ));
} }
/**
*
*/
void SimpleGuesser::SetDBPath(const char* path, const char* prefix) void SimpleGuesser::SetDBPath(const char* path, const char* prefix)
{ {
if (h) if (h)

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#if defined(WNT) #if defined(WNT)
#include <windows.h> #include <windows.h>
#endif #endif
@@ -43,7 +42,6 @@
#include <sal/macros.h> #include <sal/macros.h>
using ::com::sun::star::lang::Locale; using ::com::sun::star::lang::Locale;
using namespace ::com::sun::star; using namespace ::com::sun::star;
@@ -70,8 +68,6 @@ OString Win_GetShortPathName( const OUString &rLongPathName )
} }
#endif //defined(WNT) #endif //defined(WNT)
//////////////////////////////////////////////////////////////////////
// build list of old style diuctionaries (not as extensions) to use. // build list of old style diuctionaries (not as extensions) to use.
// User installed dictionaries (the ones residing in the user paths) // User installed dictionaries (the ones residing in the user paths)
// will get precedence over system installed ones for the same language. // will get precedence over system installed ones for the same language.
@@ -119,7 +115,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
#endif #endif
} }
if (aFormatName.isEmpty() || aDicExtension.isEmpty()) if (aFormatName.isEmpty() || aDicExtension.isEmpty())
return aRes; return aRes;
@@ -195,7 +190,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
return aRes; return aRes;
} }
void MergeNewStyleDicsAndOldStyleDics( void MergeNewStyleDicsAndOldStyleDics(
std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics, std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics,
const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics ) const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics )
@@ -241,7 +235,6 @@ void MergeNewStyleDicsAndOldStyleDics(
} }
} }
rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset) rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset)
{ {
// default result: used to indicate that we failed to get the proper encoding // default result: used to indicate that we failed to get the proper encoding
@@ -261,6 +254,4 @@ rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset)
return eRet; return eRet;
} }
//////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -20,7 +20,6 @@
#ifndef _LINGUTIL_HXX_ #ifndef _LINGUTIL_HXX_
#define _LINGUTIL_HXX_ #define _LINGUTIL_HXX_
#include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/lang/Locale.hpp>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
@@ -28,16 +27,12 @@
#include <vector> #include <vector>
#include <list> #include <list>
#define OU2ENC(rtlOUString, rtlEncoding) \ #define OU2ENC(rtlOUString, rtlEncoding) \
OString((rtlOUString).getStr(), (rtlOUString).getLength(), \ OString((rtlOUString).getStr(), (rtlOUString).getLength(), \
rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr() rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr()
struct SvtLinguConfigDictionaryEntry; struct SvtLinguConfigDictionaryEntry;
///////////////////////////////////////////////////////////////////////////
struct lt_rtl_OUString struct lt_rtl_OUString
{ {
bool operator() (const OUString &r1, const OUString &r2) const bool operator() (const OUString &r1, const OUString &r2) const
@@ -54,7 +49,7 @@ inline sal_Bool operator == ( const ::com::sun::star::lang::Locale &rL1, const :
} }
#if defined(WNT) #if defined(WNT)
///////////////////////////////////////////////////////////////////////////
// to be use to get a short path name under Windows that still can be used with // to be use to get a short path name under Windows that still can be used with
// the 'fopen' call. This is necessary since under Windows there seems to be // the 'fopen' call. This is necessary since under Windows there seems to be
// a restriction of only about 110-130 characters length to a path name in order // a restriction of only about 110-130 characters length to a path name in order
@@ -63,16 +58,11 @@ inline sal_Bool operator == ( const ::com::sun::star::lang::Locale &rL1, const :
OString Win_GetShortPathName( const OUString &rLongPathName ); OString Win_GetShortPathName( const OUString &rLongPathName );
#endif #endif
///////////////////////////////////////////////////////////////////////////
// temporary function, to be removed when new style dictionaries // temporary function, to be removed when new style dictionaries
// using configuration entries are fully implemented and provided // using configuration entries are fully implemented and provided
std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char * pDicType ); std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char * pDicType );
void MergeNewStyleDicsAndOldStyleDics( std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics, const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics ); void MergeNewStyleDicsAndOldStyleDics( std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics, const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics );
///////////////////////////////////////////////////////////////////////////
//Find an encoding from a charset string, using //Find an encoding from a charset string, using
//rtl_getTextEncodingFromMimeCharset and falling back to //rtl_getTextEncodingFromMimeCharset and falling back to
//rtl_getTextEncodingFromUnixCharset with the addition of //rtl_getTextEncodingFromUnixCharset with the addition of

View File

@@ -27,18 +27,18 @@
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::registry; using namespace com::sun::star::registry;
////////////////////////////////////////
// declaration of external RegEntry-functions defined by the service objects // declaration of external RegEntry-functions defined by the service objects
//
extern void * SAL_CALL MacSpellChecker_getFactory( extern void * SAL_CALL MacSpellChecker_getFactory(
const sal_Char * pImplName, const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, XMultiServiceFactory * pServiceManager,
void * /*pRegistryKey*/ ); void * /*pRegistryKey*/ );
////////////////////////////////////////
// definition of the two functions that are used to provide the services // definition of the two functions that are used to provide the services
//
extern "C" extern "C"
{ {
@@ -57,6 +57,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL MacOSXSpell_component_getFactory(
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -49,9 +49,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star::linguistic2;
///////////////////////////////////////////////////////////////////////////
class MacSpellChecker : class MacSpellChecker :
public cppu::WeakImplHelper6 public cppu::WeakImplHelper6
< <
@@ -69,7 +66,7 @@ class MacSpellChecker :
OUString * aDNames; OUString * aDNames;
sal_Int32 numdict; sal_Int32 numdict;
NSSpellChecker * macSpell; NSSpellChecker * macSpell;
int macTag; //unique tag for this doc int macTag; // unique tag for this doc
::cppu::OInterfaceContainerHelper aEvtListeners; ::cppu::OInterfaceContainerHelper aEvtListeners;
Reference< XPropertyChangeListener > xPropHelper; Reference< XPropertyChangeListener > xPropHelper;
@@ -121,7 +118,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException); virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
static inline OUString getImplementationName_Static() throw(); static inline OUString getImplementationName_Static() throw();
static Sequence< OUString > getSupportedServiceNames_Static() throw(); static Sequence< OUString > getSupportedServiceNames_Static() throw();
}; };
@@ -131,10 +127,6 @@ inline OUString MacSpellChecker::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.MacOSXSpellChecker" ); return OUString( "org.openoffice.lingu.MacOSXSpellChecker" );
} }
///////////////////////////////////////////////////////////////////////////
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -573,6 +573,6 @@ void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -25,17 +25,13 @@
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::registry; using namespace com::sun::star::registry;
////////////////////////////////////////
// declaration of external RegEntry-functions defined by the service objects // declaration of external RegEntry-functions defined by the service objects
//
extern void * SAL_CALL SpellChecker_getFactory( extern void * SAL_CALL SpellChecker_getFactory(
const sal_Char * pImplName, const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, XMultiServiceFactory * pServiceManager,
void * /*pRegistryKey*/ ); void * /*pRegistryKey*/ );
////////////////////////////////////////
// definition of the two functions that are used to provide the services
//
// definition of the two functions that are used to provide the services
extern "C" extern "C"
{ {
@@ -53,6 +49,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL spell_component_getFactory(
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp> #include <com/sun/star/linguistic2/XSearchableDictionaryList.hpp>
@@ -56,12 +55,9 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::linguistic2; using namespace com::sun::star::linguistic2;
using namespace linguistic; using namespace linguistic;
// XML-header of SPELLML queries // XML-header of SPELLML queries
#define SPELLML_HEADER "<?xml?>" #define SPELLML_HEADER "<?xml?>"
///////////////////////////////////////////////////////////////////////////
SpellChecker::SpellChecker() : SpellChecker::SpellChecker() :
aDicts(NULL), aDicts(NULL),
aDEncs(NULL), aDEncs(NULL),
@@ -106,7 +102,6 @@ PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl()
return *pPropHelper; return *pPropHelper;
} }
Sequence< Locale > SAL_CALL SpellChecker::getLocales() Sequence< Locale > SAL_CALL SpellChecker::getLocales()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -114,7 +109,6 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
// this routine should return the locales supported by the installed // this routine should return the locales supported by the installed
// dictionaries. // dictionaries.
if (!numdict) if (!numdict)
{ {
SvtLinguConfig aLinguCfg; SvtLinguConfig aLinguCfg;
@@ -217,7 +211,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
} }
else else
{ {
/* no dictionary found so register no dictionaries */ // no dictionary found so register no dictionaries
numdict = 0; numdict = 0;
delete[] aDicts; delete[] aDicts;
aDicts = NULL; aDicts = NULL;
@@ -234,7 +228,6 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
return aSuppLocales; return aSuppLocales;
} }
sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale) sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -257,7 +250,6 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
return bRes; return bRes;
} }
sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale ) sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
{ {
Hunspell * pMS = NULL; Hunspell * pMS = NULL;
@@ -282,10 +274,9 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
else if ((c == 0x2018) || (c == 0x2019)) else if ((c == 0x2018) || (c == 0x2019))
rBuf[ix] = (sal_Unicode)0x0027; rBuf[ix] = (sal_Unicode)0x0027;
// recognize words with Unicode ligatures and ZWNJ/ZWJ characters (only // recognize words with Unicode ligatures and ZWNJ/ZWJ characters (only
// with 8-bit encoded dictionaries. For UTF-8 encoded dictionaries // with 8-bit encoded dictionaries. For UTF-8 encoded dictionaries
// set ICONV and IGNORE aff file options, if needed.) // set ICONV and IGNORE aff file options, if needed.)
else if ((c == 0x200C) || (c == 0x200D) || else if ((c == 0x200C) || (c == 0x200D) ||
((c >= 0xFB00) && (c <= 0xFB04))) ((c >= 0xFB00) && (c <= 0xFB04)))
extrachar = 1; extrachar = 1;
@@ -375,7 +366,6 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
return nRes; return nRes;
} }
sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rLocale, sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rLocale,
const PropertyValues& rProperties ) const PropertyValues& rProperties )
throw(IllegalArgumentException, RuntimeException) throw(IllegalArgumentException, RuntimeException)
@@ -397,7 +387,6 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
// last argument. // last argument.
// You'll probably like to use a simplier solution than the provided // You'll probably like to use a simplier solution than the provided
// one using the PropertyHelper_Spell. // one using the PropertyHelper_Spell.
PropertyHelper_Spelling& rHelper = GetPropHelper(); PropertyHelper_Spelling& rHelper = GetPropHelper();
rHelper.SetTmpPropVals( rProperties ); rHelper.SetTmpPropVals( rProperties );
@@ -417,14 +406,12 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
return (nFailure == -1); return (nFailure == -1);
} }
Reference< XSpellAlternatives > Reference< XSpellAlternatives >
SpellChecker::GetProposals( const OUString &rWord, const Locale &rLocale ) SpellChecker::GetProposals( const OUString &rWord, const Locale &rLocale )
{ {
// Retrieves the return values for the 'spell' function call in case // Retrieves the return values for the 'spell' function call in case
// of a misspelled word. // of a misspelled word.
// Especially it may give a list of suggested (correct) words: // Especially it may give a list of suggested (correct) words:
Reference< XSpellAlternatives > xRes; Reference< XSpellAlternatives > xRes;
// note: mutex is held by higher up by spell which covers both // note: mutex is held by higher up by spell which covers both
@@ -492,7 +479,6 @@ Reference< XSpellAlternatives >
return xRes; return xRes;
} }
Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell( Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
const OUString& rWord, const Locale& rLocale, const OUString& rWord, const Locale& rLocale,
const PropertyValues& rProperties ) const PropertyValues& rProperties )
@@ -514,7 +500,6 @@ Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
return xAlt; return xAlt;
} }
Reference< XInterface > SAL_CALL SpellChecker_CreateInstance( Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/ ) const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception) throw(Exception)
@@ -524,7 +509,6 @@ Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
return xService; return xService;
} }
sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener( sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
const Reference< XLinguServiceEventListener >& rxLstnr ) const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException) throw(RuntimeException)
@@ -539,7 +523,6 @@ sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
return bRes; return bRes;
} }
sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener( sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
const Reference< XLinguServiceEventListener >& rxLstnr ) const Reference< XLinguServiceEventListener >& rxLstnr )
throw(RuntimeException) throw(RuntimeException)
@@ -554,7 +537,6 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
return bRes; return bRes;
} }
OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ ) OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -562,7 +544,6 @@ OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/
return OUString( "Hunspell SpellChecker" ); return OUString( "Hunspell SpellChecker" );
} }
void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments ) void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
throw(Exception, RuntimeException) throw(Exception, RuntimeException)
{ {
@@ -575,7 +556,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
{ {
Reference< XLinguProperties > xPropSet; Reference< XLinguProperties > xPropSet;
rArguments.getConstArray()[0] >>= xPropSet; rArguments.getConstArray()[0] >>= xPropSet;
//rArguments.getConstArray()[1] >>= xDicList; // rArguments.getConstArray()[1] >>= xDicList;
//! Pointer allows for access of the non-UNO functions. //! Pointer allows for access of the non-UNO functions.
//! And the reference to the UNO-functions while increasing //! And the reference to the UNO-functions while increasing
@@ -590,7 +571,6 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
} }
} }
void SAL_CALL SpellChecker::dispose() void SAL_CALL SpellChecker::dispose()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -610,7 +590,6 @@ void SAL_CALL SpellChecker::dispose()
} }
} }
void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >& rxListener ) void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -620,7 +599,6 @@ void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >&
aEvtListeners.addInterface( rxListener ); aEvtListeners.addInterface( rxListener );
} }
void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener ) void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -630,7 +608,6 @@ void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener
aEvtListeners.removeInterface( rxListener ); aEvtListeners.removeInterface( rxListener );
} }
// Service specific part // Service specific part
OUString SAL_CALL SpellChecker::getImplementationName() OUString SAL_CALL SpellChecker::getImplementationName()
throw(RuntimeException) throw(RuntimeException)
@@ -659,7 +636,7 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
Sequence< OUString > aSNS( 1 ); // auch mehr als 1 Service moeglich Sequence< OUString > aSNS( 1 ); // more than 1 service is possible, too
aSNS.getArray()[0] = SN_SPELLCHECKER; aSNS.getArray()[0] = SN_SPELLCHECKER;
return aSNS; return aSNS;
} }
@@ -683,7 +660,4 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
return pRet; return pRet;
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -43,10 +43,6 @@ using namespace ::com::sun::star::beans;
using namespace ::com::sun::star::lang; using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star::linguistic2;
///////////////////////////////////////////////////////////////////////////
class SpellChecker : class SpellChecker :
public cppu::WeakImplHelper6 public cppu::WeakImplHelper6
< <
@@ -114,7 +110,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException); virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
static inline OUString getImplementationName_Static() throw(); static inline OUString getImplementationName_Static() throw();
static Sequence< OUString > getSupportedServiceNames_Static() throw(); static Sequence< OUString > getSupportedServiceNames_Static() throw();
}; };
@@ -124,9 +119,6 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.MySpellSpellChecker" ); return OUString( "org.openoffice.lingu.MySpellSpellChecker" );
} }
///////////////////////////////////////////////////////////////////////////
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -31,12 +31,9 @@ using namespace com::sun::star::lang;
using namespace com::sun::star::uno; using namespace com::sun::star::uno;
using namespace com::sun::star::linguistic2; using namespace com::sun::star::linguistic2;
namespace linguistic namespace linguistic
{ {
///////////////////////////////////////////////////////////////////////////
Meaning::Meaning( Meaning::Meaning(
const OUString &rTerm, sal_Int16 nLang) : const OUString &rTerm, sal_Int16 nLang) :
@@ -51,12 +48,10 @@ Meaning::Meaning(
#endif #endif
} }
Meaning::~Meaning() Meaning::~Meaning()
{ {
} }
OUString SAL_CALL Meaning::getMeaning() OUString SAL_CALL Meaning::getMeaning()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -64,7 +59,6 @@ OUString SAL_CALL Meaning::getMeaning()
return aTerm; return aTerm;
} }
Sequence< OUString > SAL_CALL Meaning::querySynonyms() Sequence< OUString > SAL_CALL Meaning::querySynonyms()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -72,7 +66,6 @@ Sequence< OUString > SAL_CALL Meaning::querySynonyms()
return aSyn; return aSyn;
} }
void Meaning::SetSynonyms( const Sequence< OUString > &rSyn ) void Meaning::SetSynonyms( const Sequence< OUString > &rSyn )
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );

View File

@@ -20,11 +20,9 @@
#ifndef _LINGUISTIC_THESDTA_HXX_ #ifndef _LINGUISTIC_THESDTA_HXX_
#define _LINGUISTIC_THESDTA_HXX_ #define _LINGUISTIC_THESDTA_HXX_
#include <com/sun/star/linguistic2/XMeaning.hpp> #include <com/sun/star/linguistic2/XMeaning.hpp>
#include <cppuhelper/implbase1.hxx> #include <cppuhelper/implbase1.hxx>
namespace linguistic namespace linguistic
{ {
@@ -64,5 +62,4 @@ public:
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <com/sun/star/uno/Reference.h> #include <com/sun/star/uno/Reference.h>
#include <cppuhelper/factory.hxx> #include <cppuhelper/factory.hxx>
#include <cppuhelper/supportsservice.hxx> #include <cppuhelper/supportsservice.hxx>
@@ -55,9 +54,6 @@ using namespace com::sun::star::uno;
using namespace com::sun::star::linguistic2; using namespace com::sun::star::linguistic2;
using namespace linguistic; using namespace linguistic;
///////////////////////////////////////////////////////////////////////////
static uno::Reference< XLinguServiceManager2 > GetLngSvcMgr_Impl() static uno::Reference< XLinguServiceManager2 > GetLngSvcMgr_Impl()
{ {
uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() ); uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
@@ -79,7 +75,6 @@ Thesaurus::Thesaurus() :
prevLocale = LANGUAGE_DONTKNOW; prevLocale = LANGUAGE_DONTKNOW;
} }
Thesaurus::~Thesaurus() Thesaurus::~Thesaurus()
{ {
if (aThes) if (aThes)
@@ -117,7 +112,6 @@ Thesaurus::~Thesaurus()
} }
} }
PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl() PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
{ {
if (!pPropHelper) if (!pPropHelper)
@@ -130,7 +124,6 @@ PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
return *pPropHelper; return *pPropHelper;
} }
Sequence< Locale > SAL_CALL Thesaurus::getLocales() Sequence< Locale > SAL_CALL Thesaurus::getLocales()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -138,7 +131,6 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
// this routine should return the locales supported by the installed // this routine should return the locales supported by the installed
// dictionaries. // dictionaries.
if (!numthes) if (!numthes)
{ {
SvtLinguConfig aLinguCfg; SvtLinguConfig aLinguCfg;
@@ -258,8 +250,6 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
return aSuppLocales; return aSuppLocales;
} }
sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale) sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -281,7 +271,6 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
return bRes; return bRes;
} }
Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings( Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings(
const OUString& qTerm, const Locale& rLocale, const OUString& qTerm, const Locale& rLocale,
const PropertyValues& rProperties) const PropertyValues& rProperties)
@@ -528,7 +517,6 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
return noMeanings; return noMeanings;
} }
Reference< XInterface > SAL_CALL Thesaurus_CreateInstance( Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
const Reference< XMultiServiceFactory > & /*rSMgr*/ ) const Reference< XMultiServiceFactory > & /*rSMgr*/ )
throw(Exception) throw(Exception)
@@ -537,7 +525,6 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
return xService; return xService;
} }
OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ ) OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -545,7 +532,6 @@ OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
return OUString( "OpenOffice.org New Thesaurus" ); return OUString( "OpenOffice.org New Thesaurus" );
} }
void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments ) void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
throw(Exception, RuntimeException) throw(Exception, RuntimeException)
{ {
@@ -571,8 +557,6 @@ void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
} }
} }
OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pCC) OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pCC)
{ {
if (pCC) if (pCC)
@@ -580,7 +564,6 @@ OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pC
return aTerm; return aTerm;
} }
OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pCC) OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pCC)
{ {
if (pCC) if (pCC)
@@ -588,7 +571,6 @@ OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pC
return aTerm; return aTerm;
} }
OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC) OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
{ {
sal_Int32 tlen = aTerm.getLength(); sal_Int32 tlen = aTerm.getLength();
@@ -606,8 +588,6 @@ OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
return aTerm; return aTerm;
} }
void SAL_CALL Thesaurus::dispose() void SAL_CALL Thesaurus::dispose()
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -627,7 +607,6 @@ void SAL_CALL Thesaurus::dispose()
} }
} }
void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rxListener ) void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -637,7 +616,6 @@ void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rx
aEvtListeners.addInterface( rxListener ); aEvtListeners.addInterface( rxListener );
} }
void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener ) void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -655,7 +633,6 @@ OUString SAL_CALL Thesaurus::getImplementationName()
return getImplementationName_Static(); return getImplementationName_Static();
} }
sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName ) sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName )
throw(RuntimeException) throw(RuntimeException)
{ {
@@ -674,7 +651,7 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
{ {
MutexGuard aGuard( GetLinguMutex() ); MutexGuard aGuard( GetLinguMutex() );
Sequence< OUString > aSNS( 1 ); // auch mehr als 1 Service moeglich Sequence< OUString > aSNS( 1 ); // more than 1 service is possible, too
aSNS.getArray()[0] = SN_THESAURUS; aSNS.getArray()[0] = SN_THESAURUS;
return aSNS; return aSNS;
} }
@@ -699,7 +676,4 @@ void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
return pRet; return pRet;
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -56,11 +56,6 @@ namespace com { namespace sun { namespace star { namespace beans {
class XPropertySet; class XPropertySet;
}}}} }}}}
///////////////////////////////////////////////////////////////////////////
class Thesaurus : class Thesaurus :
public cppu::WeakImplHelper5 public cppu::WeakImplHelper5
< <
@@ -98,7 +93,6 @@ class Thesaurus :
return pPropHelper ? *pPropHelper : GetPropHelper_Impl(); return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
} }
public: public:
Thesaurus(); Thesaurus();
virtual ~Thesaurus(); virtual ~Thesaurus();
@@ -126,7 +120,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException); virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException); virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
static inline OUString static inline OUString
getImplementationName_Static() throw(); getImplementationName_Static() throw();
static Sequence< OUString > static Sequence< OUString >
@@ -151,9 +144,6 @@ inline OUString Thesaurus::getImplementationName_Static() throw()
return OUString( "org.openoffice.lingu.new.Thesaurus" ); return OUString( "org.openoffice.lingu.new.Thesaurus" );
} }
///////////////////////////////////////////////////////////////////////////
#endif #endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -25,19 +25,13 @@
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::registry; using namespace com::sun::star::registry;
////////////////////////////////////////
// declaration of external RegEntry-functions defined by the service objects // declaration of external RegEntry-functions defined by the service objects
//
extern void * SAL_CALL Thesaurus_getFactory( extern void * SAL_CALL Thesaurus_getFactory(
const sal_Char * pImplName, const sal_Char * pImplName,
XMultiServiceFactory * pServiceManager, XMultiServiceFactory * pServiceManager,
void * /*pRegistryKey*/ ); void * /*pRegistryKey*/ );
////////////////////////////////////////
// definition of the two functions that are used to provide the services // definition of the two functions that are used to provide the services
//
extern "C" extern "C"
{ {
@@ -54,6 +48,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL lnth_component_getFactory(
} }
///////////////////////////////////////////////////////////////////////////
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */