Issue 120628 - Catch NULL property name when setPropertyValue
Summary: Catch NULL property name when setPropertyValue
Status: CLOSED NOT_AN_OOO_ISSUE
Alias: None
Product: Writer
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All Windows XP
: P3 Normal (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-21 03:11 UTC by bjcheny
Modified: 2012-09-21 02:31 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
patch for setPropertyValue (2.91 KB, patch)
2012-08-21 03:25 UTC, bjcheny
no flags Details | Diff
patch for setPropertyValue (2.92 KB, patch)
2012-08-21 07:59 UTC, bjcheny
companycy: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
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