update dev300-m57
[ooovba.git] / sc / inc / printopt.hxx
blobe21e418d3c7795d9a3c733ff3f021e7bc807757d
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: printopt.hxx,v $
10 * $Revision: 1.5.32.2 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SC_PRINTOPT_HXX
32 #define SC_PRINTOPT_HXX
34 #include <svtools/poolitem.hxx>
35 #include <unotools/configitem.hxx>
36 #include "scdllapi.h"
38 class SC_DLLPUBLIC ScPrintOptions
40 private:
41 BOOL bSkipEmpty;
42 BOOL bAllSheets;
44 public:
45 ScPrintOptions();
46 ScPrintOptions( const ScPrintOptions& rCpy );
47 ~ScPrintOptions();
49 BOOL GetSkipEmpty() const { return bSkipEmpty; }
50 void SetSkipEmpty( BOOL bVal ) { bSkipEmpty = bVal; }
51 BOOL GetAllSheets() const { return bAllSheets; }
52 void SetAllSheets( BOOL bVal ) { bAllSheets = bVal; }
54 void SetDefaults();
56 const ScPrintOptions& operator= ( const ScPrintOptions& rCpy );
57 int operator== ( const ScPrintOptions& rOpt ) const;
58 int operator!= ( const ScPrintOptions& rOpt ) const;
61 //==================================================================
62 // item for the dialog / options page
63 //==================================================================
65 class SC_DLLPUBLIC ScTpPrintItem : public SfxPoolItem
67 public:
68 TYPEINFO();
69 //UNUSED2008-05 ScTpPrintItem( USHORT nWhich );
70 ScTpPrintItem( USHORT nWhich,
71 const ScPrintOptions& rOpt );
72 ScTpPrintItem( const ScTpPrintItem& rItem );
73 ~ScTpPrintItem();
75 virtual String GetValueText() const;
76 virtual int operator==( const SfxPoolItem& ) const;
77 virtual SfxPoolItem* Clone( SfxItemPool *pPool = 0 ) const;
79 const ScPrintOptions& GetPrintOptions() const { return theOptions; }
81 private:
82 ScPrintOptions theOptions;
85 //==================================================================
86 // config item
87 //==================================================================
89 class ScPrintCfg : public ScPrintOptions, public utl::ConfigItem
91 com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
93 public:
94 ScPrintCfg();
96 void SetOptions( const ScPrintOptions& rNew );
98 virtual void Commit();
101 #endif