diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-11-07 08:41:21 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-11-07 12:27:31 +0000 |
commit | c9e9b3a36ffd2d2b37fbe7267b4707174e8c6312 (patch) | |
tree | 6dbab8890a5124af820fa12858c31a8a4d0d3204 /editeng | |
parent | 75871d9a8c0f22f3d5486023a56175d0d04e66d5 (diff) |
callcatcher: update list, drop some newly unused methods
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit.hxx | 3 | ||||
-rw-r--r-- | editeng/source/editeng/impedit2.cxx | 105 |
2 files changed, 0 insertions, 108 deletions
diff --git a/editeng/source/editeng/impedit.hxx b/editeng/source/editeng/impedit.hxx index adf3c8ec90c2..3e2338a74b0b 100644 --- a/editeng/source/editeng/impedit.hxx +++ b/editeng/source/editeng/impedit.hxx @@ -885,9 +885,6 @@ public: void EnterBlockNotifications(); void LeaveBlockNotifications(); - - EditSelection MatchGroup( const EditSelection& rSel ); - void UndoActionStart( sal_uInt16 nId ); void UndoActionStart( sal_uInt16 nId, const ESelection& rSel ); void UndoActionEnd( sal_uInt16 nId ); diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx index 74d096c81cf3..723cf0282ef3 100644 --- a/editeng/source/editeng/impedit2.cxx +++ b/editeng/source/editeng/impedit2.cxx @@ -3450,111 +3450,6 @@ EditSelection ImpEditEngine::ConvertSelection( sal_uInt16 nStartPara, sal_uInt16 return aNewSelection; } -EditSelection ImpEditEngine::MatchGroup( const EditSelection& rSel ) -{ - EditSelection aMatchSel; - EditSelection aTmpSel( rSel ); - aTmpSel.Adjust( GetEditDoc() ); - if ( ( aTmpSel.Min().GetNode() != aTmpSel.Max().GetNode() ) || - ( ( aTmpSel.Max().GetIndex() - aTmpSel.Min().GetIndex() ) > 1 ) ) - { - return aMatchSel; - } - - sal_uInt16 nPos = aTmpSel.Min().GetIndex(); - ContentNode* pNode = aTmpSel.Min().GetNode(); - if ( nPos >= pNode->Len() ) - return aMatchSel; - - sal_uInt16 nMatchChar = aGroupChars.Search( pNode->GetChar( nPos ) ); - if ( nMatchChar != STRING_NOTFOUND ) - { - sal_uInt16 nNode = aEditDoc.GetPos( pNode ); - if ( ( nMatchChar % 2 ) == 0 ) - { - // Search forward... - xub_Unicode nSC = aGroupChars.GetChar( nMatchChar ); - OSL_ENSURE( aGroupChars.Len() > (nMatchChar+1), "Invalid group of MatchChars!" ); - xub_Unicode nEC = aGroupChars.GetChar( nMatchChar+1 ); - - sal_uInt16 nCur = aTmpSel.Min().GetIndex()+1; - sal_uInt16 nLevel = 1; - while ( pNode && nLevel ) - { - XubString& rStr = *pNode; - while ( nCur < rStr.Len() ) - { - if ( rStr.GetChar( nCur ) == nSC ) - nLevel++; - else if ( rStr.GetChar( nCur ) == nEC ) - { - nLevel--; - if ( !nLevel ) - break; // while nCur... - } - nCur++; - } - - if ( nLevel ) - { - nNode++; - pNode = nNode < aEditDoc.Count() ? aEditDoc.GetObject( nNode ) : 0; - nCur = 0; - } - } - if ( nLevel == 0 ) // found - { - aMatchSel.Min() = aTmpSel.Min(); - aMatchSel.Max() = EditPaM( pNode, nCur+1 ); - } - } - else - { - // Search backwards... - xub_Unicode nEC = aGroupChars.GetChar( nMatchChar ); - xub_Unicode nSC = aGroupChars.GetChar( nMatchChar-1 ); - - sal_uInt16 nCur = aTmpSel.Min().GetIndex()-1; - sal_uInt16 nLevel = 1; - while ( pNode && nLevel ) - { - if ( pNode->Len() ) - { - XubString& rStr = *pNode; - while ( nCur ) - { - if ( rStr.GetChar( nCur ) == nSC ) - { - nLevel--; - if ( !nLevel ) - break; // while nCur... - } - else if ( rStr.GetChar( nCur ) == nEC ) - nLevel++; - - nCur--; - } - } - - if ( nLevel ) - { - pNode = nNode ? aEditDoc.GetObject( --nNode ) : 0; - if ( pNode ) - nCur = pNode->Len()-1; // no matter if negative, because if Len () - } - } - - if ( nLevel == 0 ) // found - { - aMatchSel.Min() = aTmpSel.Min(); - aMatchSel.Min().GetIndex()++; // after the character - aMatchSel.Max() = EditPaM( pNode, nCur ); - } - } - } - return aMatchSel; -} - void ImpEditEngine::SetActiveView( EditView* pView ) { // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |