Commit 3252d5a6 authored by Oleg.Korshul's avatar Oleg.Korshul Committed by Alexander.Trofimov

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@51775 954022d7-b5bf-4e40-9824-e11837661b57
parent 726234d1
...@@ -76,6 +76,7 @@ function CBinaryFileWriter() ...@@ -76,6 +76,7 @@ function CBinaryFileWriter()
this.IsUseFullUrl = false; this.IsUseFullUrl = false;
this.DocumentOrigin = ""; this.DocumentOrigin = "";
this.PresentationThemesOrigin = "";
var oThis = this; var oThis = this;
...@@ -85,6 +86,11 @@ function CBinaryFileWriter() ...@@ -85,6 +86,11 @@ function CBinaryFileWriter()
this.DocumentOrigin = origin; this.DocumentOrigin = origin;
}; };
this.Start_UseDocumentOrigin = function(origin)
{
this.PresentationThemesOrigin = origin + "/presentationthemes/";
}
this.End_UseFullUrl = function() this.End_UseFullUrl = function()
{ {
this.IsUseFullUrl = false; this.IsUseFullUrl = false;
...@@ -2076,8 +2082,10 @@ function CBinaryFileWriter() ...@@ -2076,8 +2082,10 @@ function CBinaryFileWriter()
if (oThis.IsUseFullUrl) if (oThis.IsUseFullUrl)
{ {
if ((0 == _src.indexOf("theme")) && window.editor) if ((0 == _src.indexOf("theme")) && window.editor)
_src = window.editor.ThemeLoader.ThemesUrl + _src; {
if (0 != _src.indexOf("http:") && 0 != _src.indexOf("data:") && 0 != _src.indexOf("https:") && 0 != _src.indexOf("ftp:") && 0 != _src.indexOf("file:")) _src = oThis.PresentationThemesOrigin + _src;
}
else if (0 != _src.indexOf("http:") && 0 != _src.indexOf("data:") && 0 != _src.indexOf("https:") && 0 != _src.indexOf("ftp:") && 0 != _src.indexOf("file:"))
_src = oThis.DocumentOrigin + "media/" + _src; _src = oThis.DocumentOrigin + "media/" + _src;
} }
......
...@@ -354,6 +354,7 @@ function CopyProcessor(api, ElemToSelect) ...@@ -354,6 +354,7 @@ function CopyProcessor(api, ElemToSelect)
this.oCurHyperlinkElem = null; this.oCurHyperlinkElem = null;
this.oPresentationWriter = new CBinaryFileWriter(); this.oPresentationWriter = new CBinaryFileWriter();
this.oPresentationWriter.Start_UseFullUrl(documentOrigin + editor.DocumentUrl); this.oPresentationWriter.Start_UseFullUrl(documentOrigin + editor.DocumentUrl);
this.oPresentationWriter.Start_UseDocumentOrigin(documentOrigin);
}; };
CopyProcessor.prototype = CopyProcessor.prototype =
{ {
......
...@@ -742,6 +742,7 @@ function BinaryFileWriter(doc) ...@@ -742,6 +742,7 @@ function BinaryFileWriter(doc)
{ {
var api = this.Document.DrawingDocument.m_oWordControl.m_oApi; var api = this.Document.DrawingDocument.m_oWordControl.m_oApi;
window.global_pptx_content_writer.Start_UseFullUrl(documentOrigin + api.DocumentUrl); window.global_pptx_content_writer.Start_UseFullUrl(documentOrigin + api.DocumentUrl);
window.global_pptx_content_writer.Start_UseDocumentOrigin(documentOrigin);
window.global_pptx_content_writer._Start(); window.global_pptx_content_writer._Start();
this.copyParams.bLockCopyElems = 0; this.copyParams.bLockCopyElems = 0;
this.copyParams.itemCount = 0; this.copyParams.itemCount = 0;
......
...@@ -710,6 +710,10 @@ function CPPTXContentWriter() ...@@ -710,6 +710,10 @@ function CPPTXContentWriter()
{ {
this.BinaryFileWriter.Start_UseFullUrl(origin); this.BinaryFileWriter.Start_UseFullUrl(origin);
} }
this.Start_UseDocumentOrigin = function(origin)
{
this.BinaryFileWriter.Start_UseDocumentOrigin(origin);
}
this.End_UseFullUrl = function() this.End_UseFullUrl = function()
{ {
return this.BinaryFileWriter.End_UseFullUrl(); return this.BinaryFileWriter.End_UseFullUrl();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment