kz.greetgo.msoffice.xlsx.gen.TwoCellAnchorChart Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of greetgo.msoffice Show documentation
Show all versions of greetgo.msoffice Show documentation
greetgo library to generate or parse MS Office files
package kz.greetgo.msoffice.xlsx.gen;
import java.io.PrintStream;
/**
* Графический объект листа для диаграмм
*/
class TwoCellAnchorChart extends TwoCellAnchor {
private final Chart chart; // диаграмма
public TwoCellAnchorChart(Chart chart, SheetCoord coordFrom, SheetCoord coordTo) {
super(coordFrom, coordTo);
this.chart = chart;
}
@Override
int getRelId() {
return chart.getRelId();
}
@Override
String getType() {
return "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart\" Target=\"../charts/chart"
+ chart.getFileId() + ".xml";
}
@Override
void print(PrintStream os) {
StringBuffer buf = new StringBuffer();
buf.append("");
buf.append(col1 - 1);
buf.append(" ");
buf.append(col1off);
buf.append(" ");
buf.append(row1 - 1);
buf.append(" ");
buf.append(row1off);
buf.append(" ");
buf.append(col2);
buf.append(" ");
buf.append(col2off);
buf.append(" ");
buf.append(row2);
buf.append(" ");
buf.append(row2off);
buf.append(" ");
buf.append(" ");
buf.append("");
buf.append(" ");
os.print(buf.toString());
}
}