Branch data Line data Source code
1 : : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : : /*************************************************************************
3 : : *
4 : : * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 : : *
6 : : * Copyright 2000, 2010 Oracle and/or its affiliates.
7 : : *
8 : : * OpenOffice.org - a multi-platform office productivity suite
9 : : *
10 : : * This file is part of OpenOffice.org.
11 : : *
12 : : * OpenOffice.org is free software: you can redistribute it and/or modify
13 : : * it under the terms of the GNU Lesser General Public License version 3
14 : : * only, as published by the Free Software Foundation.
15 : : *
16 : : * OpenOffice.org is distributed in the hope that it will be useful,
17 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 : : * GNU Lesser General Public License version 3 for more details
20 : : * (a copy is included in the LICENSE file that accompanied this code).
21 : : *
22 : : * You should have received a copy of the GNU Lesser General Public License
23 : : * version 3 along with OpenOffice.org. If not, see
24 : : * <http://www.openoffice.org/license.html>
25 : : * for a copy of the LGPLv3 License.
26 : : *
27 : : ************************************************************************/
28 : :
29 : : #ifndef _CROSSREFBOOKMRK_HXX
30 : : #define _CROSSREFBOOKMRK_HXX
31 : :
32 : : #include <IMark.hxx>
33 : : #include <bookmrk.hxx>
34 : : #include <rtl/ustring.hxx>
35 : :
36 : : namespace sw {
37 : : namespace mark {
38 [ # # ][ # # ]: 6 : class CrossRefBookmark
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ # #
# # # # ]
[ + - ][ - + ]
[ # # ][ - + ]
[ # # ][ - + ]
[ - + ][ # #
# # # # ]
39 : : : public Bookmark
40 : : {
41 : : public:
42 : : CrossRefBookmark(const SwPaM& rPaM,
43 : : const KeyCode& rCode,
44 : : const ::rtl::OUString& rName,
45 : : const ::rtl::OUString& rShortName,
46 : : const ::rtl::OUString& rPrefix);
47 : :
48 : : virtual SwPosition& GetOtherMarkPos() const;
49 : 542 : virtual SwPosition& GetMarkStart() const
50 : 542 : { return *m_pPos1; }
51 : 122 : virtual SwPosition& GetMarkEnd() const
52 : 122 : { return *m_pPos1; }
53 : 294 : virtual bool IsExpanded() const
54 : 294 : { return false; }
55 : :
56 : : virtual void SetMarkPos(const SwPosition& rNewPos);
57 : 0 : virtual void SetOtherMarkPos(const SwPosition&)
58 : : {
59 : : OSL_PRECOND(false,
60 : : "<CrossRefBookmark::SetOtherMarkPos(..)>"
61 : : " - misusage of CrossRefBookmark: other bookmark position isn't allowed to be set." );
62 : 0 : }
63 : 0 : virtual void ClearOtherMarkPos()
64 : : {
65 : : OSL_PRECOND(false,
66 : : "<SwCrossRefBookmark::ClearOtherMarkPos(..)>"
67 : : " - misusage of CrossRefBookmark: other bookmark position isn't allowed to be set or cleared." );
68 : 0 : }
69 : : };
70 : :
71 [ # # ][ # # ]: 0 : class CrossRefHeadingBookmark
[ # # ][ # # ]
[ # # ][ # # ]
[ # # ][ # #
# # # # ]
72 : : : public CrossRefBookmark
73 : : {
74 : : public:
75 : : CrossRefHeadingBookmark(const SwPaM& rPaM,
76 : : const KeyCode& rCode,
77 : : const ::rtl::OUString& rName,
78 : : const ::rtl::OUString& rShortName);
79 : : static ::rtl::OUString GenerateNewName();
80 : : static bool IsLegalName(const ::rtl::OUString& rName);
81 : : };
82 : :
83 [ + - ][ + - ]: 12 : class CrossRefNumItemBookmark
[ + - ][ + - ]
[ + - ][ + - ]
[ - + ][ # #
# # # # ]
84 : : : public CrossRefBookmark
85 : : {
86 : : public:
87 : : CrossRefNumItemBookmark(const SwPaM& rPaM,
88 : : const KeyCode& rCode,
89 : : const ::rtl::OUString& rName,
90 : : const ::rtl::OUString& rShortName);
91 : : static ::rtl::OUString GenerateNewName();
92 : : static bool IsLegalName(const ::rtl::OUString& rName);
93 : : };
94 : : }
95 : : }
96 : :
97 : : #endif
98 : :
99 : : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|