summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-10-25 14:39:12 +0000
committerjp <jp@openoffice.org>2000-10-25 14:39:12 +0000
commitc09fc2c1db5c94c3ef69986549f970e1c03e8067 (patch)
treefca4d260e4bcc9cb4095db7c15ead263a6bdf99f
parent30bce3497552f313a8047d22a0993d987b83734d (diff)
use CharClass/BreakIt instead of old WordSelection
-rw-r--r--sw/inc/swcrsr.hxx17
-rw-r--r--sw/source/core/doc/doc.cxx16
-rw-r--r--sw/source/core/doc/docedt.cxx18
-rw-r--r--sw/source/core/doc/docfmt.cxx79
-rw-r--r--sw/source/core/edit/acorrect.cxx7
-rw-r--r--sw/source/core/edit/autofmt.cxx8
-rw-r--r--sw/source/core/txtnode/txtedt.cxx71
-rw-r--r--sw/source/ui/config/modcfg.cxx7
-rw-r--r--sw/source/ui/docvw/edtwin.cxx21
-rw-r--r--sw/source/ui/wrtsh/select.cxx31
-rw-r--r--sw/source/ui/wrtsh/wrtsh1.cxx14
11 files changed, 147 insertions, 142 deletions
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index b87b94d2fc21..1a22bed6c721 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: swcrsr.hxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-18 17:14:28 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:39:12 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -61,9 +61,6 @@
#ifndef _SWCRSR_HXX
#define _SWCRSR_HXX
-#ifndef _WORDSEL_HXX //autogen
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _PAM_HXX //autogen
#include <pam.hxx>
#endif
@@ -160,16 +157,6 @@ public:
const SearchParam* pTextPara = 0,
const SfxItemSet* rReplSet = 0 );
-/* int IsWordFNC( FNIsWord fnIsWord ) const;
- int GoWordFNC( FNGoWord fnGoWord );
- FASTBOOL IsStartWord()const { return IsWordFNC( WordSelection::IsStartWord ); }
- FASTBOOL IsEndWord() const { return IsWordFNC( WordSelection::IsEndWord ); }
- FASTBOOL IsInWord() const { return IsWordFNC( WordSelection::IsInWord ); }
- FASTBOOL GoStartWord() { return GoWordFNC( WordSelection::GoStartWord ); }
- FASTBOOL GoEndWord() { return GoWordFNC( WordSelection::GoEndWord ); }
- FASTBOOL GoNextWord() { return GoWordFNC( WordSelection::GoNextWord ); }
- FASTBOOL GoPrevWord() { return GoWordFNC( WordSelection::GoPrevWord ); }
-*/
FASTBOOL IsStartWord()const;
FASTBOOL IsEndWord() const;
FASTBOOL IsInWord() const;
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index c9d35180efc2..b52b8eb5fe36 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: doc.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-10-05 12:07:35 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:31:10 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -81,9 +81,6 @@
#ifndef _IPOBJ_HXX //autogen
#include <so3/ipobj.hxx>
#endif
-#ifndef _WORDSEL_HXX //autogen
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _SFXDOCINF_HXX //autogen
#include <sfx2/docinf.hxx>
#endif
@@ -105,6 +102,9 @@
#ifndef SMDLL0_HXX //autogen
#include <starmath/smdll0.hxx>
#endif
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
+#endif
#ifndef _SWMODULE_HXX //autogen
#include <swmodule.hxx>
@@ -447,12 +447,14 @@ BOOL SwDoc::Insert( const SwPaM &rRg, const String &rStr, BOOL bHintExpand )
USHORT nUndoSize = pUndos->Count();
xub_StrLen nInsPos = pPos->nContent.GetIndex();
SwUndoInsert * pUndo;
+ CharClass& rCC = GetAppCharClass();
+
if( 0 == nUndoSize || UNDO_INSERT !=
( pUndo = (SwUndoInsert*)(*pUndos)[ --nUndoSize ])->GetId() ||
!pUndo->CanGrouping( *pPos ))
{
pUndo = new SwUndoInsert( pPos->nNode, nInsPos, 0,
- !WordSelection::IsNormalChar( rStr.GetChar( 0 )) );
+ !rCC.isLetterNumeric( rStr, 0 ) );
AppendUndo( pUndo );
}
@@ -463,7 +465,7 @@ BOOL SwDoc::Insert( const SwPaM &rRg, const String &rStr, BOOL bHintExpand )
if( !pUndo->CanGrouping( rStr.GetChar( i ) ))
{
pUndo = new SwUndoInsert( pPos->nNode, nInsPos, 1,
- !WordSelection::IsNormalChar( rStr.GetChar( i )) );
+ !rCC.isLetterNumeric( rStr, i ) );
AppendUndo( pUndo );
}
}
diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
index b763615f8a24..a1d9373eb42a 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.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:15 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:31:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -74,9 +74,6 @@
#ifndef _SOUND_HXX //autogen
#include <vcl/sound.hxx>
#endif
-#ifndef _WORDSEL_HXX //autogen
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _SVX_CSCOITEM_HXX //autogen
#include <svx/cscoitem.hxx>
#endif
@@ -89,6 +86,9 @@
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
+#endif
#ifndef _FMTANCHR_HXX //autogen
#include <fmtanchr.hxx>
@@ -731,7 +731,9 @@ sal_Bool SwDoc::Insert( const SwPaM &rRg, sal_Unicode c )
else
AppendUndo( new SwUndoInsert( rPos.nNode,
rPos.nContent.GetIndex(), 1,
- !WordSelection::IsNormalChar( c ) ));
+ !GetAppCharClass().isLetterNumeric(
+ pNode->GetTxt(),
+ rPos.nContent.GetIndex() - 1 )));
}
if( IsRedlineOn() || (!IsIgnoreRedline() && pRedlineTbl->Count() ))
@@ -2239,8 +2241,8 @@ sal_Bool SwDoc::DelFullPara( SwPaM& rPam )
}
}
- rPam.GetPoint()->nContent.Assign( 0, 0 );
- rPam.GetMark()->nContent.Assign( 0, 0 );
+ rPam.GetBound( TRUE ).nContent.Assign( 0, 0 );
+ rPam.GetBound( FALSE ).nContent.Assign( 0, 0 );
GetNodes().Delete( aRg.aStart, nNodeDiff+1 );
}
rPam.DeleteMark();
diff --git a/sw/source/core/doc/docfmt.cxx b/sw/source/core/doc/docfmt.cxx
index a07e115b649e..58249bda2d6e 100644
--- a/sw/source/core/doc/docfmt.cxx
+++ b/sw/source/core/doc/docfmt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: docfmt.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: os $ $Date: 2000-10-20 14:29:22 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:31:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -101,14 +101,22 @@ SO2_DECL_REF(SvLinkName)
#ifndef _SFX_WHITER_HXX //autogen
#include <svtools/whiter.hxx>
#endif
-#ifndef _WORDSEL_HXX //autogen
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _ZFORLIST_HXX //autogen
#define _ZFORLIST_DECLARE_TABLE
#include <svtools/zforlist.hxx>
#endif
+#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#endif
+#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
+#include <comphelper/processfactory.hxx>
+#endif
+#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HDL
+#include <com/sun/star/text/WordType.hdl>
+#endif
+
+
#ifndef _FMTPDSC_HXX //autogen
#include <fmtpdsc.hxx>
#endif
@@ -187,13 +195,12 @@ SO2_DECL_REF(SvLinkName)
#ifndef _FMTINFMT_HXX //autogen
#include <fmtinfmt.hxx>
#endif
-#ifndef _COM_SUN_STAR_LANG_XMULTISERVICEFACTORY_HPP_
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#endif
-#ifndef _COMPHELPER_PROCESSFACTORY_HXX_
-#include <comphelper/processfactory.hxx>
+#ifndef _BREAKIT_HXX
+#include <breakit.hxx>
#endif
+
+using namespace ::com::sun::star::text;
using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
@@ -402,17 +409,27 @@ void SwDoc::ResetAttr( const SwPaM &rRg, BOOL bTxtAttr,
nMkPos = *pURLAttr->GetStart();
nPtPos = *pURLAttr->GetEnd();
}
- else if( WordSelection::IsInWord( rStr, nPtPos ) &&
- !WordSelection::IsStartWord( rStr, nPtPos ) &&
- !WordSelection::IsEndWord( rStr, nPtPos ) &&
- USHRT_MAX != ( nMkPos = WordSelection::GoStartWord( rStr, nPtPos )) &&
- USHRT_MAX != ( nPtPos = WordSelection::GoEndWord( rStr, nPtPos )) )
- ;
else
{
- nPtPos = nMkPos = rSt.GetIndex();
- if( bTxtAttr )
- pTxtNd->DontExpandFmt( rSt, TRUE );
+ Boundary aBndry;
+ if( pBreakIt->xBreak.is() )
+ aBndry = pBreakIt->xBreak->getWordBoundary(
+ pTxtNd->GetTxt(), nPtPos,
+ pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
+ TRUE );
+
+ if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
+ {
+ nMkPos = aBndry.startPos;
+ nPtPos = aBndry.endPos;
+ }
+ else
+ {
+ nPtPos = nMkPos = rSt.GetIndex();
+ if( bTxtAttr )
+ pTxtNd->DontExpandFmt( rSt, TRUE );
+ }
}
rSt = nMkPos;
@@ -737,14 +754,24 @@ BOOL InsAttr( SwDoc *pDoc, const SwPaM &rRg, const SfxItemSet& rChgSet,
nMkPos = *pURLAttr->GetStart();
nPtPos = *pURLAttr->GetEnd();
}
- else if( WordSelection::IsInWord( rStr, nPtPos ) &&
- !WordSelection::IsStartWord( rStr, nPtPos ) &&
- !WordSelection::IsEndWord( rStr, nPtPos ) &&
- USHRT_MAX != ( nMkPos = WordSelection::GoStartWord( rStr, nPtPos )) &&
- USHRT_MAX != ( nPtPos = WordSelection::GoEndWord( rStr, nPtPos )) )
- ;
else
- nPtPos = nMkPos = rSt.GetIndex();
+ {
+ Boundary aBndry;
+ if( pBreakIt->xBreak.is() )
+ aBndry = pBreakIt->xBreak->getWordBoundary(
+ pTxtNd->GetTxt(), nPtPos,
+ pBreakIt->GetLocale( pTxtNd->GetLang( nPtPos ) ),
+ WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/,
+ TRUE );
+
+ if( aBndry.startPos < nPtPos && nPtPos < aBndry.endPos )
+ {
+ nMkPos = aBndry.startPos;
+ nPtPos = aBndry.endPos;
+ }
+ else
+ nPtPos = nMkPos = rSt.GetIndex();
+ }
// erstmal die zu ueberschreibenden Attribute aus dem
// SwpHintsArray entfernen, wenn die Selektion den gesamten
diff --git a/sw/source/core/edit/acorrect.cxx b/sw/source/core/edit/acorrect.cxx
index f68185108af3..ae9996211873 100644
--- a/sw/source/core/edit/acorrect.cxx
+++ b/sw/source/core/edit/acorrect.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: acorrect.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-10-18 11:54:58 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:32:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -71,9 +71,6 @@
#include <hintids.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _OFF_APP_HXX //autogen
#include <offmgr/app.hxx>
#endif
diff --git a/sw/source/core/edit/autofmt.cxx b/sw/source/core/edit/autofmt.cxx
index 48c1c0eeda88..3ab3700eee11 100644
--- a/sw/source/core/edit/autofmt.cxx
+++ b/sw/source/core/edit/autofmt.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: autofmt.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-10-20 11:11:01 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:32:18 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -1964,6 +1964,8 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
BOOL bFirst = aFlags.bCptlSttSntnc, bFirstSent = bFirst;
sal_Unicode cChar;
+ CharClass& rAppCC = GetAppCharClass();
+
do {
while( nPos < pTxt->Len() && IsSpace( cChar = pTxt->GetChar( nPos ) ))
++nPos;
@@ -2111,7 +2113,7 @@ void SwAutoFormat::AutoCorrect( xub_StrLen nPos )
//alle Wortrenner loesen die Autokorrektur aus!
// case ' ':
// case '\t':
- if( !WordSelection::IsNormalChar( cChar ))
+ if( !rAppCC.isLetterNumeric( *pTxt, nPos ))
{
--nPos; // ++nPos von dem for ungueltig machen !
++bBreak;
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index dd2650b95a0e..a7bae41da93c 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.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: ama $ $Date: 2000-10-20 14:46:42 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:33:17 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -85,20 +85,15 @@
#ifndef _SVX_LANGITEM_HXX //autogen
#include <svx/langitem.hxx>
#endif
-#ifndef _WORDSEL_HXX //autogen
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _LINGU_LNGPROPS_HHX_
#include <lingu/lngprops.hxx>
#endif
#ifndef _STRING_HXX
#include <tools/string.hxx>
#endif
-
#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
-
#ifndef _COM_SUN_STAR_TEXT_WORDTYPE_HPP_
#include <com/sun/star/text/WordType.hpp>
#endif
@@ -118,8 +113,9 @@
#ifndef _DOC_HXX
#include <doc.hxx> // GetDoc()
#endif
-
-#include "frmsh.hxx"
+#ifndef _FRMSH_HXX
+#include <frmsh.hxx>
+#endif
#ifndef _TXATBASE_HXX //autogen
#include <txatbase.hxx>
#endif
@@ -150,9 +146,15 @@
#ifndef _SWFONT_HXX
#include <swfont.hxx> // GetSystemLang
#endif
-#include "txttypes.hxx"
-#include "breakit.hxx"
-#include "crstate.hxx"
+#ifndef _TXTTYPES_HXX
+#include <txttypes.hxx>
+#endif
+#ifndef _BREAKIT_HXX
+#include <breakit.hxx>
+#endif
+#ifndef _CRSTATE_HXX
+#include <crstate.hxx>
+#endif
using namespace ::com::sun::star;
using namespace ::com::sun::star::text;
@@ -414,45 +416,18 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
XubString SwTxtNode::GetCurWord( xub_StrLen nPos )
{
ASSERT( nPos<=aText.Len() , "SwTxtNode::GetCurWord: Pos hinter String?");
- xub_StrLen nTxtLen = aText.Len();
- if( !nTxtLen )
+ if( !aText.Len() )
return aText;
- xub_StrLen nBegin, nLen;
-
- nBegin = WordSelection::GoStartWord( aText, nPos );
- if( STRING_NOTFOUND == nBegin )
- {
- nBegin = 0;
- nLen = 0;
- }
- else
- {
- nLen = WordSelection::GoEndWord( aText, nBegin ) - nBegin;
+ Boundary aBndry;
+ if( pBreakIt->xBreak.is() )
+ aBndry = pBreakIt->xBreak->getWordBoundary(
+ aText, nPos, pBreakIt->GetLocale( GetLang( nPos ) ),
+ WordType::ANY_WORD /*ANYWORD_IGNOREWHITESPACES*/, TRUE );
- if( IsSymbol( nBegin ) )
- nLen = 0;
- else
- {
- // Sonderbehandlung von > ' <, z.B. doesn't
- xub_StrLen nNewBegin = nBegin + nLen;
- if ( nNewBegin < nTxtLen && '\'' == aText.GetChar( nNewBegin ) )
- {
- // ist das Zeichen hinter dem Wort ein > ' <
- // dann eventuell das Wort verlaengern
- xub_StrLen nNewLen;
- nNewLen = WordSelection::GoEndWord( aText, nNewBegin );
- nNewBegin = WordSelection::GoStartWord( aText, nNewLen );
- if( STRING_NOTFOUND != nNewBegin )
- {
- nNewLen -= nNewBegin;
- if( nNewBegin == nBegin + nLen + 1 )
- nLen += nNewLen + 1;
- }
- }
- }
- }
- return aText.Copy( nBegin, nLen );
+ if( aBndry.endPos != aBndry.startPos && IsSymbol( aBndry.startPos ) )
+ aBndry.endPos = aBndry.startPos;
+ return aText.Copy( aBndry.startPos, aBndry.endPos - aBndry.startPos );
}
diff --git a/sw/source/ui/config/modcfg.cxx b/sw/source/ui/config/modcfg.cxx
index 4faded9d0fa7..4f2f3b9ee056 100644
--- a/sw/source/ui/config/modcfg.cxx
+++ b/sw/source/ui/config/modcfg.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: modcfg.cxx,v $
*
- * $Revision: 1.6 $
+ * $Revision: 1.7 $
*
- * last change: $Author: os $ $Date: 2000-10-19 13:26:48 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:34:09 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -86,9 +86,6 @@
#ifndef _SVX_SVXENUM_HXX //autogen
#include <svx/svxenum.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _TOOLS_DEBUG_HXX //autogen
#include <tools/debug.hxx>
#endif
diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
index 703ea66cf27f..cc1fcf486f11 100644
--- a/sw/source/ui/docvw/edtwin.cxx
+++ b/sw/source/ui/docvw/edtwin.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: edtwin.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: jp $ $Date: 2000-10-05 12:13:21 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:35:11 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -116,9 +116,6 @@
#ifndef _SFXSTRITEM_HXX //autogen
#include <svtools/stritem.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _SFXVIEWFRM_HXX //autogen
#include <sfx2/viewfrm.hxx>
#endif
@@ -187,6 +184,9 @@
#ifndef _OFF_APP_HXX //autogen
#include <offmgr/app.hxx>
#endif
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
+#endif
#ifndef _EDTWIN_HXX //autogen
#include <edtwin.hxx>
@@ -1474,7 +1474,9 @@ KEYINPUT_CHECKTABLE_INSDEL:
case KS_InsChar:
if( !rSh.HasReadonlySel() )
{
- if( bChkInsBlank && WordSelection::IsNormalChar( aCh ) &&
+ BOOL bIsNormalChar = GetAppCharClass().isLetterNumeric(
+ String( aCh ), 0 );
+ if( bChkInsBlank && bIsNormalChar &&
(aInBuffer.Len() || !rSh.IsSttPara() || !rSh.IsEndPara() ))
{
// vor dem Zeichen noch ein Blank einfuegen. Dieses
@@ -1501,9 +1503,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
ChgToEnEmDash | SetINetAttr |
Autocorrect ) &&
'\"' != aCh && '\'' != aCh && '*' != aCh && '_' != aCh &&
-// !Application::GetAppInternational().IsAlphaNumeric(
-// STR_HACK( aCh ))
- !WordSelection::IsNormalChar( aCh )
+ !bIsNormalChar
)
{
FlushInBuffer( &rSh );
@@ -3958,6 +3958,9 @@ void QuickHelpData::Stop( SwWrtShell& rSh )
/***********************************************************************
$Log: not supported by cvs2svn $
+ Revision 1.2 2000/10/05 12:13:21 jp
+ should change: remove image
+
Revision 1.1.1.1 2000/09/18 17:14:35 hr
initial import
diff --git a/sw/source/ui/wrtsh/select.cxx b/sw/source/ui/wrtsh/select.cxx
index 763068748765..c5665550c521 100644
--- a/sw/source/ui/wrtsh/select.cxx
+++ b/sw/source/ui/wrtsh/select.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: select.cxx,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 15:36:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -80,12 +80,12 @@
#ifndef _SFXMACITEM_HXX //autogen
#include <svtools/macitem.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
-#endif
#ifndef _SFXVIEWFRM_HXX
#include <sfx2/viewfrm.hxx>
#endif
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
+#endif
#ifndef _CMDID_H
@@ -845,13 +845,15 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
if( IsAddMode() || !(nSelection & SEL_TXT) )
return FALSE;
- const sal_Unicode cFirst = GetChar(FALSE);
- const sal_Unicode cLast = GetChar(TRUE, -1);
+ String sTxt;
+ CharClass& rCC = GetAppCharClass();
+
// wenn das erste und das letzte Zeichen kein Wortzeichen ist,
// ist kein Wort selektiert.
- if( !WordSelection::IsNormalChar( cFirst ) ||
- !WordSelection::IsNormalChar( cLast ) )
+ if( !rCC.isLetterNumeric( ( sTxt = GetChar(FALSE)), 0 ) ||
+ !rCC.isLetterNumeric( ( sTxt = GetChar(TRUE, -1)), 0 ) )
return NO_WORD;
+
const sal_Unicode cPrev = GetChar(FALSE, -1);
const sal_Unicode cNext = GetChar(TRUE);
@@ -860,9 +862,11 @@ int SwWrtShell::IntelligentCut(int nSelection, BOOL bCut)
if(!cWord && cPrev && cNext &&
CH_TXTATR_BREAKWORD != cPrev && CH_TXTATR_INWORD != cPrev &&
CH_TXTATR_BREAKWORD != cNext && CH_TXTATR_INWORD != cNext &&
- !WordSelection::IsNormalChar(cPrev) && !WordSelection::IsNormalChar(cNext))
+ !rCC.isLetterNumeric( ( sTxt = cPrev), 0 ) &&
+ !rCC.isLetterNumeric( ( sTxt = cNext), 0 ) )
cWord = WORD_NO_SPACE;
- if(cWord == WORD_NO_SPACE && cPrev == ' ')
+
+ if(cWord == WORD_NO_SPACE && ' ' == cPrev )
{
cWord = WORD_SPACE_BEFORE;
// Space davor loeschen
@@ -957,11 +961,14 @@ long SwWrtShell::MoveText(const Point *pPt,BOOL)
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/ui/wrtsh/select.cxx,v 1.1.1.1 2000-09-18 17:14:53 hr Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/ui/wrtsh/select.cxx,v 1.2 2000-10-25 15:36:07 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/18 17:14:53 hr
+ initial import
+
Revision 1.173 2000/09/18 16:06:26 willem.vandorp
OpenOffice header added.
diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
index 736dab00b243..55d497403bf5 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.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: jp $ $Date: 2000-10-25 12:06:30 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:36:07 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -139,6 +139,9 @@
#ifndef _SFX_PRINTER_HXX //autogen
#include <sfx2/printer.hxx>
#endif
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
+#endif
#ifndef _FMTFTN_HXX //autogen
#include <fmtftn.hxx>
@@ -296,11 +299,11 @@ void SwWrtShell::InsertByWord( const String & rStr)
{
if( rStr.Len() )
{
- BOOL bDelim = WordSelection::IsNormalChar( rStr.GetChar(0) );
+ BOOL bDelim = GetAppCharClass().isLetterNumeric( rStr, 0 );
xub_StrLen nPos = 0, nStt = 0;
for( ; nPos < rStr.Len(); nPos++ )
{
- BOOL bTmpDelim = WordSelection::IsNormalChar( rStr.GetChar( nPos ) );
+ BOOL bTmpDelim = GetAppCharClass().isLetterNumeric( rStr, nPos );
if( bTmpDelim != bDelim )
{
Insert( rStr.Copy( nStt, nPos - nStt ));
@@ -1569,6 +1572,9 @@ void SwWrtShell::NewCoreSelection()
/*************************************************************************
$Log: not supported by cvs2svn $
+ Revision 1.3 2000/10/25 12:06:30 jp
+ Spellchecker/Hyphenator are not longer member of the shells
+
Revision 1.2 2000/10/06 13:41:54 jp
should changes: don't use IniManager