xref: /aoo42x/main/sc/source/core/tool/optutil.cxx (revision b3f79822)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sc.hxx"
26 
27 
28 
29 #include <vcl/svapp.hxx>
30 
31 #include "optutil.hxx"
32 #include "global.hxx"       // for pSysLocale
33 #include <unotools/syslocale.hxx>
34 
35 //------------------------------------------------------------------
36 
37 // static
IsMetricSystem()38 sal_Bool ScOptionsUtil::IsMetricSystem()
39 {
40 	//!	which language should be used here - system language or installed office language?
41 
42 //	MeasurementSystem eSys = Application::GetAppInternational().GetMeasurementSystem();
43     MeasurementSystem eSys = ScGlobal::pLocaleData->getMeasurementSystemEnum();
44 
45 	return ( eSys == MEASURE_METRIC );
46 }
47 
48 //------------------------------------------------------------------
49 
ScLinkConfigItem(const rtl::OUString & rSubTree)50 ScLinkConfigItem::ScLinkConfigItem( const rtl::OUString& rSubTree ) :
51     ConfigItem( rSubTree )
52 {
53 }
54 
ScLinkConfigItem(const rtl::OUString & rSubTree,sal_Int16 nMode)55 ScLinkConfigItem::ScLinkConfigItem( const rtl::OUString& rSubTree, sal_Int16 nMode ) :
56     ConfigItem( rSubTree, nMode )
57 {
58 }
59 
SetCommitLink(const Link & rLink)60 void ScLinkConfigItem::SetCommitLink( const Link& rLink )
61 {
62 	aCommitLink = rLink;
63 }
64 
Notify(const com::sun::star::uno::Sequence<rtl::OUString> &)65 void ScLinkConfigItem::Notify( const com::sun::star::uno::Sequence<rtl::OUString>& /* aPropertyNames */ )
66 {
67 	//!	not implemented yet...
68 }
69 
Commit()70 void ScLinkConfigItem::Commit()
71 {
72 	aCommitLink.Call( this );
73 }
74 
75 
76