head 1.3; access; symbols pkgsrc-2013Q4:1.2.0.6 pkgsrc-2013Q4-base:1.2 pkgsrc-2013Q3:1.2.0.4 pkgsrc-2013Q3-base:1.2 pkgsrc-2013Q2:1.2.0.2 pkgsrc-2013Q2-base:1.2 pkgsrc-2013Q1:1.1.0.4 pkgsrc-2013Q1-base:1.1 pkgsrc-2012Q4:1.1.0.2 pkgsrc-2012Q4-base:1.1; locks; strict; comment @// @; 1.3 date 2014.01.19.14.04.39; author rumko; state dead; branches; next 1.2; commitid 2EYBKDPEbpUOvJlx; 1.2 date 2013.05.09.13.56.58; author joerg; state Exp; branches; next 1.1; 1.1 date 2012.11.23.12.32.00; author joerg; state Exp; branches; next ; desc @@ 1.3 log @editors/lyx: update to 2.0.6 What's new in 2.0 (from upstream): * Advanced Search Facility * Spell-checking on the fly * Compare Documents * Multilingual Thesaurus * Refstyle Support * Multiple Indices * New backends: XeTeX, LuaTeX, and XHTML * Better output customization * Produce output with only selected subdocuments included * Outliner enhancements * Document-specific Layout * New supported LaTeX commands * Languages, scripts and encodings * Branches enhancements * Table features * Size features * Progress view and debugging pane * Color handling * Instant preview inset * Forward search for DVI/PDF files * Optional and Required Arguments * New (sub)version control features * Generalized support for LaTeX files preprocessing ** Improved support for Noweb ** Support for Sweave ** Support for LilyPond-Book Ok@@ wiz @ text @$NetBSD: patch-src_insets_InsetTabular.cpp,v 1.2 2013/05/09 13:56:58 joerg Exp $ --- src/insets/InsetTabular.cpp.orig 2011-01-05 14:02:35.000000000 +0000 +++ src/insets/InsetTabular.cpp @@@@ -68,7 +68,6 @@@@ using namespace std; using namespace lyx::support; -using boost::shared_ptr; using boost::dynamic_pointer_cast; @@@@ -176,6 +175,56 @@@@ private: }; +string const tostr(LyXAlignment const & num) +{ + switch (num) { + case LYX_ALIGN_NONE: + return "none"; + case LYX_ALIGN_BLOCK: + return "block"; + case LYX_ALIGN_LEFT: + return "left"; + case LYX_ALIGN_CENTER: + return "center"; + case LYX_ALIGN_RIGHT: + return "right"; + case LYX_ALIGN_LAYOUT: + return "layout"; + case LYX_ALIGN_SPECIAL: + return "special"; + } + return string(); +} + + +string const tostr(Tabular::VAlignment const & num) +{ + switch (num) { + case Tabular::LYX_VALIGN_TOP: + return "top"; + case Tabular::LYX_VALIGN_MIDDLE: + return "middle"; + case Tabular::LYX_VALIGN_BOTTOM: + return "bottom"; + } + return string(); +} + + +string const tostr(Tabular::BoxType const & num) +{ + switch (num) { + case Tabular::BOX_NONE: + return "none"; + case Tabular::BOX_PARBOX: + return "parbox"; + case Tabular::BOX_MINIPAGE: + return "minipage"; + } + return string(); +} + + template string const write_attribute(string const & name, T const & t) { @@@@ -232,56 +281,6 @@@@ string const write_attribute(string cons } -string const tostr(LyXAlignment const & num) -{ - switch (num) { - case LYX_ALIGN_NONE: - return "none"; - case LYX_ALIGN_BLOCK: - return "block"; - case LYX_ALIGN_LEFT: - return "left"; - case LYX_ALIGN_CENTER: - return "center"; - case LYX_ALIGN_RIGHT: - return "right"; - case LYX_ALIGN_LAYOUT: - return "layout"; - case LYX_ALIGN_SPECIAL: - return "special"; - } - return string(); -} - - -string const tostr(Tabular::VAlignment const & num) -{ - switch (num) { - case Tabular::LYX_VALIGN_TOP: - return "top"; - case Tabular::LYX_VALIGN_MIDDLE: - return "middle"; - case Tabular::LYX_VALIGN_BOTTOM: - return "bottom"; - } - return string(); -} - - -string const tostr(Tabular::BoxType const & num) -{ - switch (num) { - case Tabular::BOX_NONE: - return "none"; - case Tabular::BOX_PARBOX: - return "parbox"; - case Tabular::BOX_MINIPAGE: - return "minipage"; - } - return string(); -} - - // I would have liked a fromstr template a lot better. (Lgb) bool string2type(string const str, LyXAlignment & num) { @@@@ -2203,7 +2202,7 @@@@ int Tabular::TeXRow(odocstream & os, row OutputParams const & runparams) const { idx_type cell = cellIndex(i, 0); - shared_ptr inset = cellInset(cell); + boost::shared_ptr inset = cellInset(cell); Paragraph const & par = inset->paragraphs().front(); string const lang = par.getParLanguage(buffer().params())->lang(); @@@@ -2233,7 +2232,7 @@@@ int Tabular::TeXRow(odocstream & os, row if (isPartOfMultiColumn(i, j)) continue; ret += TeXCellPreamble(os, cell, ismulticol); - shared_ptr inset = cellInset(cell); + boost::shared_ptr inset = cellInset(cell); Paragraph const & par = inset->paragraphs().front(); bool rtl = par.isRTL(buffer().params()) @@@@ -2769,13 +2768,13 @@@@ void Tabular::plaintext(odocstream & os, } -shared_ptr Tabular::cellInset(idx_type cell) const +boost::shared_ptr Tabular::cellInset(idx_type cell) const { return cell_info[cellRow(cell)][cellColumn(cell)].inset; } -shared_ptr Tabular::cellInset(row_type row, +boost::shared_ptr Tabular::cellInset(row_type row, col_type column) const { return cell_info[row][column].inset; @@@@ -2783,7 +2782,7 @@@@ shared_ptr Tabular::cell void Tabular::setCellInset(row_type row, col_type column, - shared_ptr ins) const + boost::shared_ptr ins) const { CellData & cd = cell_info[row][column]; cd.inset = ins; @@@@ -4154,13 +4153,13 @@@@ void InsetTabular::validate(LaTeXFeature } -shared_ptr InsetTabular::cell(idx_type idx) const +boost::shared_ptr InsetTabular::cell(idx_type idx) const { return tabular.cellInset(idx); } -shared_ptr InsetTabular::cell(idx_type idx) +boost::shared_ptr InsetTabular::cell(idx_type idx) { return tabular.cellInset(idx); } @@@@ -4960,7 +4959,7 @@@@ bool InsetTabular::pasteClipboard(Cursor --c1; continue; } - shared_ptr inset( + boost::shared_ptr inset( new InsetTableCell(*paste_tabular->cellInset(r1, c1))); tabular.setCellInset(r2, c2, inset); // FIXME: change tracking (MG) @@@@ -4983,7 +4982,7 @@@@ void InsetTabular::cutSelection(Cursor & getSelection(cur, rs, re, cs, ce); for (row_type i = rs; i <= re; ++i) { for (col_type j = cs; j <= ce; ++j) { - shared_ptr t + boost::shared_ptr t = cell(tabular.cellIndex(i, j)); if (cur.buffer().params().trackChanges) // FIXME: Change tracking (MG) @@@@ -5153,7 +5152,7 @@@@ bool InsetTabular::insertPlaintextString case '\t': // we can only set this if we are not too far right if (cols < columns) { - shared_ptr inset = loctab->cellInset(cell); + boost::shared_ptr inset = loctab->cellInset(cell); Font const font = bv.textMetrics(&inset->text()). displayFont(0, 0); inset->setText(buf.substr(op, p - op), font, @@@@ -5165,7 +5164,7 @@@@ bool InsetTabular::insertPlaintextString case '\n': // we can only set this if we are not too far right if (cols < columns) { - shared_ptr inset = tabular.cellInset(cell); + boost::shared_ptr inset = tabular.cellInset(cell); Font const font = bv.textMetrics(&inset->text()). displayFont(0, 0); inset->setText(buf.substr(op, p - op), font, @@@@ -5182,7 +5181,7 @@@@ bool InsetTabular::insertPlaintextString } // check for the last cell if there is no trailing '\n' if (cell < cells && op < len) { - shared_ptr inset = loctab->cellInset(cell); + boost::shared_ptr inset = loctab->cellInset(cell); Font const font = bv.textMetrics(&inset->text()).displayFont(0, 0); inset->setText(buf.substr(op, len - op), font, buffer().params().trackChanges); @ 1.2 log @Allow building with libc++, where std::shared_ptr overlaps with boost::shared_ptr. @ text @d1 1 a1 1 $NetBSD: patch-src_insets_InsetTabular.cpp,v 1.1 2012/11/23 12:32:00 joerg Exp $ @ 1.1 log @Define functions before refering them in templates. Remove incomplete forward definition. @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- src/insets/InsetTabular.cpp.orig 2012-11-22 22:03:25.000000000 +0000 d5 9 a13 1 @@@@ -176,6 +176,56 @@@@ private: d70 1 a70 1 @@@@ -232,56 +282,6 @@@@ string const write_attribute(string cons d127 104 @