[email protected] wrote on 2009-08-14 22:01:04:
Hi Xuan Gong,
please find my comments inline.
Xuan Gong wrote:
Hi Oliver,
I'd like to continue the discussion via mail. Please find my comments
inline.
Best Regards, Xuan Gong IBM Lotus Symphony Development
Sent by:
[email protected]
Hi Xuan Gong,
I think it was no a good idea from myself to add notes to the
specification to discuss certain points. Thus, I have copied these
notes and Your replies in this eMail. Let us continue the
discussion via eMail.
my note (2009-08-04): According to the ODF proposal it is needed to
represent the empty value (style:list-level=””) for this ODF
property.
Your reply (2009-08-05): Could you please provide some scenarios
which are related with “empty”value? Suppose a paragraph style, it
inherits the value of list level of it's parent paragraph style,
and set a “empty”value to it's list level, then we can imagine a
user interface for this, it may be some strange that only list
style is applied to paragraph style and no list level is assigned
to paragraph style. Do you agree?
my reply (now, 2009-08-07): The use case for the "empty" value in
my opinion is to have the possibility to break the value
inheritance from the parent style without defining a new value.
Ming Fei Jia included this value right from the beginning in the
ODF proposal - probably Ming Fei Jia has another use case in mind.
You have included yourself the sentence in the specification that
the value of style:list-level is "none" (which I have corrected to
"empty"), if the property is not given and no parent style exists.
Regarding ODF it is somehow consistent to have this "empty" value
and OOo should support it.
In the past years there was no style:list-level. Why should a
certain value in range [1..10] be mandatory now, when a list style
is set at a certain paragraph style. I can think of the following
scenario: I have 4 paragraph styles - PS1, PS2, PS3, PS4. All of
them have list style LS1 set. PS1 has list level = "1", PS2 has
list level = "2" and so on. I am using these paragraph styles to
format the paragraphs of a certain list on the different list
level. Now I want to include some bullet items under a certain
paragraph on list level 3. These bullet items will be on different
list level and should be all formatted as the paragraphs applying
PS3. Thus, I created a new paragraph style PS3Bullet with parent
PS3. But PS3Bullet gots another list style - namely LSBullet and I
set the list level to "empty", because I want to use PS3Bullet for
all list levels which I want to include as bullet items. Thus, no
need to define PS3Bullet1 (list level 1), PS3Bullet2 (list level
2), PS3Bullet3 (list level 3), ... I also want to apply PS3Bullet
to existing paragraphs without changing the paragraph's list level.
With the precondition that PS3 is the parent of PS3Bullet my
scenario would not be possible, if value "empty" does not exist.
08/11/2008, Feedback 1 from Xuan Gong:
1. After apply a paragraph style, such as "PS3Bullet1", to a
paragraph, all the attributes of paragraph containing list style and
list level should be reset. Is this right?
I agree as You have written it into the specification regarding the
paragraph's list level attribute and as it already happens in current
OOo Writer regarding the paragraph's list style.
2. If apply PS3Bullet to a
new paragraph without list style and list level, what the paragraph
should be formatted as?
See what happens in current OOo Writer. The paragraph inherits the list
style from PS3Bullet. The paragraph's list level attribute stays unset
and the default value (currently 0, representing list level 1) is used.
3. The common user scenario is that: a series
of paragraphs are collected in one number list, but the number type,
such as: "1,2,3", "a,b,c", bullet..., may be different on each level
of the number list, if user want to change the bullet type of some
paragraphs, user only change the paragraphs' list style for special
requirement through "Numbering on/off" on toolbar or "Numbering and
Bullet" dialog.
If the user uses toolbar "Numbering on/off" on a certain paragraph,
which belongs to a numbered list, the following happens:
- first Click on "Numbering on/off"
--> empty list style is hard-set at the paragraph. Thus, the paragraph
no longer belongs to the numbered list.
- second Click on "Numbering on/off"
--> If the previous paragraph belongs to a list, the paragraph is
attached to this list and applies the same list style. If the previous
paragraph does not belong to a list, a new list is started at the
paragraph. For this new list a new list style is automatically created
and applied.
If the user opens the "Bullets and Numbering" dialog having the cursor
inside one of the paragraphs, the format dialog of the applied list
style is opened. Then the user can change the list style's attributes
which after confirmation of the dialog will be valid for all paragraphs
which have this list style applied.
4. In my opinion, the two attributes list style and
list level should be bound to apply on paragraphs and paragraph
styles. That is, a paragraph style or a paragraph is with two
hard-set attributes "list style" and "list level" at same time, or
else, no only one of the two attributes is set to paragraph or
paragraph style. Thus there are no complex user scenarios confusing
users. Also, this consideration is for the better interoperability
with MS Word.
I disagree.
(a) Look at scenario #1, action 3. This action results in a paragraph,
which has a hard-set list level, but an unset list style. It inherits
the list style from its paragraph style.
(b) The ODF 1.2 specification draft containing the style:list-level
feature allows that a paragraph style has a hard-set list style, but no
list level or an empty list level.
(c) In ODF a paragraph can not inherited a list level from its paragraph
style. The list level is always given at the paragraph, when it is
inside a list. But the paragraph can inherit a list style from its
paragraph style or has a hard-set list style given in its automatic
paragraph style.
(d) In Microsoft Word 2003 I did the following - similar to scenario #1:
- insert three paragraphs P1, P2 and P3
- create new paragraph style PS and applied a certain list style to it.
I also assign PS to list level 1 of this list style.
- apply PS to P1, P2, P3
- demote list level of P2
- change list style of PS
--> P2 gots the new list style, because it still inherits it from PS
----------------------
Your note (2009-08-05): The value range of list level of paragraph
in Writer model is 0 to 9. It is better that we keep the same value
range [0...9] for list level attribute of paragraph style in Write
model. [1...10] is the value range in ODF. Is it appropriate that
the value of list level is 0 in Writer model if a paragaph style
has no parent paragrapht style.
my reply (now, 2009-08-07): I think we should change the Writer's
model for the list level of the paragraph - the value range should
be [1..10]: - values [1..10] for hard-set list levels 1..10 - unset
value for: -- inheritance of the parargraph style's list level, if
a list style is directly (hard-set) or indirectly (via paragraph
style) applied. -- no list level, if no list style is applied.
For the paragraph style I proposed value range [0..10] - value 0 to
represent ODF value "empty". - values [1..10] to represent ODF
values [1..10] - unset value for inheritance of paragraph style
I propose to do this refactoring in the Your "List Level"
contribution as one of the first steps before implementing ODF
style:list-level
feature.
What do You think about this refactoring proposal?
08/11/2008, Feedback 2 from Xuan Gong:
We agree with that change the range value from [0...9] to [1...10]
for list level of paragraph, but we also think this work is not very
urgent. In my opinion, if a paragraph style is set a value for "List
Style", the value of "List Level" attribute should not be "empty". We
see that the range of "Outline Level" is [0...10], the value 0
represents body text, and I think "Outline Level" is mainly used for
TOC collecting, so value 0 is necessary to distinguish a "body text"
and non-"body text". And "List Level" is different with "Outline
Level". I think the "empty" value for "List Style" is enough.
Yes, the change is not urgent.
I agree, that we can assure in the OOo Writer's user interface that the
paragraph style's list level attribute is not empty, when the paragraph
style gots list style attribute. But due to the current ODF 1.2
specification committee draft it is possible that the paragraph style's
list level is "empty" even when it has list style set. Thus, I think we
need to support this in OOo Writer. I have no problem, if the user can
not create such paragraph styles in the user interface of OOo Writer,
but via the ODF import and the UNO-API such a paragraph style has to be
possible and has to be handled according to ODF in my opinion.
----------------------
my note (2009-08-04): My proposal is to call this new UNO-API
property ListLevel – the same as it is called in the Writer model
and in ODF.
Your reply (2009-08-05): List Level of paragraph can be accessed
via UNO-API through the property “NumberingLevel”. So
“NumberingLevel”is also used for paragraph style for the
consideration of consistency.
my reply (now, 2009-08-07): Upps, my mind did not remember the
paragraph's UNO-API ;-) Thus, I agree with You.
---------------------
my note (2009-08-04): As already mentioned in an earlier email
reply I would recommend to access this attribute mainly in the
format dialog of the paragraph style. In my opinion in the format
dialog of the list style it should only be displayed.
Your reply (2009-08-05): If List Level attribute is accessed mainly
in format dialog of paragraph style, each list level of list style
could link to lots of paragaph style. How do we define the behavior
of your recommended user interface?
Any idea from UX designer?
my reply (now, 2009-08-07): Your observation is correct. Regarding
the ODF proposal it is possible that more than one paragraph style
can be assigned to a certain list level of a list style. In my
opinion OOo has to support this.
My proposal for the user interface is the following: - Edit the new
list level attribute of the paragraph style in the paragraph
style's format dialog on pane "Outline and Numbering" via a drop
down list box containing the values ["none", 1..10] representing
Writer models values [0..10]. - Show in the format dialog of the
list style in a read-only list box (not drop down and with a height
of two or three rows) the paragraph styles, which are assigned to
the selected list level.
08/11/2008, Feedback 3 from Xuan Gong:
I think the interoperability with MS Word will be not well if more
than one paragraph style can be assigned to a certain list level of a
list style. Do you agree? Suppose a paragraph style "Heading 1" is
applied to outline style, could the "List Level" attribute of
"Heading 1" be changed? If yes, the "Outline Level" attribute of
"Heading 1" is changed... Do you have a plan for the enhancement you
had mentioned in earlier discussion mail? (The enhancement contains:
1. Remove Menu Tools - Outline Numbering, 2. outline style becomes
visible to the OOo user... ) I think the UI entrance is not the key
of this contribution, we can improve the UI entrance latter combining
with your plan and design to provide a better usability to users. Do
you agree?
ad 'interoperability with MS Word':
As far as I know in Microsoft Word it is only possible to assign _one_
paragraph style to a certain list level of a list style. But I do not
know what the OOXML file format allows.
If I had known that the intention of Ming Fei Jia's new paragraph style
attribute style:list-level is to represent Microsoft Word association of
paragraph styles to a certain list level of a list style, I had asked
one of Microsoft TC members regarding Microsoft Word's feature. Now we
have the situation that the current ODF 1.2 specification committee
draft allows more than one paragraph style to have list level X while
having also the same list style set.
ad 'paragraph style "Heading 1"...':
I agree that the outline level and list level attribute should indicate
the same list level for the paragraph style, which are assigned to the
outline style.
ad 'enhancement I have mentioned earlier':
Currently, I have no plan. Yes, we can discuss and work on this later in
my opinion, too.
--------------------
scenario 1 from the specification
"ListLevel-ReplyODsFeedback-2009-08-05.odt": Given a paragraph “P”
with a paragraph style named “PS”, then do below actions on “PS”
and “P”: 1.Associate “PS” with the level 1 of a list style named
“LS1” (LS1's number format on each level are like this: 1. Level 1
1.1 Level 2 1.1.1 Level 3 ...... 1.1.1.1.1.1.1.1.1.1 Level 10)
Result: “P” is changed to “1.P” 2.Associate “PS” with the level 2
of “LS1” Result: “P” is changed from to “1.1 P” 3.Select “P”, then
hit "Demote one level" in "Bullets and Numbering"
toolbar
Result: “P” is changed from “1.1 P” to “1.1.1 P” 4.Associate “PS”
with the level 1 of “LS1” Result: no change on “1.1.1 P”
Your note (2009-08-05): I added two secnarios. A disagreement
scenario is: After step 4, Associate "PS" with level 2 of another
list style "LS2".
In my opinion, After step 3, paragraph "P" doesn't inherit the
values of attributes List Style and List Level from "PS", the
values "LS1" and "3" are set to List Style and List Level of "P".
So, after this senario, no change on "1.1.1 P", because the List
Name and List Level set at paragraph by user overrules the
paragraph style's List Name and List Level.
Any idea from UX designer?
my reply (now, 2009-08-07): Step 3 (Demotion of the list level of a
paragraph) is already possible in current OOo. Its result is only
that the list level of the paragraph changes. This action has no
effect on the list style attribute of the paragraph. If it is
hard-set, it is not changed. If it is unset and thus inherited from
the paragraph style, it is still unset and inherited from the
paragraph style. This should _not_ be changed, because the user
does not expect that attribute B is hard-set when he/she hard-set
attribute A. Thus, after step 3 paragraph "P" still inherits the
list style from paragraph style "PS" in my opinion - I hope I have
not overseen
something.
Some further notes about the paragraph's attributes from my point
view after each step: - after step 1: "P" inherits list style and
list level from "PS" regardless if before this step "P" has
hard-set list style and/or list level or not. - after step 2: "P"
still inherits list style and list level from "PS". - after step 3:
"P" still inherits list style from "PS", but has hard-set list
level. - after step 4: "P" still inherits list style from "PS", but
has hard-set list level. Thus, after step "Associate "PS" with list
level 2 of another list style "LS2" paragraph "P" has to change,
because it inherits the new list style from "PS". The question is,
if we want to define that this step also causes that the hard-set
list level at "P" is reset or not. I would prefer to leave the list
level at "P" as it is.
08/11/2008, Feedback 4 from Xuan Gong:
My concern is not the result of all above scenarios, follow your
logic, all results of scenarios are OK for me. But in my opinion, the
two attributes list style and list level should be bound to apply on
paragraphs and paragraph styles. (Please refer to the last paragraph
of my feedback 1 of 08/11/2008)
As also stated above, paragraph's list style and paragraph's list level
should stay separate. They are also not bound in ODF. Thus, we should
not introduce any restriction which other ODF supporting applications do
not or will not have.
--------------------
The solution regarding the inheritance of the outline level
attribute from the paragraph style to the paragraph is: During the
ODF import it is checked it paragraph's text:outline-level property
value equals the paragraph style's style:default-outline-level
property value. If the values are equal the outline level attribute
of the paragraph is left unset. Thus, the paragraph inherits the
value from the paragraph style in this case in the Writer model. If
the values are not equal text:outline-level value is set as the
outline level value at the paragraph in the Writer model. The same
we could do for the list level. If the paragraphs list level (given
by the nesting of <text:list> elements or by numbered paragraph's
property text:level) equals the paragraph style's style:list-level,
the paragraph's list level attribute is left unset. Thus, the
paragraph would inherit the value from its paragraph style in the
Writer model. What do You think?
08/11/2008, Feedback 5 from Xuan Gong: Our way is similar with your
thought. But there are some difference between us. You can see the
code snippet implemented by us:
if ( FN_UNO_NUM_LEVEL == pMap->nWID ) { sal_Int16 nLevel = 0; aValue
= nLevel; //-->List Level //Delete following code
//pTxtNd->SetAttrListLevel(nLevel); //new if( pTxtNd->GetpSwAttrSet()
&& pTxtNd->GetpSwAttrSet()->GetItem(RES_PARATR_NUMRULE,FALSE) )
pTxtNd->SetAttrListLevel(nLevel); else if(
pTxtNd->GetTxtColl()->GetAttrListLevel() != nLevel ) {
pTxtNd->SetAttr( pTxtNd->GetTxtColl()->GetNumRule() );
pTxtNd->SetAttrListLevel(nLevel); } //@End List Level }
This code snippet is from the UNO-API implementation. Right?
When implementing the "outline level" feature we had also this solution.
But, we decided to do it only in the ODF import, because the UNO-API to
this attribute should not be restricted. If a certain extension using
the UNO-API wants to set the list level directly at the paragraph the
UNO-API should not restrict this functionality. Otherwise this
restriction have to be documented at the UNO-API and this would change
the behavior of the UNO-API. The UNO-API is more general, more or less
the same as the core interfaces.
Think of the scenario, that an extension wants to change the list level
of a paragraph style, but wants to keep the list level of the paragraphs
which apply this paragraph style unchanged. Then the implementation code
has to be:
(a) set paragraph style's list level from X to Y.
(b) then set the paragraphs list level to X.
Changing the order of these two actions would not work and this would
not make sense.
Thus, please consider my thoughts about the generality of the UNO-API.
You may adopt Your solution to the one we choose for the outline level
attribute.
Best regards, Oliver.