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