Worksheet sheet = _spreadsheet.getSelectedSheet();
if (sheet != null && isValidSelection(selection)) {
if (!sheet.getProtect()) {
int row = selection.getTop();
int col = selection.getLeft();
ChartData data = fillCategoryData(new XSSFPie3DChartData(), selection);
Ranges.range(sheet)
.addChart(getClientAnchor(row, col, 600, 300), data, ChartType.Pie3D, ChartGrouping.STANDARD, LegendPosition.RIGHT);
} else {
showProtectMessage();