ooo-build r12049 - trunk/patches/src680
- From: ccheney svn gnome org
- To: svn-commits-list gnome org
- Subject: ooo-build r12049 - trunk/patches/src680
- Date: Sat, 29 Mar 2008 04:57:05 +0000 (GMT)
Author: ccheney
Date: Sat Mar 29 04:57:05 2008
New Revision: 12049
URL: http://svn.gnome.org/viewvc/ooo-build?rev=12049&view=rev
Log:
2008-03-29 Chris Cheney <ccheney ubuntu com>
* patches/src680/apply: add ubuntu-mstopdf to UbuntuHardyOnly
* patches/src680/ubuntu-mstopdf.diff: Add ConvertMSToPDF
* patches/src680/xulrunner-1.9.diff: Corrected to use sdkdir
as in official xulrunner libxul.pc instead of libdir.
Distributions which modify libxul.pc should add special cased
code to support whatever they happened to rename sdkdir to.
(forgot to svn add ubuntu-mstopdf.diff before last commit)
Added:
trunk/patches/src680/ubuntu-mstopdf.diff
Added: trunk/patches/src680/ubuntu-mstopdf.diff
==============================================================================
--- (empty file)
+++ trunk/patches/src680/ubuntu-mstopdf.diff Sat Mar 29 04:57:05 2008
@@ -0,0 +1,41 @@
+diff -urNp wizards/source/tools/MSToPDF.xba wizards/source/tools/MSToPDF.xba
+--- wizards/source/tools/MSToPDF.xba 1969-12-31 21:00:00.000000000 -0300
++++ wizards/source/tools/MSToPDF.xba 2008-02-28 16:34:16.000000000 -0300
+@@ -0,0 +1,28 @@
++<?xml version="1.0" encoding="UTF-8"?>
++<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
++<script:module xmlns:script="http://openoffice.org/2000/script" script:name="MSToPDF" script:language="StarBasic">Sub ConvertMSToPDF(cFile)
++ cURL = ConvertToURL(cFile)
++
++ ' Open the document.
++ ' This assumes the document is valid and OO can import it.
++ oDoc = StarDesktop.loadComponentFromURL(cURL, "_blank", 0, Array(MakePropertyValue("Hidden", True),))
++ ' Remove the sufix
++ cFile = Left(cFile, Len(cFile)-4)+".pdf"
++ cURL = ConvertToURL(cFile)
++ ' Save the document using a filter.
++ oDoc.storeToURL(cURL, Array(MakePropertyValue("FilterName", "writer_pdf_Export"),))
++ oDoc.close(True)
++End Sub
++
++' This function was blindly ripped off from Graham Williams' book (Graham Williams togaware com)
++Function MakePropertyValue( Optional cName As String, Optional uValue ) As com.sun.star.beans.PropertyValue
++ Dim oPropertyValue As New com.sun.star.beans.PropertyValue
++ If Not IsMissing( cName ) Then
++ oPropertyValue.Name = cName
++ EndIf
++ If Not IsMissing( uValue ) Then
++ oPropertyValue.Value = uValue
++ EndIf
++ MakePropertyValue() = oPropertyValue
++End Function
++</script:module>
+diff -urNp wizards/source/tools/script.xlb wizards/source/tools/script.xlb
+--- wizards/source/tools/script.xlb 2008-02-28 16:23:29.000000000 -0300
++++ wizards/source/tools/script.xlb 2008-02-28 16:33:12.000000000 -0300
+@@ -7,4 +7,5 @@
+ <library:element library:name="UCB"/>
+ <library:element library:name="Listbox"/>
+ <library:element library:name="Debug"/>
++ <library:element library:name="MSToPDF"/>
+ </library:library>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]