-void GuiTabular::closeGUI()
-{
- // ugly hack to auto-apply the stuff that hasn't been
- // yet. don't let this continue to exist ...
-
- // Subtle here, we must /not/ apply any changes and
- // then refer to tabular, as it will have been freed
- // since the changes update the actual tabular_
- //
- // apply the fixed width values
- size_t const cell = getActiveCell();
- bool const multicol = tabular_.isMultiColumn(cell);
- string width = widgetsToLength(widthED, widthUnit);
- string width2;
-
- Length llen = getColumnPWidth(tabular_, cell);
- Length llenMulti = getMColumnPWidth(tabular_, cell);
-
- if (multicol && !llenMulti.zero())
- width2 = llenMulti.asString();
- else if (!multicol && !llen.zero())
- width2 = llen.asString();
-
- // apply the special alignment
- docstring const sa1 = qstring_to_ucs4(specialAlignmentED->text());
- docstring sa2;
-
- if (multicol)
- sa2 = getAlignSpecial(tabular_, cell,
- Tabular::SET_SPECIAL_MULTI);
- else
- sa2 = getAlignSpecial(tabular_, cell,
- Tabular::SET_SPECIAL_COLUMN);
-
- if (sa1 != sa2) {
- if (multicol)
- set(Tabular::SET_SPECIAL_MULTI, to_utf8(sa1));
- else
- set(Tabular::SET_SPECIAL_COLUMN, to_utf8(sa1));
- }
-
- if (width != width2) {
- if (multicol)
- set(Tabular::SET_MPWIDTH, width);
- else
- set(Tabular::SET_PWIDTH, width);
- }
-
- // When there is a header but no first header, set the first header
- // as empty . Otherwise longtable's caption handling would be broken,
- // see bug 6057.
- if (tabular_.haveLTHead() && !tabular_.haveLTFirstHead())
- set(Tabular::SET_LTFIRSTHEAD, "empty");
-
- /* DO WE NEED THIS?
- switch (topspaceCO->currentIndex()) {
- case 0:
- set(Tabular::SET_TOP_SPACE, "");
- break;
- case 1:
- set(Tabular::SET_TOP_SPACE, "default");
- break;
- case 2:
- set(Tabular::SET_TOP_SPACE,
- widgetsToLength(topspaceED,
- topspaceUnit));
- break;
- }
-
- switch (bottomspaceCO->currentIndex()) {
- case 0:
- set(Tabular::SET_BOTTOM_SPACE, "");
- break;
- case 1:
- set(Tabular::SET_BOTTOM_SPACE, "default");
- break;
- case 2:
- set(Tabular::SET_BOTTOM_SPACE,
- widgetsToLength(bottomspaceED,
- bottomspaceUnit));
- break;
- }
-
- switch (interlinespaceCO->currentIndex()) {
- case 0:
- set(Tabular::SET_INTERLINE_SPACE, "");
- break;
- case 1:
- set(Tabular::SET_INTERLINE_SPACE, "default");
- break;
- case 2:
- set(Tabular::SET_INTERLINE_SPACE,
- widgetsToLength(interlinespaceED,
- interlinespaceUnit));
- break;
- }
-*/
-}
-
-