diff options
author | jp <jp@openoffice.org> | 2000-10-25 11:07:02 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2000-10-25 11:07:02 +0000 |
commit | bcabeabe9e0e5f4049be6dd130af03b739c86e1b (patch) | |
tree | 887b60b117ebeec15997ddf1bcb1d9ad86938617 /sw | |
parent | d0728bff890cb2de8ebaf2b701734809859c1555 (diff) |
Spellchecker/Hyphenator are not longer member of the shells
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/crsr/crsrsh.cxx | 21 | ||||
-rw-r--r-- | sw/source/core/edit/edlingu.cxx | 30 | ||||
-rw-r--r-- | sw/source/core/edit/edws.cxx | 18 | ||||
-rw-r--r-- | sw/source/core/frmedt/fews.cxx | 24 | ||||
-rw-r--r-- | sw/source/core/text/guess.cxx | 48 | ||||
-rw-r--r-- | sw/source/core/text/inftxt.cxx | 10 | ||||
-rw-r--r-- | sw/source/core/text/txthyph.cxx | 9 | ||||
-rw-r--r-- | sw/source/core/view/viewpg.cxx | 72 | ||||
-rw-r--r-- | sw/source/core/view/vnew.cxx | 63 | ||||
-rw-r--r-- | sw/source/core/view/vprint.cxx | 27 | ||||
-rw-r--r-- | sw/source/filter/basflt/shellio.cxx | 10 | ||||
-rw-r--r-- | sw/source/ui/inc/view.hxx | 11 | ||||
-rw-r--r-- | sw/source/ui/inc/wrtsh.hxx | 21 | ||||
-rw-r--r-- | sw/source/ui/index/idxmrk.cxx | 11 | ||||
-rw-r--r-- | sw/source/ui/uiview/pview.cxx | 17 | ||||
-rw-r--r-- | sw/source/ui/uiview/view.cxx | 41 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/makefile.mk | 7 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/wrtsh1.cxx | 23 |
18 files changed, 218 insertions, 245 deletions
diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index b7452ccc7411..2462a1ec8038 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -2,9 +2,9 @@ * * $RCSfile: crsrsh.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:17 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:01:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -146,7 +146,6 @@ #include <fmteiro.hxx> #endif -using namespace ::com::sun::star; TYPEINIT2(SwCrsrShell,ViewShell,SwModify); @@ -2236,13 +2235,13 @@ void SwCrsrShell::ParkCrsr( const SwNodeIndex &rIdx ) * Alle Ansichten eines Dokumentes stehen im Ring der Shells. */ -SwCrsrShell::SwCrsrShell( SwCrsrShell * pShell, Window *pWin ) - : ViewShell( pShell, pWin ), +SwCrsrShell::SwCrsrShell( SwCrsrShell& rShell, Window *pWin ) + : ViewShell( rShell, pWin ), SwModify( 0 ) { SET_CURR_SHELL( this ); // Nur die Position vom aktuellen Cursor aus der Copy-Shell uebernehmen - pCurCrsr = new SwShellCrsr( *this, *(pShell->pCurCrsr->GetPoint()) ); + pCurCrsr = new SwShellCrsr( *this, *(rShell.pCurCrsr->GetPoint()) ); pCurCrsr->GetCntntNode()->Add( this ); pCrsrStk = 0; pTblCrsr = 0; @@ -2270,11 +2269,9 @@ SwCrsrShell::SwCrsrShell( SwCrsrShell * pShell, Window *pWin ) * der normale Constructor */ -SwCrsrShell::SwCrsrShell( SwDoc *pDoc, - uno::Reference< linguistic::XSpellChecker1> xSpell, - uno::Reference< linguistic::XHyphenator> xHyph, - Window *pWin, SwRootFrm *pRoot, const SwViewOption *pOpt ) - : ViewShell( pDoc, xSpell, xHyph, pWin, pOpt ), +SwCrsrShell::SwCrsrShell( SwDoc& rDoc, Window *pWin, SwRootFrm *pRoot, + const SwViewOption *pOpt ) + : ViewShell( rDoc, pWin, pOpt ), SwModify( 0 ) { SET_CURR_SHELL( this ); @@ -2282,7 +2279,7 @@ SwCrsrShell::SwCrsrShell( SwDoc *pDoc, * Erzeugen des initialen Cursors, wird auf die erste * Inhaltsposition gesetzt */ - SwNodes& rNds = pDoc->GetNodes(); + SwNodes& rNds = rDoc.GetNodes(); SwNodeIndex aNodeIdx( *rNds.GetEndOfContent().StartOfSectionNode() ); SwCntntNode* pCNd = rNds.GoNext( &aNodeIdx ); // gehe zum 1. ContentNode diff --git a/sw/source/core/edit/edlingu.cxx b/sw/source/core/edit/edlingu.cxx index 7a0b0610a84d..9ca6df92f994 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.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:18 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:01:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -347,12 +347,15 @@ void SwSpellIter::Start( SwEditShell *pShell, SwDocPositions eStart, { if( GetSh() ) return; + uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); - sal_Bool bIsWrapReverse = xProp.is() ? - *(sal_Bool*)xProp->getPropertyValue( S2U(UPN_IS_WRAP_REVERSE) ).getValue() : sal_False; + sal_Bool bIsWrapReverse = xProp.is() + ? *(sal_Bool*)xProp->getPropertyValue( + S2U(UPN_IS_WRAP_REVERSE) ).getValue() + : sal_False; - xSpeller = pShell->GetSpellChecker(); - if (xSpeller.is()) + xSpeller = ::GetSpellChecker(); + if ( xSpeller.is() ) _Start( pShell, eStart, eEnd, bIsWrapReverse ); } @@ -366,7 +369,7 @@ void SwSpellIter::Start( SwEditShell *pShell, SwDocPositions eStart, uno::Reference< uno::XInterface > SwSpellIter::Continue( sal_uInt16* pPageCnt, sal_uInt16* pPageSt ) { - uno::Reference< uno::XInterface > xSpellRet; + uno::Reference< uno::XInterface > xSpellRet; SwEditShell *pSh = GetSh(); if( !pSh ) return xSpellRet; @@ -376,12 +379,12 @@ uno::Reference< uno::XInterface > ASSERT( GetEnd(), "SwEditShell::SpellContinue() ohne Start?"); sal_Bool bGoOn = sal_True; - do - { + do { SwPaM *pCrsr = pSh->GetCrsr(); if ( !pCrsr->HasMark() ) pCrsr->SetMark(); - uno::Reference< beans::XPropertySet > xProp( GetLinguPropertySet() ); + + uno::Reference< beans::XPropertySet > xProp( GetLinguPropertySet() ); sal_Bool bRev = xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( S2U(UPN_IS_WRAP_REVERSE) ).getValue() : sal_False; if( bRev ) @@ -442,9 +445,10 @@ uno::Reference< uno::XInterface > sal_Bool SwHyphIter::IsAuto() { - uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); - return xProp.is() ? - *(sal_Bool*)xProp->getPropertyValue( S2U(UPN_IS_HYPH_AUTO) ).getValue() : sal_False; + uno::Reference< beans::XPropertySet > xProp( ::GetLinguPropertySet() ); + return xProp.is() ? *(sal_Bool*)xProp->getPropertyValue( + S2U(UPN_IS_HYPH_AUTO) ).getValue() + : sal_False; } diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 6fbf40af8911..a6429eb9c0da 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -2,9 +2,9 @@ * * $RCSfile: edws.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:18 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:01:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -95,27 +95,23 @@ #include <swundo.hxx> #endif -using namespace ::com::sun::star; - /******************************************************** * Ctor/Dtor ********************************************************/ // verkleideter Copy-Constructor -SwEditShell::SwEditShell( SwEditShell *pEdSH, Window *pWin ) - : SwCrsrShell( pEdSH, pWin ) +SwEditShell::SwEditShell( SwEditShell& rEdSH, Window *pWin ) + : SwCrsrShell( rEdSH, pWin ) { } // ctor/dtor -SwEditShell::SwEditShell(SwDoc *pDoc, - uno::Reference< linguistic::XSpellChecker1 > xSpell, - uno::Reference< linguistic::XHyphenator > xHyph, - Window *pWin, SwRootFrm *pRootFrm, const SwViewOption *pOpt ) - : SwCrsrShell(pDoc, xSpell, xHyph, pWin, pRootFrm, pOpt) +SwEditShell::SwEditShell( SwDoc& rDoc, Window *pWin, SwRootFrm *pRootFrm, + const SwViewOption *pOpt ) + : SwCrsrShell( rDoc, pWin, pRootFrm, pOpt) { GetDoc()->DoUndo(); } diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx index e0aab41951df..8e498f08c1cf 100644 --- a/sw/source/core/frmedt/fews.cxx +++ b/sw/source/core/frmedt/fews.cxx @@ -2,9 +2,9 @@ * * $RCSfile: fews.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:20 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:02:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -145,7 +145,6 @@ #include <fmtanchr.hxx> #endif -using namespace ::com::sun::star; TYPEINIT1(SwFEShell,SwEditShell) /*********************************************************************** @@ -810,21 +809,16 @@ USHORT SwFEShell::GetCurOutColNum( SwGetCurColNumPara* pPara ) const return nRet; } -SwFEShell::SwFEShell( SwDoc *pDoc, - uno::Reference<linguistic::XSpellChecker1> &xSpell, - uno::Reference<linguistic::XHyphenator> &xHyph, - Window *pWin, - SwRootFrm *pMaster, const SwViewOption *pOpt ) - : SwEditShell( pDoc, xSpell, xHyph, pWin, pMaster, pOpt ), - pChainFrom( 0 ), - pChainTo( 0 ) +SwFEShell::SwFEShell( SwDoc& rDoc, Window *pWin, + SwRootFrm *pMaster, const SwViewOption *pOpt ) + : SwEditShell( rDoc, pWin, pMaster, pOpt ), + pChainFrom( 0 ), pChainTo( 0 ) { } -SwFEShell::SwFEShell( SwEditShell *pShell, Window *pWin ) - : SwEditShell( pShell, pWin ), - pChainFrom( 0 ), - pChainTo( 0 ) +SwFEShell::SwFEShell( SwEditShell& rShell, Window *pWin ) + : SwEditShell( rShell, pWin ), + pChainFrom( 0 ), pChainTo( 0 ) { } diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index 83f3420666ec..950622824141 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.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:25 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:02:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -67,24 +67,32 @@ #include <ctype.h> -#include "errhdl.hxx" // ASSERTs -#include "segmentc.hxx" - -#include "txtcfg.hxx" -#include "guess.hxx" -#include "inftxt.hxx" // SwTxtSizeInfo, SwTxtFormatInfo -#include "swfont.hxx" -#include "breakit.hxx" -#include "viewsh.hxx" +#ifndef _ERRHDL_HXX +#include <errhdl.hxx> // ASSERTs +#endif +#ifndef _TXTCFG_HXX +#include <txtcfg.hxx> +#endif +#ifndef _GUESS_HXX +#include <guess.hxx> +#endif +#ifndef _INFTXT_HXX +#include <inftxt.hxx> // SwTxtSizeInfo, SwTxtFormatInfo +#endif +#ifndef _SWFONT_HXX +#include <swfont.hxx> +#endif +#ifndef _BREAKIT_HXX +#include <breakit.hxx> +#endif +#ifndef _VIEWSH_HXX +#include <viewsh.hxx> +#endif #ifndef _COM_SUN_STAR_TEXT_BREAKTYPE_HPP_ #include <com/sun/star/text/BreakType.hpp> #endif -#ifndef _WORDSEL_HXX //autogen -#include <svtools/wordsel.hxx> -#endif - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::text; using namespace ::com::sun::star::linguistic; @@ -410,8 +418,7 @@ sal_Bool SwTxtGuess::Guess( const SwTxtFormatInfo &rInf, const KSHORT nPorHeight Reference< XHyphenator > xHyph; if( bHyph ) { - xHyph = rInf.GetVsh() ? rInf.GetVsh()->GetHyphenator() - : ::GetHyphenator(); + xHyph = ::GetHyphenator(); aHyphOpt = LineBreakHyphenationOptions( xHyph, nHyphPos ); } LineBreakResults aResult = pBreakIt->xBreak->getLineBreak( rInf.GetTxt(), @@ -432,9 +439,10 @@ sal_Bool SwTxtGuess::Guess( const SwTxtFormatInfo &rInf, const KSHORT nPorHeight static BOOL bTest = FALSE; if( bTest && bHyph && nHyphPos ) { - WordSelection::ResetWordDelimiter(); - xub_StrLen nWrdStart = WordSelection::GoStartWord( rInf.GetTxt(), nHyphPos ); - xub_StrLen nLen = WordSelection::GoEndWord( rInf.GetTxt(), nWrdStart ) - nWrdStart; +//JP 25.10.00: "WordSelection" class is removed - use the breakiterator +// WordSelection::ResetWordDelimiter(); +// xub_StrLen nWrdStart = WordSelection::GoStartWord( rInf.GetTxt(), nHyphPos ); +// xub_StrLen nLen = WordSelection::GoEndWord( rInf.GetTxt(), nWrdStart ) - nWrdStart; if( nLen ) { diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx index 638ac2e60bf3..8bd5e90a193b 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.4 $ + * $Revision: 1.5 $ * - * last change: $Author: ama $ $Date: 2000-10-16 13:17:59 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:02:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,9 +82,6 @@ #ifndef _SVX_SPLWRAP_HXX #include <svx/splwrap.hxx> #endif -#ifndef _OFF_APP_HXX -#include <offmgr/app.hxx> -#endif #ifndef _LINGU_LNGPROPS_HHX_ #include <lingu/lngprops.hxx> #endif @@ -836,9 +833,8 @@ sal_Bool SwTxtFormatInfo::IsHyphenate() const LanguageType eTmp = GetFont()->GetLanguage(); if( LANGUAGE_DONTKNOW == eTmp || LANGUAGE_NONE == eTmp ) return sal_False; - uno::Reference< linguistic::XHyphenator > xHyph = GetVsh() ? GetVsh()->GetHyphenator() : - OFF_APP()->GetHyphenator(); + uno::Reference< linguistic::XHyphenator > xHyph = ::GetHyphenator(); if (bInterHyph && xHyph.is()) SvxSpellWrapper::CheckHyphLang( xHyph, eTmp ); diff --git a/sw/source/core/text/txthyph.cxx b/sw/source/core/text/txthyph.cxx index 84c7e914eb6d..f45cbc84e5ed 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.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:26 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:02:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -129,9 +129,8 @@ Reference< XHyphenatedWord > SwTxtFormatInfo::HyphWord( if( rTxt.Len() < 4 || pFnt->IsSymbol(pVsh) ) return 0; ASSERT( IsHyphenate(), "SwTxtFormatter::HyphWord: why?" ); - Reference< XHyphenator > xHyph = GetVsh() ? GetVsh()->GetHyphenator() : - ::GetHyphenator(); - Reference< XHyphenatedWord > xHyphWord; + Reference< XHyphenator > xHyph = ::GetHyphenator(); + Reference< XHyphenatedWord > xHyphWord; if( xHyph.is() ) xHyphWord = xHyph->hyphenate( OUString(rTxt), diff --git a/sw/source/core/view/viewpg.cxx b/sw/source/core/view/viewpg.cxx index 97eacea36020..92d27024376a 100644 --- a/sw/source/core/view/viewpg.cxx +++ b/sw/source/core/view/viewpg.cxx @@ -2,9 +2,9 @@ * * $RCSfile: viewpg.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:29 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:03:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,8 +65,9 @@ #pragma hdrstop -#include "hintids.hxx" - +#ifndef _HINTIDS_HXX +#include <hintids.hxx> +#endif #ifndef _SV_WINDOW_HXX //autogen #include <vcl/window.hxx> @@ -81,21 +82,49 @@ #ifndef _PVPRTDAT_HXX #include <pvprtdat.hxx> #endif +#ifndef _DOC_HXX +#include <doc.hxx> +#endif +#ifndef _VIEWSH_HXX +#include <viewsh.hxx> +#endif +#ifndef _PAGEFRM_HXX +#include <pagefrm.hxx> +#endif +#ifndef _ROOTFRM_HXX +#include <rootfrm.hxx> +#endif +#ifndef _VIEWIMP_HXX +#include <viewimp.hxx> +#endif +#ifndef _VIEWOPT_HXX +#include <viewopt.hxx> +#endif +#ifndef _SWPRTOPT_HXX +#include <swprtopt.hxx> // SwPrtOptions +#endif +#ifndef _FLDBAS_HXX +#include <fldbas.hxx> +#endif +#ifndef _PTQUEUE_HXX +#include <ptqueue.hxx> +#endif +#ifndef _SWREGION_HXX +#include <swregion.hxx> +#endif +#ifndef _HINTS_HXX +#include <hints.hxx> +#endif +#ifndef _FNTCACHE_HXX +#include <fntcache.hxx> +#endif -#include "doc.hxx" -#include "viewsh.hxx" -#include "pagefrm.hxx" -#include "rootfrm.hxx" -#include "viewimp.hxx" -#include "viewopt.hxx" -#include "swprtopt.hxx" // SwPrtOptions -#include "statstr.hrc" // Text fuer SfxProgress -#include "fldbas.hxx" -#include "ptqueue.hxx" -#include "swregion.hxx" -#include "hints.hxx" -#include "fntcache.hxx" -#include "comcore.hrc" +#ifndef _STATSTR_HRC +#include <statstr.hrc> // Text fuer SfxProgress +#endif +#ifndef _COMCORE_HRC +#include <comcore.hrc> +#endif const SwTwips nXFree = 142; // == 0.25 cm const SwTwips nYFree = 142; @@ -544,7 +573,7 @@ void ViewShell::PrintPreViewPage( SwPrtOptions& rOptions, "MinSeite groesser MaxSeite." ); // eine neue Shell fuer den Printer erzeugen - ViewShell aShell( this, 0 ); + ViewShell aShell( *this, 0 ); aShell.pRef = new SfxPrinter( *pPrt ); @@ -895,7 +924,7 @@ void ViewShell::PrintProspect( SwPrtOptions& rOptions, "MinSeite groesser MaxSeite." ); // eine neue Shell fuer den Printer erzeugen - ViewShell aShell( this, 0 ); + ViewShell aShell( *this, 0 ); aShell.pRef = new SfxPrinter( *pPrt ); SET_CURR_SHELL( &aShell ); @@ -1242,6 +1271,9 @@ Size ViewShell::GetPagePreViewPrtMaxSize() const /************************************************************************* $Log: not supported by cvs2svn $ + Revision 1.1.1.1 2000/09/19 00:08:29 hr + initial import + Revision 1.74 2000/09/18 16:04:37 willem.vandorp OpenOffice header added. diff --git a/sw/source/core/view/vnew.cxx b/sw/source/core/view/vnew.cxx index b4d806a92c4b..7286c2a03fc6 100644 --- a/sw/source/core/view/vnew.cxx +++ b/sw/source/core/view/vnew.cxx @@ -2,9 +2,9 @@ * * $RCSfile: vnew.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-09-28 11:30:29 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:03:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -116,32 +116,6 @@ #include <ndindex.hxx> #endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XSPELLALTERNATIVES_HXX_ -//#include <smart/com/sun/star/linguistic/XSpellAlternatives.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_SPELLFAILURE_HXX_ -//#include <smart/com/sun/star/linguistic/SpellFailure.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HXX_ -//#include <smart/com/sun/star/linguistic/XSpellChecker1.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XALTERNATIVESPELLING_HXX_ -//#include <smart/com/sun/star/linguistic/XAlternativeSpelling.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XPOSSIBLEHYPHENSSUPPLIER_HXX_ -//#include <smart/com/sun/star/linguistic/XPossibleHyphensSupplier.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HXX_ -//#include <smart/com/sun/star/linguistic/XHyphenator.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XPOSSIBLEHYPHENS_HXX_ -//#include <smart/com/sun/star/linguistic/XPossibleHyphens.hxx> -//#endif -//#ifndef _SMART_COM_SUN_STAR_LINGUISTIC_XHYPHENATEDWORD_HXX_ -//#include <smart/com/sun/star/linguistic/XHyphenatedWord.hxx> -//#endif - -using namespace ::com::sun::star; /************************************************************************* |* |* ViewShell::Init() @@ -218,19 +192,15 @@ void ViewShell::Init( const SwViewOption *pNewOpt ) |* |*************************************************************************/ -ViewShell::ViewShell( SwDoc *pDocument, - uno::Reference< linguistic::XSpellChecker1> xSpell, - uno::Reference< linguistic::XHyphenator> xHyph, - Window *pWindow, const SwViewOption *pNewOpt, - OutputDevice *pOutput, long nFlags ) : - pDoc( pDocument ), - xSpell( xSpell ), - xHyph ( xHyph ), +ViewShell::ViewShell( SwDoc& rDocument, Window *pWindow, + const SwViewOption *pNewOpt, OutputDevice *pOutput, + long nFlags ) + : pDoc( &rDocument ), pOpt( 0 ), pWin( pWindow ), pOut( pOutput ? pOutput : pWindow ? (OutputDevice*)pWindow - : (OutputDevice*)pDocument->GetPrt(TRUE)), + : (OutputDevice*)rDocument.GetPrt(TRUE)), pRef( 0 ), nStartAction( 0 ), nLockPaint( 0 ), @@ -272,23 +242,21 @@ ViewShell::ViewShell( SwDoc *pDocument, |* |*************************************************************************/ -ViewShell::ViewShell( ViewShell *pShell, Window *pWindow, - OutputDevice *pOutput, long nFlags ) : - Ring( pShell ), - pDoc( pShell->GetDoc() ), +ViewShell::ViewShell( ViewShell& rShell, Window *pWindow, + OutputDevice *pOutput, long nFlags ) : + Ring( &rShell ), + pDoc( rShell.GetDoc() ), pWin( pWindow ), pOut( pOutput ? pOutput : pWindow ? (OutputDevice*)pWindow - : (OutputDevice*)pShell->GetDoc()->GetPrt(TRUE)), + : (OutputDevice*)rShell.GetDoc()->GetPrt(TRUE)), pRef( 0 ), - xSpell( pShell->GetSpellChecker() ), - xHyph( pShell->GetHyphenator() ), pOpt( 0 ), nStartAction( 0 ), nLockPaint( 0 ), pSfxViewShell( 0 ), pImp( new SwViewImp( this ) ), - aBrowseBorder( pShell->GetBrowseBorder() ) + aBrowseBorder( rShell.GetBrowseBorder() ) { bPaintWorks = bEnableSmooth = TRUE; bPaintInProgress = bViewLocked = bInEndAction = bFrameView = @@ -301,7 +269,7 @@ ViewShell::ViewShell( ViewShell *pShell, Window *pWindow, BOOL bModified = pDoc->IsModified(); pOutput = pOut; - Init( pShell->GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt()) + Init( rShell.GetViewOptions() ); //verstellt ggf. das Outdev (InitPrt()) pOut = pOutput; ((SwHiddenTxtFieldType*)pDoc->GetSysFldType( RES_HIDDENTXTFLD ))-> @@ -416,6 +384,9 @@ SdrView* ViewShell::GetDrawViewWithValidMarkList() /************************************************************************ $Log: not supported by cvs2svn $ + Revision 1.2 2000/09/28 11:30:29 jp + remove old code of using no graphicobject + Revision 1.1.1.1 2000/09/19 00:08:29 hr initial import diff --git a/sw/source/core/view/vprint.cxx b/sw/source/core/view/vprint.cxx index 63ca98217796..15a32b516495 100644 --- a/sw/source/core/view/vprint.cxx +++ b/sw/source/core/view/vprint.cxx @@ -2,9 +2,9 @@ * * $RCSfile: vprint.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-19 00:08:29 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:03:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -964,14 +964,13 @@ BOOL ViewShell::Prt( SwPrtOptions& rOptions, SfxProgress& rProgress ) } // eine ViewShell darauf - pShell = new ViewShell( pPrtDoc, ::GetSpellChecker(), ::GetHyphenator(), - 0, pOpt ); + pShell = new ViewShell( *pPrtDoc, 0, pOpt ); pPrtDoc->SetRefForDocShell( 0 ); } else { pPrtDoc = GetDoc(); - pShell = new ViewShell( this, 0 ); + pShell = new ViewShell( *this, 0 ); } { //Zusaetzlicher Scope, damit die CurrShell vor dem zerstoeren der @@ -1140,10 +1139,8 @@ BOOL ViewShell::Prt( SwPrtOptions& rOptions, SfxProgress& rProgress ) lcl_GetPostIts( pDoc, aPostItFields ); pPostItDoc = new SwDoc; pPostItDoc->SetPrt( pPrt ); - pPostItShell = new ViewShell( pPostItDoc, - pShell->GetSpellChecker(), - pShell->GetHyphenator(), - 0, pShell->GetViewOptions() ); + pPostItShell = new ViewShell( *pPostItDoc, 0, + pShell->GetViewOptions() ); // Wenn PostIts am Dokumentenende gedruckt werden sollen, // die Druckreihenfolge allerdings umgekehrt ist, dann hier if ( ( rOptions.nPrintPostIts == POSTITS_ENDDOC ) && @@ -1428,13 +1425,10 @@ void ViewShell::PrtOle2( SwDoc *pDoc, const SwViewOption *pOpt, //eine, dann legen wir uns eine neue Sicht an, oder das Doc hat noch //keine, dann erzeugen wir die erste Sicht. ViewShell *pSh; - if ( pDoc->GetRootFrm() && pDoc->GetRootFrm()->GetCurrShell() ) - pSh = new ViewShell( pDoc->GetRootFrm()->GetCurrShell(), 0, pOleOut ); + if( pDoc->GetRootFrm() && pDoc->GetRootFrm()->GetCurrShell() ) + pSh = new ViewShell( *pDoc->GetRootFrm()->GetCurrShell(), 0, pOleOut ); else - { - pSh = new ViewShell( pDoc, ::GetSpellChecker(), ::GetHyphenator(), - 0, pOpt, pOleOut ); - } + pSh = new ViewShell( *pDoc, 0, pOpt, pOleOut ); { SET_CURR_SHELL( pSh ); @@ -1561,6 +1555,9 @@ void ViewShell::PrepareForPrint( const SwPrtOptions &rOptions ) /************************************************************************ $Log: not supported by cvs2svn $ + Revision 1.1.1.1 2000/09/19 00:08:29 hr + initial import + Revision 1.193 2000/09/18 16:04:38 willem.vandorp OpenOffice header added. diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx index 5f34a5503f25..fdb6a2c9480f 100644 --- a/sw/source/filter/basflt/shellio.cxx +++ b/sw/source/filter/basflt/shellio.cxx @@ -2,9 +2,9 @@ * * $RCSfile: shellio.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-09-27 09:46:57 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:04:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -443,8 +443,7 @@ ULONG SwReader::Read( const Reader& rOptions ) ViewShell* pVSh = 0; if( pDoc->GetRootFrm() && !pDoc->GetEditShell( &pVSh ) && !pVSh ) { - ViewShell aVSh( pDoc, ::GetSpellChecker(), ::GetHyphenator(), - 0, 0 ); + ViewShell aVSh( *pDoc, 0, 0 ); SET_CURR_SHELL( &aVSh ); pDoc->GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL, TRUE, FALSE ); @@ -1097,6 +1096,9 @@ BOOL SetHTMLTemplate( SwDoc & rDoc ) /************************************************************************* $Log: not supported by cvs2svn $ + Revision 1.2 2000/09/27 09:46:57 jp + use the new FileStatHelper class + Revision 1.1.1.1 2000/09/19 10:59:15 hr initial import diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx index 1010868b600f..db7d9e98b1e2 100644 --- a/sw/source/ui/inc/view.hxx +++ b/sw/source/ui/inc/view.hxx @@ -2,9 +2,9 @@ * * $RCSfile: view.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-05 12:18:57 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:04:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -413,11 +413,10 @@ public: com::sun::star::view::XSelectionSupplier* GetUNOObject(); - String GetSelectionTextParam( BOOL bCompleteWords, - BOOL bEraseTrail, - BOOL bExtendedDelimiter = FALSE ); + String GetSelectionTextParam( BOOL bCompleteWords, + BOOL bEraseTrail ); virtual BOOL HasSelection( BOOL bText ) const; - virtual String GetSelectionText( BOOL bCompleteWords ); + virtual String GetSelectionText( BOOL bCompleteWords = FALSE ); virtual USHORT PrepareClose( BOOL bUI = TRUE, BOOL bForBrowsing = FALSE ); virtual void MarginChanged(); diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx index 410a6a8ef14f..8e63d7f15bc4 100644 --- a/sw/source/ui/inc/wrtsh.hxx +++ b/sw/source/ui/inc/wrtsh.hxx @@ -2,9 +2,9 @@ * * $RCSfile: wrtsh.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 17:14:43 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:04:43 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -96,12 +96,6 @@ struct SwCallMouseEvent; class DropEvent; struct ChartSelectionInfo; -#ifndef _COM_SUN_STAR_LINGUISTIC_XSPELLCHECKER1_HPP_ -#include <com/sun/star/linguistic/XSpellChecker1.hpp> -#endif -#ifndef _COM_SUN_STAR_LINGUISTIC_XHYPHENATOR_HPP_ -#include <com/sun/star/linguistic/XHyphenator.hpp> -#endif class SwWrtShell: public SwFEShell { @@ -436,15 +430,10 @@ typedef FASTBOOL (SwWrtShell:: *FNSimpleMove)(); //ctoren, der erstere ist eine Art kontrollierter copy ctor fuer weitere //Sichten auf ein Dokument - SwWrtShell( SwWrtShell *, Window *pWin, SwView &rShell); - SwWrtShell( SwDoc *pDoc, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XSpellChecker1 >&, - ::com::sun::star::uno::Reference< - ::com::sun::star::linguistic::XHyphenator >&, - Window *pWin, SwView &rShell, + SwWrtShell( SwWrtShell&, Window *pWin, SwView &rShell); + SwWrtShell( SwDoc& rDoc, Window *pWin, SwView &rShell, SwRootFrm* pMaster = 0, const SwViewOption *pViewOpt = 0); - ~SwWrtShell(); + virtual ~SwWrtShell(); private: diff --git a/sw/source/ui/index/idxmrk.cxx b/sw/source/ui/index/idxmrk.cxx index ef4bdb577aaa..b337e2910936 100644 --- a/sw/source/ui/index/idxmrk.cxx +++ b/sw/source/ui/index/idxmrk.cxx @@ -2,9 +2,9 @@ * * $RCSfile: idxmrk.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2000-10-20 14:18:04 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:07:02 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -348,7 +348,7 @@ void SwIndexMarkDlg::InitControls() if (nCnt < 2) { bSelected = !pSh->HasSelection(); - aOrgStr = pSh->GetView().GetSelectionTextParam(sal_True, sal_False, sal_True); + aOrgStr = pSh->GetView().GetSelectionTextParam(sal_True, sal_False); aEntryED.SetText(aOrgStr); //alle gleichen Eintraege aufzunehmen darf nur im Body und auch da nur @@ -384,7 +384,7 @@ void SwIndexMarkDlg::Activate() if (nCnt < 2) { bSelected = !pSh->HasSelection(); - aOrgStr = pSh->GetView().GetSelectionTextParam(sal_True, sal_False, sal_True); + aOrgStr = pSh->GetView().GetSelectionTextParam(sal_True, sal_False); aEntryED.SetText(aOrgStr); //alle gleichen Eintraege aufzunehmen darf nur im Body und auch da nur @@ -1754,6 +1754,9 @@ void SwAuthMarkModalDlg::Apply() /*------------------------------------------------------------------------ $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/20 14:18:04 os + use comphelper methods + Revision 1.1.1.1 2000/09/18 17:14:44 hr initial import diff --git a/sw/source/ui/uiview/pview.cxx b/sw/source/ui/uiview/pview.cxx index f132309f2c62..c59f7fcb69ea 100644 --- a/sw/source/ui/uiview/pview.cxx +++ b/sw/source/ui/uiview/pview.cxx @@ -2,9 +2,9 @@ * * $RCSfile: pview.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: os $ $Date: 2000-09-28 15:24:06 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:05:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1489,13 +1489,11 @@ SwPagePreView::SwPagePreView(SfxViewFrame *pFrame, SfxViewShell* pOldSh): } if( pVS ) - pNew = new ViewShell( pVS, &aViewWin, 0, VSHELLFLAG_ISPREVIEW ); + pNew = new ViewShell( *pVS, &aViewWin, 0, VSHELLFLAG_ISPREVIEW ); else - { - SwDoc* pDoc = ((SwDocShell*)pFrame->GetObjectShell())->GetDoc(); - pNew = new ViewShell( pDoc, ::GetSpellChecker(), ::GetHyphenator(), - &aViewWin, 0, 0, VSHELLFLAG_ISPREVIEW ); - } + pNew = new ViewShell( + *((SwDocShell*)pFrame->GetObjectShell())->GetDoc(), + &aViewWin, 0, 0, VSHELLFLAG_ISPREVIEW ); aViewWin.SetViewShell( pNew ); pNew->SetSfxViewShell( this ); @@ -2220,6 +2218,9 @@ BOOL SwPagePreView::HandleWheelCommands( const CommandEvent& rCEvt ) /************************************************************************* $Log: not supported by cvs2svn $ + Revision 1.2 2000/09/28 15:24:06 os + use of configuration service in view options + Revision 1.1.1.1 2000/09/18 17:14:48 hr initial import diff --git a/sw/source/ui/uiview/view.cxx b/sw/source/ui/uiview/view.cxx index f439ec537bee..1ce63d57dda1 100644 --- a/sw/source/ui/uiview/view.cxx +++ b/sw/source/ui/uiview/view.cxx @@ -2,9 +2,9 @@ * * $RCSfile: view.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: tl $ $Date: 2000-10-12 11:18:06 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:05:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -265,6 +265,7 @@ using namespace ::com::sun::star::uno; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::scanner; using namespace ::rtl; + #define C2U(cChar) OUString::createFromAscii(cChar) #define C2S(cChar) String::CreateFromAscii(cChar) @@ -833,26 +834,25 @@ SwView::SwView( SfxViewFrame *pFrame, SfxViewShell* pOldSh ) if(PTR_CAST( SwView, pOldSh)) { - pWrtShell = new SwWrtShell(((SwView*)pOldSh)->pWrtShell, pEditWin, *this); + pWrtShell = new SwWrtShell( *((SwView*)pOldSh)->pWrtShell, + pEditWin, *this); //MA: Das kann doch nur zu einem GPF fuehren! // nSelectionType = ((SwView*)pOldSh)->nSelectionType; } else { - SwDoc *pDoc = ((SwDocShell*)pDocSh)->GetDoc(); + SwDoc& rDoc = *((SwDocShell*)pDocSh)->GetDoc(); if( PTR_CAST(SwSrcView, pOldSh) || pWebDShell ) - pDoc->SetBrowseMode( sal_True ); + rDoc.SetBrowseMode( sal_True ); //Fuer den BrowseMode wollen wir keinen Factor uebernehmen. - if( pDoc->IsBrowseMode() && aUsrPref.GetZoomType() != SVX_ZOOM_PERCENT ) + if( rDoc.IsBrowseMode() && aUsrPref.GetZoomType() != SVX_ZOOM_PERCENT ) { aUsrPref.SetZoomType( SVX_ZOOM_PERCENT ); aUsrPref.SetZoom( 100 ); } - pWrtShell = new SwWrtShell( pDoc, ::GetSpellChecker(), ::GetHyphenator(), - pEditWin, *this, - 0, &aUsrPref); + pWrtShell = new SwWrtShell( rDoc, pEditWin, *this, 0, &aUsrPref ); } // JP 05.02.99: Bug 61495 - damit unter anderem das HLineal im @@ -1183,32 +1183,23 @@ sal_Bool SwView::HasSelection( sal_Bool bText ) const --------------------------------------------------*/ -String SwView::GetSelectionText( sal_Bool bComplete ) +String SwView::GetSelectionText( sal_Bool bCompleteWrds ) { - return GetSelectionTextParam( bComplete, sal_True ); + return GetSelectionTextParam( bCompleteWrds, sal_True ); } /*-----------------09/16/97 09:50am----------------- --------------------------------------------------*/ -String SwView::GetSelectionTextParam( sal_Bool bComplete, - sal_Bool bEraseTrail, - sal_Bool bExtendedDelimiter ) +String SwView::GetSelectionTextParam( sal_Bool bCompleteWrd, + sal_Bool bEraseTrail ) { String sReturn; - - if (bComplete && !GetWrtShell().HasSelection()) - { - const char sDelimiter[] = " \t\n\r"; - const char sExtDelimiter[] = " \t\n\r.,:;()<>{}"; - WordSelection::SetWordDelimiter(bExtendedDelimiter ? - sExtDelimiter : sDelimiter); + if( bCompleteWrds && !GetWrtShell().HasSelection() ) GetWrtShell().SelWrd(); - WordSelection::ResetWordDelimiter(); - } - GetWrtShell().GetSelectedText(sReturn); - if(bEraseTrail) + GetWrtShell().GetSelectedText( sReturn ); + if( bEraseTrail ) sReturn.EraseTrailingChars(); return sReturn; } diff --git a/sw/source/ui/wrtsh/makefile.mk b/sw/source/ui/wrtsh/makefile.mk index 18ebddcd82ba..e6f2f80f838b 100644 --- a/sw/source/ui/wrtsh/makefile.mk +++ b/sw/source/ui/wrtsh/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.1.1.1 $ +# $Revision: 1.2 $ # -# last change: $Author: hr $ $Date: 2000-09-18 17:14:53 $ +# last change: $Author: jp $ $Date: 2000-10-25 12:06:30 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -102,9 +102,6 @@ SLOFILES = \ $(SLO)$/delete.obj \ $(SLO)$/wrtundo.obj -EXCEPTIONSFILES= \ - $(SLO)$/wrtsh1.obj \ - # --- Tagets ------------------------------------------------------- .INCLUDE : target.mk diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx index dffba845f495..736dab00b243 100644 --- a/sw/source/ui/wrtsh/wrtsh1.cxx +++ b/sw/source/ui/wrtsh/wrtsh1.cxx @@ -2,9 +2,9 @@ * * $RCSfile: wrtsh1.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: jp $ $Date: 2000-10-06 13:41:54 $ + * last change: $Author: jp $ $Date: 2000-10-25 12:06:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -217,9 +217,6 @@ #include <wrtsh.hrc> #endif -using namespace ::com::sun::star; -using namespace ::com::sun::star::uno; - #define COMMON_INI_LIST \ rView(rShell),\ ePageMove(MV_NO),\ @@ -1451,8 +1448,8 @@ void SwWrtShell::AutoCorrect( SvxAutoCorrect& rACorr, sal_Unicode cChar ) * eine Art kontrollierter copy ctor */ -SwWrtShell::SwWrtShell(SwWrtShell *pSh, Window *pWin, SwView &rShell) : - SwFEShell( pSh,pWin ), +SwWrtShell::SwWrtShell( SwWrtShell& rSh, Window *pWin, SwView &rShell ) + : SwFEShell( rSh, pWin ), COMMON_INI_LIST { BITFLD_INI_LIST @@ -1462,12 +1459,9 @@ SwWrtShell::SwWrtShell(SwWrtShell *pSh, Window *pWin, SwView &rShell) : } -SwWrtShell::SwWrtShell(SwDoc *pDoc, - uno::Reference< linguistic::XSpellChecker1 > &xSpell, - uno::Reference< linguistic::XHyphenator > &xHyph, - Window *pWin, SwView &rShell, SwRootFrm *pRoot, - const SwViewOption *pViewOpt ) - : SwFEShell(pDoc, xSpell, xHyph, pWin, pRoot, pViewOpt), +SwWrtShell::SwWrtShell( SwDoc& rDoc, Window *pWin, SwView &rShell, + SwRootFrm *pRoot, const SwViewOption *pViewOpt ) + : SwFEShell( rDoc, pWin, pRoot, pViewOpt), COMMON_INI_LIST { BITFLD_INI_LIST @@ -1575,6 +1569,9 @@ void SwWrtShell::NewCoreSelection() /************************************************************************* $Log: not supported by cvs2svn $ + Revision 1.2 2000/10/06 13:41:54 jp + should changes: don't use IniManager + Revision 1.1.1.1 2000/09/18 17:14:53 hr initial import |