1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: saveopt.hxx,v $
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>
37 #ifndef _SV_FIELD_HXX //autogen
38 #include <vcl/field.hxx>
40 #ifndef _STRING_HXX //autogen
41 #include <tools/string.hxx>
43 #ifndef _SFXPOOLITEM_HXX //autogen
44 #include <bf_svtools/poolitem.hxx>
46 // -----------------------------------------------------------------------
47 #include "bf_sfx2/cfgitem.hxx"
50 struct SfxOptions_Impl
;
52 // -----------------------------------------------------------------------
53 class SfxOptions
: public SfxConfigItem
56 struct SfxOptions_Impl
58 SfxMapUnit eUserMetric
;
86 void SetMetric_Impl( FieldUnit e
, BOOL bLoading
);
89 virtual int Load(SvStream
&);
90 virtual BOOL
Store(SvStream
&);
91 virtual void UseDefault();
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