Bump version to 6.4-15
[LibreOffice.git] / svx / source / sdr / properties / emptyproperties.cxx
blob8c32d6c97dcfc4374b71082dfe91d6ef1200a5a8
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 <sal/config.h>
22 #include <sdr/properties/emptyproperties.hxx>
23 #include <svl/itemset.hxx>
24 #include <svx/svddef.hxx>
25 #include <svx/svdobj.hxx>
26 #include <svx/svdpool.hxx>
27 #include <vcl/outdev.hxx>
30 namespace sdr
32 namespace properties
34 // create a new itemset
35 std::unique_ptr<SfxItemSet> EmptyProperties::CreateObjectSpecificItemSet(SfxItemPool& rPool)
37 // Basic implementation; Basic object has NO attributes
38 assert(!"EmptyProperties::CreateObjectSpecificItemSet() should never be called");
39 return std::make_unique<SfxItemSet>(rPool);
42 EmptyProperties::EmptyProperties(SdrObject& rObj)
43 : BaseProperties(rObj)
47 std::unique_ptr<BaseProperties> EmptyProperties::Clone(SdrObject& rObj) const
49 return std::unique_ptr<BaseProperties>(new EmptyProperties(rObj));
52 const SfxItemSet& EmptyProperties::GetObjectItemSet() const
54 if(!mpEmptyItemSet)
56 const_cast<EmptyProperties*>(this)->mpEmptyItemSet = const_cast<EmptyProperties*>(this)->CreateObjectSpecificItemSet(GetSdrObject().GetObjectItemPool());
59 assert(mpEmptyItemSet);
60 assert(!"EmptyProperties::GetObjectItemSet() should never be called");
62 return *mpEmptyItemSet;
65 void EmptyProperties::SetObjectItem(const SfxPoolItem& /*rItem*/)
67 assert(!"EmptyProperties::SetObjectItem() should never be called");
70 void EmptyProperties::SetObjectItemDirect(const SfxPoolItem& /*rItem*/)
72 assert(!"EmptyProperties::SetObjectItemDirect() should never be called");
75 void EmptyProperties::ClearObjectItem(const sal_uInt16 /*nWhich*/)
77 assert(!"EmptyProperties::ClearObjectItem() should never be called");
80 void EmptyProperties::ClearObjectItemDirect(const sal_uInt16 /*nWhich*/)
82 assert(!"EmptyProperties::ClearObjectItemDirect() should never be called");
85 void EmptyProperties::SetObjectItemSet(const SfxItemSet& /*rSet*/)
87 assert(!"EmptyProperties::SetObjectItemSet() should never be called");
90 void EmptyProperties::ItemSetChanged(const SfxItemSet& /*rSet*/)
92 assert(!"EmptyProperties::ItemSetChanged() should never be called");
95 bool EmptyProperties::AllowItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/) const
97 assert(!"EmptyProperties::AllowItemChange() should never be called");
98 return true;
101 void EmptyProperties::ItemChange(const sal_uInt16 /*nWhich*/, const SfxPoolItem* /*pNewItem*/)
103 assert(!"EmptyProperties::ItemChange() should never be called");
106 void EmptyProperties::PostItemChange(const sal_uInt16 /*nWhich*/)
108 assert(!"EmptyProperties::PostItemChange() should never be called");
111 void EmptyProperties::SetStyleSheet(SfxStyleSheet* /*pNewStyleSheet*/, bool /*bDontRemoveHardAttr*/)
113 assert(!"EmptyProperties::SetStyleSheet() should never be called");
116 SfxStyleSheet* EmptyProperties::GetStyleSheet() const
118 assert(!"EmptyProperties::GetStyleSheet() should never be called");
119 return nullptr;
121 } // end of namespace properties
122 } // end of namespace sdr
124 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */