xref: /aoo41x/main/sw/source/ui/inc/label.hxx (revision 1d2dbeb0)
1*1d2dbeb0SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*1d2dbeb0SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*1d2dbeb0SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*1d2dbeb0SAndrew Rist  * distributed with this work for additional information
6*1d2dbeb0SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*1d2dbeb0SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*1d2dbeb0SAndrew Rist  * "License"); you may not use this file except in compliance
9*1d2dbeb0SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*1d2dbeb0SAndrew Rist  *
11*1d2dbeb0SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*1d2dbeb0SAndrew Rist  *
13*1d2dbeb0SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*1d2dbeb0SAndrew Rist  * software distributed under the License is distributed on an
15*1d2dbeb0SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*1d2dbeb0SAndrew Rist  * KIND, either express or implied.  See the License for the
17*1d2dbeb0SAndrew Rist  * specific language governing permissions and limitations
18*1d2dbeb0SAndrew Rist  * under the License.
19*1d2dbeb0SAndrew Rist  *
20*1d2dbeb0SAndrew Rist  *************************************************************/
21*1d2dbeb0SAndrew Rist 
22*1d2dbeb0SAndrew Rist 
23cdf0e10cSrcweir #ifndef _LABEL_HXX
24cdf0e10cSrcweir #define _LABEL_HXX
25cdf0e10cSrcweir 
26cdf0e10cSrcweir #ifndef _SVSTDARR_HXX
27cdf0e10cSrcweir #define _SVSTDARR_STRINGSDTOR
28cdf0e10cSrcweir #define _SVSTDARR_USHORTS
29cdf0e10cSrcweir #include <svl/svstdarr.hxx>
30cdf0e10cSrcweir #endif
31cdf0e10cSrcweir #include <sfx2/tabdlg.hxx>
32cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp>
33cdf0e10cSrcweir #include <labelcfg.hxx>
34cdf0e10cSrcweir class SwLabRec;
35cdf0e10cSrcweir class SwLabRecs;
36cdf0e10cSrcweir class SwLabItem;
37cdf0e10cSrcweir class SwLabPrtPage;
38cdf0e10cSrcweir class SwNewDBMgr;
39cdf0e10cSrcweir class Printer;
40cdf0e10cSrcweir 
41cdf0e10cSrcweir class SwLabDlg : public SfxTabDialog
42cdf0e10cSrcweir {
43cdf0e10cSrcweir 	SwLabelConfig	aLabelsCfg;
44cdf0e10cSrcweir 	SwNewDBMgr*   	pNewDBMgr;
45cdf0e10cSrcweir 	SwLabPrtPage* 	pPrtPage;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir 	SvUShorts	  	aTypeIds;
48cdf0e10cSrcweir 	SvStringsDtor 	aMakes;
49cdf0e10cSrcweir 
50cdf0e10cSrcweir 	SwLabRecs*		pRecs;
51cdf0e10cSrcweir 	String 		  	aLstGroup;
52cdf0e10cSrcweir 	String 			sBusinessCardDlg;
53cdf0e10cSrcweir 	String 			sFormat;
54cdf0e10cSrcweir 	String 			sMedium;
55cdf0e10cSrcweir 	sal_Bool			m_bLabel;
56cdf0e10cSrcweir     void          _ReplaceGroup( const String &rMake );
57cdf0e10cSrcweir 
58cdf0e10cSrcweir 	virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
59cdf0e10cSrcweir public:
60cdf0e10cSrcweir 
61cdf0e10cSrcweir 	 SwLabDlg( Window* pParent, const SfxItemSet& rSet,
62cdf0e10cSrcweir 	 			SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
63cdf0e10cSrcweir 	~SwLabDlg();
64cdf0e10cSrcweir 
65cdf0e10cSrcweir 	SwLabRec*	GetRecord(const String &rRecName, sal_Bool bCont);
66cdf0e10cSrcweir 	void		GetLabItem(SwLabItem &rItem);
67cdf0e10cSrcweir 
Recs()68cdf0e10cSrcweir 		  SwLabRecs &Recs() 	  	  { return *pRecs;	 }
Recs() const69cdf0e10cSrcweir 	const SwLabRecs &Recs()		const { return *pRecs;	 }
70cdf0e10cSrcweir 
TypeIds()71cdf0e10cSrcweir 		  SvUShorts  &TypeIds() 	  { return aTypeIds; }
TypeIds() const72cdf0e10cSrcweir 	const SvUShorts  &TypeIds() const { return aTypeIds; }
73cdf0e10cSrcweir 
Makes()74cdf0e10cSrcweir 		  SvStringsDtor  &Makes()		  { return aMakes;	 }
Makes() const75cdf0e10cSrcweir 	const SvStringsDtor  &Makes()	const { return aMakes;	 }
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	Printer *GetPrt();
78cdf0e10cSrcweir     inline void ReplaceGroup( const String &rMake );
UpdateGroup(const String & rMake)79cdf0e10cSrcweir     void UpdateGroup( const String &rMake ) {_ReplaceGroup( rMake );}
80cdf0e10cSrcweir     static void UpdateFieldInformation(::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
81cdf0e10cSrcweir 																				const SwLabItem& rItem);
GetBusinessCardStr() const82cdf0e10cSrcweir 	const String& GetBusinessCardStr() const {return sBusinessCardDlg;}
83cdf0e10cSrcweir 
GetLabelsConfig()84cdf0e10cSrcweir 	SwLabelConfig& GetLabelsConfig() {return aLabelsCfg;}
85cdf0e10cSrcweir 
86cdf0e10cSrcweir };
87cdf0e10cSrcweir 
ReplaceGroup(const String & rMake)88cdf0e10cSrcweir inline void SwLabDlg::ReplaceGroup( const String &rMake )
89cdf0e10cSrcweir {
90cdf0e10cSrcweir 	if ( rMake != aLstGroup )
91cdf0e10cSrcweir         _ReplaceGroup( rMake );
92cdf0e10cSrcweir }
93cdf0e10cSrcweir 
94cdf0e10cSrcweir #endif
95cdf0e10cSrcweir 
96