Apache OpenOffice (AOO) Bugzilla – Issue 42965
The number of 'Numbering type' dialog tab is fixed/hardcoded to 8
Last modified: 2013-08-07 15:03:05 UTC
The numbering types (which show up in 'Numbering type' tab on 'Format->Bullets and Numbering' dialog) for each locale can be defined in the locale's XML file, e.g. for Thai it is th_TH.xml. Thai localization keeps the existing 8 numbering types and adds another 4. However the 'Numbering types' tab only shows 8, the other 4 couldn't be seen/selected. And the dialog tab won't scroll when there're more numbering type than 8.
The problem is that the number 8 is hard-coded in svx/inc/numpages.hxx (NUM_VALUSET_COUNT, 680 move the header to svx/source/dialog/numpages.hxx) and svx/source/dialog/numpages.cxx. The possible solutions are letting OOo :- - read the number of numbering types from the locale XML file - count the number of numbering types in the locale XML file - has the 'Numbering types' tab that is scrollable, like the 'Graphics' tab
set target to 2.0.1
Created attachment 26278 [details] Proposed patch to fix this issue - allow any number of numbering type, display only 8 items but scrollable
I misunderstood the problem. It's not about NUM_VALUSET_COUNT in numpages.hxx/cxx. It is about the number 8 hardcoded as maximum number of entries in SvxNumValueSet::SvxNumberingSettings and SvxNumValueSet::SetOutlineNumberingSettings. That's because 8 items is about the right size to legibly display numbering/outline types in the dialog tabs. My change is that the dialog tabs still display 8 (4x2) items at a time but use vertical scrollbar to see more than 8. So I lift the maximum of numbering/outline types out (no maxinum of 8 types now). The downside of this change is that vertical scrollbar always display even when there're 8 items. It'd be nice if there's WB_AUTOVSCROLL but there isn't (at least I don't know).
In my opinion, 8 language specific types for a language are enough. The reason you want to keep orignal 8 types is that those types are well accepted by all languages, they are defined in en_US.xml. Currently, the language for the numbering types showing under 'Format->Bullets and Numbering' is set under 'Tool->Options->Language setting->Language'. You don't want to change this global setting, just in order to get numbering types for other languages. So the solution is to add language box under 'Format->Bullets and Numbering', you can change language and get different set of pre-defined numbering type. Just like sorting and indexing, you can choose different language sorting algorithm whithout changing global language setting. Then you don't need to keep orignal 8 types, since you can get them by selecting en-US, and defined 8 language specific type for your language.
.
> Currently, the language for the numbering types showing under >'Format->Bullets and Numbering' is set under > 'Tool->Options->Language setting->Language'. Yes. > You don't want to change this global setting, just in order > to get numbering types for other languages. No. Normally, users of a given language will get the global 'Tools->Options->Language Settings->Languages->Locale setting' set to their languages already. > So the solution is to add language box under > 'Format->Bullets and Numbering' That would make the dialog tab too complex for such simple task. Just like date formats, we add all date formats even ones that already existed in en-US. So users don't have to switch language (on Format Cells->Numbers) only to get such date formats.
Created attachment 26286 [details] New patch - show vertical scrollbar only when there're more than 8 items
Samphan, Karl's point, if I understand correctly, is that if there's a language box, then we don't need to add all the en_US numbering types, only those of the en_US numbering types that are commonly used in a Thai language environment. In other words th_TH would contain the special Thai types together with those of the US types that Thais commonly use. Then a Thai user would only need to change the language if they want to access a numbering type that is unusual in Thailand. That makes sense to me. The question then arises of which of the en_US numbering types are used in Thailand. Now I know that 1, 2, 3,... is very commonly used in Thailand. What about the others a/A/i/II? However, even with the language box, I think a limit of 8 is too small to cover the numbering types typically used in a particular locale. The numbering type is a combination of the separator and the numbering sequence; these are fairly independent. There are at least 3 kinds of separator that are very commonly used: "N)", "(N)" and "N.". With a limit of 8, as soon as you have 3 numbering sequences, you are arbitrarily leaving out numbering types. For example, in English, (i) and i) are very commonly used, but are not available in the OOo. To summarize, I think adding a language box is a good idea, but we still need to allow for more than 8 numbering types.
I have extend patch from samphan's patch to select others Numbering type which more than 8 type.
Created attachment 26965 [details] extend ooo numberingtype samphan's patch
reassign.
Patch applied in cws thaiissues to svx/source/dialog/numpages.cxx svx/source/dialog/numpages.hxx svx/source/dialog/svxbmpnumvalueset.cxx
Reassigned for verification re-open issue and reassign to sba@openoffice.org
reassign to sba@openoffice.org
reset resolution to FIXED
SBA: Verified in CWS thaiissues. Works in general (took some files from CWS siloch to SEE the fix). This needs to be re-verified as soon as CWS is integrated in master!
SBA: OK in Master. When Thai is set as locale, the Numbering dialog has a scrollbar so that all Thai numbering styles can be accessed. Closed.