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 ...@@ -406,6 +406,11 @@ bool wb_session::copyOset( pwr_sAttrRef *arp, bool keepref, bool keepsym, bool i
pwr_tVid vid; pwr_tVid vid;
m_sts = LDH__SUCCESS; m_sts = LDH__SUCCESS;
if ( !m_vrep->exportTreeIsImplemented()) {
m_sts = LDH__NYI;
return false;
}
// Avoid copying objects in plcprograms // Avoid copying objects in plcprograms
pwr_sAttrRef *ap = arp; pwr_sAttrRef *ap = arp;
while ( cdh_ObjidIsNotNull( ap->Objid)) { while ( cdh_ObjidIsNotNull( ap->Objid)) {
......
...@@ -44,6 +44,7 @@ class wb_treeexport ...@@ -44,6 +44,7 @@ class wb_treeexport
public: public:
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid) = 0; virtual bool exportTree(wb_treeimport &i, pwr_tOid oid) = 0;
virtual bool exportTreeIsImplemented() = 0;
virtual ~wb_treeexport() {} virtual ~wb_treeexport() {}
}; };
......
...@@ -178,6 +178,7 @@ public: ...@@ -178,6 +178,7 @@ public:
virtual bool exportDocBlock(wb_import &i) { return m_vrep->exportDocBlock( i);} virtual bool exportDocBlock(wb_import &i) { return m_vrep->exportDocBlock( i);}
virtual bool exportMeta(wb_import &i) { return m_vrep->exportMeta( 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 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, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
pwr_tOid boid, const char *name, pwr_mClassDef flags, pwr_tOid boid, const char *name, pwr_mClassDef flags,
size_t rbSize, size_t dbSize, void *rbody, void *dbody) { size_t rbSize, size_t dbSize, void *rbody, void *dbody) {
......
...@@ -233,6 +233,7 @@ public: ...@@ -233,6 +233,7 @@ public:
virtual bool exportMeta(wb_import &e); virtual bool exportMeta(wb_import &e);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid); virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportTreeHelper(wb_treeimport &i, pwr_tOid oid, bool isRoot); bool exportTreeHelper(wb_treeimport &i, pwr_tOid oid, bool isRoot);
virtual bool importTree(bool keepref, bool keepsym) { return false;} virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......
...@@ -234,6 +234,7 @@ public: ...@@ -234,6 +234,7 @@ public:
virtual bool exportMeta(wb_import &e); virtual bool exportMeta(wb_import &e);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid); virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportTreeHelper(wb_treeimport &i, pwr_tOid oid, bool isRoot); bool exportTreeHelper(wb_treeimport &i, pwr_tOid oid, bool isRoot);
virtual bool importTree(bool keepref, bool keepsym) { return false;} virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......
...@@ -179,6 +179,7 @@ public: ...@@ -179,6 +179,7 @@ public:
virtual bool exportDocBlock(wb_import &e); virtual bool exportDocBlock(wb_import &e);
virtual bool exportMeta(wb_import &e); virtual bool exportMeta(wb_import &e);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid); virtual bool exportTree(wb_treeimport &i, pwr_tOid oid);
virtual bool exportTreeIsImplemented() { return true;}
bool exportTreeObject(wb_treeimport &i, dbs_sObject *op, bool isRoot); bool exportTreeObject(wb_treeimport &i, dbs_sObject *op, bool isRoot);
virtual bool importTree(bool keepref, bool keepsym) { return false;} virtual bool importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......
...@@ -287,6 +287,7 @@ public: ...@@ -287,6 +287,7 @@ public:
virtual bool exportDocBlock(wb_import &i) { return false;} virtual bool exportDocBlock(wb_import &i) { return false;}
virtual bool exportMeta(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 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, bool exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest destcode, bool keepoid,
pwr_tOid **rootlist) { return false;} pwr_tOid **rootlist) { return false;}
virtual bool importTree(bool keepref, bool keepsym) { return false;} virtual bool importTree(bool keepref, bool keepsym) { return false;}
......
...@@ -383,6 +383,7 @@ public: ...@@ -383,6 +383,7 @@ public:
virtual bool exportDocBlock(wb_import &i); virtual bool exportDocBlock(wb_import &i);
virtual bool exportMeta(wb_import &i); virtual bool exportMeta(wb_import &i);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid); 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, bool exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest destcode, bool keepoid,
wb_recix *recix, pwr_tOid **rootlist); wb_recix *recix, pwr_tOid **rootlist);
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......
...@@ -159,6 +159,7 @@ public: ...@@ -159,6 +159,7 @@ public:
virtual bool exportDocBlock(wb_import &i) {return false;} virtual bool exportDocBlock(wb_import &i) {return false;}
virtual bool exportMeta(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 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, bool exportPaste(wb_treeimport &i, pwr_tOid destination, ldh_eDest destcode, bool keepoid,
pwr_tOid **rootlist) {return false;} pwr_tOid **rootlist) {return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
......
...@@ -233,6 +233,7 @@ public: ...@@ -233,6 +233,7 @@ public:
virtual bool exportDocBlock(wb_import &i); virtual bool exportDocBlock(wb_import &i);
virtual bool exportMeta(wb_import &i); virtual bool exportMeta(wb_import &i);
virtual bool exportTree(wb_treeimport &i, pwr_tOid oid); 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 importTree(bool keepref, bool keepsym) { return false;}
virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid, virtual bool importTreeObject(wb_merep *merep, pwr_tOid oid, pwr_tCid cid, pwr_tOid poid,
pwr_tOid boid, const char *name, pwr_mClassDef flags, pwr_tOid boid, const char *name, pwr_mClassDef flags,
......
...@@ -1193,6 +1193,11 @@ void Wtt::activate_paste() ...@@ -1193,6 +1193,11 @@ void Wtt::activate_paste()
sts = ldh_Paste( ldhses, sel_list2->Objid, ldh_eDest_After, 0, 0, 0); sts = ldh_Paste( ldhses, sel_list2->Objid, ldh_eDest_After, 0, 0, 0);
reset_cursor(); reset_cursor();
if ( EVEN(sts)) {
message( 'E', wnav_get_message( sts));
return;
}
if ( (sel_cnt1 == 1 && sel_is_attr1[0] == 0) || if ( (sel_cnt1 == 1 && sel_is_attr1[0] == 0) ||
(sel_cnt2 == 1 && sel_is_attr2[0] == 0)) { (sel_cnt2 == 1 && sel_is_attr2[0] == 0)) {
pwr_tOid oid; 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