1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #include <sal/config.h>
22 #include <rtl/ustring.hxx>
23 #include <svl/itemset.hxx>
24 #include <svl/setitem.hxx>
25 #include <svl/poolitem.hxx>
27 SfxSetItem::SfxSetItem( sal_uInt16 which
, const SfxItemSet
&rSet
,
28 SfxItemType eItemType
) :
29 SfxPoolItem(which
, eItemType
),
32 assert(!dynamic_cast<const SfxAllItemSet
*>(&rSet
) && "cannot handle SfxAllItemSet here");
37 SfxSetItem::SfxSetItem( sal_uInt16 which
, SfxItemSet
&&pS
,
38 SfxItemType eItemType
) :
39 SfxPoolItem(which
, eItemType
),
42 assert(!dynamic_cast<SfxAllItemSet
*>(&pS
) && "cannot handle SfxAllItemSet here");
47 SfxSetItem::SfxSetItem( const SfxSetItem
& rCopy
, SfxItemPool
*pPool
) :
49 maSet(rCopy
.maSet
.CloneAsValue(true, pPool
))
51 assert(!dynamic_cast<const SfxAllItemSet
*>(&rCopy
.maSet
) && "cannot handle SfxAllItemSet here");
56 bool SfxSetItem::operator==( const SfxPoolItem
& rCmp
) const
58 assert(SfxPoolItem::operator==(rCmp
));
59 return maSet
== static_cast<const SfxSetItem
&>(rCmp
).maSet
;
63 bool SfxSetItem::GetPresentation
65 SfxItemPresentation
/*ePresentation*/,
66 MapUnit
/*eCoreMetric*/,
67 MapUnit
/*ePresentationMetric*/,
75 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */