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& rDoc, 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 
78 {
79  m_xTempDocShell = xShell;
80 }
81 
83 {
84  return !(m_pViewOptionAdjust && m_pViewOptionAdjust->checkShell( rCompare ));
85 }
86 
88  SwViewShell &rSh, const SwViewOption &rViewOptions)
89 {
91  {
92  OSL_FAIL("error: there should be no ViewOptionAdjust active when calling this function" );
93  }
94  m_pViewOptionAdjust.reset(
95  new SwViewOptionAdjust_Impl( rSh, rViewOptions ));
96 }
97 
98 void SwRenderData::ViewOptionAdjust(SwPrintData const*const pPrtOptions, bool setShowPlaceHoldersInPDF)
99 {
100  m_pViewOptionAdjust->AdjustViewOptions( pPrtOptions, setShowPlaceHoldersInPDF );
101 }
102 
104 {
105  m_pViewOptionAdjust.reset();
106 }
107 
109 {
110  m_pViewOptionAdjust->DontTouchThatViewShellItSmellsFunny();
111 }
112 
114  SwDocShell const*const pDocShell,
115  SwPrintUIOptions const*const pOpt,
116  bool const bIsPDFExport)
117 {
118  if (!pDocShell || !pOpt)
119  return;
120 
121  m_pPrtOptions.reset(new SwPrintData);
122  SwPrintData & rOptions(*m_pPrtOptions);
123 
124  // get default print options
125  bool bWeb = dynamic_cast<const SwWebDocShell*>( pDocShell) != nullptr;
127 
128  // get print options to use from provided properties
129  rOptions.m_bPrintGraphic = pOpt->IsPrintGraphics();
130  rOptions.m_bPrintTable = true; // for now it was decided that tables should always be printed
131  rOptions.m_bPrintDraw = pOpt->IsPrintDrawings();
132  rOptions.m_bPrintControl = pOpt->IsPrintFormControls();
133  rOptions.m_bPrintLeftPages = pOpt->IsPrintLeftPages();
134  rOptions.m_bPrintRightPages = pOpt->IsPrintRightPages();
136  rOptions.m_bPrintEmptyPages = pOpt->IsPrintEmptyPages( bIsPDFExport );
137  // bUpdateFieldsInPrinting <-- not set here; mail merge only
138  rOptions.m_bPaperFromSetup = pOpt->IsPaperFromSetup();
139  rOptions.m_bPrintReverse = false; /*handled by print dialog now*/
140  rOptions.m_bPrintProspect = pOpt->IsPrintProspect();
141  rOptions.m_bPrintProspectRTL = pOpt->IsPrintProspectRTL();
142  // bPrintSingleJobs <-- not set here; mail merge and or configuration
143  // bModified <-- not set here; mail merge only
144  rOptions.m_bPrintBlackFont = pOpt->IsPrintWithBlackTextColor();
145  rOptions.m_bPrintHiddenText = pOpt->IsPrintHiddenText();
147  rOptions.m_nPrintPostIts = pOpt->GetPrintPostItsType();
148 
151  rOptions.SetRenderData( this );
152 }
153 
155  sal_uInt16 nCurrentPage,
156  bool bWeb,
157  bool bSwSrcView,
158  bool bHasSelection,
159  bool bHasPostIts,
160  const SwPrintData &rDefaultPrintData ) :
161  m_rDefaultPrintData( rDefaultPrintData )
162 {
163  // printing HTML sources does not have any valid UI options.
164  // It's just the source code that gets printed...
165  if (bSwSrcView)
166  {
167  m_aUIProperties.clear();
168  return;
169  }
170 
171  // check if either CJK or CTL is enabled
172  SvtLanguageOptions aLangOpt;
173  bool bRTL = aLangOpt.IsCJKFontEnabled() || aLangOpt.IsCTLFontEnabled();
174 
175  // create sequence of print UI options
176  // (5 options are not available for Writer-Web)
177  const int nRTLOpts = bRTL ? 1 : 0;
178  const int nNumProps = nRTLOpts + (bWeb ? 15 : 19);
179  m_aUIProperties.resize( nNumProps);
180  int nIdx = 0;
181 
182  // load the writer PrinterOptions into the custom tab
183  m_aUIProperties[nIdx].Name = "OptionsUIFile";
184  m_aUIProperties[nIdx++].Value <<= OUString("modules/swriter/ui/printeroptions.ui");
185 
186  // create "writer" section (new tab page in dialog)
187  SvtModuleOptions aModOpt;
188  OUString aAppGroupname( SwResId( STR_PRINTOPTUI_PRODUCTNAME) );
189  aAppGroupname = aAppGroupname.replaceFirst( "%s", aModOpt.GetModuleName( SvtModuleOptions::EModule::WRITER ) );
190  m_aUIProperties[ nIdx++ ].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage");
191 
192  // create sub section for Contents
193  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("contents", SwResId( STR_PRINTOPTUI_CONTENTS), OUString());
194 
195  // create a bool option for background
196  bool bDefaultVal = rDefaultPrintData.IsPrintPageBackground();
197  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pagebackground", SwResId( STR_PRINTOPTUI_PAGE_BACKGROUND),
198  ".HelpID:vcl:PrintDialog:PrintPageBackground:CheckBox",
199  "PrintPageBackground",
200  bDefaultVal);
201 
202  // create a bool option for pictures/graphics AND OLE and drawing objects as well
203  bDefaultVal = rDefaultPrintData.IsPrintGraphic() || rDefaultPrintData.IsPrintDraw();
204  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("pictures", SwResId( STR_PRINTOPTUI_PICTURES),
205  ".HelpID:vcl:PrintDialog:PrintPicturesAndObjects:CheckBox",
206  "PrintPicturesAndObjects",
207  bDefaultVal);
208  if (!bWeb)
209  {
210  // create a bool option for hidden text
211  bDefaultVal = rDefaultPrintData.IsPrintHiddenText();
212  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("hiddentext", SwResId( STR_PRINTOPTUI_HIDDEN),
213  ".HelpID:vcl:PrintDialog:PrintHiddenText:CheckBox",
214  "PrintHiddenText",
215  bDefaultVal);
216 
217  // create a bool option for place holder
218  bDefaultVal = rDefaultPrintData.IsPrintTextPlaceholder();
219  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("placeholders", SwResId( STR_PRINTOPTUI_TEXT_PLACEHOLDERS),
220  ".HelpID:vcl:PrintDialog:PrintTextPlaceholder:CheckBox",
221  "PrintTextPlaceholder",
222  bDefaultVal);
223  }
224 
225  // create a bool option for controls
226  bDefaultVal = rDefaultPrintData.IsPrintControl();
227  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("formcontrols", SwResId( STR_PRINTOPTUI_FORM_CONTROLS),
228  ".HelpID:vcl:PrintDialog:PrintControls:CheckBox",
229  "PrintControls",
230  bDefaultVal);
231 
232  // create sub section for Color
233  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("color", SwResId( STR_PRINTOPTUI_COLOR), OUString());
234 
235  // create a bool option for printing text with black font color
236  bDefaultVal = rDefaultPrintData.IsPrintBlackFont();
237  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("textinblack", SwResId( STR_PRINTOPTUI_PRINT_BLACK),
238  ".HelpID:vcl:PrintDialog:PrintBlackFonts:CheckBox",
239  "PrintBlackFonts",
240  bDefaultVal);
241 
242  if (!bWeb)
243  {
244  // create subgroup for misc options
245  m_aUIProperties[ nIdx++ ].Value = setSubgroupControlOpt("pages", SwResId( STR_PRINTOPTUI_PAGES_TEXT), OUString());
246 
247  // create a bool option for printing automatically inserted blank pages
248  bDefaultVal = rDefaultPrintData.IsPrintEmptyPages();
249  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("autoblankpages", SwResId( STR_PRINTOPTUI_PRINT_BLANK),
250  ".HelpID:vcl:PrintDialog:PrintEmptyPages:CheckBox",
251  "PrintEmptyPages",
252  bDefaultVal);
253  }
254 
255  // create a bool option for paper tray
256  bDefaultVal = rDefaultPrintData.IsPaperFromSetup();
258  aPaperTrayOpt.maGroupHint = "OptionsPageOptGroup";
259  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("printpaperfromsetup", SwResId( STR_PRINTOPTUI_ONLY_PAPER),
260  ".HelpID:vcl:PrintDialog:PrintPaperFromSetup:CheckBox",
261  "PrintPaperFromSetup",
262  bDefaultVal,
263  aPaperTrayOpt);
264 
265  // print range selection
267  aPrintRangeOpt.maGroupHint = "PrintRange";
268  aPrintRangeOpt.mbInternalOnly = true;
269  m_aUIProperties[nIdx++].Value = setSubgroupControlOpt( "printrange",
270  SwResId( STR_PRINTOPTUI_PAGES_TEXT ),
271  OUString(),
272  aPrintRangeOpt );
273 
274  // create a choice for the content to create
275  const OUString aPrintRangeName( "PrintContent" );
276  uno::Sequence< OUString > aChoices( 3 );
277  uno::Sequence< sal_Bool > aChoicesDisabled( 3 );
278  uno::Sequence< OUString > aHelpIds( 3 );
279  uno::Sequence< OUString > aWidgetIds( 3 );
280  aChoices[0] = SwResId( STR_PRINTOPTUI_PRINTALLPAGES );
281  aChoicesDisabled[0] = false;
282  aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:0";
283  aWidgetIds[0] = "rbAllPages";
284  aChoices[1] = SwResId( STR_PRINTOPTUI_PRINTPAGES );
285  aChoicesDisabled[1] = false;
286  aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:1";
287  aWidgetIds[1] = "rbRangePages";
288  aChoices[2] = SwResId( STR_PRINTOPTUI_PRINTSELECTION );
289  aChoicesDisabled[2] = !bHasSelection;
290  aHelpIds[2] = ".HelpID:vcl:PrintDialog:PrintContent:RadioButton:2";
291  aWidgetIds[2] = "rbRangeSelection";
292  m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
293  aHelpIds, aPrintRangeName,
294  aChoices,
295  bHasSelection ? 2 : 0,
296  aChoicesDisabled);
297 
298  // show an Edit dependent on "Pages" selected
299  vcl::PrinterOptionsHelper::UIControlOptions aPageRangeOpt( aPrintRangeName, 1, true );
300  m_aUIProperties[nIdx++].Value = setEditControlOpt("pagerange", OUString(),
301  ".HelpID:vcl:PrintDialog:PageRange:Edit",
302  "PageRange",
303  OUString::number( nCurrentPage ) /* set text box to current page number */,
304  aPageRangeOpt);
305 
306  vcl::PrinterOptionsHelper::UIControlOptions aEvenOddOpt(aPrintRangeName, -1, true);
307  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("evenoddbox",
308  OUString(),
309  uno::Sequence<OUString>(),
310  "EvenOdd",
311  uno::Sequence<OUString>(),
312  0,
313  uno::Sequence< sal_Bool >(),
314  aEvenOddOpt);
315 
316  // create a list box for notes content
317  const SwPostItMode nPrintPostIts = rDefaultPrintData.GetPrintPostIts();
318  aChoices.realloc( 5 );
319  aChoices[0] = SwResId( STR_PRINTOPTUI_NONE);
320  aChoices[1] = SwResId( STR_PRINTOPTUI_COMMENTS_ONLY);
321  aChoices[2] = SwResId( STR_PRINTOPTUI_PLACE_END);
322  aChoices[3] = SwResId( STR_PRINTOPTUI_PLACE_PAGE);
323  aChoices[4] = SwResId( STR_PRINTOPTUI_PLACE_MARGINS);
324  aHelpIds.realloc( 2 );
325  aHelpIds[0] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:FixedText";
326  aHelpIds[1] = ".HelpID:vcl:PrintDialog:PrintAnnotationMode:ListBox";
327  vcl::PrinterOptionsHelper::UIControlOptions aAnnotOpt( "PrintProspect", 0, false );
328  aAnnotOpt.mbEnabled = bHasPostIts;
329  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("writercomments",
330  SwResId( STR_PRINTOPTUI_COMMENTS),
331  aHelpIds,
332  "PrintAnnotationMode",
333  aChoices,
334  bHasPostIts ? static_cast<sal_uInt16>(nPrintPostIts) : 0,
335  uno::Sequence< sal_Bool >(),
336  aAnnotOpt);
337 
338  // create subsection for Page settings
340  aPageSetOpt.maGroupHint = "LayoutPage";
341 
342  // create a bool option for brochure
343  bDefaultVal = rDefaultPrintData.IsPrintProspect();
344  const OUString aBrochurePropertyName( "PrintProspect" );
345  m_aUIProperties[ nIdx++ ].Value = setBoolControlOpt("brochure", SwResId( STR_PRINTOPTUI_BROCHURE),
346  ".HelpID:vcl:PrintDialog:PrintProspect:CheckBox",
347  aBrochurePropertyName,
348  bDefaultVal,
349  aPageSetOpt);
350 
351  if (bRTL)
352  {
353  // create a bool option for brochure RTL dependent on brochure
354  uno::Sequence< OUString > aBRTLChoices( 2 );
355  aBRTLChoices[0] = SwResId( STR_PRINTOPTUI_LEFT_SCRIPT);
356  aBRTLChoices[1] = SwResId( STR_PRINTOPTUI_RIGHT_SCRIPT);
357  vcl::PrinterOptionsHelper::UIControlOptions aBrochureRTLOpt( aBrochurePropertyName, -1, true );
358  uno::Sequence<OUString> aBRTLHelpIds { ".HelpID:vcl:PrintDialog:PrintProspectRTL:ListBox" };
359  aBrochureRTLOpt.maGroupHint = "LayoutPage";
360  // RTL brochure choices
361  // 0 : left-to-right
362  // 1 : right-to-left
363  const sal_Int16 nBRTLChoice = rDefaultPrintData.IsPrintProspectRTL() ? 1 : 0;
364  m_aUIProperties[ nIdx++ ].Value = setChoiceListControlOpt("scriptdirection",
365  OUString(),
366  aBRTLHelpIds,
367  "PrintProspectRTL",
368  aBRTLChoices,
369  nBRTLChoice,
370  uno::Sequence< sal_Bool >(),
371  aBrochureRTLOpt);
372  }
373 
374  assert(nIdx == nNumProps);
375 }
376 
378 {
379 }
380 
382 {
383  // take care of different property names for the option.
384  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
385 
386  // 0: left and right pages
387  // 1: left pages only
388  // 2: right pages only
389  sal_Int64 nEOPages = getIntValue( "EvenOdd", 0 /* default: all */ );
390  bool bRes = nEOPages != 1;
391  bRes = getBoolValue( "EvenOdd", bRes /* <- default value if property is not found */ );
392  return bRes;
393 }
394 
396 {
397  // take care of different property names for the option.
398  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
399 
400  sal_Int64 nEOPages = getIntValue( "EvenOdd", 0 /* default: all */ );
401  bool bRes = nEOPages != 2;
402  bRes = getBoolValue( "EvenOdd", bRes /* <- default value if property is not found */ );
403  return bRes;
404 }
405 
406 bool SwPrintUIOptions::IsPrintEmptyPages( bool bIsPDFExport ) const
407 {
408  // take care of different property names for the option.
409 
410  bool bRes = bIsPDFExport ?
411  !getBoolValue( "IsSkipEmptyPages", true ) :
412  getBoolValue( "PrintEmptyPages", true );
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( "PrintGraphics", bRes );
423  return bRes;
424 }
425 
427 {
428  // take care of different property names for the option.
429  // for compatibility the old name should win (may still be used for PDF export or via Uno API)
430 
431  bool bRes = getBoolValue( "PrintPicturesAndObjects", true );
432  bRes = getBoolValue( "PrintDrawings", bRes );
433  return bRes;
434 }
435 
436 bool SwPrintUIOptions::processPropertiesAndCheckFormat( const uno::Sequence< beans::PropertyValue >& i_rNewProp )
437 {
438  bool bChanged = processProperties( i_rNewProp );
439 
440  uno::Reference< awt::XDevice > xRenderDevice;
441  uno::Any aVal( getValue( "RenderDevice" ) );
442  aVal >>= xRenderDevice;
443 
445  if (xRenderDevice.is())
446  {
447  VCLXDevice* pDevice = comphelper::getUnoTunnelImplementation<VCLXDevice>( xRenderDevice );
448  if (pDevice)
449  pOut = pDevice->GetOutputDevice();
450  }
451  bChanged = bChanged || (pOut.get() != m_pLast.get());
452  if( pOut )
453  m_pLast = pOut;
454 
455  return bChanged;
456 }
457 
458 /* 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:1866
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:186
void SetTempDocShell(SfxObjectShellLock const &)
Definition: printdata.cxx:77
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:357
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:436
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:87
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:377
SwPrintUIOptions(sal_uInt16 nCurrentPage, bool bWeb, bool bSwSrcView, bool bHasSelection, bool bHasPostIts, const SwPrintData &rDefaultPrintData)
Definition: printdata.cxx:154
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:381
bool IsPrintControl() const
Definition: printdata.hxx:134
bool m_bPrintControl
Definition: printdata.hxx:58
OUString SwResId(const char *pId)
Definition: swmodule.cxx:165
void CreatePostItData(SwDoc &rDoc, const SwViewOption *pViewOpt, OutputDevice *pOutDev)
Definition: printdata.cxx:48
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:416
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:113
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 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:82
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:108
bool IsPrintRightPages() const
Definition: printdata.cxx:395
bool IsPrintDrawings() const
Definition: printdata.cxx:426
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:98
sal_Int64 getIntValue(const OUString &i_rPropertyName, sal_Int64 i_nDefault) const
bool IsPrintEmptyPages(bool bIsPDFExport) const
Definition: printdata.cxx:406
bool sw_GetPostIts(const IDocumentFieldsAccess &rIDFA, SetGetExpFields *pSrtLst)
Definition: doc.cxx:515
void ViewOptionAdjustStop()
Definition: printdata.cxx:103