Re: [dev] Re: Tracking the caret

2006-08-24 Thread Mathias Bauer
W wrote:

I have successfully added a keylistener but I would really like to be
informed by caret movements - even if they are triggered by the mouse.

Has anyone ever listened to the the CARET_CHANGED event?


 If you are fine with getting notified for just mouse click and key
 events inside the document window you can use the
 com.sun.star.awt.XUserInputInteraction interface that is supported by
 the Controller objects of each document.

 If you just want to track if the document cursor is moved around a
 SelectionChanged listener might be appropriate also.
 
 What I would really like to do is knowing where the user is currently
 active - that is where the keyboard focus is and where the caret is.
 
 I guess a selection listener would be ok, if I could add it globally,
 but can you do that?

What means globally? A listener always must be registered at an
object, TANSTAAGL (There is no such things as a global listener ;-))
if that should mean you can just say gimme all events.

You always need a source to register for the events. Event sources for
user interactions in the OOo API usually are windows but their current
API only tracks events for each windows separately, you won't get events
for a complete window hierarchy. For this reason we added an API above a
complete window hierarchy inside a document window, the
XUserInputInteraction interface. Each Controller object that controls a
single document window implements this, having a single event source for
all windows seems to be a real mess IMHO.

I still don't understand your goal, the where in your sentence

 What I would really like to do is knowing where the user is currently
 active - that is where the keyboard focus is and where the caret is.

is too general and unspecific to me: is it enough to know in which
document window the cursor is and which element inside the window is
selected or at which position the cursor is set? Or are you also
interested to get a notification when the user clicks into scroll bars,
toolbars, dialogs, menues etc.?

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] valgrind work

2006-08-24 Thread Caolan McNamara
I see that there appears to be some valgrind work underway, at least in
reporting valgrind warnings. Can I suggest that accessibility be enabled
for these valgrind tests. I highly suspect there are a gadzillion
valgrind-findable bugs exposed with enabling a11y :-(

C.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] how to catch events everytime a character is entered into the Wordprocessor?

2006-08-24 Thread Mathias Bauer
Daniel Beck wrote:

 Hello,
 
 I want to catch events from openoffice everytime someone enters a
 character in the Worprocessor text area, or everytime someone selects an
 element from the context menu (The one obtained then doing right-mouse
 click on the edited document)
 
 I think that I have to get the XMenu and the XTextComponent from
 some service from the Wordprocessor to register my XMenuListener and my
 XTextListener. I found no such services.

I would go for the interfaces css.awt.XUserInputInteraction and
css.ui.XContextMenuInterception. Both interfaces are supported by the
Controller objects of our documents (IIRC).

Best regards,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Re: [releases] OOo 2.0.4 status meeting

2006-08-24 Thread Mathias Bauer
Caolan McNamara wrote:

 On Tue, 2006-08-22 at 12:56 +0200, Martin Hollmichel wrote:
 We still have some stoppers open (68776, animated gifs, 68046, API
 problem) and cws warningfixes03 (build breakage), cws hro08,  so that we
 target OOD680m3 for release candidate by the end of this week.

 Initial inactivity time (IIT) for patches is increased, the owner of the
 high scores will get a ping.
 http://eis.services.openoffice.org/patchreport/iit_index.html
 
 FWIW I'd like to mention two potential showstopping regressions (with
 patches to workaround attached)
 
 #i68822# crash on Input Mechanism commit in writer and

QA thinks that this is a duplicate to issue 68522 that is integrated
into m182 (and now OOD680m2) anyway. I compared the patch to the fix
from Frank and I think that this is true, so no need to integrate this
patch IMHO.

 #i68369# crash on shutdown under X

I can't say anything about the content (maybe PL can). Do you have a
real life scenario whith a crash? Until now it's only something
discovered by Valgrind.

Ciao,
Mathias

-- 
Mathias Bauer - OpenOffice.org Application Framework Project Lead
Please reply to the list only, [EMAIL PROTECTED] is a spam sink.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] Re: [releases] OOo 2.0.4 status meeting

2006-08-24 Thread Caolan McNamara
On Thu, 2006-08-24 at 13:26 +0200, Mathias Bauer wrote:
 Caolan McNamara wrote:
 
  On Tue, 2006-08-22 at 12:56 +0200, Martin Hollmichel wrote:
  We still have some stoppers open (68776, animated gifs, 68046, API
  problem) and cws warningfixes03 (build breakage), cws hro08,  so that we
  target OOD680m3 for release candidate by the end of this week.
 
  Initial inactivity time (IIT) for patches is increased, the owner of the
  high scores will get a ping.
  http://eis.services.openoffice.org/patchreport/iit_index.html
  
  FWIW I'd like to mention two potential showstopping regressions (with
  patches to workaround attached)
  
  #i68822# crash on Input Mechanism commit in writer and
 
 QA thinks that this is a duplicate to issue 68522 that is integrated
 into m182 (and now OOD680m2) anyway. I compared the patch to the fix
 from Frank and I think that this is true, so no need to integrate this
 patch IMHO.

Yup, it's the same problem, and all is under control on that front.

  #i68369# crash on shutdown under X
 
 I can't say anything about the content (maybe PL can). Do you have a
 real life scenario whith a crash? Until now it's only something
 discovered by Valgrind.

Indeed, if it doesn't crash for anyone else then that's fine and I won't
bang on about it for 2.0.4.

C.

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: [dev] valgrind work

2006-08-24 Thread Oliver Braun

Caolan McNamara wrote:

I see that there appears to be some valgrind work underway, at least in
reporting valgrind warnings. Can I suggest that accessibility be enabled
for these valgrind tests. I highly suspect there are a gadzillion
valgrind-findable bugs exposed with enabling a11y :-(


+1

Oliver

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Re: Tracking the caret

2006-08-24 Thread W



I have successfully added a keylistener but I would really like to be
informed by caret movements - even if they are triggered by the mouse.

Has anyone ever listened to the the CARET_CHANGED event?



If you are fine with getting notified for just mouse click and key
events inside the document window you can use the
com.sun.star.awt.XUserInputInteraction interface that is supported by
the Controller objects of each document.

If you just want to track if the document cursor is moved around a
SelectionChanged listener might be appropriate also.


What I would really like to do is knowing where the user is currently
active - that is where the keyboard focus is and where the caret is.

I guess a selection listener would be ok, if I could add it globally,
but can you do that?



What means globally? A listener always must be registered at an
object, TANSTAAGL (There is no such things as a global listener ;-))
if that should mean you can just say gimme all events.


I am sorry if I am being too vague. By global I meant in the context of 
the openoffice system. I had hoped I could add a listener to something 
like the com.sun.star.awt.XExtendedToolkit which fits my definition of 
global ;-)


The XExtendedToolkit supports an XFocusListener which should keep track 
of the object that currently has the input focus., but it does not seem 
to track the keyboard input focus (e.g. you do not get focus events when 
changing between two Writer windows).



You always need a source to register for the events. Event sources for
user interactions in the OOo API usually are windows but their current
API only tracks events for each windows separately, you won't get events
for a complete window hierarchy. For this reason we added an API above a
complete window hierarchy inside a document window, the
XUserInputInteraction interface. Each Controller object that controls a
single document window implements this, having a single event source for
all windows seems to be a real mess IMHO.


I like your honest opinion and I could not agree more. If I could just 
add a top-level (global :-)) listener which could inform me of the 
active window then I would be more than happy to add a second listener 
to that window.




I still don't understand your goal, the where in your sentence



I create Assistive Technologies (AT) to help users write/read text in 
their favorite programs. On Windows I have so far been able to use the 
Microsoft Accessiblity API (MSAA) to keep track of user focus and caret 
movements. I am now trying to figure out whether I can support 
OpenOffice on Windows, but as OpenOffice does not yet support MSAA I 
have to come up with an alternative way to figure out where the user is 
writing (I cannot help the user if I do not know where she is ;-)).





What I would really like to do is knowing where the user is currently
active - that is where the keyboard focus is and where the caret is.



is too general and unspecific to me: is it enough to know in which
document window the cursor is and which element inside the window is
selected or at which position the cursor is set? Or are you also
interested to get a notification when the user clicks into scroll bars,
toolbars, dialogs, menues etc.?


I am only interested in the keyboard focus and textselections. If the 
caret moves (by means of the keyboard, mouse or whatever) I would like 
to be able to retrieve the text in which the caret has now been placed, 
so that I might be able to help the user doing wordprediction and the 
like. That is if the user places the keyboard focus in a Writer document 
I would like to be able to find the document and the position of the caret.


I think I might be able to do some of this using the JAA bridge, but if 
it can be done using the JAA bridge one must be able to do it using only 
the OpenOffice API as well!?


Am I making any sense?

Thanks for your reply.

best regards

W





-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] performance: filter memory use ...

2006-08-24 Thread Michael Meeks
Hi there,

So - following on from my analysis of string duplication at:

http://go-oo.org/~michael/ustrings.ods

Having blamed a chunk of this on configmgr - it turns out that some of
the space I thought was there, is actually in the filter code - where we
construct strings from ASCII a lot.

Anyhow - since some nice macros had been used I could re-work this
fairly easily:

before:
41076K writable-private, 73560K readonly-private, and 14608K shared
41080K writable-private, 73560K readonly-private, and 14608K shared
41084K writable-private, 73560K readonly-private, and 14608K shared
after:
40936K writable-private, 73552K readonly-private, and 14608K shared
40812K writable-private, 73548K readonly-private, and 14608K shared
40924K writable-private, 73552K readonly-private, and 14608K shared

~ saving of ~150k or so (collecting a few of these up is worthwhile).
The code should also be faster :-)

Simple patch filed at:

http://www.openoffice.org/issues/show_bug.cgi?id=68929

ustring counts before/after:

107 ClipboardFormat
107 DetectService
107 Preferred
107 URLPattern
108 Extensions
108 MediaType
108 PreferredFilter
164 FileFormatVersion
165 FilterService
165 TemplateName
165 UIComponent
166 Flags
167 DocumentService
173 Filter
180 UserData
210 en-US
271 UINames
275 cfg:string
285 ItemDescriptorContainer
301 Name
351 Label
355 HelpURL
372 CommandURL
548 UIName
615 x-default
704 Type
   1094 LabelType

after:

 60 IsVisible
 63 com.sun.star.drawing.DrawingDocument
 63 Regular
 64 Bold
 69 Factory
 71 Style
 72 $1
 72 $2
 72 $3
 72 com.sun.star.uno.XInterface
 78 void
 88 com.sun.star.i18n.Transliteration.l10n
 95 com.sun.star.text.TextDocument
173 Filter
210 en-US
275 cfg:string
278 UIName
285 ItemDescriptorContainer
351 Label
355 HelpURL
372 CommandURL
541 Type
615 x-default
   1094 LabelType

HTH,

Michael.

-- 
 [EMAIL PROTECTED]  , Pseudo Engineer, itinerant idiot


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] performance: framework memory ...

2006-08-24 Thread Michael Meeks
Hi there,

So - I'm investigating the large number of duplicate / allocated
strings that float around the place. It seems like the framework is an
offender here:

incidence Name   size   wasted
~350  Type 16   5584
548   UIName   20  10940
368   CommandURL   28  10276
351   HelpURL  22   7700
347   Label18   6228
281   ItemDescriptorContainer  54  15120
Total 55,848

Of course, the overhead of so many small allocations is quite high too
I think, so it'd be good to fix this, and I guess it's prolly quite
easy, I imagine the sequence population in:

void SAL_CALL OReadMenuBarHandler::startElement:
Sequence PropertyValue  aSubMenuProp( 5 );
aSubMenuProp[0].Name = rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_COMMANDURL ));
aSubMenuProp[1].Name = rtl::OUString( 
RTL_CONSTASCII_USTRINGPARAM( ITEM_DESCRIPTOR_HELPURL ));
..

and similar code cut/pasted in:

void SAL_CALL OReadMenuPopupHandler::startElement(
void SAL_CALL OReadToolBoxDocumentHandler::startElement( - 3 incidences

explain the problem.

Of course, simple to fix - the question is, how do you want me to do
this ? in this 31337, threaded world where we don't want global inits;
it's not clear to me what the right solution is.

Is there a well-defined init time for this code ? [ some service
activation or something ] that we can hook to create some global
members ? or is there a better way ?

Thanks,

Michael.

-- 
 [EMAIL PROTECTED]  , Pseudo Engineer, itinerant idiot


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



[dev] Building OpenOffice.org 2.0.3 hangs (Win/tcsh)

2006-08-24 Thread Gia Shervashidze

Hi all,,,

Our community (www.gia.ge) finished Georgian translation (UI) and trying 
to build Full Installer  langpack.

For Linux (RH FC5) everything goes smoothly.
As for Windows - build process _hangs_ at Making Project Sandbox
Cygwin 1.21, VS NET 2003, JDK - 1.5.07
Any experience regarding the same problem? Any additional info needed?
Would You be so kind to help us - we really need check translation 
thoroughly before publishing.


BR,
g.\

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]