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 <sdr/properties/pageproperties.hxx>
23 #include <svl/itemset.hxx>
24 #include <svx/svdobj.hxx>
25 #include <tools/debug.hxx>
28 namespace sdr::properties
30 PageProperties::PageProperties(SdrObject
& rObj
)
31 : BaseProperties(rObj
)
35 PageProperties::PageProperties(const PageProperties
& /*rProps*/, SdrObject
& rObj
)
36 : BaseProperties(rObj
)
40 PageProperties::~PageProperties()
44 std::unique_ptr
<BaseProperties
> PageProperties::Clone(SdrObject
& rObj
) const
46 return std::unique_ptr
<BaseProperties
>(new PageProperties(*this, rObj
));
49 SfxItemSet
PageProperties::CreateObjectSpecificItemSet(SfxItemPool
& rPool
)
51 return SfxItemSet(rPool
);
54 // get itemset. Override here to allow creating the empty itemset
56 const SfxItemSet
& PageProperties::GetObjectItemSet() const
60 mxEmptyItemSet
.emplace(GetSdrObject().GetObjectItemPool());
63 DBG_ASSERT(mxEmptyItemSet
, "Could not create an SfxItemSet(!)");
65 return *mxEmptyItemSet
;
68 SfxStyleSheet
* PageProperties::GetStyleSheet() const
70 // override to legally return a 0L pointer here
74 void PageProperties::SetStyleSheet(SfxStyleSheet
* /*pStyleSheet*/, bool /*bDontRemoveHardAttr*/,
75 bool /*bBroadcast*/, bool /*bAdjustTextFrameWidthAndHeight*/)
77 // override to legally ignore the StyleSheet here
80 void PageProperties::ClearObjectItem(const sal_uInt16
/*nWhich*/)
82 // simply ignore item clearing on page objects
85 void PageProperties::SetObjectItem(const SfxPoolItem
& /*rItem*/)
87 assert(!"PageProperties::SetObjectItem() should never be called");
90 void PageProperties::SetObjectItemDirect(const SfxPoolItem
& /*rItem*/)
92 assert(!"PageProperties::SetObjectItemDirect() should never be called");
95 void PageProperties::ClearObjectItemDirect(const sal_uInt16
/*nWhich*/)
97 assert(!"PageProperties::ClearObjectItemDirect() should never be called");
100 void PageProperties::SetObjectItemSet(const SfxItemSet
& /*rSet*/, bool /*bAdjustTextFrameWidthAndHeight*/)
102 // This can be called e.g. when positioning the slide using dialog in Notes view
104 } // end of namespace
106 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */