pdfexport.cxx (989344c7) pdfexport.cxx (a8f4084d)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 526 unchanged lines hidden (view full) ---

535 rFilterData[ nData ].Value >>= mbEncrypt;
536 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentOpenPassword" ) ) )
537 rFilterData[ nData ].Value >>= aOpenPassword;
538 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "RestrictPermissions" ) ) )
539 rFilterData[ nData ].Value >>= mbRestrictPermissions;
540 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PermissionPassword" ) ) )
541 rFilterData[ nData ].Value >>= aPermissionPassword;
542 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPasswords" ) ) )
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 526 unchanged lines hidden (view full) ---

535 rFilterData[ nData ].Value >>= mbEncrypt;
536 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "DocumentOpenPassword" ) ) )
537 rFilterData[ nData ].Value >>= aOpenPassword;
538 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "RestrictPermissions" ) ) )
539 rFilterData[ nData ].Value >>= mbRestrictPermissions;
540 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PermissionPassword" ) ) )
541 rFilterData[ nData ].Value >>= aPermissionPassword;
542 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPasswords" ) ) )
543 rFilterData[ nData ].Value >>= xEnc;
543 rFilterData[ nData ].Value >>= xEnc;
544 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPermissionPassword" ) ) )
544 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "PreparedPermissionPassword" ) ) )
545 rFilterData[ nData ].Value >>= aPreparedPermissionPassword;
545 rFilterData[ nData ].Value >>= aPreparedPermissionPassword;
546 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "Printing" ) ) )
547 rFilterData[ nData ].Value >>= mnPrintAllowed;
548 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "Changes" ) ) )
549 rFilterData[ nData ].Value >>= mnChangesAllowed;
550 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableCopyingOfContent" ) ) )
551 rFilterData[ nData ].Value >>= mbCanCopyOrExtract;
552 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableTextAccessForAccessibilityTools" ) ) )
553 rFilterData[ nData ].Value >>= mbCanExtractForAccessibility;

--- 32 unchanged lines hidden (view full) ---

586 // PDF/A does not allow transparencies
587 mbRemoveTransparencies = sal_True;
588 // no encryption
589 mbEncrypt = sal_False;
590 xEnc.clear();
591 break;
592 }
593
546 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "Printing" ) ) )
547 rFilterData[ nData ].Value >>= mnPrintAllowed;
548 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "Changes" ) ) )
549 rFilterData[ nData ].Value >>= mnChangesAllowed;
550 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableCopyingOfContent" ) ) )
551 rFilterData[ nData ].Value >>= mbCanCopyOrExtract;
552 else if ( rFilterData[ nData ].Name == OUString( RTL_CONSTASCII_USTRINGPARAM( "EnableTextAccessForAccessibilityTools" ) ) )
553 rFilterData[ nData ].Value >>= mbCanExtractForAccessibility;

--- 32 unchanged lines hidden (view full) ---

586 // PDF/A does not allow transparencies
587 mbRemoveTransparencies = sal_True;
588 // no encryption
589 mbEncrypt = sal_False;
590 xEnc.clear();
591 break;
592 }
593
594//copy in context the values default in the contructor or set by the FilterData sequence of properties
594//copy in context the values default in the constructor or set by the FilterData sequence of properties
595 aContext.Tagged = mbUseTaggedPDF;
596
597//values used in viewer
598 aContext.HideViewerToolbar = mbHideViewerToolbar;
599 aContext.HideViewerMenubar = mbHideViewerMenubar;
600 aContext.HideViewerWindowControls = mbHideViewerWindowControls;
601 aContext.FitWindow = mbFitWindow;
602 aContext.CenterWindow = mbCenterWindow;

--- 123 unchanged lines hidden (view full) ---

726 if( mbEncrypt && aPermissionPassword.getLength() && ! aPreparedPermissionPassword.getLength() )
727 aPreparedPermissionPassword = comphelper::OStorageHelper::CreatePackageEncryptionData( aPermissionPassword );
728 }
729 // after this point we don't need the legacy clear passwords anymore
730 // however they are still inside the passed filter data sequence
731 // which is sadly out out our control
732 aPermissionPassword = rtl::OUString();
733 aOpenPassword = rtl::OUString();
595 aContext.Tagged = mbUseTaggedPDF;
596
597//values used in viewer
598 aContext.HideViewerToolbar = mbHideViewerToolbar;
599 aContext.HideViewerMenubar = mbHideViewerMenubar;
600 aContext.HideViewerWindowControls = mbHideViewerWindowControls;
601 aContext.FitWindow = mbFitWindow;
602 aContext.CenterWindow = mbCenterWindow;

--- 123 unchanged lines hidden (view full) ---

726 if( mbEncrypt && aPermissionPassword.getLength() && ! aPreparedPermissionPassword.getLength() )
727 aPreparedPermissionPassword = comphelper::OStorageHelper::CreatePackageEncryptionData( aPermissionPassword );
728 }
729 // after this point we don't need the legacy clear passwords anymore
730 // however they are still inside the passed filter data sequence
731 // which is sadly out out our control
732 aPermissionPassword = rtl::OUString();
733 aOpenPassword = rtl::OUString();
734
734
735 /*
736 * FIXME: the entries are only implicitly defined by the resource file. Should there
737 * ever be an additional form submit format this could get invalid.
738 */
739 switch( mnFormsFormat )
740 {
741 case 1:
742 aContext.SubmitFormat = PDFWriter::PDF;

--- 386 unchanged lines hidden ---
735 /*
736 * FIXME: the entries are only implicitly defined by the resource file. Should there
737 * ever be an additional form submit format this could get invalid.
738 */
739 switch( mnFormsFormat )
740 {
741 case 1:
742 aContext.SubmitFormat = PDFWriter::PDF;

--- 386 unchanged lines hidden ---