xref: /trunk/main/sw/source/ui/uno/unodefaults.cxx (revision efeef26f)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_sw.hxx"
26 
27 
28 #include <unodefaults.hxx>
29 #include <svx/svdmodel.hxx>
30 #include <svx/unoprov.hxx>
31 #include <doc.hxx>
32 
33 /* -----------------------------13.03.01 14:16--------------------------------
34 
35  ---------------------------------------------------------------------------*/
36 SwSvxUnoDrawPool::SwSvxUnoDrawPool( SwDoc* pDoc ) throw() :
37     SvxUnoDrawPool(pDoc->GetDrawModel(), SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER),
38     m_pDoc(pDoc)
39 {
40 }
41 /* -----------------------------13.03.01 14:16--------------------------------
42 
43  ---------------------------------------------------------------------------*/
44 SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw()
45 {
46 }
47 /* -----------------------------13.03.01 14:16--------------------------------
48 
49  ---------------------------------------------------------------------------*/
50 SfxItemPool* SwSvxUnoDrawPool::getModelPool( sal_Bool /*bReadOnly*/ ) throw()
51 {
52     if(m_pDoc)
53     {
54 
55         // DVO, OD 01.10.2003 #i18732# - return item pool of writer document;
56         // it contains draw model item pool as secondary pool.
57         //SdrModel* pModel = m_pDoc->MakeDrawModel();
58         //return &pModel->GetItemPool();
59         // --> OD 2005-08-08 #i52858# - method name changed
60         m_pDoc->GetOrCreateDrawModel();
61         // <--
62         return &(m_pDoc->GetAttrPool());
63     }
64     return 0;
65 }
66 
67 
68 
69