function sheetnode_plugin_style::merge_annotation in Sheetnode 7
Same name and namespace in other branches
- 7.2 views/sheetnode_plugin_style.inc \sheetnode_plugin_style::merge_annotation()
1 call to sheetnode_plugin_style::merge_annotation()
- sheetnode_plugin_style::render_sheet in views/sheetnode_plugin_style.inc
File
- views/sheetnode_plugin_style.inc, line 440
Class
- sheetnode_plugin_style
Code
function merge_annotation(&$original) {
$annotation = db_query("SELECT value FROM {sheetnode_view} WHERE view_name = :name AND display_id = :id", array(
':name' => $this->view->name,
':id' => $this->view->display_handler->display->id,
))
->fetchField();
if ($annotation) {
$merge = socialcalc_parse($annotation);
foreach ($merge['sheet']['cells'] as $coord => $cell) {
if (empty($original['sheet']['cells'][$coord])) {
$original['sheet']['cells'][$coord] = $cell;
}
}
$original['sheet']['attribs']['lastcol'] = max($original['sheet']['attribs']['lastcol'], $merge['sheet']['attribs']['lastcol']);
$original['sheet']['attribs']['lastrow'] = max($original['sheet']['attribs']['lastrow'], $merge['sheet']['attribs']['lastrow']);
}
}