Author: vmassol
Date: 2008-01-11 09:35:32 +0100 (Fri, 11 Jan 2008)
New Revision: 6758
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/pdf/impl/PdfExportImpl.java
Log:
Added some comment to explain why we're not using the passed document.
Modified:
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/pdf/impl/PdfExportImpl.java
===================================================================
---
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/pdf/impl/PdfExportImpl.java
2008-01-10 23:06:54 UTC (rev 6757)
+++
xwiki-platform/core/trunk/xwiki-core/src/main/java/com/xpn/xwiki/pdf/impl/PdfExportImpl.java
2008-01-11 08:35:32 UTC (rev 6758)
@@ -209,6 +209,11 @@
public void export(XWikiDocument doc, OutputStream out, int type,
XWikiContext context) throws XWikiException
{
+ // Note: The passed document is not used currently since we're calling
pdf.vm and that
+ // velocity template uses the XWiki Context to get the current doc or
its translations.
+ // This could be improved by setting a specific context using the
passed document but we
+ // would also need to get the translations and set them too.
+
File dir = (File)
context.getEngineContext().getAttribute("javax.servlet.context.tempdir");
File tempdir = new File(dir, RandomStringUtils.randomAlphanumeric(8));
tidy.setOutputEncoding(context.getWiki().getEncoding());
_______________________________________________
notifications mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/notifications