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 .
21 #include <tools/string.hxx>
22 #include <tools/stream.hxx>
24 #include <svl/poolitem.hxx>
25 #include <svl/itemset.hxx>
28 // STATIC DATA -----------------------------------------------------------
32 // --------------------------------------------------------------------------
34 SfxSetItem::SfxSetItem( sal_uInt16 which
, const SfxItemSet
&rSet
) :
36 pSet(rSet
.Clone(sal_True
))
38 DBG_CTOR(SfxSetItem
, 0);
41 // --------------------------------------------------------------------------
43 SfxSetItem::SfxSetItem( sal_uInt16 which
, SfxItemSet
*pS
) :
47 DBG_CTOR(SfxSetItem
, 0);
48 DBG_ASSERT(pS
, "SfxSetItem without set constructed" );
51 // --------------------------------------------------------------------------
53 SfxSetItem::SfxSetItem( const SfxSetItem
& rCopy
, SfxItemPool
*pPool
) :
54 SfxPoolItem(rCopy
.Which()),
55 pSet(rCopy
.pSet
->Clone(sal_True
, pPool
))
57 DBG_CTOR(SfxSetItem
, 0);
60 // --------------------------------------------------------------------------
62 SfxSetItem::~SfxSetItem()
64 DBG_DTOR(SfxSetItem
, 0);
65 delete pSet
; pSet
= 0;
68 // --------------------------------------------------------------------------
70 int SfxSetItem::operator==( const SfxPoolItem
& rCmp
) const
72 DBG_CHKTHIS(SfxSetItem
, 0);
73 DBG_ASSERT( SfxPoolItem::operator==( rCmp
), "unequal type" );
74 return *pSet
== *(((const SfxSetItem
&)rCmp
).pSet
);
77 // --------------------------------------------------------------------------
79 SfxItemPresentation
SfxSetItem::GetPresentation
81 SfxItemPresentation
/*ePresentation*/,
82 SfxMapUnit
/*eCoreMetric*/,
83 SfxMapUnit
/*ePresentationMetric*/,
88 DBG_CHKTHIS(SfxSetItem
, 0);
89 return SFX_ITEM_PRESENTATION_NONE
;
92 // --------------------------------------------------------------------------
94 SvStream
& SfxSetItem::Store(SvStream
& rStream
, sal_uInt16
) const
96 GetItemSet().Store(rStream
);
100 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */