[Erp5-report] r37605 gabriel - in /erp5/trunk/utils/cloudooo/cloudooo: ./ bin/
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Aug 6 16:03:26 CEST 2010
Author: gabriel
Date: Fri Aug 6 16:03:25 2010
New Revision: 37605
URL: http://svn.erp5.org?rev=37605&view=rev
Log:
add configuration in setup.py to create the scripts unoconverter and unomimemapper and refactor cloudooo.py to obtain this paths by cloudooo configuration
Added:
erp5/trunk/utils/cloudooo/cloudooo/bin/__init__.py
Modified:
erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py
erp5/trunk/utils/cloudooo/cloudooo/ooolib.py
Added: erp5/trunk/utils/cloudooo/cloudooo/bin/__init__.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/bin/__init__.py?rev=37605&view=auto
==============================================================================
(empty)
Modified: erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py?rev=37605&r1=37604&r2=37605&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/bin/unoconverter.py [utf8] Fri Aug 6 16:03:25 2010
@@ -93,10 +93,7 @@ class UnoConverter(object):
property_list.append(property)
property = ooolib.createProperty("FilterName", filter_name)
property_list.append(property)
- if "htm" in destination_format:
- # XXX - condition to obtain a property that returns all images in png
- # format
- property_list.append(ooolib.createHTMLProperty())
+ property_list.extend(ooolib.createSpecificProperty(filter_name))
return property_list
else:
return ()
Modified: erp5/trunk/utils/cloudooo/cloudooo/ooolib.py
URL: http://svn.erp5.org/erp5/trunk/utils/cloudooo/cloudooo/ooolib.py?rev=37605&r1=37604&r2=37605&view=diff
==============================================================================
--- erp5/trunk/utils/cloudooo/cloudooo/ooolib.py [utf8] (original)
+++ erp5/trunk/utils/cloudooo/cloudooo/ooolib.py [utf8] Fri Aug 6 16:03:25 2010
@@ -61,17 +61,30 @@ def createProperty(name, value):
return property
# XXX - method duplicated
-def createHTMLProperty():
- """Returns a property to create all images in png format"""
+def createSpecificProperty(filter_name):
+ """Creates a property according to the filter"""
setUpUnoEnvironment()
import uno
from com.sun.star.beans import PropertyValue
+ if filter_name == "impress_html_Export":
+ property = PropertyValue('FilterData', 0,
+ uno.Any('[]com.sun.star.beans.PropertyValue',
+ (PropertyValue('IsExportNotes', 0, True, 0),
+ PropertyValue('Format', 0, 2, 0),),), 0)
+ elif filter_name == "impress_pdf_Export":
+ property = PropertyValue('FilterData', 0,
+ uno.Any('[]com.sun.star.beans.PropertyValue',
+ (PropertyValue('ExportNotesPages', 0, True, 0),),), 0)
+ elif filter_name == "draw_html_Export":
+ property = PropertyValue('FilterData', 0,
+ uno.Any('[]com.sun.star.beans.PropertyValue',
+ (PropertyValue('Format', 0, 2, 0),),), 0)
+ elif filter_name == "Text (encoded)":
+ property = PropertyValue('FilterFlags', 0, 'UTF8,LF', 0)
+ else:
+ return []
- property = PropertyValue('FilterData', 0,
- uno.Any('[]com.sun.star.beans.PropertyValue',
- (PropertyValue('IsExportNotes', 0, True, 0),
- PropertyValue('Format', 0, 2, 0),),), 0) # PNG format
- return property
+ return [property,]
def getServiceManager(host, port):
"""Get the ServiceManager from the running OpenOffice.org."""
More information about the Erp5-report
mailing list