Issue 58012 - Format or pasted text not respected for Copy Paste into text with text position 'subscript'
Summary: Format or pasted text not respected for Copy Paste into text with text posit...
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.0
Hardware: PC Windows XP
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords: oooqa
Depends on:
Blocks:
 
Reported: 2005-11-16 14:42 UTC by khbellgardt
Modified: 2017-05-20 11:15 UTC (History)
4 users (show)

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


Attachments
To SBA: here is a sample file (8.16 KB, application/vnd.oasis.opendocument.text)
2006-09-14 07:46 UTC, khbellgardt
no flags Details
unexpected behaviour for copy paste (10.59 KB, application/vnd.oasis.opendocument.text)
2006-10-03 16:42 UTC, Rainer Bielefeld
no flags Details
Please evaluate issue 58012 (780 bytes, text/plain)
2008-05-13 03:22 UTC, chenjunjun
no flags Details
Thanks a lot (1.76 KB, text/plain)
2008-05-15 03:31 UTC, chenjunjun
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description khbellgardt 2005-11-16 14:42:28 UTC
When a text of several characters is selected and then directly overwritten by
new text, one would expect that the new text gets the same formatting as the
original text. This behaviour is also implemented in MS Word. 

In OOo the character formatting is not always preserved for the text. For
example, if there is given the following text, where NNN means normal formatting
and SSS subscript formatting:

<paragraph>NNNNSSSSNNNNSSSSNNNN</paragraph>

When NNNN in the middle is selected and overwritten by MMMM, then MMMM is
formated normally. 
When NNNN at the beginning or end of the paragraph is selected, MMMM takes the
subscript formatting. 
This is very strange and unexpected. Insted, the formatting of MMMM should
always be normal.

Some people on the german user-list reported, that also overwriting NNNN in the
middle will result in subscript formatting.
Comment 1 michael.ruess 2005-11-16 14:59:09 UTC
Reassigned to SBA.
Comment 2 kpalagin 2006-09-13 18:53:35 UTC
khbellgardt,
any chance you could provide sample document?
Comment 3 khbellgardt 2006-09-14 07:46:05 UTC
Created attachment 39131 [details]
To SBA: here is a sample file
Comment 4 Rainer Bielefeld 2006-10-03 16:41:01 UTC
I checked with "2.0.2  German version WIN XP: [680m5(Build9011)]" and also found
some unexpected behaviour, but I still have to sort my results. 

A first test result you find in my attached document
'Overwritebug_wayofconstruction.odt'
Comment 5 Rainer Bielefeld 2006-10-03 16:42:31 UTC
Created attachment 39531 [details]
unexpected behaviour for copy paste
Comment 6 Rainer Bielefeld 2006-10-03 16:45:09 UTC
I also saw the reported unexpected behaviour in 'Overwritebug.odt'.

@khbellgardt:
pls. specify your OS and Platform
Comment 7 khbellgardt 2006-10-04 07:47:03 UTC
To Rainer,
sorry, I forgot. My actual platform is WinXpHome and OOo2.03.
Comment 8 michael.ruess 2006-10-04 11:08:09 UTC
SBA already was the correct owner of this issue...
Comment 9 stefan.baltzer 2006-11-21 09:15:04 UTC
SBA: I understand the behavior as follows: The selected "normal" string gets
REMOVED before the first new character is entered. At this time, the newly
inserted character "obeys" the formatting (subscript) at the cursor position.
Thus the newly inserted characters are subscript, too.

This sounds technically logical. 

The behavior of Word in this case is more intuitive. As long as the cursor keeps
in that position, newly inserted charactes have the same attributes as the roved
ones. So Word does remember the "attributes of the recently removed characters"
as long as the cusor is not put in another position. Clicking somewhere else and
back leads to the same bahavior of newly inserted characters (then being
subscript, too).

But in general, Writer can do, too:
Other text attributes (i.e. "bold") behave as expected (caching the attributes
when a selection is overwritten or "over-pasted", but not when it is deleted
first (cursor staying in position) and then newly typed.

SBA->FMA: This behavior should apply for all character attributes.
Comment 10 chenjunjun 2008-05-06 09:17:17 UTC
When NNNN at the beginning or end of the paragraph is easy to fix,that is,MMMM 
would be normal.
Comment 11 chenjunjun 2008-05-13 03:22:16 UTC
Created attachment 53576 [details]
Please evaluate issue 58012
Comment 12 frank.meies 2008-05-13 07:50:45 UTC
Thank you for your patch. I'll have a look as soon as possible.
Comment 13 frank.meies 2008-05-13 11:32:14 UTC
fme->fl: Do we actually want to change our behavior in this case?

fme->chenjunjun: Please submit your patch as 'unified diff', otherwise I cannot
find out where exactly the patch has to be applied.
Comment 14 chenjunjun 2008-05-15 03:31:06 UTC
Created attachment 53656 [details]
Thanks a lot
Comment 15 Mathias_Bauer 2008-11-20 16:48:05 UTC
@fl: please, could you answer the question from fme?
Comment 16 Mathias_Bauer 2009-01-27 15:16:59 UTC
@fl: ping!
Comment 17 Mathias_Bauer 2009-05-25 14:21:32 UTC
Without an answer from Frank since a year I take the liberty to ignore him.
The request makes sense for me and now we have to find out if the patch indeed
implements it and if it is correct.

So for now I raise the target.

Michael, please take over.
Comment 18 mst.ooo 2009-10-05 17:40:54 UTC
hi chenjunjun,

sorry for taking so long to look at your patch; i simply forgot about it.
having had a look, i'm not sure your proposal is the right approach to fix this
issue.

your patch completely disables merging of text hints, which is not acceptable,
because usually merging is a good idea; only in specific circumstances (like
replace) should merging be disallowed.

the underlying problem is that in the sw core model, the concept of a position
at an attribute change cannot be expressed.
for the sw core model, a position is always between 2 characters, and there may
be several attribute changes between these characters.

currently a replace operation is implemented by first deleting the original
text, and then inserting the pasted/inserted text at the same text position.
unless i am mistaken, in order to implement the desired behaviour, either this
needs to be changed, or we need a higher fidelity position (and a flag to
disable hint merging in this case).
Comment 19 mst.ooo 2009-10-06 15:36:59 UTC
retarget
Comment 20 Rob Weir 2013-03-11 15:00:49 UTC
I'm adding this comment to all open issues with Issue Type == PATCH.  We have 220 such issues, many of them quite old.  I apologize for that.  

We need your help in prioritizing which patches should be integrated into our next release, Apache OpenOffice 4.0.

If you have submitted a patch and think it is applicable for AOO 4.0, please respond with a comment to let us know.

On the other hand, if the patch is no longer relevant, please let us know that as well.

If you have any general questions or want to discuss this further, please send a note to our dev mailing list:  dev@openoffice.apache.org

Thanks!

-Rob
Comment 21 Marcus 2017-05-20 11:15:15 UTC
Reset assigne to the default "issues@openoffice.apache.org".