Bug 4.2 beta: Copy/Paste formats not consistent

Page 1 of 1 (8 items)
This post has 7 Replies | 0 Followers

Posts 13420
Mark Barnes | Forum Activity | Posted: Tue, Nov 23 2010 1:35 AM | Locked

I was doing some work on a new tutorial video and trying to help users predict what will happen when they try the different export formats.

But I noticed that you get different results when you select text, right click and choose copy, than when you select text, choose print/export, and choose copy. Specifically, hyperlinks are not inserted when you choose the former method, but they are when you choose the later method.

This inconsistency is confusing frankly, and I'm sure it's possible to reuse the print/export code in the right-click menu. Can this be done for 4.2?

Posts 13420
Mark Barnes | Forum Activity | Replied: Tue, Nov 23 2010 5:19 AM | Locked

As an update, if you paste into notes after select/right-click/copy, you do get hyperlinks, but not when you paste into Word.

Clipboard Spy tells me that the Libronix.DigitalLibrary.RichText, and XAML formats are being created correctly, but the RTF format used by Word, isn't. As a side note, the XAML and Libronix formats aren't created at all when using print/export.

RTF via right-click/copy:

{\rtf1\ansi{\fonttbl{\f0\froman Times New Roman;}}{\stylesheet {\snext0 Normal;}}\fet0\uc1 {\lang1033\i\fs22\ltrch {\fs22 The Date of Jesus\rquote  Crucifixion, pp. }{\fs22 1809\endash 1810}}}

RTF via print/export:

{\rtf1\ansi{\fonttbl{\f0\froman Times New Roman;}}{\colortbl;\red0\green0\blue255;}{\stylesheet {\snext0 Normal;}}\fet0\uc1 \pard\fi360\ltrpar\ql {\lang1033\i\fs22\ltrch The Date of Jesus\rquote  Crucifixion, pp. {\field{\*\fldinst HYPERLINK "logosres:esvsb;ref=Page.pp_1809-1810"}{\fldrslt\ul\cf1 1809\endash 1810}}}\par \line Page \chpgn .  Exported from {\field{\*\fldinst HYPERLINK "http://www.logos.com/"}{\fldrslt\ul\cf1 Logos Bible Software 4}}, 13:32 23 November 2010.}

Libronix.DigitalLibrary.RichText (minus the binary characters):

<Span Language="en-US" FontSize="11" FontItalic="True" FlowDirection="LeftToRight">
<Run FontSize="11" Text="The Date of Jesus’ Crucifixion, pp. " />
<ResourceLink ResourceId="LLS:ESVSB" Reference="page.1809-1810">
<Reference Reference="page.1809-1810">
<Run FontSize="11" Text="1809–1810" />
</Reference>
</ResourceLink>
</Span>

XAML:

<?xml version="1.0" encoding="utf-16"?>
<Span xml:space="preserve" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<Span FontStyle="Italic" FontSize="11pt" FlowDirection="LeftToRight">
<Run FontSize="11pt">The Date of Jesus’ Crucifixion, pp. </Run>
<Hyperlink NavigateUri="logosres:LLS:ESVSB;ref=Page.pp_1809-1810">
<Run FontSize="11pt">1809-1810</Run>
</Hyperlink>
</Span>
</Span>
Posts 13420
Mark Barnes | Forum Activity | Replied: Wed, Nov 24 2010 2:54 AM | Locked

Bump?

Posts 4077
Melissa Snyder | Forum Activity | Replied: Wed, Nov 24 2010 10:55 AM | Locked

I can run this by development.

Posts 9151
LogosEmployee
Bradley Grainger (Faithlife) | Forum Activity | Replied: Wed, Nov 24 2010 5:12 PM | Locked

Mark Barnes:

I'm sure it's possible to reuse the print/export code in the right-click menu. Can this be done for 4.2?

The code to add the hyperlinks exists in a different assembly from the resource driver code (which performs the copy to clipboard from the context menu), so it's not actually easy to reuse the code; we can't add this for 4.2.

Posts 13420
Mark Barnes | Forum Activity | Replied: Wed, Nov 24 2010 5:25 PM | Locked

Fair enough. It is quite confusing though, when you consider as well that the Copy Footnotes option doesn't apply to the copy from Print/Export.

So you can have:

  • No footnotes and no hyperlinks (use right-click, and have footnotes OFF)
  • Hyperlinks but no footnotes (use print/export)
  • Footnotes but no hyperlinks (use right-click, and have footnotes ON)

But you can't have

  • Footnotes and hyperlinks
Posts 1721
LogosEmployee
Bob Pritchett | Forum Activity | Replied: Wed, Nov 24 2010 8:26 PM | Locked

Mark Barnes:
As an update, if you paste into notes after select/right-click/copy, you do get hyperlinks, but not when you paste into Word.

I believe that's intentional. Most people paste into Word (or did when we designed this) to make a document for printing; the hyperlinks are unnecessary clutter in a Word document. (I don't even like to get hyperlinks when pasting from the web into Word.)

 

Posts 19302
Rosie Perera | Forum Activity | Replied: Thu, Nov 25 2010 2:10 AM | Locked

Bob Pritchett:

Mark Barnes:
As an update, if you paste into notes after select/right-click/copy, you do get hyperlinks, but not when you paste into Word.

I believe that's intentional. Most people paste into Word (or did when we designed this) to make a document for printing; the hyperlinks are unnecessary clutter in a Word document. (I don't even like to get hyperlinks when pasting from the web into Word.)

When you paste into Word you get a choice of whether to Keep Source Formatting, Match Destination Formatting, or paste Text Only. It should be up to the user whether to keep the hyperlinks being pasted in or not. There are times when I want to keep them, from wherever. (There's a reasonable default, but that is changeable -- I can't remember what the defaul is anyomre because I've changed it back and forth so many times.)

Page 1 of 1 (8 items) | RSS