Issue 115580 - copy words from writer/calc to impress, font size changed.
Summary: copy words from writer/calc to impress, font size changed.
Status: REOPENED
Alias: None
Product: General
Classification: Code
Component: ui (show other issues)
Version: OOo 3.3 RC4
Hardware: PC All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: CJK
Depends on:
Blocks: 84405
  Show dependency tree
 
Reported: 2010-11-15 02:25 UTC by amy2008
Modified: 2017-05-20 11:33 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Writer source file (8.07 KB, application/vnd.oasis.opendocument.text)
2010-11-15 02:31 UTC, amy2008
no flags Details
Calc source file (7.30 KB, application/vnd.oasis.opendocument.spreadsheet)
2010-11-15 02:31 UTC, amy2008
no flags Details
WriterToImpress:some characters become bigger (18.90 KB, image/jpeg)
2010-11-15 02:34 UTC, amy2008
no flags Details
CalcToImpress:some characters become bigger (13.65 KB, image/jpeg)
2010-11-15 02:34 UTC, amy2008
no flags Details
Messy text appears when pasting from Writer To Impress. (50.42 KB, image/pjpeg)
2011-09-23 03:26 UTC, JingDongChen
no flags Details
To fix the part of this issue - pasting from sc to sd (7.40 KB, patch)
2011-11-17 02:44 UTC, JingDongChen
no flags Details | Diff
Updated patch (5.94 KB, patch)
2011-11-25 22:52 UTC, Pedro Giffuni
no flags Details | Diff
To fix this issue completely, by JingDongChen from china, 2011-11-28. (20.33 KB, patch)
2011-11-28 02:21 UTC, JingDongChen
no flags Details | Diff
Updated patch - comment cleanups (18.75 KB, patch)
2012-02-14 19:45 UTC, Pedro Giffuni
no flags Details | Diff
Debug Window in a non-product build (163.95 KB, image/png)
2012-02-24 23:27 UTC, Ariel Constenla-Haile
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description amy2008 2010-11-15 02:25:36 UTC
Can reproduce it in OOo3.3RC4 on WinXP.

copy  words from writer/calc to impress, some font size may get bigger.
See attachments.
Comment 1 amy2008 2010-11-15 02:31:24 UTC
Created attachment 74800 [details]
Writer source file
Comment 2 amy2008 2010-11-15 02:31:55 UTC
Created attachment 74801 [details]
Calc source file
Comment 3 amy2008 2010-11-15 02:34:25 UTC
Created attachment 74802 [details]
WriterToImpress:some characters become bigger
Comment 4 amy2008 2010-11-15 02:34:53 UTC
Created attachment 74803 [details]
CalcToImpress:some characters become bigger
Comment 5 amy2008 2010-11-15 02:49:23 UTC
From Writer/Calc to Impress:
Some characters become bigger, namely fontsize from '小四' to '小二'.

Maybe it is related to issue 80898.
http://www.openoffice.org/issues/show_bug.cgi?id=80898


Comment 6 amy2008 2010-11-19 07:06:26 UTC
OS: from Win XP to All
Comment 7 amy2008 2010-12-06 08:54:15 UTC
cjk
Comment 8 Raphael Bircher 2011-09-21 06:21:28 UTC
Assinged to jingdong after a short talk with him
Comment 9 JingDongChen 2011-09-21 06:28:15 UTC
I am familiar with the relevant code on copy&paste operation, as to this bug, I will try my best to fix it. this bug has also been assigned to me by Raphael.
Comment 10 JingDongChen 2011-09-21 06:29:08 UTC
I am familiar with the relevant code on copy&paste operation, as to this bug, I
will try my best to fix it. this bug has also been assigned to me by Raphael.
Comment 11 JingDongChen 2011-09-21 06:40:36 UTC
to start it from 2011-10-08
Comment 12 JingDongChen 2011-09-23 03:26:17 UTC
Created attachment 76800 [details]
Messy text appears when pasting from Writer To Impress.

Messy text appears when pasting from Writer To Impress.
Comment 13 JingDongChen 2011-09-23 03:26:52 UTC
I found another problem on issue #115580 in AOOo3.4 WindowsXP:
1) copy&paste a text from Calc to impress 
	1. Creat a clac document;
	2. Input text string in any cell of clac sheet;
	3. Copy and paste this text into impress.
		
	actual result:
		font attribs have changed, e.g. font type, font size.  		

	expectated result:
		keep the same font attribs, besides text.  

2) copy&paste a text from writer to impress 
	1. Creat a writer document;
	2. Input a line of text string in writer doc;
	3. Copy and paste this text into impress.

	actual result:
		1. text string is messy, maybe due to an incorrect text encoding.
		2. font attribs have changed, e.g. font type, font size.  		

	expectated result:
		keep the same text without garbled char and with correct font attribs.
Comment 14 JingDongChen 2011-09-23 03:28:37 UTC
I found another problem on issue #115580 in AOOo3.4 WindowsXP:
1) copy&paste a text from Calc to impress 
	1. Creat a clac document;
	2. Input text string in any cell of clac sheet;
	3. Copy and paste this text into impress.
		
	actual result:
		font attribs have changed, e.g. font type, font size.  		

	expectated result:
		keep the same font attribs, besides text.  

2) copy&paste a text from writer to impress 
	1. Creat a writer document;
	2. Input a line of text string in writer doc;
	3. Copy and paste this text into impress.

	actual result:
		1. text string is messy, maybe due to an incorrect text encoding.
		2. font attribs have changed, e.g. font type, font size.  		
		
		Refer to the attachment: 76800.

	expectated result:
		keep the same text without garbled char and with correct font attribs.
Comment 15 JingDongChen 2011-09-23 03:29:19 UTC
I found another problem on issue #115580 in AOOo3.4 WindowsXP:
1) copy&paste a text from Calc to impress 
	1. Creat a clac document;
	2. Input text string in any cell of clac sheet;
	3. Copy and paste this text into impress.
		
	actual result:
		font attribs have changed, e.g. font type, font size.  		

	expectated result:
		keep the same font attribs, besides text.  

2) copy&paste a text from writer to impress 
	1. Creat a writer document;
	2. Input a line of text string in writer doc;
	3. Copy and paste this text into impress.

	actual result:
		1. text string is messy, maybe due to an incorrect text encoding.
		2. font attribs have changed, e.g. font type, font size.  		
		
		Refer to the attachment: 76800.

	expectated result:
		keep the same text without garbled char and with correct font attribs.
Comment 16 JingDongChen 2011-11-17 02:44:17 UTC
Created attachment 77026 [details]
To fix the part of this issue - pasting from sc to sd

So far, I've just fixed a part of the issue:115580, pasting the text content from sc to sd, another part(pasting from sw to sd) have not finished yet, due to some problems of our company.
Comment 17 Pedro Giffuni 2011-11-17 15:24:40 UTC
I have committed your change:

svn commit -m "i115580: Fix pasting from sc to sd. Patch by JingDonChen."
Sending        editeng/source/editeng/impedit.hxx
Sending        editeng/source/editeng/impedit2.cxx
Sending        editeng/source/editeng/impedit4.cxx
Sending        editeng/source/editeng/impedit5.cxx
Transmitting file data ....
Committed revision 1203218.

Thank you very much for your contribution!
Comment 18 Pedro Giffuni 2011-11-17 21:52:47 UTC
(In reply to comment #17)
> I have committed your change:
> 


I undid this change for now:

The patch is good but in general there is consensus that we should
hold from fixing these type of bugs until we have the IP Review
(critical for release) under control.

(Well I also broke the build with another change so I preferred
to revert now everything.)

I do want to encourage you to finish this important bugfix so that
we can commit a complete fix before 3.4 Release.

Thanks!
Comment 19 JingDongChen 2011-11-25 08:21:54 UTC
Comment on attachment 77026 [details]
To fix the part of this issue - pasting from sc to sd

In this patch the func - AdjustParaAttribsByStyleSheet had better do a little change, as follow:

    if ( pNode->GetContentAttribs().HasItem( nWhich ) )

    ==>should be changed to
 
    if ( pNode->GetContentAttribs().GetItems().GetItemState( nWhich, sal_False ) == SFX_ITEM_ON  )
Comment 20 Pedro Giffuni 2011-11-25 22:52:07 UTC
Created attachment 77048 [details]
Updated patch

I have updated your patch with the change you requested and I also
reduced your comments:
Once committed it will be evident in SVN who did the changes,
where they start and where they end.

Also please note that the indentation in the third chunk of
editeng/source/editeng/impedit4.cxx
is incorrect (I moved it back a little to be nearer to the "else").

Thanks for working on this.
Comment 21 JingDongChen 2011-11-28 02:21:34 UTC
Created attachment 77052 [details]
To fix this issue completely, by JingDongChen from china, 2011-11-28.

The patch(Bug115580_20111128.diff) completely fixed this issue, and it insteads of the past patch(Bug115580.diff). Is there anybody to test it ASAP? looking forward to the result of test! thanks!
Comment 22 Pedro Giffuni 2012-02-09 15:16:11 UTC
Hello;

Sorry for the delay but this is not an area where finding an expert is easy (I am certainly not one)!

One question concerning the code in
sw/source/ui/app/docshini.cxx

Is it absolutely unavoidable to do all those language checks when creating a new document? I would think that those have to be done just the same every time you change the font so there's probably code already to do that elsewhere.
Comment 23 Pedro Giffuni 2012-02-14 19:45:35 UTC
Created attachment 77219 [details]
Updated patch - comment cleanups

Many cleanups in form:

There's no need to mention the date: for one thing the patch will
likely be applied in a different day than when it was written, but
also SVN registers the date. Likewise it's not necessary to tag where
the changes start or end.

There were some indentation issues too.
Comment 24 Pedro Giffuni 2012-02-14 19:47:16 UTC
Comment on attachment 77048 [details]
Updated patch

This was only for the first part it's obsolete now.
Comment 25 Pedro Giffuni 2012-02-21 19:28:58 UTC
Apparently there are no objections towards the approach used
by Jing Dong and I see no reason to perpetuate this issue:

Sending        editeng/source/editeng/editdoc.cxx
Sending        editeng/source/editeng/editdoc.hxx
Sending        editeng/source/editeng/eertfpar.cxx
Sending        editeng/source/editeng/impedit.hxx
Sending        editeng/source/editeng/impedit2.cxx
Sending        editeng/source/editeng/impedit4.cxx
Sending        editeng/source/editeng/impedit5.cxx
Sending        sw/inc/docsh.hxx
Sending        sw/source/ui/app/docshini.cxx
Sending        sw/source/ui/dochdl/swdtflvr.cxx
Transmitting file data ..........
Committed revision 1291962.

Thank you for your contribution and the patience to resolve
this issue!
Comment 26 Ariel Constenla-Haile 2012-02-24 23:27:47 UTC
Created attachment 77251 [details]
Debug Window in a non-product build

Opening a new Draw or Impress document causes the following assertion several times:

Error: SetText failed From File /mnt/build/openoffice/apache/trunk/main/editeng/source/outliner/outliner.cxx at Line 617

When the changes made for this issue are reverted, these assertions are gone.
Comment 27 Ariel Constenla-Haile 2012-02-24 23:31:54 UTC
Reopened.

Those assertions are obviously triggered by the changes for this issue. You should investigate if they point to some error in the code introduced or not.
Comment 28 Ariel Constenla-Haile 2012-02-24 23:37:55 UTC
(In reply to comment #25)
> Apparently there are no objections towards the approach used
> by Jing Dong and I see no reason to perpetuate this issue:

obviously this meant that nobody in the know of the affected code had the time to look deep into this patch.

You should really stop committing patches by others as far as you do not have a deep knowledge of the subject.

Committing code means verifying 
* the patch applies
* the code builds
* the code works
* no regressions where introduced
* and so on
Comment 29 Pedro Giffuni 2012-02-25 00:46:53 UTC
Hmmm ..  I spent some time cleaning the code, I have the patches running in my system, I had the code reviewed by someone else, and ... still shit happens, sorry.

Except for build fixes I wont be committing any more patches until after the release anyways, this was the last pending issue for me.
Comment 30 Pedro Giffuni 2012-02-25 01:59:09 UTC
The issue is only seen while debugging, it apparently had no real
consequence on the working instance and that's why I didn't notice
anything strange in my testing.

For now I reverted the changes in Revision 1293507.
Comment 31 Marcus 2017-05-20 11:33:30 UTC
Reset assigne to the default "issues@openoffice.apache.org".