update dev300-m58
[ooovba.git] / sc / source / ui / vba / vbapagesetup.cxx
blob6d78b6c67c46107cb07f3c170ceb212b1dd9b631
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 "vbapagesetup.hxx"
31 #include "cellsuno.hxx"
32 #include "convuno.hxx"
33 #include "rangelst.hxx"
34 #include "excelvbahelper.hxx"
35 #include <com/sun/star/sheet/XPrintAreas.hpp>
36 #include <com/sun/star/sheet/XHeaderFooterContent.hpp>
37 #include <com/sun/star/text/XText.hpp>
38 #include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
39 #include <com/sun/star/container/XNameAccess.hpp>
40 #include <ooo/vba/excel/XlPageOrientation.hpp>
41 #include <ooo/vba/excel/XlOrder.hpp>
42 #include <ooo/vba/excel/Constants.hpp>
44 using namespace ::com::sun::star;
45 using namespace ::ooo::vba;
47 #define ZOOM_IN 10
48 #define ZOOM_MAX 400
50 bool getScRangeListForAddress( const rtl::OUString& sName, ScDocShell* pDocSh, ScRange& refRange, ScRangeList& aCellRanges, formula::FormulaGrammar::AddressConvention aConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException );
52 ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent,
53 const uno::Reference< uno::XComponentContext >& xContext,
54 const uno::Reference< sheet::XSpreadsheet >& xSheet,
55 const uno::Reference< frame::XModel >& xModel) throw (uno::RuntimeException):
56 ScVbaPageSetup_BASE( xParent, xContext ), mxSheet( xSheet )
58 // query for current page style
59 mxModel.set( xModel, uno::UNO_QUERY_THROW );
60 uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
61 uno::Any aValue = xSheetProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "PageStyle" )));
62 rtl::OUString aStyleName;
63 aValue >>= aStyleName;
65 uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW );
66 uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
67 uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageStyles"))), uno::UNO_QUERY_THROW );
68 mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
69 mnOrientLandscape = excel::XlPageOrientation::xlLandscape;
70 mnOrientPortrait = excel::XlPageOrientation::xlPortrait;
73 rtl::OUString SAL_CALL ScVbaPageSetup::getPrintArea() throw (css::uno::RuntimeException)
75 String aPrintArea;
76 uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
77 uno::Sequence< table::CellRangeAddress > aSeq = xPrintAreas->getPrintAreas();
78 sal_Int32 nCount = aSeq.getLength();
79 if( nCount )
81 ScAddress::Details aDetails( formula::FormulaGrammar::CONV_XL_A1, 0, 0 );
82 USHORT nFlags = SCA_VALID;
83 nFlags |= ( SCA_TAB_ABSOLUTE | SCA_COL_ABSOLUTE | SCA_ROW_ABSOLUTE | SCA_TAB2_ABSOLUTE | SCA_COL2_ABSOLUTE | SCA_ROW2_ABSOLUTE );
84 ScRangeList aRangeList;
85 for( sal_Int32 i=0; i<nCount; i++ )
87 ScRange aRange;
88 ScUnoConversion::FillScRange( aRange, aSeq[i] );
89 aRangeList.Append( aRange );
91 ScDocument* pDoc = excel::getDocShell( mxModel )->GetDocument();
92 aRangeList.Format( aPrintArea, nFlags, pDoc, formula::FormulaGrammar::CONV_XL_A1, ',' );
95 return aPrintArea;
98 void SAL_CALL ScVbaPageSetup::setPrintArea( const rtl::OUString& rAreas ) throw (css::uno::RuntimeException)
100 uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
101 if( rAreas.getLength() == 0 ||
102 rAreas.equalsIgnoreAsciiCase ( rtl::OUString::createFromAscii("FALSE") ) )
104 // print the whole sheet
105 uno::Sequence< table::CellRangeAddress > aSeq;
106 xPrintAreas->setPrintAreas( aSeq );
108 else
110 ScRangeList aCellRanges;
111 ScRange aRange;
112 if( getScRangeListForAddress( rAreas, excel::getDocShell( mxModel ) , aRange, aCellRanges ) )
114 uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.Count() );
115 USHORT i=0;
116 for( ScRange* pRange = aCellRanges.First(); pRange; pRange = aCellRanges.Next() )
118 table::CellRangeAddress aRangeAddress;
119 ScUnoConversion::FillApiRange( aRangeAddress, *pRange );
120 aSeq[ i++ ] = aRangeAddress;
122 xPrintAreas->setPrintAreas( aSeq );
127 double SAL_CALL ScVbaPageSetup::getHeaderMargin() throw (css::uno::RuntimeException)
129 return VbaPageSetupBase::getHeaderMargin();
132 void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin ) throw (css::uno::RuntimeException)
134 VbaPageSetupBase::setHeaderMargin( margin );
137 double SAL_CALL ScVbaPageSetup::getFooterMargin() throw (css::uno::RuntimeException)
139 return VbaPageSetupBase::getFooterMargin();
142 void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin ) throw (css::uno::RuntimeException)
144 VbaPageSetupBase::setFooterMargin( margin );
147 uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesTall() throw (css::uno::RuntimeException)
149 return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")));
152 void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall) throw (css::uno::RuntimeException)
154 USHORT scaleToPageY = 0;
157 sal_Bool aValue;
158 if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue))
160 fitToPagesTall >>= scaleToPageY;
163 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( scaleToPageY ));
165 catch( uno::Exception& )
170 uno::Any SAL_CALL ScVbaPageSetup::getFitToPagesWide() throw (css::uno::RuntimeException)
172 return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")));
175 void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide) throw (css::uno::RuntimeException)
177 USHORT scaleToPageX = 0;
180 sal_Bool aValue = sal_False;
181 if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
183 fitToPagesWide >>= scaleToPageX;
186 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( scaleToPageX ));
188 catch( uno::Exception& )
193 uno::Any SAL_CALL ScVbaPageSetup::getZoom() throw (css::uno::RuntimeException)
195 return mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")));
198 void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom) throw (css::uno::RuntimeException)
200 USHORT pageScale = 0;
203 if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
205 sal_Bool aValue = sal_False;
206 zoom >>= aValue;
207 if( aValue )
209 DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
212 else
214 zoom >>= pageScale;
215 if(( pageScale < ZOOM_IN )||( pageScale > ZOOM_MAX ))
217 DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
221 // these only exist in S08
222 USHORT nScale = 0;
223 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPages")), uno::makeAny( nScale ));
224 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesX")), uno::makeAny( nScale ));
225 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScaleToPagesY")), uno::makeAny( nScale ));
227 catch( beans::UnknownPropertyException& )
229 if( pageScale == 0 )
231 DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
234 catch( uno::Exception& )
238 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PageScale")), uno::makeAny( pageScale ));
241 rtl::OUString SAL_CALL ScVbaPageSetup::getLeftHeader() throw (css::uno::RuntimeException)
243 rtl::OUString leftHeader;
246 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
247 if( xHeaderContent.is() )
249 uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
250 leftHeader = xText->getString();
253 catch( uno::Exception& )
257 return leftHeader;
260 void SAL_CALL ScVbaPageSetup::setLeftHeader( const rtl::OUString& leftHeader) throw (css::uno::RuntimeException)
264 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
265 if( xHeaderContent.is() )
267 uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
268 xText->setString( leftHeader );
269 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
272 catch( uno::Exception& )
277 rtl::OUString SAL_CALL ScVbaPageSetup::getCenterHeader() throw (css::uno::RuntimeException)
279 rtl::OUString centerHeader;
282 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
283 if( xHeaderContent.is() )
285 uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
286 centerHeader = xText->getString();
289 catch( uno::Exception& )
293 return centerHeader;
296 void SAL_CALL ScVbaPageSetup::setCenterHeader( const rtl::OUString& centerHeader) throw (css::uno::RuntimeException)
300 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
301 if( xHeaderContent.is() )
303 uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
304 xText->setString( centerHeader );
305 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
308 catch( uno::Exception& )
313 rtl::OUString SAL_CALL ScVbaPageSetup::getRightHeader() throw (css::uno::RuntimeException)
315 rtl::OUString rightHeader;
318 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
319 if( xHeaderContent.is() )
321 uno::Reference< text::XText > xText = xHeaderContent->getRightText();
322 rightHeader = xText->getString();
325 catch( uno::Exception& )
329 return rightHeader;
332 void SAL_CALL ScVbaPageSetup::setRightHeader( const rtl::OUString& rightHeader) throw (css::uno::RuntimeException)
336 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent"))), uno::UNO_QUERY_THROW);
337 if( xHeaderContent.is() )
339 uno::Reference< text::XText > xText = xHeaderContent->getRightText();
340 xText->setString( rightHeader );
341 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageHeaderContent")), uno::makeAny(xHeaderContent) );
344 catch( uno::Exception& )
349 rtl::OUString SAL_CALL ScVbaPageSetup::getLeftFooter() throw (css::uno::RuntimeException)
351 rtl::OUString leftFooter;
354 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
355 if( xFooterContent.is() )
357 uno::Reference< text::XText > xText = xFooterContent->getLeftText();
358 leftFooter = xText->getString();
361 catch( uno::Exception& )
365 return leftFooter;
368 void SAL_CALL ScVbaPageSetup::setLeftFooter( const rtl::OUString& leftFooter) throw (css::uno::RuntimeException)
372 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
373 if( xFooterContent.is() )
375 uno::Reference< text::XText > xText = xFooterContent->getLeftText();
376 xText->setString( leftFooter );
377 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
380 catch( uno::Exception& )
385 rtl::OUString SAL_CALL ScVbaPageSetup::getCenterFooter() throw (css::uno::RuntimeException)
387 rtl::OUString centerFooter;
390 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
391 if( xFooterContent.is() )
393 uno::Reference< text::XText > xText = xFooterContent->getCenterText();
394 centerFooter = xText->getString();
397 catch( uno::Exception& )
401 return centerFooter;
404 void SAL_CALL ScVbaPageSetup::setCenterFooter( const rtl::OUString& centerFooter) throw (css::uno::RuntimeException)
408 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
409 if( xFooterContent.is() )
411 uno::Reference< text::XText > xText = xFooterContent->getCenterText();
412 xText->setString( centerFooter );
413 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
416 catch( uno::Exception& )
422 rtl::OUString SAL_CALL ScVbaPageSetup::getRightFooter() throw (css::uno::RuntimeException)
424 rtl::OUString rightFooter;
427 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
428 if( xFooterContent.is() )
430 uno::Reference< text::XText > xText = xFooterContent->getRightText();
431 rightFooter = xText->getString();
434 catch( uno::Exception& )
438 return rightFooter;
441 void SAL_CALL ScVbaPageSetup::setRightFooter( const rtl::OUString& rightFooter) throw (css::uno::RuntimeException)
445 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent"))), uno::UNO_QUERY_THROW);
446 if( xFooterContent.is() )
448 uno::Reference< text::XText > xText = xFooterContent->getRightText();
449 xText->setString( rightFooter );
450 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("RightPageFooterContent")), uno::makeAny(xFooterContent) );
453 catch( uno::Exception& )
458 sal_Int32 SAL_CALL ScVbaPageSetup::getOrder() throw (css::uno::RuntimeException)
460 sal_Int32 order = excel::XlOrder::xlDownThenOver;
463 uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")));
464 sal_Bool bPrintDownFirst = sal_False;
465 aValue >>= bPrintDownFirst;
466 if( !bPrintDownFirst )
467 order = excel::XlOrder::xlOverThenDown;
469 catch( uno::Exception& )
473 return order;
476 void SAL_CALL ScVbaPageSetup::setOrder( sal_Int32 order) throw (css::uno::RuntimeException)
478 sal_Bool bOrder = sal_True;
479 switch( order )
481 case excel::XlOrder::xlDownThenOver:
482 break;
483 case excel::XlOrder::xlOverThenDown:
484 bOrder = sal_False;
485 break;
486 default:
487 DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
492 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintDownFirst")), uno::makeAny( bOrder ));
494 catch( uno::Exception& )
499 sal_Int32 SAL_CALL ScVbaPageSetup::getFirstPageNumber() throw (css::uno::RuntimeException)
501 sal_Int16 number = 0;
504 uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")));
505 aValue >>= number;
507 catch( uno::Exception& )
511 if( number ==0 )
513 number = excel::Constants::xlAutomatic;
516 return number;
519 void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber) throw (css::uno::RuntimeException)
521 if( firstPageNumber < 0 )
522 DebugHelper::exception(SbERR_BAD_PARAMETER, rtl::OUString() );
523 if( firstPageNumber == excel::Constants::xlAutomatic )
524 firstPageNumber = 0;
528 uno::Any aValue;
529 aValue <<= (sal_Int16)firstPageNumber;
530 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("FirstPageNumber")), aValue );
532 catch( uno::Exception& )
537 sal_Bool SAL_CALL ScVbaPageSetup::getCenterVertically() throw (css::uno::RuntimeException)
539 sal_Bool centerVertically = sal_False;
542 uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")));
543 aValue >>= centerVertically;
545 catch( uno::Exception& )
548 return centerVertically;
551 void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically) throw (css::uno::RuntimeException)
555 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterVertically")), uno::makeAny( centerVertically ));
557 catch( uno::Exception& )
562 sal_Bool SAL_CALL ScVbaPageSetup::getCenterHorizontally() throw (css::uno::RuntimeException)
564 sal_Bool centerHorizontally = sal_False;
567 uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")));
568 aValue >>= centerHorizontally;
570 catch( uno::Exception& )
573 return centerHorizontally;
576 void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally) throw (css::uno::RuntimeException)
580 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("CenterHorizontally")), uno::makeAny( centerHorizontally ));
582 catch( uno::Exception& )
587 sal_Bool SAL_CALL ScVbaPageSetup::getPrintHeadings() throw (css::uno::RuntimeException)
589 sal_Bool printHeadings = sal_False;
592 uno::Any aValue = mxPageProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")));
593 aValue >>= printHeadings;
595 catch( uno::Exception& )
598 return printHeadings;
601 void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings) throw (css::uno::RuntimeException)
605 mxPageProps->setPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("PrintHeaders")), uno::makeAny( printHeadings ));
607 catch( uno::Exception& )
612 rtl::OUString&
613 ScVbaPageSetup::getServiceImplName()
615 static rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM("ScVbaPageSetup") );
616 return sImplName;
619 uno::Sequence< rtl::OUString >
620 ScVbaPageSetup::getServiceNames()
622 static uno::Sequence< rtl::OUString > aServiceNames;
623 if ( aServiceNames.getLength() == 0 )
625 aServiceNames.realloc( 1 );
626 aServiceNames[ 0 ] = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ooo.vba.excel.PageSetup" ) );
628 return aServiceNames;