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>
33 #include <vcl/outdev.hxx>
34 #include <osl/diagnose.h>
35 
36 using namespace ::com::sun::star;
37 
39 {
40 }
41 
43 {
44  OSL_ENSURE( !m_pPostItShell, "m_pPostItShell should already have been deleted" );
45  OSL_ENSURE( !m_pPostItFields, " should already have been deleted" );
46 }
47 
48 void SwRenderData::CreatePostItData( SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev )
49 {
53 
57  SwViewOption aViewOpt( *pViewOpt );
58  aViewOpt.SetOnlineSpell( false );
59 
60  m_pPostItShell.reset(new SwViewShell(*new SwDoc, nullptr, &aViewOpt, pOutDev));
61 }
62 
64 {
65  if (HasPostItData())
66  {
67  // printer needs to remain at the real document
68  m_pPostItShell->GetDoc()->getIDocumentDeviceAccess().setPrinter( nullptr, false, false );
69  { // avoid destroying layout from SwDoc dtor
70  rtl::Reference<SwDoc> const xKeepAlive(m_pPostItShell->GetDoc());
71  m_pPostItShell.reset();
72  }
73  m_pPostItFields.reset();
74  }
75 }
76 
77 
79 {
80  m_xTempDocShell = xShell;
81 }
82 
84 {
85  return !(m_pViewOptionAdjust && m_pViewOptionAdjust->checkShell( rCompare ));
86 }
87 
89  SwViewShell &rSh, const SwViewOption &rViewOptions)
90 {
92  {
93  OSL_FAIL("error: there should be no ViewOptionAdjust active when calling this function" );
94  }
95  m_pViewOptionAdjust.reset(
96  new SwViewOptionAdjust_Impl( rSh, rViewOptions ));
97 }
98 
99 void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions, bool setShowPlaceHoldersInPDF)
100 {
101  m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions, setShowPlaceHoldersInPDF );
102 }
103 
105 {
106  m_pViewOptionAdjust.reset();
107 }
108 
110 {
111  m_pViewOptionAdjust->DontTouchThatViewShellItSmellsFunny();
112 }
113 
115  SwDocShell const*const pDocShell,
116  SwPrintUIOptions const*const pOpt,
117  bool const bIsPDFExport)
118 {
119  if (!pDocShell || !pOpt)
120  return;
121 
122  m_pPrtOptions.reset(new SwPrintData);
123  SwPrintData & rOptions(*m_pPrtOptions);
124 
125  // get default print options
126  bool bWeb = dynamic_cast<const SwWebDocShell*>( pDocShell) != nullptr;
128 
129  // get print options to use from provided properties
130  rOptions.m_bPrintGraphic = pOpt->IsPrintGraphics();
131  rOptions.m_bPrintTable = true; // for now it was decided that tables should always be printed
132  rOptions.m_bPrintDraw = pOpt->IsPrintDrawings();
133  rOptions.m_bPrintControl = pOpt->IsPrintFormControls();
134  rOptions.m_bPrintLeftPages = pOpt->IsPrintLeftPages();
135  rOptions.m_bPrintRightPages = pOpt->IsPrintRightPages();
137  rOptions.m_bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport );
138  // bUpdateFieldsInPrinting <-- not set here; mail merge only
139  rOptions.m_bPaperFromSetup = pOpt->IsPaperFromSetup();
140  rOptions.m_bPrintReverse = false; /*handled by print dialog now*/
141  rOptions.m_bPrintProspect = pOpt->IsPrintProspect();
142  rOptions.m_bPrintProspectRTL = pOpt->IsPrintProspectRTL();
143  // bPrintSingleJobs <-- not set here; mail merge and or configuration
144  // bModified <-- not set here; mail merge only
145  rOptions.m_bPrintBlackFont = pOpt->IsPrintWithBlackTextColor();
146  rOptions.m_bPrintHiddenText = pOpt->IsPrintHiddenText();
148  rOptions.m_nPrintPostIts = pOpt->GetPrintPostItsType();
149 
152  rOptions.SetRenderData( this );
153 }
154 
156  sal_uInt16 nCurrentPage,
157  bool bWeb,
158  bool bSwSrcView,
159  bool bHasSelection,
160  bool bHasPostIts,
161  const SwPrintData &rDefaultPrintData ) :
162  m_rDefaultPrintData( rDefaultPrintData )
163 {
164  // printing HTML sources does not have any valid UI options.
165  // It's just the source code that gets printed...
166  if (bSwSrcView)
167  {
168  m_aUIProperties.clear();
169  return;
170  }
171 
172  // check if either CJK or CTL is enabled
173  SvtLanguageOptions aLangOpt;
174  bool bRTL = aLangOpt.IsCJKFontEnabled() || aLangOpt.IsCTLFontEnabled();
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  const OUString aPrintRangeName( "PrintContent" );
277  uno::Sequence< OUString > aChoices( 3 );
278  uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
279  uno::Sequence< OUString > aHelpIds( 3 );
280  uno::Sequence< OUString > aWidgetIds( 3 );
281  aChoices[0] = SwResId( STR_PRINTOPTUI_PRINTALLPAGES );
282  aChoicesDisabled[0] = false;
283  aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0";
284  aWidgetIds[0] = "rbAllPages";
285  aChoices[1] = SwResId( STR_PRINTOPTUI_PRINTPAGES );
286  aChoicesDisabled[1] = false;
287  aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1";
288  aWidgetIds[1] = "rbRangePages";
289  aChoices[2] = SwResId( STR_PRINTOPTUI_PRINTSELECTION );
290  aChoicesDisabled[2] = !bHasSelection;
291  aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2";
292  aWidgetIds[2] = "rbRangeSelection";
293  m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
294  aHelpIds, aPrintRangeName,
295  aChoices,
296  bHasSelection ? 2 : 0,
297  aChoicesDisabled);
298 
299  // show an Edit dependent on "Pages" selected
300  vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true );
301  m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(),
302  ".HelpID:vcl:PrintDialog:PageRange:Edit",
303  "PageRange",
304  OUString::number( nCurrentPage ) /* set text box to current page number */,
305  aPageRangeOpt);
306 
307  vcl::PrinterOptionsHelper::UIControlOptions aEvenOddOpt(aPrintRangeName, -1, true);
308  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("evenoddbox",
309  OUString(),
310  uno::Sequence<OUString>(),
311  "EvenOdd",
312  uno::Sequence<OUString>(),
313  0,
314  uno::Sequence< sal_Bool >(),
315  aEvenOddOpt);
316 
317  // create a list box for notes content
318  const SwPostItMode nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
319  aChoices.realloc( 5 );
320  aChoices[0] = SwResId( STR_PRINTOPTUI_NONE);
321  aChoices[1] = SwResId( STR_PRINTOPTUI_COMMENTS_ONLY);
322  aChoices[2] = SwResId( STR_PRINTOPTUI_PLACE_END);
323  aChoices[3] = SwResId( STR_PRINTOPTUI_PLACE_PAGE);
324  aChoices[4] = SwResId( STR_PRINTOPTUI_PLACE_MARGINS);
325  aHelpIds.realloc( 2 );
326  aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText";
327  aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox";
328  vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( "PrintProspect", 0, false );
329  aAnnotOpt.mbEnabled = bHasPostIts;
330  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments",
331  SwResId( STR_PRINTOPTUI_COMMENTS),
332  aHelpIds,
333  "PrintAnnotationMode",
334  aChoices,
335  bHasPostIts ? static_cast<sal_uInt16>(nPrintPostIts) : 0,
336  uno::Sequence< sal_Bool >(),
337  aAnnotOpt);
338 
339  // create subsection for Page settings
341  aPageSetOpt.maGroupHint = "LayoutPage";
342 
343  // create a bool option for brochure
344  bDefaultVal = rDefaultPrintData.IsPrintProspect();
345  const OUString aBrochurePropertyName( "PrintProspect" );
346  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE),
347  ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox",
348  aBrochurePropertyName,
349  bDefaultVal,
350  aPageSetOpt);
351 
352  if (bRTL)
353  {
354  // create a bool option for brochure RTL dependent on brochure
355  uno::Sequence< OUString > aBRTLChoices( 2 );
356  aBRTLChoices[0] = SwResId( STR_PRINTOPTUI_LEFT_SCRIPT);
357  aBRTLChoices[1] = SwResId( STR_PRINTOPTUI_RIGHT_SCRIPT);
358  vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, true );
359  uno::Sequence<OUString> aBRTLHelpIds { ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" };
360  aBrochureRTLOpt.maGroupHint = "LayoutPage";
361  // RTL brochure choices
362  // 0 : left-to-right
363  // 1 : right-to-left
364  const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
365  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("scriptdirection",
366  OUString(),
367  aBRTLHelpIds,
368  "PrintProspectRTL",
369  aBRTLChoices,
370  nBRTLChoice,
371  uno::Sequence< sal_Bool >(),
372  aBrochureRTLOpt);
373  }
374 
375  assert(nIdx == nNumProps);
376 }
377 
379 {
380 }
381 
383 {
384  // take care of different property names for the option.
385  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
386 
387  // 0: left and right pages
388  // 1: left pages only
389  // 2: right pages only
390  sal_Int64 nEOPages = getIntValue( "EvenOdd", 0 /* default: all */ );
391  bool bRes = nEOPages != 1;
392  bRes = getBoolValue( "EvenOdd", bRes /* <- default value if property is not found */ );
393  return bRes;
394 }
395 
397 {
398  // take care of different property names for the option.
399  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
400 
401  sal_Int64 nEOPages = getIntValue( "EvenOdd", 0 /* default: all */ );
402  bool bRes = nEOPages != 2;
403  bRes = getBoolValue( "EvenOdd", bRes /* <- default value if property is not found */ );
404  return bRes;
405 }
406 
407 bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const
408 {
409  // take care of different property names for the option.
410 
411  bool bRes = bIsPDFExport ?
412  !getBoolValue( "IsSkipEmptyPages", true ) :
413  getBoolValue( "PrintEmptyPages", true );
414  return bRes;
415 }
416 
418 {
419  // take care of different property names for the option.
420  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
421 
422  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
423  bRes = getBoolValue( "PrintGraphics", bRes );
424  return bRes;
425 }
426 
428 {
429  // take care of different property names for the option.
430  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
431 
432  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
433  bRes = getBoolValue( "PrintDrawings", bRes );
434  return bRes;
435 }
436 
437 bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< beans::PropertyValue >& i_rNewProp )
438 {
439  bool bChanged = processProperties( i_rNewProp );
440 
441  uno::Reference< awt::XDevice > xRenderDevice;
442  uno::Any aVal( getValue( "RenderDevice" ) );
443  aVal >>= xRenderDevice;
444 
446  if (xRenderDevice.is())
447  {
448  VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice );
449  if (pDevice)
450  pOut = pDevice->GetOutputDevice();
451  }
452  bChanged = bChanged || (pOut.get() != m_pLast.get());
453  if( pOut )
454  m_pLast = pOut;
455 
456  return bChanged;
457 }
458 
459 /* 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:1865
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:184
void CreatePostItData(SwDoc *pDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev)
Definition: printdata.cxx:48
void SetTempDocShell(SfxObjectShellLock const &)
Definition: printdata.cxx:78
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:356
bool m_bPrintProspectRTL
Definition: printdata.hxx:58
bool IsPrintProspect() const
Definition: printdata.hxx:185
bool m_bPrintGraphic
Definition: printdata.hxx:58
const BorderLinePrimitive2D *pCandidateB assert(pCandidateA)
bool processPropertiesAndCheckFormat(const css::uno::Sequence< css::beans::PropertyValue > &i_rNewProp)
Definition: printdata.cxx:437
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:88
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:63
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:378
SwPrintUIOptions(sal_uInt16 nCurrentPage, bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData)
Definition: printdata.cxx:155
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:382
bool IsPrintControl() const
Definition: printdata.hxx:134
bool m_bPrintControl
Definition: printdata.hxx:58
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
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:417
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:114
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:514
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:83
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:109
bool IsPrintRightPages() const
Definition: printdata.cxx:396
bool IsPrintDrawings() const
Definition: printdata.cxx:427
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:99
sal_Int64 getIntValue(const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
bool IsPrintEmptyPages(bool bIsPDFExport) const
Definition: printdata.cxx:407
void ViewOptionAdjustStop()
Definition: printdata.cxx:104