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 <strings.hrc>
23 #include <doc.hxx>
25 #include <unotxdoc.hxx>
26 #include <wdocsh.hxx>
27 #include <viewsh.hxx>
28 #include <docfld.hxx>
29 
30 #include <svl/languageoptions.hxx>
31 #include <svl/cjkoptions.hxx>
32 #include <svl/ctloptions.hxx>
35 #include <vcl/outdev.hxx>
36 #include <osl/diagnose.h>
37 
38 using namespace ::com::sun::star;
39 
41 {
42 }
43 
45 {
46  OSL_ENSURE( !m_pPostItShell, "m_pPostItShell should already have been deleted" );
47  OSL_ENSURE( !m_pPostItFields, " should already have been deleted" );
48 }
49 
50 void SwRenderData::CreatePostItData( SwDoc& rDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev )
51 {
55 
59  SwViewOption aViewOpt( *pViewOpt );
60  aViewOpt.SetOnlineSpell( false );
61 
62  m_pPostItShell.reset(new SwViewShell(*new SwDoc, nullptr, &aViewOpt, pOutDev));
63 }
64 
66 {
67  if (HasPostItData())
68  {
69  // printer needs to remain at the real document
70  m_pPostItShell->GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, false, false );
71  { // avoid destroying layout from SwDoc dtor
72  rtl::Reference<SwDoc> const xKeepAlive(m_pPostItShell->GetDoc());
73  m_pPostItShell.reset();
74  }
75  m_pPostItFields.reset();
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
175 
176  // create sequence of print UI options
177  // (5 options are not available for Writer-Web)
178  const int nRTLOpts = bRTL ? 1 : 0;
179  const int nNumProps = nRTLOpts + (bWeb ? 15 : 19);
180  m_aUIProperties.resize( nNumProps);
181  int nIdx = 0;
182 
183  // load the writer PrinterOptions into the custom tab
184  m_aUIProperties[nIdx].Name = "OptionsUIFile";
185  m_aUIProperties[nIdx++].Value <<= OUString("modules/swriter/ui/printeroptions.ui");
186 
187  // create "writer" section (new tab page in dialog)
188  SvtModuleOptions aModOpt;
189  OUString aAppGroupname( SwResId( STR_PRINTOPTUI_PRODUCTNAME) );
190  aAppGroupname = aAppGroupname.replaceFirst( "%s", aModOpt.GetModuleName( SvtModuleOptions::EModule::WRITER ) );
191  m_aUIProperties[ nIdx++ ].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage");
192 
193  // create sub section for Contents
194  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("contents", SwResId( STR_PRINTOPTUI_CONTENTS), OUString());
195 
196  // create a bool option for background
197  bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
198  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pagebackground", SwResId( STR_PRINTOPTUI_PAGE_BACKGROUND),
199  ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox",
200  "PrintPageBackground",
201  bDefaultVal);
202 
203  // create a bool option for pictures/graphics AND OLE and drawing objects as well
204  bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw();
205  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", SwResId( STR_PRINTOPTUI_PICTURES),
206  ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox",
207  "PrintPicturesAndObjects",
208  bDefaultVal);
209  if (!bWeb)
210  {
211  // create a bool option for hidden text
212  bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
213  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("hiddentext", SwResId( STR_PRINTOPTUI_HIDDEN),
214  ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox",
215  "PrintHiddenText",
216  bDefaultVal);
217 
218  // create a bool option for place holder
219  bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
220  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("placeholders", SwResId( STR_PRINTOPTUI_TEXT_PLACEHOLDERS),
221  ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox",
222  "PrintTextPlaceholder",
223  bDefaultVal);
224  }
225 
226  // create a bool option for controls
227  bDefaultVal = rDefaultPrintData.IsPrintControl();
228  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("formcontrols", SwResId( STR_PRINTOPTUI_FORM_CONTROLS),
229  ".HelpID:vcl:PrintDialog:PrintControls:CheckBox",
230  "PrintControls",
231  bDefaultVal);
232 
233  // create sub section for Color
234  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("color", SwResId( STR_PRINTOPTUI_COLOR), OUString());
235 
236  // create a bool option for printing text with black font color
237  bDefaultVal = rDefaultPrintData.IsPrintBlackFont();
238  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("textinblack", SwResId( STR_PRINTOPTUI_PRINT_BLACK),
239  ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox",
240  "PrintBlackFonts",
241  bDefaultVal);
242 
243  if (!bWeb)
244  {
245  // create subgroup for misc options
246  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("pages", SwResId( STR_PRINTOPTUI_PAGES_TEXT), OUString());
247 
248  // create a bool option for printing automatically inserted blank pages
249  bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
250  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("autoblankpages", SwResId( STR_PRINTOPTUI_PRINT_BLANK),
251  ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox",
252  "PrintEmptyPages",
253  bDefaultVal);
254  }
255 
256  // create a bool option for paper tray
257  bDefaultVal = rDefaultPrintData.IsPaperFromSetup();
259  aPaperTrayOpt.maGroupHint = "OptionsPageOptGroup";
260  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", SwResId( STR_PRINTOPTUI_ONLY_PAPER),
261  ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox",
262  "PrintPaperFromSetup",
263  bDefaultVal,
264  aPaperTrayOpt);
265 
266  // print range selection
268  aPrintRangeOpt.maGroupHint = "PrintRange";
269  aPrintRangeOpt.mbInternalOnly = true;
270  m_aUIProperties[nIdx++].Value = setSubgroupControlOpt( "printrange",
271  SwResId( STR_PRINTOPTUI_PAGES_TEXT ),
272  OUString(),
273  aPrintRangeOpt );
274 
275  // create a choice for the content to create
276  static const OUStringLiteral aPrintRangeName( u"PrintContent" );
277  uno::Sequence< OUString > aChoices{ SwResId( STR_PRINTOPTUI_PRINTALLPAGES ),
278  SwResId( STR_PRINTOPTUI_PRINTPAGES ),
279  SwResId( STR_PRINTOPTUI_PRINTSELECTION ) };
280  uno::Sequence< sal_Bool > aChoicesDisabled{ false, false, !bHasSelection };
281  uno::Sequence< OUString > aHelpIds{ ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0",
282  ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1",
283  ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2" };
284  uno::Sequence< OUString > aWidgetIds{ "rbAllPages", "rbRangePages", "rbRangeSelection" };
285  m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
286  aHelpIds, aPrintRangeName,
287  aChoices,
288  bHasSelection ? 2 : 0,
289  aChoicesDisabled);
290 
291  // show an Edit dependent on "Pages" selected
292  vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true );
293  m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(),
294  ".HelpID:vcl:PrintDialog:PageRange:Edit",
295  "PageRange",
296  OUString::number( nCurrentPage ) /* set text box to current page number */,
297  aPageRangeOpt);
298 
299  vcl::PrinterOptionsHelper::UIControlOptions aEvenOddOpt(aPrintRangeName, -1, true);
300  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("evenoddbox",
301  OUString(),
302  uno::Sequence<OUString>(),
303  "EvenOdd",
304  uno::Sequence<OUString>(),
305  0,
306  uno::Sequence< sal_Bool >(),
307  aEvenOddOpt);
308 
309  // create a list box for notes content
310  const SwPostItMode nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
311  aChoices = { SwResId( STR_PRINTOPTUI_NONE),
312  SwResId( STR_PRINTOPTUI_COMMENTS_ONLY),
313  SwResId( STR_PRINTOPTUI_PLACE_END),
314  SwResId( STR_PRINTOPTUI_PLACE_PAGE),
315  SwResId( STR_PRINTOPTUI_PLACE_MARGINS) };
316  aHelpIds = { ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText",
317  ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox" };
318  vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( "PrintProspect", 0, false );
319  aAnnotOpt.mbEnabled = bHasPostIts;
320  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments",
321  SwResId( STR_PRINTOPTUI_COMMENTS),
322  aHelpIds,
323  "PrintAnnotationMode",
324  aChoices,
325  bHasPostIts ? static_cast<sal_uInt16>(nPrintPostIts) : 0,
326  uno::Sequence< sal_Bool >(),
327  aAnnotOpt);
328 
329  // create subsection for Page settings
331  aPageSetOpt.maGroupHint = "LayoutPage";
332 
333  // create a bool option for brochure
334  bDefaultVal = rDefaultPrintData.IsPrintProspect();
335  static const OUStringLiteral aBrochurePropertyName( u"PrintProspect" );
336  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE),
337  ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox",
338  aBrochurePropertyName,
339  bDefaultVal,
340  aPageSetOpt);
341 
342  if (bRTL)
343  {
344  // create a bool option for brochure RTL dependent on brochure
345  uno::Sequence< OUString > aBRTLChoices{ SwResId( STR_PRINTOPTUI_LEFT_SCRIPT),
346  SwResId( STR_PRINTOPTUI_RIGHT_SCRIPT) };
347  vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, true );
348  uno::Sequence<OUString> aBRTLHelpIds { ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" };
349  aBrochureRTLOpt.maGroupHint = "LayoutPage";
350  // RTL brochure choices
351  // 0 : left-to-right
352  // 1 : right-to-left
353  const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
354  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("scriptdirection",
355  OUString(),
356  aBRTLHelpIds,
357  "PrintProspectRTL",
358  aBRTLChoices,
359  nBRTLChoice,
360  uno::Sequence< sal_Bool >(),
361  aBrochureRTLOpt);
362  }
363 
364  assert(nIdx == nNumProps);
365 }
366 
368 {
369 }
370 
372 {
373  // take care of different property names for the option.
374  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
375 
376  // 0: left and right pages
377  // 1: left pages only
378  // 2: right pages only
379  sal_Int64 nEOPages = getIntValue( "EvenOdd", 0 /* default: all */ );
380  bool bRes = nEOPages != 1;
381  bRes = getBoolValue( "EvenOdd", bRes /* <- default value if property is not found */ );
382  return bRes;
383 }
384 
386 {
387  // take care of different property names for the option.
388  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
389 
390  sal_Int64 nEOPages = getIntValue( "EvenOdd", 0 /* default: all */ );
391  bool bRes = nEOPages != 2;
392  bRes = getBoolValue( "EvenOdd", bRes /* <- default value if property is not found */ );
393  return bRes;
394 }
395 
396 bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const
397 {
398  // take care of different property names for the option.
399 
400  bool bRes = bIsPDFExport ?
401  !getBoolValue( "IsSkipEmptyPages", true ) :
402  getBoolValue( "PrintEmptyPages", true );
403  return bRes;
404 }
405 
407 {
408  // take care of different property names for the option.
409  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
410 
411  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
412  bRes = getBoolValue( "PrintGraphics", bRes );
413  return bRes;
414 }
415 
417 {
418  // take care of different property names for the option.
419  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
420 
421  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
422  bRes = getBoolValue( "PrintDrawings", bRes );
423  return bRes;
424 }
425 
426 bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< beans::PropertyValue >& i_rNewProp )
427 {
428  bool bChanged = processProperties( i_rNewProp );
429 
430  uno::Reference< awt::XDevice > xRenderDevice;
431  uno::Any aVal( getValue( "RenderDevice" ) );
432  aVal >>= xRenderDevice;
433 
435  if (xRenderDevice.is())
436  {
437  VCLXDevice* pDevice = comphelper::getFromUnoTunnel<VCLXDevice>( xRenderDevice );
438  if (pDevice)
439  pOut = pDevice->GetOutputDevice();
440  }
441  bChanged = bChanged || (pOut.get() != m_pLast.get());
442  if( pOut )
443  m_pLast = pOut;
444 
445  return bChanged;
446 }
447 
448 /* 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:1968
SwPostItMode GetPrintPostIts() const
Definition: printdata.hxx:145
bool IsCJKFontEnabled()
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:188
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 IsCTLFontEnabled() const
bool IsPrintProspectRTL() const
Definition: printdata.hxx:141
bool IsPrintHiddenText() const
Definition: printdata.hxx:147
std::unique_ptr< SetGetExpFields > m_pPostItFields
an array of "SetGetExpField *" sorted by page and line numbers
Definition: printdata.hxx:236
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:165
IDocumentFieldsAccess const & getIDocumentFieldsAccess() const
Definition: doc.cxx:357
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:426
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
oslFileHandle & pOut
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:65
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:367
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
float u
bool IsPrintLeftPages() const
Definition: printdata.cxx:371
bool IsPrintControl() const
Definition: printdata.hxx:134
bool m_bPrintControl
Definition: printdata.hxx:58
void CreatePostItData(SwDoc &rDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev)
Definition: printdata.cxx:50
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:406
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 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 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:385
bool IsPrintDrawings() const
Definition: printdata.cxx:416
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:396
bool sw_GetPostIts(const IDocumentFieldsAccess &rIDFA, SetGetExpFields *pSrtLst)
Definition: doc.cxx:515
void ViewOptionAdjustStop()
Definition: printdata.cxx:105