LibreOffice Module svl (master) 1
custritm.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
22#include <osl/diagnose.h>
24#include <svl/custritm.hxx>
25
26
27// virtual
29{
30 assert(SfxPoolItem::operator==(rItem));
31 return m_aValue
32 == static_cast< const CntUnencodedStringItem * >(&rItem)->
34}
35
37{
38 assert(dynamic_cast<const CntUnencodedStringItem*>( &rItem ));
39 return m_aValue
40 < static_cast< const CntUnencodedStringItem * >(&rItem)->
42}
43
44// virtual
46 MapUnit, OUString & rText,
47 const IntlWrapper&) const
48{
49 rText = m_aValue;
50 return true;
51}
52
53// virtual
54bool CntUnencodedStringItem::QueryValue(css::uno::Any& rVal, sal_uInt8) const
55{
56 rVal <<= m_aValue;
57 return true;
58}
59
60// virtual
61bool CntUnencodedStringItem::PutValue(const css::uno::Any& rVal,
63{
64 OUString aTheValue;
65 if (rVal >>= aTheValue)
66 {
67 m_aValue = aTheValue;
68 return true;
69 }
70 OSL_FAIL("CntUnencodedStringItem::PutValue(): Wrong type");
71 return false;
72}
73
74// virtual
76{
77 return new CntUnencodedStringItem(*this);
78}
79
80/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool operator==(const SfxPoolItem &rItem) const override
Definition: custritm.cxx:28
CntUnencodedStringItem(sal_uInt16 which)
Definition: custritm.hxx:34
virtual bool PutValue(const css::uno::Any &rVal, sal_uInt8 nMemberId) override
Definition: custritm.cxx:61
virtual CntUnencodedStringItem * Clone(SfxItemPool *=nullptr) const override
Definition: custritm.cxx:75
virtual bool QueryValue(css::uno::Any &rVal, sal_uInt8 nMemberId=0) const override
Definition: custritm.cxx:54
virtual bool operator<(const SfxPoolItem &rItem) const override
Definition: custritm.cxx:36
virtual bool GetPresentation(SfxItemPresentation, MapUnit, MapUnit, OUString &rText, const IntlWrapper &) const override
This virtual method allows to get a textual representation of the value for the SfxPoolItem subclasse...
Definition: custritm.cxx:45
Base class for providers of defaults of SfxPoolItems.
Definition: itempool.hxx:51
MapUnit
SfxItemPresentation
Definition: poolitem.hxx:72
unsigned char sal_uInt8