1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #include "vbapagesetup.hxx" 28*cdf0e10cSrcweir #include <com/sun/star/text/XText.hpp> 29*cdf0e10cSrcweir #include <com/sun/star/text/XPageCursor.hpp> 30*cdf0e10cSrcweir #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> 31*cdf0e10cSrcweir #include <com/sun/star/container/XNameAccess.hpp> 32*cdf0e10cSrcweir #include <ooo/vba/word/WdSectionStart.hpp> 33*cdf0e10cSrcweir #include <ooo/vba/word/WdOrientation.hpp> 34*cdf0e10cSrcweir #include "wordvbahelper.hxx" 35*cdf0e10cSrcweir 36*cdf0e10cSrcweir using namespace ::com::sun::star; 37*cdf0e10cSrcweir using namespace ::ooo::vba; 38*cdf0e10cSrcweir 39*cdf0e10cSrcweir SwVbaPageSetup::SwVbaPageSetup(const uno::Reference< XHelperInterface >& xParent, 40*cdf0e10cSrcweir const uno::Reference< uno::XComponentContext >& xContext, 41*cdf0e10cSrcweir const uno::Reference< frame::XModel >& xModel, 42*cdf0e10cSrcweir const uno::Reference< beans::XPropertySet >& xProps ) throw (uno::RuntimeException): 43*cdf0e10cSrcweir SwVbaPageSetup_BASE( xParent, xContext ) 44*cdf0e10cSrcweir { 45*cdf0e10cSrcweir mxModel.set( xModel, uno::UNO_QUERY_THROW ); 46*cdf0e10cSrcweir mxPageProps.set( xProps, uno::UNO_QUERY_THROW ); 47*cdf0e10cSrcweir mnOrientPortrait = word::WdOrientation::wdOrientPortrait; 48*cdf0e10cSrcweir mnOrientLandscape = word::WdOrientation::wdOrientLandscape; 49*cdf0e10cSrcweir } 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir double SAL_CALL SwVbaPageSetup::getGutter() throw (uno::RuntimeException) 52*cdf0e10cSrcweir { 53*cdf0e10cSrcweir // not support in Writer 54*cdf0e10cSrcweir return 0; 55*cdf0e10cSrcweir } 56*cdf0e10cSrcweir 57*cdf0e10cSrcweir void SAL_CALL SwVbaPageSetup::setGutter( double _gutter ) throw (uno::RuntimeException) 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir // default add gutter into left margin 60*cdf0e10cSrcweir if( _gutter != 0 ) 61*cdf0e10cSrcweir { 62*cdf0e10cSrcweir double margin = VbaPageSetupBase::getLeftMargin() + _gutter; 63*cdf0e10cSrcweir VbaPageSetupBase::setLeftMargin( margin ); 64*cdf0e10cSrcweir } 65*cdf0e10cSrcweir } 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir double SAL_CALL SwVbaPageSetup::getHeaderDistance() throw (uno::RuntimeException) 68*cdf0e10cSrcweir { 69*cdf0e10cSrcweir sal_Bool isHeaderOn = sal_False; 70*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; 71*cdf0e10cSrcweir if( !isHeaderOn ) 72*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) ); 73*cdf0e10cSrcweir return VbaPageSetupBase::getHeaderMargin(); 74*cdf0e10cSrcweir } 75*cdf0e10cSrcweir 76*cdf0e10cSrcweir /** 77*cdf0e10cSrcweir * changes the value of TopMargin to the value of new MS-Word-HeaderDistance. Subtracts the difference 78*cdf0e10cSrcweir * between old TopMargin and the new headerDistance from the value of HeaderSpacing (which defines the 79*cdf0e10cSrcweir * space between the header and the body of the text). calculates the new HeaderHeight (= height of the 80*cdf0e10cSrcweir * header + headerBodyDistance). 81*cdf0e10cSrcweir * 82*cdf0e10cSrcweir * @param: headerDistance is the value that is set in MS Word for the distance from the top of the page 83*cdf0e10cSrcweir * to the header 84*cdf0e10cSrcweir */ 85*cdf0e10cSrcweir void SAL_CALL SwVbaPageSetup::setHeaderDistance( double _headerdistance ) throw (uno::RuntimeException) 86*cdf0e10cSrcweir { 87*cdf0e10cSrcweir sal_Int32 newHeaderDistance = Millimeter::getInHundredthsOfOneMillimeter( _headerdistance ); 88*cdf0e10cSrcweir sal_Bool isHeaderOn = sal_False; 89*cdf0e10cSrcweir sal_Int32 aktTopMargin = 0; 90*cdf0e10cSrcweir sal_Int32 aktSpacing = 0; 91*cdf0e10cSrcweir sal_Int32 aktHeaderHeight = 0; 92*cdf0e10cSrcweir 93*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; 94*cdf0e10cSrcweir if( !isHeaderOn ) 95*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_True ) ); 96*cdf0e10cSrcweir 97*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= aktTopMargin; 98*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance"))) >>= aktSpacing; 99*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= aktHeaderHeight; 100*cdf0e10cSrcweir 101*cdf0e10cSrcweir sal_Int32 newSpacing = aktSpacing - ( newHeaderDistance - aktTopMargin ); 102*cdf0e10cSrcweir sal_Int32 height = aktHeaderHeight - aktSpacing; 103*cdf0e10cSrcweir sal_Int32 newHeaderHeight = newSpacing + height; 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin")), uno::makeAny( newHeaderDistance ) ); 106*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderBodyDistance")), uno::makeAny( newSpacing ) ); 107*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight")), uno::makeAny( newHeaderHeight ) ); 108*cdf0e10cSrcweir } 109*cdf0e10cSrcweir 110*cdf0e10cSrcweir double SAL_CALL SwVbaPageSetup::getFooterDistance() throw (uno::RuntimeException) 111*cdf0e10cSrcweir { 112*cdf0e10cSrcweir sal_Bool isFooterOn = sal_False; 113*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn; 114*cdf0e10cSrcweir if( !isFooterOn ) 115*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) ); 116*cdf0e10cSrcweir return VbaPageSetupBase::getFooterMargin(); 117*cdf0e10cSrcweir } 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir void SAL_CALL SwVbaPageSetup::setFooterDistance( double _footerdistance ) throw (uno::RuntimeException) 120*cdf0e10cSrcweir { 121*cdf0e10cSrcweir sal_Int32 newFooterDistance = Millimeter::getInHundredthsOfOneMillimeter( _footerdistance ); 122*cdf0e10cSrcweir sal_Bool isFooterOn = sal_False; 123*cdf0e10cSrcweir sal_Int32 aktBottomMargin = 0; 124*cdf0e10cSrcweir sal_Int32 aktSpacing = 0; 125*cdf0e10cSrcweir sal_Int32 aktFooterHeight = 0; 126*cdf0e10cSrcweir 127*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn"))) >>= isFooterOn; 128*cdf0e10cSrcweir if( !isFooterOn ) 129*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_True ) ); 130*cdf0e10cSrcweir 131*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= aktBottomMargin; 132*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance"))) >>= aktSpacing; 133*cdf0e10cSrcweir mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= aktFooterHeight; 134*cdf0e10cSrcweir 135*cdf0e10cSrcweir sal_Int32 newSpacing = aktSpacing - ( newFooterDistance - aktBottomMargin ); 136*cdf0e10cSrcweir sal_Int32 height = aktFooterHeight - aktSpacing; 137*cdf0e10cSrcweir sal_Int32 newFooterHeight = newSpacing + height; 138*cdf0e10cSrcweir 139*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin")), uno::makeAny( newFooterDistance ) ); 140*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterBodyDistance")), uno::makeAny( newSpacing ) ); 141*cdf0e10cSrcweir mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight")), uno::makeAny( newFooterHeight ) ); 142*cdf0e10cSrcweir } 143*cdf0e10cSrcweir 144*cdf0e10cSrcweir sal_Bool SAL_CALL SwVbaPageSetup::getDifferentFirstPageHeaderFooter() throw (uno::RuntimeException) 145*cdf0e10cSrcweir { 146*cdf0e10cSrcweir rtl::OUString pageStyle = getStyleOfFirstPage(); 147*cdf0e10cSrcweir if( pageStyle.equalsAscii( "First Page" ) ) 148*cdf0e10cSrcweir return sal_True; 149*cdf0e10cSrcweir 150*cdf0e10cSrcweir return sal_False; 151*cdf0e10cSrcweir } 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir void SAL_CALL SwVbaPageSetup::setDifferentFirstPageHeaderFooter( sal_Bool status ) throw (uno::RuntimeException) 154*cdf0e10cSrcweir { 155*cdf0e10cSrcweir if( status == getDifferentFirstPageHeaderFooter() ) 156*cdf0e10cSrcweir return; 157*cdf0e10cSrcweir 158*cdf0e10cSrcweir rtl::OUString newStyle; 159*cdf0e10cSrcweir if( status ) 160*cdf0e10cSrcweir newStyle = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("First Page") ); 161*cdf0e10cSrcweir else 162*cdf0e10cSrcweir newStyle = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Standard") ); 163*cdf0e10cSrcweir 164*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > xStyleProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); 165*cdf0e10cSrcweir sal_Int32 nTopMargin = 0; 166*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin"))) >>= nTopMargin; 167*cdf0e10cSrcweir sal_Int32 nBottomMargin = 0; 168*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin"))) >>= nBottomMargin; 169*cdf0e10cSrcweir sal_Int32 nLeftMargin = 0; 170*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin"))) >>= nLeftMargin; 171*cdf0e10cSrcweir sal_Int32 nRightMargin = 0; 172*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin"))) >>= nRightMargin; 173*cdf0e10cSrcweir sal_Int32 nHeaderHeight = 0; 174*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderHeight"))) >>= nHeaderHeight; 175*cdf0e10cSrcweir sal_Int32 nFooterHeight = 0; 176*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterHeight"))) >>= nFooterHeight; 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir sal_Bool isHeaderOn = sal_False; 179*cdf0e10cSrcweir xStyleProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn"))) >>= isHeaderOn; 180*cdf0e10cSrcweir if( isHeaderOn ) 181*cdf0e10cSrcweir { 182*cdf0e10cSrcweir nTopMargin += nHeaderHeight; 183*cdf0e10cSrcweir nBottomMargin += nFooterHeight; 184*cdf0e10cSrcweir xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("HeaderIsOn")), uno::makeAny( sal_False ) ); 185*cdf0e10cSrcweir xStyleProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FooterIsOn")), uno::makeAny( sal_False ) ); 186*cdf0e10cSrcweir } 187*cdf0e10cSrcweir uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW ); 188*cdf0e10cSrcweir if( xPageCursor->getPage() != 1 ) 189*cdf0e10cSrcweir { 190*cdf0e10cSrcweir xPageCursor->jumpToFirstPage(); 191*cdf0e10cSrcweir } 192*cdf0e10cSrcweir 193*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); 194*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ), uno::UNO_QUERY ); 195*cdf0e10cSrcweir if( xTableProps.is() ) 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir xTableProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ), uno::makeAny( newStyle ) ); 198*cdf0e10cSrcweir } 199*cdf0e10cSrcweir else 200*cdf0e10cSrcweir { 201*cdf0e10cSrcweir xCursorProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ), uno::makeAny( newStyle ) ); 202*cdf0e10cSrcweir } 203*cdf0e10cSrcweir 204*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > xFirstPageProps( word::getCurrentPageStyle( mxModel ), uno::UNO_QUERY_THROW ); 205*cdf0e10cSrcweir xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TopMargin") ), uno::makeAny( nTopMargin ) ); 206*cdf0e10cSrcweir xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("BottomMargin") ), uno::makeAny( nBottomMargin ) ); 207*cdf0e10cSrcweir xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("LeftMargin") ), uno::makeAny( nLeftMargin ) ); 208*cdf0e10cSrcweir xFirstPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightMargin") ), uno::makeAny( nRightMargin ) ); 209*cdf0e10cSrcweir } 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir rtl::OUString SwVbaPageSetup::getStyleOfFirstPage() throw (uno::RuntimeException) 212*cdf0e10cSrcweir { 213*cdf0e10cSrcweir rtl::OUString styleFirstPage; 214*cdf0e10cSrcweir uno::Reference< text::XPageCursor > xPageCursor( word::getXTextViewCursor( mxModel ), uno::UNO_QUERY_THROW ); 215*cdf0e10cSrcweir if( xPageCursor->getPage() != 1 ) 216*cdf0e10cSrcweir { 217*cdf0e10cSrcweir xPageCursor->jumpToFirstPage(); 218*cdf0e10cSrcweir } 219*cdf0e10cSrcweir 220*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > xCursorProps( xPageCursor, uno::UNO_QUERY_THROW ); 221*cdf0e10cSrcweir uno::Reference< beans::XPropertySet > xTableProps( xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("TextTable") ) ), uno::UNO_QUERY ); 222*cdf0e10cSrcweir if( xTableProps.is() ) 223*cdf0e10cSrcweir { 224*cdf0e10cSrcweir xTableProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ) ) >>= styleFirstPage; 225*cdf0e10cSrcweir } 226*cdf0e10cSrcweir else 227*cdf0e10cSrcweir { 228*cdf0e10cSrcweir xCursorProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageDescName") ) ) >>= styleFirstPage; 229*cdf0e10cSrcweir } 230*cdf0e10cSrcweir return styleFirstPage; 231*cdf0e10cSrcweir } 232*cdf0e10cSrcweir 233*cdf0e10cSrcweir ::sal_Int32 SAL_CALL SwVbaPageSetup::getSectionStart() throw (uno::RuntimeException) 234*cdf0e10cSrcweir { 235*cdf0e10cSrcweir // FIXME: 236*cdf0e10cSrcweir sal_Int32 wdSectionStart = word::WdSectionStart::wdSectionNewPage; 237*cdf0e10cSrcweir uno::Reference< container::XNamed > xNamed( mxPageProps, uno::UNO_QUERY_THROW ); 238*cdf0e10cSrcweir rtl::OUString sStyleName = xNamed->getName(); 239*cdf0e10cSrcweir //mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("Name") ) ) >>= sStyleName; 240*cdf0e10cSrcweir if( sStyleName.equalsAscii("Left Page") ) 241*cdf0e10cSrcweir wdSectionStart = word::WdSectionStart::wdSectionEvenPage; 242*cdf0e10cSrcweir else if( sStyleName.equalsAscii("Right Page") ) 243*cdf0e10cSrcweir wdSectionStart = word::WdSectionStart::wdSectionOddPage; 244*cdf0e10cSrcweir else 245*cdf0e10cSrcweir wdSectionStart = word::WdSectionStart::wdSectionNewPage; 246*cdf0e10cSrcweir return wdSectionStart; 247*cdf0e10cSrcweir } 248*cdf0e10cSrcweir 249*cdf0e10cSrcweir void SAL_CALL SwVbaPageSetup::setSectionStart( ::sal_Int32 /*_sectionstart*/ ) throw (uno::RuntimeException) 250*cdf0e10cSrcweir { 251*cdf0e10cSrcweir // fail to find corresponding feature in Writer 252*cdf0e10cSrcweir // #FIXME: 253*cdf0e10cSrcweir } 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir rtl::OUString& 256*cdf0e10cSrcweir SwVbaPageSetup::getServiceImplName() 257*cdf0e10cSrcweir { 258*cdf0e10cSrcweir static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("SwVbaPageSetup") ); 259*cdf0e10cSrcweir return sImplName; 260*cdf0e10cSrcweir } 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir uno::Sequence< rtl::OUString > 263*cdf0e10cSrcweir SwVbaPageSetup::getServiceNames() 264*cdf0e10cSrcweir { 265*cdf0e10cSrcweir static uno::Sequence< rtl::OUString > aServiceNames; 266*cdf0e10cSrcweir if ( aServiceNames.getLength() == 0 ) 267*cdf0e10cSrcweir { 268*cdf0e10cSrcweir aServiceNames.realloc( 1 ); 269*cdf0e10cSrcweir aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.word.PageSetup" ) ); 270*cdf0e10cSrcweir } 271*cdf0e10cSrcweir return aServiceNames; 272*cdf0e10cSrcweir } 273