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: pageproperties.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/pageproperties.hxx>
34 #include <svtools/itemset.hxx>
35 #include <svx/svdobj.hxx>
36 #include <svx/svdpool.hxx>
38 //////////////////////////////////////////////////////////////////////////////
44 // create a new itemset
45 SfxItemSet
& PageProperties::CreateObjectSpecificItemSet(SfxItemPool
& rPool
)
47 // overloaded to legally return a valid ItemSet
48 return *(new SfxItemSet(rPool
));
51 PageProperties::PageProperties(SdrObject
& rObj
)
52 : EmptyProperties(rObj
)
56 PageProperties::PageProperties(const PageProperties
& rProps
, SdrObject
& rObj
)
57 : EmptyProperties(rProps
, rObj
)
61 PageProperties::~PageProperties()
65 BaseProperties
& PageProperties::Clone(SdrObject
& rObj
) const
67 return *(new PageProperties(*this, rObj
));
70 // get itemset. Overloaded here to allow creating the empty itemset
72 const SfxItemSet
& PageProperties::GetObjectItemSet() const
76 ((PageProperties
*)this)->mpEmptyItemSet
= &(((PageProperties
*)this)->CreateObjectSpecificItemSet(*GetSdrObject().GetObjectItemPool()));
79 DBG_ASSERT(mpEmptyItemSet
, "Could not create an SfxItemSet(!)");
81 return *mpEmptyItemSet
;
84 void PageProperties::ItemChange(const sal_uInt16
/*nWhich*/, const SfxPoolItem
* /*pNewItem*/)
86 // #86481# simply ignore item setting on page objects
89 SfxStyleSheet
* PageProperties::GetStyleSheet() const
91 // overloaded to legally return a 0L pointer here
95 void PageProperties::ClearObjectItem(const sal_uInt16
/*nWhich*/)
97 // simply ignore item clearing on page objects
99 } // end of namespace properties
100 } // end of namespace sdr
102 ////////////////////////////////////////////////////////////////////////////////////////////////////