LibreOffice Module filter (master) 1
impdialog.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 "impdialog.hxx"
21#include <strings.hrc>
22#include <officecfg/Office/Common.hxx>
23#include <vcl/errinf.hxx>
24#include <vcl/svapp.hxx>
25#include <vcl/weld.hxx>
26#include <sfx2/passwd.hxx>
28#include <sfx2/objsh.hxx>
29#include <svl/stritem.hxx>
30#include <sfx2/dispatch.hxx>
31#include <sfx2/sfxsids.hrc>
32
33#include <comphelper/lok.hxx>
37
38#include <com/sun/star/text/XTextRange.hpp>
39#include <com/sun/star/drawing/XShapes.hpp>
40#include <com/sun/star/container/XIndexAccess.hpp>
41#include <com/sun/star/frame/XController.hpp>
42#include <com/sun/star/view/XSelectionSupplier.hpp>
43#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
44#include <com/sun/star/beans/XMaterialHolder.hpp>
45#include <com/sun/star/lang/XServiceInfo.hpp>
46
47using namespace ::com::sun::star;
48using namespace ::com::sun::star::uno;
49
54ImpPDFTabDialog::ImpPDFTabDialog(weld::Window* pParent, const Sequence< PropertyValue >& rFilterData,
55 const Reference< XComponent >& rxDoc)
56 : SfxTabDialogController(pParent, "filter/ui/pdfoptionsdialog.ui", "PdfOptionsDialog"),
57 mrDoc(rxDoc),
58 maConfigItem( u"Office.Common/Filter/PDF/Export/", &rFilterData ),
59 maConfigI18N( u"Office.Common/I18N/CTL/" ),
60 mbIsPresentation( false ),
61 mbIsSpreadsheet( false ),
62 mbIsWriter( false ),
63
64 mbSelectionPresent( false ),
65 mbUseCTLFont( false ),
66 mbUseLosslessCompression( true ),
67 mnQuality( 90 ),
68 mbReduceImageResolution( false ),
69 mnMaxImageResolution( 300 ),
70 mbUseTaggedPDF( false ),
71 mbUseTaggedPDFUserSelection( false ),
72 mbExportNotes( true ),
73 mbExportNotesInMargin( false ),
74 mbViewPDF( false ),
75 mbUseReferenceXObject( false ),
76 mbExportNotesPages( false ),
77 mbExportOnlyNotesPages( false ),
78 mbUseTransitionEffects( false ),
79 mbIsSkipEmptyPages( true ),
80 mbIsExportPlaceholders( false ),
81 mbAddStream( false ),
82 mnFormsType( 0 ),
83 mbExportFormFields( true ),
84 mbAllowDuplicateFieldNames( false ),
85 mbExportBookmarks( true ),
86 mbExportHiddenSlides ( false ),
87 mbSinglePageSheets ( false ),
88 mnOpenBookmarkLevels( -1 ),
89
90 mbHideViewerToolbar( false ),
91 mbHideViewerMenubar( false ),
92 mbHideViewerWindowControls( false ),
93 mbResizeWinToInit( false ),
94 mbCenterWindow( false ),
95 mbOpenInFullScreenMode( false ),
96 mbDisplayPDFDocumentTitle( false ),
97 mnMagnification( 0 ),
98 mnInitialView( 1 ),
99 mnZoom( 0 ),
100 mnInitialPage( 1 ),
101 mnPageLayout( 0 ),
102 mbFirstPageLeft( false ),
103
104 mbEncrypt( false ),
105 mbRestrictPermissions( false ),
106 mnPrint( 0 ),
107 mnChangesAllowed( 0 ),
108 mbCanCopyOrExtract( false ),
109 mbCanExtractForAccessibility( true ),
110
111 mbIsRangeChecked( false ),
112 msPageRange( ' ' ),
113
114 mbSelectionIsChecked( false ),
115 mbExportRelativeFsysLinks( false ),
116 mnViewPDFMode( 0 ),
117 mbConvertOOoTargets( false ),
118 mbExportBmkToPDFDestination( false ),
119
120 mbSignPDF( false )
121{
122 // check for selection
123 try
124 {
125 Reference< frame::XController > xController( Reference< frame::XModel >( rxDoc, UNO_QUERY_THROW )->getCurrentController() );
126 if( xController.is() )
127 {
128 Reference< view::XSelectionSupplier > xView( xController, UNO_QUERY );
129 if( xView.is() )
130 maSelection = xView->getSelection();
131 }
132 }
133 catch(const RuntimeException &)
134 {
135 }
136 mbSelectionPresent = maSelection.hasValue();
137 if ( mbSelectionPresent )
138 {
139 Reference< drawing::XShapes > xShapes;
140 if ( !( maSelection >>= xShapes ) ) // XShapes is always a selection
141 {
142 // even if nothing is selected in writer the selection is not empty
143 Reference< container::XIndexAccess > xIndexAccess;
144 if ( maSelection >>= xIndexAccess )
145 {
146 sal_Int32 nLen = xIndexAccess->getCount();
147 if ( !nLen )
148 mbSelectionPresent = false;
149 else if ( nLen == 1 )
150 {
151 Reference< text::XTextRange > xTextRange( xIndexAccess->getByIndex( 0 ), UNO_QUERY );
152 if ( xTextRange.is() && ( xTextRange->getString().isEmpty() ) )
153 mbSelectionPresent = false;
154 }
155 }
156 }
157 }
158
159 // check if source document is a presentation or a spreadsheet or a textdocument
160 try
161 {
162 Reference< XServiceInfo > xInfo( rxDoc, UNO_QUERY );
163 if ( xInfo.is() )
164 {
165 if ( xInfo->supportsService( "com.sun.star.presentation.PresentationDocument" ) )
166 mbIsPresentation = true;
167 if ( xInfo->supportsService( "com.sun.star.sheet.SpreadsheetDocument" ) )
168 mbIsSpreadsheet = true;
169 if ( xInfo->supportsService( "com.sun.star.text.GenericTextDocument" ) )
170 mbIsWriter = true;
171 }
172 }
173 catch(const RuntimeException &)
174 {
175 }
176
177 // get the CTL (Complex Text Layout) from general options, returns sal_True if we have a CTL font on our hands.
178 mbUseCTLFont = maConfigI18N.ReadBool( "CTLFont", false );
179
180 mbUseLosslessCompression = maConfigItem.ReadBool( "UseLosslessCompression", false );
181 mnQuality = maConfigItem.ReadInt32( "Quality", 90 );
182 mbReduceImageResolution = maConfigItem.ReadBool( "ReduceImageResolution", false );
183 mnMaxImageResolution = maConfigItem.ReadInt32( "MaxImageResolution", 300 );
184
185 // this is always the user selection, independent from the PDF/A forced selection
186 mbUseTaggedPDF = maConfigItem.ReadBool( "UseTaggedPDF", false );
188
189 mnPDFTypeSelection = maConfigItem.ReadInt32( "SelectPdfVersion", 0 );
190 mbPDFUACompliance = maConfigItem.ReadBool("PDFUACompliance", false);
191
192 if ( mbIsPresentation )
193 {
194 mbExportNotesPages = maConfigItem.ReadBool( "ExportNotesPages", false );
195 mbExportOnlyNotesPages = maConfigItem.ReadBool( "ExportOnlyNotesPages", false );
196 }
197 mbExportNotes = maConfigItem.ReadBool( "ExportNotes", false );
198 if (mbIsWriter)
199 mbExportNotesInMargin = maConfigItem.ReadBool( "ExportNotesInMargin", false );
200 mbViewPDF = maConfigItem.ReadBool( "ViewPDFAfterExport", false );
201
202 mbExportBookmarks = maConfigItem.ReadBool( "ExportBookmarks", true );
204 if ( mbIsPresentation )
205 mbExportHiddenSlides = maConfigItem.ReadBool( "ExportHiddenSlides", false );
206 if ( mbIsSpreadsheet )
207 mbSinglePageSheets = maConfigItem.ReadBool( "SinglePageSheets", false );
208 mnOpenBookmarkLevels = maConfigItem.ReadInt32( "OpenBookmarkLevels", -1 );
209 mbUseTransitionEffects = maConfigItem.ReadBool( "UseTransitionEffects", true );
210 mbIsSkipEmptyPages = maConfigItem.ReadBool( "IsSkipEmptyPages", false );
211 mbIsExportPlaceholders = maConfigItem.ReadBool( "ExportPlaceholders", false );
212 mbAddStream = maConfigItem.ReadBool( "IsAddStream", false );
213
214 mbExportFormFields = maConfigItem.ReadBool( "ExportFormFields", true );
215 mnFormsType = maConfigItem.ReadInt32( "FormsType", 0 );
216 if ( ( mnFormsType < 0 ) || ( mnFormsType > 3 ) )
217 mnFormsType = 0;
218 mbAllowDuplicateFieldNames = maConfigItem.ReadBool( "AllowDuplicateFieldNames", false );
219
220 // prepare values for the Viewer tab page
221 mbHideViewerToolbar = maConfigItem.ReadBool( "HideViewerToolbar", false );
222 mbHideViewerMenubar = maConfigItem.ReadBool( "HideViewerMenubar", false );
223 mbHideViewerWindowControls = maConfigItem.ReadBool( "HideViewerWindowControls", false );
224 mbResizeWinToInit = maConfigItem.ReadBool( "ResizeWindowToInitialPage", false );
225 mbCenterWindow = maConfigItem.ReadBool( "CenterWindow", false );
226 mbOpenInFullScreenMode = maConfigItem.ReadBool( "OpenInFullScreenMode", false );
227 mbDisplayPDFDocumentTitle = maConfigItem.ReadBool( "DisplayPDFDocumentTitle", true );
228
229 mnInitialView = maConfigItem.ReadInt32( "InitialView", 0 );
231 mnMagnification = maConfigItem.ReadInt32( "Magnification", 0 );
232 mnZoom = maConfigItem.ReadInt32( "Zoom", 100 );
233 mnPageLayout = maConfigItem.ReadInt32( "PageLayout", 0 );
234 mbFirstPageLeft = maConfigItem.ReadBool( "FirstPageOnLeft", false );
235 mnInitialPage = maConfigItem.ReadInt32( "InitialPage", 1 );
236 if( mnInitialPage < 1 )
237 mnInitialPage = 1;
238
239 // prepare values for the security tab page
240 mnPrint = maConfigItem.ReadInt32( "Printing", 2 );
241 mnChangesAllowed = maConfigItem.ReadInt32( "Changes", 4 );
242 mbCanCopyOrExtract = maConfigItem.ReadBool( "EnableCopyingOfContent", true );
243 mbCanExtractForAccessibility = maConfigItem.ReadBool( "EnableTextAccessForAccessibilityTools", true );
244
245 // prepare values for relative links
246 mbExportRelativeFsysLinks = maConfigItem.ReadBool( "ExportLinksRelativeFsys", false );
247
248 mnViewPDFMode = maConfigItem.ReadInt32( "PDFViewSelection", 0 );
249
250 mbConvertOOoTargets = maConfigItem.ReadBool( "ConvertOOoTargetToPDFTarget", false );
251 mbExportBmkToPDFDestination = maConfigItem.ReadBool( "ExportBookmarksToPDFDestination", false );
252
253 // prepare values for digital signatures
254 mbSignPDF = maConfigItem.ReadBool( "SignPDF", false );
255
256 // queue the tab pages for later creation (created when first shown)
257 AddTabPage("general", ImpPDFTabGeneralPage::Create, nullptr );
259 m_xTabCtrl->remove_page("digitalsignatures");
260 else
261 AddTabPage("digitalsignatures", ImpPDFTabSigningPage::Create, nullptr);
262 AddTabPage("security", ImpPDFTabSecurityPage::Create, nullptr);
263 AddTabPage("links", ImpPDFTabLinksPage::Create, nullptr);
264 AddTabPage("userinterface", ImpPDFTabViewerPage::Create, nullptr);
265 AddTabPage("initialview", ImpPDFTabOpnFtrPage::Create, nullptr);
266
267 SetCurPageId("general");
268
269 // get the string property value (from sfx2/source/dialog/mailmodel.cxx) to overwrite the text for the Ok button
270 OUString sOkButtonText = maConfigItem.ReadString( "_OkButtonString", OUString() );
271
272 // change text on the Ok button: get the relevant string from resources, update it on the button
273 // according to the exported pdf file destination: send as e-mail or write to file?
274 if (!sOkButtonText.isEmpty())
275 GetOKButton().set_label(sOkButtonText);
276
279
280 // remove the reset button, not needed in this tabbed dialog
282}
283
285{
286 SfxTabPage* pSecurityPage = GetTabPage(u"security");
287 if (pSecurityPage)
288 {
289 return static_cast<ImpPDFTabSecurityPage*>(pSecurityPage);
290 }
291 return nullptr;
292}
293
295{
296 SfxTabPage* pOpenPage = GetTabPage(u"initialview");
297 if (pOpenPage)
298 {
299 return static_cast<ImpPDFTabOpnFtrPage*>(pOpenPage);
300 }
301 return nullptr;
302}
303
305{
306 SfxTabPage* pLinksPage = GetTabPage(u"links");
307 if (pLinksPage)
308 {
309 return static_cast<ImpPDFTabLinksPage*>(pLinksPage);
310 }
311 return nullptr;
312}
313
314
316{
317 SfxTabPage* pGeneralPage = GetTabPage(u"general");
318 if (pGeneralPage)
319 {
320 return static_cast<ImpPDFTabGeneralPage*>(pGeneralPage);
321 }
322 return nullptr;
323}
324
326{
327 m_xDialog->response(RET_CANCEL);
328}
329
331{
332 if (getGeneralPage()->IsPdfUaSelected())
333 {
335 if (pShell)
336 {
338 auto aIssues = aCollection.getIssues();
339 int nIssueCount(aIssues.size());
340 if (!aIssues.empty())
341 {
342 OUString aMessage(FilterResId(STR_WARN_PDFUA_ISSUES, nIssueCount));
343 aMessage = aMessage.replaceFirst("%1", OUString::number(nIssueCount));
344
345 std::unique_ptr<weld::MessageDialog> xPDFUADialog(Application::CreateMessageDialog(
346 getGeneralPage()->GetFrameWeld(), VclMessageType::Warning,
347 VclButtonsType::Cancel, aMessage));
348 xPDFUADialog->add_button(FilterResId(STR_PDFUA_INVESTIGATE, nIssueCount), RET_NO);
349 xPDFUADialog->add_button(FilterResId(STR_PDFUA_IGNORE), RET_YES);
350 xPDFUADialog->set_default_response(RET_YES);
351
352 int ret = xPDFUADialog->run();
353 if (ret == RET_YES)
354 m_xDialog->response(RET_OK);
355 else if (ret == RET_NO)
356 {
357 m_xDialog->response(RET_CANCEL);
358 // Show accessibility check Sidebar deck
359 SfxDispatcher* pDispatcher = pShell->GetDispatcher();
360 if (pDispatcher)
361 {
362 const SfxStringItem sDeckName(SID_SIDEBAR_DECK, "A11yCheckDeck");
363 pDispatcher->ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::RECORD,
364 { &sDeckName });
365 }
366 }
367 }
368 else
369 {
370 m_xDialog->response(RET_OK);
371 }
372 }
373 else
374 {
375 m_xDialog->response(RET_OK);
376 }
377 }
378 else
379 {
380 m_xDialog->response(RET_OK);
381 }
382}
383
385{
388}
389
390void ImpPDFTabDialog::PageCreated(const OUString& rId, SfxTabPage& rPage)
391{
392 if (rId == "general")
393 static_cast<ImpPDFTabGeneralPage&>(rPage).SetFilterConfigItem(this);
394 else if (rId == "userinterface")
395 {
396 static_cast<ImpPDFTabViewerPage&>(rPage).SetFilterConfigItem(this);
397 }
398 else if (rId == "initialview")
399 {
400 static_cast<ImpPDFTabOpnFtrPage&>(rPage).SetFilterConfigItem(this);
401 }
402 else if (rId == "links")
403 {
404 static_cast<ImpPDFTabLinksPage&>(rPage).SetFilterConfigItem(this);
405 }
406 else if (rId == "security")
407 {
408 static_cast<ImpPDFTabSecurityPage&>(rPage).SetFilterConfigItem(this);
409 }
410 else if (rId == "digitalsignatures")
411 {
412 static_cast<ImpPDFTabSigningPage&>(rPage).SetFilterConfigItem(this);
413 }
414}
415
416
417Sequence< PropertyValue > ImpPDFTabDialog::GetFilterData()
418{
419 // updating the FilterData sequence and storing FilterData to configuration
420 if (ImpPDFTabGeneralPage* pPage = static_cast<ImpPDFTabGeneralPage*>(GetTabPage(u"general")))
421 pPage->GetFilterConfigItem(this);
422 if (ImpPDFTabViewerPage* pPage = static_cast<ImpPDFTabViewerPage*>(GetTabPage(u"userinterface")))
423 pPage->GetFilterConfigItem(this);
424 if (ImpPDFTabOpnFtrPage* pPage = static_cast<ImpPDFTabOpnFtrPage*>(GetTabPage(u"initialview")))
425 pPage->GetFilterConfigItem(this);
426 if (ImpPDFTabLinksPage* pPage = static_cast<ImpPDFTabLinksPage*>(GetTabPage(u"links")))
427 pPage->GetFilterConfigItem(this);
428 if (ImpPDFTabSecurityPage* pPage = static_cast<ImpPDFTabSecurityPage*>( GetTabPage(u"security")))
429 pPage->GetFilterConfigItem(this);
430 if (ImpPDFTabSigningPage* pPage = static_cast<ImpPDFTabSigningPage*>(GetTabPage(u"digitalsignatures")))
431 pPage->GetFilterConfigItem(this);
432
433 // prepare the items to be returned
434 maConfigItem.WriteBool( "UseLosslessCompression", mbUseLosslessCompression );
435 maConfigItem.WriteInt32("Quality", mnQuality );
436 maConfigItem.WriteBool( "ReduceImageResolution", mbReduceImageResolution );
437 maConfigItem.WriteInt32("MaxImageResolution", mnMaxImageResolution );
438
439 // always write the user selection, never the overridden value
440 const bool bIsPDFUA = mbPDFUACompliance;
441 const bool bIsPDFA = (1 == mnPDFTypeSelection) || (2 == mnPDFTypeSelection) || (3 == mnPDFTypeSelection);
442 const bool bUserSelectionTags = bIsPDFA || bIsPDFUA;
443 maConfigItem.WriteBool("UseTaggedPDF", bUserSelectionTags ? mbUseTaggedPDFUserSelection : mbUseTaggedPDF);
444 maConfigItem.WriteInt32("SelectPdfVersion", mnPDFTypeSelection );
445 maConfigItem.WriteBool("PDFUACompliance", mbPDFUACompliance);
446
447 if ( mbIsPresentation )
448 {
449 maConfigItem.WriteBool( "ExportNotesPages", mbExportNotesPages );
450 maConfigItem.WriteBool( "ExportOnlyNotesPages", mbExportOnlyNotesPages );
451 }
452 maConfigItem.WriteBool( "ExportNotes", mbExportNotes );
453 if (mbIsWriter)
454 maConfigItem.WriteBool( "ExportNotesInMargin", mbExportNotesInMargin );
455 maConfigItem.WriteBool( "ViewPDFAfterExport", mbViewPDF );
456
457 maConfigItem.WriteBool( "ExportBookmarks", mbExportBookmarks );
458 if ( mbIsPresentation )
459 maConfigItem.WriteBool( "ExportHiddenSlides", mbExportHiddenSlides );
460 if ( mbIsSpreadsheet )
461 maConfigItem.WriteBool( "SinglePageSheets", mbSinglePageSheets );
462 maConfigItem.WriteBool( "UseTransitionEffects", mbUseTransitionEffects );
463 maConfigItem.WriteBool( "IsSkipEmptyPages", mbIsSkipEmptyPages );
464 maConfigItem.WriteBool( "ExportPlaceholders", mbIsExportPlaceholders );
465 maConfigItem.WriteBool( "IsAddStream", mbAddStream );
466
467 /*
468 * FIXME: the entries are only implicitly defined by the resource file. Should there
469 * ever be an additional form submit format this could get invalid.
470 */
471 maConfigItem.WriteInt32( "FormsType", mnFormsType );
472 maConfigItem.WriteBool( "ExportFormFields", mbExportFormFields );
473 maConfigItem.WriteBool( "AllowDuplicateFieldNames", mbAllowDuplicateFieldNames );
474
475 maConfigItem.WriteBool( "HideViewerToolbar", mbHideViewerToolbar );
476 maConfigItem.WriteBool( "HideViewerMenubar", mbHideViewerMenubar );
477 maConfigItem.WriteBool( "HideViewerWindowControls", mbHideViewerWindowControls );
478 maConfigItem.WriteBool( "ResizeWindowToInitialPage", mbResizeWinToInit );
479 maConfigItem.WriteBool( "CenterWindow", mbCenterWindow );
480 maConfigItem.WriteBool( "OpenInFullScreenMode", mbOpenInFullScreenMode );
481 maConfigItem.WriteBool( "DisplayPDFDocumentTitle", mbDisplayPDFDocumentTitle );
482 maConfigItem.WriteInt32( "InitialView", mnInitialView );
483 maConfigItem.WriteInt32( "Magnification", mnMagnification);
484 maConfigItem.WriteInt32( "Zoom", mnZoom );
485 maConfigItem.WriteInt32( "InitialPage", mnInitialPage );
486 maConfigItem.WriteInt32( "PageLayout", mnPageLayout );
487 maConfigItem.WriteBool( "FirstPageOnLeft", mbFirstPageLeft );
488 maConfigItem.WriteInt32( "OpenBookmarkLevels", mnOpenBookmarkLevels );
489
490 maConfigItem.WriteBool( "ExportLinksRelativeFsys", mbExportRelativeFsysLinks );
491 maConfigItem.WriteInt32("PDFViewSelection", mnViewPDFMode );
492 maConfigItem.WriteBool( "ConvertOOoTargetToPDFTarget", mbConvertOOoTargets );
493 maConfigItem.WriteBool( "ExportBookmarksToPDFDestination", mbExportBmkToPDFDestination );
494
495 maConfigItem.WriteBool( "SignPDF", mbSignPDF );
496
497 maConfigItem.WriteInt32( "Printing", mnPrint );
499 maConfigItem.WriteBool( "EnableCopyingOfContent", mbCanCopyOrExtract );
500 maConfigItem.WriteBool( "EnableTextAccessForAccessibilityTools", mbCanExtractForAccessibility );
501
502 std::vector<beans::PropertyValue> aRet
503 {
508 comphelper::makePropertyValue("PreparedPermissionPassword", maPreparedOwnerPassword)
509 };
510 if( mbIsRangeChecked )
511 aRet.push_back(comphelper::makePropertyValue("PageRange", msPageRange));
512 else if( mbSelectionIsChecked )
513 aRet.push_back(comphelper::makePropertyValue("Selection", maSelection));
514
515 aRet.push_back(comphelper::makePropertyValue("SignatureLocation", msSignLocation));
516 aRet.push_back(comphelper::makePropertyValue("SignatureReason", msSignReason));
517 aRet.push_back(comphelper::makePropertyValue("SignatureContactInfo", msSignContact));
518 aRet.push_back(comphelper::makePropertyValue("SignaturePassword", msSignPassword));
519 aRet.push_back(comphelper::makePropertyValue("SignatureCertificate", maSignCertificate));
520 aRet.push_back(comphelper::makePropertyValue("SignatureTSA", msSignTSA));
521 aRet.push_back(comphelper::makePropertyValue("UseReferenceXObject", mbUseReferenceXObject));
522
524}
525
526
528 : SfxTabPage(pPage, pController, "filter/ui/pdfgeneralpage.ui", "PdfGeneralPage", &rCoreSet)
529 , mbUseTaggedPDFUserSelection(false)
530 , mbIsPresentation(false)
531 , mbIsSpreadsheet(false)
532 , mbIsWriter(false)
533 , mpParent(nullptr)
534 , mxRbAll(m_xBuilder->weld_radio_button("all"))
535 , mxRbRange(m_xBuilder->weld_radio_button("range"))
536 , mxRbSelection(m_xBuilder->weld_radio_button("selection"))
537 , mxEdPages(m_xBuilder->weld_entry("pages"))
538 , mxRbLosslessCompression(m_xBuilder->weld_radio_button("losslesscompress"))
539 , mxRbJPEGCompression(m_xBuilder->weld_radio_button("jpegcompress"))
540 , mxQualityFrame(m_xBuilder->weld_widget("qualityframe"))
541 , mxNfQuality(m_xBuilder->weld_metric_spin_button("quality", FieldUnit::PERCENT))
542 , mxCbReduceImageResolution(m_xBuilder->weld_check_button("reduceresolution"))
543 , mxCoReduceImageResolution(m_xBuilder->weld_combo_box("resolution"))
544 , mxCbPDFA(m_xBuilder->weld_check_button("pdfa"))
545 , mxCbPDFUA(m_xBuilder->weld_check_button("pdfua"))
546 , mxRbPDFAVersion(m_xBuilder->weld_combo_box("pdfaversion"))
547 , mxCbTaggedPDF(m_xBuilder->weld_check_button("tagged"))
548 , mxCbExportFormFields(m_xBuilder->weld_check_button("forms"))
549 , mxFormsFrame(m_xBuilder->weld_widget("formsframe"))
550 , mxLbFormsFormat(m_xBuilder->weld_combo_box("format"))
551 , mxCbAllowDuplicateFieldNames(m_xBuilder->weld_check_button("allowdups"))
552 , mxCbExportBookmarks(m_xBuilder->weld_check_button("bookmarks"))
553 , mxCbExportHiddenSlides(m_xBuilder->weld_check_button("hiddenpages"))
554 , mxCbSinglePageSheets(m_xBuilder->weld_check_button("singlepagesheets"))
555 , mxCbExportNotes(m_xBuilder->weld_check_button("comments"))
556 , mxCbExportNotesInMargin(m_xBuilder->weld_check_button("commentsinmargin"))
557 , mxCbViewPDF(m_xBuilder->weld_check_button("viewpdf"))
558 , mxCbUseReferenceXObject(m_xBuilder->weld_check_button("usereferencexobject"))
559 , mxCbExportNotesPages(m_xBuilder->weld_check_button("notes"))
560 , mxCbExportOnlyNotesPages(m_xBuilder->weld_check_button("onlynotes"))
561 , mxCbExportEmptyPages(m_xBuilder->weld_check_button("emptypages"))
562 , mxCbExportPlaceholders(m_xBuilder->weld_check_button("exportplaceholders"))
563 , mxCbAddStream(m_xBuilder->weld_check_button("embed"))
564 , mxCbWatermark(m_xBuilder->weld_check_button("watermark"))
565 , mxFtWatermark(m_xBuilder->weld_label("watermarklabel"))
566 , mxEdWatermark(m_xBuilder->weld_entry("watermarkentry"))
567 , mxSlidesFt(m_xBuilder->weld_label("slides"))
568 , mxSheetsFt(m_xBuilder->weld_label("selectedsheets"))
569{
570}
571
573{
576}
577
579{
580 mpParent = pParent;
581
582 // init this class data
583 mxRbRange->connect_toggled( LINK( this, ImpPDFTabGeneralPage, TogglePagesHdl ) );
584
585 mxRbAll->set_active(true);
586 mxRbAll->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleAllHdl ) );
588
589 const bool bSelectionPresent = pParent->mbSelectionPresent;
590 mxRbSelection->set_sensitive( bSelectionPresent );
591 if ( bSelectionPresent )
592 mxRbSelection->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleSelectionHdl ) );
594 mbIsWriter = pParent->mbIsWriter;
596
597 mxCbExportNotesInMargin->set_sensitive( mbIsWriter );
598 mxCbExportEmptyPages->set_sensitive( mbIsWriter );
599 mxCbExportPlaceholders->set_sensitive( mbIsWriter );
600
601 mxRbLosslessCompression->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleCompressionHdl ) );
602 const bool bUseLosslessCompression = pParent->mbUseLosslessCompression;
603 if ( bUseLosslessCompression )
604 mxRbLosslessCompression->set_active(true);
605 else
606 mxRbJPEGCompression->set_active(true);
607
608 mxNfQuality->set_value( pParent->mnQuality, FieldUnit::PERCENT );
609 mxQualityFrame->set_sensitive(!bUseLosslessCompression);
610
611 mxCbReduceImageResolution->connect_toggled(LINK(this, ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl));
612 const bool bReduceImageResolution = pParent->mbReduceImageResolution;
613 mxCbReduceImageResolution->set_active( bReduceImageResolution );
614 OUString aStrRes = OUString::number( pParent->mnMaxImageResolution ) + " DPI";
615 mxCoReduceImageResolution->set_entry_text(aStrRes);
616 mxCoReduceImageResolution->set_sensitive( bReduceImageResolution );
617 mxCbWatermark->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleWatermarkHdl ) );
618 mxFtWatermark->set_sensitive(false );
619 mxEdWatermark->set_sensitive( false );
620 mxCbPDFA->connect_toggled(LINK(this, ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHandle));
621
622 const bool bIsPDFA = (pParent->mnPDFTypeSelection>=1) && (pParent->mnPDFTypeSelection <= 3);
623 mxCbPDFA->set_active(bIsPDFA);
624 switch( pParent->mnPDFTypeSelection )
625 {
626 case 1: // PDF/A-1
627 mxRbPDFAVersion->set_active_id("1");
628 break;
629 case 2: // PDF/A-2
630 mxRbPDFAVersion->set_active_id("2");
631 break;
632 case 3: // PDF/A-3
633 default: // PDF 1.x
634 mxRbPDFAVersion->set_active_id("3");
635 break;
636 }
637
638 const bool bIsPDFUA = pParent->mbPDFUACompliance;
639 mxCbPDFUA->set_active(bIsPDFUA);
640 mxCbPDFUA->connect_toggled(LINK(this, ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHandle));
641
642 // the TogglePDFVersionOrUniversalAccessibilityHandle handler will read or write the *UserSelection based
643 // on the mxCbPDFA (= bIsPDFA) state, so we have to prepare the correct input state.
644 if (bIsPDFA || bIsPDFUA)
645 mxCbTaggedPDF->set_active(pParent->mbUseTaggedPDFUserSelection);
646 else
649 TogglePDFVersionOrUniversalAccessibilityHandle(*mxCbPDFA);
650
651 mxCbExportFormFields->set_active(pParent->mbExportFormFields);
652 mxCbExportFormFields->connect_toggled( LINK( this, ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl ) );
653
654 mxLbFormsFormat->set_active(static_cast<sal_uInt16>(pParent->mnFormsType));
656 mxFormsFrame->set_sensitive(pParent->mbExportFormFields);
657
658
659 mxCbExportNotes->set_active( pParent->mbExportNotes );
660 mxCbExportNotesInMargin->set_active( pParent->mbExportNotesInMargin );
662 {
663 mxCbViewPDF->hide();
664 mxCbViewPDF->set_active(false);
665 }
666 else
667 {
668 mxCbViewPDF->set_active(pParent->mbViewPDF);
669 }
670
671 if ( mbIsPresentation )
672 {
673 mxRbRange->set_label(mxSlidesFt->get_label());
674 mxCbExportNotesPages->show();
675 mxCbExportNotesPages->set_active(pParent->mbExportNotesPages);
676 mxCbExportNotesPages->connect_toggled( LINK(this, ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl ) );
679 // tdf#116473 Initially enable Export only note pages option depending on the checked state of Export notes pages option
680 mxCbExportOnlyNotesPages->set_sensitive(mxCbExportNotesPages->get_active());
682 mxCbExportHiddenSlides->set_active(pParent->mbExportHiddenSlides);
683 }
684 else
685 {
686 mxCbExportNotesPages->hide();
687 mxCbExportNotesPages->set_active(false);
689 mxCbExportOnlyNotesPages->set_active(false);
691 mxCbExportHiddenSlides->set_active(false);
692 }
693
694 if( mbIsSpreadsheet )
695 {
696 mxRbSelection->set_label(mxSheetsFt->get_label());
697 // tdf#105965 Make Selection/Selected sheets the default PDF export range setting for spreadsheets
698 mxRbSelection->set_active(true);
699
700 mxCbSinglePageSheets->show();
701 mxCbSinglePageSheets->set_active(pParent->mbSinglePageSheets);
702 }
703 else
704 {
705 mxCbSinglePageSheets->hide();
706 mxCbSinglePageSheets->set_active(false);
707 }
708
710 if( mbIsWriter )
711 {
712 // tdf#54908 Make selection active if there is a selection in Writer's version
713 mxRbSelection->set_active( bSelectionPresent );
715 }
716 else
717 {
718 mxCbExportPlaceholders->set_active(false);
719 mxCbExportNotesInMargin->set_active(false);
720 }
721 mxCbExportEmptyPages->set_active(!pParent->mbIsSkipEmptyPages);
723
724 mxCbAddStream->show();
725 mxCbAddStream->set_active(pParent->mbAddStream);
726
727 mxCbAddStream->connect_toggled(LINK(this, ImpPDFTabGeneralPage, ToggleAddStreamHdl));
728 ToggleAddStreamHdl(*mxCbAddStream); // init addstream dependencies
729}
730
732{
733 // updating the FilterData sequence and storing FilterData to configuration
734 pParent->mbUseLosslessCompression = mxRbLosslessCompression->get_active();
735 pParent->mnQuality = static_cast<sal_Int32>(mxNfQuality->get_value(FieldUnit::PERCENT));
736 pParent->mbReduceImageResolution = mxCbReduceImageResolution->get_active();
737 pParent->mnMaxImageResolution = mxCoReduceImageResolution->get_active_text().toInt32();
738 pParent->mbExportNotes = mxCbExportNotes->get_active();
739 if (mbIsWriter)
740 pParent->mbExportNotesInMargin = mxCbExportNotesInMargin->get_active();
741 pParent->mbViewPDF = mxCbViewPDF->get_active();
742 pParent->mbUseReferenceXObject = mxCbUseReferenceXObject->get_active();
743 if ( mbIsPresentation )
744 {
745 pParent->mbExportNotesPages = mxCbExportNotesPages->get_active();
746 pParent->mbExportOnlyNotesPages = mxCbExportOnlyNotesPages->get_active();
747 }
748 pParent->mbExportBookmarks = mxCbExportBookmarks->get_active();
749 if ( mbIsPresentation )
750 pParent->mbExportHiddenSlides = mxCbExportHiddenSlides->get_active();
751
752 if (mbIsSpreadsheet)
753 pParent->mbSinglePageSheets = mxCbSinglePageSheets->get_active();
754
755 pParent->mbIsSkipEmptyPages = !mxCbExportEmptyPages->get_active();
756 pParent->mbIsExportPlaceholders = mxCbExportPlaceholders->get_active();
757 pParent->mbAddStream = mxCbAddStream->get_visible() && mxCbAddStream->get_active();
758
759 pParent->mbIsRangeChecked = false;
760 if( mxRbRange->get_active() )
761 {
762 pParent->mbIsRangeChecked = true;
763 pParent->msPageRange = mxEdPages->get_text(); //FIXME all right on other languages ?
764 }
765 else if( mxRbSelection->get_active() )
766 {
767 pParent->mbSelectionIsChecked = mxRbSelection->get_active();
768 }
769
770 pParent->mnPDFTypeSelection = 0;
771 pParent->mbUseTaggedPDF = mxCbTaggedPDF->get_active();
772
773 const bool bIsPDFA = mxCbPDFA->get_active();
774 const bool bIsPDFUA = mxCbPDFUA->get_active();
775
776 if (bIsPDFA)
777 {
778 pParent->mnPDFTypeSelection = 3;
779 OUString currentPDFAMode = mxRbPDFAVersion->get_active_id();
780 if( currentPDFAMode == "1" )
781 pParent->mnPDFTypeSelection = 1;
782 else if(currentPDFAMode == "2")
783 pParent->mnPDFTypeSelection = 2;
784 }
785
786 pParent->mbPDFUACompliance = bIsPDFUA;
787
788 if (!bIsPDFA && !bIsPDFUA)
790 if (!bIsPDFUA)
791 {
794 }
795
797 pParent->mbExportFormFields = mxCbExportFormFields->get_active();
798
799 if( mxCbWatermark->get_active() )
800 pParent->maWatermarkText = mxEdWatermark->get_text();
801
802 /*
803 * FIXME: the entries are only implicitly defined by the resource file. Should there
804 * ever be an additional form submit format this could get invalid.
805 */
806 pParent->mnFormsType = mxLbFormsFormat->get_active();
808}
809
810std::unique_ptr<SfxTabPage> ImpPDFTabGeneralPage::Create( weld::Container* pPage, weld::DialogController* pController,
811 const SfxItemSet* rAttrSet)
812{
813 return std::make_unique<ImpPDFTabGeneralPage>(pPage, pController, *rAttrSet);
814}
815
817{
818 EnableExportNotesPages();
819}
820
822{
823 TogglePagesHdl();
824 EnableExportNotesPages();
825}
826
828{
829 EnableExportNotesPages();
830}
831
833{
834 mxEdPages->set_sensitive( mxRbRange->get_active() );
835 if (mxRbRange->get_active())
836 mxEdPages->grab_focus();
837}
838
840{
841 if ( mbIsPresentation )
842 {
843 mxCbExportNotesPages->set_sensitive( !mxRbSelection->get_active() );
844 mxCbExportOnlyNotesPages->set_sensitive( !mxRbSelection->get_active() && mxCbExportNotesPages->get_active() );
845 }
846}
847
848IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportFormFieldsHdl, weld::Toggleable&, void)
849{
850 mxFormsFrame->set_sensitive(mxCbExportFormFields->get_active());
851}
852
853IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleExportNotesPagesHdl, weld::Toggleable&, void)
854{
855 mxCbExportOnlyNotesPages->set_sensitive(mxCbExportNotesPages->get_active());
856}
857
859{
860 mxQualityFrame->set_sensitive(mxRbJPEGCompression->get_active());
861}
862
863IMPL_LINK_NOARG(ImpPDFTabGeneralPage, ToggleReduceImageResolutionHdl, weld::Toggleable&, void)
864{
865 mxCoReduceImageResolution->set_sensitive(mxCbReduceImageResolution->get_active());
866}
867
869{
870 mxEdWatermark->set_sensitive(mxCbWatermark->get_active());
871 mxFtWatermark->set_sensitive(mxCbWatermark->get_active());
872 if (mxCbWatermark->get_active())
873 mxEdWatermark->grab_focus();
874}
875
877{
878 if (!mxCbAddStream->get_visible())
879 return;
880
881 if( mxCbAddStream->get_active() )
882 {
883 mxRbAll->set_active(true);
884 mxRbRange->set_sensitive( false );
885 mxRbSelection->set_sensitive( false );
886 mxEdPages->set_sensitive( false );
887 mxRbAll->set_sensitive( false );
888 }
889 else
890 {
891 mxRbAll->set_sensitive(true);
892 mxRbRange->set_sensitive(true);
893 mxRbSelection->set_sensitive(true);
894 }
895}
896
897IMPL_LINK_NOARG(ImpPDFTabGeneralPage, TogglePDFVersionOrUniversalAccessibilityHandle, weld::Toggleable&, void)
898{
899 const bool bIsPDFA = mxCbPDFA->get_active();
900 const bool bIsPDFUA = mxCbPDFUA->get_active();
901
902 // set the security page status (and its controls as well)
903 ImpPDFTabSecurityPage* pSecPage = mpParent ? mpParent->getSecurityPage() : nullptr;
904 if (pSecPage)
905 pSecPage->ImplPDFASecurityControl(!bIsPDFA);
906
907 mxCbTaggedPDF->set_sensitive(!bIsPDFA && !bIsPDFUA);
908 mxRbPDFAVersion->set_sensitive(bIsPDFA);
909
910 if (bIsPDFA || bIsPDFUA)
911 {
912 // store the users selection of subordinate controls and set required PDF/A values
913 mbUseTaggedPDFUserSelection = mxCbTaggedPDF->get_active();
914 mxCbTaggedPDF->set_active(true);
915
916 // if a password was set, inform the user that this will not be used
917 if (bIsPDFA && pSecPage && pSecPage->hasPassword())
918 {
919 mxPasswordUnusedWarnDialog =
920 std::shared_ptr<weld::MessageDialog>(Application::CreateMessageDialog(m_xContainer.get(),
921 VclMessageType::Warning, VclButtonsType::Ok,
922 FilterResId(STR_WARN_PASSWORD_PDFA)));
923 mxPasswordUnusedWarnDialog->runAsync(mxPasswordUnusedWarnDialog, [] (sal_uInt32){ });
924 }
925 }
926 else
927 {
928 // restore the users values of subordinate controls
929 mxCbTaggedPDF->set_active(mbUseTaggedPDFUserSelection);
930 }
931
932 if (bIsPDFUA)
933 {
934 if (mxCbExportBookmarks->get_sensitive())
935 {
936 if (mpParent)
937 {
938 mpParent->mbExportBookmarksUserSelection = mxCbExportBookmarks->get_active();
939 }
940 mxCbExportBookmarks->set_active(true);
941 }
942 if (mxCbUseReferenceXObject->get_sensitive())
943 {
944 if (mpParent)
945 {
946 mpParent->mbUseReferenceXObjectUserSelection = mxCbUseReferenceXObject->get_active();
947 }
948 mxCbUseReferenceXObject->set_active(false);
949 }
950 }
951 else if (mpParent)
952 {
953 mxCbExportBookmarks->set_active(mpParent->mbExportBookmarksUserSelection);
954 mxCbUseReferenceXObject->set_active(mpParent->mbUseReferenceXObjectUserSelection);
955 }
956 mxCbExportBookmarks->set_sensitive(!bIsPDFUA);
957 mxCbUseReferenceXObject->set_sensitive(!bIsPDFUA);
958
959 ImpPDFTabOpnFtrPage *const pOpenPage(mpParent ? mpParent->getOpenPage() : nullptr);
960 if (pOpenPage)
961 {
962 pOpenPage->ToggleInitialView(*mpParent);
963 }
964
965 // PDF/A doesn't allow launch action, so enable/disable the selection on the Link page
966 ImpPDFTabLinksPage* pLinksPage = mpParent ? mpParent->getLinksPage() : nullptr;
967 if (pLinksPage)
968 pLinksPage->ImplPDFALinkControl(!bIsPDFA);
969}
970
973 : SfxTabPage(pPage, pController, "filter/ui/pdfviewpage.ui", "PdfViewPage", &rCoreSet)
974 , mbUseCTLFont(false)
975 , mxRbOpnPageOnly(m_xBuilder->weld_radio_button("pageonly"))
976 , mxRbOpnOutline(m_xBuilder->weld_radio_button("outline"))
977 , mxRbOpnThumbs(m_xBuilder->weld_radio_button("thumbs"))
978 , mxNumInitialPage(m_xBuilder->weld_spin_button("page"))
979 , mxRbMagnDefault(m_xBuilder->weld_radio_button("fitdefault"))
980 , mxRbMagnFitWin(m_xBuilder->weld_radio_button("fitwin"))
981 , mxRbMagnFitWidth(m_xBuilder->weld_radio_button("fitwidth"))
982 , mxRbMagnFitVisible(m_xBuilder->weld_radio_button("fitvis"))
983 , mxRbMagnZoom(m_xBuilder->weld_radio_button("fitzoom"))
984 , mxNumZoom(m_xBuilder->weld_spin_button("zoom"))
985 , mxRbPgLyDefault(m_xBuilder->weld_radio_button("defaultlayout"))
986 , mxRbPgLySinglePage(m_xBuilder->weld_radio_button("singlelayout"))
987 , mxRbPgLyContinue(m_xBuilder->weld_radio_button("contlayout"))
988 , mxRbPgLyContinueFacing(m_xBuilder->weld_radio_button("contfacinglayout"))
989 , mxCbPgLyFirstOnLeft(m_xBuilder->weld_check_button("firstonleft"))
990{
991 mxRbMagnDefault->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
992 mxRbMagnFitWin->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
993 mxRbMagnFitWidth->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
994 mxRbMagnFitVisible->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
995 mxRbMagnZoom->connect_toggled( LINK( this, ImpPDFTabOpnFtrPage, ToggleRbMagnHdl ) );
996}
997
999{
1000}
1001
1002std::unique_ptr<SfxTabPage> ImpPDFTabOpnFtrPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
1003{
1004 return std::make_unique<ImpPDFTabOpnFtrPage>(pPage, pController, *rAttrSet);
1005}
1006
1008{
1009 pParent->mnInitialView = 0;
1010 if( mxRbOpnOutline->get_active() )
1011 pParent->mnInitialView = 1;
1012 else if( mxRbOpnThumbs->get_active() )
1013 pParent->mnInitialView = 2;
1014 if (!pParent->mbPDFUACompliance)
1015 {
1016 pParent->mnInitialViewUserSelection = pParent->mnInitialView;
1017 }
1018
1019 pParent->mnMagnification = 0;
1020 if( mxRbMagnFitWin->get_active() )
1021 pParent->mnMagnification = 1;
1022 else if( mxRbMagnFitWidth->get_active() )
1023 pParent->mnMagnification = 2;
1024 else if( mxRbMagnFitVisible->get_active() )
1025 pParent->mnMagnification = 3;
1026 else if( mxRbMagnZoom->get_active() )
1027 {
1028 pParent->mnMagnification = 4;
1029 pParent->mnZoom = mxNumZoom->get_value();
1030 }
1031
1032 pParent->mnInitialPage = mxNumInitialPage->get_value();
1033
1034 pParent->mnPageLayout = 0;
1035 if( mxRbPgLySinglePage->get_active() )
1036 pParent->mnPageLayout = 1;
1037 else if( mxRbPgLyContinue->get_active() )
1038 pParent->mnPageLayout = 2;
1039 else if( mxRbPgLyContinueFacing->get_active() )
1040 pParent->mnPageLayout = 3;
1041
1042 pParent->mbFirstPageLeft = mbUseCTLFont && mxCbPgLyFirstOnLeft->get_active();
1043}
1044
1046{
1047 mbUseCTLFont = pParent->mbUseCTLFont;
1048 switch( pParent->mnPageLayout )
1049 {
1050 default:
1051 case 0:
1052 mxRbPgLyDefault->set_active(true);
1053 break;
1054 case 1:
1055 mxRbPgLySinglePage->set_active(true);
1056 break;
1057 case 2:
1058 mxRbPgLyContinue->set_active(true);
1059 break;
1060 case 3:
1061 mxRbPgLyContinueFacing->set_active(true);
1062 break;
1063 }
1064
1065 switch( pParent->mnInitialView )
1066 {
1067 default:
1068 case 0:
1069 mxRbOpnPageOnly->set_active(true);
1070 break;
1071 case 1:
1072 mxRbOpnOutline->set_active(true);
1073 break;
1074 case 2:
1075 mxRbOpnThumbs->set_active(true);
1076 break;
1077 }
1078
1079 switch( pParent->mnMagnification )
1080 {
1081 default:
1082 case 0:
1083 mxRbMagnDefault->set_active(true);
1084 mxNumZoom->set_sensitive(false);
1085 break;
1086 case 1:
1087 mxRbMagnFitWin->set_active(true);
1088 mxNumZoom->set_sensitive(false);
1089 break;
1090 case 2:
1091 mxRbMagnFitWidth->set_active(true);
1092 mxNumZoom->set_sensitive(false);
1093 break;
1094 case 3:
1095 mxRbMagnFitVisible->set_active(true);
1096 mxNumZoom->set_sensitive(false);
1097 break;
1098 case 4:
1099 mxRbMagnZoom->set_active(true);
1100 mxNumZoom->set_sensitive(true);
1101 break;
1102 }
1103
1104 mxNumZoom->set_value(pParent->mnZoom);
1105 mxNumInitialPage->set_value(pParent->mnInitialPage);
1106
1107 if (!mbUseCTLFont)
1108 mxCbPgLyFirstOnLeft->hide();
1109 else
1110 {
1112 mxCbPgLyFirstOnLeft->set_active(pParent->mbFirstPageLeft);
1114 }
1115
1116 // The call from ImpPDFTabGeneralPage::SetFilterConfigItem() did not init
1117 // the radio buttons correctly because ImpPDFTabOpnFtrPage did not yet exist.
1118 ToggleInitialView(*pParent);
1119}
1120
1122{
1123 bool const bIsPDFUA(rParent.getGeneralPage()->IsPdfUaSelected());
1124 if (bIsPDFUA)
1125 { // only allow Outline for PDF/UA
1126 if (mxRbOpnOutline->get_sensitive())
1127 {
1128 if (mxRbOpnPageOnly->get_active())
1129 {
1130 rParent.mnInitialViewUserSelection = 0;
1131 }
1132 else if (mxRbOpnOutline->get_active())
1133 {
1134 rParent.mnInitialViewUserSelection = 1;
1135 }
1136 else if (mxRbOpnThumbs->get_active())
1137 {
1138 rParent.mnInitialViewUserSelection = 2;
1139 }
1140 mxRbOpnOutline->set_active(true);
1141 }
1142 }
1143 else
1144 {
1145 switch (rParent.mnInitialViewUserSelection)
1146 {
1147 case 0:
1148 mxRbOpnPageOnly->set_active(true);
1149 break;
1150 case 1:
1151 mxRbOpnOutline->set_active(true);
1152 break;
1153 case 2:
1154 mxRbOpnThumbs->set_active(true);
1155 break;
1156 }
1157 }
1158 mxRbOpnPageOnly->set_sensitive(!bIsPDFUA);
1159 mxRbOpnThumbs->set_sensitive(!bIsPDFUA);
1160 mxRbOpnOutline->set_sensitive(!bIsPDFUA);
1161}
1162
1163IMPL_LINK_NOARG(ImpPDFTabOpnFtrPage, ToggleRbPgLyContinueFacingHdl, weld::Toggleable&, void)
1164{
1165 ToggleRbPgLyContinueFacingHdl();
1166}
1167
1169{
1170 mxCbPgLyFirstOnLeft->set_sensitive(mxRbPgLyContinueFacing->get_active());
1171}
1172
1174{
1175 mxNumZoom->set_sensitive(mxRbMagnZoom->get_active());
1176}
1177
1180 : SfxTabPage(pPage, pController, "filter/ui/pdfuserinterfacepage.ui", "PdfUserInterfacePage", &rCoreSet)
1181 , mbIsPresentation(false)
1182 , m_xCbResWinInit(m_xBuilder->weld_check_button("resize"))
1183 , m_xCbCenterWindow(m_xBuilder->weld_check_button("center"))
1184 , m_xCbOpenFullScreen(m_xBuilder->weld_check_button("open"))
1185 , m_xCbDispDocTitle(m_xBuilder->weld_check_button("display"))
1186 , m_xCbHideViewerMenubar(m_xBuilder->weld_check_button("menubar"))
1187 , m_xCbHideViewerToolbar(m_xBuilder->weld_check_button("toolbar"))
1188 , m_xCbHideViewerWindowControls(m_xBuilder->weld_check_button("window"))
1189 , m_xCbTransitionEffects(m_xBuilder->weld_check_button("effects"))
1190 , m_xRbAllBookmarkLevels(m_xBuilder->weld_radio_button("allbookmarks"))
1191 , m_xRbVisibleBookmarkLevels(m_xBuilder->weld_radio_button("visiblebookmark"))
1192 , m_xNumBookmarkLevels(m_xBuilder->weld_spin_button("visiblelevel"))
1193{
1194 m_xRbAllBookmarkLevels->connect_toggled(LINK(this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl));
1195 m_xRbVisibleBookmarkLevels->connect_toggled(LINK(this, ImpPDFTabViewerPage, ToggleRbBookmarksHdl));
1196}
1197
1199{
1200}
1201
1203{
1204 m_xNumBookmarkLevels->set_sensitive(m_xRbVisibleBookmarkLevels->get_active());
1205}
1206
1207std::unique_ptr<SfxTabPage> ImpPDFTabViewerPage::Create( weld::Container* pPage, weld::DialogController* pController,
1208 const SfxItemSet* rAttrSet)
1209{
1210 return std::make_unique<ImpPDFTabViewerPage>(pPage, pController, *rAttrSet);
1211}
1212
1214{
1215 pParent->mbHideViewerMenubar = m_xCbHideViewerMenubar->get_active();
1216 pParent->mbHideViewerToolbar = m_xCbHideViewerToolbar->get_active();
1218 pParent->mbResizeWinToInit = m_xCbResWinInit->get_active();
1219 pParent->mbOpenInFullScreenMode = m_xCbOpenFullScreen->get_active();
1220 pParent->mbCenterWindow = m_xCbCenterWindow->get_active();
1221 pParent->mbDisplayPDFDocumentTitle = m_xCbDispDocTitle->get_active();
1222 pParent->mbUseTransitionEffects = m_xCbTransitionEffects->get_active();
1223 pParent->mnOpenBookmarkLevels = m_xRbAllBookmarkLevels->get_active() ?
1224 -1 : static_cast<sal_Int32>(m_xNumBookmarkLevels->get_value());
1225}
1226
1228{
1229 m_xCbHideViewerMenubar->set_active( pParent->mbHideViewerMenubar );
1230 m_xCbHideViewerToolbar->set_active( pParent->mbHideViewerToolbar );
1232
1233 m_xCbResWinInit->set_active( pParent->mbResizeWinToInit );
1234 m_xCbOpenFullScreen->set_active( pParent->mbOpenInFullScreenMode );
1235 m_xCbCenterWindow->set_active( pParent->mbCenterWindow );
1236 m_xCbDispDocTitle->set_active( pParent->mbDisplayPDFDocumentTitle );
1238 m_xCbTransitionEffects->set_active( pParent->mbUseTransitionEffects );
1239 m_xCbTransitionEffects->set_sensitive( mbIsPresentation );
1240 if( pParent->mnOpenBookmarkLevels < 0 )
1241 {
1242 m_xRbAllBookmarkLevels->set_active(true);
1243 m_xNumBookmarkLevels->set_sensitive( false );
1244 }
1245 else
1246 {
1247 m_xRbVisibleBookmarkLevels->set_active(true);
1248 m_xNumBookmarkLevels->set_sensitive(true);
1249 m_xNumBookmarkLevels->set_value(pParent->mnOpenBookmarkLevels);
1250 }
1251}
1252
1255 : SfxTabPage(pPage, pController, "filter/ui/pdfsecuritypage.ui", "PdfSecurityPage", &i_rCoreSet)
1256 , msUserPwdTitle( FilterResId( STR_PDF_EXPORT_UDPWD ) )
1257 , mbHaveOwnerPassword( false )
1258 , mbHaveUserPassword( false )
1259 , msOwnerPwdTitle( FilterResId( STR_PDF_EXPORT_ODPWD ) )
1260 , mxPbSetPwd(m_xBuilder->weld_button("setpassword"))
1261 , mxUserPwdSet(m_xBuilder->weld_widget("userpwdset"))
1262 , mxUserPwdUnset(m_xBuilder->weld_widget("userpwdunset"))
1263 , mxUserPwdPdfa(m_xBuilder->weld_widget("userpwdpdfa"))
1264 , mxOwnerPwdSet(m_xBuilder->weld_widget("ownerpwdset"))
1265 , mxOwnerPwdUnset(m_xBuilder->weld_widget("ownerpwdunset"))
1266 , mxOwnerPwdPdfa(m_xBuilder->weld_widget("ownerpwdpdfa"))
1267 , mxPrintPermissions(m_xBuilder->weld_widget("printing"))
1268 , mxRbPrintNone(m_xBuilder->weld_radio_button("printnone"))
1269 , mxRbPrintLowRes(m_xBuilder->weld_radio_button("printlow"))
1270 , mxRbPrintHighRes(m_xBuilder->weld_radio_button("printhigh"))
1271 , mxChangesAllowed(m_xBuilder->weld_widget("changes"))
1272 , mxRbChangesNone(m_xBuilder->weld_radio_button("changenone"))
1273 , mxRbChangesInsDel(m_xBuilder->weld_radio_button("changeinsdel"))
1274 , mxRbChangesFillForm(m_xBuilder->weld_radio_button("changeform"))
1275 , mxRbChangesComment(m_xBuilder->weld_radio_button("changecomment"))
1276 , mxRbChangesAnyNoCopy(m_xBuilder->weld_radio_button("changeany"))
1277 , mxContent(m_xBuilder->weld_widget("content"))
1278 , mxCbEnableCopy(m_xBuilder->weld_check_button("enablecopy"))
1279 , mxCbEnableAccessibility(m_xBuilder->weld_check_button("enablea11y"))
1280 , mxPasswordTitle(m_xBuilder->weld_label("setpasswordstitle"))
1281{
1282 msStrSetPwd = mxPasswordTitle->get_label();
1283 mxPbSetPwd->connect_clicked(LINK(this, ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl));
1284}
1285
1287{
1288 if (mpPasswordDialog)
1289 mpPasswordDialog->response(RET_CANCEL);
1292}
1293
1294std::unique_ptr<SfxTabPage> ImpPDFTabSecurityPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
1295{
1296 return std::make_unique<ImpPDFTabSecurityPage>(pPage, pController, *rAttrSet);
1297}
1298
1300{
1301 // please note that in PDF/A-1a mode even if this are copied back,
1302 // the security settings are forced disabled in PDFExport::Export
1303 pParent->mbEncrypt = mbHaveUserPassword;
1305
1308
1309 // verify print status
1310 pParent->mnPrint = 0;
1311 if (mxRbPrintLowRes->get_active())
1312 pParent->mnPrint = 1;
1313 else if (mxRbPrintHighRes->get_active())
1314 pParent->mnPrint = 2;
1315
1316 // verify changes permitted
1317 pParent->mnChangesAllowed = 0;
1318
1319 if( mxRbChangesInsDel->get_active() )
1320 pParent->mnChangesAllowed = 1;
1321 else if( mxRbChangesFillForm->get_active() )
1322 pParent->mnChangesAllowed = 2;
1323 else if( mxRbChangesComment->get_active() )
1324 pParent->mnChangesAllowed = 3;
1325 else if( mxRbChangesAnyNoCopy->get_active() )
1326 pParent->mnChangesAllowed = 4;
1327
1328 pParent->mbCanCopyOrExtract = mxCbEnableCopy->get_active();
1330}
1331
1333{
1334 switch( pParent->mnPrint )
1335 {
1336 default:
1337 case 0:
1338 mxRbPrintNone->set_active(true);
1339 break;
1340 case 1:
1341 mxRbPrintLowRes->set_active(true);
1342 break;
1343 case 2:
1344 mxRbPrintHighRes->set_active(true);
1345 break;
1346 }
1347
1348 switch( pParent->mnChangesAllowed )
1349 {
1350 default:
1351 case 0:
1352 mxRbChangesNone->set_active(true);
1353 break;
1354 case 1:
1355 mxRbChangesInsDel->set_active(true);
1356 break;
1357 case 2:
1358 mxRbChangesFillForm->set_active(true);
1359 break;
1360 case 3:
1361 mxRbChangesComment->set_active(true);
1362 break;
1363 case 4:
1364 mxRbChangesAnyNoCopy->set_active(true);
1365 break;
1366 }
1367
1368 mxCbEnableCopy->set_active(pParent->mbCanCopyOrExtract);
1370
1371 // set the status of this windows, according to the PDFA selection
1373
1374 ImpPDFTabGeneralPage* pGeneralPage = pParent->getGeneralPage();
1375
1376 if (pGeneralPage)
1377 ImplPDFASecurityControl(!pGeneralPage->IsPdfaSelected());
1378}
1379
1381{
1382 if(mpPasswordDialog)
1383 mpPasswordDialog->response(RET_CANCEL);
1384
1385 mpPasswordDialog = std::make_shared<SfxPasswordDialog>(m_xContainer.get(), &msUserPwdTitle);
1386
1387 mpPasswordDialog->SetMinLen(0);
1388 mpPasswordDialog->ShowMinLengthText(false);
1389 mpPasswordDialog->ShowExtras( SfxShowExtras::CONFIRM | SfxShowExtras::PASSWORD2 | SfxShowExtras::CONFIRM2 );
1390 mpPasswordDialog->set_title(msStrSetPwd);
1391 mpPasswordDialog->SetGroup2Text(msOwnerPwdTitle);
1392 mpPasswordDialog->AllowAsciiOnly();
1393
1394 mpPasswordDialog->PreRun();
1395
1396 weld::DialogController::runAsync(mpPasswordDialog, [this](sal_Int32 response){
1397 if (response == RET_OK)
1398 {
1399 OUString aUserPW(mpPasswordDialog->GetPassword());
1400 OUString aOwnerPW(mpPasswordDialog->GetPassword2());
1401
1402 mbHaveUserPassword = !aUserPW.isEmpty();
1403 mbHaveOwnerPassword = !aOwnerPW.isEmpty();
1404
1405 mxPreparedPasswords = vcl::PDFWriter::InitEncryption( aOwnerPW, aUserPW );
1406 if (!mxPreparedPasswords.is())
1407 {
1408 OUString msg;
1409 ErrorHandler::GetErrorString(ERRCODE_IO_NOTSUPPORTED, msg); //TODO: handle failure
1410 mpUnsupportedMsgDialog = std::shared_ptr<weld::MessageDialog>(
1412 GetFrameWeld(), VclMessageType::Error, VclButtonsType::Ok, msg));
1413
1414 mpUnsupportedMsgDialog->runAsync(mpUnsupportedMsgDialog, [](sal_Int32){ });
1415 return;
1416 }
1417
1418 if( mbHaveOwnerPassword )
1419 maPreparedOwnerPassword = comphelper::OStorageHelper::CreatePackageEncryptionData( aOwnerPW );
1420 else
1421 maPreparedOwnerPassword = Sequence< NamedValue >();
1422 }
1423 if (response != RET_CANCEL)
1424 enablePermissionControls();
1425 mpPasswordDialog.reset();
1426 });
1427}
1428
1430{
1431 bool bIsPDFASel = false;
1432 bool bIsPDFUASel = false;
1433 ImpPDFTabDialog* pParent = static_cast<ImpPDFTabDialog*>(GetDialogController());
1434 ImpPDFTabGeneralPage* pGeneralPage = pParent ? pParent->getGeneralPage() : nullptr;
1435 if (pGeneralPage)
1436 {
1437 bIsPDFASel = pGeneralPage->IsPdfaSelected();
1438 bIsPDFUASel = pGeneralPage->IsPdfUaSelected();
1439 }
1440 // ISO 14289-1:2014, Clause: 7.16
1441 if (bIsPDFUASel)
1442 {
1443 mxCbEnableAccessibility->set_active(true);
1444 }
1445 mxCbEnableAccessibility->set_sensitive(!bIsPDFUASel);
1446 if (bIsPDFASel)
1447 {
1448 mxUserPwdPdfa->show();
1449 mxUserPwdSet->hide();
1450 mxUserPwdUnset->hide();
1451 }
1452 else
1453 {
1454 if (mbHaveUserPassword && m_xContainer->get_sensitive())
1455 {
1456 mxUserPwdSet->show();
1457 mxUserPwdUnset->hide();
1458 mxUserPwdPdfa->hide();
1459 }
1460 else
1461 {
1462 mxUserPwdUnset->show();
1463 mxUserPwdSet->hide();
1464 mxUserPwdPdfa->hide();
1465 }
1466 }
1467
1468 bool bLocalEnable = mbHaveOwnerPassword && m_xContainer->get_sensitive();
1469 if (bIsPDFASel)
1470 {
1471 mxOwnerPwdPdfa->show();
1472 mxOwnerPwdSet->hide();
1473 mxOwnerPwdUnset->hide();
1474 }
1475 else
1476 {
1477 if (bLocalEnable)
1478 {
1479 mxOwnerPwdSet->show();
1480 mxOwnerPwdUnset->hide();
1481 mxOwnerPwdPdfa->hide();
1482 }
1483 else
1484 {
1485 mxOwnerPwdUnset->show();
1486 mxOwnerPwdSet->hide();
1487 mxOwnerPwdPdfa->hide();
1488 }
1489 }
1490
1491 mxPrintPermissions->set_sensitive(bLocalEnable);
1492 mxChangesAllowed->set_sensitive(bLocalEnable);
1493 mxContent->set_sensitive(bLocalEnable);
1494}
1495
1496// This tab page is under control of the PDF/A-1a checkbox:
1497// TODO: implement a method to do it.
1499{
1500 m_xContainer->set_sensitive(bEnableSecurity);
1501 // after enable, check the status of control as if the dialog was initialized
1503}
1504
1507 : SfxTabPage(pPage, pController, "filter/ui/pdflinkspage.ui", "PdfLinksPage", &rCoreSet)
1508 , mbOpnLnksDefaultUserState(false)
1509 , mbOpnLnksLaunchUserState(false)
1510 , mbOpnLnksBrowserUserState(false)
1511 , m_xCbExprtBmkrToNmDst(m_xBuilder->weld_check_button("export"))
1512 , m_xCbOOoToPDFTargets(m_xBuilder->weld_check_button("convert"))
1513 , m_xCbExportRelativeFsysLinks(m_xBuilder->weld_check_button("exporturl"))
1514 , m_xRbOpnLnksDefault(m_xBuilder->weld_radio_button("default"))
1515 , m_xRbOpnLnksLaunch(m_xBuilder->weld_radio_button("openpdf"))
1516 , m_xRbOpnLnksBrowser(m_xBuilder->weld_radio_button("openinternet"))
1517{
1518}
1519
1521{
1522}
1523
1524std::unique_ptr<SfxTabPage> ImpPDFTabLinksPage::Create(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet* rAttrSet)
1525{
1526 return std::make_unique<ImpPDFTabLinksPage>(pPage, pController, *rAttrSet);
1527}
1528
1530{
1532
1533 bool bIsPDFASel = false;
1534 ImpPDFTabGeneralPage* pGeneralPage = pParent->getGeneralPage();
1535 if (pGeneralPage)
1536 bIsPDFASel = pGeneralPage->IsPdfaSelected();
1537 // if PDF/A-1 was not selected while exiting dialog...
1538 if( !bIsPDFASel )
1539 {
1540 // ...get the control states
1544 }
1545 // the control states, or the saved is used
1546 // to form the stored selection
1547 pParent->mnViewPDFMode = 0;
1549 pParent->mnViewPDFMode = 2;
1550 else if( mbOpnLnksLaunchUserState )
1551 pParent->mnViewPDFMode = 1;
1552
1553 pParent->mbConvertOOoTargets = m_xCbOOoToPDFTargets->get_active();
1554 pParent->mbExportBmkToPDFDestination = m_xCbExprtBmkrToNmDst->get_active();
1555}
1556
1558{
1559 m_xCbOOoToPDFTargets->set_active(pParent->mbConvertOOoTargets);
1561
1562 m_xRbOpnLnksDefault->connect_toggled(LINK(this, ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl));
1563 m_xRbOpnLnksBrowser->connect_toggled(LINK(this, ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl));
1564
1566 switch( pParent->mnViewPDFMode )
1567 {
1568 default:
1569 case 0:
1570 m_xRbOpnLnksDefault->set_active(true);
1572 break;
1573 case 1:
1574 m_xRbOpnLnksLaunch->set_active(true);
1576 break;
1577 case 2:
1578 m_xRbOpnLnksBrowser->set_active(true);
1580 break;
1581 }
1582
1583 // now check the status of PDF/A selection
1584 // and set the link action accordingly
1585 // PDF/A-2 doesn't allow launch action on links
1586
1587 ImpPDFTabGeneralPage* pGeneralPage = pParent->getGeneralPage();
1588 if (pGeneralPage)
1589 ImplPDFALinkControl(!pGeneralPage->mxCbPDFA->get_active());
1590}
1591
1592
1597{
1598 // set the value and position of link type selection
1599 if( bEnableLaunch )
1600 {
1601 m_xRbOpnLnksLaunch->set_sensitive(true);
1602 // restore user state with no PDF/A-1 selected
1606 }
1607 else
1608 {
1609 // save user state with no PDF/A-1 selected
1613 m_xRbOpnLnksLaunch->set_sensitive(false);
1615 m_xRbOpnLnksBrowser->set_active(true);
1616 }
1617}
1618
1620IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksDefaultHdl, weld::Toggleable&, void)
1621{
1622 mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
1623 mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
1624 mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
1625}
1626
1628IMPL_LINK_NOARG(ImpPDFTabLinksPage, ClickRbOpnLnksBrowserHdl, weld::Toggleable&, void)
1629{
1630 mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
1631 mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
1632 mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
1633}
1634
1635ImplErrorDialog::ImplErrorDialog(weld::Window* pParent, const std::set<vcl::PDFWriter::ErrorCode>& rErrors)
1636 : MessageDialogController(pParent, "filter/ui/warnpdfdialog.ui", "WarnPDFDialog", "grid")
1637 , m_xErrors(m_xBuilder->weld_tree_view("errors"))
1638 , m_xExplanation(m_xBuilder->weld_label("message"))
1639{
1640 int nWidth = m_xErrors->get_approximate_digit_width() * 26;
1641 int nHeight = m_xErrors->get_height_rows(9);
1642 m_xErrors->set_size_request(nWidth, nHeight);
1643 m_xExplanation->set_size_request(nWidth, nHeight);
1644
1645 for (auto const& error : rErrors)
1646 {
1647 switch(error)
1648 {
1650 m_xErrors->append(FilterResId(STR_WARN_TRANSP_PDFA), FilterResId(STR_WARN_TRANSP_PDFA_SHORT), "dialog-warning");
1651 break;
1653 m_xErrors->append(FilterResId(STR_WARN_TRANSP_VERSION), FilterResId(STR_WARN_TRANSP_VERSION_SHORT), "dialog-warning");
1654 break;
1656 m_xErrors->append(FilterResId(STR_WARN_FORMACTION_PDFA), FilterResId(STR_WARN_FORMACTION_PDFA_SHORT), "dialog-warning");
1657 break;
1659 m_xErrors->append(FilterResId(STR_WARN_TRANSP_CONVERTED), FilterResId(STR_WARN_TRANSP_CONVERTED_SHORT), "dialog-warning");
1660 break;
1662 m_xErrors->append(FilterResId(STR_ERR_PDF_EXPORT_ABORTED), FilterResId(STR_ERR_SIGNATURE_FAILED), "dialog-error");
1663 break;
1664 default:
1665 break;
1666 }
1667 }
1668
1669 if (m_xErrors->n_children() > 0)
1670 {
1671 m_xErrors->select(0);
1672 m_xExplanation->set_label(m_xErrors->get_id(0));
1673 }
1674
1675 m_xErrors->connect_changed(LINK(this, ImplErrorDialog, SelectHdl));
1676}
1677
1679{
1680 OUString aExplanation = m_xErrors->get_selected_id();
1681 m_xExplanation->set_label(aExplanation);
1682}
1683
1686 : SfxTabPage(pPage, pController, "filter/ui/pdfsignpage.ui", "PdfSignPage", &rCoreSet)
1687 , mxEdSignCert(m_xBuilder->weld_entry("cert"))
1688 , mxPbSignCertSelect(m_xBuilder->weld_button("select"))
1689 , mxPbSignCertClear(m_xBuilder->weld_button("clear"))
1690 , mxEdSignPassword(m_xBuilder->weld_entry("password"))
1691 , mxEdSignLocation(m_xBuilder->weld_entry("location"))
1692 , mxEdSignContactInfo(m_xBuilder->weld_entry("contact"))
1693 , mxEdSignReason(m_xBuilder->weld_entry("reason"))
1694 , mxLBSignTSA(m_xBuilder->weld_combo_box("tsa"))
1695{
1696 mxPbSignCertSelect->set_sensitive(true);
1697 mxPbSignCertSelect->connect_clicked(LINK(this, ImpPDFTabSigningPage, ClickmaPbSignCertSelect));
1698 mxPbSignCertClear->connect_clicked(LINK(this, ImpPDFTabSigningPage, ClickmaPbSignCertClear));
1699}
1700
1702{
1703}
1704
1705IMPL_LINK_NOARG(ImpPDFTabSigningPage, ClickmaPbSignCertSelect, weld::Button&, void)
1706{
1707 Reference< security::XDocumentDigitalSignatures > xSigner(
1708 security::DocumentDigitalSignatures::createDefault(
1710 xSigner->setParentWindow(GetFrameWeld()->GetXWindow());
1711
1712 // The use may provide a description while choosing a certificate.
1713 OUString aDescription;
1714 maSignCertificate = xSigner->selectSigningCertificateWithType(
1715 security::CertificateKind::CertificateKind_X509, aDescription);
1716
1717 if (!maSignCertificate.is())
1718 return;
1719
1720 mxEdSignCert->set_text(maSignCertificate->getSubjectName());
1721 mxPbSignCertClear->set_sensitive(true);
1722 mxEdSignLocation->set_sensitive(true);
1723 mxEdSignPassword->set_sensitive(true);
1724 mxEdSignContactInfo->set_sensitive(true);
1725 mxEdSignReason->set_sensitive(true);
1726 mxEdSignReason->set_text(aDescription);
1727
1728 try
1729 {
1730 std::optional<css::uno::Sequence<OUString>> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
1731 if (aTSAURLs)
1732 {
1733 const css::uno::Sequence<OUString>& rTSAURLs = *aTSAURLs;
1734 for (auto const& elem : rTSAURLs)
1735 {
1736 mxLBSignTSA->append_text(elem);
1737 }
1738 }
1739 }
1740 catch (const uno::Exception &)
1741 {
1742 TOOLS_INFO_EXCEPTION("filter.pdf", "TSAURLsDialog::TSAURLsDialog()");
1743 }
1744
1745 // If more than only the "None" entry is there, enable the ListBox
1746 if (mxLBSignTSA->get_count() > 1)
1747 mxLBSignTSA->set_sensitive(true);
1748}
1749
1750IMPL_LINK_NOARG(ImpPDFTabSigningPage, ClickmaPbSignCertClear, weld::Button&, void)
1751{
1752 mxEdSignCert->set_text("");
1753 maSignCertificate.clear();
1754 mxPbSignCertClear->set_sensitive(false);
1755 mxEdSignLocation->set_sensitive(false);
1756 mxEdSignPassword->set_sensitive(false);
1757 mxEdSignContactInfo->set_sensitive(false);
1758 mxEdSignReason->set_sensitive(false);
1759 mxLBSignTSA->set_sensitive(false);
1760}
1761
1762std::unique_ptr<SfxTabPage> ImpPDFTabSigningPage::Create( weld::Container* pPage, weld::DialogController* pController,
1763 const SfxItemSet* rAttrSet)
1764{
1765 return std::make_unique<ImpPDFTabSigningPage>(pPage, pController, *rAttrSet);
1766}
1767
1769{
1770 pParent->mbSignPDF = maSignCertificate.is();
1772 pParent->msSignLocation = mxEdSignLocation->get_text();
1773 pParent->msSignPassword = mxEdSignPassword->get_text();
1774 pParent->msSignContact = mxEdSignContactInfo->get_text();
1775 pParent->msSignReason = mxEdSignReason->get_text();
1776 // Entry 0 is 'None'
1777 if (mxLBSignTSA->get_active() >= 1)
1778 pParent->msSignTSA = mxLBSignTSA->get_active_text();
1779}
1780
1782{
1783 mxEdSignLocation->set_sensitive(false);
1784 mxEdSignPassword->set_sensitive(false);
1785 mxEdSignContactInfo->set_sensitive(false);
1786 mxEdSignReason->set_sensitive(false);
1787 mxLBSignTSA->set_sensitive(false);
1788 mxPbSignCertClear->set_sensitive(false);
1789
1790 if (pParent->mbSignPDF)
1791 {
1792 mxEdSignPassword->set_text(pParent->msSignPassword);
1793 mxEdSignLocation->set_text(pParent->msSignLocation);
1794 mxEdSignContactInfo->set_text(pParent->msSignContact);
1795 mxEdSignReason->set_text(pParent->msSignReason);
1797 }
1798}
1799
1800/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Reference< XExecutableDialog > m_xDialog
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
static bool GetErrorString(ErrCode nId, OUString &rStr)
OUString ReadString(const OUString &rKey, const OUString &rDefault)
bool ReadBool(const OUString &rKey, bool bDefault)
void WriteBool(const OUString &rKey, bool bValue)
void WriteModifiedConfig()
void WriteInt32(const OUString &rKey, sal_Int32 nValue)
sal_Int32 ReadInt32(const OUString &rKey, sal_Int32 nDefault)
const css::uno::Sequence< css::beans::PropertyValue > & GetFilterData() const
Class tabbed dialog.
Definition: impdialog.hxx:60
bool mbUseTransitionEffects
Definition: impdialog.hxx:92
Sequence< PropertyValue > GetFilterData()
Definition: impdialog.cxx:417
bool mbExportOnlyNotesPages
Definition: impdialog.hxx:91
bool mbExportBookmarksUserSelection
Definition: impdialog.hxx:100
sal_Int32 mnChangesAllowed
Definition: impdialog.hxx:126
bool mbUseTaggedPDFUserSelection
Definition: impdialog.hxx:82
bool mbExportFormFields
Definition: impdialog.hxx:97
sal_Int32 mnMagnification
Definition: impdialog.hxx:112
OUString msSignContact
Definition: impdialog.hxx:143
sal_Int32 mnInitialPage
Definition: impdialog.hxx:116
bool mbOpenInFullScreenMode
Definition: impdialog.hxx:110
bool mbDisplayPDFDocumentTitle
Definition: impdialog.hxx:111
sal_Int32 mnInitialView
Definition: impdialog.hxx:113
bool mbSelectionIsChecked
Definition: impdialog.hxx:133
bool mbIsPresentation
Definition: impdialog.hxx:72
bool mbConvertOOoTargets
Definition: impdialog.hxx:137
OUString msSignTSA
Definition: impdialog.hxx:146
bool mbReduceImageResolution
Definition: impdialog.hxx:79
bool mbIsSpreadsheet
Definition: impdialog.hxx:73
sal_Int32 mnPageLayout
Definition: impdialog.hxx:118
bool mbExportBmkToPDFDestination
Definition: impdialog.hxx:138
OUString msSignReason
Definition: impdialog.hxx:144
bool mbHideViewerWindowControls
Definition: impdialog.hxx:107
sal_Int32 mnViewPDFMode
Definition: impdialog.hxx:136
sal_Int32 mnMaxImageResolution
Definition: impdialog.hxx:80
bool mbResizeWinToInit
Definition: impdialog.hxx:108
ImpPDFTabSecurityPage * getSecurityPage() const
Definition: impdialog.cxx:284
css::uno::Sequence< css::beans::NamedValue > maPreparedOwnerPassword
Definition: impdialog.hxx:124
sal_Int32 mnPDFTypeSelection
Definition: impdialog.hxx:83
sal_Int32 mnPrint
Definition: impdialog.hxx:125
bool mbRestrictPermissions
Definition: impdialog.hxx:123
bool mbCanExtractForAccessibility
Definition: impdialog.hxx:128
sal_Int32 mnOpenBookmarkLevels
Definition: impdialog.hxx:103
bool mbSinglePageSheets
Definition: impdialog.hxx:102
virtual ~ImpPDFTabDialog() override
Definition: impdialog.cxx:384
bool mbExportNotesPages
Definition: impdialog.hxx:90
bool mbCanCopyOrExtract
Definition: impdialog.hxx:127
ImpPDFTabGeneralPage * getGeneralPage() const
Definition: impdialog.cxx:315
bool mbExportNotesInMargin
Definition: impdialog.hxx:86
OUString msSignPassword
Definition: impdialog.hxx:141
sal_Int32 mnFormsType
Definition: impdialog.hxx:96
sal_Int32 mnInitialViewUserSelection
Definition: impdialog.hxx:114
ImpPDFTabOpnFtrPage * getOpenPage() const
Definition: impdialog.cxx:294
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
Definition: impdialog.cxx:390
bool mbExportHiddenSlides
Definition: impdialog.hxx:101
bool mbSelectionPresent
Definition: impdialog.hxx:75
ImpPDFTabLinksPage * getLinksPage() const
Definition: impdialog.cxx:304
bool mbIsExportPlaceholders
Definition: impdialog.hxx:94
ImpPDFTabDialog(weld::Window *pParent, const Sequence< PropertyValue > &rFilterData, const css::uno::Reference< XComponent > &rDoc)
Tabbed PDF dialog implementation Please note: the default used here are the same as per specification...
Definition: impdialog.cxx:54
bool mbAllowDuplicateFieldNames
Definition: impdialog.hxx:98
css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords
Definition: impdialog.hxx:129
bool mbIsSkipEmptyPages
Definition: impdialog.hxx:93
sal_Int32 mnQuality
Definition: impdialog.hxx:78
FilterConfigItem maConfigItem
Definition: impdialog.hxx:63
css::uno::Reference< css::security::XCertificate > maSignCertificate
Definition: impdialog.hxx:145
bool mbUseLosslessCompression
Definition: impdialog.hxx:77
bool mbPDFUACompliance
Definition: impdialog.hxx:84
OUString msSignLocation
Definition: impdialog.hxx:142
OUString maWatermarkText
Definition: impdialog.hxx:148
bool mbHideViewerToolbar
Definition: impdialog.hxx:105
bool mbExportRelativeFsysLinks
Definition: impdialog.hxx:135
bool mbUseReferenceXObject
Definition: impdialog.hxx:88
OUString msPageRange
Definition: impdialog.hxx:132
bool mbHideViewerMenubar
Definition: impdialog.hxx:106
sal_Int32 mnZoom
Definition: impdialog.hxx:115
bool mbExportBookmarks
Definition: impdialog.hxx:99
bool mbUseReferenceXObjectUserSelection
Definition: impdialog.hxx:89
FilterConfigItem maConfigI18N
Definition: impdialog.hxx:64
Class tab page general.
Definition: impdialog.hxx:177
bool IsPdfaSelected() const
Definition: impdialog.hxx:248
std::unique_ptr< weld::CheckButton > mxCbExportNotesPages
Definition: impdialog.hxx:211
std::unique_ptr< weld::CheckButton > mxCbSinglePageSheets
Definition: impdialog.hxx:206
std::unique_ptr< weld::CheckButton > mxCbAddStream
Definition: impdialog.hxx:215
std::unique_ptr< weld::ComboBox > mxLbFormsFormat
Definition: impdialog.hxx:202
std::unique_ptr< weld::RadioButton > mxRbLosslessCompression
Definition: impdialog.hxx:190
std::shared_ptr< weld::MessageDialog > mxPasswordUnusedWarnDialog
Definition: impdialog.hxx:237
std::unique_ptr< weld::CheckButton > mxCbExportOnlyNotesPages
Definition: impdialog.hxx:212
ImpPDFTabDialog * mpParent
Definition: impdialog.hxx:184
std::unique_ptr< weld::Label > mxSheetsFt
Definition: impdialog.hxx:220
std::unique_ptr< weld::CheckButton > mxCbExportNotesInMargin
Definition: impdialog.hxx:208
bool IsPdfUaSelected() const
Definition: impdialog.hxx:249
std::unique_ptr< weld::CheckButton > mxCbExportBookmarks
Definition: impdialog.hxx:204
std::unique_ptr< weld::ComboBox > mxRbPDFAVersion
Definition: impdialog.hxx:198
std::unique_ptr< weld::CheckButton > mxCbPDFA
Definition: impdialog.hxx:196
std::unique_ptr< weld::CheckButton > mxCbUseReferenceXObject
Definition: impdialog.hxx:210
std::unique_ptr< weld::RadioButton > mxRbSelection
Definition: impdialog.hxx:188
ImpPDFTabGeneralPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
Definition: impdialog.cxx:527
std::unique_ptr< weld::CheckButton > mxCbTaggedPDF
Definition: impdialog.hxx:199
std::unique_ptr< weld::CheckButton > mxCbViewPDF
Definition: impdialog.hxx:209
std::unique_ptr< weld::CheckButton > mxCbReduceImageResolution
Definition: impdialog.hxx:194
std::unique_ptr< weld::CheckButton > mxCbExportHiddenSlides
Definition: impdialog.hxx:205
std::unique_ptr< weld::ComboBox > mxCoReduceImageResolution
Definition: impdialog.hxx:195
std::unique_ptr< weld::Entry > mxEdPages
Definition: impdialog.hxx:189
std::unique_ptr< weld::CheckButton > mxCbExportFormFields
Definition: impdialog.hxx:200
bool mbUseTaggedPDFUserSelection
Definition: impdialog.hxx:180
virtual ~ImpPDFTabGeneralPage() override
Definition: impdialog.cxx:572
void EnableExportNotesPages()
Definition: impdialog.cxx:839
std::unique_ptr< weld::Entry > mxEdWatermark
Definition: impdialog.hxx:218
std::unique_ptr< weld::Widget > mxQualityFrame
Definition: impdialog.hxx:192
std::unique_ptr< weld::CheckButton > mxCbExportNotes
Definition: impdialog.hxx:207
std::unique_ptr< weld::Label > mxFtWatermark
Definition: impdialog.hxx:217
std::unique_ptr< weld::CheckButton > mxCbExportEmptyPages
Definition: impdialog.hxx:213
void SetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:578
std::unique_ptr< weld::Label > mxSlidesFt
Definition: impdialog.hxx:219
std::unique_ptr< weld::CheckButton > mxCbWatermark
Definition: impdialog.hxx:216
std::unique_ptr< weld::RadioButton > mxRbJPEGCompression
Definition: impdialog.hxx:191
std::unique_ptr< weld::CheckButton > mxCbExportPlaceholders
Definition: impdialog.hxx:214
std::unique_ptr< weld::CheckButton > mxCbAllowDuplicateFieldNames
Definition: impdialog.hxx:203
std::unique_ptr< weld::MetricSpinButton > mxNfQuality
Definition: impdialog.hxx:193
std::unique_ptr< weld::RadioButton > mxRbAll
Definition: impdialog.hxx:186
std::unique_ptr< weld::Widget > mxFormsFrame
Definition: impdialog.hxx:201
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:731
std::unique_ptr< weld::RadioButton > mxRbRange
Definition: impdialog.hxx:187
std::unique_ptr< weld::CheckButton > mxCbPDFUA
Definition: impdialog.hxx:197
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: impdialog.cxx:810
Implements the relative link stuff.
Definition: impdialog.hxx:375
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: impdialog.cxx:1524
std::unique_ptr< weld::RadioButton > m_xRbOpnLnksLaunch
Definition: impdialog.hxx:384
void ImplPDFALinkControl(bool bEnableLaunch)
Called from general tab, with PDFA/1 selection status.
Definition: impdialog.cxx:1596
bool mbOpnLnksBrowserUserState
Definition: impdialog.hxx:378
std::unique_ptr< weld::CheckButton > m_xCbExportRelativeFsysLinks
Definition: impdialog.hxx:382
ImpPDFTabLinksPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The link preferences tab page (relative and other stuff)
Definition: impdialog.cxx:1506
bool mbOpnLnksDefaultUserState
Definition: impdialog.hxx:376
virtual ~ImpPDFTabLinksPage() override
Definition: impdialog.cxx:1520
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1557
bool mbOpnLnksLaunchUserState
Definition: impdialog.hxx:377
std::unique_ptr< weld::CheckButton > m_xCbExprtBmkrToNmDst
Definition: impdialog.hxx:380
std::unique_ptr< weld::RadioButton > m_xRbOpnLnksBrowser
Definition: impdialog.hxx:385
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1529
std::unique_ptr< weld::CheckButton > m_xCbOOoToPDFTargets
Definition: impdialog.hxx:381
std::unique_ptr< weld::RadioButton > m_xRbOpnLnksDefault
Definition: impdialog.hxx:383
Class tab page viewer.
Definition: impdialog.hxx:254
ImpPDFTabOpnFtrPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The option features tab page.
Definition: impdialog.cxx:972
void ToggleInitialView(ImpPDFTabDialog &rParent)
Definition: impdialog.cxx:1121
std::unique_ptr< weld::RadioButton > mxRbOpnOutline
Definition: impdialog.hxx:260
std::unique_ptr< weld::RadioButton > mxRbMagnFitVisible
Definition: impdialog.hxx:266
void ToggleRbPgLyContinueFacingHdl()
Definition: impdialog.cxx:1168
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: impdialog.cxx:1002
std::unique_ptr< weld::RadioButton > mxRbMagnZoom
Definition: impdialog.hxx:267
std::unique_ptr< weld::RadioButton > mxRbMagnDefault
Definition: impdialog.hxx:263
std::unique_ptr< weld::RadioButton > mxRbMagnFitWidth
Definition: impdialog.hxx:265
std::unique_ptr< weld::SpinButton > mxNumInitialPage
Definition: impdialog.hxx:262
void SetFilterConfigItem(ImpPDFTabDialog *pParent)
Definition: impdialog.cxx:1045
std::unique_ptr< weld::RadioButton > mxRbPgLyContinue
Definition: impdialog.hxx:271
std::unique_ptr< weld::RadioButton > mxRbPgLyContinueFacing
Definition: impdialog.hxx:272
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1007
std::unique_ptr< weld::CheckButton > mxCbPgLyFirstOnLeft
Definition: impdialog.hxx:273
std::unique_ptr< weld::RadioButton > mxRbOpnPageOnly
Definition: impdialog.hxx:259
std::unique_ptr< weld::RadioButton > mxRbMagnFitWin
Definition: impdialog.hxx:264
std::unique_ptr< weld::RadioButton > mxRbPgLySinglePage
Definition: impdialog.hxx:270
std::unique_ptr< weld::SpinButton > mxNumZoom
Definition: impdialog.hxx:268
std::unique_ptr< weld::RadioButton > mxRbOpnThumbs
Definition: impdialog.hxx:261
std::unique_ptr< weld::RadioButton > mxRbPgLyDefault
Definition: impdialog.hxx:269
virtual ~ImpPDFTabOpnFtrPage() override
Definition: impdialog.cxx:998
Class security tab page.
Definition: impdialog.hxx:322
css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords
Definition: impdialog.hxx:330
std::unique_ptr< weld::RadioButton > mxRbChangesAnyNoCopy
Definition: impdialog.hxx:348
std::unique_ptr< weld::Widget > mxContent
Definition: impdialog.hxx:349
std::unique_ptr< weld::Widget > mxOwnerPwdUnset
Definition: impdialog.hxx:337
css::uno::Sequence< css::beans::NamedValue > maPreparedOwnerPassword
Definition: impdialog.hxx:327
std::unique_ptr< weld::Widget > mxUserPwdPdfa
Definition: impdialog.hxx:335
std::unique_ptr< weld::Label > mxPasswordTitle
Definition: impdialog.hxx:352
std::unique_ptr< weld::CheckButton > mxCbEnableCopy
Definition: impdialog.hxx:350
ImpPDFTabSecurityPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The Security preferences tab page.
Definition: impdialog.cxx:1254
std::unique_ptr< weld::Widget > mxOwnerPwdSet
Definition: impdialog.hxx:336
std::shared_ptr< SfxPasswordDialog > mpPasswordDialog
Definition: impdialog.hxx:354
std::unique_ptr< weld::RadioButton > mxRbChangesNone
Definition: impdialog.hxx:344
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1332
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1299
std::unique_ptr< weld::RadioButton > mxRbChangesComment
Definition: impdialog.hxx:347
std::unique_ptr< weld::RadioButton > mxRbPrintHighRes
Definition: impdialog.hxx:342
std::unique_ptr< weld::Widget > mxChangesAllowed
Definition: impdialog.hxx:343
std::unique_ptr< weld::Widget > mxUserPwdUnset
Definition: impdialog.hxx:334
std::unique_ptr< weld::Button > mxPbSetPwd
Definition: impdialog.hxx:332
std::unique_ptr< weld::Widget > mxPrintPermissions
Definition: impdialog.hxx:339
void ImplPDFASecurityControl(bool bEnableSecurity)
Definition: impdialog.cxx:1498
std::unique_ptr< weld::CheckButton > mxCbEnableAccessibility
Definition: impdialog.hxx:351
std::unique_ptr< weld::Widget > mxOwnerPwdPdfa
Definition: impdialog.hxx:338
bool hasPassword() const
Definition: impdialog.hxx:370
virtual ~ImpPDFTabSecurityPage() override
Definition: impdialog.cxx:1286
std::unique_ptr< weld::RadioButton > mxRbChangesInsDel
Definition: impdialog.hxx:345
std::unique_ptr< weld::RadioButton > mxRbPrintNone
Definition: impdialog.hxx:340
std::unique_ptr< weld::RadioButton > mxRbPrintLowRes
Definition: impdialog.hxx:341
std::shared_ptr< weld::MessageDialog > mpUnsupportedMsgDialog
Definition: impdialog.hxx:355
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: impdialog.cxx:1294
std::unique_ptr< weld::Widget > mxUserPwdSet
Definition: impdialog.hxx:333
std::unique_ptr< weld::RadioButton > mxRbChangesFillForm
Definition: impdialog.hxx:346
std::unique_ptr< weld::ComboBox > mxLBSignTSA
Definition: impdialog.hxx:414
std::unique_ptr< weld::Entry > mxEdSignLocation
Definition: impdialog.hxx:411
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: impdialog.cxx:1762
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1768
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1781
std::unique_ptr< weld::Button > mxPbSignCertSelect
Definition: impdialog.hxx:408
std::unique_ptr< weld::Entry > mxEdSignPassword
Definition: impdialog.hxx:410
css::uno::Reference< css::security::XCertificate > maSignCertificate
Definition: impdialog.hxx:405
std::unique_ptr< weld::Button > mxPbSignCertClear
Definition: impdialog.hxx:409
ImpPDFTabSigningPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The digital signatures tab page.
Definition: impdialog.cxx:1685
std::unique_ptr< weld::Entry > mxEdSignReason
Definition: impdialog.hxx:413
std::unique_ptr< weld::Entry > mxEdSignContactInfo
Definition: impdialog.hxx:412
virtual ~ImpPDFTabSigningPage() override
Definition: impdialog.cxx:1701
Class tab page viewer.
Definition: impdialog.hxx:293
virtual ~ImpPDFTabViewerPage() override
Definition: impdialog.cxx:1198
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Definition: impdialog.cxx:1207
std::unique_ptr< weld::CheckButton > m_xCbDispDocTitle
Definition: impdialog.hxx:299
std::unique_ptr< weld::CheckButton > m_xCbHideViewerToolbar
Definition: impdialog.hxx:301
std::unique_ptr< weld::SpinButton > m_xNumBookmarkLevels
Definition: impdialog.hxx:306
std::unique_ptr< weld::CheckButton > m_xCbHideViewerWindowControls
Definition: impdialog.hxx:302
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1213
std::unique_ptr< weld::CheckButton > m_xCbHideViewerMenubar
Definition: impdialog.hxx:300
std::unique_ptr< weld::CheckButton > m_xCbResWinInit
Definition: impdialog.hxx:296
std::unique_ptr< weld::RadioButton > m_xRbVisibleBookmarkLevels
Definition: impdialog.hxx:305
std::unique_ptr< weld::CheckButton > m_xCbCenterWindow
Definition: impdialog.hxx:297
std::unique_ptr< weld::CheckButton > m_xCbTransitionEffects
Definition: impdialog.hxx:303
std::unique_ptr< weld::RadioButton > m_xRbAllBookmarkLevels
Definition: impdialog.hxx:304
ImpPDFTabViewerPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The Viewer preferences tab page.
Definition: impdialog.cxx:1179
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
Definition: impdialog.cxx:1227
std::unique_ptr< weld::CheckButton > m_xCbOpenFullScreen
Definition: impdialog.hxx:298
std::unique_ptr< weld::Label > m_xExplanation
Definition: impdialog.hxx:45
std::unique_ptr< weld::TreeView > m_xErrors
Definition: impdialog.hxx:44
ImplErrorDialog(weld::Window *pParent, const std::set< vcl::PDFWriter::ErrorCode > &rErrorCodes)
Definition: impdialog.cxx:1635
const SfxPoolItem * ExecuteList(sal_uInt16 nSlot, SfxCallMode nCall, std::initializer_list< SfxPoolItem const * > args, std::initializer_list< SfxPoolItem const * > internalargs=std::initializer_list< SfxPoolItem const * >())
virtual sfx::AccessibilityIssueCollection runAccessibilityCheck()
static SfxObjectShell * GetShellFromComponent(const css::uno::Reference< css::uno::XInterface > &xComp)
SfxDispatcher * GetDispatcher() const
SfxTabPage * GetTabPage(std::u16string_view rPageId) const
void SetCurPageId(const OUString &rName)
void AddTabPage(const OUString &rName, CreateTabPage pCreateFunc, GetTabPageRanges pRangesFunc)
weld::Button & GetCancelButton() const
virtual weld::Button & GetOKButton() const override
std::unique_ptr< weld::Notebook > m_xTabCtrl
SfxOkDialogController * GetDialogController() const
static css::uno::Sequence< css::beans::NamedValue > CreatePackageEncryptionData(std::u16string_view aPassword)
std::vector< std::shared_ptr< AccessibilityIssue > > & getIssues()
static css::uno::Reference< css::beans::XMaterialHolder > InitEncryption(const OUString &i_rOwnerPassword, const OUString &i_rUserPassword)
Warning_Transparency_Omitted_PDFA
Warning_Transparency_Omitted_PDF13
virtual void set_label(const OUString &rText)=0
void connect_clicked(const Link< Button &, void > &rLink)
static bool runAsync(const std::shared_ptr< DialogController > &rController, const std::function< void(sal_Int32)> &)
#define TOOLS_INFO_EXCEPTION(area, stream)
weld::Window * GetFrameWeld(const SfxFrame *pFrame)
RegionData_Impl * mpParent
float u
#define ERRCODE_IO_NOTSUPPORTED
FieldUnit
IMPL_LINK_NOARG(ImpPDFTabDialog, CancelHdl, weld::Button &, void)
Definition: impdialog.cxx:325
Shape IDs per cluster in DGG atom.
css::uno::Sequence< T > concatSequences(const css::uno::Sequence< T > &rS1, const Ss &... rSn)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Reference< XComponentContext > getProcessComponentContext()
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
Reference< XNameAccess > m_xContainer
Reference< XController > xController
constexpr OUStringLiteral PERCENT(u"Percent")
RET_OK
RET_CANCEL
RET_NO
RET_YES