xref: /trunk/main/sw/source/ui/uno/unodefaults.cxx (revision 26ea3662)
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 // MARKER(update_precomp.py): autogen include statement, do not remove
23 #include "precompiled_sw.hxx"
24 
25 #include <unodefaults.hxx>
26 #include <svx/svdmodel.hxx>
27 #include <svx/unoprov.hxx>
28 #include <doc.hxx>
29 #include <drawdoc.hxx>
30 
31 /* -----------------------------13.03.01 14:16--------------------------------
32 
33  ---------------------------------------------------------------------------*/
SwSvxUnoDrawPool(SwDoc * pDoc)34 SwSvxUnoDrawPool::SwSvxUnoDrawPool( SwDoc* pDoc ) throw() :
35     SvxUnoDrawPool(pDoc->GetDrawModel(), SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER),
36     m_pDoc(pDoc)
37 {
38 }
39 /* -----------------------------13.03.01 14:16--------------------------------
40 
41  ---------------------------------------------------------------------------*/
~SwSvxUnoDrawPool()42 SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw()
43 {
44 }
45 /* -----------------------------13.03.01 14:16--------------------------------
46 
47  ---------------------------------------------------------------------------*/
getModelPool(sal_Bool)48 SfxItemPool* SwSvxUnoDrawPool::getModelPool( sal_Bool /*bReadOnly*/ ) throw()
49 {
50     if(m_pDoc)
51     {
52 
53         // DVO, OD 01.10.2003 #i18732# - return item pool of writer document;
54         // it contains draw model item pool as secondary pool.
55         //SdrModel* pModel = m_pDoc->MakeDrawModel();
56         //return &pModel->GetItemPool();
57         // --> OD 2005-08-08 #i52858# - method name changed
58         m_pDoc->GetOrCreateDrawModel();
59         // <--
60         return &(m_pDoc->GetAttrPool());
61     }
62     return 0;
63 }
64 
65 
66 
67