Kaydet (Commit) 962a5983 authored tarafından Oliver Specht's avatar Oliver Specht

copy bookmarks: keep type

üst ed157c55
......@@ -2,9 +2,9 @@
*
* $RCSfile: bookmrk.hxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-18 17:14:24 $
* last change: $Author: os $ $Date: 2001-01-10 13:40:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -138,6 +138,7 @@ public:
BOOL IsDDEMark() const { return DDE_BOOKMARK == eMarkType; }
BOOL IsUNOMark() const { return UNO_BOOKMARK == eMarkType; }
void SetType( BOOKMARK_TYPE eNewType ) { eMarkType = eNewType; }
BOOKMARK_TYPE GetType() const { return eMarkType; }
void SetStartMacro(const SvxMacro& rSt) { aStartMacro = rSt; }
const SvxMacro& GetStartMacro() { return aStartMacro; }
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: docbm.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-19 00:08:15 $
* last change: $Author: os $ $Date: 2001-01-10 13:41:24 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -280,7 +280,8 @@ SaveBookmark::SaveBookmark( int eType, const SwBookmark& rBkmk,
const SwNodeIndex & rMvPos,
const SwIndex* pIdx )
: aName( rBkmk.GetName() ), aShortName( rBkmk.GetShortName() ),
aCode( rBkmk.GetKeyCode() ), eBkmkType( (SaveBookmarkType)eType )
aCode( rBkmk.GetKeyCode() ), eBkmkType( (SaveBookmarkType)eType ),
eOrigBkmType(rBkmk.GetType())
{
nNode1 = rBkmk.GetPos().nNode.GetIndex();
nCntnt1 = rBkmk.GetPos().nContent.GetIndex();
......@@ -353,7 +354,7 @@ void SaveBookmark::SetInDoc( SwDoc* pDoc, const SwNodeIndex& rNewPos,
if( !aPam.HasMark() ||
CheckNodesRange( aPam.GetPoint()->nNode, aPam.GetMark()->nNode, TRUE ))
pDoc->MakeBookmark( aPam, aCode, aName, aShortName );
pDoc->MakeBookmark( aPam, aCode, aName, aShortName, eOrigBkmType );
}
......@@ -396,6 +397,9 @@ void _DelBookmarks( const SwNodeIndex& rStt, const SwNodeIndex& rEnd,
// liegt auf der Position ??
int eType = BKMK_POS_NONE;
SwBookmark* pBkmk = rBkmks[ nCnt ];
//simple marks should not be moved
if(pBkmk->IsMark())
continue;
if( GreaterThan( pBkmk->GetPos(), rStt, pSttIdx ) &&
Lower( pBkmk->GetPos(), rEnd, pEndIdx ))
eType = BKMK_POS;
......
......@@ -2,9 +2,9 @@
*
* $RCSfile: ndcopy.cxx,v $
*
* $Revision: 1.1.1.1 $
* $Revision: 1.2 $
*
* last change: $Author: hr $ $Date: 2000-09-19 00:08:17 $
* last change: $Author: os $ $Date: 2001-01-10 13:41:45 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
......@@ -572,7 +572,7 @@ void lcl_CopyBookmarks( const SwPaM& rPam, SwPaM& rCpyPam )
USHRT_MAX != pDestDoc->FindBookmark( sNewNm ) )
pDestDoc->MakeUniqueBookmarkName( sNewNm );
pDestDoc->MakeBookmark( aTmpPam, pBkmk->GetKeyCode(), sNewNm,
pBkmk->GetShortName() );
pBkmk->GetShortName(), pBkmk->GetType() );
}
pDestDoc->DoUndo( bDoesUndo );
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment