xref: /aoo41x/main/sw/source/ui/inc/caption.hxx (revision 1d2dbeb0)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _CAPTION_HXX
24 #define _CAPTION_HXX
25 
26 #include <tools/string.hxx>
27 //#ifndef _STREAM_HXX //autogen
28 //#include <tools/stream.hxx>
29 //#endif
30 #include <tools/globname.hxx>
31 #include <SwCapObjType.hxx>
32 #include "swdllapi.h"
33 
34 /*--------------------------------------------------------------------
35 	Beschreibung:
36  --------------------------------------------------------------------*/
37 
38 class SW_DLLPUBLIC InsCaptionOpt
39 {
40 private:
41     sal_Bool            bUseCaption;
42     SwCapObjType    eObjType;
43     SvGlobalName    aOleId;
44     String          sCategory;
45     sal_uInt16          nNumType;
46     ::rtl::OUString sNumberSeparator;
47     String          sCaption;
48     sal_uInt16          nPos;
49     sal_uInt16          nLevel;
50 //  sal_Unicode     cSeparator;
51     String          sSeparator;
52     String          sCharacterStyle;
53 
54     sal_Bool         bIgnoreSeqOpts;    // wird nicht gespeichert
55 	sal_Bool		 bCopyAttributes;   // 			-""-
56 
57 public:
58 	InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
59 	InsCaptionOpt(const InsCaptionOpt&);
60 	~InsCaptionOpt();
61 
UseCaption()62 	inline sal_Bool&			UseCaption()					{ return bUseCaption; }
UseCaption() const63 	inline sal_Bool				UseCaption() const				{ return bUseCaption; }
64 
GetObjType() const65 	inline SwCapObjType		GetObjType() const				{ return eObjType; }
SetObjType(const SwCapObjType eType)66 	inline void				SetObjType(const SwCapObjType eType) { eObjType = eType; }
67 
GetOleId() const68 	inline const SvGlobalName&	GetOleId() const				{ return aOleId; }
SetOleId(const SvGlobalName & rId)69 	inline void				SetOleId(const SvGlobalName &rId)	{ aOleId = rId; }
70 
GetCategory() const71 	inline const String&	GetCategory() const				{ return sCategory; }
SetCategory(const String & rCat)72 	inline void				SetCategory(const String& rCat) { sCategory = rCat; }
73 
GetNumType() const74 	inline sal_uInt16			GetNumType() const				{ return nNumType; }
SetNumType(const sal_uInt16 nNT)75 	inline void				SetNumType(const sal_uInt16 nNT)	{ nNumType = nNT; }
76 
GetNumSeparator() const77     const ::rtl::OUString&  GetNumSeparator() const { return sNumberSeparator; }
SetNumSeparator(const::rtl::OUString & rSet)78     void                    SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;}
79 
GetCaption() const80     inline const String&    GetCaption() const              { return sCaption; }
SetCaption(const String & rCap)81 	inline void				SetCaption(const String& rCap)	{ sCaption = rCap; }
82 
GetPos() const83 	inline sal_uInt16			GetPos() const					{ return nPos; }
SetPos(const sal_uInt16 nP)84 	inline void				SetPos(const sal_uInt16 nP)			{ nPos = nP; }
85 
GetLevel() const86 	inline sal_uInt16			GetLevel() const				{ return nLevel; }
SetLevel(const sal_uInt16 nLvl)87 	inline void				SetLevel(const sal_uInt16 nLvl)		{ nLevel = nLvl; }
88 
89 //	inline sal_Unicode		GetSeparator() const				{ return cSeparator; }
90 //	inline void				SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
GetSeparator() const91 	inline const String&	GetSeparator() const				{ return sSeparator; }
SetSeparator(const String & rSep)92 	inline void				SetSeparator(const String& rSep)	{ sSeparator = rSep; }
93 
GetCharacterStyle() const94     const String&           GetCharacterStyle() const { return sCharacterStyle; }
SetCharacterStyle(const String & rStyle)95     void                    SetCharacterStyle(const String& rStyle)
96                                     { sCharacterStyle = rStyle; }
97 
IgnoreSeqOpts()98 	inline sal_Bool&			IgnoreSeqOpts()					{ return bIgnoreSeqOpts; }
IgnoreSeqOpts() const99 	inline sal_Bool				IgnoreSeqOpts() const			{ return bIgnoreSeqOpts; }
100 
CopyAttributes()101 	inline sal_Bool& 			CopyAttributes() 				{ return bCopyAttributes; }
CopyAttributes() const102 	inline sal_Bool 			CopyAttributes() const			{ return bCopyAttributes; }
103 
104 	sal_Bool					operator==( const InsCaptionOpt& rOpt ) const;
105 	InsCaptionOpt&			operator= ( const InsCaptionOpt& rOpt );
operator <(const InsCaptionOpt & rObj) const106 	inline sal_Bool				operator< ( const InsCaptionOpt & rObj ) const
107 												{ return aOleId < rObj.aOleId; }
108 //  friend SvStream&        operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
109 //  friend SvStream&        operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );
110 };
111 
112 #endif
113 
114 
115