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: caption.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 ************************************************************************/
33 #include <tools/string.hxx>
34 //#ifndef _STREAM_HXX //autogen
35 //#include <tools/stream.hxx>
37 #include <tools/globname.hxx>
38 #include <SwCapObjType.hxx>
41 /*--------------------------------------------------------------------
43 --------------------------------------------------------------------*/
45 class SW_DLLPUBLIC InsCaptionOpt
49 SwCapObjType eObjType
;
53 ::rtl::OUString sNumberSeparator
;
57 // sal_Unicode cSeparator;
59 String sCharacterStyle
;
61 BOOL bIgnoreSeqOpts
; // wird nicht gespeichert
62 BOOL bCopyAttributes
; // -""-
65 InsCaptionOpt(const SwCapObjType eType
= FRAME_CAP
, const SvGlobalName
* pOleId
= 0);
66 InsCaptionOpt(const InsCaptionOpt
&);
69 inline BOOL
& UseCaption() { return bUseCaption
; }
70 inline BOOL
UseCaption() const { return bUseCaption
; }
72 inline SwCapObjType
GetObjType() const { return eObjType
; }
73 inline void SetObjType(const SwCapObjType eType
) { eObjType
= eType
; }
75 inline const SvGlobalName
& GetOleId() const { return aOleId
; }
76 inline void SetOleId(const SvGlobalName
&rId
) { aOleId
= rId
; }
78 inline const String
& GetCategory() const { return sCategory
; }
79 inline void SetCategory(const String
& rCat
) { sCategory
= rCat
; }
81 inline USHORT
GetNumType() const { return nNumType
; }
82 inline void SetNumType(const USHORT nNT
) { nNumType
= nNT
; }
84 const ::rtl::OUString
& GetNumSeparator() const { return sNumberSeparator
; }
85 void SetNumSeparator(const ::rtl::OUString
& rSet
) {sNumberSeparator
= rSet
;}
87 inline const String
& GetCaption() const { return sCaption
; }
88 inline void SetCaption(const String
& rCap
) { sCaption
= rCap
; }
90 inline USHORT
GetPos() const { return nPos
; }
91 inline void SetPos(const USHORT nP
) { nPos
= nP
; }
93 inline USHORT
GetLevel() const { return nLevel
; }
94 inline void SetLevel(const USHORT nLvl
) { nLevel
= nLvl
; }
96 // inline sal_Unicode GetSeparator() const { return cSeparator; }
97 // inline void SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
98 inline const String
& GetSeparator() const { return sSeparator
; }
99 inline void SetSeparator(const String
& rSep
) { sSeparator
= rSep
; }
101 const String
& GetCharacterStyle() const { return sCharacterStyle
; }
102 void SetCharacterStyle(const String
& rStyle
)
103 { sCharacterStyle
= rStyle
; }
105 inline BOOL
& IgnoreSeqOpts() { return bIgnoreSeqOpts
; }
106 inline BOOL
IgnoreSeqOpts() const { return bIgnoreSeqOpts
; }
108 inline BOOL
& CopyAttributes() { return bCopyAttributes
; }
109 inline BOOL
CopyAttributes() const { return bCopyAttributes
; }
111 BOOL
operator==( const InsCaptionOpt
& rOpt
) const;
112 InsCaptionOpt
& operator= ( const InsCaptionOpt
& rOpt
);
113 inline BOOL
operator< ( const InsCaptionOpt
& rObj
) const
114 { return aOleId
< rObj
.aOleId
; }
115 // friend SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
116 // friend SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );