TechDraw: modernize type checking
This commit is contained in:
@@ -100,7 +100,7 @@ App::DocumentObjectExecReturn *DrawViewSpreadsheet::execute()
|
||||
std::string scellend = CellEnd.getValue();
|
||||
if (!link)
|
||||
return new App::DocumentObjectExecReturn("No spreadsheet linked");
|
||||
if (!link->getTypeId().isDerivedFrom(Spreadsheet::Sheet::getClassTypeId()))
|
||||
if (!link->isDerivedFrom<Spreadsheet::Sheet>())
|
||||
return new App::DocumentObjectExecReturn("The linked object is not a spreadsheet");
|
||||
if (scellstart.empty() || scellend.empty())
|
||||
return new App::DocumentObjectExecReturn("Empty cell value");
|
||||
|
||||
Reference in New Issue
Block a user