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:
committed by
Caolán McNamara
parent
99e3bd454b
commit
412c47ded6
@@ -25,19 +25,13 @@
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::registry;
|
||||
|
||||
////////////////////////////////////////
|
||||
// declaration of external RegEntry-functions defined by the service objects
|
||||
//
|
||||
|
||||
extern void * SAL_CALL Hyphenator_getFactory(
|
||||
const sal_Char * pImplName,
|
||||
XMultiServiceFactory * pServiceManager,
|
||||
void * /*pRegistryKey*/ );
|
||||
|
||||
////////////////////////////////////////
|
||||
// definition of the two functions that are used to provide the services
|
||||
//
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -54,6 +48,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL hyphen_component_getFactory(
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -57,13 +57,9 @@ using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::linguistic2;
|
||||
using namespace linguistic;
|
||||
|
||||
|
||||
// min, max
|
||||
#define Max(a,b) (a > b ? a : b)
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
Hyphenator::Hyphenator() :
|
||||
aEvtListeners ( GetLinguMutex() )
|
||||
{
|
||||
@@ -105,7 +101,6 @@ PropertyHelper_Hyphenation& Hyphenator::GetPropHelper_Impl()
|
||||
return *pPropHelper;
|
||||
}
|
||||
|
||||
|
||||
Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -113,7 +108,6 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
||||
|
||||
// this routine should return the locales supported by the installed
|
||||
// dictionaries.
|
||||
|
||||
if (!numdict)
|
||||
{
|
||||
SvtLinguConfig aLinguCfg;
|
||||
@@ -217,7 +211,7 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no dictionary found so register no dictionaries */
|
||||
// no dictionary found so register no dictionaries
|
||||
numdict = 0;
|
||||
aDicts = NULL;
|
||||
aSuppLocales.realloc(0);
|
||||
@@ -227,8 +221,6 @@ Sequence< Locale > SAL_CALL Hyphenator::getLocales()
|
||||
return aSuppLocales;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -251,7 +243,6 @@ sal_Bool SAL_CALL Hyphenator::hasLocale(const Locale& rLocale)
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWord,
|
||||
const ::com::sun::star::lang::Locale& aLocale,
|
||||
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))) );
|
||||
if (bFailed)
|
||||
{
|
||||
//whoops something did not work
|
||||
// whoops something did not work
|
||||
delete[] hyphens;
|
||||
delete[] lcword;
|
||||
if (rep)
|
||||
@@ -506,7 +497,6 @@ Reference< XHyphenatedWord > SAL_CALL Hyphenator::hyphenate( const OUString& aWo
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference < XHyphenatedWord > SAL_CALL Hyphenator::queryAlternativeSpelling(
|
||||
const OUString& aWord,
|
||||
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 minLen = rHelper.GetMinWordLength();
|
||||
|
||||
//Resolves: fdo#41083 honour MinWordLength in "createPossibleHyphens" as
|
||||
//well as "hyphenate"
|
||||
// Resolves: fdo#41083 honour MinWordLength in "createPossibleHyphens" as
|
||||
// well as "hyphenate"
|
||||
if (aWord.getLength() < minLen)
|
||||
{
|
||||
return PossibleHyphens::CreatePossibleHyphens( aWord, LinguLocaleToLanguage( aLocale ),
|
||||
@@ -722,7 +712,6 @@ OUString SAL_CALL Hyphenator::makeUpperCase(const OUString& aTerm, CharClass * p
|
||||
return aTerm;
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC)
|
||||
{
|
||||
sal_Int32 tlen = aTerm.getLength();
|
||||
@@ -737,7 +726,6 @@ OUString SAL_CALL Hyphenator::makeInitCap(const OUString& aTerm, CharClass * pCC
|
||||
return aTerm;
|
||||
}
|
||||
|
||||
|
||||
Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
|
||||
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
|
||||
throw(Exception)
|
||||
@@ -746,7 +734,6 @@ Reference< XInterface > SAL_CALL Hyphenator_CreateInstance(
|
||||
return xService;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException)
|
||||
@@ -761,7 +748,6 @@ sal_Bool SAL_CALL Hyphenator::addLinguServiceEventListener(
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException)
|
||||
@@ -776,7 +762,6 @@ sal_Bool SAL_CALL Hyphenator::removeLinguServiceEventListener(
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -784,7 +769,6 @@ OUString SAL_CALL Hyphenator::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
return OUString( "Libhyphen Hyphenator" );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
|
||||
throw(Exception, RuntimeException)
|
||||
{
|
||||
@@ -797,7 +781,7 @@ void SAL_CALL Hyphenator::initialize( const Sequence< Any >& rArguments )
|
||||
{
|
||||
Reference< XLinguProperties > xPropSet;
|
||||
rArguments.getConstArray()[0] >>= xPropSet;
|
||||
//rArguments.getConstArray()[1] >>= xDicList;
|
||||
// rArguments.getConstArray()[1] >>= xDicList;
|
||||
|
||||
//! Pointer allows for access of the non-UNO functions.
|
||||
//! 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()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -832,7 +815,6 @@ void SAL_CALL Hyphenator::dispose()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -842,7 +824,6 @@ void SAL_CALL Hyphenator::addEventListener( const Reference< XEventListener >& r
|
||||
aEvtListeners.addInterface( rxListener );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL Hyphenator::removeEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -880,7 +861,7 @@ Sequence< OUString > Hyphenator::getSupportedServiceNames_Static()
|
||||
{
|
||||
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;
|
||||
return aSNS;
|
||||
}
|
||||
@@ -904,7 +885,4 @@ void * SAL_CALL Hyphenator_getFactory( const sal_Char * pImplName,
|
||||
return pRet;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#ifndef _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::linguistic2;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
struct HDInfo {
|
||||
HyphenDict * aPtr;
|
||||
OUString aName;
|
||||
@@ -59,8 +54,6 @@ struct HDInfo {
|
||||
CharClass * apCC;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class Hyphenator :
|
||||
public cppu::WeakImplHelper6
|
||||
<
|
||||
@@ -125,11 +118,9 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
|
||||
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
|
||||
|
||||
|
||||
static inline OUString getImplementationName_Static() throw();
|
||||
static Sequence< OUString > getSupportedServiceNames_Static() throw();
|
||||
|
||||
|
||||
private:
|
||||
OUString SAL_CALL makeLowerCase(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" );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
|
||||
@@ -52,7 +51,6 @@ Guess::Guess()
|
||||
* a string like those is made as : [language-country-encoding]...
|
||||
*
|
||||
*/
|
||||
|
||||
Guess::Guess(const char * guess_str)
|
||||
{
|
||||
Guess();
|
||||
@@ -62,10 +60,10 @@ Guess::Guess(const char * guess_str)
|
||||
string enc;
|
||||
|
||||
//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
|
||||
&&
|
||||
strcmp((const char*)(guess_str + 1), TEXTCAT_RESULT_SHORT_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)
|
||||
{
|
||||
|
||||
int current_pointer = 0;
|
||||
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#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::linguistic2;
|
||||
|
||||
//==================================================================================================
|
||||
|
||||
#define SERVICENAME "com.sun.star.linguistic2.LanguageGuessing"
|
||||
#define IMPLNAME "com.sun.star.lingu2.LanguageGuessing"
|
||||
|
||||
@@ -77,7 +74,6 @@ static osl::Mutex & GetLangGuessMutex()
|
||||
return aMutex;
|
||||
}
|
||||
|
||||
|
||||
class LangGuess_Impl :
|
||||
public ::cppu::WeakImplHelper2<
|
||||
XLanguageGuessing,
|
||||
@@ -117,16 +113,12 @@ public:
|
||||
|
||||
};
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
LangGuess_Impl::LangGuess_Impl(css::uno::Reference< css::uno::XComponentContext > const & rxContext) :
|
||||
m_bInitialized( false ),
|
||||
m_xContext( rxContext )
|
||||
{
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
void LangGuess_Impl::EnsureInitialized()
|
||||
{
|
||||
if (!m_bInitialized)
|
||||
@@ -148,9 +140,8 @@ void LangGuess_Impl::EnsureInitialized()
|
||||
SetFingerPrintsDB( aPhysPath );
|
||||
|
||||
#if !defined(EXTTEXTCAT_VERSION_MAJOR)
|
||||
//
|
||||
|
||||
// disable currently not functional languages...
|
||||
//
|
||||
struct LangCountry
|
||||
{
|
||||
const char *pLang;
|
||||
@@ -160,7 +151,6 @@ void LangGuess_Impl::EnsureInitialized()
|
||||
{
|
||||
// not functional in modified libtextcat, but fixed in >= libexttextcat 3.1.0
|
||||
// which is the first with EXTTEXTCAT_VERSION_MAJOR defined
|
||||
|
||||
{"sco", ""}, {"zh", "CN"}, {"zh", "TW"}, {"ja", ""}, {"ko", ""},
|
||||
{"ka", ""}, {"hi", ""}, {"mr", ""}, {"ne", ""}, {"sa", ""},
|
||||
{"ta", ""}, {"th", ""}, {"qu", ""}, {"yi", ""}
|
||||
@@ -181,8 +171,6 @@ void LangGuess_Impl::EnsureInitialized()
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
|
||||
Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
|
||||
const OUString& rText,
|
||||
::sal_Int32 nStartPos,
|
||||
@@ -207,7 +195,6 @@ Locale SAL_CALL LangGuess_Impl::guessPrimaryLanguage(
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
#define DEFAULT_CONF_FILE_NAME "fpdb.conf"
|
||||
|
||||
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());
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
@@ -247,7 +233,6 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getAvailableLanguages( )
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
@@ -271,7 +256,6 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getEnabledLanguages( )
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
|
||||
throw (uno::RuntimeException)
|
||||
{
|
||||
@@ -295,7 +279,6 @@ uno::Sequence< Locale > SAL_CALL LangGuess_Impl::getDisabledLanguages( )
|
||||
return aRes;
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
void SAL_CALL LangGuess_Impl::disableLanguages(
|
||||
const uno::Sequence< Locale >& rLanguages )
|
||||
throw (lang::IllegalArgumentException, uno::RuntimeException)
|
||||
@@ -321,7 +304,6 @@ void SAL_CALL LangGuess_Impl::disableLanguages(
|
||||
}
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
void SAL_CALL LangGuess_Impl::enableLanguages(
|
||||
const uno::Sequence< Locale >& rLanguages )
|
||||
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) );
|
||||
}
|
||||
|
||||
//##################################################################################################
|
||||
//#### EXPORTED ### functions to allow for registration and creation of the UNO component
|
||||
//##################################################################################################
|
||||
|
||||
static const struct ::cppu::ImplementationEntry s_component_entries [] =
|
||||
{
|
||||
{
|
||||
|
@@ -27,7 +27,6 @@
|
||||
* - Not init h when implicit constructor is launched
|
||||
*/
|
||||
|
||||
|
||||
#include <string.h>
|
||||
#include <sstream>
|
||||
#include <iostream>
|
||||
@@ -53,11 +52,9 @@
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
||||
/**
|
||||
* This 3 following structures are from fingerprint.c and textcat.c
|
||||
*/
|
||||
|
||||
typedef struct ngram_t {
|
||||
|
||||
sint2 rank;
|
||||
@@ -83,7 +80,7 @@ typedef struct textcat_t{
|
||||
char output[MAXOUTPUTSIZE];
|
||||
|
||||
} textcat_t;
|
||||
/** end of the 3 structs */
|
||||
// end of the 3 structs
|
||||
|
||||
SimpleGuesser::SimpleGuesser()
|
||||
{
|
||||
@@ -93,7 +90,7 @@ SimpleGuesser::SimpleGuesser()
|
||||
SimpleGuesser& SimpleGuesser::operator=(const SimpleGuesser& sg){
|
||||
// Check for self-assignment!
|
||||
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);}
|
||||
h = sg.h;
|
||||
@@ -105,7 +102,6 @@ SimpleGuesser::~SimpleGuesser()
|
||||
if(h){textcat_Done(h);}
|
||||
}
|
||||
|
||||
|
||||
/*!
|
||||
\fn SimpleGuesser::GuessLanguage(char* text)
|
||||
*/
|
||||
@@ -221,9 +217,6 @@ void SimpleGuesser::DisableLanguage(string lang)
|
||||
XableLanguage(lang, sal::static_int_cast< char >( 0x0F ));
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
void SimpleGuesser::SetDBPath(const char* path, const char* prefix)
|
||||
{
|
||||
if (h)
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#if defined(WNT)
|
||||
#include <windows.h>
|
||||
#endif
|
||||
@@ -43,7 +42,6 @@
|
||||
|
||||
#include <sal/macros.h>
|
||||
|
||||
|
||||
using ::com::sun::star::lang::Locale;
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
@@ -70,8 +68,6 @@ OString Win_GetShortPathName( const OUString &rLongPathName )
|
||||
}
|
||||
#endif //defined(WNT)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
// build list of old style diuctionaries (not as extensions) to use.
|
||||
// User installed dictionaries (the ones residing in the user paths)
|
||||
// will get precedence over system installed ones for the same language.
|
||||
@@ -119,7 +115,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
if (aFormatName.isEmpty() || aDicExtension.isEmpty())
|
||||
return aRes;
|
||||
|
||||
@@ -195,7 +190,6 @@ std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char *pDicTy
|
||||
return aRes;
|
||||
}
|
||||
|
||||
|
||||
void MergeNewStyleDicsAndOldStyleDics(
|
||||
std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics,
|
||||
const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics )
|
||||
@@ -241,7 +235,6 @@ void MergeNewStyleDicsAndOldStyleDics(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
rtl_TextEncoding getTextEncodingFromCharset(const sal_Char* pCharset)
|
||||
{
|
||||
// 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;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#ifndef _LINGUTIL_HXX_
|
||||
#define _LINGUTIL_HXX_
|
||||
|
||||
|
||||
#include <com/sun/star/lang/Locale.hpp>
|
||||
#include <rtl/string.hxx>
|
||||
#include <rtl/ustring.hxx>
|
||||
@@ -28,16 +27,12 @@
|
||||
#include <vector>
|
||||
#include <list>
|
||||
|
||||
|
||||
#define OU2ENC(rtlOUString, rtlEncoding) \
|
||||
OString((rtlOUString).getStr(), (rtlOUString).getLength(), \
|
||||
rtlEncoding, RTL_UNICODETOTEXT_FLAGS_UNDEFINED_QUESTIONMARK).getStr()
|
||||
|
||||
|
||||
struct SvtLinguConfigDictionaryEntry;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
struct lt_rtl_OUString
|
||||
{
|
||||
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)
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// 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
|
||||
// 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 );
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// temporary function, to be removed when new style dictionaries
|
||||
// using configuration entries are fully implemented and provided
|
||||
std::vector< SvtLinguConfigDictionaryEntry > GetOldStyleDics( const char * pDicType );
|
||||
void MergeNewStyleDicsAndOldStyleDics( std::list< SvtLinguConfigDictionaryEntry > &rNewStyleDics, const std::vector< SvtLinguConfigDictionaryEntry > &rOldStyleDics );
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
//Find an encoding from a charset string, using
|
||||
//rtl_getTextEncodingFromMimeCharset and falling back to
|
||||
//rtl_getTextEncodingFromUnixCharset with the addition of
|
||||
|
@@ -27,18 +27,18 @@
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::registry;
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
// declaration of external RegEntry-functions defined by the service objects
|
||||
//
|
||||
|
||||
|
||||
extern void * SAL_CALL MacSpellChecker_getFactory(
|
||||
const sal_Char * pImplName,
|
||||
XMultiServiceFactory * pServiceManager,
|
||||
void * /*pRegistryKey*/ );
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
// definition of the two functions that are used to provide the services
|
||||
//
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
@@ -57,6 +57,6 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL MacOSXSpell_component_getFactory(
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -49,9 +49,6 @@ using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::lang;
|
||||
using namespace ::com::sun::star::linguistic2;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class MacSpellChecker :
|
||||
public cppu::WeakImplHelper6
|
||||
<
|
||||
@@ -69,7 +66,7 @@ class MacSpellChecker :
|
||||
OUString * aDNames;
|
||||
sal_Int32 numdict;
|
||||
NSSpellChecker * macSpell;
|
||||
int macTag; //unique tag for this doc
|
||||
int macTag; // unique tag for this doc
|
||||
|
||||
::cppu::OInterfaceContainerHelper aEvtListeners;
|
||||
Reference< XPropertyChangeListener > xPropHelper;
|
||||
@@ -121,7 +118,6 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
|
||||
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
|
||||
|
||||
|
||||
static inline OUString getImplementationName_Static() throw();
|
||||
static Sequence< OUString > getSupportedServiceNames_Static() throw();
|
||||
};
|
||||
@@ -131,10 +127,6 @@ inline OUString MacSpellChecker::getImplementationName_Static() throw()
|
||||
return OUString( "org.openoffice.lingu.MacOSXSpellChecker" );
|
||||
}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -573,6 +573,6 @@ void * SAL_CALL MacSpellChecker_getFactory( const sal_Char * pImplName,
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -25,17 +25,13 @@
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::registry;
|
||||
|
||||
////////////////////////////////////////
|
||||
// declaration of external RegEntry-functions defined by the service objects
|
||||
//
|
||||
extern void * SAL_CALL SpellChecker_getFactory(
|
||||
const sal_Char * pImplName,
|
||||
XMultiServiceFactory * pServiceManager,
|
||||
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"
|
||||
{
|
||||
|
||||
@@ -53,6 +49,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL spell_component_getFactory(
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#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 linguistic;
|
||||
|
||||
|
||||
// XML-header of SPELLML queries
|
||||
#define SPELLML_HEADER "<?xml?>"
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
SpellChecker::SpellChecker() :
|
||||
aDicts(NULL),
|
||||
aDEncs(NULL),
|
||||
@@ -106,7 +102,6 @@ PropertyHelper_Spelling & SpellChecker::GetPropHelper_Impl()
|
||||
return *pPropHelper;
|
||||
}
|
||||
|
||||
|
||||
Sequence< Locale > SAL_CALL SpellChecker::getLocales()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -114,7 +109,6 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
|
||||
|
||||
// this routine should return the locales supported by the installed
|
||||
// dictionaries.
|
||||
|
||||
if (!numdict)
|
||||
{
|
||||
SvtLinguConfig aLinguCfg;
|
||||
@@ -217,7 +211,7 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
|
||||
}
|
||||
else
|
||||
{
|
||||
/* no dictionary found so register no dictionaries */
|
||||
// no dictionary found so register no dictionaries
|
||||
numdict = 0;
|
||||
delete[] aDicts;
|
||||
aDicts = NULL;
|
||||
@@ -234,7 +228,6 @@ Sequence< Locale > SAL_CALL SpellChecker::getLocales()
|
||||
return aSuppLocales;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -257,7 +250,6 @@ sal_Bool SAL_CALL SpellChecker::hasLocale(const Locale& rLocale)
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rLocale )
|
||||
{
|
||||
Hunspell * pMS = NULL;
|
||||
@@ -282,10 +274,9 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
|
||||
else if ((c == 0x2018) || (c == 0x2019))
|
||||
rBuf[ix] = (sal_Unicode)0x0027;
|
||||
|
||||
// recognize words with Unicode ligatures and ZWNJ/ZWJ characters (only
|
||||
// with 8-bit encoded dictionaries. For UTF-8 encoded dictionaries
|
||||
// set ICONV and IGNORE aff file options, if needed.)
|
||||
|
||||
// recognize words with Unicode ligatures and ZWNJ/ZWJ characters (only
|
||||
// with 8-bit encoded dictionaries. For UTF-8 encoded dictionaries
|
||||
// set ICONV and IGNORE aff file options, if needed.)
|
||||
else if ((c == 0x200C) || (c == 0x200D) ||
|
||||
((c >= 0xFB00) && (c <= 0xFB04)))
|
||||
extrachar = 1;
|
||||
@@ -375,7 +366,6 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
|
||||
return nRes;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rLocale,
|
||||
const PropertyValues& rProperties )
|
||||
throw(IllegalArgumentException, RuntimeException)
|
||||
@@ -397,7 +387,6 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
|
||||
// last argument.
|
||||
// You'll probably like to use a simplier solution than the provided
|
||||
// one using the PropertyHelper_Spell.
|
||||
|
||||
PropertyHelper_Spelling& rHelper = GetPropHelper();
|
||||
rHelper.SetTmpPropVals( rProperties );
|
||||
|
||||
@@ -417,14 +406,12 @@ sal_Bool SAL_CALL SpellChecker::isValid( const OUString& rWord, const Locale& rL
|
||||
return (nFailure == -1);
|
||||
}
|
||||
|
||||
|
||||
Reference< XSpellAlternatives >
|
||||
SpellChecker::GetProposals( const OUString &rWord, const Locale &rLocale )
|
||||
{
|
||||
// Retrieves the return values for the 'spell' function call in case
|
||||
// of a misspelled word.
|
||||
// Especially it may give a list of suggested (correct) words:
|
||||
|
||||
Reference< XSpellAlternatives > xRes;
|
||||
// note: mutex is held by higher up by spell which covers both
|
||||
|
||||
@@ -492,7 +479,6 @@ Reference< XSpellAlternatives >
|
||||
return xRes;
|
||||
}
|
||||
|
||||
|
||||
Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
|
||||
const OUString& rWord, const Locale& rLocale,
|
||||
const PropertyValues& rProperties )
|
||||
@@ -514,7 +500,6 @@ Reference< XSpellAlternatives > SAL_CALL SpellChecker::spell(
|
||||
return xAlt;
|
||||
}
|
||||
|
||||
|
||||
Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
|
||||
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
|
||||
throw(Exception)
|
||||
@@ -524,7 +509,6 @@ Reference< XInterface > SAL_CALL SpellChecker_CreateInstance(
|
||||
return xService;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException)
|
||||
@@ -539,7 +523,6 @@ sal_Bool SAL_CALL SpellChecker::addLinguServiceEventListener(
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
|
||||
const Reference< XLinguServiceEventListener >& rxLstnr )
|
||||
throw(RuntimeException)
|
||||
@@ -554,7 +537,6 @@ sal_Bool SAL_CALL SpellChecker::removeLinguServiceEventListener(
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -562,7 +544,6 @@ OUString SAL_CALL SpellChecker::getServiceDisplayName( const Locale& /*rLocale*/
|
||||
return OUString( "Hunspell SpellChecker" );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
|
||||
throw(Exception, RuntimeException)
|
||||
{
|
||||
@@ -575,7 +556,7 @@ void SAL_CALL SpellChecker::initialize( const Sequence< Any >& rArguments )
|
||||
{
|
||||
Reference< XLinguProperties > xPropSet;
|
||||
rArguments.getConstArray()[0] >>= xPropSet;
|
||||
//rArguments.getConstArray()[1] >>= xDicList;
|
||||
// rArguments.getConstArray()[1] >>= xDicList;
|
||||
|
||||
//! Pointer allows for access of the non-UNO functions.
|
||||
//! 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()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -610,7 +590,6 @@ void SAL_CALL SpellChecker::dispose()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -620,7 +599,6 @@ void SAL_CALL SpellChecker::addEventListener( const Reference< XEventListener >&
|
||||
aEvtListeners.addInterface( rxListener );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -630,7 +608,6 @@ void SAL_CALL SpellChecker::removeEventListener( const Reference< XEventListener
|
||||
aEvtListeners.removeInterface( rxListener );
|
||||
}
|
||||
|
||||
|
||||
// Service specific part
|
||||
OUString SAL_CALL SpellChecker::getImplementationName()
|
||||
throw(RuntimeException)
|
||||
@@ -659,7 +636,7 @@ Sequence< OUString > SpellChecker::getSupportedServiceNames_Static()
|
||||
{
|
||||
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;
|
||||
return aSNS;
|
||||
}
|
||||
@@ -683,7 +660,4 @@ void * SAL_CALL SpellChecker_getFactory( const sal_Char * pImplName,
|
||||
return pRet;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -43,10 +43,6 @@ using namespace ::com::sun::star::beans;
|
||||
using namespace ::com::sun::star::lang;
|
||||
using namespace ::com::sun::star::linguistic2;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class SpellChecker :
|
||||
public cppu::WeakImplHelper6
|
||||
<
|
||||
@@ -114,7 +110,6 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
|
||||
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
|
||||
|
||||
|
||||
static inline OUString getImplementationName_Static() throw();
|
||||
static Sequence< OUString > getSupportedServiceNames_Static() throw();
|
||||
};
|
||||
@@ -124,9 +119,6 @@ inline OUString SpellChecker::getImplementationName_Static() throw()
|
||||
return OUString( "org.openoffice.lingu.MySpellSpellChecker" );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -31,12 +31,9 @@ using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::linguistic2;
|
||||
|
||||
|
||||
namespace linguistic
|
||||
{
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Meaning::Meaning(
|
||||
const OUString &rTerm, sal_Int16 nLang) :
|
||||
|
||||
@@ -51,12 +48,10 @@ Meaning::Meaning(
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
Meaning::~Meaning()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL Meaning::getMeaning()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -64,7 +59,6 @@ OUString SAL_CALL Meaning::getMeaning()
|
||||
return aTerm;
|
||||
}
|
||||
|
||||
|
||||
Sequence< OUString > SAL_CALL Meaning::querySynonyms()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -72,7 +66,6 @@ Sequence< OUString > SAL_CALL Meaning::querySynonyms()
|
||||
return aSyn;
|
||||
}
|
||||
|
||||
|
||||
void Meaning::SetSynonyms( const Sequence< OUString > &rSyn )
|
||||
{
|
||||
MutexGuard aGuard( GetLinguMutex() );
|
||||
|
@@ -20,11 +20,9 @@
|
||||
#ifndef _LINGUISTIC_THESDTA_HXX_
|
||||
#define _LINGUISTIC_THESDTA_HXX_
|
||||
|
||||
|
||||
#include <com/sun/star/linguistic2/XMeaning.hpp>
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
|
||||
|
||||
namespace linguistic
|
||||
{
|
||||
|
||||
@@ -64,5 +62,4 @@ public:
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -17,7 +17,6 @@
|
||||
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
||||
*/
|
||||
|
||||
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <cppuhelper/factory.hxx>
|
||||
#include <cppuhelper/supportsservice.hxx>
|
||||
@@ -55,9 +54,6 @@ using namespace com::sun::star::uno;
|
||||
using namespace com::sun::star::linguistic2;
|
||||
using namespace linguistic;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static uno::Reference< XLinguServiceManager2 > GetLngSvcMgr_Impl()
|
||||
{
|
||||
uno::Reference< XComponentContext > xContext( comphelper::getProcessComponentContext() );
|
||||
@@ -79,7 +75,6 @@ Thesaurus::Thesaurus() :
|
||||
prevLocale = LANGUAGE_DONTKNOW;
|
||||
}
|
||||
|
||||
|
||||
Thesaurus::~Thesaurus()
|
||||
{
|
||||
if (aThes)
|
||||
@@ -117,7 +112,6 @@ Thesaurus::~Thesaurus()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
|
||||
{
|
||||
if (!pPropHelper)
|
||||
@@ -130,7 +124,6 @@ PropertyHelper_Thesaurus& Thesaurus::GetPropHelper_Impl()
|
||||
return *pPropHelper;
|
||||
}
|
||||
|
||||
|
||||
Sequence< Locale > SAL_CALL Thesaurus::getLocales()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -138,7 +131,6 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
|
||||
|
||||
// this routine should return the locales supported by the installed
|
||||
// dictionaries.
|
||||
|
||||
if (!numthes)
|
||||
{
|
||||
SvtLinguConfig aLinguCfg;
|
||||
@@ -258,8 +250,6 @@ Sequence< Locale > SAL_CALL Thesaurus::getLocales()
|
||||
return aSuppLocales;
|
||||
}
|
||||
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -281,7 +271,6 @@ sal_Bool SAL_CALL Thesaurus::hasLocale(const Locale& rLocale)
|
||||
return bRes;
|
||||
}
|
||||
|
||||
|
||||
Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thesaurus::queryMeanings(
|
||||
const OUString& qTerm, const Locale& rLocale,
|
||||
const PropertyValues& rProperties)
|
||||
@@ -528,7 +517,6 @@ Sequence < Reference < ::com::sun::star::linguistic2::XMeaning > > SAL_CALL Thes
|
||||
return noMeanings;
|
||||
}
|
||||
|
||||
|
||||
Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
|
||||
const Reference< XMultiServiceFactory > & /*rSMgr*/ )
|
||||
throw(Exception)
|
||||
@@ -537,7 +525,6 @@ Reference< XInterface > SAL_CALL Thesaurus_CreateInstance(
|
||||
return xService;
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -545,7 +532,6 @@ OUString SAL_CALL Thesaurus::getServiceDisplayName( const Locale& /*rLocale*/ )
|
||||
return OUString( "OpenOffice.org New Thesaurus" );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL Thesaurus::initialize( const Sequence< Any >& rArguments )
|
||||
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)
|
||||
{
|
||||
if (pCC)
|
||||
@@ -580,7 +564,6 @@ OUString SAL_CALL Thesaurus::makeLowerCase(const OUString& aTerm, CharClass * pC
|
||||
return aTerm;
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pCC)
|
||||
{
|
||||
if (pCC)
|
||||
@@ -588,7 +571,6 @@ OUString SAL_CALL Thesaurus::makeUpperCase(const OUString& aTerm, CharClass * pC
|
||||
return aTerm;
|
||||
}
|
||||
|
||||
|
||||
OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
|
||||
{
|
||||
sal_Int32 tlen = aTerm.getLength();
|
||||
@@ -606,8 +588,6 @@ OUString SAL_CALL Thesaurus::makeInitCap(const OUString& aTerm, CharClass * pCC)
|
||||
return aTerm;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SAL_CALL Thesaurus::dispose()
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -627,7 +607,6 @@ void SAL_CALL Thesaurus::dispose()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -637,7 +616,6 @@ void SAL_CALL Thesaurus::addEventListener( const Reference< XEventListener >& rx
|
||||
aEvtListeners.addInterface( rxListener );
|
||||
}
|
||||
|
||||
|
||||
void SAL_CALL Thesaurus::removeEventListener( const Reference< XEventListener >& rxListener )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -655,7 +633,6 @@ OUString SAL_CALL Thesaurus::getImplementationName()
|
||||
return getImplementationName_Static();
|
||||
}
|
||||
|
||||
|
||||
sal_Bool SAL_CALL Thesaurus::supportsService( const OUString& ServiceName )
|
||||
throw(RuntimeException)
|
||||
{
|
||||
@@ -674,7 +651,7 @@ Sequence< OUString > Thesaurus::getSupportedServiceNames_Static()
|
||||
{
|
||||
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;
|
||||
return aSNS;
|
||||
}
|
||||
@@ -699,7 +676,4 @@ void * SAL_CALL Thesaurus_getFactory( const sal_Char * pImplName,
|
||||
return pRet;
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -56,11 +56,6 @@ namespace com { namespace sun { namespace star { namespace beans {
|
||||
class XPropertySet;
|
||||
}}}}
|
||||
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
class Thesaurus :
|
||||
public cppu::WeakImplHelper5
|
||||
<
|
||||
@@ -98,7 +93,6 @@ class Thesaurus :
|
||||
return pPropHelper ? *pPropHelper : GetPropHelper_Impl();
|
||||
}
|
||||
|
||||
|
||||
public:
|
||||
Thesaurus();
|
||||
virtual ~Thesaurus();
|
||||
@@ -126,7 +120,6 @@ public:
|
||||
virtual sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(RuntimeException);
|
||||
virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(RuntimeException);
|
||||
|
||||
|
||||
static inline OUString
|
||||
getImplementationName_Static() throw();
|
||||
static Sequence< OUString >
|
||||
@@ -151,9 +144,6 @@ inline OUString Thesaurus::getImplementationName_Static() throw()
|
||||
return OUString( "org.openoffice.lingu.new.Thesaurus" );
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#endif
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -25,19 +25,13 @@
|
||||
using namespace com::sun::star::lang;
|
||||
using namespace com::sun::star::registry;
|
||||
|
||||
////////////////////////////////////////
|
||||
// declaration of external RegEntry-functions defined by the service objects
|
||||
//
|
||||
|
||||
extern void * SAL_CALL Thesaurus_getFactory(
|
||||
const sal_Char * pImplName,
|
||||
XMultiServiceFactory * pServiceManager,
|
||||
void * /*pRegistryKey*/ );
|
||||
|
||||
////////////////////////////////////////
|
||||
// definition of the two functions that are used to provide the services
|
||||
//
|
||||
|
||||
extern "C"
|
||||
{
|
||||
|
||||
@@ -54,6 +48,4 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL lnth_component_getFactory(
|
||||
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
Reference in New Issue
Block a user