1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 #include <sfx2/tabdlg.hxx>
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <labelcfg.hxx>
34 class SwLabDlg
: public SfxTabDialog
36 SwLabelConfig aLabelsCfg
;
37 SwNewDBMgr
* pNewDBMgr
;
38 SwLabPrtPage
* pPrtPage
;
40 std::vector
<sal_uInt16
> aTypeIds
;
41 std::vector
<OUString
> aMakes
;
45 String sBusinessCardDlg
;
49 void _ReplaceGroup( const String
&rMake
);
51 virtual void PageCreated( sal_uInt16 nId
, SfxTabPage
&rPage
);
54 SwLabDlg( Window
* pParent
, const SfxItemSet
& rSet
,
55 SwNewDBMgr
* pNewDBMgr
, sal_Bool bLabel
);
58 SwLabRec
* GetRecord(const String
&rRecName
, sal_Bool bCont
);
59 void GetLabItem(SwLabItem
&rItem
);
61 SwLabRecs
&Recs() { return *pRecs
; }
62 const SwLabRecs
&Recs() const { return *pRecs
; }
64 std::vector
<sal_uInt16
> &TypeIds() { return aTypeIds
; }
65 const std::vector
<sal_uInt16
> &TypeIds() const { return aTypeIds
; }
67 std::vector
<OUString
> &Makes() { return aMakes
; }
68 const std::vector
<OUString
> &Makes() const { return aMakes
; }
71 inline void ReplaceGroup( const String
&rMake
);
72 void UpdateGroup( const String
&rMake
) {_ReplaceGroup( rMake
);}
73 static void UpdateFieldInformation(::com::sun::star::uno::Reference
< ::com::sun::star::frame::XModel
>& xModel
,
74 const SwLabItem
& rItem
);
75 const String
& GetBusinessCardStr() const {return sBusinessCardDlg
;}
77 SwLabelConfig
& GetLabelsConfig() {return aLabelsCfg
;}
81 inline void SwLabDlg::ReplaceGroup( const String
&rMake
)
83 if ( rMake
!= aLstGroup
)
84 _ReplaceGroup( rMake
);
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */