summaryrefslogtreecommitdiff
path: root/sw/source/core/undo
diff options
context:
space:
mode:
authorjp <jp@openoffice.org>2000-10-25 14:13:25 +0000
committerjp <jp@openoffice.org>2000-10-25 14:13:25 +0000
commit30bce3497552f313a8047d22a0993d987b83734d (patch)
tree51c8c5ff89406c388ebd4c5db7769f6f48aca8fc /sw/source/core/undo
parent26da59d5aa7517a279a0a7f979610f77dfd47abc (diff)
use CharClass/BreakIt instead of old WordSelection
Diffstat (limited to 'sw/source/core/undo')
-rw-r--r--sw/source/core/undo/undel.cxx18
-rw-r--r--sw/source/core/undo/unins.cxx16
-rw-r--r--sw/source/core/undo/unovwr.cxx19
-rw-r--r--sw/source/core/undo/unredln.cxx18
4 files changed, 45 insertions, 26 deletions
diff --git a/sw/source/core/undo/undel.cxx b/sw/source/core/undo/undel.cxx
index 6a1c4bc6f277..90dcac9a2061 100644
--- a/sw/source/core/undo/undel.cxx
+++ b/sw/source/core/undo/undel.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: undel.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:27 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:13:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,8 +69,8 @@
#include <hintids.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
#endif
#ifndef _SVX_BRKITEM_HXX //autogen
#include <svx/brkitem.hxx>
@@ -499,9 +499,10 @@ BOOL SwUndoDelete::CanGrouping( SwDoc* pDoc, const SwPaM& rDelPam )
xub_StrLen nUChrPos = bBackSp ? 0 : pSttStr->Len()-1;
sal_Unicode cDelChar = pDelTxtNd->GetTxt().GetChar( pStt->nContent.GetIndex() );
+ CharClass& rCC = GetAppCharClass();
if( ( CH_TXTATR_BREAKWORD == cDelChar && CH_TXTATR_INWORD == cDelChar ) ||
- WordSelection::IsNormalChar( cDelChar ) !=
- WordSelection::IsNormalChar( pSttStr->GetChar( nUChrPos ) ))
+ rCC.isLetterNumeric( String( cDelChar ), 0 ) !=
+ rCC.isLetterNumeric( *pSttStr, nUChrPos ) )
return FALSE;
{
@@ -903,11 +904,14 @@ void SwUndoDelete::Repeat( SwUndoIter& rUndoIter )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/undel.cxx,v 1.1.1.1 2000-09-19 00:08:27 hr Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/undel.cxx,v 1.2 2000-10-25 15:13:25 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/19 00:08:27 hr
+ initial import
+
Revision 1.91 2000/09/18 16:04:28 willem.vandorp
OpenOffice header added.
diff --git a/sw/source/core/undo/unins.cxx b/sw/source/core/undo/unins.cxx
index 999a24749edf..71ec7a00a3de 100644
--- a/sw/source/core/undo/unins.cxx
+++ b/sw/source/core/undo/unins.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unins.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:27 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:13:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -69,8 +69,8 @@
#include <hintids.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
#endif
#ifndef _SVSTOR_HXX //autogen
#include <so3/svstor.hxx>
@@ -232,7 +232,8 @@ BOOL SwUndoInsert::CanGrouping( const SwPosition& rInsPos, sal_Unicode cIns )
BOOL SwUndoInsert::CanGrouping( sal_Unicode cIns )
{
- if( !bIsAppend && bIsWordDelim == !WordSelection::IsNormalChar( cIns ) )
+ if( !bIsAppend && bIsWordDelim ==
+ !GetAppCharClass().isLetterNumeric( String( cIns )) )
{
nLen++;
nCntnt++;
@@ -1033,11 +1034,14 @@ void SwUndoInsertLabel::SetDrawObj( const Point& rPos, BYTE nLId )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/unins.cxx,v 1.1.1.1 2000-09-19 00:08:27 hr Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/unins.cxx,v 1.2 2000-10-25 15:13:25 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/19 00:08:27 hr
+ initial import
+
Revision 1.65 2000/09/18 16:04:29 willem.vandorp
OpenOffice header added.
diff --git a/sw/source/core/undo/unovwr.cxx b/sw/source/core/undo/unovwr.cxx
index 716f09012ddb..c15f324154c3 100644
--- a/sw/source/core/undo/unovwr.cxx
+++ b/sw/source/core/undo/unovwr.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unovwr.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:28 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:13:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -65,8 +65,8 @@
#pragma hdrstop
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
#endif
#ifndef _DOC_HXX
@@ -179,10 +179,12 @@ BOOL SwUndoOverwrite::CanGrouping( SwDoc* pDoc, SwPosition& rPos,
rPos.nContent.GetIndex() != ( nSttCntnt + aInsStr.Len() )))
return FALSE;
+ CharClass& rCC = GetAppCharClass();
+
// befrage das einzufuegende Charakter
if( ( CH_TXTATR_BREAKWORD == cIns && CH_TXTATR_INWORD == cIns ) ||
- WordSelection::IsNormalChar( cIns ) !=
- WordSelection::IsNormalChar( aInsStr.GetChar( aInsStr.Len()-1) ) )
+ rCC.isLetterNumeric( String( cIns ), 0 ) !=
+ rCC.isLetterNumeric( aInsStr, aInsStr.Len()-1 ) )
return FALSE;
{
@@ -357,11 +359,14 @@ void SwUndoOverwrite::Redo( SwUndoIter& rUndoIter )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/unovwr.cxx,v 1.1.1.1 2000-09-19 00:08:28 hr Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/unovwr.cxx,v 1.2 2000-10-25 15:13:25 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/19 00:08:28 hr
+ initial import
+
Revision 1.35 2000/09/18 16:04:29 willem.vandorp
OpenOffice header added.
diff --git a/sw/source/core/undo/unredln.cxx b/sw/source/core/undo/unredln.cxx
index 8cb7b6d99a9f..13ef9f1f371d 100644
--- a/sw/source/core/undo/unredln.cxx
+++ b/sw/source/core/undo/unredln.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: unredln.cxx,v $
*
- * $Revision: 1.1.1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: hr $ $Date: 2000-09-19 00:08:28 $
+ * last change: $Author: jp $ $Date: 2000-10-25 15:13:25 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -68,9 +68,11 @@
#ifndef _HINTIDS_HXX
#include <hintids.hxx>
#endif
-#ifndef _WORDSEL_HXX
-#include <svtools/wordsel.hxx>
+
+#ifndef _UNOTOOLS_CHARCLASS_HXX
+#include <unotools/charclass.hxx>
#endif
+
#ifndef _DOC_HXX
#include <doc.hxx>
#endif
@@ -225,7 +227,8 @@ SwUndoRedlineDelete::SwUndoRedlineDelete( const SwPaM& rRange, USHORT nUsrId )
if( CH_TXTATR_BREAKWORD != cCh && CH_TXTATR_INWORD != cCh )
{
bCanGroup = TRUE;
- bIsDelim = !WordSelection::IsNormalChar( cCh );
+ bIsDelim = !GetAppCharClass().isLetterNumeric( pTNd->GetTxt(),
+ nSttCntnt );
bIsBackspace = nSttCntnt == rRange.GetPoint()->nContent.GetIndex();
}
}
@@ -509,11 +512,14 @@ void SwUndoCompDoc::Redo( SwUndoIter& rIter )
Source Code Control System - Header
- $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/unredln.cxx,v 1.1.1.1 2000-09-19 00:08:28 hr Exp $
+ $Header: /zpool/svn/migration/cvs_rep_09_09_08/code/sw/source/core/undo/unredln.cxx,v 1.2 2000-10-25 15:13:25 jp Exp $
Source Code Control System - Update
$Log: not supported by cvs2svn $
+ Revision 1.1.1.1 2000/09/19 00:08:28 hr
+ initial import
+
Revision 1.19 2000/09/18 16:04:29 willem.vandorp
OpenOffice header added.