https://bugs.documentfoundation.org/show_bug.cgi?id=143183

Mike Kaganski <mikekagan...@hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |er...@redhat.com

--- Comment #2 from Mike Kaganski <mikekagan...@hotmail.com> ---
OMG, how convoluted is it all.
There is a special processing in Basic for text input.

* "!" in the first position of format string means "take first character only
(and ignore the rest of both input string, and of format string)":

> Format("FooBar", "!!abc") => "F" (everything after initial "1" is discarded)

* "\" in the first position of format string means "starting from this, start
outputting character by character from the input string, until another "\" is
found, then break":

> Format("FooBar", "\.!?\abc") => "FooBa" (5 character output: one for each "\",
>                                       ".", "!", "?", and "\").

* Everything else in the format string just means "output the input string
verbatim".
This effectively disables normal format string handling for strings that can't
convert to text - so e.g. this doesn't produce an expected result:

> Format("BAZ", "foo@bar") => "BAZ", not expected "fooBAZbar", nor
>                             "fooBbazAR", as VBA gives

IIUC, VBA doesn't have such a strange thing. Where does this come from? Even
https://wiki.openoffice.org/w/images/c/c1/BasicGuide_OOo3.2.0.pdf doesn't
mention those strange things. Should we just drop that special processing?

See printfmtstr in basic/source/sbx/sbxscan.cxx

-- 
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

Reply via email to