update dev300-m58
[ooovba.git] / sw / source / ui / vba / vbasection.cxx
blobc30058ab6594294bf3b3c8cdad820fa90c9770a0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile:
10 * $Revision:
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #include "vbasection.hxx"
31 #include <vbahelper/vbahelper.hxx>
32 #include <tools/diagnose_ex.h>
33 #include "vbapagesetup.hxx"
35 using namespace ::ooo::vba;
36 using namespace ::com::sun::star;
38 SwVbaSection::SwVbaSection( const uno::Reference< ooo::vba::XHelperInterface >& rParent, const uno::Reference< uno::XComponentContext >& rContext, const uno::Reference< frame::XModel >& xModel, const uno::Reference< beans::XPropertySet >& xProps ) throw ( uno::RuntimeException ) :
39 SwVbaSection_BASE( rParent, rContext ), mxModel( xModel ), mxPageProps( xProps )
43 SwVbaSection::~SwVbaSection()
47 ::sal_Bool SAL_CALL SwVbaSection::getProtectedForForms() throw (uno::RuntimeException)
49 return sal_False;
52 void SAL_CALL SwVbaSection::setProtectedForForms( ::sal_Bool /*_protectedforforms*/ ) throw (uno::RuntimeException)
56 uno::Any SAL_CALL SwVbaSection::Headers( ) throw (uno::RuntimeException)
58 return uno::Any();
61 uno::Any SAL_CALL SwVbaSection::Footers( ) throw (uno::RuntimeException)
63 return uno::Any();
66 uno::Any SAL_CALL
67 SwVbaSection::PageSetup( ) throw (uno::RuntimeException)
69 return uno::makeAny( uno::Reference< word::XPageSetup >( new SwVbaPageSetup( this, mxContext, mxModel, mxPageProps ) ) );
72 rtl::OUString&
73 SwVbaSection::getServiceImplName()
75 static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaSection") );
76 return sImplName;
79 uno::Sequence< rtl::OUString >
80 SwVbaSection::getServiceNames()
82 static uno::Sequence< rtl::OUString > aServiceNames;
83 if ( aServiceNames.getLength() == 0 )
85 aServiceNames.realloc( 1 );
86 aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.Section" ) );
88 return aServiceNames;