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

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


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


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Mar 21, 2012 3:55 pm    Post subject:

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


Note that you can also test most of the printing functionality by selecting either the Preview or Save as PDF options in the native print dialog. No matter which option is selected, the same code is executed because Mac OS X sends print print output for any of the options to a temporary PDF file. Only after the temporary file is created does the selected option make any difference.

Also, note that with the latest test patch, you are using the offscreen image drawing by opening and scrolling through a Writer document as Writer draws all text in an offscreen image and then copies the portions of the image to the document window as needed. Running a slideshow will also use offscreen image drawing as NeoOffice's underlying OpenOffice.org code draws the next slide in an offscreen image and then copies the image to the screen when you move to the next slide.

Patrick
Back to top
revsmitty
Keymaker


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

PostPosted: Thu Mar 22, 2012 2:06 pm    Post subject: Test Patch 4

I have downloaded and installed test patch 4 and have used it successfully to print a number of documents in the last two days. Mostly text documents in different formats but also tried a multi page draw document with multiple colored jpegs. It seems to work wonderfully.

Galen
Back to top
ovvldc
Captain Naiobi


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

PostPosted: Thu Mar 22, 2012 3:03 pm    Post subject:

I printed a big document to PDF and it looked fine.

I did notice that it briefly said that it was renumbering the pages and then didn't show a progress bar and wasn't responsive for a while. Then the file showed up and NeoOffice caught up with input. Mind you, my time machine was running at the time, which makes everything else a bit slow..

BTW, this was with Patch-4-Test-3

best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Mar 22, 2012 5:16 pm    Post subject:

ovvldc wrote:
I did notice that it briefly said that it was renumbering the pages and then didn't show a progress bar and wasn't responsive for a while. Then the file showed up and NeoOffice caught up with input. Mind you, my time machine was running at the time, which makes everything else a bit slow..


Like when we used Java for printing, NeoOffice's underlying OpenOffice.org code will still block and wait for the native print job to finish its work. My initial theory is that sending a print job to the printer will lengthen the print job as the print job won't end until after the temporary PDF file has been accepted by the printer driver software.

To test my theory, try printing the same document using the Save as PDF option in the native print dialog. If my theory is correct, NeoOffice should block for only a few seconds after the print progress dialog disappears and the saved PDF should appear in the Finder immediately after that.

Patrick
Back to top
ovvldc
Captain Naiobi


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

PostPosted: Fri Mar 23, 2012 1:22 pm    Post subject:

Actually, let me rephrase that: I exported to PDF, not printed.

I will try your suggestion.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sat Mar 24, 2012 11:07 am    Post subject:

I found the following small bugs in the native offscreen drawing code in the last test patch and I have fixed them in the following test patch:

1. While default push buttons are now blue as they should be, pressing a default push button should make the button slightly darker. This darkening was failing in the previous test patch.

2. In Impress, expanding, hiding, and then expanding the Slide Transition panel caused the transition list's scrollbar to be painted in the wrong position. This bug occurs in both the old Java and the new native drawing code so I fixed it in the latest test patch.

Since implementing native printing and offscreen drawing are now complete and we still have a few months before Mac OS X 10.8 is released, I have started work on the next phases of removing Java:

1. Drawing natively directly to the underlying native window that Java uses.
2. Replace Java menus with native menus
3. Replace Java windows and event handling with native windows and event handling

I have made some progress on the first of the above 3 phases. Although I still have some work to do before I will have a test patch available, the screen snapshot below shows that natively drawing directly to the underlying native window that Java uses works.

If anyone can install the test patch. Please let us know if they see any drawing errors that don't occur in NeoOffice 3.2.1 Patch 4:

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

Patrick
Back to top
ovvldc
Captain Naiobi


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

PostPosted: Sun Mar 25, 2012 4:15 am    Post subject:

Good luck with the event handling. IIRC, the event handling design was very different from Cocoa, and that was one of the main reasons you used Java in the first place. I hope it doesn't get too frustrating.

Best wishes,
Oscar

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Mar 25, 2012 8:54 am    Post subject:

ovvldc wrote:
Good luck with the event handling. IIRC, the event handling design was very different from Cocoa, and that was one of the main reasons you used Java in the first place. I hope it doesn't get too frustrating.


The implementation work is actually much simpler than the original Java work. The main reason it is easier now is that we had to solve many of the Java issues that we encountered by overriding or extending Apple's Java code with native code. Writing the original code Java-based code was definitely very frustrating due but those problems forced us to understand how Java's underlying native code handled native windows, menus, and printing.

As a result of our past frustrations, we already have lots of native code so our approach has been to take that native code, expand it by duplicating our Java code's logic natively, and then remove the old Java code bit by bit. So far, this approach has been working well. Printing and offscreen image drawing, which took many months to implement and fix all of the bugs that users found, only took a few weeks to convert to completely native using this approach.

Another benefit that this approach has is that it is the lowest risk approach. Ed and I hate to throw away code that has been proven to work well so by replacing Java code with nearly identical native logic, we can keep our code changes isolated and small and size to reduce the risk of causing new bugs to occur.

One thing to note is that we are not duplicating any of the OpenOffice.org window, menu, printing code as their code as their code is not safe to run in the multi-threaded event dispatching environment that Java used. We will continue to use this multi-threaded event dispatching because the safest approach is to not change our overall event dispatching code and, instead, just reduce the current 2 step process (Java converts native events to Java event and then we convert Java events to OpenOffice.org internal events) to only one step (convert native events directly to OpenOffice.org internal events). We will still dispatch the events on a separate thread and in the same order as before.

I hope that gives some background on this work.

Patrick
Back to top
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Sun Mar 25, 2012 9:54 am    Post subject:

I love reading these technical tidbits!

Latest test patch installed. I did only some cursory testing but all looked ok.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Mar 25, 2012 10:44 am    Post subject:

djpimley wrote:
I love reading these technical tidbits!


That is good to hear. After reading Oscar's post I realized that I had not explained how we were approaching the "de-Javafication" work. I wanted to convey that we are essentially doing this work like home remodeling project and proceeding room by room and avoiding a complete rewrite of our code.

I also forgot to mention that since stability is always our primary concern, we won't put this code in a NeoOffice 3.2.1 patch. Instead, we will put this code in our next beta release (NeoOffice 3.3 Beta?) that will also include any new Mac OS X 10.8 features such as codesigning our application so that users don't see 10.8's scary unsafe application warning.

Once NeoOffice 3.3 is out of beta (hopefully very soon after Mac OS X 10.8 is released), we will then make the Java-based NeoOffice 3.2.1 release our free download release.

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sun Mar 25, 2012 9:33 pm    Post subject: Drawing artifacts and crash

Sorry I've been silent for a while; been very busy. I have been installing the test patches, but haven't had much time to put them through their paces.

Tonight, unfortunately, I've discovered a drawing bug (reproducible with Test-3 and Test-4 installed) and what I suspect is a related crash (only seen after I installed Test-4, and not reproducible).

I opened the attached .tsv file in Calc, selected cell A1, scrolled (two-fingered scrolling on the trackpad) to the right end, shift-clicked BW6 (to select all the cells), and then scrolled back to the left edge.

It's not 100% reproducible, but almost all the time, there are drawing artifacts in the ~3 rows below the selection when scrolling back to the left side. If it doesn't reproduce, just keep scrolling left/right at varying speeds, and it should show up.

The crash occurred scrolling back to the left edge; about half-way to the left side, Neo just beachballed and then :poof: As I said before, I haven't been able to reproduce it, but I've included it because it happened during the same behavior that displayed the artifacts.

10.5/Intel.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sun Mar 25, 2012 9:45 pm    Post subject:

I'm also seeing drawing artifacts around the selected cell, even when there's no (native) selection highlight for a selected range. Again, I'm scrolling the document one way and then coming back.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sun Mar 25, 2012 9:53 pm    Post subject:

…And I've just had the crash again Sad

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Mar 25, 2012 10:03 pm    Post subject:

I am unable to reproduce the drawing errors that you see on my Mac OS X 10.5 machine so can you check the Console application and see if there are any error messages that start with "soffice.bin"?

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sun Mar 25, 2012 10:32 pm    Post subject:

Smokey,

I looked at your crash log again and notice that you have the following system hack. I forgot that Apple did not eliminate input manager system hacks until after Mac OS X 10.5:

/Library/InputManagers/ChimericalConsole

Can you move the above folder, reboot, and see if you still see either the drawing errors or the crashing?

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Testing All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, ... 10, 11, 12  Next
Page 2 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.