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 #include "precompiled_configmgr.hxx" 25 #include "sal/config.h" 26 27 #include "com/sun/star/uno/Any.hxx" 28 #include "rtl/ref.hxx" 29 #include "rtl/ustring.h" 30 #include "rtl/ustring.hxx" 31 32 #include "localizedvaluenode.hxx" 33 #include "node.hxx" 34 35 namespace configmgr { 36 37 namespace { 38 39 namespace css = com::sun::star; 40 41 } 42 43 LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value): 44 Node(layer), value_(value) 45 {} 46 47 rtl::Reference< Node > LocalizedValueNode::clone(bool) const { 48 return new LocalizedValueNode(*this); 49 } 50 51 rtl::OUString LocalizedValueNode::getTemplateName() const { 52 return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); 53 } 54 55 css::uno::Any LocalizedValueNode::getValue() const { 56 return value_; 57 } 58 59 void LocalizedValueNode::setValue(int layer, css::uno::Any const & value) { 60 setLayer(layer); 61 value_ = value; 62 } 63 64 LocalizedValueNode::LocalizedValueNode(LocalizedValueNode const & other): 65 Node(other), value_(other.value_) 66 {} 67 68 LocalizedValueNode::~LocalizedValueNode() {} 69 70 Node::Kind LocalizedValueNode::kind() const { 71 return KIND_LOCALIZED_VALUE; 72 } 73 74 } 75