Bug 128650 - Calling setToDefault doesn't work in Impress
Summary: Calling setToDefault doesn't work in Impress
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Impress (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro
  Show dependency treegraph
 
Reported: 2019-11-07 13:16 UTC by Mark Hung
Modified: 2023-05-26 17:27 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document (11.35 KB, application/vnd.oasis.opendocument.presentation)
2019-11-07 13:16 UTC, Mark Hung
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mark Hung 2019-11-07 13:16:25 UTC
Description:
Calling setToDefault of XPropertyState interface on a text range in Impress doesn't work.

Steps to Reproduce:
1. Open the attached document.
2. Insert Basic code and run it.
Sub ResetCharFontToDefaultImpress

  Dim oDrawPages As Variant
  Dim oObj1 As Variant
  Dim oObj2 As Variant
  Dim oText As Variant
  Dim oStart As Variant
  Dim oObj3 As Variant

  oDrawPages = ThisComponent.getDrawPages()
  oObj1 = oDrawPages.getByIndex(0)
  oObj2 = oObj1.getByIndex(0)
  
  oText = oObj2.getText()
  oStart = oText.getStart()
  oObj3 = oText.createTextCursorByRange(oStart)
  
  oObj3.goRight(5, True)
  msgbox  oObj3.getString()
  
  oObj3.setPropertyToDefault("CharFontName")   

End Sub


Actual Results:
First five characters "aaaaa" show up in the message, the text is formatted with Times New Roman. 

Expected Results:
First five characters "aaaaa" should show up in the message, the font of the text should be set to its default ( Liberation Sans ).


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 Mark Hung 2019-11-07 13:16:56 UTC
Created attachment 155610 [details]
Sample document
Comment 2 Xisco Faulí 2019-11-08 12:19:04 UTC
Reproduced in

Version: 6.4.0.0.alpha1+
Build ID: 498c2d3944b666c2f016b65903001920db2cb2a4
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

and

LibreOffice 3.3.0 
OOO330m19 (Build:6)
tag libreoffice-3.3.0.4
Comment 3 QA Administrators 2021-11-08 04:08:05 UTC
Dear Mark Hung,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug