LibreOffice Module sc (master) 1
vbapagesetup.cxx
Go to the documentation of this file.
1/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2/*
3 * This file is part of the LibreOffice project.
4 *
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8 *
9 * This file incorporates work covered by the following license notice:
10 *
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
18 */
19#include "vbapagesetup.hxx"
20#include <convuno.hxx>
21#include <rangelst.hxx>
22#include <docsh.hxx>
23#include "excelvbahelper.hxx"
24#include "vbarange.hxx"
25#include <com/sun/star/sheet/XPrintAreas.hpp>
26#include <com/sun/star/sheet/XHeaderFooterContent.hpp>
27#include <com/sun/star/text/XText.hpp>
28#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
29#include <com/sun/star/container/XNameAccess.hpp>
30#include <ooo/vba/excel/XlPageOrientation.hpp>
31#include <ooo/vba/excel/XlOrder.hpp>
32#include <ooo/vba/excel/Constants.hpp>
33#include <ooo/vba/excel/XlPaperSize.hpp>
34#include <basic/sberrors.hxx>
36#include <utility>
37
38using namespace ::com::sun::star;
39using namespace ::ooo::vba;
40
41#define ZOOM_IN 10
42#define ZOOM_MAX 400
43
44ScVbaPageSetup::ScVbaPageSetup(const uno::Reference< XHelperInterface >& xParent,
45 const uno::Reference< uno::XComponentContext >& xContext,
46 uno::Reference< sheet::XSpreadsheet > xSheet,
47 const uno::Reference< frame::XModel >& xModel):
48 ScVbaPageSetup_BASE( xParent, xContext ), mxSheet(std::move( xSheet )), mbIsLandscape( false )
49{
50 // query for current page style
51 mxModel.set( xModel, uno::UNO_SET_THROW );
52 uno::Reference< beans::XPropertySet > xSheetProps( mxSheet, uno::UNO_QUERY_THROW );
53 uno::Any aValue = xSheetProps->getPropertyValue("PageStyle");
54 OUString aStyleName;
55 aValue >>= aStyleName;
56
57 uno::Reference< style::XStyleFamiliesSupplier > xStyleFamiliesSup( mxModel, uno::UNO_QUERY_THROW );
58 uno::Reference< container::XNameAccess > xStyleFamilies = xStyleFamiliesSup->getStyleFamilies();
59 uno::Reference< container::XNameAccess > xPageStyle( xStyleFamilies->getByName("PageStyles"), uno::UNO_QUERY_THROW );
60 mxPageProps.set( xPageStyle->getByName(aStyleName), uno::UNO_QUERY_THROW );
61 mnOrientLandscape = excel::XlPageOrientation::xlLandscape;
62 mnOrientPortrait = excel::XlPageOrientation::xlPortrait;
63 mxPageProps->getPropertyValue("IsLandscape") >>= mbIsLandscape;
64}
65
67{
68 OUString aPrintArea;
69 uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
70 const uno::Sequence< table::CellRangeAddress > aSeq = xPrintAreas->getPrintAreas();
71 if( aSeq.hasElements() )
72 {
73 ScRangeList aRangeList;
74 for( const auto& rRange : aSeq )
75 {
76 ScRange aRange;
77 ScUnoConversion::FillScRange( aRange, rRange );
78 aRangeList.push_back( aRange );
79 }
81 aRangeList.Format( aPrintArea, ScRefFlags::RANGE_ABS, rDoc, formula::FormulaGrammar::CONV_XL_A1, ',' );
82 }
83
84 return aPrintArea;
85}
86
87void SAL_CALL ScVbaPageSetup::setPrintArea( const OUString& rAreas )
88{
89 uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
90 if( rAreas.isEmpty() ||
91 rAreas.equalsIgnoreAsciiCase( "FALSE" ) )
92 {
93 // print the whole sheet
94 uno::Sequence< table::CellRangeAddress > aSeq;
95 xPrintAreas->setPrintAreas( aSeq );
96 }
97 else
98 {
99 ScRangeList aCellRanges;
100 ScRange aRange;
101 if( getScRangeListForAddress( rAreas, excel::getDocShell( mxModel ) , aRange, aCellRanges ) )
102 {
103 uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.size() );
104 auto aSeqRange = asNonConstRange(aSeq);
105 for ( size_t i = 0, nRanges = aCellRanges.size(); i < nRanges; ++i )
106 {
107 ScRange & rRange = aCellRanges[ i ];
108 table::CellRangeAddress aRangeAddress;
109 ScUnoConversion::FillApiRange( aRangeAddress, rRange );
110 aSeqRange[ i++ ] = aRangeAddress;
111 }
112 xPrintAreas->setPrintAreas( aSeq );
113 }
114 }
115}
116
118{
120}
121
122void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin )
123{
125}
126
128{
130}
131
132void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin )
133{
135}
136
138{
139 return mxPageProps->getPropertyValue("ScaleToPagesY");
140}
141
142void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall)
143{
144 try
145 {
146 sal_uInt16 scaleToPageY = 0;
147 bool aValue;
148 if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue))
149 {
150 fitToPagesTall >>= scaleToPageY;
151 }
152
153 mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( scaleToPageY ));
154 }
155 catch( uno::Exception& )
156 {
157 }
158}
159
161{
162 return mxPageProps->getPropertyValue("ScaleToPagesX");
163}
164
165void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide)
166{
167 try
168 {
169 sal_uInt16 scaleToPageX = 0;
170 bool aValue = false;
171 if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
172 {
173 fitToPagesWide >>= scaleToPageX;
174 }
175
176 mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( scaleToPageX ));
177 }
178 catch( uno::Exception& )
179 {
180 }
181}
182
184{
185 return mxPageProps->getPropertyValue("PageScale");
186}
187
188void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom)
189{
190 sal_uInt16 pageScale = 0;
191 try
192 {
193 if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
194 {
195 bool aValue = false;
196 zoom >>= aValue;
197 if( aValue )
198 {
199 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
200 }
201 }
202 else
203 {
204 zoom >>= pageScale;
205 if(( pageScale < ZOOM_IN )||( pageScale > ZOOM_MAX ))
206 {
207 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
208 }
209 }
210
211 // these only exist in S08
212 sal_uInt16 nScale = 0;
213 mxPageProps->setPropertyValue("ScaleToPages", uno::Any( nScale ));
214 mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( nScale ));
215 mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( nScale ));
216 }
217 catch (const beans::UnknownPropertyException&)
218 {
219 if( pageScale == 0 )
220 {
221 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
222 }
223 }
224 catch (const uno::Exception&)
225 {
226 }
227
228 mxPageProps->setPropertyValue("PageScale", uno::Any( pageScale ));
229}
230
232{
233 OUString leftHeader;
234 try
235 {
236 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
237 uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
238 leftHeader = xText->getString();
239 }
240 catch( uno::Exception& )
241 {
242 }
243
244 return leftHeader;
245}
246
247void SAL_CALL ScVbaPageSetup::setLeftHeader( const OUString& leftHeader)
248{
249 try
250 {
251 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
252 uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
253 xText->setString( leftHeader );
254 mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) );
255 }
256 catch( uno::Exception& )
257 {
258 }
259}
260
262{
263 OUString centerHeader;
264 try
265 {
266 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
267 uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
268 centerHeader = xText->getString();
269 }
270 catch( uno::Exception& )
271 {
272 }
273
274 return centerHeader;
275}
276
277void SAL_CALL ScVbaPageSetup::setCenterHeader( const OUString& centerHeader)
278{
279 try
280 {
281 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
282 uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
283 xText->setString( centerHeader );
284 mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) );
285 }
286 catch( uno::Exception& )
287 {
288 }
289}
290
292{
293 OUString rightHeader;
294 try
295 {
296 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
297 uno::Reference< text::XText > xText = xHeaderContent->getRightText();
298 rightHeader = xText->getString();
299 }
300 catch( uno::Exception& )
301 {
302 }
303
304 return rightHeader;
305}
306
307void SAL_CALL ScVbaPageSetup::setRightHeader( const OUString& rightHeader)
308{
309 try
310 {
311 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
312 uno::Reference< text::XText > xText = xHeaderContent->getRightText();
313 xText->setString( rightHeader );
314 mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) );
315 }
316 catch( uno::Exception& )
317 {
318 }
319}
320
322{
323 OUString leftFooter;
324 try
325 {
326 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
327 uno::Reference< text::XText > xText = xFooterContent->getLeftText();
328 leftFooter = xText->getString();
329 }
330 catch( uno::Exception& )
331 {
332 }
333
334 return leftFooter;
335}
336
337void SAL_CALL ScVbaPageSetup::setLeftFooter( const OUString& leftFooter)
338{
339 try
340 {
341 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
342 uno::Reference< text::XText > xText = xFooterContent->getLeftText();
343 xText->setString( leftFooter );
344 mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) );
345 }
346 catch( uno::Exception& )
347 {
348 }
349}
350
352{
353 OUString centerFooter;
354 try
355 {
356 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
357 uno::Reference< text::XText > xText = xFooterContent->getCenterText();
358 centerFooter = xText->getString();
359 }
360 catch( uno::Exception& )
361 {
362 }
363
364 return centerFooter;
365}
366
367void SAL_CALL ScVbaPageSetup::setCenterFooter( const OUString& centerFooter)
368{
369 try
370 {
371 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
372 uno::Reference< text::XText > xText = xFooterContent->getCenterText();
373 xText->setString( centerFooter );
374 mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) );
375 }
376 catch( uno::Exception& )
377 {
378 }
379
380}
381
383{
384 OUString rightFooter;
385 try
386 {
387 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
388 uno::Reference< text::XText > xText = xFooterContent->getRightText();
389 rightFooter = xText->getString();
390 }
391 catch( uno::Exception& )
392 {
393 }
394
395 return rightFooter;
396}
397
398void SAL_CALL ScVbaPageSetup::setRightFooter( const OUString& rightFooter)
399{
400 try
401 {
402 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
403 uno::Reference< text::XText > xText = xFooterContent->getRightText();
404 xText->setString( rightFooter );
405 mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) );
406 }
407 catch( uno::Exception& )
408 {
409 }
410}
411
412sal_Int32 SAL_CALL ScVbaPageSetup::getOrder()
413{
414 sal_Int32 order = excel::XlOrder::xlDownThenOver;
415 try
416 {
417 uno::Any aValue = mxPageProps->getPropertyValue("PrintDownFirst");
418 bool bPrintDownFirst = false;
419 aValue >>= bPrintDownFirst;
420 if( !bPrintDownFirst )
421 order = excel::XlOrder::xlOverThenDown;
422 }
423 catch( uno::Exception& )
424 {
425 }
426
427 return order;
428}
429
430void SAL_CALL ScVbaPageSetup::setOrder(sal_Int32 order)
431{
432 bool bOrder = true;
433 switch( order )
434 {
435 case excel::XlOrder::xlDownThenOver:
436 break;
437 case excel::XlOrder::xlOverThenDown:
438 bOrder = false;
439 break;
440 default:
441 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
442 }
443
444 try
445 {
446 mxPageProps->setPropertyValue("PrintDownFirst", uno::Any( bOrder ));
447 }
448 catch (const uno::Exception&)
449 {
450 }
451}
452
454{
455 sal_Int16 number = 0;
456 try
457 {
458 uno::Any aValue = mxPageProps->getPropertyValue("FirstPageNumber");
459 aValue >>= number;
460 }
461 catch( uno::Exception& )
462 {
463 }
464
465 if( number ==0 )
466 {
467 number = excel::Constants::xlAutomatic;
468 }
469
470 return number;
471}
472
473void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber)
474{
475 if( firstPageNumber == excel::Constants::xlAutomatic )
476 firstPageNumber = 0;
477
478 try
479 {
480 uno::Any aValue;
481 aValue <<= static_cast<sal_Int16>(firstPageNumber);
482 mxPageProps->setPropertyValue("FirstPageNumber", aValue );
483 }
484 catch (const uno::Exception&)
485 {
486 }
487}
488
490{
491 bool centerVertically = false;
492 try
493 {
494 uno::Any aValue = mxPageProps->getPropertyValue("CenterVertically");
495 aValue >>= centerVertically;
496 }
497 catch (const uno::Exception&)
498 {
499 }
500 return centerVertically;
501}
502
503void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically)
504{
505 try
506 {
507 mxPageProps->setPropertyValue("CenterVertically", uno::Any( centerVertically ));
508 }
509 catch (const uno::Exception&)
510 {
511 }
512}
513
515{
516 bool centerHorizontally = false;
517 try
518 {
519 uno::Any aValue = mxPageProps->getPropertyValue("CenterHorizontally");
520 aValue >>= centerHorizontally;
521 }
522 catch (const uno::Exception&)
523 {
524 }
525 return centerHorizontally;
526}
527
528void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally)
529{
530 try
531 {
532 mxPageProps->setPropertyValue("CenterHorizontally", uno::Any( centerHorizontally ));
533 }
534 catch (const uno::Exception&)
535 {
536 }
537}
538
540{
541 bool printHeadings = false;
542 try
543 {
544 uno::Any aValue = mxPageProps->getPropertyValue("PrintHeaders");
545 aValue >>= printHeadings;
546 }
547 catch (const uno::Exception&)
548 {
549 }
550 return printHeadings;
551}
552
553void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings)
554{
555 try
556 {
557 mxPageProps->setPropertyValue("PrintHeaders", uno::Any( printHeadings ));
558 }
559 catch( uno::Exception& )
560 {
561 }
562}
563
565{
566 return false;
567}
568
569void SAL_CALL ScVbaPageSetup::setPrintGridlines( sal_Bool /*_printgridlines*/ )
570{
571}
572
574{
575 return OUString();
576}
577void SAL_CALL ScVbaPageSetup::setPrintTitleRows( const OUString& /*_printtitlerows*/ )
578{
579}
581{
582 return OUString();
583}
584
585void SAL_CALL ScVbaPageSetup::setPrintTitleColumns( const OUString& /*_printtitlecolumns*/ )
586{
587}
588
590{
591 awt::Size aSize; // current papersize
592 mxPageProps->getPropertyValue( "Size" ) >>= aSize;
593 if ( mbIsLandscape )
594 ::std::swap( aSize.Width, aSize.Height );
595
596 sal_Int32 nPaperSizeIndex = msfilter::util::PaperSizeConv::getMSPaperSizeIndex( aSize );
597 if ( nPaperSizeIndex == 0 )
598 nPaperSizeIndex = excel::XlPaperSize::xlPaperUser;
599 return nPaperSizeIndex;
600}
601
602void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 papersize )
603{
604 if ( papersize != excel::XlPaperSize::xlPaperUser )
605 {
606 awt::Size aPaperSize;
608 aPaperSize.Height = rConvertedSize.mnHeight;
609 aPaperSize.Width = rConvertedSize.mnWidth;
610 if ( mbIsLandscape )
611 ::std::swap( aPaperSize.Width, aPaperSize.Height );
612 mxPageProps->setPropertyValue( "Size", uno::Any( aPaperSize ) );
613 }
614}
615
616OUString
618{
619 return "ScVbaPageSetup";
620}
621
622uno::Sequence< OUString >
624{
625 static uno::Sequence< OUString > const aServiceNames
626 {
627 "ooo.vba.excel.PageSetup"
628 };
629 return aServiceNames;
630}
631
632/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::frame::XModel2 > mxModel
const ScDocument & GetDocument() const
Definition: docsh.hxx:220
void Format(OUString &, ScRefFlags nFlags, const ScDocument &, formula::FormulaGrammar::AddressConvention eConv=formula::FormulaGrammar::CONV_OOO, sal_Unicode cDelimiter=0, bool bFullAddressNotation=false) const
Definition: rangelst.cxx:132
void push_back(const ScRange &rRange)
Definition: rangelst.cxx:1137
size_t size() const
Definition: rangelst.hxx:89
static void FillScRange(ScRange &rScRange, const css::table::CellRangeAddress &rApiRange)
Definition: convuno.hxx:79
static void FillApiRange(css::table::CellRangeAddress &rApiRange, const ScRange &rScRange)
Definition: convuno.hxx:87
virtual void SAL_CALL setCenterVertically(sal_Bool centerVertically) override
virtual OUString SAL_CALL getCenterFooter() override
virtual sal_Bool SAL_CALL getCenterVertically() override
virtual void SAL_CALL setLeftFooter(const OUString &leftFooter) override
virtual void SAL_CALL setRightFooter(const OUString &rightFooter) override
virtual void SAL_CALL setPrintArea(const OUString &rAreas) override
virtual OUString SAL_CALL getRightFooter() override
virtual void SAL_CALL setLeftHeader(const OUString &leftHeader) override
virtual void SAL_CALL setPrintHeadings(sal_Bool printHeadings) override
void SAL_CALL setHeaderMargin(double margin) override
virtual OUString SAL_CALL getPrintTitleColumns() override
virtual void SAL_CALL setRightHeader(const OUString &rightHeader) override
virtual void SAL_CALL setOrder(sal_Int32 order) override
virtual void SAL_CALL setPaperSize(sal_Int32 papersize) override
void SAL_CALL setFooterMargin(double margin) override
virtual void SAL_CALL setFitToPagesTall(const css::uno::Any &fitToPagesTall) override
virtual sal_Bool SAL_CALL getCenterHorizontally() override
virtual void SAL_CALL setFirstPageNumber(sal_Int32 firstPageNumber) override
virtual sal_Int32 SAL_CALL getFirstPageNumber() override
virtual OUString SAL_CALL getPrintArea() override
virtual void SAL_CALL setCenterHeader(const OUString &centerHeader) override
virtual css::uno::Any SAL_CALL getFitToPagesTall() override
virtual css::uno::Sequence< OUString > getServiceNames() override
double SAL_CALL getFooterMargin() override
virtual OUString SAL_CALL getPrintTitleRows() override
virtual void SAL_CALL setCenterHorizontally(sal_Bool centerHorizontally) override
virtual sal_Bool SAL_CALL getPrintHeadings() override
virtual sal_Int32 SAL_CALL getPaperSize() override
virtual OUString SAL_CALL getLeftFooter() override
ScVbaPageSetup(const css::uno::Reference< ov::XHelperInterface > &xParent, const css::uno::Reference< css::uno::XComponentContext > &xContext, css::uno::Reference< css::sheet::XSpreadsheet > xSheet, const css::uno::Reference< css::frame::XModel > &xModel)
virtual double SAL_CALL getHeaderMargin() override
virtual OUString SAL_CALL getLeftHeader() override
virtual void SAL_CALL setCenterFooter(const OUString &centerFooter) override
virtual css::uno::Any SAL_CALL getZoom() override
virtual void SAL_CALL setPrintTitleColumns(const OUString &_printtitlecolumns) override
virtual void SAL_CALL setPrintTitleRows(const OUString &_printtitlerows) override
virtual void SAL_CALL setFitToPagesWide(const css::uno::Any &fitToPagesWide) override
virtual OUString SAL_CALL getRightHeader() override
css::uno::Reference< css::sheet::XSpreadsheet > mxSheet
virtual sal_Int32 SAL_CALL getOrder() override
virtual css::uno::Any SAL_CALL getFitToPagesWide() override
virtual void SAL_CALL setPrintGridlines(sal_Bool _printgridlines) override
virtual OUString SAL_CALL getCenterHeader() override
virtual sal_Bool SAL_CALL getPrintGridlines() override
virtual void SAL_CALL setZoom(const css::uno::Any &zoom) override
virtual OUString getServiceImplName() override
virtual void SAL_CALL setFooterMargin(double margin)
virtual double SAL_CALL getFooterMargin()
virtual void SAL_CALL setHeaderMargin(double margin)
virtual double SAL_CALL getHeaderMargin()
static const ApiPaperSize & getApiSizeForMSPaperSizeIndex(sal_Int32 nMSOPaperIndex)
static sal_Int32 getMSPaperSizeIndex(const css::awt::Size &rSize)
Sequence< OUString > aServiceNames
Sequence< sal_Int8 > aSeq
int i
ScDocShell * getDocShell(const css::uno::Reference< css::frame::XModel > &xModel)
#define ERRCODE_BASIC_BAD_PARAMETER
Reference< XModel > xModel
unsigned char sal_Bool
#define ZOOM_MAX
#define ZOOM_IN
cppu::ImplInheritanceHelper< VbaPageSetupBase, ov::excel::XPageSetup > ScVbaPageSetup_BASE
bool getScRangeListForAddress(const OUString &sName, ScDocShell *pDocSh, const ScRange &refRange, ScRangeList &aCellRanges, formula::FormulaGrammar::AddressConvention aConv)
Definition: vbarange.cxx:1170