[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2022-04-24 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

Julien Nabet  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=11
   ||1313

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2022-04-24 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

--- Comment #9 from Julien Nabet  ---
Testing the initial case on Excel:
function my_function () as string
   dim my_string as string
   let my_string = "abc def jhi"
   mid( my_string, 5 ) = "123"
   let my_function = my_string
end function

Excel returns 
"abc 123 jhi"
not 
"abc 123 def"

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2021-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

--- Comment #8 from QA Administrators  ---
Dear deustrno,

To make sure we're focusing on the bugs that affect our users today,
LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed
bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this
bug report. During that time, it's possible that the bug has been fixed, or the
details of the problem have changed. We'd really appreciate your help in
getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice
from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information
from Help - About LibreOffice.

If the bug is NOT present, please set the bug's Status field to
RESOLVED-WORKSFORME and leave a comment that includes the information from Help
- About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular
meaning that is not 
appropriate in this case)


If you want to do more to help you can test to see if your issue is a
REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your
bug pertains to a feature added after 3.3) from
https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword


Feel free to come ask questions or to say hello in our QA chat:
https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug

-- 
You are receiving this mail because:
You are the assignee for the bug.

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-15 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

--- Comment #7 from Oliver Brinzing  ---
(In reply to Julien Nabet from comment #4)
> On pc Debian x86-64 with master sources updated today, I got abc 123

sorry, only checked with LO 6.0.7.3 (VBASupport 1 worked but 0 crashes LO) and
AOO 4.1.5, behaviour changed with LO 6.1.

maybe a side effect from fixes:

Bug 111313 - Crashed in Calc Macro (Basic)
Bug 121325 - 4-argument form of Mid() BASIC function broken in 6.x (worked in
5.x and OO)

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

--- Comment #6 from Julien Nabet  ---
I put in cc the bugtracker related to the QA test which fails with the test
patch quoted in my previous comment.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

--- Comment #5 from Julien Nabet  ---
With this patch:
diff --git a/basic/source/runtime/methods.cxx
b/basic/source/runtime/methods.cxx
index fe266fdc009c..777b21040230 100644
--- a/basic/source/runtime/methods.cxx
+++ b/basic/source/runtime/methods.cxx
@@ -1159,7 +1159,7 @@ void SbRtl_Mid(StarBASIC *, SbxArray & rPar, bool bWrite)

 OUStringBuffer aResultStr = aArgStr;
 sal_Int32 nErase = nReplaceLen;
-aResultStr.remove( nStartPos, nErase );
+aResultStr.remove( nStartPos, nErase - nStartPos);
 aResultStr.insert(
 nStartPos, aReplaceStr.getStr(), std::min(nReplaceLen,
nReplaceStrLen));

it works.
But this unit test fails:
s = "The lightbrown fox"
Mid(s, 5, 10, "lazy")
it expects:
"The lazy fox"
but with the patch I get:
"The lazyrown fox"

Perhaps, I could use "nErase - nStartPos" only when using VBASupport 1
but:
1) Still I don't know if the patch is right
2) Changing behaviour of mid function may bring some regressions for some other
users

=> There's no more Basic expert in
https://wiki.documentfoundation.org/FindTheExpert, so I'm a bit stuck.

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

Julien Nabet  changed:

   What|Removed |Added

   See Also||https://bugs.documentfounda
   ||tion.org/show_bug.cgi?id=62
   ||090

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

Julien Nabet  changed:

   What|Removed |Added

 CC||serval2...@yahoo.fr

--- Comment #4 from Julien Nabet  ---
(In reply to Oliver Brinzing from comment #3)
> IMHO this is not a bug, to make mid() vba compatible, use 
> 
> Option VBASupport 1
> 
> Sub Main
> msgbox my_function()
> End Sub
>...

On pc Debian x86-64 with master sources updated today, I got 
abc 123

with VBASupport equal to 1 or 0, whatever

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

Oliver Brinzing  changed:

   What|Removed |Added

Version|6.2.5.2 release |Inherited From OOo
 CC||oliver.brinz...@gmx.de

--- Comment #3 from Oliver Brinzing  ---
IMHO this is not a bug, to make mid() vba compatible, use 

Option VBASupport 1

Sub Main
msgbox my_function()
End Sub

function my_function () as string
   dim my_string as string
   let my_string = "abc def jhi"
   mid( my_string, 5 ) = "123"
   let my_function = my_string
end function

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

himajin100...@gmail.com changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever confirmed|0   |1

--- Comment #2 from himajin100...@gmail.com ---
Reproduced, except for the result being ""abc 123 jhi"

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

[Libreoffice-bugs] [Bug 126913] Wrong behavior of Basic "mid" statement

2019-08-14 Thread bugzilla-daemon
https://bugs.documentfoundation.org/show_bug.cgi?id=126913

--- Comment #1 from deust...@bk.ru ---
Related docs:
https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/mid-statement

-- 
You are receiving this mail because:
You are the assignee for the bug.___
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs