From 5115349d11baf91abeb9cbe369ebde28bef29288 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lars=20Gullik=20Bj=C3=B8nnes?= Date: Sat, 17 Mar 2001 02:06:21 +0000 Subject: [PATCH] try out anonnamespace, detfault to expanded minipage git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@1789 a592a061-630c-0410-9148-cb99ea01b6c8 --- po/POTFILES.in | 50 +++++++++++++++++------------------ src/BufferView_pimpl.C | 9 +++++-- src/ChangeLog | 7 +++++ src/WorkArea.C | 8 ++++-- src/insets/ChangeLog | 4 +++ src/insets/insetcollapsable.h | 7 +++-- src/insets/insetminipage.C | 1 + src/tabular.C | 8 +++--- 8 files changed, 59 insertions(+), 35 deletions(-) diff --git a/po/POTFILES.in b/po/POTFILES.in index a74ea7b366..d82613cbeb 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in @@ -64,6 +64,7 @@ src/frontends/kde/tocdlg.C src/frontends/kde/urldlg.C src/frontends/qt2/FileDialog.C src/frontends/qt2/FormCharacter.C +src/frontends/qt2/FormCitation.C src/frontends/qt2/FormCopyright.C src/frontends/qt2/FormParagraph.C src/frontends/qt2/FormPrint.C @@ -73,59 +74,58 @@ src/frontends/qt2/paragraphdlgimpl.C src/frontends/qt2/tabularcreatedlgimpl.C src/frontends/xforms/combox.C src/frontends/xforms/FileDialog.C -src/frontends/xforms/FormBibitem.C src/frontends/xforms/form_bibitem.C -src/frontends/xforms/FormBibtex.C +src/frontends/xforms/FormBibitem.C src/frontends/xforms/form_bibtex.C +src/frontends/xforms/FormBibtex.C src/frontends/xforms/form_browser.C -src/frontends/xforms/FormCharacter.C src/frontends/xforms/form_character.C -src/frontends/xforms/FormCitation.C +src/frontends/xforms/FormCharacter.C src/frontends/xforms/form_citation.C -src/frontends/xforms/FormCopyright.C +src/frontends/xforms/FormCitation.C src/frontends/xforms/form_copyright.C -src/frontends/xforms/FormCredits.C +src/frontends/xforms/FormCopyright.C src/frontends/xforms/form_credits.C -src/frontends/xforms/FormDocument.C +src/frontends/xforms/FormCredits.C src/frontends/xforms/form_document.C -src/frontends/xforms/FormError.C +src/frontends/xforms/FormDocument.C src/frontends/xforms/form_error.C -src/frontends/xforms/FormExternal.C +src/frontends/xforms/FormError.C src/frontends/xforms/form_external.C -src/frontends/xforms/FormFiledialog.C +src/frontends/xforms/FormExternal.C src/frontends/xforms/form_filedialog.C -src/frontends/xforms/FormGraphics.C +src/frontends/xforms/FormFiledialog.C src/frontends/xforms/form_graphics.C -src/frontends/xforms/FormInclude.C +src/frontends/xforms/FormGraphics.C src/frontends/xforms/form_include.C -src/frontends/xforms/FormIndex.C +src/frontends/xforms/FormInclude.C src/frontends/xforms/form_index.C +src/frontends/xforms/FormIndex.C src/frontends/xforms/FormLog.C +src/frontends/xforms/form_maths.C +src/frontends/xforms/FormMaths.C src/frontends/xforms/form_minipage.C src/frontends/xforms/FormMinipage.C src/frontends/xforms/form_paragraph.C -src/frontends/xforms/FormMaths.C -src/frontends/xforms/form_maths.C src/frontends/xforms/FormParagraph.C -src/frontends/xforms/form_paragraph.C -src/frontends/xforms/FormPreamble.C src/frontends/xforms/form_preamble.C -src/frontends/xforms/FormPreferences.C +src/frontends/xforms/FormPreamble.C src/frontends/xforms/form_preferences.C -src/frontends/xforms/FormPrint.C +src/frontends/xforms/FormPreferences.C src/frontends/xforms/form_print.C -src/frontends/xforms/FormRef.C +src/frontends/xforms/FormPrint.C src/frontends/xforms/form_ref.C -src/frontends/xforms/FormSearch.C +src/frontends/xforms/FormRef.C src/frontends/xforms/form_search.C -src/frontends/xforms/FormTabular.C +src/frontends/xforms/FormSearch.C src/frontends/xforms/form_tabular.C -src/frontends/xforms/FormTabularCreate.C +src/frontends/xforms/FormTabular.C src/frontends/xforms/form_tabular_create.C -src/frontends/xforms/FormToc.C +src/frontends/xforms/FormTabularCreate.C src/frontends/xforms/form_toc.C -src/frontends/xforms/FormUrl.C +src/frontends/xforms/FormToc.C src/frontends/xforms/form_url.C +src/frontends/xforms/FormUrl.C src/frontends/xforms/FormVCLog.C src/frontends/xforms/input_validators.C src/frontends/xforms/Menubar_pimpl.C diff --git a/src/BufferView_pimpl.C b/src/BufferView_pimpl.C index ca9cea4c94..9256cc994e 100644 --- a/src/BufferView_pimpl.C +++ b/src/BufferView_pimpl.C @@ -80,14 +80,17 @@ extern int bibitemMaxWidth(BufferView *, LyXFont const &); const unsigned int saved_positions_num = 20; -static inline +namespace { + +//static +inline void waitForX() { XSync(fl_get_display(), 0); } -static +//static void SetXtermCursor(Window win) { static Cursor cursor; @@ -101,6 +104,8 @@ void SetXtermCursor(Window win) XFlush(fl_get_display()); } +} // anon namespace + BufferView::Pimpl::Pimpl(BufferView * b, LyXView * o, int xpos, int ypos, int width, int height) diff --git a/src/ChangeLog b/src/ChangeLog index 84fd6d6aae..a56a3b3685 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,10 @@ +2001-03-17 Lars Gullik Bjønnes + + * tabular.C (l_getline): use string::erase, small whitespace change. + + * BufferView_pimpl.C: try the anon namespace. + * WorkArea.C: ditto + 2001-03-16 Juergen Vigna * BufferView_pimpl.C (workAreaButtonRelease): return only on button==2 diff --git a/src/WorkArea.C b/src/WorkArea.C index 50222dc787..8483620d14 100644 --- a/src/WorkArea.C +++ b/src/WorkArea.C @@ -33,12 +33,17 @@ FL_OBJECT * figinset_canvas; // This is at least true for g++. //using std::abs; -static inline +namespace { + +//static +inline void waitForX() { XSync(fl_get_display(), 0); } +} // anon namespace + extern "C" { // Just a bunch of C wrappers around static members of WorkArea @@ -57,7 +62,6 @@ extern "C" { } - WorkArea::WorkArea(int xpos, int ypos, int width, int height) : workareapixmap(0), painter_(*this) { diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index 735435c327..0bbbd9bc71 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,7 @@ +2001-03-17 Lars Gullik Bjønnes + + * insetminipage.C (InsetMinipage): default to not collapsed + 2001-03-16 Juergen Vigna * insetminipage.C (width): modified with to be a string diff --git a/src/insets/insetcollapsable.h b/src/insets/insetcollapsable.h index 54da271843..f7bb4258f4 100644 --- a/src/insets/insetcollapsable.h +++ b/src/insets/insetcollapsable.h @@ -156,8 +156,11 @@ public: // protected method "clickInButton" (Lgb) protected: /// - mutable int - button_length, button_top_y, button_bottom_y; + mutable int button_length; + /// + mutable int button_top_y; + /// + mutable int button_bottom_y; private: /// diff --git a/src/insets/insetminipage.C b/src/insets/insetminipage.C index 5429119f52..902b7ea2c4 100644 --- a/src/insets/insetminipage.C +++ b/src/insets/insetminipage.C @@ -69,6 +69,7 @@ InsetMinipage::InsetMinipage() setLabelFont(font); setAutoCollapse(false); setInsetName("Minipage"); + collapsed = false; } diff --git a/src/tabular.C b/src/tabular.C index 217be601a1..886946cc19 100644 --- a/src/tabular.C +++ b/src/tabular.C @@ -1225,11 +1225,11 @@ bool getTokenValue(string const & str, const char * token, bool & flag) static inline void l_getline(istream & is, string & str) { - str = string(); - while(str.empty()) { + str.erase(); + while (str.empty()) { getline(is, str); - if (!str.empty() && str[str.length()-1] == '\r') - str.erase(str.length()-1); + if (!str.empty() && str[str.length() - 1] == '\r') + str.erase(str.length() - 1); } }