summaryrefslogtreecommitdiffstats
path: root/src/ui/dialog/align-and-distribute.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/dialog/align-and-distribute.cpp')
-rw-r--r--src/ui/dialog/align-and-distribute.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/ui/dialog/align-and-distribute.cpp b/src/ui/dialog/align-and-distribute.cpp
index 94e524157..65bc94011 100644
--- a/src/ui/dialog/align-and-distribute.cpp
+++ b/src/ui/dialog/align-and-distribute.cpp
@@ -24,7 +24,7 @@
#include "align-and-distribute.h"
#include <2geom/transforms.h>
#include "ui/widget/spinbutton.h"
-#include "desktop-handles.h"
+
#include "unclump.h"
#include "document.h"
#include "enums.h"
@@ -123,10 +123,10 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
focus = selection->smallestItem(horiz);
break;
case PAGE:
- b = sp_desktop_document(desktop)->preferredBounds();
+ b = desktop->getDocument()->preferredBounds();
break;
case DRAWING:
- b = sp_desktop_document(desktop)->getRoot()->desktopPreferredBounds();
+ b = desktop->getDocument()->getRoot()->desktopPreferredBounds();
break;
case SELECTION:
b = selection->preferredBounds();
@@ -152,7 +152,7 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
for (std::list<SPItem *>::iterator it(selected.begin());
it != selected.end(); ++it)
{
- sp_desktop_document (desktop)->ensureUpToDate();
+ desktop->getDocument()->ensureUpToDate();
if (!sel_as_group)
b = (*it)->desktopPreferredBounds();
if (b && (!focus || (*it) != focus)) {
@@ -167,7 +167,7 @@ void ActionAlign::do_action(SPDesktop *desktop, int index)
}
if (changed) {
- DocumentUndo::done( sp_desktop_document(desktop) , SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done( desktop->getDocument() , SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Align"));
}
}
@@ -337,7 +337,7 @@ private :
prefs->setInt("/options/clonecompensation/value", saved_compensation);
if (changed) {
- DocumentUndo::done( sp_desktop_document(desktop), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done( desktop->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Distribute"));
}
}
@@ -463,7 +463,7 @@ private :
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
- DocumentUndo::done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(_dialog.getDesktop()->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Remove overlaps"));
}
};
@@ -494,7 +494,7 @@ private :
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
- DocumentUndo::done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(_dialog.getDesktop()->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Arrange connector network"));
}
};
@@ -587,7 +587,7 @@ private :
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
- DocumentUndo::done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(_dialog.getDesktop()->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Exchange Positions"));
}
};
@@ -621,7 +621,7 @@ private :
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
- DocumentUndo::done(sp_desktop_document(_dialog.getDesktop()), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(_dialog.getDesktop()->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Unclump"));
}
};
@@ -676,7 +676,7 @@ private :
it != selected.end();
++it)
{
- sp_desktop_document (desktop)->ensureUpToDate();
+ desktop->getDocument()->ensureUpToDate();
Geom::OptRect item_box = !prefs_bbox ? (*it)->desktopVisualBounds() : (*it)->desktopGeometricBounds();
if (item_box) {
// find new center, staying within bbox
@@ -693,7 +693,7 @@ private :
// restore compensation setting
prefs->setInt("/options/clonecompensation/value", saved_compensation);
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Randomize positions"));
}
};
@@ -796,7 +796,7 @@ private :
}
if (changed) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Distribute text baselines"));
}
@@ -819,7 +819,7 @@ private :
}
if (changed) {
- DocumentUndo::done(sp_desktop_document(desktop), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
+ DocumentUndo::done(desktop->getDocument(), SP_VERB_DIALOG_ALIGN_DISTRIBUTE,
_("Align text baselines"));
}
}