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: SlsPageObjectFactory.hxx,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 #ifndef SD_SLIDESORTER_PAGE_OBJECT_FACTORY_HEADER
32 #define SD_SLIDESORTER_PAGE_OBJECT_FACTORY_HEADER
34 #include <boost/shared_ptr.hpp>
35 #include "model/SlsSharedPageDescriptor.hxx"
39 namespace sdr
{ namespace contact
{
42 class ViewObjectContact
;
45 namespace sd
{ namespace slidesorter
{ namespace view
{
49 namespace sd
{ namespace slidesorter
{ namespace cache
{
54 namespace sd
{ namespace slidesorter
{ namespace controller
{
58 /** This class is a factory for the creation of objects that represent page
59 objects (shapes). This includes the contact objects of the drawing
62 <p>The factory methods are called by the model::PageDescriptor and the
63 standard implementations of the contact objects.</p>
65 <p>The factory forwars the preview cache and Properties object to page
66 objects and contact objects.</p>
68 class PageObjectFactory
71 /** Create a new PageObjectFactory object that has references to the
72 given cache and properties.
75 const ::boost::shared_ptr
<cache::PageCache
>& rpCache
,
76 const ::boost::shared_ptr
<controller::Properties
>& rpProperties
);
77 PageObjectFactory (const ::boost::shared_ptr
<cache::PageCache
>& rpCache
);
78 virtual ~PageObjectFactory (void);
80 virtual view::PageObject
* CreatePageObject (
82 const model::SharedPageDescriptor
& rpDescriptor
) const;
84 virtual ::sdr::contact::ViewContact
* CreateViewContact (
85 view::PageObject
* pPageObject
,
86 const model::SharedPageDescriptor
& rpDescriptor
) const;
88 virtual ::sdr::contact::ViewObjectContact
* CreateViewObjectContact (
89 ::sdr::contact::ObjectContact
& rObjectContact
,
90 ::sdr::contact::ViewContact
& rViewContact
) const;
93 ::boost::shared_ptr
<cache::PageCache
> mpPageCache
;
94 ::boost::shared_ptr
<controller::Properties
> mpProperties
;
97 } } } // end of namespace ::sd::slidesorter::controller