lokdocview: handle empty LOK_CALLBACK_DOCUMENT_SIZE_CHANGED payload
Calc omits the document size in the payload in several cases, and online.git handles that, so handle it in lokdocview as well for now, instead of fixing up all the sc code to always emit the doc size in the payload. Change-Id: Ib2cca1770d2a160e32540e3a3158eb00bf13207b
This commit is contained in:
parent
6d361d86f7
commit
127a34ef2c
@ -1228,7 +1228,11 @@ callback (gpointer pData)
|
||||
break;
|
||||
case LOK_CALLBACK_DOCUMENT_SIZE_CHANGED:
|
||||
{
|
||||
payloadToSize(pCallback->m_aPayload.c_str(), priv->m_nDocumentWidthTwips, priv->m_nDocumentHeightTwips);
|
||||
if (!pCallback->m_aPayload.empty())
|
||||
payloadToSize(pCallback->m_aPayload.c_str(), priv->m_nDocumentWidthTwips, priv->m_nDocumentHeightTwips);
|
||||
else
|
||||
priv->m_pDocument->pClass->getDocumentSize(priv->m_pDocument, &priv->m_nDocumentWidthTwips, &priv->m_nDocumentHeightTwips);
|
||||
|
||||
gtk_widget_set_size_request(GTK_WIDGET(pDocView),
|
||||
twipToPixel(priv->m_nDocumentWidthTwips, priv->m_fZoom),
|
||||
twipToPixel(priv->m_nDocumentHeightTwips, priv->m_fZoom));
|
||||
|
Loading…
x
Reference in New Issue
Block a user