From 9d75fc514859a51b63344ab77e85e75740bf524a Mon Sep 17 00:00:00 2001 From: Marc Jeanmougin Date: Tue, 27 Sep 2016 12:05:22 +0200 Subject: fix tabs in src/main-cmdlineact (bzr r15138) --- src/main-cmdlineact.cpp | 117 +++++++++++++++++++++++++----------------------- 1 file changed, 62 insertions(+), 55 deletions(-) (limited to 'src/main-cmdlineact.cpp') diff --git a/src/main-cmdlineact.cpp b/src/main-cmdlineact.cpp index c1b756ad5..a23c036a0 100644 --- a/src/main-cmdlineact.cpp +++ b/src/main-cmdlineact.cpp @@ -23,74 +23,81 @@ namespace Inkscape { std::list CmdLineAction::_list; -CmdLineAction::CmdLineAction (bool isVerb, gchar const * arg) : _isVerb(isVerb), _arg(NULL) { - if (arg != NULL) { - _arg = g_strdup(arg); - } +CmdLineAction::CmdLineAction(bool isVerb, gchar const *arg) : _isVerb(isVerb), _arg(NULL) +{ + if (arg != NULL) { + _arg = g_strdup(arg); + } - _list.insert(_list.end(), this); + _list.insert(_list.end(), this); - return; + return; } -CmdLineAction::~CmdLineAction () { - if (_arg != NULL) { - g_free(_arg); - } +CmdLineAction::~CmdLineAction() +{ + if (_arg != NULL) { + g_free(_arg); + } } void -CmdLineAction::doIt (ActionContext const & context) { - //printf("Doing: %s\n", _arg); - if (_isVerb) { - Inkscape::Verb * verb = Inkscape::Verb::getbyid(_arg); - if (verb == NULL) { - printf(_("Unable to find verb ID '%s' specified on the command line.\n"), _arg); - return; - } - SPAction * action = verb->get_action(context); - sp_action_perform(action, NULL); - } else { - if (context.getDocument() == NULL || context.getSelection() == NULL) { return; } - - SPDocument * doc = context.getDocument(); - SPObject * obj = doc->getObjectById(_arg); - if (obj == NULL) { - printf(_("Unable to find node ID: '%s'\n"), _arg); - return; - } - - Inkscape::Selection * selection = context.getSelection(); - selection->add(obj); - } - return; +CmdLineAction::doIt(ActionContext const &context) +{ + //printf("Doing: %s\n", _arg); + if (_isVerb) { + Inkscape::Verb *verb = Inkscape::Verb::getbyid(_arg); + if (verb == NULL) { + printf(_("Unable to find verb ID '%s' specified on the command line.\n"), _arg); + return; + } + SPAction *action = verb->get_action(context); + sp_action_perform(action, NULL); + } else { + if (context.getDocument() == NULL || context.getSelection() == NULL) { + return; + } + + SPDocument *doc = context.getDocument(); + SPObject *obj = doc->getObjectById(_arg); + if (obj == NULL) { + printf(_("Unable to find node ID: '%s'\n"), _arg); + return; + } + + Inkscape::Selection *selection = context.getSelection(); + selection->add(obj); + } + return; } bool -CmdLineAction::doList (ActionContext const & context) { - bool hasActions = !_list.empty(); - for (std::list::iterator i = _list.begin(); - i != _list.end(); ++i) { - CmdLineAction * entry = *i; - entry->doIt(context); - } - return hasActions; +CmdLineAction::doList(ActionContext const &context) +{ + bool hasActions = !_list.empty(); + for (std::list::iterator i = _list.begin(); + i != _list.end(); ++i) { + CmdLineAction *entry = *i; + entry->doIt(context); + } + return hasActions; } bool -CmdLineAction::idle (void) { - std::list desktops; - INKSCAPE.get_all_desktops(desktops); - - // We're going to assume one desktop per document, because no one - // should have had time to make more at this point. - for (std::list::iterator i = desktops.begin(); - i != desktops.end(); ++i) { - SPDesktop * desktop = *i; - //Inkscape::UI::View::View * view = dynamic_cast(desktop); - doList(ActionContext(desktop)); - } - return false; +CmdLineAction::idle(void) +{ + std::list desktops; + INKSCAPE.get_all_desktops(desktops); + + // We're going to assume one desktop per document, because no one + // should have had time to make more at this point. + for (std::list::iterator i = desktops.begin(); + i != desktops.end(); ++i) { + SPDesktop *desktop = *i; + //Inkscape::UI::View::View * view = dynamic_cast(desktop); + doList(ActionContext(desktop)); + } + return false; } } // Inkscape -- cgit v1.2.3