LibreOffice Module sc (master)  1
optuno.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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/.
8  *
9  * This file incorporates work covered by the following license notice:
10  *
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 .
18  */
19 
20 #pragma once
21 
22 #include "docuno.hxx"
23 #include "docoptio.hxx"
24 
25 #define PROP_UNO_CALCASSHOWN 1
26 #define PROP_UNO_DEFTABSTOP 2
27 #define PROP_UNO_IGNORECASE 3
28 #define PROP_UNO_ITERENABLED 4
29 #define PROP_UNO_ITERCOUNT 5
30 #define PROP_UNO_ITEREPSILON 6
31 #define PROP_UNO_LOOKUPLABELS 7
32 #define PROP_UNO_MATCHWHOLE 8
33 #define PROP_UNO_NULLDATE 9
34 #define PROP_UNO_SPELLONLINE 10
35 #define PROP_UNO_STANDARDDEC 11
36 #define PROP_UNO_REGEXENABLED 12
37 #define PROP_UNO_WILDCARDSENABLED 13
38 
40 {
41 public:
43 
44  static bool setPropertyValue( ScDocOptions& rOptions,
45  const SfxItemPropertyMap& rPropMap,
46  std::u16string_view aPropertyName,
47  const css::uno::Any& aValue );
48  static css::uno::Any getPropertyValue(
49  const ScDocOptions& rOptions,
50  const SfxItemPropertyMap& rPropMap,
51  std::u16string_view PropertyName );
52 };
53 
54 // empty doc object to supply only doc options
55 
56 class ScDocOptionsObj final : public ScModelObj
57 {
58 private:
60 
61 public:
62  ScDocOptionsObj( const ScDocOptions& rOpt );
63  virtual ~ScDocOptionsObj() override;
64 
65  // get/setPropertyValue override to used stored options instead of document
66 
67  virtual void SAL_CALL setPropertyValue( const OUString& aPropertyName,
68  const css::uno::Any& aValue ) override;
69  virtual css::uno::Any SAL_CALL getPropertyValue(
70  const OUString& PropertyName ) override;
71 };
72 
73 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
ScDocOptions aOptions
Definition: optuno.hxx:59
static css::uno::Any getPropertyValue(const ScDocOptions &rOptions, const SfxItemPropertyMap &rPropMap, std::u16string_view PropertyName)
Definition: optuno.cxx:129
static bool setPropertyValue(ScDocOptions &rOptions, const SfxItemPropertyMap &rPropMap, std::u16string_view aPropertyName, const css::uno::Any &aValue)
Definition: optuno.cxx:54
static const SfxItemPropertyMapEntry * GetPropertyMap()
Definition: optuno.cxx:32
virtual ~ScDocOptionsObj() override
Definition: optuno.cxx:196
ScDocOptionsObj(const ScDocOptions &rOpt)
Definition: optuno.cxx:190
virtual void SAL_CALL setPropertyValue(const OUString &aPropertyName, const css::uno::Any &aValue) override
Definition: optuno.cxx:200
virtual css::uno::Any SAL_CALL getPropertyValue(const OUString &PropertyName) override
Definition: optuno.cxx:211