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: appoptio.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 ************************************************************************/
31 #ifndef SC_APPOPTIO_HXX
32 #define SC_APPOPTIO_HXX
35 #ifndef _SV_FIELD_HXX //autogen
36 #include <vcl/field.hxx>
39 #ifndef _SVX_ZOOMITEM_HXX //autogen
40 #include <bf_svx/zoomitem.hxx>
43 #ifndef _UTL_CONFIGITEM_HXX_
44 #include <unotools/configitem.hxx>
51 #ifndef SC_OPTUTIL_HXX
52 #include "optutil.hxx"
61 ScAppOptions( const ScAppOptions
& rCpy
);
66 void SetAppMetric( FieldUnit eUnit
) { eMetric
= eUnit
; }
67 FieldUnit
GetAppMetric() const { return eMetric
; }
68 void SetZoom( USHORT nNew
) { nZoom
= nNew
; }
69 USHORT
GetZoom() const { return nZoom
; }
70 void SetZoomType( SvxZoomType eNew
) { eZoomType
= eNew
; }
71 SvxZoomType
GetZoomType() const { return eZoomType
; }
72 USHORT
GetLRUFuncListCount() const { return nLRUFuncCount
; }
73 USHORT
* GetLRUFuncList() const { return pLRUList
; }
74 void SetLRUFuncList( const USHORT
* pList
,
75 const USHORT nCount
);
76 void SetStatusFunc( USHORT nNew
) { nStatusFunc
= nNew
; }
77 USHORT
GetStatusFunc() const { return nStatusFunc
; }
78 void SetAutoComplete( BOOL bNew
) { bAutoComplete
= bNew
; }
79 BOOL
GetAutoComplete() const { return bAutoComplete
; }
80 void SetDetectiveAuto( BOOL bNew
) { bDetectiveAuto
= bNew
; }
81 BOOL
GetDetectiveAuto() const { return bDetectiveAuto
; }
83 void SetTrackContentColor(sal_uInt32 nNew
) { nTrackContentColor
= nNew
; }
84 sal_uInt32
GetTrackContentColor() const { return nTrackContentColor
; }
85 void SetTrackInsertColor(sal_uInt32 nNew
) { nTrackInsertColor
= nNew
; }
86 sal_uInt32
GetTrackInsertColor() const { return nTrackInsertColor
; }
87 void SetTrackDeleteColor(sal_uInt32 nNew
) { nTrackDeleteColor
= nNew
; }
88 sal_uInt32
GetTrackDeleteColor() const { return nTrackDeleteColor
; }
89 void SetTrackMoveColor(sal_uInt32 nNew
) { nTrackMoveColor
= nNew
; }
90 sal_uInt32
GetTrackMoveColor() const { return nTrackMoveColor
; }
92 ScLkUpdMode
GetLinkMode() const { return eLinkMode
;}
93 void SetLinkMode( ScLkUpdMode nSet
) { eLinkMode
= nSet
;}
95 void SetDefaultObjectSizeWidth(INT32 nNew
) { nDefaultObjectSizeWidth
= nNew
; }
96 INT32
GetDefaultObjectSizeWidth() const { return nDefaultObjectSizeWidth
; }
97 void SetDefaultObjectSizeHeight(INT32 nNew
) { nDefaultObjectSizeHeight
= nNew
; }
98 INT32
GetDefaultObjectSizeHeight() const { return nDefaultObjectSizeHeight
; }
101 const ScAppOptions
& operator= ( const ScAppOptions
& rOpt
);
102 /*N*/ friend SvStream
& operator>> ( SvStream
& rStream
, ScAppOptions
& rOpt
);
103 /*N*/ friend SvStream
& operator<< ( SvStream
& rStream
, const ScAppOptions
& rOpt
);
107 USHORT nLRUFuncCount
;
109 SvxZoomType eZoomType
;
114 sal_uInt32 nTrackContentColor
;
115 sal_uInt32 nTrackInsertColor
;
116 sal_uInt32 nTrackDeleteColor
;
117 sal_uInt32 nTrackMoveColor
;
118 ScLkUpdMode eLinkMode
;
119 INT32 nDefaultObjectSizeWidth
;
120 INT32 nDefaultObjectSizeHeight
;
124 //==================================================================
125 // Config Item containing app options
126 //==================================================================
128 class ScAppCfg
: public ScAppOptions
130 // spread about 5 config paths
131 //! split ScAppOptions into different classes
133 ScLinkConfigItem aLayoutItem
;
134 ScLinkConfigItem aInputItem
;
135 ScLinkConfigItem aRevisionItem
;
136 ScLinkConfigItem aContentItem
;
137 ScLinkConfigItem aSortListItem
;
138 ScLinkConfigItem aMiscItem
;
140 DECL_LINK( LayoutCommitHdl
, void* );
141 DECL_LINK( InputCommitHdl
, void* );
142 DECL_LINK( RevisionCommitHdl
, void* );
143 DECL_LINK( ContentCommitHdl
, void* );
144 DECL_LINK( SortListCommitHdl
, void* );
145 DECL_LINK( MiscCommitHdl
, void* );
147 ::com::sun::star::uno::Sequence
<rtl::OUString
> GetLayoutPropertyNames();
148 ::com::sun::star::uno::Sequence
<rtl::OUString
> GetInputPropertyNames();
149 ::com::sun::star::uno::Sequence
<rtl::OUString
> GetRevisionPropertyNames();
150 ::com::sun::star::uno::Sequence
<rtl::OUString
> GetContentPropertyNames();
151 ::com::sun::star::uno::Sequence
<rtl::OUString
> GetSortListPropertyNames();
152 ::com::sun::star::uno::Sequence
<rtl::OUString
> GetMiscPropertyNames();
157 void SetOptions( const ScAppOptions
& rNew
){DBG_BF_ASSERT(0, "STRIP");} //STRIP001 void SetOptions( const ScAppOptions& rNew );
161 } //namespace binfilter