Files
libreoffice/sw/source/ui/inc/label.hxx

100 lines
3.3 KiB
C++
Raw Normal View History

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2000-09-18 16:15:01 +00:00
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
2000-09-18 16:15:01 +00:00
*
* Copyright 2000, 2010 Oracle and/or its affiliates.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org - a multi-platform office productivity suite
2000-09-18 16:15:01 +00:00
*
* This file is part of OpenOffice.org.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 3
* only, as published by the Free Software Foundation.
2000-09-18 16:15:01 +00:00
*
* OpenOffice.org is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License version 3 for more details
* (a copy is included in the LICENSE file that accompanied this code).
2000-09-18 16:15:01 +00:00
*
* You should have received a copy of the GNU Lesser General Public License
* version 3 along with OpenOffice.org. If not, see
* <http://www.openoffice.org/license.html>
* for a copy of the LGPLv3 License.
2000-09-18 16:15:01 +00:00
*
************************************************************************/
#ifndef _LABEL_HXX
#define _LABEL_HXX
#include <svl/svstdarr.hxx>
2000-09-18 16:15:01 +00:00
#include <sfx2/tabdlg.hxx>
#include <com/sun/star/frame/XModel.hpp>
2001-01-15 13:05:11 +00:00
#include <labelcfg.hxx>
#include <vector>
2000-09-18 16:15:01 +00:00
class SwLabRec;
class SwLabRecs;
class SwLabItem;
class SwLabPrtPage;
class SwNewDBMgr;
class Printer;
class SwLabDlg : public SfxTabDialog
{
2001-01-15 13:05:11 +00:00
SwLabelConfig aLabelsCfg;
2000-09-18 16:15:01 +00:00
SwNewDBMgr* pNewDBMgr;
SwLabPrtPage* pPrtPage;
std::vector<sal_uInt16> aTypeIds;
2000-09-18 16:15:01 +00:00
SvStringsDtor aMakes;
SwLabRecs* pRecs;
String aLstGroup;
String sBusinessCardDlg;
String sFormat;
String sMedium;
sal_Bool m_bLabel;
void _ReplaceGroup( const String &rMake );
2000-09-18 16:15:01 +00:00
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
2000-09-18 16:15:01 +00:00
public:
SwLabDlg( Window* pParent, const SfxItemSet& rSet,
SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
2000-09-18 16:15:01 +00:00
~SwLabDlg();
SwLabRec* GetRecord(const String &rRecName, sal_Bool bCont);
2000-09-18 16:15:01 +00:00
void GetLabItem(SwLabItem &rItem);
SwLabRecs &Recs() { return *pRecs; }
const SwLabRecs &Recs() const { return *pRecs; }
std::vector<sal_uInt16> &TypeIds() { return aTypeIds; }
const std::vector<sal_uInt16> &TypeIds() const { return aTypeIds; }
2000-09-18 16:15:01 +00:00
SvStringsDtor &Makes() { return aMakes; }
const SvStringsDtor &Makes() const { return aMakes; }
Printer *GetPrt();
inline void ReplaceGroup( const String &rMake );
void UpdateGroup( const String &rMake ) {_ReplaceGroup( rMake );}
2000-09-18 16:15:01 +00:00
static void UpdateFieldInformation(::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel>& xModel,
const SwLabItem& rItem);
const String& GetBusinessCardStr() const {return sBusinessCardDlg;}
2001-01-24 08:06:54 +00:00
SwLabelConfig& GetLabelsConfig() {return aLabelsCfg;}
2000-09-18 16:15:01 +00:00
};
inline void SwLabDlg::ReplaceGroup( const String &rMake )
2000-09-18 16:15:01 +00:00
{
if ( rMake != aLstGroup )
_ReplaceGroup( rMake );
2000-09-18 16:15:01 +00:00
}
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */