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: imap.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 ************************************************************************/
34 #ifndef INCLUDED_SVTDLLAPI_H
35 #include "bf_svtools/svtdllapi.h"
38 #ifndef _STRING_HXX //autogen
39 #include <tools/string.hxx>
41 #ifndef _STREAM_HXX //autogen
42 #include <tools/stream.hxx>
55 /******************************************************************************
59 \******************************************************************************/
68 // Binaer laden/speichern
69 void ImpWriteImageMap( SvStream
& rOStm
, const String
& ) const ;
70 void ImpReadImageMap( SvStream
& rIStm
, USHORT nCount
, const String
& );
77 ImageMap( const ImageMap
& rImageMap
);
79 // Der Dtor gibt den intern belegten
80 // Speicher wieder frei;
81 // alle IMapObjekte werden im Dtor zerstoert;
85 ImageMap
& operator=( const ImageMap
& rImageMap
);
87 // Vergleichsoperator (es wird alles auf Gleichheit geprueft)
88 BOOL
operator==( const ImageMap
& rImageMap
);
89 BOOL
operator!=( const ImageMap
& rImageMap
);
91 // In die Map wird ein neues IMap-Obkekt ans Ende eingefuegt
92 void InsertIMapObject( const IMapObject
& rIMapObject
);
94 // Zugriff auf einzelne IMapObjekte; die Objekte
95 // duerfen von aussen _nicht_ zerstoert werden
96 IMapObject
* GetFirstIMapObject() { return (IMapObject
*) maList
.First(); }
97 IMapObject
* GetNextIMapObject() { return (IMapObject
*) maList
.Next(); }
98 IMapObject
* GetLastIMapObject() { return (IMapObject
*) maList
.Last(); }
99 IMapObject
* GetPrevIMapObject() { return (IMapObject
*) maList
.Prev(); }
100 IMapObject
* GetIMapObject( USHORT nPos
) const { return (IMapObject
*) maList
.GetObject( nPos
); }
102 // Gibt die Gesamtanzahl der IMap-Objekte zurueck
103 UINT16
GetIMapObjectCount() const { return (UINT16
) maList
.Count(); }
105 // Loescht alle internen Objekte
106 void ClearImageMap();
108 // liefert die aktuelle Versionsnummer
109 UINT16
GetVersion() const;
111 // liefert / setzt den Namen der ImageMap
112 const String
& GetName() const { return aName
; }
113 void SetName( const String
& rName
) { aName
= rName
; }
115 // skaliert alle Objekte der ImageMap entpr. dem uebergebenen Faktor
116 void Scale( const Fraction
& rFractX
, const Fraction
& rFracY
);
119 void Write ( SvStream
& rOStm
, const String
& rBaseURL
) const;
120 void Read( SvStream
& rIStm
, const String
& rBaseURL
);
131 IMapCompat( const IMapCompat
& ) {}
132 IMapCompat
& operator=( const IMapCompat
& ) { return *this; }
133 BOOL
operator==( const IMapCompat
& ) { return FALSE
; }
137 IMapCompat( SvStream
& rStm
, const USHORT nStreamMode
);