PATCH: Print

Toshitaka Fujioka kimageshop@master.kde.org
Sat, 11 Aug 2001 19:26:57 +0900


--------------Boundary-00=_XOFWM579S6S7YUYWO2AP
Content-Type: text/plain;
  charset="iso-8859-1"
Content-Transfer-Encoding: 8bit

Hello,

This patch can let printing with Krayon.
BUG: 
1. You can print only a current active image.
2. You can print only one page.

Please review.
-- 
Toshitaka Fujioka
http://www.kde.org                The K Desktop Environment Project
                                                    fujioka@kde.org
http://www.kde.gr.jp               Japan KDE User's Group
                                                    toshitaka@kde.gr.jp

-- We offer the best Desktop Environment to you.  (This is my goal. ;-)) --   
  


--------------Boundary-00=_XOFWM579S6S7YUYWO2AP
Content-Type: text/x-diff;
  charset="iso-8859-1";
  name="koffice-krayon-print-20010811.diff"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="koffice-krayon-print-20010811.diff"

SW5kZXg6IGNvcmUva2lzX2RvYy5jYwo9PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09ClJDUyBmaWxlOiAvaG9tZS9rZGUva29m
ZmljZS9rcmF5b24vY29yZS9raXNfZG9jLmNjLHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjU1CmRp
ZmYgLXUgLTMgLWQgLXAgLXIxLjU1IGtpc19kb2MuY2MKLS0tIGNvcmUva2lzX2RvYy5jYwkyMDAx
LzA0LzI0IDIyOjA3OjU5CTEuNTUKKysrIGNvcmUva2lzX2RvYy5jYwkyMDAxLzA4LzExIDEwOjE4
OjM5CkBAIC0xMjkwLDQgKzEyOTAsMTAgQEAgdm9pZCBLaXNEb2M6OnNsb3RMYXllcnNVcGRhdGVk
KCkKICAgICBlbWl0IGxheWVyc1VwZGF0ZWQoKTsKIH0KIAorUVJlY3QgS2lzRG9jOjpnZXRJbWFn
ZVJlY3QoKQoreworICAgIFFSZWN0IGltYWdlUmVjdCggMCwgMCwgbV9wQ3VycmVudC0+d2lkdGgo
KSwgbV9wQ3VycmVud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TGlzdDsKKyNp
Zm5kZWYgSEFWRV9LREVQUklOVAorICAgIGludCBmcm9tID0gcHJpbnRlci5mcm9tUGFnZSgpOwor
ICAgIGludCB0byA9IHByaW50ZXIudG9QYWdlKCk7CisgICAgaWYoICFmcm9tICYmICF0byApCisg
ICAgeworICAgICAgICBmcm9tID0gcHJpbnRlci5taW5QYWdlKCk7CisgICAgICAgIHRvID0gcHJp
bnRlci5tYXhQYWdlKCk7CisgICAgfQorICAgIGZvciAoIGludCBpID0gZnJvbTsgaSA8PSB0bzsg
aSsrICkKKyAgICAgICAgaW1hZ2VMaXN0LmFwcGVuZCggaSApOworI2Vsc2UKKyAgICBpbWFnZUxp
c3QgPSBwcmludGVyLnBhZ2VMaXN0KCk7CisjZW5kaWYKKyAgICBRVmFsdWVMaXN0PGludD46Okl0
ZXJhdG9yIGl0ID0gaW1hZ2VMaXN0LmJlZ2luKCk7CisgICAgZm9yICggOyBpdCAhPSBpbWFnZUxp
c3QuZW5kKCk7ICsraXQgKQorICAgIHsKKyAgICAgICAgaWYgKCBpdCAhPSBpbWFnZUxpc3QuYmVn
aW4oKSApCisgICAgICAgICAgICBwcmludGVyLm5ld1BhZ2UoKTsKKworICAgICAgICBtX3BEb2Mt
PnBhaW50Q29udGVudCggcGFpbnQsIG1fcERvYy0+Z2V0SW1hZ2VSZWN0KCkgKTsKKyAgICB9Cisg
ICAgcGFpbnQuZW5kICgpOwogfQogCiAjaW5jbHVkZSAia2lzX3ZpZXcubW9jIgpJbmRleDogY29y
ZS9raXNfdmlldy5oCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC9ob21lL2tkZS9rb2ZmaWNlL2tyYXlv
bi9jb3JlL2tpc192aWV3LmgsdgpyZXRyaWV2aW5nIHJldmlzaW9uIDEuNDIKZGlmZiAtdSAtMyAt
ZCAtcCAtcjEuNDIga2lzX3ZpZXcuaAotLS0gY29yZS9raXNfdmlldy5oCTIwMDEvMDMvMTEgMjI6
MTk6MjcJMS40MgorKysgY29yZS9raXNfdmlldy5oCTIwMDEvMDgvMTEgMTA6MTk6MDgKQEAgLTEx
Niw2ICsxMTYsOSBAQCBjbGFzcyBLaXNWaWV3IDogcHVibGljIEtvVmlldwogICAgIHZvaWQJem9v
bV9vdXQoIGludCB4LCBpbnQgeSApOwogICAgIGZsb2F0ICAgem9vbUZhY3RvcigpOwogICAgIHZv
aWQgICAgc2V0Wm9vbUZhY3RvciggZmxvYXQgemYgKTsKKworICAgIHZpcnR1YWwgdm9pZCBzZXR1
cFByaW50ZXIoIEtQcmludGVyICZwcmludGVyICk7CisgICAgdmlydHVhbCB2b2lkIHByaW50KCBL
UHJpbnRlciAmcHJpbnRlciApOwogICAgIAogIHNpZ25hbHM6CiAgCg==

--------------Boundary-00=_XOFWM579S6S7YUYWO2AP--