IHTMLDocument2* document = GetDocument();
IHTMLElement *bodyTag = NULL;
IHTMLElement *htmlTag = NULL;
- BSTR bstr;
+ wxString source;
HRESULT hr = document->get_body(&bodyTag);
if(SUCCEEDED(hr))
{
hr = bodyTag->get_parentElement(&htmlTag);
if(SUCCEEDED(hr))
{
+ BSTR bstr;
htmlTag->get_outerHTML(&bstr);
+ source = wxString(bstr);
htmlTag->Release();
}
bodyTag->Release();
}
document->Release();
- return wxString(bstr);
+ return source;
}
wxWebViewZoom wxWebViewIE::GetZoom()
return GetIETextZoom();
else
wxFAIL;
+
+ //Dummy return to stop compiler warnings
+ return wxWEB_VIEW_ZOOM_MEDIUM;
}
{
return wxWEB_VIEW_ZOOM_LARGE;
}
- else if (zoom > 145)
+ else /*if (zoom > 145) */ //Using else removes a compiler warning
{
return wxWEB_VIEW_ZOOM_LARGEST;
}
IHTMLDocument2* document = GetDocument();
BSTR mode;
document->get_designMode(&mode);
+ document->Release();
if(wxString(mode) == "On")
return true;
else
return false;
-
- document->Release();
}
void wxWebViewIE::SelectAll()
{
IHTMLDocument2* document = GetDocument();
IHTMLSelectionObject* selection;
- BSTR type;
+ wxString sel;
HRESULT hr = document->get_selection(&selection);
if(SUCCEEDED(hr))
{
+ BSTR type;
selection->get_type(&type);
+ sel = wxString(type);
selection->Release();
}
document->Release();
- return wxString(type) != "None";
+ return sel != "None";
}
void wxWebViewIE::DeleteSelection()
wxString wxWebViewIE::GetPageText()
{
IHTMLDocument2* document = GetDocument();
- BSTR out;
+ wxString text;
IHTMLElement* body;
HRESULT hr = document->get_body(&body);
if(SUCCEEDED(hr))
{
+ BSTR out;
body->get_innerText(&out);
+ text = wxString(out);
body->Release();
}
document->Release();
- return wxString(out);
+ return text;
}
bool wxWebViewIE::CanExecCommand(wxString command)