X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Ffrontends%2Fxforms%2FXWorkArea.C;h=51f9a4e405b439b75818cbdeacb50ee1f926a4f8;hb=37e82a546392d43f787826b85481a11f2a27af15;hp=bf2e367925a26567ad8c7bd6f351621cf760423f;hpb=02ebc072b039aa001d0e18293eca596b41b4338c;p=lyx.git diff --git a/src/frontends/xforms/XWorkArea.C b/src/frontends/xforms/XWorkArea.C index bf2e367925..51f9a4e405 100644 --- a/src/frontends/xforms/XWorkArea.C +++ b/src/frontends/xforms/XWorkArea.C @@ -24,6 +24,8 @@ #include +using boost::shared_ptr; + using std::abs; using std::dec; using std::endl; @@ -147,17 +149,17 @@ XWorkArea::XWorkArea(LyXView & owner, int w, int h) // Hand control of the layout of these widgets to the // Layout Engine. XFormsView & xview = dynamic_cast(owner); - BoxList & boxlist = xview.getBox(XFormsView::Center).children(); + BoxList & boxlist = xview.getBox(XFormsView::Center)->children(); - wa_box_ = &boxlist.push_back(Box(0,0)); + wa_box_ = boxlist.push_back(Box(0,0)); wa_box_->set(Box::Horizontal); - Box & frame_box = widgets_.add(frame, wa_box_->children(), 0, 0); - frame_box.set(Box::Expand); + shared_ptr frame_box = widgets_.add(frame, wa_box_->children(), 0, 0); + frame_box->set(Box::Expand); int const bw = int(abs(fl_get_border_width())); - Box & wa_box = embed(work_area, frame_box.children(), widgets_, bw); - wa_box.set(Box::Expand); + shared_ptr wa_box = embed(work_area, frame_box->children(), widgets_, bw); + wa_box->set(Box::Expand); widgets_.add(scrollbar, wa_box_->children(), 17, 0);