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
27class SwLabItem;
28class SwLabPrtPage;
29class SwDBManager;
30class Printer;
31
32class SwLabDlg final : public SfxTabDialogController
33{
37
38 std::vector<sal_uInt16> m_aTypeIds;
39 std::vector<OUString> m_aMakes;
40
41 std::unique_ptr<SwLabRecs> m_pRecs;
42 OUString m_aLstGroup;
45 void ReplaceGroup_( const OUString &rMake );
46
47 virtual void PageCreated(const OUString& rId, SfxTabPage &rPage) override;
48public:
49
50 SwLabDlg(weld::Window* pParent, const SfxItemSet& rSet,
51 SwDBManager* pDBManager, bool bLabel);
52 virtual ~SwLabDlg() override;
53
54 SwLabRec* GetRecord(std::u16string_view 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 m_aTypeIds; }
61 const std::vector<sal_uInt16> &TypeIds() const { return m_aTypeIds; }
62
63 std::vector<OUString> &Makes() { return m_aMakes; }
64 const std::vector<OUString> &Makes() const { return m_aMakes; }
65
66 Printer *GetPrt();
67 void ReplaceGroup( const OUString &rMake )
68 {
69 if ( rMake != m_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: */
std::vector< OUString > m_aMakes
Definition: label.hxx:39
SwLabRec * GetRecord(std::u16string_view rRecName, bool bCont)
Definition: label1.cxx:179
virtual ~SwLabDlg() override
Definition: label1.cxx:153
OUString m_sBusinessCardDlg
Definition: label.hxx:43
SwLabDlg(weld::Window *pParent, const SfxItemSet &rSet, SwDBManager *pDBManager, bool bLabel)
Definition: label1.cxx:88
bool m_bLabel
Definition: label.hxx:44
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
Definition: label1.cxx:75
SwLabelConfig m_aLabelsCfg
Definition: label.hxx:34
const std::vector< sal_uInt16 > & TypeIds() const
Definition: label.hxx:61
Printer * GetPrt()
Definition: label1.cxx:202
SwLabPrtPage * m_pPrtPage
Definition: label.hxx:36
static void UpdateFieldInformation(css::uno::Reference< css::frame::XModel > const &xModel, const SwLabItem &rItem)
Definition: labelexp.cxx:32
void ReplaceGroup_(const OUString &rMake)
Definition: label1.cxx:67
void UpdateGroup(const OUString &rMake)
Definition: label.hxx:73
const SwLabRecs & Recs() const
Definition: label.hxx:58
void GetLabItem(SwLabItem &rItem)
Definition: label1.cxx:158
SwLabelConfig & GetLabelsConfig()
Definition: label.hxx:78
std::vector< sal_uInt16 > m_aTypeIds
Definition: label.hxx:38
SwLabRecs & Recs()
Definition: label.hxx:57
std::unique_ptr< SwLabRecs > m_pRecs
Definition: label.hxx:41
std::vector< sal_uInt16 > & TypeIds()
Definition: label.hxx:60
SwDBManager * m_pDBManager
Definition: label.hxx:35
OUString m_aLstGroup
Definition: label.hxx:42
const OUString & GetBusinessCardStr() const
Definition: label.hxx:76
void ReplaceGroup(const OUString &rMake)
Definition: label.hxx:67
const std::vector< OUString > & Makes() const
Definition: label.hxx:64
std::vector< OUString > & Makes()
Definition: label.hxx:63
std::vector< std::unique_ptr< SwLabRec > > SwLabRecs
Definition: labrec.hxx:54