Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / optutil.hxx
blob151c0c06b2ae37c21c90d08e9ad65d45ce5d8d4a
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef SC_OPTUTIL_HXX
21 #define SC_OPTUTIL_HXX
23 #include <unotools/configitem.hxx>
24 #include <tools/link.hxx>
25 #include "scdllapi.h"
28 class ScOptionsUtil
30 public:
31 // values must correspond with integer values stored in the configuration
32 enum KeyBindingType { KEY_DEFAULT = 0, KEY_OOO_LEGACY = 1 };
34 static sal_Bool IsMetricSystem();
38 // ConfigItem for classes that use items from several sub trees
40 class SC_DLLPUBLIC ScLinkConfigItem : public utl::ConfigItem
42 Link aCommitLink;
44 public:
45 ScLinkConfigItem( const OUString& rSubTree );
46 ScLinkConfigItem( const OUString& rSubTree, sal_Int16 nMode );
47 void SetCommitLink( const Link& rLink );
49 virtual void Notify( const com::sun::star::uno::Sequence<OUString>& aPropertyNames );
50 virtual void Commit();
52 void SetModified() { ConfigItem::SetModified(); }
53 com::sun::star::uno::Sequence< com::sun::star::uno::Any>
54 GetProperties(const com::sun::star::uno::Sequence< OUString >& rNames)
55 { return ConfigItem::GetProperties( rNames ); }
56 sal_Bool PutProperties( const com::sun::star::uno::Sequence< OUString >& rNames,
57 const com::sun::star::uno::Sequence< com::sun::star::uno::Any>& rValues)
58 { return ConfigItem::PutProperties( rNames, rValues ); }
60 using ConfigItem::EnableNotification;
61 using ConfigItem::GetNodeNames;
65 #endif
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */