Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
5 : * This Source Code Form is subject to the terms of the Mozilla Public
6 : * License, v. 2.0. If a copy of the MPL was not distributed with this
7 : * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
11 : * Licensed to the Apache Software Foundation (ASF) under one or more
12 : * contributor license agreements. See the NOTICE file distributed
13 : * with this work for additional information regarding copyright
14 : * ownership. The ASF licenses this file to you under the Apache
15 : * License, Version 2.0 (the "License"); you may not use this file
16 : * except in compliance with the License. You may obtain a copy of
17 : * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 : */
19 :
20 : #ifndef _NOTEURL_HXX
21 : #define _NOTEURL_HXX
22 :
23 :
24 : #include <tools/string.hxx>
25 : #include "swrect.hxx"
26 : #include <boost/ptr_container/ptr_vector.hpp>
27 :
28 : class ImageMap;
29 : class MapMode;
30 :
31 0 : class SwURLNote
32 : {
33 : String aURL;
34 : String aTarget;
35 : SwRect aRect;
36 : public:
37 0 : SwURLNote( const String& rURL, const String& rTarget, const SwRect& rRect )
38 0 : : aURL( rURL ), aTarget( rTarget ), aRect( rRect )
39 0 : {}
40 0 : const String& GetURL() const { return aURL; }
41 0 : const String& GetTarget() const { return aTarget; }
42 0 : const SwRect& GetRect() const { return aRect; }
43 : sal_Bool operator==( const SwURLNote& rSwURLNote ) const
44 : { return aRect == rSwURLNote.aRect; }
45 : };
46 :
47 : typedef boost::ptr_vector<SwURLNote> SwURLNoteList;
48 :
49 0 : class SwNoteURL
50 : {
51 : SwURLNoteList aList;
52 : public:
53 0 : SwNoteURL() {}
54 0 : sal_uInt16 Count() const { return aList.size(); }
55 : void InsertURLNote( const String& rURL, const String& rTarget,
56 : const SwRect& rRect );
57 0 : const SwURLNote& GetURLNote( sal_uInt16 nPos ) const
58 0 : { return aList[ nPos ]; }
59 : void FillImageMap( ImageMap* pMap, const Point& rPos, const MapMode& rMap );
60 : };
61 :
62 : // globale Variable, in NoteURL.Cxx angelegt
63 : extern SwNoteURL *pNoteURL;
64 :
65 :
66 : #endif
67 :
68 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|