xref: /trunk/main/sw/source/ui/inc/caption.hxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir #ifndef _CAPTION_HXX
28*cdf0e10cSrcweir #define _CAPTION_HXX
29*cdf0e10cSrcweir 
30*cdf0e10cSrcweir #include <tools/string.hxx>
31*cdf0e10cSrcweir //#ifndef _STREAM_HXX //autogen
32*cdf0e10cSrcweir //#include <tools/stream.hxx>
33*cdf0e10cSrcweir //#endif
34*cdf0e10cSrcweir #include <tools/globname.hxx>
35*cdf0e10cSrcweir #include <SwCapObjType.hxx>
36*cdf0e10cSrcweir #include "swdllapi.h"
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir /*--------------------------------------------------------------------
39*cdf0e10cSrcweir     Beschreibung:
40*cdf0e10cSrcweir  --------------------------------------------------------------------*/
41*cdf0e10cSrcweir 
42*cdf0e10cSrcweir class SW_DLLPUBLIC InsCaptionOpt
43*cdf0e10cSrcweir {
44*cdf0e10cSrcweir private:
45*cdf0e10cSrcweir     sal_Bool            bUseCaption;
46*cdf0e10cSrcweir     SwCapObjType    eObjType;
47*cdf0e10cSrcweir     SvGlobalName    aOleId;
48*cdf0e10cSrcweir     String          sCategory;
49*cdf0e10cSrcweir     sal_uInt16          nNumType;
50*cdf0e10cSrcweir     ::rtl::OUString sNumberSeparator;
51*cdf0e10cSrcweir     String          sCaption;
52*cdf0e10cSrcweir     sal_uInt16          nPos;
53*cdf0e10cSrcweir     sal_uInt16          nLevel;
54*cdf0e10cSrcweir //  sal_Unicode     cSeparator;
55*cdf0e10cSrcweir     String          sSeparator;
56*cdf0e10cSrcweir     String          sCharacterStyle;
57*cdf0e10cSrcweir 
58*cdf0e10cSrcweir     sal_Bool         bIgnoreSeqOpts;    // wird nicht gespeichert
59*cdf0e10cSrcweir     sal_Bool         bCopyAttributes;   //          -""-
60*cdf0e10cSrcweir 
61*cdf0e10cSrcweir public:
62*cdf0e10cSrcweir     InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
63*cdf0e10cSrcweir     InsCaptionOpt(const InsCaptionOpt&);
64*cdf0e10cSrcweir     ~InsCaptionOpt();
65*cdf0e10cSrcweir 
66*cdf0e10cSrcweir     inline sal_Bool&            UseCaption()                    { return bUseCaption; }
67*cdf0e10cSrcweir     inline sal_Bool             UseCaption() const              { return bUseCaption; }
68*cdf0e10cSrcweir 
69*cdf0e10cSrcweir     inline SwCapObjType     GetObjType() const              { return eObjType; }
70*cdf0e10cSrcweir     inline void             SetObjType(const SwCapObjType eType) { eObjType = eType; }
71*cdf0e10cSrcweir 
72*cdf0e10cSrcweir     inline const SvGlobalName&  GetOleId() const                { return aOleId; }
73*cdf0e10cSrcweir     inline void             SetOleId(const SvGlobalName &rId)   { aOleId = rId; }
74*cdf0e10cSrcweir 
75*cdf0e10cSrcweir     inline const String&    GetCategory() const             { return sCategory; }
76*cdf0e10cSrcweir     inline void             SetCategory(const String& rCat) { sCategory = rCat; }
77*cdf0e10cSrcweir 
78*cdf0e10cSrcweir     inline sal_uInt16           GetNumType() const              { return nNumType; }
79*cdf0e10cSrcweir     inline void             SetNumType(const sal_uInt16 nNT)    { nNumType = nNT; }
80*cdf0e10cSrcweir 
81*cdf0e10cSrcweir     const ::rtl::OUString&  GetNumSeparator() const { return sNumberSeparator; }
82*cdf0e10cSrcweir     void                    SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;}
83*cdf0e10cSrcweir 
84*cdf0e10cSrcweir     inline const String&    GetCaption() const              { return sCaption; }
85*cdf0e10cSrcweir     inline void             SetCaption(const String& rCap)  { sCaption = rCap; }
86*cdf0e10cSrcweir 
87*cdf0e10cSrcweir     inline sal_uInt16           GetPos() const                  { return nPos; }
88*cdf0e10cSrcweir     inline void             SetPos(const sal_uInt16 nP)         { nPos = nP; }
89*cdf0e10cSrcweir 
90*cdf0e10cSrcweir     inline sal_uInt16           GetLevel() const                { return nLevel; }
91*cdf0e10cSrcweir     inline void             SetLevel(const sal_uInt16 nLvl)     { nLevel = nLvl; }
92*cdf0e10cSrcweir 
93*cdf0e10cSrcweir //  inline sal_Unicode      GetSeparator() const                { return cSeparator; }
94*cdf0e10cSrcweir //  inline void             SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
95*cdf0e10cSrcweir     inline const String&    GetSeparator() const                { return sSeparator; }
96*cdf0e10cSrcweir     inline void             SetSeparator(const String& rSep)    { sSeparator = rSep; }
97*cdf0e10cSrcweir 
98*cdf0e10cSrcweir     const String&           GetCharacterStyle() const { return sCharacterStyle; }
99*cdf0e10cSrcweir     void                    SetCharacterStyle(const String& rStyle)
100*cdf0e10cSrcweir                                     { sCharacterStyle = rStyle; }
101*cdf0e10cSrcweir 
102*cdf0e10cSrcweir     inline sal_Bool&            IgnoreSeqOpts()                 { return bIgnoreSeqOpts; }
103*cdf0e10cSrcweir     inline sal_Bool             IgnoreSeqOpts() const           { return bIgnoreSeqOpts; }
104*cdf0e10cSrcweir 
105*cdf0e10cSrcweir     inline sal_Bool&            CopyAttributes()                { return bCopyAttributes; }
106*cdf0e10cSrcweir     inline sal_Bool             CopyAttributes() const          { return bCopyAttributes; }
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir     sal_Bool                    operator==( const InsCaptionOpt& rOpt ) const;
109*cdf0e10cSrcweir     InsCaptionOpt&          operator= ( const InsCaptionOpt& rOpt );
110*cdf0e10cSrcweir     inline sal_Bool             operator< ( const InsCaptionOpt & rObj ) const
111*cdf0e10cSrcweir                                                 { return aOleId < rObj.aOleId; }
112*cdf0e10cSrcweir //  friend SvStream&        operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
113*cdf0e10cSrcweir //  friend SvStream&        operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );
114*cdf0e10cSrcweir };
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir #endif
117*cdf0e10cSrcweir 
118*cdf0e10cSrcweir 
119