diff options
author | Thomas Lange <tl@openoffice.org> | 2000-10-27 11:17:04 +0000 |
---|---|---|
committer | Thomas Lange <tl@openoffice.org> | 2000-10-27 11:17:04 +0000 |
commit | 714712f2412654eda55dda3f1e6311f9b12d23c1 (patch) | |
tree | 8bdccfb4c02b05ef2a677303f2478c4e74069c3d | |
parent | 4d5740603315954a869ddc12f5b9e633f2d83c2c (diff) |
linguistic => linguistic2
-rw-r--r-- | sw/source/core/text/guess.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/text/guess.hxx | 13 | ||||
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/text/inftxt.hxx | 11 | ||||
-rw-r--r-- | sw/source/core/text/txthyph.cxx | 42 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 16 | ||||
-rw-r--r-- | sw/source/ui/app/swmodule.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/inc/hyp.hxx | 17 | ||||
-rw-r--r-- | sw/source/ui/inc/olmenu.hxx | 24 |
9 files changed, 80 insertions, 65 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index 6084d94ed6fb..1a741da6bea1 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -2,9 +2,9 @@ * * $RCSfile: guess.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: ama $ $Date: 2000-10-26 08:23:11 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:08:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,7 +95,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; -using namespace ::com::sun::star::linguistic; +using namespace ::com::sun::star::linguistic2; inline sal_Bool IsDelim( const xub_Unicode cCh ) { diff --git a/sw/source/core/text/guess.hxx b/sw/source/core/text/guess.hxx index 32a13fb09ce2..2c8bd3c2f4b2 100644 --- a/sw/source/core/text/guess.hxx +++ b/sw/source/core/text/guess.hxx @@ -2,9 +2,9 @@ * * $RCSfile: guess.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:25 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:09:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,8 +67,8 @@ #ifndef _STRING_HXX //autogen #include <tools/string.hxx> #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 #include "txttypes.hxx" @@ -78,6 +78,7 @@ class SwTxtSizeInfo; class SwTxtFormatInfo; using namespace ::com::sun::star; +using namespace ::com::sun::star::linguistic2; /************************************************************************* * class SwTxtGuess @@ -85,7 +86,7 @@ using namespace ::com::sun::star; class SwTxtGuess { - uno::Reference< linguistic::XHyphenatedWord > xHyphWord; + uno::Reference< XHyphenatedWord > xHyphWord; xub_StrLen nLeftPos; // untere Kante: Idx xub_StrLen nRightPos; // obere Kante: Idx KSHORT nLeftWidth; // untere Kante: Width @@ -107,7 +108,7 @@ public: inline xub_StrLen RightPos() const { return nRightPos; } inline KSHORT RightWidth() const { return nRightWidth; } inline KSHORT Height() const { return nHeight; } - inline uno::Reference< linguistic::XHyphenatedWord > HyphWord() const + inline uno::Reference< XHyphenatedWord > HyphWord() const { return xHyphWord; } inline xub_StrLen GetPrevEnd( const SwTxtFormatInfo &rInf, diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 8bd5e90a193b..baccad525c6f 100644 --- a/sw/source/core/text/inftxt.cxx +++ b/sw/source/core/text/inftxt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: inftxt.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: jp $ $Date: 2000-10-25 12:02:48 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:11:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -154,6 +154,8 @@ #endif using namespace ::com::sun::star; +using namespace ::com::sun::star::linguistic2; + #define C2U(cChar) rtl::OUString::createFromAscii(cChar) // steht im number.cxx @@ -834,7 +836,7 @@ sal_Bool SwTxtFormatInfo::IsHyphenate() const if( LANGUAGE_DONTKNOW == eTmp || LANGUAGE_NONE == eTmp ) return sal_False; - uno::Reference< linguistic::XHyphenator > xHyph = ::GetHyphenator(); + uno::Reference< XHyphenator > xHyph = ::GetHyphenator(); if (bInterHyph && xHyph.is()) SvxSpellWrapper::CheckHyphLang( xHyph, eTmp ); diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx index 5068a5c19a8c..ffd076bfea0a 100644 --- a/sw/source/core/text/inftxt.hxx +++ b/sw/source/core/text/inftxt.hxx @@ -2,9 +2,9 @@ * * $RCSfile: inftxt.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: ama $ $Date: 2000-10-26 07:35:39 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:10:37 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,7 +61,7 @@ #ifndef _INFTXT_HXX #define _INFTXT_HXX -#include <com/sun/star/linguistic/XHyphenatedWord.hpp> +#include <com/sun/star/linguistic2/XHyphenatedWord.hpp> #include "swtypes.hxx" #include "txttypes.hxx" @@ -589,8 +589,9 @@ public: inline sal_Bool IsRestoreHyphOptions() const { return bRestoreHyphOptions; } void RestoreHyphOptions(); // ruft HyphenateWord() des Hyphenators - ::com::sun::star::uno::Reference< ::com::sun::star::linguistic::XHyphenatedWord> - HyphWord( const String &rTxt, const USHORT nMinTrail ); + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenatedWord > + HyphWord( const String &rTxt, const USHORT nMinTrail ); sal_Bool CheckFtnPortion( SwLineLayout* pCurr ) { return IsFtnInside() && _CheckFtnPortion( pCurr ); } diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index ff14c066071e..a8f410f873a5 100644 --- a/sw/source/core/text/txthyph.cxx +++ b/sw/source/core/text/txthyph.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txthyph.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: ama $ $Date: 2000-10-26 08:25:07 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:12:13 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -117,7 +117,8 @@ extern const sal_Char *GetLangName( const MSHORT nLang ); using namespace ::rtl; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::linguistic; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::linguistic2; using namespace ::com::sun::star::text; /************************************************************************* @@ -136,7 +137,8 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord( if( xHyph.is() ) xHyphWord = xHyph->hyphenate( OUString(rTxt), pBreakIt->GetLocale( pFnt->GetLanguage() ), - rTxt.Len() - nMinTrail ); + rTxt.Len() - nMinTrail, + Sequence< PropertyValue >() ); return xHyphWord; } @@ -567,13 +569,14 @@ sal_Bool SwTxtPortion::IsHyphenate( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess ) { xub_StrLen nHyphenationPos = aTxt.Len() - nMinTrail - 1; //! subtract 1 since the UNO-interface is 0 based - Reference< XAlternativeSpelling > - xAlt = xHyph->queryAlternativeSpelling( OUString(aTxt), + Reference< XHyphenatedWord > + xHW = xHyph->queryAlternativeSpelling( OUString(aTxt), SvxCreateLocale( rInf.GetFont()->GetLanguage() ), - nHyphenationPos ); - if (xAlt.is()) + nHyphenationPos, + Sequence< PropertyValue >() ); + if (xHW.is() && xHW->isAlternativeSpelling()) { - nMinTrail -= xAlt->getHyphenPos() - nHyphenationPos; + nMinTrail -= xHW->getHyphenPos() - nHyphenationPos; } } } @@ -586,7 +589,7 @@ sal_Bool SwTxtPortion::IsHyphenate( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess ) // Die Laenge ist nicht der Index ! CONST sal_Bool bAlter = xHyphWord.is() && - xHyphWord->getAlternativeSpelling().is(); + xHyphWord->isAlternativeSpelling(); // Wenn kein Alternativwort gefunden wurde und ein SoftHyph // gerade die zweite Runde dreht, dann wollen wir uns nicht @@ -622,28 +625,29 @@ sal_Bool SwTxtPortion::IsHyphenate( SwTxtFormatInfo &rInf, SwTxtGuess &rGuess ) // check for: bAlter => xHyphWord.is() DBG_ASSERT(!bAlter || xHyphWord.is(), "NULL pointer"); - Reference< XAlternativeSpelling > xAltSpl( xHyphWord->getAlternativeSpelling() ); - DBG_ASSERT( xAltSpl.is(), "NULL pointer" ); + SvxAlternativeSpelling aAltSpell; + aAltSpell = SvxGetAltSpelling( xHyphWord ); + DBG_ASSERT( aAltSpell.bIsAltSpelling, "no alternatve spelling" ); - XubString aAlt = xAltSpl->getReplacement(); - xub_StrLen nTxtStart = xAltSpl->getChangedPos(); - xub_StrLen nTxtEnd = xAltSpl->getChangedLength() + nTxtStart; + XubString aAltTxt = aAltSpell.aReplacement; + xub_StrLen nTxtStart = aAltSpell.nChangedPos; + xub_StrLen nTxtEnd = aAltSpell.nChangedLength + nTxtStart; if( bDoSoftHyph ) - pHyphPor = new SwSoftHyphStrPortion( aAlt ); + pHyphPor = new SwSoftHyphStrPortion( aAltTxt ); else - pHyphPor = new SwHyphStrPortion( aAlt ); + pHyphPor = new SwHyphStrPortion( aAltTxt ); // pHyphPor wird auf die Laenge eingestellt, die im Original- // String ersetzt werden soll. nTxtStart = lcl_AdjSoftHyph( rInf, aOrgTxt, nTxtStart, nWordStart ); nTxtEnd = lcl_AdjSoftHyph( rInf, aOrgTxt, nTxtEnd, nWordStart ); ASSERT(nTxtEnd >= nTxtStart, "SwTxtPortion::Hyphenate: time to die."); const xub_StrLen nTmpLen = pHyphPor->GetLen(); - pHyphPor->SetLen( aAlt.Len() + 1 ); + pHyphPor->SetLen( aAltTxt.Len() + 1 ); (SwPosSize&)(*pHyphPor) = pHyphPor->GetTxtSize( rInf ); pHyphPor->SetLen( nTxtEnd - nTxtStart + nTmpLen ); nWordLen = nTxtStart; - if( !aAlt.Len() ) // Beim Wrapper Debuggen beobachtet: angebliche + if( !aAltTxt.Len() ) // Beim Wrapper Debuggen beobachtet: angebliche ++nWordLen; // Alternativtrennstelle ohne Unterschied zum // Originaltext ( Zukkerbackerei ) } diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index a7bae41da93c..c4874cae149f 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: txtedt.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: jp $ $Date: 2000-10-25 15:33:17 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:13:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -158,6 +158,9 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::text; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::uno; +using namespace ::com::sun::star::linguistic2; #define C2U(cChar) rtl::OUString::createFromAscii(cChar) @@ -577,7 +580,7 @@ USHORT SwTxtNode::Spell(SwSpellArgs* pArgs) BOOL bCheck = FALSE; BOOL bNoLang = FALSE; - uno::Reference<beans::XPropertySet> xProp( GetLinguPropertySet() ); + Reference<beans::XPropertySet> xProp( GetLinguPropertySet() ); BOOL bReverse = xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( C2U(UPN_IS_WRAP_REVERSE) ).getValue() : FALSE; @@ -635,7 +638,8 @@ USHORT SwTxtNode::Spell(SwSpellArgs* pArgs) if (pArgs->xSpeller.is()) { SvxSpellWrapper::CheckSpellLang( pArgs->xSpeller, eActLang ); - pArgs->xSpellAlt = pArgs->xSpeller->spell( rWord, eActLang ); + pArgs->xSpellAlt = pArgs->xSpeller->spell( rWord, eActLang, + Sequence< PropertyValue >() ); } if( (pArgs->xSpellAlt).is() ) { @@ -710,7 +714,7 @@ SwRect SwTxtFrm::_AutoSpell( SwCntntNode* pActNode, xub_StrLen nActPos ) nInsertPos = 0; } - uno::Reference<linguistic::XSpellChecker1> xSpell( GetSpellChecker() ); + Reference< XSpellChecker1 > xSpell( ::GetSpellChecker() ); BOOL bFresh = nBegin < nEnd; BOOL bACWDirty = FALSE; @@ -737,7 +741,7 @@ SwRect SwTxtFrm::_AutoSpell( SwCntntNode* pActNode, xub_StrLen nActPos ) // check for: bAlter => xHyphWord.is() DBG_ASSERT(!bSpell || xSpell.is(), "NULL pointer"); - if( !xSpell->isValid( rWord, eActLang ) ) + if( !xSpell->isValid( rWord, eActLang, Sequence< PropertyValue >() ) ) { bACWDirty = TRUE; if( !pNode->GetWrong() ) diff --git a/sw/source/ui/app/swmodule.cxx b/sw/source/ui/app/swmodule.cxx index 9d01a943b5e8..5f5854799832 100644 --- a/sw/source/ui/app/swmodule.cxx +++ b/sw/source/ui/app/swmodule.cxx @@ -2,9 +2,9 @@ * * $RCSfile: swmodule.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: tbe $ $Date: 2000-10-23 10:05:22 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:15:08 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -298,7 +298,9 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::scanner; using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::linguistic2; using namespace ::rtl; + #define C2S(cChar) String::CreateFromAscii(cChar) TYPEINIT1( SwModuleDummy, SfxModule ); @@ -357,7 +359,7 @@ SwModule::SwModule( SvFactory* pFact, } StartListening( *pOffApp ); - xDicListEvtListener = uno::Reference< linguistic::XDictionaryListEventListener > ( + xDicListEvtListener = uno::Reference< XDictionaryListEventListener > ( new SwDicListEvtListener( ::GetDictionaryList() ) ); Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() ); diff --git a/sw/source/ui/inc/hyp.hxx b/sw/source/ui/inc/hyp.hxx index 0f6f0253dc20..dae32d27a099 100644 --- a/sw/source/ui/inc/hyp.hxx +++ b/sw/source/ui/inc/hyp.hxx @@ -2,9 +2,9 @@ * * $RCSfile: hyp.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:40 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:16:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,8 +68,8 @@ #ifndef _SVX_SPLWRAP_HXX //autogen #include <svx/splwrap.hxx> #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 class SwView; @@ -78,7 +78,7 @@ class SwHyphWrapper : public SvxSpellWrapper { private: SwView* pView; ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XHyphenator > xHyph; + ::com::sun::star::linguistic2::XHyphenator > xHyph; Link aOldLnk; sal_uInt32 nLangError; // nicht vorhandene Sprache sal_uInt16 nPageCount; // Seitenanzahl fuer Progressanzeige @@ -89,9 +89,10 @@ private: DECL_LINK( SpellError, void * ); public: - SwHyphWrapper( SwView* pVw, ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XHyphenator > &rxHyph, - sal_Bool bStart, sal_Bool bOther, sal_Bool bSelect ); + SwHyphWrapper( SwView* pVw, + ::com::sun::star::uno::Reference< + ::com::sun::star::linguistic2::XHyphenator > &rxHyph, + sal_Bool bStart, sal_Bool bOther, sal_Bool bSelect ); ~SwHyphWrapper(); protected: diff --git a/sw/source/ui/inc/olmenu.hxx b/sw/source/ui/inc/olmenu.hxx index 5c5f66d4dfc0..a7db5e0ffbaa 100644 --- a/sw/source/ui/inc/olmenu.hxx +++ b/sw/source/ui/inc/olmenu.hxx @@ -2,9 +2,9 @@ * * $RCSfile: olmenu.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:41 $ + * last change: $Author: tl $ $Date: 2000-10-27 12:17:04 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,14 +61,14 @@ #ifndef _OLMENU_HXX #define _OLMENU_HXX -#ifndef _COM_SUN_STAR_LINGUISTIC_XDICTIONARY_HPP_ -#include <com/sun/star/linguistic/XDictionary.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XDICTIONARY_HPP_ +#include <com/sun/star/linguistic2/XDictionary.hpp> #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 -#ifndef _COM_SUN_STAR_LINGUISTIC_XOTHERLINGU_HPP_ -#include <com/sun/star/linguistic/XOtherLingu.hpp> +#ifndef _COM_SUN_STAR_LINGUISTIC2_XOTHERLINGU_HPP_ +#include <com/sun/star/linguistic2/XOtherLingu.hpp> #endif #ifndef _MENU_HXX //autogen @@ -82,17 +82,17 @@ class SwSpellPopup : public PopupMenu { SwWrtShell* pSh; ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XDictionary > > aDics; + ::com::sun::star::linguistic2::XDictionary > > aDics; ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XSpellAlternatives > xSpellAlt; + ::com::sun::star::linguistic2::XSpellAlternatives > xSpellAlt; ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XOtherLingu> xOther; + ::com::sun::star::linguistic2::XOtherLingu> xOther; LanguageType nCorrLang; public: SwSpellPopup( SwWrtShell*, const ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XSpellAlternatives > &xAlt ); + ::com::sun::star::linguistic2::XSpellAlternatives > &xAlt ); sal_uInt16 Execute( Window* pWin, const Point& rPopupPos ); }; |