22#include <officecfg/Office/Common.hxx>
31#include <sfx2/sfxsids.hrc>
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>
55 const Reference< XComponent >& rxDoc)
58 maConfigItem(
u"Office.Common/Filter/PDF/Export/", &rFilterData ),
59 maConfigI18N(
u"Office.Common/I18N/CTL/" ),
60 mbIsPresentation( false ),
61 mbIsSpreadsheet( false ),
64 mbSelectionPresent( false ),
65 mbUseCTLFont( false ),
66 mbUseLosslessCompression( true ),
68 mbReduceImageResolution( false ),
69 mnMaxImageResolution( 300 ),
70 mbUseTaggedPDF( false ),
71 mbUseTaggedPDFUserSelection( false ),
72 mbExportNotes( true ),
73 mbExportNotesInMargin( false ),
75 mbUseReferenceXObject( false ),
76 mbExportNotesPages( false ),
77 mbExportOnlyNotesPages( false ),
78 mbUseTransitionEffects( false ),
79 mbIsSkipEmptyPages( true ),
80 mbIsExportPlaceholders( false ),
83 mbExportFormFields( true ),
84 mbAllowDuplicateFieldNames( false ),
85 mbExportBookmarks( true ),
86 mbExportHiddenSlides ( false ),
87 mbSinglePageSheets ( false ),
88 mnOpenBookmarkLevels( -1 ),
90 mbHideViewerToolbar( false ),
91 mbHideViewerMenubar( false ),
92 mbHideViewerWindowControls( false ),
93 mbResizeWinToInit( false ),
94 mbCenterWindow( false ),
95 mbOpenInFullScreenMode( false ),
96 mbDisplayPDFDocumentTitle( false ),
102 mbFirstPageLeft( false ),
105 mbRestrictPermissions( false ),
107 mnChangesAllowed( 0 ),
108 mbCanCopyOrExtract( false ),
109 mbCanExtractForAccessibility( true ),
111 mbIsRangeChecked( false ),
114 mbSelectionIsChecked( false ),
115 mbExportRelativeFsysLinks( false ),
117 mbConvertOOoTargets( false ),
118 mbExportBmkToPDFDestination( false ),
125 Reference< frame::XController >
xController( Reference< frame::XModel >( rxDoc, UNO_QUERY_THROW )->getCurrentController() );
128 Reference< view::XSelectionSupplier > xView(
xController, UNO_QUERY );
139 Reference< drawing::XShapes > xShapes;
143 Reference< container::XIndexAccess > xIndexAccess;
146 sal_Int32 nLen = xIndexAccess->getCount();
149 else if ( nLen == 1 )
151 Reference< text::XTextRange > xTextRange( xIndexAccess->getByIndex( 0 ), UNO_QUERY );
152 if ( xTextRange.is() && ( xTextRange->getString().isEmpty() ) )
162 Reference< XServiceInfo > xInfo( rxDoc, UNO_QUERY );
165 if ( xInfo->supportsService(
"com.sun.star.presentation.PresentationDocument" ) )
167 if ( xInfo->supportsService(
"com.sun.star.sheet.SpreadsheetDocument" ) )
169 if ( xInfo->supportsService(
"com.sun.star.text.GenericTextDocument" ) )
274 if (!sOkButtonText.isEmpty())
332 if (getGeneralPage()->IsPdfUaSelected())
339 int nIssueCount(aIssues.size());
340 if (!aIssues.empty())
342 OUString aMessage(FilterResId(STR_WARN_PDFUA_ISSUES, nIssueCount));
343 aMessage = aMessage.replaceFirst(
"%1", OUString::number(nIssueCount));
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);
352 int ret = xPDFUADialog->run();
362 const SfxStringItem sDeckName(SID_SIDEBAR_DECK,
"A11yCheckDeck");
363 pDispatcher->
ExecuteList(SID_SIDEBAR_DECK, SfxCallMode::RECORD,
392 if (rId ==
"general")
394 else if (rId ==
"userinterface")
398 else if (rId ==
"initialview")
402 else if (rId ==
"links")
406 else if (rId ==
"security")
410 else if (rId ==
"digitalsignatures")
421 pPage->GetFilterConfigItem(
this);
423 pPage->GetFilterConfigItem(
this);
425 pPage->GetFilterConfigItem(
this);
427 pPage->GetFilterConfigItem(
this);
429 pPage->GetFilterConfigItem(
this);
431 pPage->GetFilterConfigItem(
this);
442 const bool bUserSelectionTags = bIsPDFA || bIsPDFUA;
502 std::vector<beans::PropertyValue> aRet
528 :
SfxTabPage(pPage, pController,
"filter/ui/pdfgeneralpage.ui",
"PdfGeneralPage", &rCoreSet)
529 , mbUseTaggedPDFUserSelection(false)
530 , mbIsPresentation(false)
531 , mbIsSpreadsheet(false)
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"))
591 if ( bSelectionPresent )
603 if ( bUseLosslessCompression )
644 if (bIsPDFA || bIsPDFUA)
649 TogglePDFVersionOrUniversalAccessibilityHandle(*
mxCbPDFA);
773 const bool bIsPDFA =
mxCbPDFA->get_active();
774 const bool bIsPDFUA =
mxCbPDFUA->get_active();
780 if( currentPDFAMode ==
"1" )
782 else if(currentPDFAMode ==
"2")
788 if (!bIsPDFA && !bIsPDFUA)
813 return std::make_unique<ImpPDFTabGeneralPage>(pPage, pController, *rAttrSet);
818 EnableExportNotesPages();
824 EnableExportNotesPages();
829 EnableExportNotesPages();
850 mxFormsFrame->set_sensitive(mxCbExportFormFields->get_active());
855 mxCbExportOnlyNotesPages->set_sensitive(mxCbExportNotesPages->get_active());
860 mxQualityFrame->set_sensitive(mxRbJPEGCompression->get_active());
865 mxCoReduceImageResolution->set_sensitive(mxCbReduceImageResolution->get_active());
870 mxEdWatermark->set_sensitive(mxCbWatermark->get_active());
871 mxFtWatermark->set_sensitive(mxCbWatermark->get_active());
872 if (mxCbWatermark->get_active())
873 mxEdWatermark->grab_focus();
878 if (!mxCbAddStream->get_visible())
881 if( mxCbAddStream->get_active() )
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 );
891 mxRbAll->set_sensitive(
true);
892 mxRbRange->set_sensitive(
true);
893 mxRbSelection->set_sensitive(
true);
899 const bool bIsPDFA = mxCbPDFA->get_active();
900 const bool bIsPDFUA = mxCbPDFUA->get_active();
907 mxCbTaggedPDF->set_sensitive(!bIsPDFA && !bIsPDFUA);
908 mxRbPDFAVersion->set_sensitive(bIsPDFA);
910 if (bIsPDFA || bIsPDFUA)
913 mbUseTaggedPDFUserSelection = mxCbTaggedPDF->get_active();
914 mxCbTaggedPDF->set_active(
true);
917 if (bIsPDFA && pSecPage && pSecPage->
hasPassword())
919 mxPasswordUnusedWarnDialog =
921 VclMessageType::Warning, VclButtonsType::Ok,
922 FilterResId(STR_WARN_PASSWORD_PDFA)));
923 mxPasswordUnusedWarnDialog->runAsync(mxPasswordUnusedWarnDialog, [] (sal_uInt32){ });
929 mxCbTaggedPDF->set_active(mbUseTaggedPDFUserSelection);
934 if (mxCbExportBookmarks->get_sensitive())
938 mpParent->mbExportBookmarksUserSelection = mxCbExportBookmarks->get_active();
940 mxCbExportBookmarks->set_active(
true);
942 if (mxCbUseReferenceXObject->get_sensitive())
946 mpParent->mbUseReferenceXObjectUserSelection = mxCbUseReferenceXObject->get_active();
948 mxCbUseReferenceXObject->set_active(
false);
953 mxCbExportBookmarks->set_active(
mpParent->mbExportBookmarksUserSelection);
954 mxCbUseReferenceXObject->set_active(
mpParent->mbUseReferenceXObjectUserSelection);
956 mxCbExportBookmarks->set_sensitive(!bIsPDFUA);
957 mxCbUseReferenceXObject->set_sensitive(!bIsPDFUA);
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"))
1004 return std::make_unique<ImpPDFTabOpnFtrPage>(pPage, pController, *rAttrSet);
1165 ToggleRbPgLyContinueFacingHdl();
1175 mxNumZoom->set_sensitive(mxRbMagnZoom->get_active());
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"))
1204 m_xNumBookmarkLevels->set_sensitive(m_xRbVisibleBookmarkLevels->get_active());
1210 return std::make_unique<ImpPDFTabViewerPage>(pPage, pController, *rAttrSet);
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"))
1296 return std::make_unique<ImpPDFTabSecurityPage>(pPage, pController, *rAttrSet);
1382 if(mpPasswordDialog)
1385 mpPasswordDialog = std::make_shared<SfxPasswordDialog>(
m_xContainer.get(), &msUserPwdTitle);
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();
1394 mpPasswordDialog->PreRun();
1399 OUString aUserPW(mpPasswordDialog->GetPassword());
1400 OUString aOwnerPW(mpPasswordDialog->GetPassword2());
1402 mbHaveUserPassword = !aUserPW.isEmpty();
1403 mbHaveOwnerPassword = !aOwnerPW.isEmpty();
1406 if (!mxPreparedPasswords.is())
1410 mpUnsupportedMsgDialog = std::shared_ptr<weld::MessageDialog>(
1412 GetFrameWeld(), VclMessageType::Error, VclButtonsType::Ok, msg));
1414 mpUnsupportedMsgDialog->runAsync(mpUnsupportedMsgDialog, [](sal_Int32){ });
1418 if( mbHaveOwnerPassword )
1421 maPreparedOwnerPassword = Sequence< NamedValue >();
1424 enablePermissionControls();
1425 mpPasswordDialog.reset();
1431 bool bIsPDFASel =
false;
1432 bool bIsPDFUASel =
false;
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"))
1526 return std::make_unique<ImpPDFTabLinksPage>(pPage, pController, *rAttrSet);
1533 bool bIsPDFASel =
false;
1622 mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
1623 mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
1624 mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
1630 mbOpnLnksDefaultUserState = m_xRbOpnLnksDefault->get_active();
1631 mbOpnLnksLaunchUserState = m_xRbOpnLnksLaunch->get_active();
1632 mbOpnLnksBrowserUserState = m_xRbOpnLnksBrowser->get_active();
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"))
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);
1645 for (
auto const& error : rErrors)
1650 m_xErrors->append(FilterResId(STR_WARN_TRANSP_PDFA), FilterResId(STR_WARN_TRANSP_PDFA_SHORT),
"dialog-warning");
1653 m_xErrors->append(FilterResId(STR_WARN_TRANSP_VERSION), FilterResId(STR_WARN_TRANSP_VERSION_SHORT),
"dialog-warning");
1656 m_xErrors->append(FilterResId(STR_WARN_FORMACTION_PDFA), FilterResId(STR_WARN_FORMACTION_PDFA_SHORT),
"dialog-warning");
1659 m_xErrors->append(FilterResId(STR_WARN_TRANSP_CONVERTED), FilterResId(STR_WARN_TRANSP_CONVERTED_SHORT),
"dialog-warning");
1662 m_xErrors->append(FilterResId(STR_ERR_PDF_EXPORT_ABORTED), FilterResId(STR_ERR_SIGNATURE_FAILED),
"dialog-error");
1680 OUString aExplanation = m_xErrors->get_selected_id();
1681 m_xExplanation->set_label(aExplanation);
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"))
1707 Reference< security::XDocumentDigitalSignatures > xSigner(
1708 security::DocumentDigitalSignatures::createDefault(
1710 xSigner->setParentWindow(
GetFrameWeld()->GetXWindow());
1713 OUString aDescription;
1714 maSignCertificate = xSigner->selectSigningCertificateWithType(
1715 security::CertificateKind::CertificateKind_X509, aDescription);
1717 if (!maSignCertificate.is())
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);
1730 std::optional<css::uno::Sequence<OUString>> aTSAURLs(officecfg::Office::Common::Security::Scripting::TSAURLs::get());
1733 const css::uno::Sequence<OUString>& rTSAURLs = *aTSAURLs;
1734 for (
auto const& elem : rTSAURLs)
1736 mxLBSignTSA->append_text(elem);
1740 catch (
const uno::Exception &)
1746 if (mxLBSignTSA->get_count() > 1)
1747 mxLBSignTSA->set_sensitive(
true);
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);
1765 return std::make_unique<ImpPDFTabSigningPage>(pPage, pController, *rAttrSet);
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
bool mbUseTransitionEffects
Sequence< PropertyValue > GetFilterData()
bool mbExportOnlyNotesPages
bool mbExportBookmarksUserSelection
sal_Int32 mnChangesAllowed
bool mbUseTaggedPDFUserSelection
sal_Int32 mnMagnification
bool mbOpenInFullScreenMode
bool mbDisplayPDFDocumentTitle
bool mbSelectionIsChecked
bool mbReduceImageResolution
bool mbExportBmkToPDFDestination
bool mbHideViewerWindowControls
sal_Int32 mnMaxImageResolution
ImpPDFTabSecurityPage * getSecurityPage() const
css::uno::Sequence< css::beans::NamedValue > maPreparedOwnerPassword
sal_Int32 mnPDFTypeSelection
bool mbRestrictPermissions
bool mbCanExtractForAccessibility
sal_Int32 mnOpenBookmarkLevels
virtual ~ImpPDFTabDialog() override
ImpPDFTabGeneralPage * getGeneralPage() const
bool mbExportNotesInMargin
sal_Int32 mnInitialViewUserSelection
ImpPDFTabOpnFtrPage * getOpenPage() const
virtual void PageCreated(const OUString &rId, SfxTabPage &rPage) override
bool mbExportHiddenSlides
ImpPDFTabLinksPage * getLinksPage() const
bool mbIsExportPlaceholders
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...
bool mbAllowDuplicateFieldNames
css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords
FilterConfigItem maConfigItem
css::uno::Reference< css::security::XCertificate > maSignCertificate
bool mbUseLosslessCompression
bool mbExportRelativeFsysLinks
bool mbUseReferenceXObject
bool mbUseReferenceXObjectUserSelection
FilterConfigItem maConfigI18N
bool IsPdfaSelected() const
std::unique_ptr< weld::CheckButton > mxCbExportNotesPages
std::unique_ptr< weld::CheckButton > mxCbSinglePageSheets
std::unique_ptr< weld::CheckButton > mxCbAddStream
std::unique_ptr< weld::ComboBox > mxLbFormsFormat
std::unique_ptr< weld::RadioButton > mxRbLosslessCompression
std::shared_ptr< weld::MessageDialog > mxPasswordUnusedWarnDialog
std::unique_ptr< weld::CheckButton > mxCbExportOnlyNotesPages
ImpPDFTabDialog * mpParent
std::unique_ptr< weld::Label > mxSheetsFt
std::unique_ptr< weld::CheckButton > mxCbExportNotesInMargin
bool IsPdfUaSelected() const
std::unique_ptr< weld::CheckButton > mxCbExportBookmarks
std::unique_ptr< weld::ComboBox > mxRbPDFAVersion
std::unique_ptr< weld::CheckButton > mxCbPDFA
std::unique_ptr< weld::CheckButton > mxCbUseReferenceXObject
std::unique_ptr< weld::RadioButton > mxRbSelection
ImpPDFTabGeneralPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
std::unique_ptr< weld::CheckButton > mxCbTaggedPDF
std::unique_ptr< weld::CheckButton > mxCbViewPDF
std::unique_ptr< weld::CheckButton > mxCbReduceImageResolution
std::unique_ptr< weld::CheckButton > mxCbExportHiddenSlides
std::unique_ptr< weld::ComboBox > mxCoReduceImageResolution
std::unique_ptr< weld::Entry > mxEdPages
std::unique_ptr< weld::CheckButton > mxCbExportFormFields
bool mbUseTaggedPDFUserSelection
virtual ~ImpPDFTabGeneralPage() override
void EnableExportNotesPages()
std::unique_ptr< weld::Entry > mxEdWatermark
std::unique_ptr< weld::Widget > mxQualityFrame
std::unique_ptr< weld::CheckButton > mxCbExportNotes
std::unique_ptr< weld::Label > mxFtWatermark
std::unique_ptr< weld::CheckButton > mxCbExportEmptyPages
void SetFilterConfigItem(ImpPDFTabDialog *paParent)
std::unique_ptr< weld::Label > mxSlidesFt
std::unique_ptr< weld::CheckButton > mxCbWatermark
std::unique_ptr< weld::RadioButton > mxRbJPEGCompression
std::unique_ptr< weld::CheckButton > mxCbExportPlaceholders
std::unique_ptr< weld::CheckButton > mxCbAllowDuplicateFieldNames
std::unique_ptr< weld::MetricSpinButton > mxNfQuality
std::unique_ptr< weld::RadioButton > mxRbAll
std::unique_ptr< weld::Widget > mxFormsFrame
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
std::unique_ptr< weld::RadioButton > mxRbRange
std::unique_ptr< weld::CheckButton > mxCbPDFUA
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
Implements the relative link stuff.
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::RadioButton > m_xRbOpnLnksLaunch
void ImplPDFALinkControl(bool bEnableLaunch)
Called from general tab, with PDFA/1 selection status.
bool mbOpnLnksBrowserUserState
std::unique_ptr< weld::CheckButton > m_xCbExportRelativeFsysLinks
ImpPDFTabLinksPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The link preferences tab page (relative and other stuff)
bool mbOpnLnksDefaultUserState
virtual ~ImpPDFTabLinksPage() override
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
bool mbOpnLnksLaunchUserState
std::unique_ptr< weld::CheckButton > m_xCbExprtBmkrToNmDst
std::unique_ptr< weld::RadioButton > m_xRbOpnLnksBrowser
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
std::unique_ptr< weld::CheckButton > m_xCbOOoToPDFTargets
std::unique_ptr< weld::RadioButton > m_xRbOpnLnksDefault
ImpPDFTabOpnFtrPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The option features tab page.
void ToggleInitialView(ImpPDFTabDialog &rParent)
std::unique_ptr< weld::RadioButton > mxRbOpnOutline
std::unique_ptr< weld::RadioButton > mxRbMagnFitVisible
void ToggleRbPgLyContinueFacingHdl()
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::RadioButton > mxRbMagnZoom
std::unique_ptr< weld::RadioButton > mxRbMagnDefault
std::unique_ptr< weld::RadioButton > mxRbMagnFitWidth
std::unique_ptr< weld::SpinButton > mxNumInitialPage
void SetFilterConfigItem(ImpPDFTabDialog *pParent)
std::unique_ptr< weld::RadioButton > mxRbPgLyContinue
std::unique_ptr< weld::RadioButton > mxRbPgLyContinueFacing
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
std::unique_ptr< weld::CheckButton > mxCbPgLyFirstOnLeft
std::unique_ptr< weld::RadioButton > mxRbOpnPageOnly
std::unique_ptr< weld::RadioButton > mxRbMagnFitWin
std::unique_ptr< weld::RadioButton > mxRbPgLySinglePage
std::unique_ptr< weld::SpinButton > mxNumZoom
std::unique_ptr< weld::RadioButton > mxRbOpnThumbs
std::unique_ptr< weld::RadioButton > mxRbPgLyDefault
virtual ~ImpPDFTabOpnFtrPage() override
css::uno::Reference< css::beans::XMaterialHolder > mxPreparedPasswords
std::unique_ptr< weld::RadioButton > mxRbChangesAnyNoCopy
std::unique_ptr< weld::Widget > mxContent
std::unique_ptr< weld::Widget > mxOwnerPwdUnset
css::uno::Sequence< css::beans::NamedValue > maPreparedOwnerPassword
std::unique_ptr< weld::Widget > mxUserPwdPdfa
std::unique_ptr< weld::Label > mxPasswordTitle
std::unique_ptr< weld::CheckButton > mxCbEnableCopy
ImpPDFTabSecurityPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The Security preferences tab page.
std::unique_ptr< weld::Widget > mxOwnerPwdSet
std::shared_ptr< SfxPasswordDialog > mpPasswordDialog
std::unique_ptr< weld::RadioButton > mxRbChangesNone
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
std::unique_ptr< weld::RadioButton > mxRbChangesComment
void enablePermissionControls()
std::unique_ptr< weld::RadioButton > mxRbPrintHighRes
std::unique_ptr< weld::Widget > mxChangesAllowed
std::unique_ptr< weld::Widget > mxUserPwdUnset
std::unique_ptr< weld::Button > mxPbSetPwd
std::unique_ptr< weld::Widget > mxPrintPermissions
void ImplPDFASecurityControl(bool bEnableSecurity)
std::unique_ptr< weld::CheckButton > mxCbEnableAccessibility
std::unique_ptr< weld::Widget > mxOwnerPwdPdfa
virtual ~ImpPDFTabSecurityPage() override
std::unique_ptr< weld::RadioButton > mxRbChangesInsDel
std::unique_ptr< weld::RadioButton > mxRbPrintNone
std::unique_ptr< weld::RadioButton > mxRbPrintLowRes
std::shared_ptr< weld::MessageDialog > mpUnsupportedMsgDialog
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::Widget > mxUserPwdSet
std::unique_ptr< weld::RadioButton > mxRbChangesFillForm
std::unique_ptr< weld::ComboBox > mxLBSignTSA
std::unique_ptr< weld::Entry > mxEdSignLocation
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
std::unique_ptr< weld::Button > mxPbSignCertSelect
std::unique_ptr< weld::Entry > mxEdSignPassword
css::uno::Reference< css::security::XCertificate > maSignCertificate
std::unique_ptr< weld::Button > mxPbSignCertClear
ImpPDFTabSigningPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The digital signatures tab page.
std::unique_ptr< weld::Entry > mxEdSignReason
std::unique_ptr< weld::Entry > mxEdSignContactInfo
virtual ~ImpPDFTabSigningPage() override
virtual ~ImpPDFTabViewerPage() override
static std::unique_ptr< SfxTabPage > Create(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet *rAttrSet)
std::unique_ptr< weld::CheckButton > m_xCbDispDocTitle
std::unique_ptr< weld::CheckButton > m_xCbHideViewerToolbar
std::unique_ptr< weld::SpinButton > m_xNumBookmarkLevels
std::unique_ptr< weld::CheckButton > m_xCbHideViewerWindowControls
void GetFilterConfigItem(ImpPDFTabDialog *paParent)
std::unique_ptr< weld::CheckButton > m_xCbHideViewerMenubar
std::unique_ptr< weld::CheckButton > m_xCbResWinInit
std::unique_ptr< weld::RadioButton > m_xRbVisibleBookmarkLevels
std::unique_ptr< weld::CheckButton > m_xCbCenterWindow
std::unique_ptr< weld::CheckButton > m_xCbTransitionEffects
std::unique_ptr< weld::RadioButton > m_xRbAllBookmarkLevels
ImpPDFTabViewerPage(weld::Container *pPage, weld::DialogController *pController, const SfxItemSet &rSet)
The Viewer preferences tab page.
void SetFilterConfigItem(const ImpPDFTabDialog *paParent)
std::unique_ptr< weld::CheckButton > m_xCbOpenFullScreen
std::unique_ptr< weld::Label > m_xExplanation
std::unique_ptr< weld::TreeView > m_xErrors
ImplErrorDialog(weld::Window *pParent, const std::set< vcl::PDFWriter::ErrorCode > &rErrorCodes)
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
Warning_Transparency_Converted
Warning_FormAction_Omitted_PDFA
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
#define ERRCODE_IO_NOTSUPPORTED
IMPL_LINK_NOARG(ImpPDFTabDialog, CancelHdl, weld::Button &, void)
#define LINK(Instance, Class, Member)
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")