summaryrefslogtreecommitdiffstats
path: root/src/ui/clipboard.cpp
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2009-08-06 14:17:17 +0000
committercilix42 <cilix42@users.sourceforge.net>2009-08-06 14:17:17 +0000
commit51c2905fd3e99955db2d823b79abb763d8097028 (patch)
tree90128509479f5498e1125d1e4eb9cdc05bf6b6e6 /src/ui/clipboard.cpp
parentAdding one more control to Smart Jelly (diff)
downloadinkscape-51c2905fd3e99955db2d823b79abb763d8097028.tar.gz
inkscape-51c2905fd3e99955db2d823b79abb763d8097028.zip
Revert recent refactoring changes by johnce because they break the build, which cannot be fixed easily.
(bzr r8422)
Diffstat (limited to 'src/ui/clipboard.cpp')
-rw-r--r--src/ui/clipboard.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/ui/clipboard.cpp b/src/ui/clipboard.cpp
index e7e8a29dc..7e41006be 100644
--- a/src/ui/clipboard.cpp
+++ b/src/ui/clipboard.cpp
@@ -126,13 +126,13 @@ private:
void _copyTextPath(SPTextPath *);
Inkscape::XML::Node *_copyNode(Inkscape::XML::Node *, Inkscape::XML::Document *, Inkscape::XML::Node *);
- void _pasteDocument(Document *, bool in_place);
- void _pasteDefs(Document *);
+ void _pasteDocument(SPDocument *, bool in_place);
+ void _pasteDefs(SPDocument *);
bool _pasteImage();
bool _pasteText();
SPCSSAttr *_parseColor(const Glib::ustring &);
void _applyPathEffect(SPItem *, gchar const *);
- Document *_retrieveClipboard(Glib::ustring = "");
+ SPDocument *_retrieveClipboard(Glib::ustring = "");
// clipboard callbacks
void _onGet(Gtk::SelectionData &, guint);
@@ -149,7 +149,7 @@ private:
void _userWarn(SPDesktop *, char const *);
// private properites
- Document *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
+ SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
Inkscape::XML::Node *_root; ///< Reference to the clipboard's root node
Inkscape::XML::Node *_clipnode; ///< The node that holds extra information
@@ -311,7 +311,7 @@ bool ClipboardManagerImpl::paste(bool in_place)
if ( target == CLIPBOARD_TEXT_TARGET ) return _pasteText();
// otherwise, use the import extensions
- Document *tempdoc = _retrieveClipboard(target);
+ SPDocument *tempdoc = _retrieveClipboard(target);
if ( tempdoc == NULL ) {
_userWarn(desktop, _("Nothing on the clipboard."));
return false;
@@ -328,7 +328,7 @@ bool ClipboardManagerImpl::paste(bool in_place)
*/
const gchar *ClipboardManagerImpl::getFirstObjectID()
{
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
return NULL;
}
@@ -373,7 +373,7 @@ bool ClipboardManagerImpl::pasteStyle()
return false;
}
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
// no document, but we can try _text_style
if (_text_style) {
@@ -425,7 +425,7 @@ bool ClipboardManagerImpl::pasteSize(bool separately, bool apply_x, bool apply_y
}
// FIXME: actually, this should accept arbitrary documents
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc == NULL ) {
_userWarn(desktop, _("No size on the clipboard."));
return false;
@@ -482,7 +482,7 @@ bool ClipboardManagerImpl::pastePathEffect()
return false;
}
- Document *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
+ SPDocument *tempdoc = _retrieveClipboard("image/x-inkscape-svg");
if ( tempdoc ) {
Inkscape::XML::Node *root = sp_document_repr_root(tempdoc);
Inkscape::XML::Node *clipnode = sp_repr_lookup_name(root, "inkscape:clipboard", 1);
@@ -513,7 +513,7 @@ bool ClipboardManagerImpl::pastePathEffect()
*/
Glib::ustring ClipboardManagerImpl::getPathParameter()
{
- Document *tempdoc = _retrieveClipboard(); // any target will do here
+ SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
_userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
return "";
@@ -537,7 +537,7 @@ Glib::ustring ClipboardManagerImpl::getPathParameter()
*/
Glib::ustring ClipboardManagerImpl::getShapeOrTextObjectId()
{
- Document *tempdoc = _retrieveClipboard(); // any target will do here
+ SPDocument *tempdoc = _retrieveClipboard(); // any target will do here
if ( tempdoc == NULL ) {
_userWarn(SP_ACTIVE_DESKTOP, _("Nothing on the clipboard."));
return "";
@@ -769,10 +769,10 @@ Inkscape::XML::Node *ClipboardManagerImpl::_copyNode(Inkscape::XML::Node *node,
* @param in_place Whether to paste the selection where it was when copied
* @pre @c clipdoc is not empty and items can be added to the current layer
*/
-void ClipboardManagerImpl::_pasteDocument(Document *clipdoc, bool in_place)
+void ClipboardManagerImpl::_pasteDocument(SPDocument *clipdoc, bool in_place)
{
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *target_document = sp_desktop_document(desktop);
+ SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
*target_parent = SP_OBJECT_REPR(desktop->currentLayer());
@@ -839,11 +839,11 @@ void ClipboardManagerImpl::_pasteDocument(Document *clipdoc, bool in_place)
* @param clipdoc The document to paste
* @pre @c clipdoc != NULL and pasting into the active document is possible
*/
-void ClipboardManagerImpl::_pasteDefs(Document *clipdoc)
+void ClipboardManagerImpl::_pasteDefs(SPDocument *clipdoc)
{
// boilerplate vars copied from _pasteDocument
SPDesktop *desktop = SP_ACTIVE_DESKTOP;
- Document *target_document = sp_desktop_document(desktop);
+ SPDocument *target_document = sp_desktop_document(desktop);
Inkscape::XML::Node
*root = sp_document_repr_root(clipdoc),
*defs = sp_repr_lookup_name(root, "svg:defs", 1),
@@ -863,7 +863,7 @@ void ClipboardManagerImpl::_pasteDefs(Document *clipdoc)
*/
bool ClipboardManagerImpl::_pasteImage()
{
- Document *doc = SP_ACTIVE_DOCUMENT;
+ SPDocument *doc = SP_ACTIVE_DOCUMENT;
if ( doc == NULL ) return false;
// retrieve image data
@@ -993,9 +993,9 @@ void ClipboardManagerImpl::_applyPathEffect(SPItem *item, gchar const *effect)
/**
* @brief Retrieve the clipboard contents as a document
- * @return Clipboard contents converted to Document, or NULL if no suitable content was present
+ * @return Clipboard contents converted to SPDocument, or NULL if no suitable content was present
*/
-Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target)
+SPDocument *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target)
{
Glib::ustring best_target;
if ( required_target == "" )
@@ -1061,7 +1061,7 @@ Document *ClipboardManagerImpl::_retrieveClipboard(Glib::ustring required_target
if ( in == inlist.end() )
return NULL; // this shouldn't happen unless _getBestTarget returns something bogus
- Document *tempdoc = NULL;
+ SPDocument *tempdoc = NULL;
try {
tempdoc = (*in)->open(filename);
} catch (...) {