[Libreoffice-bugs] [Bug 128650] New: Calling setToDefault doesn't work in Impress

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Thu Nov 7 13:16:25 UTC 2019


https://bugs.documentfoundation.org/show_bug.cgi?id=128650

            Bug ID: 128650
           Summary: Calling setToDefault doesn't work in Impress
           Product: LibreOffice
           Version: 6.2.5.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Impress
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: marklh9 at gmail.com

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:

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20191107/7d7ca5c3/attachment.html>


More information about the Libreoffice-bugs mailing list