Re: [Libreoffice] fix for fdo#33960 cross reference to a list number, dot bug makes sw/qa/complex/writer fail

2011-09-13 Thread Stephan Bergmann

On 09/07/2011 11:15 PM, Troy Rollo wrote:

On Wednesday 07 September 2011, Stephan Bergmann wrote:

Troy, will you come up with a fix that brings
sw/source/core/doc/number.cxx and
sw/qa/complex/writer/CheckCrossReferences.java in sync again?


I won't be able to do that until mid November due to other commitments.


Reopened https://bugs.freedesktop.org/show_bug.cgi?id=33960 cross 
reference to a list number, dot bug and disabled the failing tests as 
http://cgit.freedesktop.org/libreoffice/core/commit/?id=e849071acc91cafd05d52326e6a5cccf750836c1 
fdo#33960#, fdo#35690#: Disabled failing checkCrossReferences tests for 
now.


-Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] fix for fdo#33960 cross reference to a list number, dot bug makes sw/qa/complex/writer fail

2011-09-07 Thread Troy Rollo
On Wednesday 07 September 2011, Stephan Bergmann wrote:

 Troy, will you come up with a fix that brings
 sw/source/core/doc/number.cxx and
 sw/qa/complex/writer/CheckCrossReferences.java in sync again?

I won't be able to do that until mid November due to other commitments.

-- 
t...@troy.rollo.name - Sydney, Australia


signature.asc
Description: This is a digitally signed message part.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


[Libreoffice] fix for fdo#33960 cross reference to a list number, dot bug makes sw/qa/complex/writer fail

2011-09-06 Thread Stephan Bergmann

At least with recent git trunk builds, make subsequentcheck fails in sw with


1) checkCrossReferences(complex.writer.CheckCrossReferences)
org.junit.ComparisonFailure: set reference field format doesn't result in correct field 
result expected: 1[.] but was: 1[]
at org.junit.Assert.assertEquals(Assert.java:123)
at 
complex.writer.CheckCrossReferences.checkField(CheckCrossReferences.java:120)
at 
complex.writer.CheckCrossReferences.checkCrossReferences(CheckCrossReferences.java:176)


This appears to be caused by the fix for 
https://bugs.freedesktop.org/show_bug.cgi?id=33960 cross reference to 
a list number, dot bug, which removes the trailing . from 
SwNumRule::MakeRefNumString.


The question is, is the below patch (which makes that subsequentcheck 
failure go away) right in adapting the failing test to the new code, or 
does this failure actually uncover unwanted side effects of the new code 
(I'm esp. unsure about changing A. 1. to A 1)?



diff --git a/sw/qa/complex/writer/CheckCrossReferences.java 
b/sw/qa/complex/writer/CheckCrossReferences.j
index cc7fcb1..597a14f 100644
--- a/sw/qa/complex/writer/CheckCrossReferences.java
+++ b/sw/qa/complex/writer/CheckCrossReferences.java
@@ -145,9 +145,9 @@ public class CheckCrossReferences {
 final String FldResult1 = *i*;
 final String FldResult2 = +b+*i*;
 final String FldResult3 = -1-+b+*i*;
-final String FldResult4 = 1.;
-final String FldResult5 =  1.;
-final String FldResult6 = A. 1.;
+final String FldResult4 = 1;
+final String FldResult5 =  1;
+final String FldResult6 = A 1;

 // variables for current field
 com.sun.star.text.XTextField xField = null;


-Stephan
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] fix for fdo#33960 cross reference to a list number, dot bug makes sw/qa/complex/writer fail

2011-09-06 Thread Neil Leathers
 The question is, is the below patch (which makes that subsequentcheck 
 failure go away) right in adapting the failing test to the new code, or 
 does this failure actually uncover unwanted side effects of the new code 
 (I'm esp. unsure about changing A. 1. to A 1)?

The approach is too simple. The first problem is that the level separator is 
not necessarily a . (and is configurable at each level in other word 
processors). Also, while it is understandable in the case described it is not 
necessarily the desired always especially for lists with multiple levels. When 
in the configuration options of a list there should be a toggle for whether to 
remove the final list level separation suffix in references. I don't see 
removing internal separators (or level prefix) and I can see that sometime a 
user might not want the trailing suffix removed.

Neil Leathers
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] fix for fdo#33960 cross reference to a list number, dot bug makes sw/qa/complex/writer fail

2011-09-06 Thread Bjoern Michaelsen
On Tue, 6 Sep 2011 15:27:07 -0300
Neil Leathers neil.r.leath...@gmail.com
wrote:

 The approach is too simple. The first problem is that the level
 separator is not necessarily a . (and is configurable at each level
 in other word processors).
Its allowed for the test to assume an default config -- as it always
tests a default config.

 Also, while it is understandable in the  case described it is not
 necessarily the desired always especially for lists with multiple
 levels. When in the configuration options of a list there should be a
 toggle for whether to remove the final list level separation suffix
 in references. I don't see removing internal separators (or level
 prefix) and I can see that sometime a user might not want the
 trailing suffix removed.

Thats besides the point I think. Stephans question was: The behaviour
of the numbering changed. Was that intended or is it an unintended
change?

The best candidate to answer that question of cause is the author of
the change that caused the different behavior (cc'ing author and
commiter).


Best,

Bjoern

-- 
https://launchpad.net/~bjoern-michaelsen


___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice


Re: [Libreoffice] fix for fdo#33960 cross reference to a list number, dot bug makes sw/qa/complex/writer fail

2011-09-06 Thread Troy Rollo
On Wednesday 07 September 2011, Stephan Bergmann wrote:
  
   final String FldResult1 = *i*;
   final String FldResult2 = +b+*i*;
   final String FldResult3 = -1-+b+*i*;
  
  -final String FldResult4 = 1.;
  -final String FldResult5 =  1.;
  -final String FldResult6 = A. 1.;
  +final String FldResult4 = 1;
  +final String FldResult5 =  1;
  +final String FldResult6 = A 1;

The last one should be A.1 rather than A 1. The second last should be 1 
rather than  1. The ule implemented was actually somewhat more complex than 
the simple rule described in the bug report.


signature.asc
Description: This is a digitally signed message part.
___
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice