MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / modifyStyle

Method modifyStyle

src/database/WizIndex.cpp:602–624  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

600}
601
602bool WizIndex::modifyStyle(WIZSTYLEDATA& data)
603{
604 if (data.strGUID.isEmpty()) {
605 TOLOG("Failed to modify style: guid is empty!");
606 return false;
607 }
608
609 if (data.strName.isEmpty()) {
610 TOLOG("Failed to modify style: name is empty!");
611 return false;
612 }
613
614 WIZSTYLEDATA dataTemp;
615 if (styleByName(data.strName, dataTemp, data.strGUID)) {
616 TOLOG1("Failed to modify style: Style already exists: %1!", data.strName);
617 return false;
618 }
619
620 data.tModified = WizGetCurrentTime();
621 data.nVersion = -1;
622
623 return modifyStyleEx(data);
624}
625
626bool WizIndex::deleteStyle(const WIZSTYLEDATA& data, bool bLog, bool bReset /* = true */)
627{

Callers 1

tFunction · 0.80

Calls 3

TOLOGFunction · 0.85
WizGetCurrentTimeFunction · 0.85
isEmptyMethod · 0.80

Tested by

no test coverage detected