1*3a7cf181SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*3a7cf181SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*3a7cf181SAndrew Rist * or more contributor license agreements. See the NOTICE file 5*3a7cf181SAndrew Rist * distributed with this work for additional information 6*3a7cf181SAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*3a7cf181SAndrew Rist * to you under the Apache License, Version 2.0 (the 8*3a7cf181SAndrew Rist * "License"); you may not use this file except in compliance 9*3a7cf181SAndrew Rist * with the License. You may obtain a copy of the License at 10cdf0e10cSrcweir * 11*3a7cf181SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12cdf0e10cSrcweir * 13*3a7cf181SAndrew Rist * Unless required by applicable law or agreed to in writing, 14*3a7cf181SAndrew Rist * software distributed under the License is distributed on an 15*3a7cf181SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*3a7cf181SAndrew Rist * KIND, either express or implied. See the License for the 17*3a7cf181SAndrew Rist * specific language governing permissions and limitations 18*3a7cf181SAndrew Rist * under the License. 19cdf0e10cSrcweir * 20*3a7cf181SAndrew Rist *************************************************************/ 21*3a7cf181SAndrew Rist 22*3a7cf181SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #include "precompiled_configmgr.hxx" 25cdf0e10cSrcweir #include "sal/config.h" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include "com/sun/star/uno/Any.hxx" 28cdf0e10cSrcweir #include "rtl/ref.hxx" 29cdf0e10cSrcweir #include "rtl/ustring.h" 30cdf0e10cSrcweir #include "rtl/ustring.hxx" 31cdf0e10cSrcweir 32cdf0e10cSrcweir #include "localizedvaluenode.hxx" 33cdf0e10cSrcweir #include "node.hxx" 34cdf0e10cSrcweir 35cdf0e10cSrcweir namespace configmgr { 36cdf0e10cSrcweir 37cdf0e10cSrcweir namespace { 38cdf0e10cSrcweir 39cdf0e10cSrcweir namespace css = com::sun::star; 40cdf0e10cSrcweir 41cdf0e10cSrcweir } 42cdf0e10cSrcweir 43cdf0e10cSrcweir LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value): 44cdf0e10cSrcweir Node(layer), value_(value) 45cdf0e10cSrcweir {} 46cdf0e10cSrcweir 47cdf0e10cSrcweir rtl::Reference< Node > LocalizedValueNode::clone(bool) const { 48cdf0e10cSrcweir return new LocalizedValueNode(*this); 49cdf0e10cSrcweir } 50cdf0e10cSrcweir 51cdf0e10cSrcweir rtl::OUString LocalizedValueNode::getTemplateName() const { 52cdf0e10cSrcweir return rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("*")); 53cdf0e10cSrcweir } 54cdf0e10cSrcweir 55cdf0e10cSrcweir css::uno::Any LocalizedValueNode::getValue() const { 56cdf0e10cSrcweir return value_; 57cdf0e10cSrcweir } 58cdf0e10cSrcweir 59cdf0e10cSrcweir void LocalizedValueNode::setValue(int layer, css::uno::Any const & value) { 60cdf0e10cSrcweir setLayer(layer); 61cdf0e10cSrcweir value_ = value; 62cdf0e10cSrcweir } 63cdf0e10cSrcweir 64cdf0e10cSrcweir LocalizedValueNode::LocalizedValueNode(LocalizedValueNode const & other): 65cdf0e10cSrcweir Node(other), value_(other.value_) 66cdf0e10cSrcweir {} 67cdf0e10cSrcweir 68cdf0e10cSrcweir LocalizedValueNode::~LocalizedValueNode() {} 69cdf0e10cSrcweir 70cdf0e10cSrcweir Node::Kind LocalizedValueNode::kind() const { 71cdf0e10cSrcweir return KIND_LOCALIZED_VALUE; 72cdf0e10cSrcweir } 73cdf0e10cSrcweir 74cdf0e10cSrcweir } 75