diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
commit | b5d79ba0c2c3a07331406eb0f3bbb3d40986320f (patch) | |
tree | 316e92b8935ce9711ca450c054511b9a0bca764f /sw/source/ui/wrtsh | |
parent | eb1e977a36bfeebf17c57a167238c610c74be783 (diff) | |
parent | 5edc2d8ffaf658b05e4b044e44bd360697c3d08c (diff) |
chartshapes: merge with DEV300 m50
Diffstat (limited to 'sw/source/ui/wrtsh')
-rw-r--r-- | sw/source/ui/wrtsh/move.cxx | 4 | ||||
-rw-r--r-- | sw/source/ui/wrtsh/wrtsh3.cxx | 28 |
2 files changed, 14 insertions, 18 deletions
diff --git a/sw/source/ui/wrtsh/move.cxx b/sw/source/ui/wrtsh/move.cxx index 65ea252f8543..e250b35e6a00 100644 --- a/sw/source/ui/wrtsh/move.cxx +++ b/sw/source/ui/wrtsh/move.cxx @@ -670,10 +670,10 @@ BOOL SwWrtShell::GotoPage(USHORT nPage, BOOL bRecord) -BOOL SwWrtShell::GotoBookmark( USHORT nPos, BOOL bSelect, BOOL bStart ) +BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark, BOOL bSelect, BOOL bStart ) { ShellMoveCrsr aTmp( this, bSelect ); - return SwCrsrShell::GotoBookmark( nPos, bStart ); + return SwCrsrShell::GotoMark( pMark, bStart ); } diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx index ba85c0c07777..f7d2cdc2dad2 100644 --- a/sw/source/ui/wrtsh/wrtsh3.cxx +++ b/sw/source/ui/wrtsh/wrtsh3.cxx @@ -48,7 +48,7 @@ #include <tools/urlobj.hxx> #include "wrtsh.hxx" #include "view.hxx" -#include "bookmrk.hxx" +#include "IMark.hxx" #include "doc.hxx" #include "wrtsh.hrc" @@ -60,8 +60,7 @@ using ::rtl::OUString; extern sal_Bool bNoInterrupt; // in mainwn.cxx -BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, - sal_uInt16 nPos ) +BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, const ::sw::mark::IMark* const pMark) { //JP 08.03.96: die Wizards brauchen die Selektion !! // EndSelect(); @@ -70,7 +69,7 @@ BOOL SwWrtShell::MoveBookMark( BookMarkMove eFuncId, BOOL bRet = sal_True; switch(eFuncId) { - case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoBookmark( nPos );break; + case BOOKMARK_INDEX:bRet = SwCrsrShell::GotoMark( pMark );break; case BOOKMARK_NEXT: bRet = SwCrsrShell::GoNextBookmark();break; case BOOKMARK_PREV: bRet = SwCrsrShell::GoPrevBookmark();break; default:;//prevent warning @@ -109,11 +108,10 @@ BOOL SwWrtShell::GotoField( const SwFmtFld& rFld ) return bRet; } -bool SwWrtShell::GotoFieldBookmark(SwBookmark *pBkmk) +bool SwWrtShell::GotoFieldmark(::sw::mark::IFieldmark const * const pMark) { - (this->*fnKillSel)( 0, sal_False ); - - bool bRet = SwCrsrShell::GotoFieldBookmark(pBkmk); + (this->*fnKillSel)( 0, sal_False ); + bool bRet = SwCrsrShell::GotoFieldmark(pMark); if( bRet && IsSelFrmMode() ) { UnSelectFrm(); @@ -148,19 +146,17 @@ void SwWrtShell::DrawSelChanged( ) bNoInterrupt = bOldVal; } -BOOL SwWrtShell::GotoBookmark( const String& rName ) +BOOL SwWrtShell::GotoMark( const ::rtl::OUString& rName ) { - sal_uInt16 nPos = FindBookmark( rName ); - if( USHRT_MAX == nPos ) - return sal_False; - - return MoveBookMark( BOOKMARK_INDEX, nPos ); + IDocumentMarkAccess::const_iterator_t ppMark = getIDocumentMarkAccess()->findMark( rName ); + if(ppMark == getIDocumentMarkAccess()->getMarksEnd()) return false; + return MoveBookMark( BOOKMARK_INDEX, ppMark->get() ); } -BOOL SwWrtShell::GotoBookmark( sal_uInt16 nPos ) +BOOL SwWrtShell::GotoMark( const ::sw::mark::IMark* const pMark ) { - return MoveBookMark( BOOKMARK_INDEX, nPos ); + return MoveBookMark( BOOKMARK_INDEX, pMark ); } |