[TD]encode Xml characters in spreadsheet
This commit is contained in:
@@ -42,6 +42,7 @@
|
||||
#include <Base/Parameter.h>
|
||||
|
||||
#include "Preferences.h"
|
||||
#include "DrawUtil.h"
|
||||
#include "DrawViewSpreadsheet.h"
|
||||
|
||||
#include <Mod/Spreadsheet/App/Cell.h>
|
||||
@@ -287,9 +288,13 @@ std::string DrawViewSpreadsheet::getSheetImage()
|
||||
prop->isDerivedFrom(App::PropertyFloat::getClassTypeId()) ||
|
||||
prop->isDerivedFrom(App::PropertyInteger::getClassTypeId())
|
||||
) {
|
||||
field << cell->getFormattedQuantity();
|
||||
std::string temp = cell->getFormattedQuantity(); //writable
|
||||
DrawUtil::encodeXmlSpecialChars(temp);
|
||||
field << temp;
|
||||
} else if (prop->isDerivedFrom(App::PropertyString::getClassTypeId())) {
|
||||
field << static_cast<App::PropertyString*>(prop)->getValue();
|
||||
std::string temp = static_cast<App::PropertyString*>(prop)->getValue();
|
||||
DrawUtil::encodeXmlSpecialChars(temp);
|
||||
field << temp;
|
||||
} else {
|
||||
Base::Console().Error("DVSS: Unknown property type\n");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user