Commit 5bc2e10a authored by Sergey.Konovalov's avatar Sergey.Konovalov Committed by Alexander.Trofimov

копирование через бинарник гиперссылок, если они были выделены не полностью

git-svn-id: svn://192.168.3.15/activex/AVS/Sources/TeamlabOffice/trunk/OfficeWeb@48916 954022d7-b5bf-4e40-9824-e11837661b57
parent 35407811
...@@ -2088,11 +2088,6 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap) ...@@ -2088,11 +2088,6 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
ParaStart = Temp2; ParaStart = Temp2;
} }
} }
//Расчитываем настройки для спецсивола конца параграфа
var pPr_rPr = null;
if(par.Content.length > 2)
pPr_rPr = par.Internal_CalculateTextPr(par.Content.length - 2);
//pPr //pPr
var ParaStyle = par.Style_Get(); var ParaStyle = par.Style_Get();
var pPr = par.Pr; var pPr = par.Pr;
...@@ -2128,6 +2123,30 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap) ...@@ -2128,6 +2123,30 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
this.sCurText = ""; this.sCurText = "";
//todo hyperlinkStart, commentStart для копирования //todo hyperlinkStart, commentStart для копирования
var oThis = this; var oThis = this;
var bExistHyperlink = false;
//если выделение не сначала, нужно посмотреть не было ли до этого HyperlinkStart
if(bUseSelection && ParaStart > 0)
{
for ( var i = ParaStart - 1; i >= 0; --i )
{
var item = Content[i];
if(para_HyperlinkStart == item.Type)
{
this.WriteText();
var sField = "HYPERLINK \"" + item.Value.replace("\"", "\\\"") + "\"";
if(null != item.ToolTip)
sField += " \\o \"" + item.ToolTip.replace("\"", "\\\"") + "\"";
this.WriteRun(function(){
oThis.memory.WriteByte(c_oSerRunType.fldstart);
oThis.memory.WriteString2(sField);
});
bExistHyperlink = true;
break;
}
else if(para_HyperlinkEnd == item.Type)
break;
}
}
for ( var i = ParaStart; i <= ParaEnd; ++i ) for ( var i = ParaStart; i <= ParaEnd; ++i )
{ {
var item = Content[i]; var item = Content[i];
...@@ -2190,6 +2209,7 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap) ...@@ -2190,6 +2209,7 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
oThis.memory.WriteByte(c_oSerRunType.fldstart); oThis.memory.WriteByte(c_oSerRunType.fldstart);
oThis.memory.WriteString2(sField); oThis.memory.WriteString2(sField);
}); });
bExistHyperlink = true;
break; break;
case para_HyperlinkEnd: case para_HyperlinkEnd:
this.WriteText(); this.WriteText();
...@@ -2197,6 +2217,7 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap) ...@@ -2197,6 +2217,7 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
oThis.memory.WriteByte(c_oSerRunType.fldend); oThis.memory.WriteByte(c_oSerRunType.fldend);
oThis.memory.WriteLong(c_oSerPropLenType.Null); oThis.memory.WriteLong(c_oSerPropLenType.Null);
}); });
bExistHyperlink = false;
break; break;
case para_CommentStart: case para_CommentStart:
if(null != this.oMapCommentId) if(null != this.oMapCommentId)
...@@ -2232,6 +2253,13 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap) ...@@ -2232,6 +2253,13 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap)
} }
} }
this.WriteText(); this.WriteText();
if(bExistHyperlink)
{
this.WriteRun(function(){
oThis.memory.WriteByte(c_oSerRunType.fldend);
oThis.memory.WriteLong(c_oSerPropLenType.Null);
});
}
}; };
this.WriteText = function() this.WriteText = function()
{ {
......
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