LibreOffice Module sw (master)  1
label.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 #ifndef INCLUDED_SW_SOURCE_UIBASE_INC_LABEL_HXX
20 #define INCLUDED_SW_SOURCE_UIBASE_INC_LABEL_HXX
21 
22 #include <sfx2/tabdlg.hxx>
23 #include <com/sun/star/frame/XModel.hpp>
24 #include "labelcfg.hxx"
25 #include <vector>
26 
27 class SwLabItem;
28 class SwLabPrtPage;
29 class SwDBManager;
30 class Printer;
31 
33 {
37 
38  std::vector<sal_uInt16> aTypeIds;
39  std::vector<OUString> aMakes;
40 
41  std::unique_ptr<SwLabRecs> m_pRecs;
42  OUString aLstGroup;
44  bool const m_bLabel;
45  void ReplaceGroup_( const OUString &rMake );
46 
47  virtual void PageCreated(const OString& rId, SfxTabPage &rPage) override;
48 public:
49 
50  SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
51  SwDBManager* pDBManager, bool bLabel);
52  virtual ~SwLabDlg() override;
53 
54  SwLabRec* GetRecord(const OUString &rRecName, bool bCont);
55  void GetLabItem(SwLabItem &rItem);
56 
57  SwLabRecs &Recs() { return *m_pRecs; }
58  const SwLabRecs &Recs() const { return *m_pRecs; }
59 
60  std::vector<sal_uInt16> &TypeIds() { return aTypeIds; }
61  const std::vector<sal_uInt16> &TypeIds() const { return aTypeIds; }
62 
63  std::vector<OUString> &Makes() { return aMakes; }
64  const std::vector<OUString> &Makes() const { return aMakes; }
65 
66  Printer *GetPrt();
67  void ReplaceGroup( const OUString &rMake )
68  {
69  if ( rMake != aLstGroup )
70  ReplaceGroup_( rMake );
71  }
72 
73  void UpdateGroup( const OUString &rMake ) {ReplaceGroup_( rMake );}
74  static void UpdateFieldInformation(css::uno::Reference< css::frame::XModel> const & xModel,
75  const SwLabItem& rItem);
76  const OUString& GetBusinessCardStr() const {return m_sBusinessCardDlg;}
77 
79 
80 };
81 
82 #endif
83 
84 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void ReplaceGroup(const OUString &rMake)
Definition: label.hxx:67
Printer * GetPrt()
Definition: label1.cxx:214
std::vector< sal_uInt16 > aTypeIds
Definition: label.hxx:38
static void UpdateFieldInformation(css::uno::Reference< css::frame::XModel > const &xModel, const SwLabItem &rItem)
Definition: labelexp.cxx:36
const OUString & GetBusinessCardStr() const
Definition: label.hxx:76
bool const m_bLabel
Definition: label.hxx:44
SwLabPrtPage * m_pPrtPage
Definition: label.hxx:36
void ReplaceGroup_(const OUString &rMake)
Definition: label1.cxx:71
std::vector< OUString > & Makes()
Definition: label.hxx:63
SwDBManager *const pDBManager
Definition: label.hxx:35
std::vector< sal_uInt16 > & TypeIds()
Definition: label.hxx:60
OUString m_sBusinessCardDlg
Definition: label.hxx:43
std::unique_ptr< SwLabRecs > m_pRecs
Definition: label.hxx:41
SwLabelConfig & GetLabelsConfig()
Definition: label.hxx:78
SwLabRec * GetRecord(const OUString &rRecName, bool bCont)
Definition: label1.cxx:191
OUString aLstGroup
Definition: label.hxx:42
SwLabelConfig aLabelsCfg
Definition: label.hxx:34
virtual void PageCreated(const OString &rId, SfxTabPage &rPage) override
Definition: label1.cxx:79
const std::vector< OUString > & Makes() const
Definition: label.hxx:64
void UpdateGroup(const OUString &rMake)
Definition: label.hxx:73
const SwLabRecs & Recs() const
Definition: label.hxx:58
virtual ~SwLabDlg() override
Definition: label1.cxx:165
std::vector< std::unique_ptr< SwLabRec > > SwLabRecs
Definition: labrec.hxx:53
std::vector< OUString > aMakes
Definition: label.hxx:39
SwLabDlg(weld::Window *pParent, const SfxItemSet &rSet, SwDBManager *pDBManager, bool bLabel)
Definition: label1.cxx:95
const std::vector< sal_uInt16 > & TypeIds() const
Definition: label.hxx:61
SwLabRecs & Recs()
Definition: label.hxx:57
void GetLabItem(SwLabItem &rItem)
Definition: label1.cxx:170