summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2011-09-20 03:17:10 +0900
committerTakeshi Abe <tabe@fixedpoint.jp>2011-09-20 09:55:21 +0900
commit0aa547c18dee940d7e9726c85880790710d3ec76 (patch)
treed332fa0ad452142e8435df84fffb1c6841efa349 /sw/source
parent2defcfa33e86150ac936cc8a9a8edb1dcb242b5b (diff)
reduce duplicate code to one template
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/core/crsr/pam.cxx88
1 files changed, 0 insertions, 88 deletions
diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
index 5d5f39deb4b6..a229fc55653d 100644
--- a/sw/source/core/crsr/pam.cxx
+++ b/sw/source/core/crsr/pam.cxx
@@ -165,94 +165,6 @@ SwDoc * SwPosition::GetDoc() const
return nNode.GetNode().GetDoc();
}
-SwComparePosition ComparePosition(
- const SwPosition& rStt1, const SwPosition& rEnd1,
- const SwPosition& rStt2, const SwPosition& rEnd2 )
-{
- SwComparePosition nRet;
- if( rStt1 < rStt2 )
- {
- if( rEnd1 > rStt2 )
- {
- if( rEnd1 >= rEnd2 )
- nRet = POS_OUTSIDE;
- else
- nRet = POS_OVERLAP_BEFORE;
-
- }
- else if( rEnd1 == rStt2 )
- nRet = POS_COLLIDE_END;
- else
- nRet = POS_BEFORE;
- }
- else if( rEnd2 > rStt1 )
- {
- if( rEnd2 >= rEnd1 )
- {
- if( rEnd2 == rEnd1 && rStt2 == rStt1 )
- nRet = POS_EQUAL;
- else
- nRet = POS_INSIDE;
- }
- else
- {
- if (rStt1 == rStt2)
- nRet = POS_OUTSIDE;
- else
- nRet = POS_OVERLAP_BEHIND;
- }
- }
- else if( rEnd2 == rStt1 )
- nRet = POS_COLLIDE_START;
- else
- nRet = POS_BEHIND;
- return nRet;
-}
-
-SwComparePosition ComparePosition(
- const unsigned long nStt1, const unsigned long nEnd1,
- const unsigned long nStt2, const unsigned long nEnd2 )
-{
- SwComparePosition nRet;
- if( nStt1 < nStt2 )
- {
- if( nEnd1 > nStt2 )
- {
- if( nEnd1 >= nEnd2 )
- nRet = POS_OUTSIDE;
- else
- nRet = POS_OVERLAP_BEFORE;
-
- }
- else if( nEnd1 == nStt2 )
- nRet = POS_COLLIDE_END;
- else
- nRet = POS_BEFORE;
- }
- else if( nEnd2 > nStt1 )
- {
- if( nEnd2 >= nEnd1 )
- {
- if( nEnd2 == nEnd1 && nStt2 == nStt1 )
- nRet = POS_EQUAL;
- else
- nRet = POS_INSIDE;
- }
- else
- {
- if (nStt1 == nStt2)
- nRet = POS_OUTSIDE;
- else
- nRet = POS_OVERLAP_BEHIND;
- }
- }
- else if( nEnd2 == nStt1 )
- nRet = POS_COLLIDE_START;
- else
- nRet = POS_BEHIND;
- return nRet;
-}
-
enum CHKSECTION { Chk_Both, Chk_One, Chk_None };