2001-03-13 13:38:37 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* Copyright 2008 by Sun Microsystems, Inc.
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* $RCSfile: unodefaults.cxx,v $
|
|
|
|
|
* $Revision: 1.9 $
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
|
* only, as published by the Free Software Foundation.
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
2008-04-10 20:56:40 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
|
* for a copy of the LGPLv3 License.
|
2001-03-13 13:38:37 +00:00
|
|
|
*
|
|
|
|
|
************************************************************************/
|
|
|
|
|
|
2006-09-16 22:29:37 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
|
#include "precompiled_sw.hxx"
|
|
|
|
|
|
2001-03-13 13:38:37 +00:00
|
|
|
|
|
|
|
|
#include <unodefaults.hxx>
|
|
|
|
|
#include <svx/svdmodel.hxx>
|
2002-11-15 14:38:51 +00:00
|
|
|
#include <svx/unoprov.hxx>
|
2001-03-13 13:38:37 +00:00
|
|
|
#include <doc.hxx>
|
|
|
|
|
|
|
|
|
|
/* -----------------------------13.03.01 14:16--------------------------------
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------*/
|
|
|
|
|
SwSvxUnoDrawPool::SwSvxUnoDrawPool( SwDoc* pDoc ) throw() :
|
2002-11-15 14:38:51 +00:00
|
|
|
SvxUnoDrawPool(pDoc->GetDrawModel(), SVXUNO_SERVICEID_COM_SUN_STAR_DRAWING_DEFAULTS_WRITER),
|
2001-03-13 13:38:37 +00:00
|
|
|
m_pDoc(pDoc)
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
/* -----------------------------13.03.01 14:16--------------------------------
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------*/
|
|
|
|
|
SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw()
|
|
|
|
|
{
|
|
|
|
|
}
|
|
|
|
|
/* -----------------------------13.03.01 14:16--------------------------------
|
|
|
|
|
|
|
|
|
|
---------------------------------------------------------------------------*/
|
2007-09-27 11:42:05 +00:00
|
|
|
SfxItemPool* SwSvxUnoDrawPool::getModelPool( sal_Bool /*bReadOnly*/ ) throw()
|
2001-03-13 13:38:37 +00:00
|
|
|
{
|
|
|
|
|
if(m_pDoc)
|
|
|
|
|
{
|
2004-02-02 17:42:28 +00:00
|
|
|
|
|
|
|
|
// DVO, OD 01.10.2003 #i18732# - return item pool of writer document;
|
|
|
|
|
// it contains draw model item pool as secondary pool.
|
|
|
|
|
//SdrModel* pModel = m_pDoc->MakeDrawModel();
|
|
|
|
|
//return &pModel->GetItemPool();
|
2005-09-28 10:31:12 +00:00
|
|
|
// --> OD 2005-08-08 #i52858# - method name changed
|
|
|
|
|
m_pDoc->GetOrCreateDrawModel();
|
|
|
|
|
// <--
|
2004-02-02 17:42:28 +00:00
|
|
|
return &(m_pDoc->GetAttrPool());
|
2001-03-13 13:38:37 +00:00
|
|
|
}
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|