mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
ODF additions
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@3391 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -114,7 +114,7 @@
|
|||||||
|
|
||||||
<document-format><name>Microsoft Excel</name>
|
<document-format><name>Microsoft Excel</name>
|
||||||
<family>Spreadsheet</family>
|
<family>Spreadsheet</family>
|
||||||
<mime-type>application/application/vnd.ms-excel</mime-type>
|
<mime-type>application/application/vnd.excel</mime-type>
|
||||||
<file-extension>xls</file-extension>
|
<file-extension>xls</file-extension>
|
||||||
<export-filters>
|
<export-filters>
|
||||||
<entry><family>Spreadsheet</family><string>MS Excel 97</string></entry>
|
<entry><family>Spreadsheet</family><string>MS Excel 97</string></entry>
|
||||||
@@ -144,7 +144,7 @@
|
|||||||
|
|
||||||
<document-format><name>Microsoft PowerPoint</name>
|
<document-format><name>Microsoft PowerPoint</name>
|
||||||
<family>Presentation</family>
|
<family>Presentation</family>
|
||||||
<mime-type>application/vnd.ms-powerpoint</mime-type>
|
<mime-type>application/vnd.powerpoint</mime-type>
|
||||||
<file-extension>ppt</file-extension>
|
<file-extension>ppt</file-extension>
|
||||||
<export-filters>
|
<export-filters>
|
||||||
<entry><family>Presentation</family><string>MS PowerPoint 97</string></entry>
|
<entry><family>Presentation</family><string>MS PowerPoint 97</string></entry>
|
||||||
|
@@ -167,6 +167,10 @@ public class TransformActionExecuter extends ActionExecuterAbstractBase
|
|||||||
overwrite = overwriteValue.booleanValue();
|
overwrite = overwriteValue.booleanValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Calculate the destination name
|
||||||
|
String originalName = (String)nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_NAME);
|
||||||
|
String newName = transformName(originalName, mimeType);
|
||||||
|
|
||||||
// Since we are overwriting we need to figure out whether the destination node exists
|
// Since we are overwriting we need to figure out whether the destination node exists
|
||||||
NodeRef copyNodeRef = null;
|
NodeRef copyNodeRef = null;
|
||||||
if (overwrite == true)
|
if (overwrite == true)
|
||||||
@@ -181,9 +185,10 @@ public class TransformActionExecuter extends ActionExecuterAbstractBase
|
|||||||
if (this.nodeService.hasAspect(copy, ContentModel.ASPECT_WORKING_COPY) == false)
|
if (this.nodeService.hasAspect(copy, ContentModel.ASPECT_WORKING_COPY) == false)
|
||||||
{
|
{
|
||||||
// We can assume that we are looking for a node created by this action so the primary parent will
|
// We can assume that we are looking for a node created by this action so the primary parent will
|
||||||
// match the destination folder
|
// match the destination folder and the name will be the same
|
||||||
NodeRef parent = this.nodeService.getPrimaryParent(copy).getParentRef();
|
NodeRef parent = this.nodeService.getPrimaryParent(copy).getParentRef();
|
||||||
if (parent.equals(destinationParent) == true)
|
String copyName = (String)this.nodeService.getProperty(copy, ContentModel.PROP_NAME);
|
||||||
|
if (parent.equals(destinationParent) == true && copyName.equals(newName) == true)
|
||||||
{
|
{
|
||||||
if (copyNodeRef == null)
|
if (copyNodeRef == null)
|
||||||
{
|
{
|
||||||
@@ -216,8 +221,6 @@ public class TransformActionExecuter extends ActionExecuterAbstractBase
|
|||||||
if (newCopy == true)
|
if (newCopy == true)
|
||||||
{
|
{
|
||||||
// Adjust the name of the copy
|
// Adjust the name of the copy
|
||||||
String originalName = (String)nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_NAME);
|
|
||||||
String newName = transformName(originalName, mimeType);
|
|
||||||
nodeService.setProperty(copyNodeRef, ContentModel.PROP_NAME, newName);
|
nodeService.setProperty(copyNodeRef, ContentModel.PROP_NAME, newName);
|
||||||
String originalTitle = (String)nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_TITLE);
|
String originalTitle = (String)nodeService.getProperty(actionedUponNodeRef, ContentModel.PROP_TITLE);
|
||||||
if (originalTitle != null && originalTitle.length() > 0)
|
if (originalTitle != null && originalTitle.length() > 0)
|
||||||
|
Reference in New Issue
Block a user