-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impl <xdr:twoCellAnchor editAs=oneCell> #407
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi Ocke, big thanks for contributing.
There are a couple of questions/issues I would like you to take a look at.
Also, would it be possible to also add a small bit to the README.md documenting the new functionality.
Kind Regards,
Guyon
@@ -30,7 +30,7 @@ utils.inherits(CellPositionXform, BaseXform, { | |||
this.map['xdr:col'].render(xmlStream, col); | |||
this.map['xdr:colOff'].render(xmlStream, colOff); | |||
|
|||
var row = Math.floor(model.row); | |||
var row = model.editAsOneCell ? 0 : Math.floor(model.row); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the same adjustment be done to col (above)?
Also - is there any adjustment required for the parse functions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll take a look at the parse function. About the col I don't know, I just looked into what OOo writes and did the same ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've finally had some time to look into this. From what I can see (based on how Excel behaves) the row adjustment is not necessary, so I've removed it.
@@ -49,7 +49,12 @@ utils.inherits(TwoCellAnchorXform, BaseXform, { | |||
}, | |||
|
|||
render: function(xmlStream, model) { | |||
xmlStream.openNode(this.tag); | |||
if(model.range.editAs) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it's pedantic but could you add braces to this if statement
At the moment I have no additional time to look for the parsing. I'm sorry. May be later. |
It is not possible at the moment to store a image with an offset to tl and br.