fixed badly named wxHtmlTag::GetParam() argument: with_quotes, not with_commas

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48513 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík 2007-08-31 13:48:37 +00:00
parent b15666a6fa
commit 614f971389
3 changed files with 7 additions and 7 deletions

View File

@ -94,7 +94,7 @@ and name of {\tt </table>} is "TABLE")
\membersection{wxHtmlTag::GetParam}\label{wxhtmltaggetparam}
\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_commas = false}}
\constfunc{wxString}{GetParam}{\param{const wxString\& }{par}, \param{bool }{with\_quotes = false}}
Returns the value of the parameter. You should check whether the
parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
@ -103,7 +103,7 @@ parameter exists or not (use \helpref{HasParam}{wxhtmltaghasparam}) first.
\docparam{par}{The parameter's name.}
\docparam{with\_commas}{true if you want to get commas as well. See example.}
\docparam{with\_quotes}{true if you want to get quotes as well. See example.}
\wxheading{Example}

View File

@ -94,8 +94,8 @@ public:
// enclosed with "
// Example : <P align=right> GetParam("ALIGN") returns (RIGHT)
// <P IMG SRC="WhaT.jpg"> GetParam("SRC") returns (WhaT.jpg)
// (or ("WhaT.jpg") if with_commas == true)
wxString GetParam(const wxString& par, bool with_commas = false) const;
// (or ("WhaT.jpg") if with_quotes == true)
wxString GetParam(const wxString& par, bool with_quotes = false) const;
// Convenience functions:
bool GetParamAsColour(const wxString& par, wxColour *clr) const;
@ -103,7 +103,7 @@ public:
// Scans param like scanf() functions family does.
// Example : ScanParam("COLOR", "\"#%X\"", &clr);
// This is always with with_commas=false
// This is always with with_quotes=false
// Returns number of scanned values
// (like sscanf() does)
// NOTE: unlike scanf family, this function only accepts

View File

@ -431,12 +431,12 @@ bool wxHtmlTag::HasParam(const wxString& par) const
return (m_ParamNames.Index(par, false) != wxNOT_FOUND);
}
wxString wxHtmlTag::GetParam(const wxString& par, bool with_commas) const
wxString wxHtmlTag::GetParam(const wxString& par, bool with_quotes) const
{
int index = m_ParamNames.Index(par, false);
if (index == wxNOT_FOUND)
return wxGetEmptyString();
if (with_commas)
if (with_quotes)
{
// VS: backward compatibility, seems to be never used by wxHTML...
wxString s;