Issue 75048 - XStyleLoader - user defined number formats are not imported
Summary: XStyleLoader - user defined number formats are not imported
Alias: None
Product: Calc
Classification: Application
Component: ui (show other issues)
Version: OOo 2.2 RC2
Hardware: PC Windows, all
: P3 Trivial (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
Keywords: oooqa
Depends on:
Reported: 2007-03-02 08:06 UTC by Oliver Brinzing
Modified: 2017-05-20 11:11 UTC (History)
3 users (show)

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

CellStyleNumberFormatDemo (12.55 KB, application/vnd.oasis.opendocument.spreadsheet)
2007-06-09 13:16 UTC, Oliver Brinzing
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description Oliver Brinzing 2007-03-02 08:06:58 UTC

i noticed, that number formats are not imported during XStyleLoader import.
This makes it nearly impossible to change cellstyles between document ...

similar problems in writer:

Comment 1 Rainer Bielefeld 2007-06-09 06:54:23 UTC
Please attach a test kit (sample documents) and a step by step instruction how
to reproduce the problem. 
Comment 2 Oliver Brinzing 2007-06-09 13:15:53 UTC
please have a look at the attachment

Comment 3 Oliver Brinzing 2007-06-09 13:16:44 UTC
Created attachment 45774 [details]
Comment 4 Rainer Bielefeld 2007-06-10 07:15:10 UTC
I tried to reproduce the problem with "CellStyleNumberFormatDemo.ods" and
"2.2.0RC4  German version WIN XP: [680m14(Build9134)]" and can confirm the
problem. The user defined number format will not be transferred using menu 
'file > templates > organize'. For details pls. also see step by step
instruction in "CellStyleNumberFormatDemo.ods".

I also tried a currency format for style "MyCellStyle", that will be transferred
correctly, but user defined number style will not be transferred, "MyCellStyle"
in the second document will contain information "standard number format" instead
of user defined format.

Please specify your OS and Platform. I am pretty sure that that problem will
occur for any OS, but ... 
Comment 5 Oliver Brinzing 2007-06-10 07:58:57 UTC
I created the attachment using Vista Business and the latest OO 2.2.1 RC3 Build
Same happend with Win XP ...

Comment 6 frank 2007-06-26 13:06:16 UTC
Hi Niklas,

one for you I think.

Comment 7 Martin Hollmichel 2007-11-09 16:52:23 UTC
change target from 2.x to 3.x according to
Comment 8 Tan Li 2013-01-03 14:45:33 UTC
Standard currency format for style "MyCellStyle" could be transferred
correctly, which is same as standard number format could be. But neither user defined number/currency format could be transfered. When right click "MyCellStyle" and "modify", this will call "pTabViewShell->MakeNumberInfoItem(...)", but number format properties is lost. And ScStyleSheetPool::Make(...) create StyleSheet is always without setting format. So it should be lost by SfxItemSet copy during move "MyCellStyle" between document. As "rNewSheet.GetItemSet().Set(pHisSheet->GetItemSet())" in SfxObjectShell::Insert. SvxNumberInfoItem is for number format, its nWhich is 10086, and need further knowledge of SfxItemSet, SfxItemPool, and SfxPoolItem to fix this issue.
stack as below,
      > sfx.dll!SfxObjectShell::Insert(SfxObjectShell & rSource={...}, unsigned short nSourceIdx1=0, unsigned short nSourceIdx2=3, unsigned short __formal=65535, unsigned short & nIdx1=0, unsigned short & nIdx2=1, unsigned short __formal=65535, unsigned short __formal=65535)  Line 605	C++
	sc.dll!ScDocShell::Insert(SfxObjectShell & rSource={...}, unsigned short nSourceIdx1=0, unsigned short nSourceIdx2=3, unsigned short nSourceIdx3=65535, unsigned short & nIdx1=0, unsigned short & nIdx2=1, unsigned short & nIdx3=65535, unsigned short & rIdxDeleted=65535)  Line 354 + 0x2c bytes	C++
 	sfx.dll!SfxOrganizeListBox_Impl::MoveOrCopyContents(SvLBox * pSourceBox=0x0b0ba0cc, SvLBoxEntry * pSource=0x0b0af098, SvLBoxEntry * pTarget=0x0b0a7690, SvLBoxEntry * & pNewParent=0x00000000, unsigned long & rIdx=4294967295, unsigned char bCopy=0)  Line 722 + 0x79 bytes	C++
Comment 9 Marcus 2017-05-20 11:11:50 UTC
Reset assigne to the default "".