1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: crossrefbookmark.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef _CROSSREFBOOKMRK_HXX
31 #define _CROSSREFBOOKMRK_HXX
34 #include <bookmrk.hxx>
35 #include <rtl/ustring.hxx>
38 namespace sw
{ namespace mark
40 class CrossRefBookmark
44 CrossRefBookmark(const SwPaM
& rPaM
,
46 const ::rtl::OUString
& rName
,
47 const ::rtl::OUString
& rShortName
,
48 const ::rtl::OUString
& rPrefix
);
51 virtual SwPosition
& GetOtherMarkPos() const;
52 virtual SwPosition
& GetMarkStart() const
54 virtual SwPosition
& GetMarkEnd() const
56 virtual bool IsExpanded() const
60 virtual void SetMarkPos(const SwPosition
& rNewPos
);
61 virtual void SetOtherMarkPos(const SwPosition
&)
64 "<CrossRefBookmark::SetOtherMarkPos(..)>"
65 " - misusage of CrossRefBookmark: other bookmark position isn't allowed to be set." );
67 virtual void ClearOtherMarkPos()
70 "<SwCrossRefBookmark::ClearOtherMarkPos(..)>"
71 " - misusage of CrossRefBookmark: other bookmark position isn't allowed to be set or cleared." );
75 class CrossRefHeadingBookmark
76 : public CrossRefBookmark
79 CrossRefHeadingBookmark(const SwPaM
& rPaM
,
81 const ::rtl::OUString
& rName
,
82 const ::rtl::OUString
& rShortName
);
83 static ::rtl::OUString
GenerateNewName();
84 static bool IsLegalName(const ::rtl::OUString
& rName
);
85 static const ::rtl::OUString our_sNamePrefix
;
88 class CrossRefNumItemBookmark
89 : public CrossRefBookmark
92 CrossRefNumItemBookmark(const SwPaM
& rPaM
,
94 const ::rtl::OUString
& rName
,
95 const ::rtl::OUString
& rShortName
);
96 static ::rtl::OUString
GenerateNewName();
97 static bool IsLegalName(const ::rtl::OUString
& rName
);
98 static const ::rtl::OUString our_sNamePrefix
;