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