Apache OpenOffice (AOO) Bugzilla – Issue 59791
Regression in Basic : constants constructs are limited to 79 character length
Last modified: 2006-02-21 12:35:31 UTC
Found on build 8990 It could be a consequence of fixing IZ 45570 This code produces a compilation syntax error (main instruction in one long line): Sub Main const a = "12345678901234567890123456789012345678901234567890123456789012345678901234567890" & "" print a End Sub If you suppress one character in the main string the syntax error disappears. If you construct the string with concatenation of substrings on several lines you get a syntax error for more than 79 characters in total. The bug is related with the concatenation character & or + There is no error if the long string is created in one step, without concatenation. This bug is catastrophic because already existing and perfectly working macros may not be usable with 2.0.1. The designer of new macros can stumble on not-understandable messages, because there is no fault. Furthermore you have to make deep changes in your macros to circumvent this bug.
confirmed.
*** Issue 59800 has been marked as a duplicate of this issue. ***
Andreas, for you?
ab->bmarcelly: Like i59790 this task is not "catastrophic" and it's no P2 for sure, as the rules say: "P2 marks severe problems which affect a _significant_ number of customers" and I doubt that you find such code even in 1 of 10.000 macros. But indeed it's a regression: -> P3, OOo 2.0.3
"I doubt that you find such code even in 1 of 10.000 macros." This sentence reminds me of Intel comment about the infamous Pentium bug. Yes, my code is strange, but only because it is chosen as a simple and obvious example. The general case is when you create constant texts which will be displayed in a TextField control. Here is a code extracted from a macro. There are many constants like this: Public Const txt0402 = "---- Browsing pages ---- \n\n" & _ "Displays a list of the pages to help you choose the current page. \n" & _ "Pages are listed : \n" & _ "- either according to the current page order \n" & _ "- or in alphabetical order \n" & _ " - distinguishing upper case from lower case \n" & _ " - without attention to upper case / lower case \n\n" & _ "---- Action on pages ---- \n" For your information, each \n is converted by program into chr(13) before storing the string in the TextField control. Now I get a syntax error and the macro can't work. If I suppress the concatenation and put the whole instruction in one line it becomes impossible to see the structure of the text.
ab->bmarcelly: Sorry, I did not read your initial description carefully enough, especially the part "you get a syntax error for more than 79 characters in total". So I thought the problem is only related to programs where one substring extends 79 characters. Now I agree that this one is really ugly and I will start to fix it immediately. -> Target OOo 2.0.2
Fixed in cws ab24
ab->jsk: You should also check the bugdoc from i45570 as the fix is more a re-fix of i45570 with fixing this task as a side effect. re-open issue and reassign to jsk@openoffice.org
reassign to jsk@openoffice.org
reset resolution to FIXED
Started QA
Verified in cws ab24, Windows, additionally tried continuation lines and other stuff that might make this code stumble.
OK on MWS, closing