diff options
author | Thomas Lange <tl@openoffice.org> | 2000-10-27 10:55:57 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2000-10-27 10:55:57 +0000 |
commit | 4d5740603315954a869ddc12f5b9e633f2d83c2c (patch) | |
tree | 806ffda87e4bbfb36fc14ca452a1586dab34d9d5 | |
parent | 197adaf94e7fdfc5cefe029e8045558a08ec5bdb (diff) |
linguistic => linguistic2
-rw-r--r-- | sw/inc/dlelstnr.hxx | 32 | ||||
-rw-r--r-- | sw/inc/doc.hxx | 28 | ||||
-rw-r--r-- | sw/inc/editsh.hxx | 11 | ||||
-rw-r--r-- | sw/inc/swmodule.hxx | 34 | ||||
-rw-r--r-- | sw/inc/swtypes.hxx | 16 | ||||
-rw-r--r-- | sw/source/core/bastyp/swtypes.cxx | 25 | ||||
-rw-r--r-- | sw/source/core/doc/docdraw.cxx | 7 | ||||
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 22 |
9 files changed, 107 insertions, 77 deletions
diff --git a/sw/inc/dlelstnr.hxx b/sw/inc/dlelstnr.hxx index 02f337b058f0..e3679f0b533b 100644 --- a/sw/inc/dlelstnr.hxx +++ b/sw/inc/dlelstnr.hxx @@ -2,9 +2,9 @@ * * $RCSfile: dlelstnr.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:25 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:43:40 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,10 +65,10 @@ #include <cppuhelper/weak.hxx> #ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLIST_HPP_ -#include <com/sun/star/linguistic/XDictionaryList.hpp> +#include <com/sun/star/linguistic2/XDictionaryList.hpp> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLISTEVENTLISTENER_HPP_ -#include <com/sun/star/linguistic/XDictionaryListEventListener.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XDICTIONARYLISTEVENTLISTENER_HPP_ +#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp> #endif #ifndef _CPPUHELPER_IMPLBASE1_HXX_ #include <cppuhelper/implbase1.hxx> // helper for implementations @@ -76,29 +76,39 @@ /////////////////////////////////////////////////////////////////////////// // SwDicListEvtListener -// is a ::com::sun::star::linguistic::XDictionaryListEventListener that triggers spellchecking +// is a XDictionaryListEventListener that triggers spellchecking // and hyphenation (yet to be implemented) when relevant changes to the // dictionaries of the dictionary list were made. // class SwDicListEvtListener : public cppu::WeakImplHelper1 < - ::com::sun::star::linguistic::XDictionaryListEventListener + ::com::sun::star::linguistic2::XDictionaryListEventListener > { private: - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryList > xDicList; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > xDicList; // disallow use of copy-constructor and assignment operator SwDicListEvtListener(const SwDicListEvtListener &); SwDicListEvtListener & operator = (const SwDicListEvtListener &); public: - SwDicListEvtListener( const ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryList > &rxDicList ); + SwDicListEvtListener( + const ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryList > &rxDicList ); virtual ~SwDicListEvtListener(); - // ::com::sun::star::linguistic::XDictionaryListEventListener - virtual void SAL_CALL processDictionaryListEvent(const ::com::sun::star::linguistic::DictionaryListEvent& aDicListEvent) throw( ::com::sun::star::uno::RuntimeException ); + // XEventListener + virtual void SAL_CALL disposing( + const ::com::sun::star::lang::EventObject& rSource ) + throw(::com::sun::star::uno::RuntimeException); + + // XDictionaryListEventListener + virtual void SAL_CALL processDictionaryListEvent( + const ::com::sun::star::linguistic2::DictionaryListEvent& aDicListEvent) + throw( ::com::sun::star::uno::RuntimeException ); }; diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index fbe8ea1ac398..97ac0809f9a4 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -2,9 +2,9 @@ * * $RCSfile: doc.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: os $ $Date: 2000-10-25 14:32:01 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:44:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -92,11 +92,11 @@ #include <itabenum.hxx> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_ -#include <com/sun/star/linguistic/XSpellChecker1.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XSPELLCHECKER1_HPP_ +#include <com/sun/star/linguistic2/XSpellChecker1.hpp> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATEDWORD_HPP_ -#include <com/sun/star/linguistic/XHyphenatedWord.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XHYPHENATEDWORD_HPP_ +#include <com/sun/star/linguistic2/XHyphenatedWord.hpp> #endif class SwExtTextInput; @@ -653,13 +653,15 @@ public: const SwLayouter* GetLayouter() const { return pLayouter; } void SetLayouter( SwLayouter* pNew ) { pLayouter = pNew; } - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > - Spell(SwPaM&, ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XSpellChecker1 > &, - sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) const; - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenatedWord > - Hyphenate( SwPaM *pPam, const Point &rCrsrPos, - sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > + Spell( SwPaM&, ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellChecker1 > &, + sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) const; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenatedWord > + Hyphenate( SwPaM *pPam, const Point &rCrsrPos, + sal_uInt16* pPageCnt, sal_uInt16* pPageSt ); const SwBookmarks& GetBookmarks() const { return *pBookmarkTbl; } SwBookmark* MakeBookmark( const SwPaM& rPaM, const KeyCode&, diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx index c499a6abecd5..18989f4d2eb5 100644 --- a/sw/inc/editsh.hxx +++ b/sw/inc/editsh.hxx @@ -2,9 +2,9 @@ * * $RCSfile: editsh.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-25 11:53:57 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:45:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,8 +79,8 @@ #ifndef _ITABENUM_HXX #include <itabenum.hxx> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLALTERNATIVES_HPP_ -#include <com/sun/star/linguistic/XSpellAlternatives.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XSPELLALTERNATIVES_HPP_ +#include <com/sun/star/linguistic2/XSpellAlternatives.hpp> #endif class PolyPolygon; @@ -706,7 +706,8 @@ public: // Is hyphenation active somewhere else? BOOL HasHyphIter() const; - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XSpellAlternatives> + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XSpellAlternatives > GetCorrection( const Point* pPt ); void SetLinguRange( SwDocPositions eStart, SwDocPositions eEnde ); diff --git a/sw/inc/swmodule.hxx b/sw/inc/swmodule.hxx index c7b4747388f7..d3f15dd0cdd1 100644 --- a/sw/inc/swmodule.hxx +++ b/sw/inc/swmodule.hxx @@ -2,9 +2,9 @@ * * $RCSfile: swmodule.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2000-10-13 11:53:13 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:46:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,8 +79,8 @@ #ifndef _STRING_HXX #include <tools/string.hxx> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARYLISTEVENTLISTENER_HPP_ -#include <com/sun/star/linguistic/XDictionaryListEventListener.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XDICTIONARYLISTEVENTLISTENER_HPP_ +#include <com/sun/star/linguistic2/XDictionaryListEventListener.hpp> #endif #ifndef _VCL_FLDUNIT_HXX #include <vcl/fldunit.hxx> @@ -146,8 +146,10 @@ class SwModule: public SwModuleDummy , public SfxListener SvStringsDtor* pAuthorNames; // DictionaryList listener to trigger spellchecking or hyphenation - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > xDicListEvtListener; - ::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager > m_xScannerManager; + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryListEventListener > xDicListEvtListener; + ::com::sun::star::uno::Reference< + ::com::sun::star::scanner::XScannerManager > m_xScannerManager; sal_Bool bAuthorInitialised : 1; sal_Bool bEmbeddedLoadSave : 1; @@ -277,20 +279,30 @@ public: void CheckSpellChanges( sal_Bool bOnlineSpelling, sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain ); - inline ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > GetDicListEvtListener(); - inline void SetDicListEvtListener(::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > xLstnr); + inline ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryListEventListener > + GetDicListEvtListener(); + inline void SetDicListEvtListener( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryListEventListener > & xLstnr); - ::com::sun::star::uno::Reference< ::com::sun::star::scanner::XScannerManager > GetScannerManager() const {return m_xScannerManager;} + ::com::sun::star::uno::Reference< + ::com::sun::star::scanner::XScannerManager > + GetScannerManager() const {return m_xScannerManager;} }; -inline ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > SwModule::GetDicListEvtListener() +inline ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryListEventListener > + SwModule::GetDicListEvtListener() { return xDicListEvtListener; } -inline void SwModule::SetDicListEvtListener(::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XDictionaryListEventListener > xLstnr) +inline void SwModule::SetDicListEvtListener( + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XDictionaryListEventListener > & xLstnr) { xDicListEvtListener = xLstnr; } diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx index 9775b229a5fd..b210606416cf 100644 --- a/sw/inc/swtypes.hxx +++ b/sw/inc/swtypes.hxx @@ -2,9 +2,9 @@ * * $RCSfile: swtypes.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-26 11:40:48 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:48:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -80,7 +80,7 @@ //#define SW_FILEFORMAT_40 SOFFICE_FILEFORMAT_40 namespace com{namespace sun{namespace star{ - namespace linguistic{ + namespace linguistic2{ class XDictionaryList; class XSpellChecker1; class XHyphenator; @@ -227,16 +227,14 @@ extern ResMgr* pSwResMgr; // steht in swapp0.cxx #define DDE_AVAILABLE #endif -// SpellChecker, Hyphenator kommen aus der OFA. -// ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XSpellChecker1 > GetSpellChecker(); + ::com::sun::star::linguistic2::XSpellChecker1 > GetSpellChecker(); ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XHyphenator > GetHyphenator(); + ::com::sun::star::linguistic2::XHyphenator > GetHyphenator(); ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XThesaurus > GetThesaurus(); + ::com::sun::star::linguistic2::XThesaurus > GetThesaurus(); ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XDictionaryList > GetDictionaryList(); + ::com::sun::star::linguistic2::XDictionaryList > GetDictionaryList(); ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetLinguPropertySet(); diff --git a/sw/source/core/bastyp/swtypes.cxx b/sw/source/core/bastyp/swtypes.cxx index f220e7752bee..ff90ba4ab6a0 100644 --- a/sw/source/core/bastyp/swtypes.cxx +++ b/sw/source/core/bastyp/swtypes.cxx @@ -2,9 +2,9 @@ * * $RCSfile: swtypes.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: os $ $Date: 2000-10-20 14:29:22 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:51:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,17 +84,17 @@ #ifndef _COMPHELPER_PROCESSFACTORY_HXX_ #include <comphelper/processfactory.hxx> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_ -#include <com/sun/star/linguistic/XSpellChecker1.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XSPELLCHECKER1_HPP_ +#include <com/sun/star/linguistic2/XSpellChecker1.hpp> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_ -#include <com/sun/star/linguistic/XHyphenator.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XHYPHENATOR_HPP_ +#include <com/sun/star/linguistic2/XHyphenator.hpp> #endif #ifndef _UNO_LINGU_HXX #include <svx/unolingu.hxx> #endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XTHESAURUS_HPP_ -#include <com/sun/star/linguistic/XThesaurus.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XTHESAURUS_HPP_ +#include <com/sun/star/linguistic2/XThesaurus.hpp> #endif #ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ #include <com/sun/star/beans/XPropertySet.hpp> @@ -162,6 +162,7 @@ #endif using namespace ::com::sun::star; +using namespace ::com::sun::star::linguistic2; using namespace ::comphelper; #ifndef PROFILE @@ -226,22 +227,22 @@ Size GetGraphicSizeTwip( const Graphic& rGraphic, OutputDevice* pOutDev ) } -uno::Reference< linguistic::XSpellChecker1 > GetSpellChecker() +uno::Reference< XSpellChecker1 > GetSpellChecker() { return LinguMgr::GetSpellChecker(); } -uno::Reference< linguistic::XHyphenator > GetHyphenator() +uno::Reference< XHyphenator > GetHyphenator() { return LinguMgr::GetHyphenator(); } -uno::Reference< linguistic::XThesaurus > GetThesaurus() +uno::Reference< XThesaurus > GetThesaurus() { return LinguMgr::GetThesaurus(); } -uno::Reference< linguistic::XDictionaryList > GetDictionaryList() +uno::Reference< XDictionaryList > GetDictionaryList() { return LinguMgr::GetDictionaryList(); } diff --git a/sw/source/core/doc/docdraw.cxx b/sw/source/core/doc/docdraw.cxx index 8de7deb68c94..fb85d76038a5 100644 --- a/sw/source/core/doc/docdraw.cxx +++ b/sw/source/core/doc/docdraw.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docdraw.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:15 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:53:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -177,6 +177,7 @@ #endif using namespace ::com::sun::star; +using namespace ::com::sun::star::linguistic2; SV_IMPL_VARARR_SORT( _ZSortFlys, _ZSortFly ) @@ -490,7 +491,7 @@ void SwDoc::InitDrawModel() pDrawModel->InsertPage( pDrawModel->AllocPage( FALSE ) ); SdrOutliner& rOutliner = pDrawModel->GetDrawOutliner(); - uno::Reference< linguistic::XSpellChecker1> xSpell = OFF_APP()->GetSpellChecker(); + uno::Reference< XSpellChecker1 > xSpell = ::GetSpellChecker(); rOutliner.SetSpeller( xSpell ); rOutliner.SetHyphenator( ::GetHyphenator() ); const SfxPoolItem& rItem = GetDefault(RES_CHRATR_LANGUAGE); diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index a1d9373eb42a..3cf4ea38dc71 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: docedt.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-25 15:31:11 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:54:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -177,6 +177,7 @@ using namespace ::com::sun::star; +using namespace ::com::sun::star::linguistic2; using namespace ::rtl; //using namespace ::utl; @@ -1610,7 +1611,7 @@ sal_Bool SwDoc::Delete( SwPaM & rPam ) uno::Reference< uno::XInterface > SwDoc::Spell( SwPaM& rPaM, - uno::Reference< linguistic::XSpellChecker1 > &xSpeller, + uno::Reference< XSpellChecker1 > &xSpeller, sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) const { SwPosition* pSttPos = rPaM.Start(), *pEndPos = rPaM.End(); @@ -1829,7 +1830,7 @@ sal_Bool lcl_HyphenateNode( const SwNodePtr& rpNd, void* pArgs ) return sal_True; } -uno::Reference< linguistic::XHyphenatedWord > SwDoc::Hyphenate( +uno::Reference< XHyphenatedWord > SwDoc::Hyphenate( SwPaM *pPam, const Point &rCrsrPos, sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) { diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 9ca6df92f994..a851ace480db 100644 --- a/sw/source/core/edit/edlingu.cxx +++ b/sw/source/core/edit/edlingu.cxx @@ -2,9 +2,9 @@ * * $RCSfile: edlingu.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-25 12:01:56 $ + * last change: $Author: tl $ $Date: 2000-10-27 11:55:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -139,7 +139,11 @@ #ifndef S2U #define S2U(rString) rtl::OUString::createFromAscii(rString) #endif + using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::linguistic2; /************************************************************************* * class SwLinguIter @@ -185,7 +189,7 @@ public: class SwSpellIter : public SwLinguIter { - uno::Reference< linguistic::XSpellChecker1 > xSpeller; + uno::Reference< XSpellChecker1 > xSpeller; public: SwSpellIter() {} @@ -514,7 +518,7 @@ uno::Reference< uno::XInterface > return 0; const sal_Bool bAuto = IsAuto(); - uno::Reference< linguistic::XHyphenatedWord > xHyphWord; + uno::Reference< XHyphenatedWord > xHyphWord; sal_uInt16 nRet; sal_Bool bGoOn = sal_False; do { @@ -907,10 +911,10 @@ void SwEditShell::HyphIgnore() *************************************************************************/ -uno::Reference< linguistic::XSpellAlternatives > +uno::Reference< XSpellAlternatives > SwEditShell::GetCorrection( const Point* pPt ) { - uno::Reference< linguistic::XSpellAlternatives > xSpellAlt; + uno::Reference< XSpellAlternatives > xSpellAlt; if( IsTableMode() ) return NULL; @@ -934,14 +938,14 @@ uno::Reference< linguistic::XSpellAlternatives > sal_Bool bSpell = sal_True; - uno::Reference< linguistic::XSpellChecker1 > xSpell( - OFF_APP()->GetSpellChecker() ); + uno::Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); if( xSpell.is() ) { LanguageType eActLang = (LanguageType)pNode->GetLang( nBegin, nLen ); if( xSpell->hasLanguage( eActLang )) - xSpellAlt = xSpell->spell( aWord, eActLang ); + xSpellAlt = xSpell->spell( aWord, eActLang, + Sequence< PropertyValue >() ); } if ( xSpellAlt.is() ) |