Bug 144614 - (Non-present) Direct formatting of Bold applied when paste text in textbox
Summary: (Non-present) Direct formatting of Bold applied when paste text in textbox
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: low minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Textbox
  Show dependency treegraph
 
Reported: 2021-09-20 06:42 UTC by Telesto
Modified: 2024-06-05 14:15 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (9.59 KB, application/vnd.oasis.opendocument.text)
2021-09-20 06:42 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2021-09-20 06:42:12 UTC
Description:
(Non-present) Direct formatting applied  when replacing text in textbox by pasted content

Steps to Reproduce:
1. Open the attached file
2. Select the text Lorem until Semper (part is also fine)
3. Enter the Textbox
4. Press CTRL+A
5. CTRL+V
6. For older versions -> Exit textbox

Actual Results:
Direct formatting applied

Expected Results:
Shouldn't be the case


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: d5e55d204b71710eb5eb5d2c683dd6698626df3c
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2021-09-20 06:42:29 UTC
Created attachment 175127 [details]
Example file
Comment 2 Telesto 2021-09-20 07:02:44 UTC
There is no Direct Formatting as fallback or the wrong DF is applied (not sure which one it is)
Comment 3 Henrik Palomäki 2021-09-20 09:30:19 UTC
Assuming that there is a step for "CTRL-C" between steps 2 and 3, I can confirm that some formatting is applied. It changes the font but does not show what it is; it shows only as an empty box in the font menu. 

Repro on

Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: a9cc066a86c6bd3423c5802c5a4eded55a50c754
CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: CL
Comment 4 Henrik Palomäki 2021-09-20 10:14:11 UTC
As a clarification for my previous comment: replace "formatting" by "direct formatting".
Comment 5 Timur 2021-09-22 12:28:36 UTC
Ctrl+A not needed, Bold also with simple paste. Easy to remove with Ctrl+M.
Seems like cause is explained in bug 111921.
Comment 6 QA Administrators 2023-09-23 03:15:40 UTC Comment hidden (obsolete)
Comment 7 Stéphane Guillou (stragu) 2024-06-05 14:11:49 UTC
In OOo 3.3, would apply Times New Roman to pasted text instead of keeping the Default Paragraph Style's Liberation Serif.
In recent trunk build, still uses a different font, without anything showing in font combobox.

In original contents.xml:

    <style:style style:name="P1" style:family="paragraph">
      <loext:graphic-properties draw:fill="none" draw:fill-color="#ffffff"/>
    </style:style>
    [...]
    <text:p text:style-name="Standard">
        <draw:frame text:anchor-type="paragraph" draw:z-index="0" draw:name="Shape1" draw:style-name="gr1" draw:text-style-name="P1" svg:width="6.88cm" svg:height="4.915cm" svg:x="5.523cm" svg:y="2.171cm">
          <draw:text-box>
            <text:p>Hello Hello Hello World Hello </text:p>
          </draw:text-box>
        </draw:frame>
      </text:p>

After pasting and saving, the object's style P1 becomes P2, and the newly created styles P1 (for the paragraph) and F1 (for the span) use style:font-name="F":

    <style:style style:name="P1" style:family="paragraph">
      <style:text-properties style:font-name="F" fo:font-size="12pt"/>
    </style:style>
    <style:style style:name="P2" style:family="paragraph">
      <loext:graphic-properties draw:fill="none" draw:fill-color="#ffffff"/>
    </style:style>
    [...]
    <style:style style:name="T1" style:family="text">
      <style:text-properties style:font-name="F" fo:font-size="12pt"/>
    </style:style>
    [...] 
      <text:p text:style-name="Standard">
        <draw:frame text:anchor-type="paragraph" draw:z-index="0" draw:name="Shape1" draw:style-name="gr1" draw:text-style-name="P2" svg:width="6.88cm" svg:height="4.915cm" svg:x="5.523cm" svg:y="2.171cm">
          <draw:text-box>
            <text:p text:style-name="P1">
              <text:span text:style-name="T1">Lorem ipsum</text:span>
            </text:p>
          </draw:text-box>
        </draw:frame>
      </text:p>
Comment 8 Stéphane Guillou (stragu) 2024-06-05 14:15:53 UTC
(In reply to Stéphane Guillou (stragu) from comment #7)
> the newly
> created styles P1 (for the paragraph) and F1 (for the span) use
> style:font-name="F"
...defined as:

<style:font-face style:name="F" svg:font-family="" style:font-family-generic="roman"/>

(already in the original file)