|
View:
New views
8 Messages
—
Rating Filter:
Alert me
|
|
|
[automation]What's in the clipboard if we copy a field?Hi,
If I copy a Object, such as a field or a frame with text, what's in the clipboard? Do the texts in the field or the frame exist in the clipboard? Do they exists in some special way? I can't paste just the text in usual ways. And because of the same reason I think, the following scripts in the "w_field1.inc" doesn't work. We always get warning "subject isn't correct !". [quote] testcase tFields_5 Dim sSubject as String sSubject = "This is a Subject" printlog "Insert / Fields / Subject" '/// <b> Insert / Fields / Subject </b> Call hNewDocument '/// File / Properties / Description , input some '/// + text in Subject Call fFileProperties("TabBeschreibung") Thema.Settext sSubject TabBeschreibung.OK '/// Insert / Fields / Subject InsertFieldsSubject '/// Check if the subject is correct Call wTypeKeys "<Shift Left>" EditCopy if GetClipboardText <> sSubject then ^^^^^^^^^^^^^^^^^^^^^^^^--------->This compare does not work, I wonder what's in the clipboard. Warnlog "Subject isn't correct !" end if Call hCloseDocument endcase [/quote] Thank you! Best regards, Lihua 2008-09-25 |
|
|
|
|
|
Re: [automation]What's in the clipboard if we copy a field?Ps. If you copy an object, the whole object gets into the clipboard.
If you only want the text, you'll have to bring up the properties for the Object, select the text you want, and from there copy it. With some Objects (such as Fields) it _should_ be possible to paste the text from the object outside the office - as text - not as the whole object. This is because "Fields" is actually not an "Object" but an "Text-Element". Best wishes / Fredrik On 29.09.08 11:26, Fredrik Haegg wrote: > Hi Zhu Lihua, > > you're right - that test does currently not work. > Issue: i85766 > > I'm working on updating all tests in the Optional-category. > > > Best wishes > / Fredrik Haegg > > > On 25.09.08 05:50, Zhu Lihua wrote: > >> Hi, >> >> If I copy a Object, such as a field or a frame with text, what's in the clipboard? Do the texts in the field or the frame exist in the clipboard? Do they exists in some special way? I can't paste just the text in usual ways. >> >> And because of the same reason I think, the following scripts in the "w_field1.inc" doesn't work. We always get warning "subject isn't correct !". >> >> >> [quote] >> testcase tFields_5 >> Dim sSubject as String >> sSubject = "This is a Subject" >> printlog "Insert / Fields / Subject" >> '/// <b> Insert / Fields / Subject </b> >> Call hNewDocument >> '/// File / Properties / Description , input some >> '/// + text in Subject >> Call fFileProperties("TabBeschreibung") >> Thema.Settext sSubject >> TabBeschreibung.OK >> '/// Insert / Fields / Subject >> InsertFieldsSubject >> '/// Check if the subject is correct >> Call wTypeKeys "<Shift Left>" >> EditCopy >> if GetClipboardText <> sSubject then >> ^^^^^^^^^^^^^^^^^^^^^^^^--------->This compare does not work, I wonder what's in the clipboard. >> Warnlog "Subject isn't correct !" >> end if >> Call hCloseDocument >> endcase >> [/quote] >> >> Thank you! >> >> Best regards, >> Lihua >> >> >> >> >> 2008-09-25 >> >> > > > -- Sun Microsystems GmbH Fredrik Haegg Nagelsweg 55 Software Engineer 20097 Hamburg Phone: +49 (0)40 23646 634 Germany Fax: +49 (0)40 23646 650 http://www.sun.de mailto:Fredrik.Haegg@... Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering |
|
|
Re: [automation]What's in the clipboard if we copy a field?On Mon, 29 Sep 2008 19:49:49 Fredrik Haegg wrote:
> Ps. If you copy an object, the whole object gets into the clipboard. > If you only want the text, you'll have to bring up the properties for the > Object, select the text you want, and from there copy it. > > With some Objects (such as Fields) it _should_ be possible to paste the > text > from the object outside the office - as text - not as the whole object. > This is because "Fields" is actually not an "Object" but an "Text-Element". What's wrong with simply copying, then using the "Paste Special" command, deselect everything except text (Haven't tried it since OO.o 2.3.x, so it might have changed - doubtful though). > > -- Alex Fisher Co-Lead, CD-ROM Project OpenOffice.org Marketing Community Contact Australia/New Zealand http://distribution.openoffice.org/cdrom/ |
|
|
Re: [automation]What's in the clipboard if we copy a field?Hi Alex,
not sure I understand you right. But the Testtool doesn't have a "Paste special"-feature, and when I try to "paste special" with for instance Wordpad (WinXP) - I get the same result as when I try to paste within Testtool, or some Editor: either nothing, or the editor simply jumps down a line - leaving the first one empty. Best wishes / Fredrik On 29.09.08 11:55, Alex Fisher wrote: > On Mon, 29 Sep 2008 19:49:49 Fredrik Haegg wrote: > >> Ps. If you copy an object, the whole object gets into the clipboard. >> If you only want the text, you'll have to bring up the properties for the >> Object, select the text you want, and from there copy it. >> >> With some Objects (such as Fields) it _should_ be possible to paste the >> text >> from the object outside the office - as text - not as the whole object. >> This is because "Fields" is actually not an "Object" but an "Text-Element". >> > > What's wrong with simply copying, then using the "Paste Special" command, > deselect everything except text (Haven't tried it since OO.o 2.3.x, so it > might have changed - doubtful though). > >> > > > -- Sun Microsystems GmbH Fredrik Haegg Nagelsweg 55 Software Engineer 20097 Hamburg Phone: +49 (0)40 23646 634 Germany Fax: +49 (0)40 23646 650 http://www.sun.de mailto:Fredrik.Haegg@... Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering |
|
|
Re: [automation]What's in the clipboard if we copy a field?On Mon, 29 Sep 2008 20:40:48 Fredrik Haegg wrote:
> Hi Alex, > > not sure I understand you right. But the Testtool doesn't have a "Paste > special"-feature, Sorry, my bad. I forgot you were using the testool. For normal use, the option is under the Edit menu. Probably only available when you're actually working on something. Probably wouldn't be a bad idea to be able to use it in the automated environment though. To check whether it does what you need, you'd have to use it manually. > and when I try to "paste special" with for instance Wordpad (WinXP) - I > get the same > result as when I try to paste within Testtool, or some Editor: either > nothing, or the editor > simply jumps down a line - leaving the first one empty. > > Best wishes > / Fredrik > > On 29.09.08 11:55, Alex Fisher wrote: > > On Mon, 29 Sep 2008 19:49:49 Fredrik Haegg wrote: > >> Ps. If you copy an object, the whole object gets into the clipboard. > >> If you only want the text, you'll have to bring up the properties for > >> the Object, select the text you want, and from there copy it. > >> > >> With some Objects (such as Fields) it _should_ be possible to paste the > >> text > >> from the object outside the office - as text - not as the whole object. > >> This is because "Fields" is actually not an "Object" but an > >> "Text-Element". > > > > What's wrong with simply copying, then using the "Paste Special" command, > > deselect everything except text (Haven't tried it since OO.o 2.3.x, so it > > might have changed - doubtful though). -- Alex Fisher Co-Lead, CD-ROM Project OpenOffice.org Marketing Community Contact Australia/New Zealand http://distribution.openoffice.org/cdrom/ |
|
|
Re: [automation]What's in the clipboard if we copy a field?No problem. The Testtool should be able to do whatever one can do manually,
which is also the case with "EditCopy", "EditPaste", "EditPasteSpecial" etc. Those commands triggers the same functions the user manually triggers. Same thing. Only different ways to do it. Best wishes / Fredrik On 29.09.08 13:19, Alex Fisher wrote: > On Mon, 29 Sep 2008 20:40:48 Fredrik Haegg wrote: > >> Hi Alex, >> >> not sure I understand you right. But the Testtool doesn't have a "Paste >> special"-feature, >> > > Sorry, my bad. I forgot you were using the testool. For normal use, the option > is under the Edit menu. Probably only available when you're actually working > on something. Probably wouldn't be a bad idea to be able to use it in the > automated environment though. > > To check whether it does what you need, you'd have to use it manually. > > >> and when I try to "paste special" with for instance Wordpad (WinXP) - I >> get the same >> result as when I try to paste within Testtool, or some Editor: either >> nothing, or the editor >> simply jumps down a line - leaving the first one empty. >> >> Best wishes >> / Fredrik >> >> On 29.09.08 11:55, Alex Fisher wrote: >> >>> On Mon, 29 Sep 2008 19:49:49 Fredrik Haegg wrote: >>> >>>> Ps. If you copy an object, the whole object gets into the clipboard. >>>> If you only want the text, you'll have to bring up the properties for >>>> the Object, select the text you want, and from there copy it. >>>> >>>> With some Objects (such as Fields) it _should_ be possible to paste the >>>> text >>>> from the object outside the office - as text - not as the whole object. >>>> This is because "Fields" is actually not an "Object" but an >>>> "Text-Element". >>>> >>> What's wrong with simply copying, then using the "Paste Special" command, >>> deselect everything except text (Haven't tried it since OO.o 2.3.x, so it >>> might have changed - doubtful though). >>> > > > > -- Sun Microsystems GmbH Fredrik Haegg Nagelsweg 55 Software Engineer 20097 Hamburg Phone: +49 (0)40 23646 634 Germany Fax: +49 (0)40 23646 650 http://www.sun.de mailto:Fredrik.Haegg@... Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering |
|
|
Re: Re: [automation]What's in the clipboard if we copy a field?Hi Fredrik and Alex,
Sorry for the late reply, since I'm just back from National Day vacation. Thanks for the discussion. I've read i85766. There is a term named "Expand". I don't know much about it. Could you please give me some hint for "expand"? Thank you! Best regards, Lihua 2008-10-06 发件人: Fredrik Haegg 发送时间: 2008-09-29 19:37:03 收件人: dev@... 抄送: 主题: Re: [qa-dev] [automation]What's in the clipboard if we copy a field? No problem. The Testtool should be able to do whatever one can do manually, which is also the case with "EditCopy", "EditPaste", "EditPasteSpecial" etc. Those commands triggers the same functions the user manually triggers. Same thing. Only different ways to do it. Best wishes / Fredrik On 29.09.08 13:19, Alex Fisher wrote: > On Mon, 29 Sep 2008 20:40:48 Fredrik Haegg wrote: > >> Hi Alex, >> >> not sure I understand you right. But the Testtool doesn't have a "Paste >> special"-feature, >> > > Sorry, my bad. I forgot you were using the testool. For normal use, the option > is under the Edit menu. Probably only available when you're actually working > on something. Probably wouldn't be a bad idea to be able to use it in the > automated environment though. > > To check whether it does what you need, you'd have to use it manually. > > >> and when I try to "paste special" with for instance Wordpad (WinXP) - I >> get the same >> result as when I try to paste within Testtool, or some Editor: either >> nothing, or the editor >> simply jumps down a line - leaving the first one empty. >> >> Best wishes >> / Fredrik >> >> On 29.09.08 11:55, Alex Fisher wrote: >> >>> On Mon, 29 Sep 2008 19:49:49 Fredrik Haegg wrote: >>> >>>> Ps. If you copy an object, the whole object gets into the clipboard. >>>> If you only want the text, you'll have to bring up the properties for >>>> the Object, select the text you want, and from there copy it. >>>> >>>> With some Objects (such as Fields) it _should_ be possible to paste the >>>> text >>>> from the object outside the office - as text - not as the whole object. >>>> This is because "Fields" is actually not an "Object" but an >>>> "Text-Element". >>>> >>> What's wrong with simply copying, then using the "Paste Special" command, >>> deselect everything except text (Haven't tried it since OO.o 2.3.x, so it >>> might have changed - doubtful though). >>> > > > > Sun Microsystems GmbH Fredrik Haegg Nagelsweg 55 Software Engineer 20097 Hamburg Phone: +49 (0)40 23646 634 Germany Fax: +49 (0)40 23646 650 http://www.sun.de mailto:Fredrik.Haegg@... Sitz der Gesellschaft: Sun Microsystems GmbH, Sonnenallee 1, D-85551 Kirchheim-Heimstetten Amtsgericht Muenchen: HRB 161028 Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer Vorsitzender des Aufsichtsrates: Martin Haering |
| Free Forum Powered by Nabble | Forum Help |