| 600 | } |
| 601 | |
| 602 | bool 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 | |
| 626 | bool WizIndex::deleteStyle(const WIZSTYLEDATA& data, bool bLog, bool bReset /* = true */) |
| 627 | { |
no test coverage detected