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

--- Comment #5 from Mike Kaganski <[email protected]> ---
Sorry for the incomplete macro. The one in comment 3 will save the file with
PDF extension, but in ODF format. Here is the better one:

Sub ExportAsSelf
  doc = ThisComponent
  If doc.hasLocation And Not doc.isReadonly Then
    url = doc.getLocation
    args = doc.getArgs
    For i = LBound(args) To UBound(args)
      If args(i).Name = "FilterName" Then
        If args(i).Value = "draw_pdf_import" Then args(i).Value =
"draw_pdf_Export"
      End If
    Next i
    doc.storeToURL(url, args)
    doc.setModified(false)
  End If
End Sub

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to