Commit graph

23 commits

Author SHA1 Message Date
Albert Astals Cid 19d98d6a74 Run clang-format
find . \( -name "*.cpp" -or -name "*.h"  -or -name "*.c"  -or -name "*.cc" \) -exec clang-format -i {} \;

If you reached this file doing a git blame, please see README.clang-format (added 2 commits in the future of this one)
2020-07-11 09:17:33 +02:00
Albert Astals Cid 2e46cf22f5 CI: enable clang tidy performance checks 2020-01-02 14:27:11 +01:00
Michael Weghorn 748884b4c7 PDF: Implement scaling options for non-rasterized printing
Summary:
This adds another 'FilePrinter::printFile' method that
accepts an additional parameter to specify whether or not to
do scaling and passes the 'fit-to-page' to CUPS dependent
on what is specified.

If FilePrinter is used, The PDF generator now passes this
option depending on the scaling mode that was selected in the
custom print options widget, which is therefore now enabled
for non-rasterized printing as well.

Test Plan:
1) open a PDF document in Okular and open the print dialog
2) go to the "PDF Options" tab
3) verify that "Force rasterisation" is disabled, but the
  "Scale mode" combobox is active.
4) test all the three options available in the "Scale mode"
   combobox do what they say
5) Make sure the three options still work as expected for
   the "Force rasterisation" case.

Reviewers: #okular, ngraham, sander

Reviewed By: ngraham

Subscribers: aacid, fvogt, okular-devel

Tags: #okular

Differential Revision: https://phabricator.kde.org/D18179
2019-04-14 21:11:36 -06:00
Yuri Chornoivan c04ca1fa96 Fix minor EBN issues 2018-08-31 12:23:45 +03:00
Montel Laurent d780d15ea9 Merge remote-tracking branch 'origin/master' into frameworks
Conflicts:
	autotests/mainshelltest.cpp
	part.cpp
	part.h
	shell/shell.cpp
2015-03-17 08:47:52 +01:00
Albert Astals Cid a77bbac299 Fix typo 2015-03-14 16:10:09 +01:00
Montel Laurent 5da7c5f77d port to qCDebug. Autogenerate export headers 2014-10-27 22:35:06 +01:00
Frederik Gladhorn 75031eee7e Fix includes 2014-08-08 01:59:55 +02:00
Albert Astals Cid a716b3e4e0 kill all the deprecated functions now that we've change ABI anyway 2012-09-06 19:10:03 +02:00
Kevin Kofler e001fbab55 Fix landscape documents getting printed in portrait format if "Landscape" is selected in the print dialog (the default).
Partly based on a patch by Falk from KDE bug #181290.

BUG: 181290
REVIEW: 101513
2011-07-28 01:41:48 +02:00
Pino Toscano c05523da2b fix #include paths in core headers to other core headers to be relative
... and with double quotes brackets, so they can properly include each other without relying on the compiler include path
2011-06-01 10:51:31 +02:00
John Layt 80a04bd577 Whoops! Didn't relise we had an API/BIC guarantee on Okular. Restore previous
API and make it call the new API.

CCMAIL: kde-bindings@kde.org
CCMAIL: aacid@kde.org
CCBUG: 194586


svn path=/trunk/KDE/kdegraphics/okular/; revision=1134631
2010-06-04 19:04:05 +00:00
John Layt b30305b668 Enable Current Page option in Okular print dialog if running Qt >= 4.7
Changed exported api so cc: to bindings.
CCMAIL: kde-bindings@kde.org

CCBUG: 194586


svn path=/trunk/KDE/kdegraphics/okular/; revision=1134379
2010-06-04 08:25:25 +00:00
Luigi Toscano 2bacaf9e14 New method to get the proper PrintError from the printFile* return value
svn path=/trunk/KDE/kdegraphics/okular/; revision=1115578
2010-04-16 21:56:16 +00:00
John Layt ed9bbddace Print correct number of copies using new Qt api
Add eror code if print to file fails

BUG: 155695

svn path=/trunk/KDE/kdegraphics/okular/; revision=1065863
2009-12-24 14:39:49 +00:00
John Layt cc45ce4a1e Fix Print to File output by using Ghostscript ps2pdf to convert ps print file
into pdf format and save that.  Only enabled in PDF, DVI, and DJVU generators
if ps2pdf is found in the path.  Ghostscript is almost always guaranteed to
be installed given many parts of the printing stack depends on it.

Note that resulting PDF or PS file will have the page size as set in the print
dialog and not the page size of the original document, i.e. if an A5 booklet
is printed but the dialog page size is set to A4 then the resulting file will
be A4 and not A5.

svn path=/trunk/KDE/kdegraphics/okular/; revision=897000
2008-12-14 23:18:52 +00:00
John Layt 2550898805 Fixes to FilePrinter for Qt 4.4:
1) detectCupsService() finally works because QTCPSocket finally works.
   Assumes Cups is on localhost:631 which is a compromise as Qt won't
   even tell us if it is using Cups, let alone where Cups is.

2) Duplex printing obeys user selected option from dialog rather than 
   just guessing.

3) If custom page margins set then respect these


svn path=/trunk/KDE/kdegraphics/okular/; revision=895905
2008-12-11 23:04:07 +00:00
John Layt c262ebf0bf Read the Cups options set in the Printer Properties window and the KDE
Cups Page and Job Options tabs, and pass these on to lpr.

CCBUG: 160381

This needs to be backported to 4.0 but I don't have a checkout.

svn path=/trunk/KDE/kdegraphics/okular/; revision=817393
2008-06-05 23:06:21 +00:00
Pino Toscano a35532befd I feel really sorry in reverting the last commit, but we keep binary compatibility :/
svn path=/trunk/KDE/kdegraphics/okular/; revision=760476
2008-01-12 18:52:27 +00:00
Albert Astals Cid 1c6cc2484f const & is your friend
svn path=/trunk/KDE/kdegraphics/okular/; revision=760473
2008-01-12 18:36:53 +00:00
Pino Toscano bd294e1de6 move the FilePrinterPreview to the kpart (no need for it to be in the core library)
svn path=/trunk/KDE/kdegraphics/okular/; revision=744225
2007-12-03 00:17:12 +00:00
Dirk Mueller 7cfdc3dc80 header cleannness++
svn path=/trunk/KDE/kdegraphics/okular/; revision=742135
2007-11-27 08:44:10 +00:00
John Layt 1b1ed9451b Enable Okular printing features:
* Add FilePrinter class to enable printing via postscript files
* DJVU, PDF, and PS backends print FilePrinter
* All backends enable printing of bookmarked pages
* Print and Print Preview actions enabled/disabled depending on backends
  printing ability

Note that FilePrinter only works on *NIX platforms with Cups, lpr, or lp.



svn path=/trunk/KDE/kdegraphics/okular/; revision=741990
2007-11-26 21:43:54 +00:00