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: label.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 ************************************************************************/
34 #define _SVSTDARR_STRINGSDTOR
35 #define _SVSTDARR_USHORTS
36 #include <svtools/svstdarr.hxx>
38 #include <sfx2/tabdlg.hxx>
39 #include <com/sun/star/frame/XModel.hpp>
40 #include <labelcfg.hxx>
48 class SwLabDlg
: public SfxTabDialog
50 SwLabelConfig aLabelsCfg
;
51 SwNewDBMgr
* pNewDBMgr
;
52 SwLabPrtPage
* pPrtPage
;
59 String sBusinessCardDlg
;
63 void _ReplaceGroup( const String
&rMake
);
65 virtual void PageCreated( USHORT nId
, SfxTabPage
&rPage
);
68 SwLabDlg( Window
* pParent
, const SfxItemSet
& rSet
,
69 SwNewDBMgr
* pNewDBMgr
, BOOL bLabel
);
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
; }
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
);