diff options
author | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-01 12:54:43 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@collabora.com> | 2014-03-01 12:57:35 -0500 |
commit | 2f527738ea4f8e93acafdd7f0ae06de1678cfdd8 (patch) | |
tree | 143da54518d79251f42435b307de6294d8a6909c /svl/source | |
parent | DomainMapperTableHandler::endTable: fix this comment (diff) | |
download | core-2f527738ea4f8e93acafdd7f0ae06de1678cfdd8.tar.gz core-2f527738ea4f8e93acafdd7f0ae06de1678cfdd8.zip |
Set the default cell border line width to 0.75 pt in Calc.
0.75 pt provides a better interop with Excel documents.
Change-Id: Ic1d2cbbe4e35dc0793a0e35d3836261d91138f7c
Diffstat (limited to 'svl/source')
-rw-r--r-- | svl/source/items/int64item.cxx | 109 |
1 files changed, 109 insertions, 0 deletions
diff --git a/svl/source/items/int64item.cxx b/svl/source/items/int64item.cxx new file mode 100644 index 000000000000..34556b28e235 --- /dev/null +++ b/svl/source/items/int64item.cxx @@ -0,0 +1,109 @@ +/* -*- 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) +{ + rStream.ReadInt64(mnValue); +} + +SfxInt64Item::SfxInt64Item( const SfxInt64Item& rItem ) : + SfxPoolItem(rItem), mnValue(rItem.mnValue) +{ +} + +SfxInt64Item::~SfxInt64Item() {} + +bool SfxInt64Item::operator== ( const SfxPoolItem& rItem ) const +{ + return mnValue == static_cast<const SfxInt64Item&>(rItem).mnValue; +} + +int SfxInt64Item::Compare( const SfxPoolItem& r ) const +{ + sal_Int64 nOther = static_cast<const SfxInt64Item&>(r).mnValue; + + if (mnValue < nOther) + return -1; + + if (mnValue > nOther) + return 1; + + return 0; +} + +int SfxInt64Item::Compare( const SfxPoolItem& r, const IntlWrapper& /*rIntlWrapper*/ ) const +{ + return Compare(r); +} + +SfxItemPresentation SfxInt64Item::GetPresentation( + SfxItemPresentation, SfxMapUnit, SfxMapUnit, OUString& rText, + const IntlWrapper* /*pIntlWrapper*/ ) const +{ + rText = OUString::number(mnValue); + return SFX_ITEM_PRESENTATION_NAMELESS; +} + +bool SfxInt64Item::QueryValue( + com::sun::star::uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const +{ + rVal <<= mnValue; + return true; +} + +bool SfxInt64Item::PutValue( + const com::sun::star::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); +} + +sal_Int64 SfxInt64Item::GetValue() const +{ + return mnValue; +} + +void SfxInt64Item::SetValue( sal_Int64 nVal ) +{ + mnValue = nVal; +} + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |