Bugzilla – Attachment 121721 Details for
Bug 96896
Writer crashes when frame title is changed via API and user closes print preview
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Open a document and change frame title via API (VBScript)
test.vbs (text/plain), 1.02 KB, created by
Rodrigo Castanheira
on 2016-01-05 00:29:45 UTC
(
hide
)
Description:
Open a document and change frame title via API (VBScript)
Filename:
MIME Type:
Creator:
Rodrigo Castanheira
Created:
2016-01-05 00:29:45 UTC
Size:
1.02 KB
patch
obsolete
>Function MakePropertyValue(cName, uValue) > Dim oSM, oPropertyValue > Set oSM = CreateObject("com.sun.star.ServiceManager") > Set oPropertyValue = oSM.Bridge_GetStruct("com.sun.star.beans.PropertyValue") > oPropertyValue.Name = cName > oPropertyValue.Value = uValue > Set MakePropertyValue = oPropertyValue >End Function > >' Main >Dim oSM, oDesk, oDoc >Set oSM = CreateObject("com.sun.star.ServiceManager") >Set oDesk = oSM.createInstance("com.sun.star.frame.Desktop") >Dim OpenOptions() >' ReDim OpenOptions(0) ' uncomment to open in read-only mode >' Set OpenOptions(0) = MakePropertyValue("ReadOnly", True) ' uncomment to open in read-only mode >Set oDoc = oDesk.loadComponentFromURL("private:factory/swriter", "_blank", 0, OpenOptions) >Dim oCtrl, oFrame >Set oCtrl = oDoc.CurrentController >Set oFrame = oCtrl.Frame >oFrame.Title = "My Title" >Msgbox "KEEP THIS DIALOG OPEN. On Writer document, select File -> Print preview, then close preview." >oDoc.Close (True) >Set oDoc = Nothing
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 96896
: 121721 |
123218
|
123633