https://bugs.freedesktop.org/show_bug.cgi?id=67118
Priority: medium
Bug ID: 67118
Assignee: [email protected]
Summary: BASIC: ReplaceByName - the IDE Code Window does not
display the replacement code
Severity: normal
Classification: Unclassified
OS: All
Reporter: [email protected]
Hardware: Other
Whiteboard: BSA
Status: UNCONFIRMED
Version: 3.3 all versions
Component: BASIC
Product: LibreOffice
Created attachment 82726
--> https://bugs.freedesktop.org/attachment.cgi?id=82726&action=edit
This Writer ODT file contains code that demonstrates the problem.
Problem description:
The method “replaceByName()” in the interface
“com.sun.star.container.XNameReplace” is used to change the contents of a BASIC
Module so it can be made to execute different code.
If the BASIC IDE Window is open and is displaying a module from this program,
then, after executing “replaceByName()” to a Module, the module continues to
display its original contents and does not update to display its new contents.
If the document is saved, closed and then relaunched, a review of the
replaceByName module will find that its contents were in fact updated.
Steps to Re-Create the Problem:
1. Create a new Writer ODT document, call it Test.odt and save it to disk.
2. Manually create a BASIC module named Module2, and observe its contents.
3. Insert the following subroutine into Module1
sub Main
BasicLibraries.getByName("Standard").replaceByName("Module2", "REM
Replacement Module2")
end sub
4. Start execution of the sub Main in Module1
5. Observe the contents of Module2 – Nothing has changed
6. Re-save Test.odt
7. Close Test.odt
8. Launch Test.odt
9. Observe contents of Module2. Now it contains, “REM Replacement Module2”
The attached Writer.odt file has code that better demonstrates this bug. It
inserts executable code into the replacement module and then proceeds to
execute it. It is observed that the correct replacement code is executing, but
displaying the code in the IDE Code Window for the module shows it still
contains its original code.
Current behavior:
After executing replaceByName() a module has its contents updated and if its
code it then executed it will execute the updated content. However the IDE Code
Window does not display the updated contents of the module.
Expected behavior:
After executing replaceByName() a module has its contents updated and if its
code it then executed it will execute the updated content. The IDE Code Window
will display the updated contents of the module.
regards, ian.
Operating System: All
Version: 3.3 all versions
--
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs