update dev300-m58
[ooovba.git] / sw / source / ui / inc / label.hxx
blobf5b74db370bb3c939af21c269c5da8b1e0180d37
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: label.hxx,v $
10 * $Revision: 1.7 $
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 ************************************************************************/
30 #ifndef _LABEL_HXX
31 #define _LABEL_HXX
33 #ifndef _SVSTDARR_HXX
34 #define _SVSTDARR_STRINGSDTOR
35 #define _SVSTDARR_USHORTS
36 #include <svtools/svstdarr.hxx>
37 #endif
38 #include <sfx2/tabdlg.hxx>
39 #include <com/sun/star/frame/XModel.hpp>
40 #include <labelcfg.hxx>
41 class SwLabRec;
42 class SwLabRecs;
43 class SwLabItem;
44 class SwLabPrtPage;
45 class SwNewDBMgr;
46 class Printer;
48 class SwLabDlg : public SfxTabDialog
50 SwLabelConfig aLabelsCfg;
51 SwNewDBMgr* pNewDBMgr;
52 SwLabPrtPage* pPrtPage;
54 SvUShorts aTypeIds;
55 SvStringsDtor aMakes;
57 SwLabRecs* pRecs;
58 String aLstGroup;
59 String sBusinessCardDlg;
60 String sFormat;
61 String sMedium;
62 BOOL m_bLabel;
63 void _ReplaceGroup( const String &rMake );
65 virtual void PageCreated( USHORT nId, SfxTabPage &rPage );
66 public:
68 SwLabDlg( Window* pParent, const SfxItemSet& rSet,
69 SwNewDBMgr* pNewDBMgr, BOOL bLabel);
70 ~SwLabDlg();
72 SwLabRec* GetRecord(const String &rRecName, BOOL bCont);
73 void GetLabItem(SwLabItem &rItem);
75 SwLabRecs &Recs() { return *pRecs; }
76 const SwLabRecs &Recs() const { return *pRecs; }
78 SvUShorts &TypeIds() { return aTypeIds; }
79 const SvUShorts &TypeIds() const { return aTypeIds; }
81 SvStringsDtor &Makes() { return aMakes; }
82 const SvStringsDtor &Makes() const { return aMakes; }
84 Printer *GetPrt();
85 inline void ReplaceGroup( const String &rMake );
86 void UpdateGroup( const String &rMake ) {_ReplaceGroup( rMake );}
87 static void UpdateFieldInformation(::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
88 const SwLabItem& rItem);
89 const String& GetBusinessCardStr() const {return sBusinessCardDlg;}
91 SwLabelConfig& GetLabelsConfig() {return aLabelsCfg;}
95 inline void SwLabDlg::ReplaceGroup( const String &rMake )
97 if ( rMake != aLstGroup )
98 _ReplaceGroup( rMake );
101 #endif