Update ooo320-m1
[ooovba.git] / binfilter / inc / bf_sfx2 / saveopt.hxx
blobde693dd662ec9bdcdd8842bd322f532c75791bdc
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: saveopt.hxx,v $
10 * $Revision: 1.5 $
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 ************************************************************************/
30 #ifndef _SFX_SAVEOPT_HXX
31 #define _SFX_SAVEOPT_HXX
34 #ifndef _SV_WINTYPES_HXX //autogen
35 #include <vcl/wintypes.hxx>
36 #endif
37 #ifndef _SV_FIELD_HXX //autogen
38 #include <vcl/field.hxx>
39 #endif
40 #ifndef _STRING_HXX //autogen
41 #include <tools/string.hxx>
42 #endif
43 #ifndef _SFXPOOLITEM_HXX //autogen
44 #include <bf_svtools/poolitem.hxx>
45 #endif
46 // -----------------------------------------------------------------------
47 #include "bf_sfx2/cfgitem.hxx"
48 namespace binfilter {
50 struct SfxOptions_Impl;
52 // -----------------------------------------------------------------------
53 class SfxOptions : public SfxConfigItem
55 #if _SOLAR__PRIVATE
56 struct SfxOptions_Impl
58 SfxMapUnit eUserMetric;
59 BOOL bSaveDocWins:1,
60 bSaveDocView:1,
61 bSaveRelINet:1,
62 bSaveRelFSys:1,
63 bAutoHelpAgent:1,
64 bSaveGrfCompr:1,
65 bSaveGrfOrig:1,
66 bWelcomeScreen:1;
67 String aRet;
69 #endif
71 SfxOptions_Impl*pImp;
72 String aDocMgrConfig;
73 USHORT nAutoSaveTime;
74 USHORT nUndoActions;
75 FieldUnit eMetric;
76 BOOL bBackup:1,
77 bAutoSave:1,
78 bDocInfSave:1,
79 bIndepGrfFmt:1,
80 bAutoSavePrompt:1,
81 bSaveWorkingSet:1,
82 bHelpBalloons:1,
83 bHelpTips:1;
85 private:
86 void SetMetric_Impl( FieldUnit e, BOOL bLoading );
88 protected:
89 virtual int Load(SvStream&);
90 virtual BOOL Store(SvStream&);
91 virtual void UseDefault();
93 public:
94 SfxOptions();
95 ~SfxOptions();
97 void SetBackup( BOOL b ) { bBackup = b;SetDefault(FALSE);}
98 BOOL IsBackup() const { return bBackup; }
99 void SetAutoSave( BOOL b ) { bAutoSave = b; SetDefault(FALSE); }
100 BOOL IsAutoSave() const { return bAutoSave; }
101 void SetAutoSavePrompt( BOOL b ) { bAutoSavePrompt = b;SetDefault(FALSE); }
102 BOOL IsAutoSavePrompt() const { return bAutoSavePrompt; }
103 void SetAutoSaveTime( USHORT n ) { nAutoSaveTime = n;SetDefault(FALSE); }
104 USHORT GetAutoSaveTime() const { return nAutoSaveTime; }
105 void SetDocInfoSave(BOOL b) { bDocInfSave = b; SetDefault(FALSE); }
106 BOOL IsDocInfoSave() const { return bDocInfSave; }
108 void SetSaveOriginalGraphics(BOOL b);
109 BOOL IsSaveOriginalGraphics() const;
110 void SetSaveGraphicsCompressed(BOOL b);
111 BOOL IsSaveGraphicsCompressed() const;
113 void SetIndepGrfFmt(BOOL b) { bIndepGrfFmt = b; SetDefault(FALSE);}
114 BOOL IsIndepGrfFmt() const { return bIndepGrfFmt; }
115 void SetSaveWorkingSet( BOOL b ) { bSaveWorkingSet = b;SetDefault(FALSE);}
116 BOOL IsSaveWorkingSet() const { return bSaveWorkingSet; }
117 void SetSaveDocWins( BOOL b );
118 BOOL IsSaveDocWins() const;
119 void SetSaveDocView( BOOL b );
120 BOOL IsSaveDocView() const;
121 void SetAutoHelpAgent( BOOL b );
122 BOOL IsAutoHelpAgent() const;
123 void SetWelcomeScreen( BOOL b );
124 BOOL IsWelcomeScreen() const;
126 void SetMetric(FieldUnit e);
127 FieldUnit GetMetric() const { return eMetric; }
128 SfxMapUnit GetUserMetric() const;
130 void SetUndoCount(USHORT n) { nUndoActions = n; SetDefault(FALSE);}
131 USHORT GetUndoCount() const { return nUndoActions; }
133 void SetHelpBalloons( BOOL b ) { bHelpBalloons = b; SetDefault(FALSE); }
134 BOOL IsHelpBalloons() const { return bHelpBalloons; }
135 void SetHelpTips( BOOL b ) { bHelpTips = b; SetDefault(FALSE); }
136 BOOL IsHelpTips() const { return bHelpTips; }
138 const String& GetDocumentManagerConfig() const
139 { return aDocMgrConfig; }
140 void SetDocumentManagerConfig( const String &rConfig )
141 { aDocMgrConfig = rConfig; SetDefault(FALSE); }
143 void SetSaveRelINet( BOOL b );
144 BOOL IsSaveRelINet() const;
145 void SetSaveRelFSys( BOOL b );
146 BOOL IsSaveRelFSys() const;
149 }//end of namespace binfilter
150 #endif