Issue 120628

Summary: Catch NULL property name when setPropertyValue
Product: Writer Reporter: bjcheny <companycy>
Component: codeAssignee: AOO issues mailing list <issues>
Status: CLOSED NOT_AN_OOO_ISSUE QA Contact:
Severity: Normal    
Priority: P3 CC: bjdujing, companycy
Version: 4.0.0-dev   
Target Milestone: ---   
Hardware: All   
OS: Windows XP   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---
Attachments:
Description Flags
patch for setPropertyValue
none
patch for setPropertyValue companycy: review?

Description bjcheny 2012-08-21 03:11:49 UTC
When setPropertyValue, we should ensure the Property Name should not be empty before it's set.
Comment 1 bjcheny 2012-08-21 03:25:18 UTC
Created attachment 79016 [details]
patch for setPropertyValue

There are 3 changes which mainly include setPropertyValue for:
1. table
2. row
3. cell

Check the potential null Property Name before we serPropertyValue for it.
Comment 2 bjcheny 2012-08-21 03:28:27 UTC
There is still some work left to re-factor some functions in this source file.
Will take time to do it if possible.
Comment 3 bjcheny 2012-08-21 07:59:18 UTC
Created attachment 79032 [details]
patch for setPropertyValue

Change patch path from sw to main when creating.
Comment 4 bjcheny 2012-08-27 07:09:18 UTC
When we add new Id into enum PropertyIds from PropertyIds.hxx, it's possible to miss addition related string in below function.
const rtl::OUString& PropertyNameSupplier::GetName( PropertyIds eId ) const;

If the string is lost, then the empty PropertyName may occur, and it's unknown behavior to setPropertyValue. Then as defense code, it's necessary to add such check.
Comment 5 bjcheny 2012-08-31 08:37:59 UTC
Mark as invalid. It's better to initialize the property name as some not null string. However, it's hard to test this kind of defense code.
Comment 6 Du Jing 2012-09-21 02:31:27 UTC
close invalid defect