165d0a149d
SfxPoolItem has a copy constructor and its copy assignment operator is deleted. Derived classes have a implicit defined copy constructor too, if all members are copy constructible. This patch removes default able copy constructors on such items. Note: clang-tidy only finds functions defined in source, inlined functions in headers are picked manualy. Change-Id: I7e642a2ecf139420c53f6fcb39208918dd1a8d52 Reviewed-on: https://gerrit.libreoffice.org/43003 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
76 lines
1.8 KiB
C++
76 lines
1.8 KiB
C++
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
/*
|
|
* 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/.
|
|
*/
|
|
|
|
#include <svl/int64item.hxx>
|
|
#include <tools/stream.hxx>
|
|
|
|
SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, sal_Int64 nVal ) :
|
|
SfxPoolItem(nWhich), mnValue(nVal)
|
|
{
|
|
}
|
|
|
|
SfxInt64Item::SfxInt64Item( sal_uInt16 nWhich, SvStream& rStream ) :
|
|
SfxPoolItem(nWhich), mnValue(0)
|
|
{
|
|
rStream.ReadInt64(mnValue);
|
|
}
|
|
|
|
SfxInt64Item::~SfxInt64Item() {}
|
|
|
|
bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const
|
|
{
|
|
return mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue;
|
|
}
|
|
|
|
bool SfxInt64Item::GetPresentation(
|
|
SfxItemPresentation, MapUnit, MapUnit, OUString& rText,
|
|
const IntlWrapper& /*rIntlWrapper*/ ) const
|
|
{
|
|
rText = OUString::number(mnValue);
|
|
return true;
|
|
}
|
|
|
|
bool SfxInt64Item::QueryValue(
|
|
css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
|
|
{
|
|
rVal <<= mnValue;
|
|
return true;
|
|
}
|
|
|
|
bool SfxInt64Item::PutValue(
|
|
const css::uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
|
|
{
|
|
sal_Int64 nVal;
|
|
|
|
if (rVal >>= nVal)
|
|
{
|
|
mnValue = nVal;
|
|
return true;
|
|
}
|
|
|
|
return false;
|
|
}
|
|
|
|
SfxPoolItem* SfxInt64Item::Create( SvStream& rStream, sal_uInt16 /*nItemVersion*/ ) const
|
|
{
|
|
return new SfxInt64Item(Which(), rStream);
|
|
}
|
|
|
|
SvStream& SfxInt64Item::Store( SvStream& rStream, sal_uInt16 /*nItemVersion*/ ) const
|
|
{
|
|
return rStream.WriteInt64(mnValue);
|
|
}
|
|
|
|
SfxPoolItem* SfxInt64Item::Clone( SfxItemPool* /*pOther*/ ) const
|
|
{
|
|
return new SfxInt64Item(*this);
|
|
}
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|