Issue 119512 - [From Symphony] Import file created by MS Excel, if there is blank item selected in Page filed of Pivot Table, the selection will be lost.
[From Symphony] Import file created by MS Excel, if there is blank item selec...
Status: VERIFIED FIXED
Product: Calc
Classification: Application
Component: open-import
3.4.0
PC All
: P3 major (vote)
: 4.0.0
Assigned To: zhang jianfang
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-05-29 08:06 UTC by Shan Zhu
Modified: 2012-09-18 10:23 UTC (History)
3 users (show)

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


Attachments
.xlsx file with blank item in Page field of Pivot table (17.42 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2012-05-29 08:06 UTC, Shan Zhu
no flags Details
patch for blank item in page filter from pivot table in xlsx (702 bytes, patch)
2012-08-28 09:38 UTC, bjcheny
companycy: review?
Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description Shan Zhu 2012-05-29 08:06:53 UTC
Created attachment 77713 [details]
.xlsx file with blank item in Page field of Pivot table

Build info: AOO3.4_r1327774

Open the .xlsx sample file attached in AOO.
(In the sample file, the "(blank)" item has been selected in Page fields of 3 Pivot tables)

Defect:
All the selection in Page field will be changed into "All" after importing .xlsx into AOO.
The Page field can not support the "blank" item in it.
Comment 1 Shan Zhu 2012-07-12 09:10:11 UTC
Verified in AOO3.4.1_r1354891. Change status into Confirmed.
Comment 2 bjcheny 2012-08-28 09:38:53 UTC
Created attachment 79199 [details]
patch for blank item in page filter from pivot table in xlsx

Sometimes, it's possible for page filter to select empty field.
Thus, it's unnecessary to limit value for page filter to be not NULL.
Comment 3 bjcheny 2012-08-28 09:42:05 UTC
However, I strongly suggest some string in UI like "empty" to indicate that "empty" is selected as page filter. It helps user understand this.
Comment 4 Yolanda Zhang Ying 2012-09-03 05:45:58 UTC
Review comments:

In the patch, does aSelectedPage has other scenario that will be null string besides empty field be selected?

if( const PivotCacheItem* pSharedItem = pCacheField->getCacheItem( nCacheItem ) )
{

      OUString aSelectedPage = pSharedItem->getName();
      OUString aSelectedPage = pSharedItem->getName();
      aPropSet.setProperty( PROP_SelectedPage, aSelectedPage );
}
Comment 5 bjcheny 2012-09-03 05:49:44 UTC
Not found so far based on current knowledge.


(In reply to comment #4)
> Review comments:
> 
> In the patch, does aSelectedPage has other scenario that will be null string
> besides empty field be selected?
> 
> if( const PivotCacheItem* pSharedItem = pCacheField->getCacheItem(
> nCacheItem ) )
> {
> 
>       OUString aSelectedPage = pSharedItem->getName();
>       OUString aSelectedPage = pSharedItem->getName();
>       aPropSet.setProperty( PROP_SelectedPage, aSelectedPage );
> }
Comment 6 Yolanda Zhang Ying 2012-09-03 06:03:44 UTC
(In reply to comment #5)
> Not found so far based on current knowledge.
> 
> 
> (In reply to comment #4)
> > Review comments:
> > 
> > In the patch, does aSelectedPage has other scenario that will be null string
> > besides empty field be selected?
> > 
> > if( const PivotCacheItem* pSharedItem = pCacheField->getCacheItem(
> > nCacheItem ) )
> > {
> > 
> >       OUString aSelectedPage = pSharedItem->getName();
> >       OUString aSelectedPage = pSharedItem->getName();
> >       aPropSet.setProperty( PROP_SelectedPage, aSelectedPage );
> > }

Thx, I think it's ok to fix as it.
Comment 7 SVN Robot 2012-09-12 11:34:09 UTC
"zhangjf" committed SVN revision 1383888 into trunk:
#i119512#, when importing MS Excel, if there is blank item selected in page f...
Comment 8 zhang jianfang 2012-09-12 11:35:01 UTC
Change to resolved state
Comment 9 Shan Zhu 2012-09-18 10:23:19 UTC
Verified on AOO350m1 r1384699. The import works. 
Issues about export will be tracked by new defect.