You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openoffice.apache.org by homer <br...@gmail.com> on 2016/03/15 13:20:12 UTC

ctrl+z not work when add a listener to keyboard

Hi,

I’m using java on windows 64bit ,my open office version is 3.2.1.

If I click on a RectangleShape ,then press alt+z,the selected shape do align action.(A keyhandler listen on key event.)
If I want to undo that align action,press ctrl+z as usual,nothing happened.
But ctrl+a ,ctrl+c,ctrl+v,ctrl+x all work.
If I move a shape by hand,then i can undo it by click menu "Edit/Undo:Move Rectangle”.But ctrl+z not work.
If the move is done by code, the edit menu is “Edit/Undo:Input”.

How can i tell openoffice that the move is done by hand when it is actually did by code.
How can i undo the move code did by press ctrl+z.
Please advise.

Best Regards
Randy



 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: ctrl+z not work when add a listener to keyboard

Posted by homer <br...@gmail.com>.
Many thanks,JZA.I will use Xray to search relational undo api.
Looking forward to hear from you.

> 在 2016年3月15日,23:28,JZA <ac...@gmail.com> 写道:
> 
> Even if there is not XUndoManager there was an Undo service AFAIK. Since
> the documentation has move on from 3.x I would suggest to use the XRay
> explorer and look for services available. I tried lookingfor legacy
> releases, but only the binaries are there, I could look for old
> documentation release notes regarding the API changes, but that would take
> a while.
> http://www.openoffice.org/development/releases/3.2_sdk.html#newapis
> 
> On Tue, Mar 15, 2016 at 11:14 AM, homer <br...@gmail.com> wrote:
> 
>> openoffice3.4 has com.sun.star.document.XUndoManager interface which 3.2
>> has not.
>> Since I have to use 3.2 ,do we have any other way to solve this?
>> 
>>> 下面是被转发的邮件:
>>> 
>>> 发件人: JZA <ac...@gmail.com>
>>> 主题: 回复: ctrl+z not work when add a listener to keyboard
>>> 日期: 2016年3月15日 GMT+8 21:38:13
>>> 收件人: dev <de...@openoffice.apache.org>
>>> 回复-收件人: dev@openoffice.apache.org
>>> 
>>> Why not trigger the undo action instead through the API?
>>> On Mar 15, 2016 8:20 AM, "homer" <br...@gmail.com> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> I’m using java on windows 64bit ,my open office version is 3.2.1.
>>>> 
>>>> If I click on a RectangleShape ,then press alt+z,the selected shape do
>>>> align action.(A keyhandler listen on key event.)
>>>> If I want to undo that align action,press ctrl+z as usual,nothing
>> happened.
>>>> But ctrl+a ,ctrl+c,ctrl+v,ctrl+x all work.
>>>> If I move a shape by hand,then i can undo it by click menu
>> "Edit/Undo:Move
>>>> Rectangle”.But ctrl+z not work.
>>>> If the move is done by code, the edit menu is “Edit/Undo:Input”.
>>>> 
>>>> How can i tell openoffice that the move is done by hand when it is
>>>> actually did by code.
>>>> How can i undo the move code did by press ctrl+z.
>>>> Please advise.
>>>> 
>>>> Best Regards
>>>> Randy
>>>> 
>>>> 
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>>>> For additional commands, e-mail: dev-help@openoffice.apache.org
>>>> 
>>>> 
>> 
>> 
> 
> 
> -- 
> Alexandro Colorado
> Apache OpenOffice Contributor
> 9060 55AB FFD2 2F02 0E1A  3409 599C 14FC 9450 D3CF


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
For additional commands, e-mail: dev-help@openoffice.apache.org


Re: ctrl+z not work when add a listener to keyboard

Posted by JZA <ac...@gmail.com>.
Even if there is not XUndoManager there was an Undo service AFAIK. Since
the documentation has move on from 3.x I would suggest to use the XRay
explorer and look for services available. I tried lookingfor legacy
releases, but only the binaries are there, I could look for old
documentation release notes regarding the API changes, but that would take
a while.
http://www.openoffice.org/development/releases/3.2_sdk.html#newapis

On Tue, Mar 15, 2016 at 11:14 AM, homer <br...@gmail.com> wrote:

> openoffice3.4 has com.sun.star.document.XUndoManager interface which 3.2
> has not.
> Since I have to use 3.2 ,do we have any other way to solve this?
>
> > 下面是被转发的邮件:
> >
> > 发件人: JZA <ac...@gmail.com>
> > 主题: 回复: ctrl+z not work when add a listener to keyboard
> > 日期: 2016年3月15日 GMT+8 21:38:13
> > 收件人: dev <de...@openoffice.apache.org>
> > 回复-收件人: dev@openoffice.apache.org
> >
> > Why not trigger the undo action instead through the API?
> > On Mar 15, 2016 8:20 AM, "homer" <br...@gmail.com> wrote:
> >
> >> Hi,
> >>
> >> I’m using java on windows 64bit ,my open office version is 3.2.1.
> >>
> >> If I click on a RectangleShape ,then press alt+z,the selected shape do
> >> align action.(A keyhandler listen on key event.)
> >> If I want to undo that align action,press ctrl+z as usual,nothing
> happened.
> >> But ctrl+a ,ctrl+c,ctrl+v,ctrl+x all work.
> >> If I move a shape by hand,then i can undo it by click menu
> "Edit/Undo:Move
> >> Rectangle”.But ctrl+z not work.
> >> If the move is done by code, the edit menu is “Edit/Undo:Input”.
> >>
> >> How can i tell openoffice that the move is done by hand when it is
> >> actually did by code.
> >> How can i undo the move code did by press ctrl+z.
> >> Please advise.
> >>
> >> Best Regards
> >> Randy
> >>
> >>
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> >> For additional commands, e-mail: dev-help@openoffice.apache.org
> >>
> >>
>
>


-- 
Alexandro Colorado
Apache OpenOffice Contributor
9060 55AB FFD2 2F02 0E1A  3409 599C 14FC 9450 D3CF

Fwd: ctrl+z not work when add a listener to keyboard

Posted by homer <br...@gmail.com>.
openoffice3.4 has com.sun.star.document.XUndoManager interface which 3.2 has not.
Since I have to use 3.2 ,do we have any other way to solve this?

> 下面是被转发的邮件:
> 
> 发件人: JZA <ac...@gmail.com>
> 主题: 回复: ctrl+z not work when add a listener to keyboard
> 日期: 2016年3月15日 GMT+8 21:38:13
> 收件人: dev <de...@openoffice.apache.org>
> 回复-收件人: dev@openoffice.apache.org
> 
> Why not trigger the undo action instead through the API?
> On Mar 15, 2016 8:20 AM, "homer" <br...@gmail.com> wrote:
> 
>> Hi,
>> 
>> I’m using java on windows 64bit ,my open office version is 3.2.1.
>> 
>> If I click on a RectangleShape ,then press alt+z,the selected shape do
>> align action.(A keyhandler listen on key event.)
>> If I want to undo that align action,press ctrl+z as usual,nothing happened.
>> But ctrl+a ,ctrl+c,ctrl+v,ctrl+x all work.
>> If I move a shape by hand,then i can undo it by click menu "Edit/Undo:Move
>> Rectangle”.But ctrl+z not work.
>> If the move is done by code, the edit menu is “Edit/Undo:Input”.
>> 
>> How can i tell openoffice that the move is done by hand when it is
>> actually did by code.
>> How can i undo the move code did by press ctrl+z.
>> Please advise.
>> 
>> Best Regards
>> Randy
>> 
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
>> For additional commands, e-mail: dev-help@openoffice.apache.org
>> 
>> 


Re: ctrl+z not work when add a listener to keyboard

Posted by JZA <ac...@gmail.com>.
Why not trigger the undo action instead through the API?
On Mar 15, 2016 8:20 AM, "homer" <br...@gmail.com> wrote:

> Hi,
>
> I’m using java on windows 64bit ,my open office version is 3.2.1.
>
> If I click on a RectangleShape ,then press alt+z,the selected shape do
> align action.(A keyhandler listen on key event.)
> If I want to undo that align action,press ctrl+z as usual,nothing happened.
> But ctrl+a ,ctrl+c,ctrl+v,ctrl+x all work.
> If I move a shape by hand,then i can undo it by click menu "Edit/Undo:Move
> Rectangle”.But ctrl+z not work.
> If the move is done by code, the edit menu is “Edit/Undo:Input”.
>
> How can i tell openoffice that the move is done by hand when it is
> actually did by code.
> How can i undo the move code did by press ctrl+z.
> Please advise.
>
> Best Regards
> Randy
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@openoffice.apache.org
> For additional commands, e-mail: dev-help@openoffice.apache.org
>
>