Commit 81ae574b authored by claes's avatar claes

Function to keep name of extern references in dumpfile

parent eab989b1
......@@ -21,6 +21,7 @@ wb_print_wbl::wb_print_wbl(ostream& os, int levelIndentation) :
m_idxFlag(true),
m_level(0),
m_levelInd(levelIndentation),
m_keepName(false),
m_os(os)
{
memset(m_indBuf, ' ', sizeof(m_indBuf));
......@@ -493,8 +494,13 @@ bool wb_print_wbl::printValue (wb_volume& v,
sprintf(sval, "0");
else {
o = v.object(*(pwr_tOid *)val);
if (o)
sprintf(sval, "\"%s\"", o.longName().c_str());
if (o) {
if ( o.oid().vid >= cdh_cUserVolMin && o.oid().vid != v.vid() && !m_keepName)
// Other user volume. Loadfile might not be created yet at load time.
sprintf(sval, "\"%s\"", cdh_ObjidToString(NULL, *(pwr_tObjid *)val, 1));
else
sprintf(sval, "\"%s\"", o.longName().c_str());
}
else
sprintf(sval, "\"%s\"", cdh_ObjidToString(NULL, *(pwr_tObjid *)val, 1));
}
......
......@@ -27,6 +27,7 @@ protected:
int m_level;
int m_levelInd;
char m_indBuf[256];
bool m_keepName;
ostream& m_os;
......@@ -71,6 +72,7 @@ public:
int getErrCnt() const { return m_errCnt;}
void resetErrCnt() {m_errCnt = 0; }
void keepName() { m_keepName = true;}
void printHierarchy(wb_volume& v, wb_object& o); //< Prints a hierarchy
void printObject(wb_volume& v, wb_object& o, bool recursive = true); //< Prints an object
......
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