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 }
80 if ( ScDocShell* pShell = excel::getDocShell( mxModel ))
81 {
82 ScDocument& rDoc = pShell->GetDocument();
83 aRangeList.Format( aPrintArea, ScRefFlags::RANGE_ABS, rDoc, formula::FormulaGrammar::CONV_XL_A1, ',' );
84 }
85 }
86
87 return aPrintArea;
88}
89
90void SAL_CALL ScVbaPageSetup::setPrintArea( const OUString& rAreas )
91{
92 uno::Reference< sheet::XPrintAreas > xPrintAreas( mxSheet, uno::UNO_QUERY_THROW );
93 if( rAreas.isEmpty() ||
94 rAreas.equalsIgnoreAsciiCase( "FALSE" ) )
95 {
96 // print the whole sheet
97 uno::Sequence< table::CellRangeAddress > aSeq;
98 xPrintAreas->setPrintAreas( aSeq );
99 }
100 else
101 {
102 ScRangeList aCellRanges;
103 ScRange aRange;
104 if( getScRangeListForAddress( rAreas, excel::getDocShell( mxModel ) , aRange, aCellRanges ) )
105 {
106 uno::Sequence< table::CellRangeAddress > aSeq( aCellRanges.size() );
107 auto aSeqRange = asNonConstRange(aSeq);
108 for ( size_t i = 0, nRanges = aCellRanges.size(); i < nRanges; ++i )
109 {
110 ScRange & rRange = aCellRanges[ i ];
111 table::CellRangeAddress aRangeAddress;
112 ScUnoConversion::FillApiRange( aRangeAddress, rRange );
113 aSeqRange[ i++ ] = aRangeAddress;
114 }
115 xPrintAreas->setPrintAreas( aSeq );
116 }
117 }
118}
119
121{
123}
124
125void SAL_CALL ScVbaPageSetup::setHeaderMargin( double margin )
126{
128}
129
131{
133}
134
135void SAL_CALL ScVbaPageSetup::setFooterMargin( double margin )
136{
138}
139
141{
142 return mxPageProps->getPropertyValue("ScaleToPagesY");
143}
144
145void SAL_CALL ScVbaPageSetup::setFitToPagesTall( const uno::Any& fitToPagesTall)
146{
147 try
148 {
149 sal_uInt16 scaleToPageY = 0;
150 bool aValue;
151 if( fitToPagesTall.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesTall >>= aValue))
152 {
153 fitToPagesTall >>= scaleToPageY;
154 }
155
156 mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( scaleToPageY ));
157 }
158 catch( uno::Exception& )
159 {
160 }
161}
162
164{
165 return mxPageProps->getPropertyValue("ScaleToPagesX");
166}
167
168void SAL_CALL ScVbaPageSetup::setFitToPagesWide( const uno::Any& fitToPagesWide)
169{
170 try
171 {
172 sal_uInt16 scaleToPageX = 0;
173 bool aValue = false;
174 if( fitToPagesWide.getValueTypeClass() != uno::TypeClass_BOOLEAN || (fitToPagesWide >>= aValue))
175 {
176 fitToPagesWide >>= scaleToPageX;
177 }
178
179 mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( scaleToPageX ));
180 }
181 catch( uno::Exception& )
182 {
183 }
184}
185
187{
188 return mxPageProps->getPropertyValue("PageScale");
189}
190
191void SAL_CALL ScVbaPageSetup::setZoom( const uno::Any& zoom)
192{
193 sal_uInt16 pageScale = 0;
194 try
195 {
196 if( zoom.getValueTypeClass() == uno::TypeClass_BOOLEAN )
197 {
198 bool aValue = false;
199 zoom >>= aValue;
200 if( aValue )
201 {
202 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
203 }
204 }
205 else
206 {
207 zoom >>= pageScale;
208 if(( pageScale < ZOOM_IN )||( pageScale > ZOOM_MAX ))
209 {
210 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
211 }
212 }
213
214 // these only exist in S08
215 sal_uInt16 nScale = 0;
216 mxPageProps->setPropertyValue("ScaleToPages", uno::Any( nScale ));
217 mxPageProps->setPropertyValue("ScaleToPagesX", uno::Any( nScale ));
218 mxPageProps->setPropertyValue("ScaleToPagesY", uno::Any( nScale ));
219 }
220 catch (const beans::UnknownPropertyException&)
221 {
222 if( pageScale == 0 )
223 {
224 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
225 }
226 }
227 catch (const uno::Exception&)
228 {
229 }
230
231 mxPageProps->setPropertyValue("PageScale", uno::Any( pageScale ));
232}
233
235{
236 OUString leftHeader;
237 try
238 {
239 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
240 uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
241 leftHeader = xText->getString();
242 }
243 catch( uno::Exception& )
244 {
245 }
246
247 return leftHeader;
248}
249
250void SAL_CALL ScVbaPageSetup::setLeftHeader( const OUString& leftHeader)
251{
252 try
253 {
254 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
255 uno::Reference< text::XText > xText = xHeaderContent->getLeftText();
256 xText->setString( leftHeader );
257 mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) );
258 }
259 catch( uno::Exception& )
260 {
261 }
262}
263
265{
266 OUString centerHeader;
267 try
268 {
269 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
270 uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
271 centerHeader = xText->getString();
272 }
273 catch( uno::Exception& )
274 {
275 }
276
277 return centerHeader;
278}
279
280void SAL_CALL ScVbaPageSetup::setCenterHeader( const OUString& centerHeader)
281{
282 try
283 {
284 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
285 uno::Reference< text::XText > xText = xHeaderContent->getCenterText();
286 xText->setString( centerHeader );
287 mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) );
288 }
289 catch( uno::Exception& )
290 {
291 }
292}
293
295{
296 OUString rightHeader;
297 try
298 {
299 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
300 uno::Reference< text::XText > xText = xHeaderContent->getRightText();
301 rightHeader = xText->getString();
302 }
303 catch( uno::Exception& )
304 {
305 }
306
307 return rightHeader;
308}
309
310void SAL_CALL ScVbaPageSetup::setRightHeader( const OUString& rightHeader)
311{
312 try
313 {
314 uno::Reference<sheet::XHeaderFooterContent> xHeaderContent( mxPageProps->getPropertyValue("RightPageHeaderContent"), uno::UNO_QUERY_THROW);
315 uno::Reference< text::XText > xText = xHeaderContent->getRightText();
316 xText->setString( rightHeader );
317 mxPageProps->setPropertyValue("RightPageHeaderContent", uno::Any(xHeaderContent) );
318 }
319 catch( uno::Exception& )
320 {
321 }
322}
323
325{
326 OUString leftFooter;
327 try
328 {
329 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
330 uno::Reference< text::XText > xText = xFooterContent->getLeftText();
331 leftFooter = xText->getString();
332 }
333 catch( uno::Exception& )
334 {
335 }
336
337 return leftFooter;
338}
339
340void SAL_CALL ScVbaPageSetup::setLeftFooter( const OUString& leftFooter)
341{
342 try
343 {
344 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
345 uno::Reference< text::XText > xText = xFooterContent->getLeftText();
346 xText->setString( leftFooter );
347 mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) );
348 }
349 catch( uno::Exception& )
350 {
351 }
352}
353
355{
356 OUString centerFooter;
357 try
358 {
359 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
360 uno::Reference< text::XText > xText = xFooterContent->getCenterText();
361 centerFooter = xText->getString();
362 }
363 catch( uno::Exception& )
364 {
365 }
366
367 return centerFooter;
368}
369
370void SAL_CALL ScVbaPageSetup::setCenterFooter( const OUString& centerFooter)
371{
372 try
373 {
374 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
375 uno::Reference< text::XText > xText = xFooterContent->getCenterText();
376 xText->setString( centerFooter );
377 mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) );
378 }
379 catch( uno::Exception& )
380 {
381 }
382
383}
384
386{
387 OUString rightFooter;
388 try
389 {
390 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
391 uno::Reference< text::XText > xText = xFooterContent->getRightText();
392 rightFooter = xText->getString();
393 }
394 catch( uno::Exception& )
395 {
396 }
397
398 return rightFooter;
399}
400
401void SAL_CALL ScVbaPageSetup::setRightFooter( const OUString& rightFooter)
402{
403 try
404 {
405 uno::Reference<sheet::XHeaderFooterContent> xFooterContent( mxPageProps->getPropertyValue("RightPageFooterContent"), uno::UNO_QUERY_THROW);
406 uno::Reference< text::XText > xText = xFooterContent->getRightText();
407 xText->setString( rightFooter );
408 mxPageProps->setPropertyValue("RightPageFooterContent", uno::Any(xFooterContent) );
409 }
410 catch( uno::Exception& )
411 {
412 }
413}
414
415sal_Int32 SAL_CALL ScVbaPageSetup::getOrder()
416{
417 sal_Int32 order = excel::XlOrder::xlDownThenOver;
418 try
419 {
420 uno::Any aValue = mxPageProps->getPropertyValue("PrintDownFirst");
421 bool bPrintDownFirst = false;
422 aValue >>= bPrintDownFirst;
423 if( !bPrintDownFirst )
424 order = excel::XlOrder::xlOverThenDown;
425 }
426 catch( uno::Exception& )
427 {
428 }
429
430 return order;
431}
432
433void SAL_CALL ScVbaPageSetup::setOrder(sal_Int32 order)
434{
435 bool bOrder = true;
436 switch( order )
437 {
438 case excel::XlOrder::xlDownThenOver:
439 break;
440 case excel::XlOrder::xlOverThenDown:
441 bOrder = false;
442 break;
443 default:
444 DebugHelper::runtimeexception(ERRCODE_BASIC_BAD_PARAMETER);
445 }
446
447 try
448 {
449 mxPageProps->setPropertyValue("PrintDownFirst", uno::Any( bOrder ));
450 }
451 catch (const uno::Exception&)
452 {
453 }
454}
455
457{
458 sal_Int16 number = 0;
459 try
460 {
461 uno::Any aValue = mxPageProps->getPropertyValue("FirstPageNumber");
462 aValue >>= number;
463 }
464 catch( uno::Exception& )
465 {
466 }
467
468 if( number ==0 )
469 {
470 number = excel::Constants::xlAutomatic;
471 }
472
473 return number;
474}
475
476void SAL_CALL ScVbaPageSetup::setFirstPageNumber( sal_Int32 firstPageNumber)
477{
478 if( firstPageNumber == excel::Constants::xlAutomatic )
479 firstPageNumber = 0;
480
481 try
482 {
483 uno::Any aValue;
484 aValue <<= static_cast<sal_Int16>(firstPageNumber);
485 mxPageProps->setPropertyValue("FirstPageNumber", aValue );
486 }
487 catch (const uno::Exception&)
488 {
489 }
490}
491
493{
494 bool centerVertically = false;
495 try
496 {
497 uno::Any aValue = mxPageProps->getPropertyValue("CenterVertically");
498 aValue >>= centerVertically;
499 }
500 catch (const uno::Exception&)
501 {
502 }
503 return centerVertically;
504}
505
506void SAL_CALL ScVbaPageSetup::setCenterVertically( sal_Bool centerVertically)
507{
508 try
509 {
510 mxPageProps->setPropertyValue("CenterVertically", uno::Any( centerVertically ));
511 }
512 catch (const uno::Exception&)
513 {
514 }
515}
516
518{
519 bool centerHorizontally = false;
520 try
521 {
522 uno::Any aValue = mxPageProps->getPropertyValue("CenterHorizontally");
523 aValue >>= centerHorizontally;
524 }
525 catch (const uno::Exception&)
526 {
527 }
528 return centerHorizontally;
529}
530
531void SAL_CALL ScVbaPageSetup::setCenterHorizontally( sal_Bool centerHorizontally)
532{
533 try
534 {
535 mxPageProps->setPropertyValue("CenterHorizontally", uno::Any( centerHorizontally ));
536 }
537 catch (const uno::Exception&)
538 {
539 }
540}
541
543{
544 bool printHeadings = false;
545 try
546 {
547 uno::Any aValue = mxPageProps->getPropertyValue("PrintHeaders");
548 aValue >>= printHeadings;
549 }
550 catch (const uno::Exception&)
551 {
552 }
553 return printHeadings;
554}
555
556void SAL_CALL ScVbaPageSetup::setPrintHeadings( sal_Bool printHeadings)
557{
558 try
559 {
560 mxPageProps->setPropertyValue("PrintHeaders", uno::Any( printHeadings ));
561 }
562 catch( uno::Exception& )
563 {
564 }
565}
566
568{
569 return false;
570}
571
572void SAL_CALL ScVbaPageSetup::setPrintGridlines( sal_Bool /*_printgridlines*/ )
573{
574}
575
577{
578 return OUString();
579}
580void SAL_CALL ScVbaPageSetup::setPrintTitleRows( const OUString& /*_printtitlerows*/ )
581{
582}
584{
585 return OUString();
586}
587
588void SAL_CALL ScVbaPageSetup::setPrintTitleColumns( const OUString& /*_printtitlecolumns*/ )
589{
590}
591
593{
594 awt::Size aSize; // current papersize
595 mxPageProps->getPropertyValue( "Size" ) >>= aSize;
596 if ( mbIsLandscape )
597 ::std::swap( aSize.Width, aSize.Height );
598
599 sal_Int32 nPaperSizeIndex = msfilter::util::PaperSizeConv::getMSPaperSizeIndex( aSize );
600 if ( nPaperSizeIndex == 0 )
601 nPaperSizeIndex = excel::XlPaperSize::xlPaperUser;
602 return nPaperSizeIndex;
603}
604
605void SAL_CALL ScVbaPageSetup::setPaperSize( sal_Int32 papersize )
606{
607 if ( papersize != excel::XlPaperSize::xlPaperUser )
608 {
609 awt::Size aPaperSize;
611 aPaperSize.Height = rConvertedSize.mnHeight;
612 aPaperSize.Width = rConvertedSize.mnWidth;
613 if ( mbIsLandscape )
614 ::std::swap( aPaperSize.Width, aPaperSize.Height );
615 mxPageProps->setPropertyValue( "Size", uno::Any( aPaperSize ) );
616 }
617}
618
619OUString
621{
622 return "ScVbaPageSetup";
623}
624
625uno::Sequence< OUString >
627{
628 static uno::Sequence< OUString > const aServiceNames
629 {
630 "ooo.vba.excel.PageSetup"
631 };
632 return aServiceNames;
633}
634
635/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
css::uno::Reference< css::frame::XModel2 > mxModel
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:1173