1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: emptyproperties.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_svx.hxx"
33 #include <svx/sdr/properties/emptyproperties.hxx>
34 #include <tools/debug.hxx>
35 #include <svtools/itemset.hxx>
36 #include <svx/svddef.hxx>
37 #include <svx/svdobj.hxx>
38 #include <svx/svdpool.hxx>
40 //////////////////////////////////////////////////////////////////////////////
46 // create a new itemset
47 SfxItemSet
& EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool
& rPool
)
49 // Basic implementation; Basic object has NO attributes
50 DBG_ASSERT(sal_False
, "EmptyProperties::CreateObjectSpecificItemSet() should never be called");
51 return *(new SfxItemSet(rPool
));
54 EmptyProperties::EmptyProperties(SdrObject
& rObj
)
55 : BaseProperties(rObj
),
60 EmptyProperties::EmptyProperties(const EmptyProperties
& rProps
, SdrObject
& rObj
)
61 : BaseProperties(rProps
, rObj
),
65 // do not gererate an assert, else derivations like PageProperties will generate an assert
66 // using the Clone() operator path.
69 EmptyProperties::~EmptyProperties()
73 delete mpEmptyItemSet
;
78 BaseProperties
& EmptyProperties::Clone(SdrObject
& rObj
) const
80 return *(new EmptyProperties(*this, rObj
));
83 const SfxItemSet
& EmptyProperties::GetObjectItemSet() const
87 ((EmptyProperties
*)this)->mpEmptyItemSet
= &(((EmptyProperties
*)this)->CreateObjectSpecificItemSet(*GetSdrObject().GetObjectItemPool()));
90 DBG_ASSERT(mpEmptyItemSet
, "Could not create an SfxItemSet(!)");
91 DBG_ASSERT(sal_False
, "EmptyProperties::GetObjectItemSet() should never be called (!)");
93 return *mpEmptyItemSet
;
96 void EmptyProperties::SetObjectItem(const SfxPoolItem
& /*rItem*/)
98 DBG_ASSERT(sal_False
, "EmptyProperties::SetObjectItem() should never be called (!)");
101 void EmptyProperties::SetObjectItemDirect(const SfxPoolItem
& /*rItem*/)
103 DBG_ASSERT(sal_False
, "EmptyProperties::SetObjectItemDirect() should never be called (!)");
106 void EmptyProperties::ClearObjectItem(const sal_uInt16
/*nWhich*/)
108 DBG_ASSERT(sal_False
, "EmptyProperties::ClearObjectItem() should never be called (!)");
111 void EmptyProperties::ClearObjectItemDirect(const sal_uInt16
/*nWhich*/)
113 DBG_ASSERT(sal_False
, "EmptyProperties::ClearObjectItemDirect() should never be called (!)");
116 void EmptyProperties::SetObjectItemSet(const SfxItemSet
& /*rSet*/)
118 DBG_ASSERT(sal_False
, "EmptyProperties::SetObjectItemSet() should never be called (!)");
121 void EmptyProperties::ItemSetChanged(const SfxItemSet
& /*rSet*/)
123 DBG_ASSERT(sal_False
, "EmptyProperties::ItemSetChanged() should never be called (!)");
126 sal_Bool
EmptyProperties::AllowItemChange(const sal_uInt16
/*nWhich*/, const SfxPoolItem
* /*pNewItem*/) const
128 DBG_ASSERT(sal_False
, "EmptyProperties::AllowItemChange() should never be called (!)");
132 void EmptyProperties::ItemChange(const sal_uInt16
/*nWhich*/, const SfxPoolItem
* /*pNewItem*/)
134 DBG_ASSERT(sal_False
, "EmptyProperties::ItemChange() should never be called (!)");
137 void EmptyProperties::PostItemChange(const sal_uInt16
/*nWhich*/)
139 DBG_ASSERT(sal_False
, "EmptyProperties::PostItemChange() should never be called (!)");
142 void EmptyProperties::SetStyleSheet(SfxStyleSheet
* /*pNewStyleSheet*/, sal_Bool
/*bDontRemoveHardAttr*/)
144 DBG_ASSERT(sal_False
, "EmptyProperties::SetStyleSheet() should never be called (!)");
147 SfxStyleSheet
* EmptyProperties::GetStyleSheet() const
149 DBG_ASSERT(sal_False
, "EmptyProperties::GetStyleSheet() should never be called (!)");
152 } // end of namespace properties
153 } // end of namespace sdr
155 //////////////////////////////////////////////////////////////////////////////