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