LibreOffice Module sc (master) 1
filtopt.cxx
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#include <com/sun/star/uno/Any.hxx>
21#include <com/sun/star/uno/Sequence.hxx>
22#include <osl/diagnose.h>
23
24#include <filtopt.hxx>
25#include <miscuno.hxx>
26
27using namespace utl;
28using namespace css::uno;
29
30constexpr OUStringLiteral CFGPATH_FILTER = u"Office.Calc/Filter/Import";
31
32#define SCFILTOPT_WK3 2
33
36 bWK3Flag( false )
37{
38 Sequence<OUString> aNames { "MS_Excel/ColScale", // SCFILTOPT_COLSCALE
39 "MS_Excel/RowScale", // SCFILTOPT_ROWSCALE
40 "Lotus123/WK3" }; // SCFILTOPT_WK3
41 Sequence<Any> aValues = GetProperties(aNames);
42 const Any* pValues = aValues.getConstArray();
43 OSL_ENSURE(aValues.getLength() == aNames.getLength(), "GetProperties failed");
44 if(aValues.getLength() != aNames.getLength())
45 return;
46
47 for(int nProp = 0; nProp < aNames.getLength(); nProp++)
48 {
49 OSL_ENSURE(pValues[nProp].hasValue(), "property value missing");
50 if(pValues[nProp].hasValue())
51 {
52 switch(nProp)
53 {
54 case SCFILTOPT_WK3:
56 break;
57 }
58 }
59 }
60}
61
63{
64 // options are never modified from office
65
66 OSL_FAIL("trying to commit changed ScFilterOptions?");
67}
68
69void ScFilterOptions::Notify( const Sequence<OUString>& /* aPropertyNames */ )
70{
71 OSL_FAIL("properties have been changed");
72}
73
74/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
const PropertyValue * pValues
virtual void Notify(const css::uno::Sequence< OUString > &aPropertyNames) override
Definition: filtopt.cxx:69
virtual void ImplCommit() override
Definition: filtopt.cxx:62
static bool GetBoolFromAny(const css::uno::Any &aAny)
Definition: miscuno.cxx:139
static css::uno::Sequence< css::uno::Any > GetProperties(css::uno::Reference< css::container::XHierarchicalNameAccess > const &xHierarchyAccess, const css::uno::Sequence< OUString > &rNames, bool bAllLocales)
float u
#define SCFILTOPT_WK3
Definition: filtopt.cxx:32
constexpr OUStringLiteral CFGPATH_FILTER
Definition: filtopt.cxx:30