Commit 6b5ca94e authored by konovalovsergey's avatar konovalovsergey

nonBreakHyphen

parent 8357b6a4
...@@ -352,7 +352,10 @@ var c_oSerRunType = { ...@@ -352,7 +352,10 @@ var c_oSerRunType = {
delText: 15, delText: 15,
del: 16, del: 16,
ins: 17, ins: 17,
columnbreak: 18 columnbreak: 18,
cr: 19,
nonBreakHyphen: 20,
softHyphen: 21
}; };
var c_oSerImageType = { var c_oSerImageType = {
MediaId:0, MediaId:0,
...@@ -4130,7 +4133,13 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa ...@@ -4130,7 +4133,13 @@ function BinaryDocumentTableWriter(memory, doc, oMapCommentId, oNumIdMap, copyPa
switch ( item.Type ) switch ( item.Type )
{ {
case para_Text: case para_Text:
sCurText += encodeSurrogateChar(item.Value); if (item.Is_NoBreakHyphen()) {
sCurText = this.WriteText(sCurText, delText);
oThis.memory.WriteByte(c_oSerRunType.nonBreakHyphen);
oThis.memory.WriteLong(c_oSerPropLenType.Null);
} else {
sCurText += encodeSurrogateChar(item.Value);
}
break; break;
case para_Space: case para_Space:
sCurText += " "; sCurText += " ";
...@@ -8422,6 +8431,19 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow ...@@ -8422,6 +8431,19 @@ function Binary_DocumentTableReader(doc, oReadResult, openParams, stream, bAllow
if(null != oDrawing.content.GraphicObj) if(null != oDrawing.content.GraphicObj)
oNewElem = oDrawing.content; oNewElem = oDrawing.content;
} }
else if (c_oSerRunType.cr === type)
{
oNewElem = new ParaNewLine( break_Line );
}
else if (c_oSerRunType.nonBreakHyphen === type)
{
oNewElem = new ParaText(String.fromCharCode(0x2013));
oNewElem.Set_SpaceAfter(false);
}
else if (c_oSerRunType.softHyphen === type)
{
//todo
}
else else
res = c_oSerConstants.ReadUnknown; res = c_oSerConstants.ReadUnknown;
if (null != oNewElem) if (null != oNewElem)
...@@ -9222,6 +9244,19 @@ function Binary_oMathReader(stream, oReadResult) ...@@ -9222,6 +9244,19 @@ function Binary_oMathReader(stream, oReadResult)
{ {
oNewElem = new ParaNewLine( break_Column ); oNewElem = new ParaNewLine( break_Column );
} }
else if (c_oSerRunType.cr === type)
{
oNewElem = new ParaNewLine( break_Line );
}
else if (c_oSerRunType.nonBreakHyphen === type)
{
oNewElem = new ParaText(String.fromCharCode(0x2013));
oNewElem.Set_SpaceAfter(false);
}
else if (c_oSerRunType.softHyphen === type)
{
//todo
}
else if (c_oSerRunType._LastRun === type) else if (c_oSerRunType._LastRun === type)
this.oReadResult.bLastRun = true; this.oReadResult.bLastRun = true;
else else
......
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