summaryrefslogtreecommitdiff
path: root/linguistic/source
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-24 17:08:10 +0100
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-06-16 12:14:15 +0200
commitc683c55b54d3708ebe458146253d147186590c79 (patch)
tree49dcee4fe25e057791d837837c83a8c90eafa3ff /linguistic/source
parent2151303db47b9dc6a262df884939db4240d291a5 (diff)
CWS gnumake4: convert linguistic to new build system
Diffstat (limited to 'linguistic/source')
-rw-r--r--linguistic/source/grammarchecker.cxx305
-rw-r--r--linguistic/source/grammarchecker.hxx108
-rw-r--r--linguistic/source/hyphdta.cxx16
-rw-r--r--linguistic/source/lngprophelp.cxx155
-rw-r--r--linguistic/source/lngreg.cxx4
-rw-r--r--linguistic/source/makefile.mk118
-rw-r--r--linguistic/source/spelldta.cxx10
7 files changed, 183 insertions, 533 deletions
diff --git a/linguistic/source/grammarchecker.cxx b/linguistic/source/grammarchecker.cxx
deleted file mode 100644
index 6f4b1c5d3da8..000000000000
--- a/linguistic/source/grammarchecker.cxx
+++ /dev/null
@@ -1,305 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-#include "precompiled_linguistic.hxx"
-
-#include <sal/config.h>
-#include <com/sun/star/uno/XComponentContext.hpp>
-#include <cppuhelper/implbase1.hxx>
-#include <com/sun/star/linguistic2/XGrammarChecker.hpp>
-#include <com/sun/star/i18n/XBreakIterator.hpp>
-#include <cppuhelper/implbase4.hxx>
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include "linguistic/misc.hxx"
-#include "defs.hxx"
-#include <cppuhelper/factory.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-
-#include <cppuhelper/interfacecontainer.h>
-#include <com/sun/star/container/XContentEnumerationAccess.hpp>
-#include <com/sun/star/container/XEnumeration.hpp>
-#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
-#include <com/sun/star/linguistic2/SingleGrammarError.hpp>
-#include <com/sun/star/linguistic2/GrammarCheckingResult.hpp>
-#include "lngopt.hxx"
-#include <comphelper/extract.hxx>
-#include <unotools/processfactory.hxx>
-#include <map>
-#include <com/sun/star/text/TextMarkupType.hpp>
-
-#include "grammarchecker.hxx"
-
-using namespace ::utl;
-using namespace ::rtl;
-using namespace ::com::sun::star;
-
-////////////////////////////////////////////////////////////
-
-GrammarChecker::GrammarChecker( /*uno::Reference< uno::XComponentContext > const & context*/ )
- /*m_xContext(context)*/
-{}
-
-GrammarChecker::~GrammarChecker()
-{
-}
-
-
-sal_Bool SAL_CALL GrammarChecker::isSpellChecker() throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return sal_False;
-}
-
-
-sal_Bool SAL_CALL GrammarChecker::hasLocale( const lang::Locale & aLocale ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) aLocale;
- return sal_False;
-}
-
-uno::Sequence< lang::Locale > SAL_CALL GrammarChecker::getLocales( ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return uno::Sequence< lang::Locale >();
-}
-
-
-void SAL_CALL GrammarChecker::startDocument(sal_Int32 nDocId)
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-void SAL_CALL GrammarChecker::startParagraph(sal_Int32 nDocId)
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-void SAL_CALL GrammarChecker::endParagraph( sal_Int32 nDocId )
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-void SAL_CALL GrammarChecker::endDocument(sal_Int32 nDocId)
- throw (uno::RuntimeException, lang::IllegalArgumentException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) nDocId;
-}
-
-linguistic2::GrammarCheckingResult SAL_CALL GrammarChecker::doGrammarChecking(
- sal_Int32 nDocId,
- const rtl::OUString& rText,
- const lang::Locale& rLocale,
- sal_Int32 nStartOfSentencePos,
- sal_Int32 nSuggestedSentenceEndPos,
- const uno::Sequence< ::sal_Int32 >& rLanguagePortions,
- const uno::Sequence< lang::Locale >& rLanguagePortionsLocales )
- throw (lang::IllegalArgumentException, uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-
- (void) rLanguagePortions;
- (void) rLanguagePortionsLocales;
-
- linguistic2::GrammarCheckingResult aRes;
- aRes.nDocumentId = nDocId;
- aRes.aText = rText;
- aRes.aLocale = rLocale;
- aRes.nEndOfSentencePos = nSuggestedSentenceEndPos;
- aRes.xGrammarChecker = this;
- aRes.aGrammarErrors = GrammarCheckingInDummy( nDocId, rText, rLocale, nStartOfSentencePos, nSuggestedSentenceEndPos );;
-
- return aRes;
-}
-
-uno::Sequence< linguistic2::SingleGrammarError > GrammarChecker::GrammarCheckingInDummy(
- sal_Int32 nDocId,
- const OUString & rFlatParaText,
- const lang::Locale & rLocale,
- sal_Int32 nStartOfSentencePos,
- sal_Int32 nSuggestedSentenceEndPos )
-{
- (void) nDocId;
- (void) rFlatParaText;
- (void) rLocale;
- (void) nStartOfSentencePos;
- (void) nSuggestedSentenceEndPos;
-
-
- typedef std::map< OUString, uno::Sequence<OUString> > Error_t;
- Error_t aError;
- uno::Sequence< OUString > aSuggestion(1);
- OUString *pSeggestion = aSuggestion.getArray();
- pSeggestion[0] = OUString::createFromAscii("Modified");
-
- aError[OUString::createFromAscii("GrammarError")] = aSuggestion;
- aError[OUString::createFromAscii("Grammar Error")] = aSuggestion;
-
- typedef std::vector< linguistic2::SingleGrammarError> ErrorVector_t;
- ErrorVector_t aErrorVector;
-
- OUString aText = rFlatParaText.copy( nStartOfSentencePos, nSuggestedSentenceEndPos - nStartOfSentencePos );
- sal_Int32 nIndexOf = 0;
- for(Error_t::const_iterator it = aError.begin(); it != aError.end(); ++it)
- {
-
- while(nIndexOf >= 0)
- {
- nIndexOf=aText.indexOf(it->first, nIndexOf);
- if(nIndexOf > -1)
- {
- //error found
- linguistic2::SingleGrammarError aErr;
- aErr.nErrorStart = nIndexOf + nStartOfSentencePos;
- nIndexOf += it->first.getLength();
- aErr.nErrorLength = it->first.getLength();
- aErr.nErrorType = text::TextMarkupType::GRAMMAR;
- aErr.nErrorLevel = 0;
- aErr.aShortComment = OUString();
- aErr.aFullComment = OUString();
- aErr.aNewLocale = rLocale;
- aErr.aSuggestions = it->second;
-
- aErrorVector.push_back( aErr );
- }
- }
- nIndexOf = 0;
- }
-
- sal_Int32 nCount = aErrorVector.size();
- uno::Sequence< linguistic2::SingleGrammarError > aErrors( nCount );
- if( nCount > 0 )
- {
- linguistic2::SingleGrammarError* pErrors = aErrors.getArray();
- for (sal_Int32 i=0; i < nCount; ++i)
- {
- pErrors[i] = aErrorVector[i];
- }
- }
- return aErrors;
-}
-
-
-sal_Bool SAL_CALL GrammarChecker::hasOptionsDialog( ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return sal_False;
-}
-
-void SAL_CALL GrammarChecker::runOptionsDialog()
- throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-}
-
-void SAL_CALL GrammarChecker::dispose( ) throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-}
-
-void SAL_CALL GrammarChecker::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
- throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) xListener;
-}
-
-void SAL_CALL GrammarChecker::removeEventListener( const uno::Reference< lang::XEventListener >& xListener )
- throw (uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- (void) xListener;
-}
-
-sal_Bool SAL_CALL GrammarChecker::supportsService( const OUString& ServiceName ) throw(uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
-
- uno::Sequence< OUString > aSNL = getSupportedServiceNames();
- const OUString * pArray = aSNL.getConstArray();
- for( sal_Int32 i = 0; i < aSNL.getLength(); ++i )
- if( pArray[i] == ServiceName )
- return sal_True;
- return sal_False;
-}
-
-uno::Sequence< OUString > GrammarChecker::getSupportedServiceNames_Static( ) throw()
-{
- //osl::Guard< osl::Mutex > aGuard(GetMutex());
-
- uno::Sequence< OUString > aSNS( 1 ); // auch mehr als 1 Service moeglich
- aSNS.getArray()[0] = A2OU( "com.sun.star.linguistic2.GrammarChecker" );//SN_LINGU_SERVCICE_MANAGER
- return aSNS;
-}
-
-uno::Sequence< OUString > SAL_CALL GrammarChecker::getSupportedServiceNames( ) throw(uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return getSupportedServiceNames_Static();
-}
-
-OUString SAL_CALL GrammarChecker::getImplementationName( ) throw(uno::RuntimeException)
-{
- osl::Guard< osl::Mutex > aGuard(GetMutex());
- return getImplementationName_Static();
-}
-
-uno::Reference< uno::XInterface > SAL_CALL GrammarChecker_CreateInstance(
- const uno::Reference< lang::XMultiServiceFactory > & /*rSMgr*/ )
- throw(uno::Exception)
-{
- uno::Reference< uno::XInterface > xService = (cppu::OWeakObject*) new GrammarChecker;
- return xService;
-}
-
-void * SAL_CALL GrammarChecker_getFactory( const sal_Char * pImplName, lang::XMultiServiceFactory * pServiceManager, void * /*pRegistryKey*/ )
-{
-
- void * pRet = 0;
- if ( !GrammarChecker::getImplementationName_Static().compareToAscii( pImplName ) )
- {
- uno::Reference< lang::XSingleServiceFactory > xFactory =
- cppu::createOneInstanceFactory(
- pServiceManager,
- GrammarChecker::getImplementationName_Static(),
- GrammarChecker_CreateInstance,
- GrammarChecker::getSupportedServiceNames_Static());
- // acquire, because we return an interface pointer instead of a reference
- xFactory->acquire();
- pRet = xFactory.get();
- }
- return pRet;
-}
-
diff --git a/linguistic/source/grammarchecker.hxx b/linguistic/source/grammarchecker.hxx
deleted file mode 100644
index 8eee8f4c93f9..000000000000
--- a/linguistic/source/grammarchecker.hxx
+++ /dev/null
@@ -1,108 +0,0 @@
-/*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org. If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef _LINGUISTIC_GRAMMARCHECKER_HXX_
-#define _LINGUISTIC_GRAMMARCHECKER_HXX_
-
-
-#include <com/sun/star/lang/XComponent.hpp>
-#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/linguistic2/XGrammarChecker.hpp>
-#include <com/sun/star/linguistic2/SingleGrammarError.hpp>
-#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
-
-#include <cppuhelper/implbase3.hxx>
-#include <cppuhelper/interfacecontainer.h>
-
-#include <map>
-
-
-class GrammarChecker:
- public cppu::WeakImplHelper3
- <
- ::com::sun::star::linguistic2::XGrammarChecker,
- ::com::sun::star::lang::XComponent,
- ::com::sun::star::lang::XServiceInfo
- >
-{
-// com::sun::star::uno::Reference< uno::XComponentContext > m_xContext;
-
- // disallow use of copy c-tor and assignment operator
- GrammarChecker( const GrammarChecker & );
- GrammarChecker & operator = ( const GrammarChecker & );
-
-public:
- explicit GrammarChecker( /* uno::Reference< uno::XComponentContext > const & rXContext */ );
- virtual ~GrammarChecker();
-
- // XSupportedLocales
- virtual ::sal_Bool SAL_CALL hasLocale( const ::com::sun::star::lang::Locale & aLocale) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale > SAL_CALL getLocales( ) throw ( ::com::sun::star::uno::RuntimeException );
-
- // XGrammarChecker
- virtual ::sal_Bool SAL_CALL isSpellChecker( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL startDocument( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL startParagraph( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endParagraph( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL endDocument( ::sal_Int32 nDocId ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::linguistic2::GrammarCheckingResult SAL_CALL doGrammarChecking( ::sal_Int32 nDocId, const ::rtl::OUString& aText, const ::com::sun::star::lang::Locale& aLocale, ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedEndOfSentencePos, const ::com::sun::star::uno::Sequence< ::sal_Int32 >& aLanguagePortions, const ::com::sun::star::uno::Sequence< ::com::sun::star::lang::Locale >& aLanguagePortionsLocales ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL hasOptionsDialog( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL runOptionsDialog( ) throw (::com::sun::star::uno::RuntimeException);
-
- // XComponent
- virtual void SAL_CALL dispose( ) throw (::com::sun::star::uno::RuntimeException);
- virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw ( ::com::sun::star::uno::RuntimeException );
- virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-
- // XServiceInfo
- virtual ::rtl::OUString SAL_CALL getImplementationName() throw (::com::sun::star::uno::RuntimeException);
- virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
- virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() throw (::com::sun::star::uno::RuntimeException);
-
- static inline ::rtl::OUString getImplementationName_Static();
- static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static() throw();
-
- ::com::sun::star::uno::Sequence< ::com::sun::star::linguistic2::SingleGrammarError > GrammarCheckingInDummy(
- ::sal_Int32 nDocId, const ::rtl::OUString &rFlatParaText, const ::com::sun::star::lang::Locale & rLocale,
- ::sal_Int32 nStartOfSentencePos, ::sal_Int32 nSuggestedSentenceEndPos );
-
-
- inline ::osl::Mutex & GetMutex()
- {
- static osl::Mutex aMutex;
- return aMutex;
- }
-};
-
-inline ::rtl::OUString GrammarChecker::getImplementationName_Static()
-{
- return A2OU( "com.sun.star.lingu2.GrammarChecker" );
-}
-
-
-#endif
-
diff --git a/linguistic/source/hyphdta.cxx b/linguistic/source/hyphdta.cxx
index 32c755ad7758..b27238c9218e 100644
--- a/linguistic/source/hyphdta.cxx
+++ b/linguistic/source/hyphdta.cxx
@@ -183,6 +183,22 @@ Sequence< sal_Int16 > SAL_CALL PossibleHyphens::getHyphenationPositions()
return aOrigHyphenPos;
}
+com::sun::star::uno::Reference <com::sun::star::linguistic2::XHyphenatedWord> HyphenatedWord::CreateHyphenatedWord(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nHyphenationPos,
+ const ::rtl::OUString &rHyphenatedWord, sal_Int16 nHyphenPos )
+{
+ return new HyphenatedWord( rWord, nLang, nHyphenationPos, rHyphenatedWord, nHyphenPos );
+}
+
+com::sun::star::uno::Reference < com::sun::star::linguistic2::XPossibleHyphens > PossibleHyphens::CreatePossibleHyphens
+ (const ::rtl::OUString &rWord, sal_Int16 nLang,
+ const ::rtl::OUString &rHyphWord,
+ const ::com::sun::star::uno::Sequence< sal_Int16 > &rPositions)
+{
+ return new PossibleHyphens( rWord, nLang, rHyphWord, rPositions );
+}
+
+
///////////////////////////////////////////////////////////////////////////
} // namespace linguistic
diff --git a/linguistic/source/lngprophelp.cxx b/linguistic/source/lngprophelp.cxx
index 88c5c7829cee..2854a74ae335 100644
--- a/linguistic/source/lngprophelp.cxx
+++ b/linguistic/source/lngprophelp.cxx
@@ -711,6 +711,161 @@ void PropertyHelper_Hyphen::SetTmpPropVals( const PropertyValues &rPropVals )
}
}
+PropertyHelper_Thesaurus::PropertyHelper_Thesaurus(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet )
+{
+ pInst = new PropertyHelper_Thes( rxSource, rxPropSet );
+ xPropHelper = pInst;
+}
+
+PropertyHelper_Thesaurus::~PropertyHelper_Thesaurus()
+{
+}
+
+void PropertyHelper_Thesaurus::AddAsPropListener()
+{
+ pInst->AddAsPropListener();
+}
+
+void PropertyHelper_Thesaurus::RemoveAsPropListener()
+{
+ pInst->RemoveAsPropListener();
+}
+
+void PropertyHelper_Thesaurus::SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals )
+{
+ pInst->SetTmpPropVals( rPropVals );
+}
+
+PropertyHelper_Hyphenation::PropertyHelper_Hyphenation(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet)
+{
+ pInst = new PropertyHelper_Hyphen( rxSource, rxPropSet );
+ xPropHelper = pInst;
+}
+
+PropertyHelper_Hyphenation::~PropertyHelper_Hyphenation()
+{
+}
+
+void PropertyHelper_Hyphenation::AddAsPropListener()
+{
+ pInst->AddAsPropListener();
+}
+
+void PropertyHelper_Hyphenation::RemoveAsPropListener()
+{
+ pInst->RemoveAsPropListener();
+}
+
+void PropertyHelper_Hyphenation::SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals )
+{
+ pInst->SetTmpPropVals( rPropVals );
+}
+
+sal_Int16 PropertyHelper_Hyphenation::GetMinLeading() const
+{
+ return pInst->GetMinLeading();
+}
+
+sal_Int16 PropertyHelper_Hyphenation::GetMinTrailing() const
+{
+ return pInst->GetMinTrailing();
+}
+
+sal_Int16 PropertyHelper_Hyphenation::GetMinWordLength() const
+{
+ return pInst->GetMinWordLength();
+}
+
+sal_Bool PropertyHelper_Hyphenation::addLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->addLinguServiceEventListener( rxListener );
+}
+
+sal_Bool PropertyHelper_Hyphenation::removeLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->removeLinguServiceEventListener( rxListener );
+}
+
+PropertyHelper_Spelling::PropertyHelper_Spelling(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > &rxSource,
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > &rxPropSet )
+{
+ pInst = new PropertyHelper_Spell( rxSource, rxPropSet );
+ xPropHelper = pInst;
+}
+
+PropertyHelper_Spelling::~PropertyHelper_Spelling()
+{
+}
+
+void PropertyHelper_Spelling::AddAsPropListener()
+{
+ pInst->AddAsPropListener();
+}
+
+void PropertyHelper_Spelling::RemoveAsPropListener()
+{
+ pInst->RemoveAsPropListener();
+}
+
+void PropertyHelper_Spelling::SetTmpPropVals( const com::sun::star::beans::PropertyValues &rPropVals )
+{
+ pInst->SetTmpPropVals( rPropVals );
+}
+
+sal_Int16 PropertyHelper_Spelling::GetMaxNumberOfSuggestions() const
+{
+ return pInst->GetMaxNumberOfSuggestions();
+}
+
+sal_Bool PropertyHelper_Spelling::IsSpellUpperCase() const
+{
+ return pInst->IsSpellUpperCase();
+}
+
+sal_Bool PropertyHelper_Spelling::IsSpellWithDigits() const
+{
+ return pInst->IsSpellWithDigits();
+}
+
+sal_Bool PropertyHelper_Spelling::IsSpellCapitalization() const
+{
+ return pInst->IsSpellCapitalization();
+}
+
+sal_Bool PropertyHelper_Spelling::addLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->addLinguServiceEventListener( rxListener );
+}
+
+sal_Bool PropertyHelper_Spelling::removeLinguServiceEventListener(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::linguistic2::XLinguServiceEventListener >& rxListener )
+ throw(::com::sun::star::uno::RuntimeException)
+{
+ return pInst->removeLinguServiceEventListener( rxListener );
+}
+
+
///////////////////////////////////////////////////////////////////////////
} // namespace linguistic
diff --git a/linguistic/source/lngreg.cxx b/linguistic/source/lngreg.cxx
index 0f6add07b466..1f2ed71824b6 100644
--- a/linguistic/source/lngreg.cxx
+++ b/linguistic/source/lngreg.cxx
@@ -87,13 +87,13 @@ extern void * SAL_CALL GrammarCheckingIterator_getFactory
extern "C"
{
-void SAL_CALL component_getImplementationEnvironment(
+SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
const sal_Char ** ppEnvTypeName, uno_Environment ** /*ppEnv*/ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-void * SAL_CALL component_getFactory(
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * pRegistryKey )
{
void * pRet =
diff --git a/linguistic/source/makefile.mk b/linguistic/source/makefile.mk
deleted file mode 100644
index 49dedeec3e82..000000000000
--- a/linguistic/source/makefile.mk
+++ /dev/null
@@ -1,118 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..
-
-PRJNAME=linguistic
-TARGET=lng
-ENABLE_EXCEPTIONS=sal_True
-
-#----- Settings ---------------------------------------------------------
-
-.INCLUDE : settings.mk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(SLO)$/convdiclist.obj\
- $(SLO)$/convdic.obj\
- $(SLO)$/convdicxml.obj\
- $(SLO)$/dicimp.obj\
- $(SLO)$/dlistimp.obj\
- $(SLO)$/hhconvdic.obj\
- $(SLO)$/hyphdsp.obj\
- $(SLO)$/hyphdta.obj\
- $(SLO)$/iprcache.obj\
- $(SLO)$/lngopt.obj\
- $(SLO)$/lngprophelp.obj\
- $(SLO)$/lngreg.obj\
- $(SLO)$/lngsvcmgr.obj\
- $(SLO)$/misc.obj\
- $(SLO)$/misc2.obj\
- $(SLO)$/spelldsp.obj\
- $(SLO)$/spelldta.obj\
- $(SLO)$/thesdsp.obj\
- $(SLO)$/thesdta.obj\
- $(SLO)$/gciterator.obj
-
-SHL1TARGET= $(TARGET)$(DLLPOSTFIX)
-
-SHL1STDLIBS= \
- $(CPPULIB) \
- $(CPPUHELPERLIB) \
- $(COMPHELPERLIB) \
- $(VOSLIB) \
- $(TOOLSLIB) \
- $(I18NISOLANGLIB) \
- $(SVLLIB) \
- $(SALLIB) \
- $(XMLOFFLIB) \
- $(UCBHELPERLIB) \
- $(UNOTOOLSLIB) \
- $(ICUUCLIB)
-
-# build DLL
-SHL1LIBS= $(SLB)$/$(TARGET).lib
-SHL1DEPN= $(SLB)$/$(TARGET).lib
-SHL1DEF= $(MISC)$/$(SHL1TARGET).def
-#SHL1VERSIONMAP= $(TARGET).map
-SHL1IMPLIB= ilng
-
-# build DEF file
-DEF1NAME =$(SHL1TARGET)
-DEF1DEPN =$(MISC)$/$(SHL1TARGET).flt
-DEFLIB1NAME =$(TARGET)
-DEF1DES =Linguistic main DLL
-#DEF1EXPORTFILE= exports.dxp
-
-
-.IF "$(GUI)"=="WNT"
-DEF1EXPORT1 = component_getFactory
-DEF1EXPORT2 = component_getImplementationEnvironment
-.ENDIF
-
-# --- Targets ------------------------------------------------------
-
-
-.INCLUDE : target.mk
-
-
-$(MISC)$/$(SHL1TARGET).flt: makefile.mk
- @echo ------------------------------
- @echo Making: $@
- @echo lcl > $@
- @echo component >> $@
- @echo __CT >> $@
-
-
-ALLTAR : $(MISC)/lng.component
-
-$(MISC)/lng.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
- lng.component
- $(XSLTPROC) --nonet --stringparam uri \
- '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
- $(SOLARENV)/bin/createcomponent.xslt lng.component
diff --git a/linguistic/source/spelldta.cxx b/linguistic/source/spelldta.cxx
index 158ff9073d56..8bfdd1e609f6 100644
--- a/linguistic/source/spelldta.cxx
+++ b/linguistic/source/spelldta.cxx
@@ -360,6 +360,16 @@ void SpellAlternatives::SetAlternatives( const Sequence< OUString > &rAlt )
}
+com::sun::star::uno::Reference < com::sun::star::linguistic2::XSpellAlternatives > SpellAlternatives::CreateSpellAlternatives(
+ const ::rtl::OUString &rWord, sal_Int16 nLang, sal_Int16 nTypeP, const ::com::sun::star::uno::Sequence< ::rtl::OUString > &rAlt )
+{
+ SpellAlternatives* pAlt = new SpellAlternatives;
+ pAlt->SetWordLanguage( rWord, nLang );
+ pAlt->SetFailureType( nTypeP );
+ pAlt->SetAlternatives( rAlt );
+ return Reference < XSpellAlternatives >(pAlt);
+}
+
///////////////////////////////////////////////////////////////////////////
} // namespace linguistic