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)) {
...@@ -1156,4 +1161,4 @@ bool wb_session::commit() ...@@ -1156,4 +1161,4 @@ bool wb_session::commit()
} }
return m_srep->commit(&m_sts); return m_srep->commit(&m_sts);
} }
\ No newline at end of file
...@@ -44,8 +44,9 @@ class wb_treeexport ...@@ -44,8 +44,9 @@ 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() {}
}; };
#endif #endif
\ No newline at end of file
...@@ -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) {
...@@ -220,4 +221,4 @@ public: ...@@ -220,4 +221,4 @@ public:
}; };
#endif #endif
\ No newline at end of file
...@@ -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,
...@@ -263,4 +264,4 @@ public: ...@@ -263,4 +264,4 @@ public:
//pwr_tStatus checkObject(pwr_tOid oid, pwr_tCid cid); //pwr_tStatus checkObject(pwr_tOid oid, pwr_tCid cid);
}; };
#endif #endif
\ No newline at end of file
...@@ -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,
...@@ -265,4 +266,4 @@ public: ...@@ -265,4 +266,4 @@ public:
}; };
#endif #endif
#endif #endif
\ No newline at end of file
...@@ -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,
...@@ -202,4 +203,4 @@ public: ...@@ -202,4 +203,4 @@ public:
}; };
#endif #endif
\ No newline at end of file
...@@ -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;}
...@@ -324,4 +325,4 @@ public: ...@@ -324,4 +325,4 @@ public:
void cashe_remove( pwr_tOix oix); void cashe_remove( pwr_tOix oix);
}; };
#endif #endif
\ No newline at end of file
...@@ -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,
...@@ -435,4 +436,4 @@ public: ...@@ -435,4 +436,4 @@ public:
}; };
#endif #endif
\ No newline at end of file
...@@ -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,
...@@ -187,4 +188,4 @@ public: ...@@ -187,4 +188,4 @@ public:
// virtual bool importMeta(dbs_sMenv *mep) { return false;} // virtual bool importMeta(dbs_sMenv *mep) { return false;}
}; };
#endif #endif
\ No newline at end of file
...@@ -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,
...@@ -251,4 +252,4 @@ public: ...@@ -251,4 +252,4 @@ public:
virtual const char *fileName() { return "";} virtual const char *fileName() { return "";}
}; };
#endif #endif
\ No newline at end of file
...@@ -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