LibreOffice Module sw (master)  1
printdata.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 
20 #include <printdata.hxx>
21 
22 #include <globals.hrc>
23 #include <strings.hrc>
24 #include <doc.hxx>
26 #include <unotxdoc.hxx>
27 #include <wdocsh.hxx>
28 #include <viewsh.hxx>
29 #include <docfld.hxx>
30 
31 #include <svl/languageoptions.hxx>
34 #include <vcl/outdev.hxx>
35 #include <osl/diagnose.h>
36 
37 using namespace ::com::sun::star;
38 
40 {
41 }
42 
44 {
45  OSL_ENSURE( !m_pPostItShell, "m_pPostItShell should already have been deleted" );
46  OSL_ENSURE( !m_pPostItFields, " should already have been deleted" );
47 }
48 
49 void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev )
50 {
54 
58  SwViewOption aViewOpt( *pViewOpt );
59  aViewOpt.SetOnlineSpell( false );
60 
61  m_pPostItShell.reset(new SwViewShell(*new SwDoc, nullptr, &aViewOpt, pOutDev));
62 }
63 
65 {
66  if (HasPostItData())
67  {
68  // printer needs to remain at the real document
69  m_pPostItShell->GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, false, false );
70  { // avoid destroying layout from SwDoc dtor
71  rtl::Reference<SwDoc> const pDoc(m_pPostItShell->GetDoc());
72  m_pPostItShell.reset();
73  }
74  m_pPostItFields.reset();
75  }
76 }
77 
78 
80 {
81  m_xTempDocShell = xShell;
82 }
83 
85 {
86  return !(m_pViewOptionAdjust && m_pViewOptionAdjust->checkShell( rCompare ));
87 }
88 
90  SwViewShell &rSh, const SwViewOption &rViewOptions)
91 {
93  {
94  OSL_FAIL("error: there should be no ViewOptionAdjust active when calling this function" );
95  }
96  m_pViewOptionAdjust.reset(
97  new SwViewOptionAdjust_Impl( rSh, rViewOptions ));
98 }
99 
100 void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions, bool setShowPlaceHoldersInPDF)
101 {
102  m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions, setShowPlaceHoldersInPDF );
103 }
104 
106 {
107  m_pViewOptionAdjust.reset();
108 }
109 
111 {
112  m_pViewOptionAdjust->DontTouchThatViewShellItSmellsFunny();
113 }
114 
116  SwDocShell const*const pDocShell,
117  SwPrintUIOptions const*const pOpt,
118  bool const bIsPDFExport)
119 {
120  if (!pDocShell || !pOpt)
121  return;
122 
123  m_pPrtOptions.reset(new SwPrintData);
124  SwPrintData & rOptions(*m_pPrtOptions);
125 
126  // get default print options
127  bool bWeb = dynamic_cast<const SwWebDocShell*>( pDocShell) != nullptr;
129 
130  // get print options to use from provided properties
131  rOptions.m_bPrintGraphic = pOpt->IsPrintGraphics();
132  rOptions.m_bPrintTable = true; // for now it was decided that tables should always be printed
133  rOptions.m_bPrintDraw = pOpt->IsPrintDrawings();
134  rOptions.m_bPrintControl = pOpt->IsPrintFormControls();
135  rOptions.m_bPrintLeftPages = pOpt->IsPrintLeftPages();
136  rOptions.m_bPrintRightPages = pOpt->IsPrintRightPages();
138  rOptions.m_bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport );
139  // bUpdateFieldsInPrinting <-- not set here; mail merge only
140  rOptions.m_bPaperFromSetup = pOpt->IsPaperFromSetup();
141  rOptions.m_bPrintReverse = false; /*handled by print dialog now*/
142  rOptions.m_bPrintProspect = pOpt->IsPrintProspect();
143  rOptions.m_bPrintProspectRTL = pOpt->IsPrintProspectRTL();
144  // bPrintSingleJobs <-- not set here; mail merge and or configuration
145  // bModified <-- not set here; mail merge only
146  rOptions.m_bPrintBlackFont = pOpt->IsPrintWithBlackTextColor();
147  rOptions.m_bPrintHiddenText = pOpt->IsPrintHiddenText();
149  rOptions.m_nPrintPostIts = pOpt->GetPrintPostItsType();
150 
153  rOptions.SetRenderData( this );
154 }
155 
157  sal_uInt16 nCurrentPage,
158  bool bWeb,
159  bool bSwSrcView,
160  bool bHasSelection,
161  bool bHasPostIts,
162  const SwPrintData &rDefaultPrintData ) :
163  m_rDefaultPrintData( rDefaultPrintData )
164 {
165  // printing HTML sources does not have any valid UI options.
166  // It's just the source code that gets printed...
167  if (bSwSrcView)
168  {
169  m_aUIProperties.clear();
170  return;
171  }
172 
173  // check if either CJK or CTL is enabled
174  SvtLanguageOptions aLangOpt;
175  bool bRTL = aLangOpt.IsCJKFontEnabled() || aLangOpt.IsCTLFontEnabled();
176 
177  // create sequence of print UI options
178  // (5 options are not available for Writer-Web)
179  const int nRTLOpts = bRTL ? 1 : 0;
180  const int nNumProps = nRTLOpts + (bWeb ? 14 : 18);
181  m_aUIProperties.resize( nNumProps );
182  int nIdx = 0;
183 
184  // load the writer PrinterOptions into the custom tab
185  m_aUIProperties[nIdx].Name = "OptionsUIFile";
186  m_aUIProperties[nIdx++].Value <<= OUString("modules/swriter/ui/printeroptions.ui");
187 
188  // create "writer" section (new tab page in dialog)
189  SvtModuleOptions aModOpt;
190  OUString aAppGroupname( SwResId( STR_PRINTOPTUI_PRODUCTNAME) );
191  aAppGroupname = aAppGroupname.replaceFirst( "%s", aModOpt.GetModuleName( SvtModuleOptions::EModule::WRITER ) );
192  m_aUIProperties[ nIdx++ ].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage");
193 
194  // create sub section for Contents
195  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("contents", SwResId( STR_PRINTOPTUI_CONTENTS), OUString());
196 
197  // create a bool option for background
198  bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
199  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pagebackground", SwResId( STR_PRINTOPTUI_PAGE_BACKGROUND),
200  ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox",
201  "PrintPageBackground",
202  bDefaultVal);
203 
204  // create a bool option for pictures/graphics AND OLE and drawing objects as well
205  bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw();
206  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", SwResId( STR_PRINTOPTUI_PICTURES),
207  ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox",
208  "PrintPicturesAndObjects",
209  bDefaultVal);
210  if (!bWeb)
211  {
212  // create a bool option for hidden text
213  bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
214  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("hiddentext", SwResId( STR_PRINTOPTUI_HIDDEN),
215  ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox",
216  "PrintHiddenText",
217  bDefaultVal);
218 
219  // create a bool option for place holder
220  bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
221  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("placeholders", SwResId( STR_PRINTOPTUI_TEXT_PLACEHOLDERS),
222  ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox",
223  "PrintTextPlaceholder",
224  bDefaultVal);
225  }
226 
227  // create a bool option for controls
228  bDefaultVal = rDefaultPrintData.IsPrintControl();
229  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("formcontrols", SwResId( STR_PRINTOPTUI_FORM_CONTROLS),
230  ".HelpID:vcl:PrintDialog:PrintControls:CheckBox",
231  "PrintControls",
232  bDefaultVal);
233 
234  // create sub section for Color
235  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("color", SwResId( STR_PRINTOPTUI_COLOR), OUString());
236 
237  // create a bool option for printing text with black font color
238  bDefaultVal = rDefaultPrintData.IsPrintBlackFont();
239  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("textinblack", SwResId( STR_PRINTOPTUI_PRINT_BLACK),
240  ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox",
241  "PrintBlackFonts",
242  bDefaultVal);
243 
244  if (!bWeb)
245  {
246  // create subgroup for misc options
247  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("pages", SwResId( STR_PRINTOPTUI_PAGES_TEXT), OUString());
248 
249  // create a bool option for printing automatically inserted blank pages
250  bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
251  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("autoblankpages", SwResId( STR_PRINTOPTUI_PRINT_BLANK),
252  ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox",
253  "PrintEmptyPages",
254  bDefaultVal);
255  }
256 
257  // create a bool option for paper tray
258  bDefaultVal = rDefaultPrintData.IsPaperFromSetup();
260  aPaperTrayOpt.maGroupHint = "OptionsPageOptGroup";
261  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", SwResId( STR_PRINTOPTUI_ONLY_PAPER),
262  ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox",
263  "PrintPaperFromSetup",
264  bDefaultVal,
265  aPaperTrayOpt);
266 
267  // print range selection
269  aPrintRangeOpt.maGroupHint = "PrintRange";
270  aPrintRangeOpt.mbInternalOnly = true;
271  m_aUIProperties[nIdx++].Value = setSubgroupControlOpt( "printrange",
272  SwResId( STR_PRINTOPTUI_PAGES_TEXT ),
273  OUString(),
274  aPrintRangeOpt );
275 
276  // create a choice for the content to create
277  const OUString aPrintRangeName( "PrintContent" );
278  uno::Sequence< OUString > aChoices( 5 );
279  uno::Sequence< sal_Bool > aChoicesDisabled( 5 );
280  uno::Sequence< OUString > aHelpIds( 5 );
281  uno::Sequence< OUString > aWidgetIds( 5 );
282  aChoices[0] = SwResId( STR_PRINTOPTUI_PRINTALLPAGES );
283  aChoicesDisabled[0] = false;
284  aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0";
285  aWidgetIds[0] = "rbAllPages";
286  aChoices[1] = SwResId( STR_PRINTOPTUI_PRINTPAGES );
287  aChoicesDisabled[1] = false;
288  aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1";
289  aWidgetIds[1] = "rbRangePages";
290  aChoices[2] = SwResId( STR_PRINTOPTUI_PRINTEVENPAGES );
291  aChoicesDisabled[2] = false; //better disable for 1 page only
292  aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2";
293  aWidgetIds[2] = "rbEvenPages";
294  aChoices[3] = SwResId( STR_PRINTOPTUI_PRINTODDPAGES );
295  aChoicesDisabled[3] = false; //better disable for 1 page only
296  aHelpIds[3] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:3";
297  aWidgetIds[3] = "rbOddPages";
298  aChoices[4] = SwResId( STR_PRINTOPTUI_PRINTSELECTION );
299  aChoicesDisabled[4] = !bHasSelection;
300  aHelpIds[4] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:4";
301  aWidgetIds[4] = "rbRangeSelection";
302  m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
303  aHelpIds, aPrintRangeName,
304  aChoices, 0 /* always default to 'All pages' */,
305  aChoicesDisabled);
306 
307  // show an Edit dependent on "Pages" selected
308  vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true );
309  m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(),
310  ".HelpID:vcl:PrintDialog:PageRange:Edit",
311  "PageRange",
312  OUString::number( nCurrentPage ) /* set text box to current page number */,
313  aPageRangeOpt);
314 
315  // create a list box for notes content
316  const SwPostItMode nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
317  aChoices.realloc( 5 );
318  aChoices[0] = SwResId( STR_PRINTOPTUI_NONE);
319  aChoices[1] = SwResId( STR_PRINTOPTUI_COMMENTS_ONLY);
320  aChoices[2] = SwResId( STR_PRINTOPTUI_PLACE_END);
321  aChoices[3] = SwResId( STR_PRINTOPTUI_PLACE_PAGE);
322  aChoices[4] = SwResId( STR_PRINTOPTUI_PLACE_MARGINS);
323  aHelpIds.realloc( 2 );
324  aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText";
325  aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox";
326  vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( "PrintProspect", 0, false );
327  aAnnotOpt.mbEnabled = bHasPostIts;
328  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments",
329  SwResId( STR_PRINTOPTUI_COMMENTS),
330  aHelpIds,
331  "PrintAnnotationMode",
332  aChoices,
333  bHasPostIts ? static_cast<sal_uInt16>(nPrintPostIts) : 0,
334  uno::Sequence< sal_Bool >(),
335  aAnnotOpt);
336 
337  // create subsection for Page settings
339  aPageSetOpt.maGroupHint = "LayoutPage";
340 
341  // create a bool option for brochure
342  bDefaultVal = rDefaultPrintData.IsPrintProspect();
343  const OUString aBrochurePropertyName( "PrintProspect" );
344  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE),
345  ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox",
346  aBrochurePropertyName,
347  bDefaultVal,
348  aPageSetOpt);
349 
350  if (bRTL)
351  {
352  // create a bool option for brochure RTL dependent on brochure
353  uno::Sequence< OUString > aBRTLChoices( 2 );
354  aBRTLChoices[0] = SwResId( STR_PRINTOPTUI_LEFT_SCRIPT);
355  aBRTLChoices[1] = SwResId( STR_PRINTOPTUI_RIGHT_SCRIPT);
356  vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, true );
357  uno::Sequence<OUString> aBRTLHelpIds { ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" };
358  aBrochureRTLOpt.maGroupHint = "LayoutPage";
359  // RTL brochure choices
360  // 0 : left-to-right
361  // 1 : right-to-left
362  const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
363  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("scriptdirection",
364  OUString(),
365  aBRTLHelpIds,
366  "PrintProspectRTL",
367  aBRTLChoices,
368  nBRTLChoice,
369  uno::Sequence< sal_Bool >(),
370  aBrochureRTLOpt);
371  }
372 
373  assert(nIdx == nNumProps);
374 }
375 
377 {
378 }
379 
381 {
382  // take care of different property names for the option.
383  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
384 
385  // 0: left and right pages
386  // 1: left pages only
387  // 2: right pages only
388  sal_Int64 nLRPages = getIntValue( "PrintContent", 0 /* default: all */ );
389  bool bRes = nLRPages != 3;
390  bRes = getBoolValue( "PrintContent", bRes /* <- default value if property is not found */ );
391  return bRes;
392 }
393 
395 {
396  // take care of different property names for the option.
397  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
398 
399  sal_Int64 nLRPages = getIntValue( "PrintContent", 0 /* default: all */ );
400  bool bRes = nLRPages != 2;
401  bRes = getBoolValue( "PrintContent", bRes /* <- default value if property is not found */ );
402  return bRes;
403 }
404 
405 bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const
406 {
407  // take care of different property names for the option.
408 
409  bool bRes = bIsPDFExport ?
410  !getBoolValue( "IsSkipEmptyPages", true ) :
411  getBoolValue( "PrintEmptyPages", true );
412  return bRes;
413 }
414 
416 {
417  // take care of different property names for the option.
418  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
419 
420  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
421  bRes = getBoolValue( "PrintGraphics", bRes );
422  return bRes;
423 }
424 
426 {
427  // take care of different property names for the option.
428  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
429 
430  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
431  bRes = getBoolValue( "PrintDrawings", bRes );
432  return bRes;
433 }
434 
435 bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< beans::PropertyValue >& i_rNewProp )
436 {
437  bool bChanged = processProperties( i_rNewProp );
438 
439  uno::Reference< awt::XDevice > xRenderDevice;
440  uno::Any aVal( getValue( "RenderDevice" ) );
441  aVal >>= xRenderDevice;
442 
444  if (xRenderDevice.is())
445  {
446  VCLXDevice* pDevice = VCLXDevice::GetImplementation( xRenderDevice );
447  if (pDevice)
448  pOut = pDevice->GetOutputDevice();
449  }
450  bChanged = bChanged || (pOut.get() != m_pLast.get());
451  if( pOut )
452  m_pLast = pOut;
453 
454  return bChanged;
455 }
456 
457 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static css::uno::Any setChoiceRadiosControlOpt(const css::uno::Sequence< OUString > &i_rIDs, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rProperty, const css::uno::Sequence< OUString > &i_rChoices, sal_Int32 i_nValue, const css::uno::Sequence< sal_Bool > &i_rDisabledChoices=css::uno::Sequence< sal_Bool >(), const UIControlOptions &i_rControlOptions=UIControlOptions())
bool IsPaperFromSetup() const
Definition: printdata.hxx:138
std::unique_ptr< SwPrintData > m_pPrtOptions
Definition: printdata.hxx:230
bool getBoolValue(const OUString &i_rPropertyName, bool i_bDefault) const
bool IsPaperFromSetup() const
Definition: printdata.hxx:191
void InitPrintOptionsFromApplication(SwPrintData &o_rData, bool const bWeb)
Definition: view.cxx:1860
SwPostItMode GetPrintPostIts() const
Definition: printdata.hxx:145
std::unique_ptr< SwViewShell > m_pPostItShell
this contains a SwDoc with the post-it content
Definition: printdata.hxx:238
std::vector< css::beans::PropertyValue > m_aUIProperties
Definition: doc.hxx:185
void CreatePostItData(SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev)
Definition: printdata.cxx:49
static VCLXDevice * GetImplementation(const css::uno::Reference< css::uno::XInterface > &rxIFace)
void SetTempDocShell(SfxObjectShellLock const &)
Definition: printdata.cxx:79
bool m_bPrintRightPages
Definition: printdata.hxx:58
std::unique_ptr< SwViewOptionAdjust_Impl > m_pViewOptionAdjust
the view options to be applied for printing
Definition: printdata.hxx:228
bool m_bPrintReverse
Definition: printdata.hxx:58
bool IsPrintProspectRTL() const
Definition: printdata.hxx:141
bool IsPrintHiddenText() const
Definition: printdata.hxx:147
bool IsCJKFontEnabled() const
std::unique_ptr< SetGetExpFields > m_pPostItFields
an array of "SetGetExpField *" sorted by page and line numbers
Definition: printdata.hxx:236
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:389
bool m_bPrintProspectRTL
Definition: printdata.hxx:58
bool IsPrintProspect() const
Definition: printdata.hxx:185
bool m_bPrintGraphic
Definition: printdata.hxx:58
bool processPropertiesAndCheckFormat(const css::uno::Sequence< css::beans::PropertyValue > &i_rNewProp)
Definition: printdata.cxx:435
static css::uno::Any setSubgroupControlOpt(const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const UIControlOptions &i_rControlOptions=UIControlOptions())
bool m_bPrintProspect
Definition: printdata.hxx:58
void ViewOptionAdjustStart(SwViewShell &rSh, const SwViewOption &rViewOptions)
Definition: printdata.cxx:89
bool IsPrintGraphic() const
Definition: printdata.hxx:131
bool IsPrintPageBackground() const
Definition: printdata.hxx:142
bool IsPrintHiddenText() const
Definition: printdata.hxx:188
bool m_bPrintPageBackground
Definition: printdata.hxx:58
bool m_bPrintTextPlaceholder
Definition: printdata.hxx:58
OUString GetModuleName(EModule eModule) const
bool m_bPrintLeftPages
Definition: printdata.hxx:58
void DeletePostItData()
Definition: printdata.cxx:64
bool IsPrintPageBackground() const
Definition: printdata.hxx:184
static css::uno::Any setEditControlOpt(const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, const OUString &i_rValue, const UIControlOptions &i_rControlOptions)
virtual ~SwPrintUIOptions()
Definition: printdata.cxx:376
SwPrintUIOptions(sal_uInt16 nCurrentPage, bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData)
Definition: printdata.cxx:156
bool m_bPrintDraw
Definition: printdata.hxx:58
SwPostItMode GetPrintPostItsType() const
Definition: printdata.hxx:190
bool m_bPrintTable
Definition: printdata.hxx:58
bool IsPrintLeftPages() const
Definition: printdata.cxx:380
bool IsPrintControl() const
Definition: printdata.hxx:134
bool m_bPrintControl
Definition: printdata.hxx:58
OUString SwResId(const char *pId)
Definition: swmodule.cxx:191
bool IsPrintTextPlaceholder() const
Definition: printdata.hxx:148
bool IsPrintBlackFont() const
Definition: printdata.hxx:143
bool IsPrintTextPlaceholders() const
Definition: printdata.hxx:187
bool IsPrintGraphics() const
Definition: printdata.cxx:415
SwPostItMode
this must match the definitions in css::text::NotePrintMode
Definition: printdata.hxx:42
bool m_bPrintBlackFont
Definition: printdata.hxx:58
SfxObjectShellLock m_xTempDocShell
temp print document – must live longer than m_pViewOptionAdjust! also this is a Lock and not a Ref b...
Definition: printdata.hxx:225
void MakeSwPrtOptions(SwDocShell const *const pDocShell, SwPrintUIOptions const *const pOpt, bool const bIsPDFExport)
Definition: printdata.cxx:115
static css::uno::Any setGroupControlOpt(const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId)
bool IsPrintWithBlackTextColor() const
Definition: printdata.hxx:189
bool sw_GetPostIts(IDocumentFieldsAccess const *pIDFA, SetGetExpFields *pSrtLst)
Definition: doc.cxx:543
bool HasPostItData() const
Definition: printdata.hxx:244
bool IsPrintDraw() const
Definition: printdata.hxx:133
bool m_bPaperFromSetup
Definition: printdata.hxx:58
bool IsPrintProspectRTL() const
Definition: printdata.hxx:186
bool m_bPrintHiddenText
Definition: printdata.hxx:58
bool IsPrintEmptyPages() const
Definition: printdata.hxx:139
VclPtr< OutputDevice > m_pLast
Definition: printdata.hxx:174
bool IsCTLFontEnabled() const
bool IsPrintFormControls() const
Definition: printdata.hxx:183
bool processProperties(const css::uno::Sequence< css::beans::PropertyValue > &i_rNewProp)
bool m_bPrintEmptyPages
Print empty pages.
Definition: printdata.hxx:58
css::uno::Any getValue(const OUString &i_rPropertyName) const
const VclPtr< OutputDevice > & GetOutputDevice() const
bool NeedNewViewOptionAdjust(const SwViewShell &) const
Definition: printdata.cxx:84
static css::uno::Any setBoolControlOpt(const OUString &i_rID, const OUString &i_rTitle, const OUString &i_rHelpId, const OUString &i_rProperty, bool i_bValue, const UIControlOptions &i_rControlOptions=UIControlOptions())
OutputDevice * get() const
void ViewOptionAdjustCrashPreventionKludge()
Definition: printdata.cxx:110
bool IsPrintRightPages() const
Definition: printdata.cxx:394
bool IsPrintDrawings() const
Definition: printdata.cxx:425
bool IsPrintProspect() const
Definition: printdata.hxx:140
static css::uno::Any setChoiceListControlOpt(const OUString &i_rID, const OUString &i_rTitle, const css::uno::Sequence< OUString > &i_rHelpId, const OUString &i_rProperty, const css::uno::Sequence< OUString > &i_rChoices, sal_Int32 i_nValue, const css::uno::Sequence< sal_Bool > &i_rDisabledChoices=css::uno::Sequence< sal_Bool >(), const UIControlOptions &i_rControlOptions=UIControlOptions())
SwPostItMode m_nPrintPostIts
Definition: printdata.hxx:68
void SetRenderData(const SwRenderData *pData)
Definition: printdata.hxx:129
void ViewOptionAdjust(SwPrintData const *const pPrtOptions, bool setShowPlaceHoldersInPDF)
Definition: printdata.cxx:100
sal_Int64 getIntValue(const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
bool IsPrintEmptyPages(bool bIsPDFExport) const
Definition: printdata.cxx:405
void ViewOptionAdjustStop()
Definition: printdata.cxx:105