diff options
author | Oliver Specht <os@openoffice.org> | 2001-03-13 13:38:37 +0000 |
---|---|---|
committer | Oliver Specht <os@openoffice.org> | 2001-03-13 13:38:37 +0000 |
commit | 32d75833f1181dec36611cf69d7227f1957055b5 (patch) | |
tree | 89fa1cd13127081e70efb87412cd4068dc3d8605 /sw/source/ui/uno | |
parent | 76f12d217c690136cc6a66e3153f043f37300b37 (diff) |
overloaded drawing defaults
Diffstat (limited to 'sw/source/ui/uno')
-rw-r--r-- | sw/source/ui/uno/unodefaults.cxx | 105 | ||||
-rw-r--r-- | sw/source/ui/uno/unodefaults.hxx | 84 |
2 files changed, 189 insertions, 0 deletions
diff --git a/sw/source/ui/uno/unodefaults.cxx b/sw/source/ui/uno/unodefaults.cxx new file mode 100644 index 000000000000..b442c4236056 --- /dev/null +++ b/sw/source/ui/uno/unodefaults.cxx @@ -0,0 +1,105 @@ +/************************************************************************* + * + * $RCSfile: unodefaults.cxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: os $ $Date: 2001-03-13 14:37:52 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ + +#ifdef PRECOMPILED +#include "ui_pch.hxx" +#endif + +#pragma hdrstop + +#ifndef _UNODEFAULTS_HXX +#include <unodefaults.hxx> +#endif + +#ifndef _SVDMODEL_HXX +#include <svx/svdmodel.hxx> +#endif +#include <doc.hxx> + +/* -----------------------------13.03.01 14:16-------------------------------- + + ---------------------------------------------------------------------------*/ +SwSvxUnoDrawPool::SwSvxUnoDrawPool( SwDoc* pDoc ) throw() : + SvxUnoDrawPool(pDoc->GetDrawModel()), + m_pDoc(pDoc) +{ +} +/* -----------------------------13.03.01 14:16-------------------------------- + + ---------------------------------------------------------------------------*/ +SwSvxUnoDrawPool::~SwSvxUnoDrawPool() throw() +{ +} +/* -----------------------------13.03.01 14:16-------------------------------- + + ---------------------------------------------------------------------------*/ +SfxItemPool* SwSvxUnoDrawPool::getModelPool( sal_Bool bReadOnly ) throw() +{ + if(m_pDoc) + { + SdrModel* pModel = m_pDoc->MakeDrawModel(); + return &pModel->GetItemPool(); + } + return 0; +} + + + diff --git a/sw/source/ui/uno/unodefaults.hxx b/sw/source/ui/uno/unodefaults.hxx new file mode 100644 index 000000000000..cdda6f0eccc2 --- /dev/null +++ b/sw/source/ui/uno/unodefaults.hxx @@ -0,0 +1,84 @@ +/************************************************************************* + * + * $RCSfile: unodefaults.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: os $ $Date: 2001-03-13 14:38:37 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library 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 for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _UNODEFAULTS_HXX +#define _UNODEFAULTS_HXX + +#ifndef _SVX_UNOPOOL_HXX_ +#include <svx/unopool.hxx> +#endif + +class SwDoc; + +class SwSvxUnoDrawPool : public SvxUnoDrawPool +{ + SwDoc* m_pDoc; +public: + SwSvxUnoDrawPool( SwDoc* pDoc ) throw(); + virtual ~SwSvxUnoDrawPool() throw(); + + virtual SfxItemPool* getModelPool( sal_Bool bReadOnly ) throw(); + + void Invalidate() {m_pDoc = 0;} +}; + +#endif + + |