Commit cbbe4b71 authored by Claes Sjofors's avatar Claes Sjofors

Wb vrepext copy/paste bugfix

parent fc7404cf
......@@ -406,6 +406,11 @@ bool wb_session::copyOset( pwr_sAttrRef *arp, bool keepref, bool keepsym, bool i
pwr_tVid vid;
m_sts = LDH__SUCCESS;
if ( !m_vrep->exportTreeIsImplemented()) {
m_sts = LDH__NYI;
return false;
}
// Avoid copying objects in plcprograms
pwr_sAttrRef *ap = arp;
while ( cdh_ObjidIsNotNull( ap->Objid)) {
......@@ -1156,4 +1161,4 @@ bool wb_session::commit()
}
return m_srep->commit(&m_sts);
}
\ No newline at end of file
}
......@@ -44,8 +44,9 @@ class wb_treeexport
public:
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid) = 0;
virtual bool exportTreeIsImplemented() = 0;
virtual ~wb_treeexport() {}
};
#endif
\ No newline at end of file
#endif
......@@ -178,6 +178,7 @@ public:
virtual bool exportDocBlock(wb_import &i) { return m_vrep->exportDocBlock( i);}
virtual bool exportMeta(wb_import &i) { return m_vrep->exportMeta( i);}
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid) { return m_vrep->exportTree( i, oid);}
virtual bool exportTreeIsImplemented() { return m_vrep->exportTreeIsImplemented();}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
pwr_tOid boid, const char *name, pwr_mClassDef flags,
size_t rbSize, size_t dbSize, void *rbody, void *dbody) {
......@@ -220,4 +221,4 @@ public:
};
#endif
\ No newline at end of file
#endif
......@@ -233,6 +233,7 @@ public:
virtual bool exportMeta(wb_import &e);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportTreeHelper(wb_treeimport &i, pwr_tOid oid, bool isRoot);
virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......@@ -263,4 +264,4 @@ public:
//pwr_tStatus checkObject(pwr_tOid oid, pwr_tCid cid);
};
#endif
\ No newline at end of file
#endif
......@@ -234,6 +234,7 @@ public:
virtual bool exportMeta(wb_import &e);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportTreeHelper(wb_treeimport &i, pwr_tOid oid, bool isRoot);
virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......@@ -265,4 +266,4 @@ public:
};
#endif
#endif
\ No newline at end of file
#endif
......@@ -179,6 +179,7 @@ public:
virtual bool exportDocBlock(wb_import &e);
virtual bool exportMeta(wb_import &e);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportTreeObject(wb_treeimport &i, dbs_sObject *op, bool isRoot);
virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......@@ -202,4 +203,4 @@ public:
};
#endif
\ No newline at end of file
#endif
......@@ -287,6 +287,7 @@ public:
virtual bool exportDocBlock(wb_import &i) { return false;}
virtual bool exportMeta(wb_import &i) { return false;}
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid) { return false;}
virtual bool exportTreeIsImplemented() { return false;}
bool exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest destcode, bool keepoid,
pwr_tOid **rootlist) { return false;}
virtual bool importTree(bool keepref, bool keepsym) { return false;}
......@@ -324,4 +325,4 @@ public:
void cashe_remove( pwr_tOix oix);
};
#endif
\ No newline at end of file
#endif
......@@ -383,6 +383,7 @@ public:
virtual bool exportDocBlock(wb_import &i);
virtual bool exportMeta(wb_import &i);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest destcode, bool keepoid,
wb_recix *recix, pwr_tOid **rootlist);
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......@@ -435,4 +436,4 @@ public:
};
#endif
\ No newline at end of file
#endif
......@@ -159,6 +159,7 @@ public:
virtual bool exportDocBlock(wb_import &i) {return false;}
virtual bool exportMeta(wb_import &i) {return false;}
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid) {return false;}
virtual bool exportTreeIsImplemented() { return false;}
bool exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest destcode, bool keepoid,
pwr_tOid **rootlist) {return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......@@ -187,4 +188,4 @@ public:
// virtual bool importMeta(dbs_sMenv *mep) { return false;}
};
#endif
\ No newline at end of file
#endif
......@@ -233,6 +233,7 @@ public:
virtual bool exportDocBlock(wb_import &i);
virtual bool exportMeta(wb_import &i);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
pwr_tOid boid, const char *name, pwr_mClassDef flags,
......@@ -251,4 +252,4 @@ public:
virtual const char *fileName() { return "";}
};
#endif
\ No newline at end of file
#endif
......@@ -1193,6 +1193,11 @@ void Wtt::activate_paste()
sts = ldh_Paste( ldhses, sel_list2->Objid, ldh_eDest_After, 0, 0, 0);
reset_cursor();
if ( EVEN(sts)) {
message( 'E', wnav_get_message( sts));
return;
}
if ( (sel_cnt1 == 1 && sel_is_attr1[0] == 0) ||
(sel_cnt2 == 1 && sel_is_attr2[0] == 0)) {
pwr_tOid oid;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment