2010-10-12 15:53:47 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-12 21:00:32 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2014-05-28 15:24:46 +02:00
|
|
|
#include <sal/config.h>
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2014-05-28 15:24:46 +02:00
|
|
|
#include <com/sun/star/uno/Any.hxx>
|
|
|
|
#include <rtl/ref.hxx>
|
|
|
|
#include <rtl/ustring.hxx>
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2009-09-04 11:42:31 +02:00
|
|
|
#include "localizedvaluenode.hxx"
|
2009-05-20 17:20:08 +02:00
|
|
|
#include "node.hxx"
|
2009-05-15 14:06:56 +02:00
|
|
|
|
|
|
|
namespace configmgr {
|
|
|
|
|
2009-09-04 11:42:31 +02:00
|
|
|
LocalizedValueNode::LocalizedValueNode(int layer, css::uno::Any const & value):
|
2009-07-22 14:41:57 +02:00
|
|
|
Node(layer), value_(value)
|
2009-05-20 17:20:08 +02:00
|
|
|
{}
|
|
|
|
|
2014-06-26 13:47:54 +01:00
|
|
|
LocalizedValueNode::LocalizedValueNode(int layer):
|
|
|
|
Node(layer)
|
|
|
|
{}
|
|
|
|
|
2010-05-11 09:29:37 +02:00
|
|
|
rtl::Reference< Node > LocalizedValueNode::clone(bool) const {
|
2009-09-04 11:42:31 +02:00
|
|
|
return new LocalizedValueNode(*this);
|
2009-05-20 17:20:08 +02:00
|
|
|
}
|
|
|
|
|
2012-12-10 23:06:10 +02:00
|
|
|
OUString LocalizedValueNode::getTemplateName() const {
|
2019-07-30 17:57:37 +02:00
|
|
|
return "*";
|
2009-07-13 17:15:58 +02:00
|
|
|
}
|
|
|
|
|
2009-05-15 14:06:56 +02:00
|
|
|
|
2014-06-26 13:47:54 +01:00
|
|
|
void LocalizedValueNode::setValue(int layer, css::uno::Any const & value)
|
|
|
|
{
|
2009-09-16 17:01:38 +02:00
|
|
|
setLayer(layer);
|
2014-06-26 13:47:54 +01:00
|
|
|
if (&value != &value_)
|
|
|
|
value_ = value;
|
2009-05-20 17:20:08 +02:00
|
|
|
}
|
|
|
|
|
2009-09-04 11:42:31 +02:00
|
|
|
LocalizedValueNode::~LocalizedValueNode() {}
|
2009-05-20 17:20:08 +02:00
|
|
|
|
2009-09-04 11:42:31 +02:00
|
|
|
Node::Kind LocalizedValueNode::kind() const {
|
2009-09-04 11:24:45 +02:00
|
|
|
return KIND_LOCALIZED_VALUE;
|
|
|
|
}
|
|
|
|
|
2009-05-20 17:20:08 +02:00
|
|
|
}
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|