[skip ci] fix more -Wgnu-zero-variadic-macro-arguments
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include <App/DocumentObject.h>
|
||||
|
||||
#include "Application.h"
|
||||
#include "Command.h"
|
||||
#include "CommandT.h"
|
||||
#include "Document.h"
|
||||
#include "Selection.h"
|
||||
#include "ViewProvider.h"
|
||||
@@ -79,7 +79,7 @@ StdCmdRandomColor::StdCmdRandomColor()
|
||||
|
||||
void StdCmdRandomColor::activated(int iMsg)
|
||||
{
|
||||
Q_UNUSED(iMsg);
|
||||
Q_UNUSED(iMsg);
|
||||
|
||||
// get the complete selection
|
||||
std::vector<SelectionSingleton::SelObj> sel = Selection().getCompleteSelection();
|
||||
@@ -93,14 +93,14 @@ void StdCmdRandomColor::activated(int iMsg)
|
||||
auto vpLink = dynamic_cast<ViewProviderLink*>(view);
|
||||
if(vpLink) {
|
||||
if(!vpLink->OverrideMaterial.getValue())
|
||||
FCMD_VOBJ_CMD2("OverrideMaterial = True",it->pObject);
|
||||
FCMD_VOBJ_CMD2("ShapeMaterial.DiffuseColor=(%.2f,%.2f,%.2f)", it->pObject, fRed, fGrn, fBlu);
|
||||
cmdGuiObjectArgs(it->pObject, "OverrideMaterial = True");
|
||||
cmdGuiObjectArgs(it->pObject, "ShapeMaterial.DiffuseColor=(%.2f,%.2f,%.2f)", fRed, fGrn, fBlu);
|
||||
continue;
|
||||
}
|
||||
auto color = dynamic_cast<App::PropertyColor*>(view->getPropertyByName("ShapeColor"));
|
||||
if (color) {
|
||||
// get the view provider of the selected object and set the shape color
|
||||
FCMD_VOBJ_CMD2("ShapeColor=(%.2f,%.2f,%.2f)" , it->pObject, fRed, fGrn, fBlu);
|
||||
cmdGuiObjectArgs(it->pObject, "ShapeColor=(%.2f,%.2f,%.2f)", fRed, fGrn, fBlu);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@
|
||||
#include <Gui/ViewProvider.h>
|
||||
#include <Gui/WaitCursor.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Mod/Part/Gui/TaskAttacher.h>
|
||||
#include <Mod/Part/Gui/AttacherTexts.h>
|
||||
#include <Mod/Part/App/AttachExtension.h>
|
||||
@@ -1041,21 +1041,19 @@ bool TaskDlgAttacher::accept()
|
||||
Base::Placement plm = pcAttach->AttachmentOffset.getValue();
|
||||
double yaw, pitch, roll;
|
||||
plm.getRotation().getYawPitchRoll(yaw,pitch,roll);
|
||||
FCMD_OBJ_CMD2("AttachmentOffset = App.Placement(App.Vector(%.10f, %.10f, %.10f), App.Rotation(%.10f, %.10f, %.10f))",
|
||||
obj,
|
||||
plm.getPosition().x, plm.getPosition().y, plm.getPosition().z,
|
||||
yaw, pitch, roll);
|
||||
Gui::cmdAppObjectArgs(obj, "AttachmentOffset = App.Placement(App.Vector(%.10f, %.10f, %.10f), App.Rotation(%.10f, %.10f, %.10f))",
|
||||
plm.getPosition().x, plm.getPosition().y, plm.getPosition().z, yaw, pitch, roll);
|
||||
}
|
||||
|
||||
FCMD_OBJ_CMD2("MapReversed = %s", obj, pcAttach->MapReversed.getValue() ? "True" : "False");
|
||||
Gui::cmdAppObjectArgs(obj, "MapReversed = %s", pcAttach->MapReversed.getValue() ? "True" : "False");
|
||||
|
||||
FCMD_OBJ_CMD2("Support = %s", obj, pcAttach->Support.getPyReprString().c_str());
|
||||
Gui::cmdAppObjectArgs(obj, "Support = %s", pcAttach->Support.getPyReprString().c_str());
|
||||
|
||||
FCMD_OBJ_CMD2("MapMode = '%s'", obj, AttachEngine::getModeName(eMapMode(pcAttach->MapMode.getValue())).c_str());
|
||||
Gui::cmdAppObjectArgs(obj, "MapMode = '%s'", AttachEngine::getModeName(eMapMode(pcAttach->MapMode.getValue())).c_str());
|
||||
|
||||
FCMD_OBJ_DOC_CMD(obj, "recompute()");
|
||||
Gui::cmdAppObject(obj, "recompute()");
|
||||
|
||||
FCMD_VOBJ_DOC_CMD(obj,"resetEdit()");
|
||||
Gui::cmdGuiDocument(obj, "resetEdit()");
|
||||
document->commitCommand();
|
||||
}
|
||||
catch (const Base::Exception& e) {
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/SelectionFilter.h>
|
||||
@@ -180,12 +180,12 @@ bool OffsetWidget::accept()
|
||||
{
|
||||
try {
|
||||
double offsetValue = d->ui.spinOffset->value().getValue();
|
||||
FCMD_OBJ_CMD2("Value = %f", d->offset,offsetValue);
|
||||
Gui::cmdAppObjectArgs(d->offset, "Value = %f", offsetValue);
|
||||
d->ui.spinOffset->apply();
|
||||
FCMD_OBJ_CMD2("Mode = %i", d->offset,d->ui.modeType->currentIndex());
|
||||
FCMD_OBJ_CMD2("Join = %i", d->offset,d->ui.joinType->currentIndex());
|
||||
FCMD_OBJ_CMD2("Intersection = %s", d->offset,d->ui.intersection->isChecked() ? "True" : "False");
|
||||
FCMD_OBJ_CMD2("SelfIntersection = %s", d->offset,d->ui.selfIntersection->isChecked() ? "True" : "False");
|
||||
Gui::cmdAppObjectArgs(d->offset, "Mode = %i", d->ui.modeType->currentIndex());
|
||||
Gui::cmdAppObjectArgs(d->offset, "Join = %i", d->ui.joinType->currentIndex());
|
||||
Gui::cmdAppObjectArgs(d->offset, "Intersection = %s", d->ui.intersection->isChecked() ? "True" : "False");
|
||||
Gui::cmdAppObjectArgs(d->offset, "SelfIntersection = %s", d->ui.selfIntersection->isChecked() ? "True" : "False");
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
|
||||
if (!d->offset->isValid())
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
#include <Gui/Application.h>
|
||||
#include <Gui/BitmapFactory.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/Document.h>
|
||||
#include <Gui/Selection.h>
|
||||
#include <Gui/SelectionFilter.h>
|
||||
@@ -227,15 +227,15 @@ bool ThicknessWidget::accept()
|
||||
|
||||
try {
|
||||
if (!d->selection.empty()) {
|
||||
FCMD_OBJ_CMD2("Faces = %s", d->thickness,d->selection.c_str());
|
||||
Gui::cmdAppObjectArgs(d->thickness, "Faces = %s", d->selection.c_str());
|
||||
}
|
||||
FCMD_OBJ_CMD2("Value = %f", d->thickness,d->ui.spinOffset->value().getValue());
|
||||
FCMD_OBJ_CMD2("Mode = %i", d->thickness,d->ui.modeType->currentIndex());
|
||||
FCMD_OBJ_CMD2("Join = %i", d->thickness,d->ui.joinType->currentIndex());
|
||||
FCMD_OBJ_CMD2("Intersection = %s",
|
||||
d->thickness,d->ui.intersection->isChecked() ? "True" : "False");
|
||||
FCMD_OBJ_CMD2("SelfIntersection = %s",
|
||||
d->thickness,d->ui.selfIntersection->isChecked() ? "True" : "False");
|
||||
Gui::cmdAppObjectArgs(d->thickness, "Value = %f", d->ui.spinOffset->value().getValue());
|
||||
Gui::cmdAppObjectArgs(d->thickness, "Mode = %i", d->ui.modeType->currentIndex());
|
||||
Gui::cmdAppObjectArgs(d->thickness, "Join = %i", d->ui.joinType->currentIndex());
|
||||
Gui::cmdAppObjectArgs(d->thickness, "Intersection = %s",
|
||||
d->ui.intersection->isChecked() ? "True" : "False");
|
||||
Gui::cmdAppObjectArgs(d->thickness, "SelfIntersection = %s",
|
||||
d->ui.selfIntersection->isChecked() ? "True" : "False");
|
||||
|
||||
Gui::Command::doCommand(Gui::Command::Doc,"App.ActiveDocument.recompute()");
|
||||
if (!d->thickness->isValid())
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <App/Range.h>
|
||||
#include <App/Document.h>
|
||||
#include <App/ExpressionParser.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include "ui_PropertiesDialog.h"
|
||||
|
||||
using namespace App;
|
||||
@@ -231,17 +231,17 @@ void PropertiesDialog::apply()
|
||||
|
||||
for (; i != ranges.end(); ++i) {
|
||||
if (orgAlignment != alignment) {
|
||||
FCMD_OBJ_CMD2("setAlignment('%s', '%s')", sheet,
|
||||
Gui::cmdAppObjectArgs(sheet, "setAlignment('%s', '%s')",
|
||||
i->rangeString().c_str(), Cell::encodeAlignment(alignment).c_str());
|
||||
changes = true;
|
||||
}
|
||||
if (orgStyle != style) {
|
||||
FCMD_OBJ_CMD2("setStyle('%s', '%s')", sheet,
|
||||
Gui::cmdAppObjectArgs(sheet, "setStyle('%s', '%s')",
|
||||
i->rangeString().c_str(), Cell::encodeStyle(style).c_str());
|
||||
changes = true;
|
||||
}
|
||||
if (orgForegroundColor != foregroundColor) {
|
||||
FCMD_OBJ_CMD2("setForeground('%s', (%f,%f,%f,%f))", sheet,
|
||||
Gui::cmdAppObjectArgs(sheet, "setForeground('%s', (%f,%f,%f,%f))",
|
||||
i->rangeString().c_str(),
|
||||
foregroundColor.r,
|
||||
foregroundColor.g,
|
||||
@@ -250,7 +250,7 @@ void PropertiesDialog::apply()
|
||||
changes = true;
|
||||
}
|
||||
if (orgBackgroundColor != backgroundColor) {
|
||||
FCMD_OBJ_CMD2("setBackground('%s', (%f,%f,%f,%f))", sheet,
|
||||
Gui::cmdAppObjectArgs(sheet, "setBackground('%s', (%f,%f,%f,%f))",
|
||||
i->rangeString().c_str(),
|
||||
backgroundColor.r,
|
||||
backgroundColor.g,
|
||||
@@ -260,12 +260,12 @@ void PropertiesDialog::apply()
|
||||
}
|
||||
if (orgDisplayUnit != displayUnit) {
|
||||
std::string escapedstr = Base::Tools::escapedUnicodeFromUtf8(displayUnit.stringRep.c_str());
|
||||
FCMD_OBJ_CMD2("setDisplayUnit('%s', '%s')", sheet,
|
||||
Gui::cmdAppObjectArgs(sheet, "setDisplayUnit('%s', '%s')",
|
||||
i->rangeString().c_str(), escapedstr.c_str());
|
||||
changes = true;
|
||||
}
|
||||
if (ranges.size() == 1 && ranges[0].size() == 1 && orgAlias != alias) {
|
||||
FCMD_OBJ_CMD2("setAlias('%s', '%s')", sheet,
|
||||
Gui::cmdAppObjectArgs(sheet, "setAlias('%s', '%s')",
|
||||
i->address().c_str(), alias.c_str());
|
||||
changes = true;
|
||||
}
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
#include <App/Application.h>
|
||||
#include <App/AutoTransaction.h>
|
||||
#include <App/Document.h>
|
||||
#include <Gui/Command.h>
|
||||
#include <Gui/CommandT.h>
|
||||
#include <Gui/MainWindow.h>
|
||||
#include <boost/bind.hpp>
|
||||
#include "../App/Utils.h"
|
||||
@@ -175,8 +175,7 @@ void SheetTableView::insertRows()
|
||||
break;
|
||||
}
|
||||
|
||||
FCMD_OBJ_CMD2("insertRows('%s', %d)", sheet,
|
||||
rowName(prev).c_str(), count);
|
||||
Gui::cmdAppObjectArgs(sheet, "insertRows('%s', %d)", rowName(prev).c_str(), count);
|
||||
}
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
@@ -197,8 +196,7 @@ void SheetTableView::removeRows()
|
||||
/* Remove rows */
|
||||
Gui::Command::openCommand("Remove rows");
|
||||
for (std::vector<int>::const_iterator it = sortedRows.begin(); it != sortedRows.end(); ++it) {
|
||||
FCMD_OBJ_CMD2("removeRows('%s', %d)", sheet,
|
||||
rowName(*it).c_str(), 1);
|
||||
Gui::cmdAppObjectArgs(sheet, "removeRows('%s', %d)", rowName(*it).c_str(), 1);
|
||||
}
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
@@ -235,8 +233,8 @@ void SheetTableView::insertColumns()
|
||||
break;
|
||||
}
|
||||
|
||||
FCMD_OBJ_CMD2("insertColumns('%s', %d)", sheet,
|
||||
columnName(prev).c_str(), count);
|
||||
Gui::cmdAppObjectArgs(sheet, "insertColumns('%s', %d)",
|
||||
columnName(prev).c_str(), count);
|
||||
}
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
@@ -257,8 +255,8 @@ void SheetTableView::removeColumns()
|
||||
/* Remove columns */
|
||||
Gui::Command::openCommand("Remove rows");
|
||||
for (std::vector<int>::const_iterator it = sortedColumns.begin(); it != sortedColumns.end(); ++it)
|
||||
FCMD_OBJ_CMD2("removeColumns('%s', %d)", sheet,
|
||||
columnName(*it).c_str(), 1);
|
||||
Gui::cmdAppObjectArgs(sheet, "removeColumns('%s', %d)",
|
||||
columnName(*it).c_str(), 1);
|
||||
Gui::Command::commitCommand();
|
||||
Gui::Command::doCommand(Gui::Command::Doc, "App.ActiveDocument.recompute()");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user