Better support for .csv in explorer and share - register the mime type better, and include thumbnailing

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@23051 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Nick Burch
2010-10-12 14:45:42 +00:00
parent 59fd95ae98
commit a0b57d7b74
3 changed files with 19 additions and 2 deletions

View File

@@ -346,6 +346,10 @@
<constructor-arg><value>text/plain</value></constructor-arg>
<constructor-arg><value>application/pdf</value></constructor-arg>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails" >
<constructor-arg><value>text/csv</value></constructor-arg>
<constructor-arg><value>application/pdf</value></constructor-arg>
</bean>
<bean class="org.alfresco.repo.content.transform.ExplictTransformationDetails" >
<constructor-arg><value>text/xml</value></constructor-arg>
<constructor-arg><value>application/pdf</value></constructor-arg>

View File

@@ -140,6 +140,18 @@
</export-filters>
</document-format>
<!-- Not properly supported by OpenOffice via the Java API -->
<!--
<document-format><name>Comma Separated Values (CSV)</name>
<family>Spreadsheet</family>
<mime-type>text/csv</mime-type>
<file-extension>csv</file-extension>
<export-filters>
<entry><family>Spreadsheet</family><string>CSV</string></entry>
</export-filters>
</document-format>
-->
<!-- Presentation Formats -->

View File

@@ -89,10 +89,11 @@ public class TextToPdfContentTransformer extends AbstractContentTransformer2
public boolean isTransformable(String sourceMimetype, String targetMimetype, TransformationOptions options)
{
if ( (!MimetypeMap.MIMETYPE_TEXT_PLAIN.equals(sourceMimetype) &&
!MimetypeMap.MIMETYPE_TEXT_CSV.equals(sourceMimetype) &&
!MimetypeMap.MIMETYPE_XML.equals(sourceMimetype) ) ||
!MimetypeMap.MIMETYPE_PDF.equals(targetMimetype))
{
// only support (text/plain OR text/xml) to (application/pdf)
// only support (text/plain OR text/csv OR text/xml) to (application/pdf)
return false;
}
else