[Libreoffice-commits] core.git: 2 commits - libreofficekit/qa
Miklos Vajna
vmiklos at collabora.co.uk
Thu Nov 26 00:46:29 PST 2015
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 38 +++++++++++++-------
1 file changed, 26 insertions(+), 12 deletions(-)
New commits:
commit 21713893a4a4ac199d0bf3edb00a1c50082b03d8
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 26 09:27:47 2015 +0100
cid#1340232 uncaught exception
Change-Id: Idb80a055aca67a3fb90aef597ace932f47af8e05
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 2364ea1..fee5266 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -307,16 +307,23 @@ gboolean TiledRowColumnBar::docConfigureEvent(GtkWidget* pDocView, GdkEventConfi
gtk_widget_queue_draw(rWindow.m_pRowBar->m_pDrawingArea);
rWindow.m_pColumnBar->m_aHeaders.clear();
- for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("columns"))
+ try
{
- int nSize = std::round(lok_doc_view_twip_to_pixel(LOK_DOC_VIEW(pDocView), std::atof(rValue.second.get<std::string>("size").c_str())));
- if (nSize >= rWindow.m_pColumnBar->m_nPositionPixel)
+ for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("columns"))
{
- int nScrolledSize = nSize - rWindow.m_pColumnBar->m_nPositionPixel;
- Header aHeader(nScrolledSize, rValue.second.get<std::string>("text"));
- rWindow.m_pColumnBar->m_aHeaders.push_back(aHeader);
+ int nSize = std::round(lok_doc_view_twip_to_pixel(LOK_DOC_VIEW(pDocView), std::atof(rValue.second.get<std::string>("size").c_str())));
+ if (nSize >= rWindow.m_pColumnBar->m_nPositionPixel)
+ {
+ int nScrolledSize = nSize - rWindow.m_pColumnBar->m_nPositionPixel;
+ Header aHeader(nScrolledSize, rValue.second.get<std::string>("text"));
+ rWindow.m_pColumnBar->m_aHeaders.push_back(aHeader);
+ }
}
}
+ catch (boost::property_tree::ptree_bad_path& rException)
+ {
+ std::cerr << "TiledRowColumnBar::docConfigureEvent: failed to get columns: " << rException.what() << std::endl;
+ }
gtk_widget_show(rWindow.m_pColumnBar->m_pDrawingArea);
gtk_widget_queue_draw(rWindow.m_pColumnBar->m_pDrawingArea);
gtk_widget_show(rWindow.m_pFormulabarEntry);
commit ca8a0396443be9351d673559ad38776f45340d57
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu Nov 26 09:27:36 2015 +0100
cid#1340231 uncaught exception
Change-Id: I69f2078093c2c23ae0a02a6a292e51fdbdde9ed4
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 77021bf..2364ea1 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -286,16 +286,23 @@ gboolean TiledRowColumnBar::docConfigureEvent(GtkWidget* pDocView, GdkEventConfi
gtk_widget_show(rWindow.m_pCornerButton->m_pDrawingArea);
rWindow.m_pRowBar->m_aHeaders.clear();
- for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("rows"))
+ try
{
- int nSize = std::round(lok_doc_view_twip_to_pixel(LOK_DOC_VIEW(pDocView), std::atof(rValue.second.get<std::string>("size").c_str())));
- if (nSize >= rWindow.m_pRowBar->m_nPositionPixel)
+ for (boost::property_tree::ptree::value_type& rValue : aTree.get_child("rows"))
{
- int nScrolledSize = nSize - rWindow.m_pRowBar->m_nPositionPixel;
- Header aHeader(nScrolledSize, rValue.second.get<std::string>("text"));
- rWindow.m_pRowBar->m_aHeaders.push_back(aHeader);
+ int nSize = std::round(lok_doc_view_twip_to_pixel(LOK_DOC_VIEW(pDocView), std::atof(rValue.second.get<std::string>("size").c_str())));
+ if (nSize >= rWindow.m_pRowBar->m_nPositionPixel)
+ {
+ int nScrolledSize = nSize - rWindow.m_pRowBar->m_nPositionPixel;
+ Header aHeader(nScrolledSize, rValue.second.get<std::string>("text"));
+ rWindow.m_pRowBar->m_aHeaders.push_back(aHeader);
+ }
}
}
+ catch (boost::property_tree::ptree_bad_path& rException)
+ {
+ std::cerr << "TiledRowColumnBar::docConfigureEvent: failed to get rows: " << rException.what() << std::endl;
+ }
gtk_widget_show(rWindow.m_pRowBar->m_pDrawingArea);
gtk_widget_queue_draw(rWindow.m_pRowBar->m_pDrawingArea);
More information about the Libreoffice-commits
mailing list