[Okular-devel] Review Request 118950: Use correct #include for abs(int)

2014-06-26 Thread Vadim Zhukov

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/118950/
---

Review request for Okular.


Repository: okular


Description
---

Both C and C++ have abs() function. C one is abs(int), declared in stdlib.h; 
and C++ has std::abs(int), std::abs(long) and std::abs(long long) in 
cstdlib.h. But C++ has even more overloaded abs() versions in cmath, that 
do operate on floating point values.

core/utils.cpp incorrectly includes cmath while std::abs() calls near line 
140 use integer versions really:

 
std::abs(static_castint(selectedOutput-edid()-width()*10) - szMM.width())  
10
 
std::abs(static_castint(selectedOutput-edid()-height()*10) - szMM.height()) 
 10)

This patch changes include to cstdlib.


Diffs
-

  core/utils.cpp 71442f0 

Diff: https://git.reviewboard.kde.org/r/118950/diff/


Testing
---

Tested on OpenBSD/i386. Without this patch, build fails.


Thanks,

Vadim Zhukov

___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel


[Okular-devel] [okular] [Bug 336778] New: QR code in PDFs can't be printed using Okular

2014-06-26 Thread Florian Lorenz
https://bugs.kde.org/show_bug.cgi?id=336778

Bug ID: 336778
   Summary: QR code in PDFs can't be printed using Okular
Classification: Unclassified
   Product: okular
   Version: 0.17.5
  Platform: openSUSE RPMs
OS: Linux
Status: UNCONFIRMED
  Severity: minor
  Priority: NOR
 Component: PDF backend
  Assignee: okular-devel@kde.org
  Reporter: frosch...@gmail.com

Hello,
this is my first bug-report, so please give me some clues, if i am doing
something wrong in this bug-report.

OS: openSUSE 13.1, 64-bit, KDE 4.11.5, Linux-Kernel 3.11.10-17-desktop
Software: Okular 0.17.5
Hardware (printer): Canon i-SENSYS MF4340d with UFRII/UFRII LT driver for Linux
Version 2.80

Problem:
Sometimes i get some PDFs with QR-codes in it (e.g. train- or airplane-tickets,
university-certificates, etc.). Using Okular i can open and view these PDFs
properly, but i have trouble to print them nicely. Everything is printed well,
except of the implemented QR-code - the QR-code is just a black box with odd
stripes in it.

Reproducible: Always

Steps to Reproduce:
1. Open a PDF (with QR-codes in it) with Okular
2. Try to print this PDF using a Canon-printer
3. Watch the printed result
Actual Results:  
The printed QR-codes are just black boxes with some stripes in it.

Expected Results:  
The printed QR-codes should look like QR-codes :-)

Maybe there could be a problem with the Canon-printing-driver in combination
with Okulars PDF-backend, because i never had this printing-bug with my old
HP-printer.

Workaround: I don't have this problem, when i am using Firefox or GIMP to view
and print these PDFs.

-- 
You are receiving this mail because:
You are the assignee for the bug.
___
Okular-devel mailing list
Okular-devel@kde.org
https://mail.kde.org/mailman/listinfo/okular-devel