Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

Download or installation problems? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - Removing Java from windows, menus, and printing
Removing Java from windows, menus, and printing
 
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Testing
View previous topic :: View next topic  
Author Message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Mon Mar 05, 2012 5:36 pm    Post subject: Removing Java from windows, menus, and printing Reply with quote

While Apple still provides Java for Mac OS X, Apple has stated that they will stop providing Java for a future version of Mac OS X and since NeoOffice's windows, menus, offscreen image drawing, and printing is tied to Apple's specific variant of Java, switching to Oracle's Java would likely be very painful so Ed and I felt it was time to start removing Java from the above parts of the NeoOffice code.

Many Mac OS X-specific features in NeoOffice are already fully native such as copy and paste, drag and drop, text layout, services menu, and Mac OS X 10.7's versions and full screen support so this new Java removal effort is not new and really just a continuation of the work we have been doing over the last few years.

While I doubt that this Java removal will be totally complete before our next release of NeoOffice, removal of Java from our printing and offscreen image drawing code is quite feasible so I went ahead and started this process by removing Java from printing as parts of the printing process were already written in native code. We switched to native code to display the print and page setup dialogs and to do the actually drawing to the print pages but some Java was still needed to query the printer and start a print job.

Edit by pluby on 24 March 2012: we finished removing Java from printing and offscreen drawing much faster than expected so we have expected our scope to try and remove Java from all windows and menus before Mac OS X 10.8 is released this summer.

Please note that even after this Java removal process is complete, NeoOffice's underlying OpenOffice.org will still need Java for some features such as Base to work. However, these Java-based OpenOffice.org features do not use Apple's Mac OS X-specific Java GUI functions and they should work using Oracle's Java. What we are doing is replacing any our code that uses Apple's Mac OS X-specific Java GUI functions with native Cocoa and Core Graphics functions.

Patrick


Last edited by pluby on Sat Mar 24, 2012 10:35 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Mon Mar 05, 2012 5:53 pm    Post subject: Reply with quote

I have finished removing Java from NeoOffice's printing code and included this new, 100% native printing code in the test patch at the end of this post.

I focussed a lot of my testing in the following areas where we had to fix a lot of bugs when we originally implemented Java-based printing:

1. Landscape - Both NeoOffice and OpenOffice.org printed only portrait pages and rotated the content 90 degrees to emulate landscape. This made viewing landscape pages difficult in the Preview application dificult unless you explicitly rotated the page. With this test patch, landscape pages are now displayed in the Preview application like Apple's Mac OS X applications.

2. Documents with a mixture of portrait and landscape pages - I still remember the difficulty of making Java printing handle the documents in bug 2202 so I tested extensively by printing the attached "2202-2263_2202_Test file.odt" file.

3. Brochure printing - I went through the steps for printing a Writer document in brochure mode starting with both A4 and A5 pages using the steps in this NeoWiki article.

4. Envelopes - Implementing printing to envelope paper sizes was very difficult to get working properly in our Java-based printing code due to the fact that OpenOffice.org and each Mac OS X printer driver may define portrait and landscape differently when any envelope paper size is selected so I used the attached "Untitled 3.odt" file to test envelope printing.

If anyone can install the test patch. Please let us know if they see any new printing bugs or reappearance any old printing bugs:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.2.1-Patch-4-Test-1-Intel.dmg

If you want to revert back to the old Java-based printing code, reinstall NeoOffice 3.2.1 Patch 4 from the NeoOffice patch download page.

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Tue Mar 06, 2012 9:37 pm    Post subject: Reply with quote

I printed (or ran though the printing system to PDF) several of the old EPS documents and some Arabic ones, with no ill effects noted.

When I have some more time, also I want to run some of my old mail-merge documents and make sure they still seem OK. But so far it all seems seamless Smile

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Tue Mar 06, 2012 9:59 pm    Post subject: Reply with quote

sardisson wrote:
I printed (or ran though the printing system to PDF) several of the old EPS documents and some Arabic ones, with no ill effects noted.


I forgot to mention that I had tested some EPS images in Writer myself but thanks for testing. EPS images are an easy thing for me to forgot about.

sardisson wrote:
When I have some more time, also I want to run some of my old mail-merge documents and make sure they still seem OK. But so far it all seems seamless Smile


One thing that I was unable to test was printer margins. My printer has equal margins on all sides so it is really difficult to verify that I am properly handling printer margins. IIRC, when I was working on bug 2202, you needed to have a printer with a bottom margin much bigger than the sides or top margins.

Patrick
Back to top
View user's profile Send private message Visit poster's website
revsmitty
Keymaker


Joined: May 15, 2005
Posts: 94
Location: Iowa, USA

PostPosted: Tue Mar 06, 2012 11:08 pm    Post subject: Reply with quote

I just downloaded and ran the test documents along with a number of landscape and portrait documents including some very small margins and everything worked well. One document had margins of less than .25 and showed up fine on screen. It did get cut off slightly by the printer when I went to .19 for a bottom margin on a landscape document.

Galen
Back to top
View user's profile Send private message
revsmitty
Keymaker


Joined: May 15, 2005
Posts: 94
Location: Iowa, USA

PostPosted: Wed Mar 07, 2012 9:30 am    Post subject: Reply with quote

Just caught what may be a bug in this test patch. When I installed it on my 10.7 machine and tried to print only selected pages it didn't print the pages I selected. EX. I selected pages 6 to 8 in the print dialogue but got pages 1 to 3. This also happens when I select print to PDF:View PDF in Preview

I am reinstalling patch 4 and will try the same document again to see what happens.
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Wed Mar 07, 2012 10:00 am    Post subject: Reply with quote

revsmitty wrote:
Just caught what may be a bug in this test patch. When I installed it on my 10.7 machine and tried to print only selected pages it didn't print the pages I selected. EX. I selected pages 6 to 8 in the print dialogue but got pages 1 to 3. This also happens when I select print to PDF:View PDF in Preview


I can also reproduce this same behavior on Mac OS X 10.5 so I have clearly broken the page range functionality.

Today I will investigate this page range bug and I will post a new test patch when I have a fix.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Wed Mar 07, 2012 10:42 am    Post subject: Reply with quote

I have fixed the page range bug in the following test patch. Can you install the test patch and tell us if the bug is fixed for you?:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.2.1-Patch-4-Test-2-Intel.dmg

Patrick
Back to top
View user's profile Send private message Visit poster's website
revsmitty
Keymaker


Joined: May 15, 2005
Posts: 94
Location: Iowa, USA

PostPosted: Wed Mar 07, 2012 10:53 am    Post subject: Reply with quote

I downloaded and tried it and didn't have the page range problem. I wonder though if I am getting the download properly because the print preview didn't show the landscape page turned sideways and when I checked About NeoOffice it only said patch 4 not Patch 4 test 2 which I would expect to see.
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Wed Mar 07, 2012 11:01 am    Post subject: Reply with quote

revsmitty wrote:
I downloaded and tried it and didn't have the page range problem. I wonder though if I am getting the download properly because the print preview didn't show the landscape page turned sideways and when I checked About NeoOffice it only said patch 4 not Patch 4 test 2 which I would expect to see.


The "Test" part of the test patch won't display anywhere so you can't check using that. The way to check is to paste the following command in a Terminal window, press the Return key, and if the date is 7 March, then you have the latest test patch:

Code:
ls -l /Applications/NeoOffice.app/Contents/basis-link/program/libvclmxi.dylib


If you have the latest test patch and landscape pages are not displaying in the Preview application properly, can you attach a sample document that I can use to try to and reproduce what you are seeing?

Patrick
Back to top
View user's profile Send private message Visit poster's website
revsmitty
Keymaker


Joined: May 15, 2005
Posts: 94
Location: Iowa, USA

PostPosted: Wed Mar 07, 2012 11:13 am    Post subject: Reply with quote

Ignore that part about not displaying the landscape properly in print preview. It was as it should be.
Back to top
View user's profile Send private message
revsmitty
Keymaker


Joined: May 15, 2005
Posts: 94
Location: Iowa, USA

PostPosted: Wed Mar 07, 2012 11:23 am    Post subject: Reply with quote

Everything checked out correctly and with the test patch 2 everything prints as it should.
Back to top
View user's profile Send private message
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Wed Mar 07, 2012 11:29 am    Post subject: Reply with quote

revsmitty wrote:
Everything checked out correctly and with the test patch 2 everything prints as it should.


That is good to hear. I have started working on removing Java from offscreen drawing so if you or anyone else finds any printing problems in the latest test patch, please don't hesitate to post as I won't release an official patch until at least the end of March.

Patrick
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11856
Location: California, USA

PostPosted: Wed Mar 21, 2012 8:35 am    Post subject: Reply with quote

I have finished removing all Java code from NeoOffice's offscreen drawing. In the following test patch, all drawing done to an offscreen image or sent to the printer is done natively using Mac OS X's Cocoa and core graphics functions. Only drawing to windows still uses Java.

Please note that while I have tested the code to verify that none of the many drawing bugs that we fixed in the Java code appeared after switching to fully native code, there still may be bugs that I did not find. Such bugs will most likely appear as incorrect drawing behavior such as unexpected colors or faint drawing artifacts left on the screen but it is possible that you might encounter a crashing bug so save your work frequently while using the test patch.

One other change in this test patch is that now all radio and push buttons are drawn natively using Mac OS X's HITheme functions. Before, most were drawn natively but radio and push buttons were still drawn using Java.

Now that push buttons are drawn natively, the default button in a dialog will be blue like the default button in the native open, save, and print dialogs. A screen snapshot of the new blue default button is shown below. Also, I found that NeoOffice's underlying OpenOffice.org code clips the bottom off of checkboxes and radio buttons in some of the dialogs so, in those cases, the test patch will paint Mac OS X's small version checkboxes and radio buttons so that they will fit in the drawing space that the OpenOffice.org code allocates.

If anyone can install the test patch. Please let us know if they see any new printing bugs or reappearance any old printing bugs:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.2.1-Patch-4-Test-3-Intel.dmg

Patrick
Back to top
View user's profile Send private message Visit poster's website
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Wed Mar 21, 2012 3:36 pm    Post subject: Reply with quote

I printed something with the previous patch, which seemed to work well, but I forgot to mention here because the ink ran out and I couldn't make out all the details.

I'll test the patch, but it might be a few days before I have anything to print.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Testing All times are GMT - 7 Hours
Goto page 1, 2, 3 ... 10, 11, 12  Next
Page 1 of 12

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.
Page Generation: 0.04 Seconds