2010-10-14 08:30:41 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 16:15:01 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 19:09:32 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 19:09:32 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 19:09:32 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:15:01 +00:00
|
|
|
*
|
2008-04-10 19:09:32 +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
|
|
|
*
|
2008-04-10 19:09:32 +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
|
|
|
*
|
2008-04-10 19:09:32 +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
|
|
|
|
|
2009-10-16 00:05:16 +02:00
|
|
|
#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>
|
2011-07-13 13:41:41 +01:00
|
|
|
#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;
|
|
|
|
|
2011-07-13 13:41:41 +01:00
|
|
|
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;
|
2011-01-17 15:06:54 +01:00
|
|
|
sal_Bool m_bLabel;
|
2002-09-09 07:42:38 +00:00
|
|
|
void _ReplaceGroup( const String &rMake );
|
2000-09-18 16:15:01 +00:00
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
virtual void PageCreated( sal_uInt16 nId, SfxTabPage &rPage );
|
2000-09-18 16:15:01 +00:00
|
|
|
public:
|
|
|
|
|
|
|
|
SwLabDlg( Window* pParent, const SfxItemSet& rSet,
|
2011-01-17 15:06:54 +01:00
|
|
|
SwNewDBMgr* pNewDBMgr, sal_Bool bLabel);
|
2000-09-18 16:15:01 +00:00
|
|
|
~SwLabDlg();
|
|
|
|
|
2011-01-17 15:06:54 +01:00
|
|
|
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; }
|
|
|
|
|
2011-07-13 13:41:41 +01:00
|
|
|
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();
|
2002-09-09 07:42:38 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2002-09-09 07:42:38 +00:00
|
|
|
inline void SwLabDlg::ReplaceGroup( const String &rMake )
|
2000-09-18 16:15:01 +00:00
|
|
|
{
|
|
|
|
if ( rMake != aLstGroup )
|
2002-09-09 07:42:38 +00:00
|
|
|
_ReplaceGroup( rMake );
|
2000-09-18 16:15:01 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
2010-10-14 08:30:41 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|