]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/controllers/ControlTabular.C
Add a buffer_path arg to InsetGraphicsMailer's params2string, string2params.
[lyx.git] / src / frontends / controllers / ControlTabular.C
index 8f83e0f1ddb671a913c7e5947f0344ad702276f4..d403a09de1fdd06aa77406b39a4e32a77cb39b53 100644 (file)
@@ -17,6 +17,7 @@
 #include "insets/insettabular.h"
 #include "support/LAssert.h"
 
+using namespace lyx::support;
 
 
 ControlTabular::ControlTabular(Dialog & parent)
@@ -33,7 +34,7 @@ bool ControlTabular::initialiseParams(string const & data)
        InsetTabular tmp(*buffer);
        int cell = InsetTabularMailer::string2params(data, tmp);
        if (cell != -1) {
-               params_.reset(new LyXTabular(*tmp.tabular.get()));
+               params_.reset(new LyXTabular(tmp.tabular));
                active_cell_ = cell;
        }
        return true;
@@ -55,7 +56,7 @@ int ControlTabular::getActiveCell() const
 
 LyXTabular const & ControlTabular::tabular() const
 {
-       lyx::Assert(params_.get());
+       Assert(params_.get());
        return *params_.get();
 }
 
@@ -75,7 +76,7 @@ bool ControlTabular::useMetricUnits() const
 
 void ControlTabular::toggleTopLine()
 {
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(LyXTabular::M_TOGGLE_LINE_TOP);
        else
                set(LyXTabular::TOGGLE_LINE_TOP);
@@ -84,7 +85,7 @@ void ControlTabular::toggleTopLine()
 
 void ControlTabular::toggleBottomLine()
 {
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(LyXTabular::M_TOGGLE_LINE_BOTTOM);
        else
                set(LyXTabular::TOGGLE_LINE_BOTTOM);
@@ -93,7 +94,7 @@ void ControlTabular::toggleBottomLine()
 
 void ControlTabular::toggleLeftLine()
 {
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(LyXTabular::M_TOGGLE_LINE_LEFT);
        else
                set(LyXTabular::TOGGLE_LINE_LEFT);
@@ -102,7 +103,7 @@ void ControlTabular::toggleLeftLine()
 
 void ControlTabular::toggleRightLine()
 {
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(LyXTabular::M_TOGGLE_LINE_RIGHT);
        else
                set(LyXTabular::TOGGLE_LINE_RIGHT);
@@ -111,7 +112,7 @@ void ControlTabular::toggleRightLine()
 
 void ControlTabular::setSpecial(string const & special)
 {
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(LyXTabular::SET_SPECIAL_MULTI, special);
        else
                set(LyXTabular::SET_SPECIAL_COLUMN, special);
@@ -120,7 +121,7 @@ void ControlTabular::setSpecial(string const & special)
 
 void ControlTabular::setWidth(string const & width)
 {
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(LyXTabular::SET_MPWIDTH, width);
        else
                set(LyXTabular::SET_PWIDTH, width);
@@ -178,7 +179,7 @@ void ControlTabular::halign(ControlTabular::HALIGN h)
                        break;
        }
 
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(multi_num);
        else
                set(num);
@@ -205,7 +206,7 @@ void ControlTabular::valign(ControlTabular::VALIGN v)
                        break;
        }
 
-       if (tabular().IsMultiColumn(getActiveCell()))
+       if (tabular().isMultiColumn(getActiveCell()))
                set(multi_num);
        else
                set(num);