tdf#130857 qt weld: Implement QtInstanceWidget::strip_mnemonic
[LibreOffice.git] / svl / source / items / int64item.cxx
blob644802edf9ccaa1795c8f671c20034283c53662f
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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 */
10 #include <svl/int64item.hxx>
12 SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal ) :
13 SfxPoolItem(nWhich, SfxItemType::SfxInt64ItemType), mnValue(nVal)
17 SfxInt64Item::~SfxInt64Item() {}
19 bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const
21 return SfxPoolItem::operator==(rItem) && mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue;
24 bool SfxInt64Item::GetPresentation(
25 SfxItemPresentation, MapUnit, MapUnit, OUString& rText,
26 const IntlWrapper& /*rIntlWrapper*/ ) const
28 rText = OUString::number(mnValue);
29 return true;
32 bool SfxInt64Item::QueryValue(
33 css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
35 rVal <<= mnValue;
36 return true;
39 bool SfxInt64Item::PutValue(
40 const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
42 sal_Int64 nVal;
44 if (rVal >>= nVal)
46 mnValue = nVal;
47 return true;
50 return false;
53 SfxInt64Item* SfxInt64Item::Clone( SfxItemPool* /*pOther*/ ) const
55 return new SfxInt64Item(*this);
58 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */