fdo#74697 Add Bluez 5 support for impress remote.
[LibreOffice.git] / svx / source / sdr / properties / emptyproperties.cxx
bloba766b18c2c4c656af1ce87c9133a3a6659804230
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
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 <svx/sdr/properties/emptyproperties.hxx>
21 #include <tools/debug.hxx>
22 #include <svl/itemset.hxx>
23 #include <svx/svddef.hxx>
24 #include <svx/svdobj.hxx>
25 #include <svx/svdpool.hxx>
27 //////////////////////////////////////////////////////////////////////////////
29 namespace sdr
31 namespace properties
33 // create a new itemset
34 SfxItemSet& EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
36 // Basic implementation; Basic object has NO attributes
37 DBG_ASSERT(sal_False, "EmptyProperties::CreateObjectSpecificItemSet() should never be called");
38 return *(new SfxItemSet(rPool));
41 EmptyProperties::EmptyProperties(SdrObject& rObj)
42 : BaseProperties(rObj),
43 mpEmptyItemSet(0L)
47 EmptyProperties::EmptyProperties(const EmptyProperties& rProps, SdrObject& rObj)
48 : BaseProperties(rProps, rObj),
49 mpEmptyItemSet(0L)
51 // #115593#
52 // do not gererate an assert, else derivations like PageProperties will generate an assert
53 // using the Clone() operator path.
56 EmptyProperties::~EmptyProperties()
58 if(mpEmptyItemSet)
60 delete mpEmptyItemSet;
61 mpEmptyItemSet = 0L;
65 BaseProperties& EmptyProperties::Clone(SdrObject& rObj) const
67 return *(new EmptyProperties(*this, rObj));
70 const SfxItemSet& EmptyProperties::GetObjectItemSet() const
72 if(!mpEmptyItemSet)
74 ((EmptyProperties*)this)->mpEmptyItemSet = &(((EmptyProperties*)this)->CreateObjectSpecificItemSet(*GetSdrObject().GetObjectItemPool()));
77 DBG_ASSERT(mpEmptyItemSet, "Could not create an SfxItemSet(!)");
78 DBG_ASSERT(sal_False, "EmptyProperties::GetObjectItemSet() should never be called (!)");
80 return *mpEmptyItemSet;
83 void EmptyProperties::SetObjectItem(const SfxPoolItem& /*rItem*/)
85 DBG_ASSERT(sal_False, "EmptyProperties::SetObjectItem() should never be called (!)");
88 void EmptyProperties::SetObjectItemDirect(const SfxPoolItem& /*rItem*/)
90 DBG_ASSERT(sal_False, "EmptyProperties::SetObjectItemDirect() should never be called (!)");
93 void EmptyProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/)
95 DBG_ASSERT(sal_False, "EmptyProperties::ClearObjectItem() should never be called (!)");
98 void EmptyProperties::ClearObjectItemDirect(const sal_uInt16 /*nWhich*/)
100 DBG_ASSERT(sal_False, "EmptyProperties::ClearObjectItemDirect() should never be called (!)");
103 void EmptyProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/)
105 DBG_ASSERT(sal_False, "EmptyProperties::SetObjectItemSet() should never be called (!)");
108 void EmptyProperties::ItemSetChanged(const SfxItemSet& /*rSet*/)
110 DBG_ASSERT(sal_False, "EmptyProperties::ItemSetChanged() should never be called (!)");
113 sal_Bool EmptyProperties::AllowItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) const
115 DBG_ASSERT(sal_False, "EmptyProperties::AllowItemChange() should never be called (!)");
116 return sal_True;
119 void EmptyProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/)
121 DBG_ASSERT(sal_False, "EmptyProperties::ItemChange() should never be called (!)");
124 void EmptyProperties::PostItemChange(const sal_uInt16 /*nWhich*/)
126 DBG_ASSERT(sal_False, "EmptyProperties::PostItemChange() should never be called (!)");
129 void EmptyProperties::SetStyleSheet(SfxStyleSheet* /*pNewStyleSheet*/, sal_Bool /*bDontRemoveHardAttr*/)
131 DBG_ASSERT(sal_False, "EmptyProperties::SetStyleSheet() should never be called (!)");
134 SfxStyleSheet* EmptyProperties::GetStyleSheet() const
136 DBG_ASSERT(sal_False, "EmptyProperties::GetStyleSheet() should never be called (!)");
137 return 0L;
139 } // end of namespace properties
140 } // end of namespace sdr
142 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */