/************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * Copyright 2000, 2010 Oracle and/or its affiliates. * * OpenOffice.org - a multi-platform office productivity suite * * This file is part of OpenOffice.org. * * OpenOffice.org is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License version 3 * only, as published by the Free Software Foundation. * * OpenOffice.org is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License version 3 for more details * (a copy is included in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU Lesser General Public License * version 3 along with OpenOffice.org. If not, see * * for a copy of the LGPLv3 License. * ************************************************************************/ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_svx.hxx" #include #include #include using namespace ::rtl; using namespace ::com::sun::star; // STATIC DATA ----------------------------------------------------------- DBG_NAMEEX(SvxB3DVectorItem) DBG_NAME(SvxB3DVectorItem) // ----------------------------------------------------------------------- TYPEINIT1_FACTORY(SvxB3DVectorItem, SfxPoolItem, new SvxB3DVectorItem); // ----------------------------------------------------------------------- SvxB3DVectorItem::SvxB3DVectorItem() { DBG_CTOR(SvxB3DVectorItem, 0); } SvxB3DVectorItem::~SvxB3DVectorItem() { DBG_DTOR(SvxB3DVectorItem, 0); } // ----------------------------------------------------------------------- SvxB3DVectorItem::SvxB3DVectorItem( USHORT _nWhich, const basegfx::B3DVector& rVal ) : SfxPoolItem( _nWhich ), aVal( rVal ) { DBG_CTOR(SvxB3DVectorItem, 0); } // ----------------------------------------------------------------------- SvxB3DVectorItem::SvxB3DVectorItem( USHORT _nWhich, SvStream& rStream ) : SfxPoolItem( _nWhich ) { DBG_CTOR(SvxB3DVectorItem, 0); double fValue; rStream >> fValue; aVal.setX(fValue); rStream >> fValue; aVal.setY(fValue); rStream >> fValue; aVal.setZ(fValue); } // ----------------------------------------------------------------------- SvxB3DVectorItem::SvxB3DVectorItem( const SvxB3DVectorItem& rItem ) : SfxPoolItem( rItem ), aVal( rItem.aVal ) { DBG_CTOR(SvxB3DVectorItem, 0); } // ----------------------------------------------------------------------- int SvxB3DVectorItem::operator==( const SfxPoolItem &rItem ) const { DBG_CHKTHIS(SvxB3DVectorItem, 0); DBG_ASSERT( SfxPoolItem::operator==( rItem ), "unequal type" ); return ((SvxB3DVectorItem&)rItem).aVal == aVal; } // ----------------------------------------------------------------------- SfxPoolItem* SvxB3DVectorItem::Clone( SfxItemPool* /*pPool*/ ) const { DBG_CHKTHIS(SvxB3DVectorItem, 0); return new SvxB3DVectorItem( *this ); } // ----------------------------------------------------------------------- SfxPoolItem* SvxB3DVectorItem::Create(SvStream &rStream, USHORT /*nVersion*/) const { DBG_CHKTHIS(SvxB3DVectorItem, 0); basegfx::B3DVector aStr; double fValue; rStream >> fValue; aStr.setX(fValue); rStream >> fValue; aStr.setY(fValue); rStream >> fValue; aStr.setZ(fValue); return new SvxB3DVectorItem(Which(), aStr); } // ----------------------------------------------------------------------- SvStream& SvxB3DVectorItem::Store(SvStream &rStream, USHORT /*nItemVersion*/) const { DBG_CHKTHIS(SvxB3DVectorItem, 0); // ## if (nItemVersion) double fValue; fValue = aVal.getX(); rStream << fValue; fValue = aVal.getY(); rStream << fValue; fValue = aVal.getZ(); rStream << fValue; return rStream; } // ----------------------------------------------------------------------- sal_Bool SvxB3DVectorItem::QueryValue( uno::Any& rVal, BYTE /*nMemberId*/ ) const { drawing::Direction3D aDirection; // Werte eintragen aDirection.DirectionX = aVal.getX(); aDirection.DirectionY = aVal.getY(); aDirection.DirectionZ = aVal.getZ(); rVal <<= aDirection; return( sal_True ); } // ----------------------------------------------------------------------- sal_Bool SvxB3DVectorItem::PutValue( const uno::Any& rVal, BYTE /*nMemberId*/ ) { drawing::Direction3D aDirection; if(!(rVal >>= aDirection)) return sal_False; aVal.setX(aDirection.DirectionX); aVal.setY(aDirection.DirectionY); aVal.setZ(aDirection.DirectionZ); return sal_True; } // ----------------------------------------------------------------------- USHORT SvxB3DVectorItem::GetVersion (USHORT nFileFormatVersion) const { return (nFileFormatVersion == SOFFICE_FILEFORMAT_31) ? USHRT_MAX : 0; } // eof ora/libreoffice-4.0.6.2'>distro/collabora/libreoffice-4.0.6.2 LibreOffice 核心代码仓库文档基金会
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-02Improved loplugin:redundantcast static_cast handling: unoidlStephan Bergmann
Change-Id: Ic959703c5f5ff594d0c430f6756a3fadf09cfd73
2016-09-13loplugin:override: No more need for the "MSVC dtor override" workaroundStephan Bergmann
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "Explicitly mark overriding destructors as 'virtual'" appears to no longer be a problem with MSVC 2013. (The little change in the rewriting code of compilerplugins/clang/override.cxx was necessary to prevent an endless loop when adding "override" to OOO_DLLPUBLIC_CHARTTOOLS virtual ~CloseableLifeTimeManager(); in chart2/source/inc/LifeTime.hxx, getting stuck in the leading OOO_DLLPUBLIC_CHARTTOOLS macro. Can't remember what that isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.) Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-05-10Replace fallthrough comments with new SAL_FALLTHROUGH macroStephan Bergmann
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in preparation of enabling -Wimplicit-fallthrough. (This is only relevant for C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.) Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but that would require adding back in dependencies on boost_headers to many libraries where we carefully removed any remaining Boost dependencies only recently. (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its future evolution will not have any impact on the stable URE interface.) C++17 will have a proper [[fallthroug]], eventually removing the need for a macro altogether. Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-03-17loplugin:constantparam in registryNoel Grandin
Change-Id: Ic3c60325a722422912d06fe21d072c5f5c4bccb1 Reviewed-on: https://gerrit.libreoffice.org/23322 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-06Clean up for loops in unoidlStephan Bergmann
Change-Id: I9c2e0a10699580026fbf38f0c857ac148de74f9c
2015-12-14Use emplace_backStephan Bergmann
Change-Id: I006e3c8f411b480917d9cfb9c4f3d082b79c833d