rgheck wrote:
Jean-Marc Lasgouttes wrote:
rgheck <rgh...@bobjweil.com> writes:
So we have two different Inset*::getCaptionText methods with different
signatures? This looks ugly, I'd rather standardize on one.
I've changed the name to "getCaptionAsPlaintext()", which is what it does.

And is it warranted to have one with strings and one with streams?

Maybe I'm missing something, but which "one with strings" do you have in mind?

Oh, sorry, I see what you mean. We have:
docstring InsetText::getCaptionText(OutputParams const &) const
and
int InsetCaption::getCaptionAsPlaintext(odocstream & os, OutputParams const &) const Having looked at how these are used, of course you could change the signature of either, but they are used to do very different things, and they really make most sense as they are. I think. Changing the former would just force the odocstringstream::str() call to the client; changing the latter would introduce ugly indirection, since this is called from InsetCaption::plaintext() (where we have the odocstream) and wants to call InsetText::plaintext, which needs an odocstream.

rh

Reply via email to