bump product version to 4.1.6.2
[LibreOffice.git] / sw / source / ui / inc / label.hxx
blob65cd0a4d6e28b2467dd59a6cf878b82f27b142fe
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 .
19 #ifndef _LABEL_HXX
20 #define _LABEL_HXX
22 #include <sfx2/tabdlg.hxx>
23 #include <com/sun/star/frame/XModel.hpp>
24 #include <labelcfg.hxx>
25 #include <vector>
27 class SwLabRec;
28 class SwLabRecs;
29 class SwLabItem;
30 class SwLabPrtPage;
31 class SwNewDBMgr;
32 class Printer;
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;
43 SwLabRecs* pRecs;
44 String aLstGroup;
45 String sBusinessCardDlg;
46 String sFormat;
47 String sMedium;
48 sal_Bool m_bLabel;
49 void _ReplaceGroup( const String &rMake );
51 virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
52 public:
54 SwLabDlg( Window* pParent, const SfxItemSet& rSet,
55 SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
56 ~SwLabDlg();
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; }
70 Printer *GetPrt();
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 );
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */