diff --git a/src/Mod/Fem/App/FemMesh.cpp b/src/Mod/Fem/App/FemMesh.cpp index 4d91dcf3d..716e89d72 100644 --- a/src/Mod/Fem/App/FemMesh.cpp +++ b/src/Mod/Fem/App/FemMesh.cpp @@ -1260,19 +1260,8 @@ void FemMesh::SaveDocFile (Base::Writer &writer) const Base::ifstream file(fi, std::ios::in | std::ios::binary); if (file){ - unsigned long ulSize = 0; std::streambuf* buf = file.rdbuf(); - if (buf) { - unsigned long ulCurr; - ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in); - ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in); - buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in); - } - - // read in the ASCII file and write back to the stream - std::strstreambuf sbuf(ulSize); - file >> &sbuf; - writer.Stream() << &sbuf; + writer.Stream() << buf; } file.close(); diff --git a/src/Mod/Fem/App/PropertyPostDataObject.cpp b/src/Mod/Fem/App/PropertyPostDataObject.cpp index 7e73245cc..73f21bcd5 100644 --- a/src/Mod/Fem/App/PropertyPostDataObject.cpp +++ b/src/Mod/Fem/App/PropertyPostDataObject.cpp @@ -279,19 +279,8 @@ void PropertyPostDataObject::SaveDocFile (Base::Writer &writer) const Base::ifstream file(fi, std::ios::in | std::ios::binary); if (file){ - unsigned long ulSize = 0; std::streambuf* buf = file.rdbuf(); - if (buf) { - unsigned long ulCurr; - ulCurr = buf->pubseekoff(0, std::ios::cur, std::ios::in); - ulSize = buf->pubseekoff(0, std::ios::end, std::ios::in); - buf->pubseekoff(ulCurr, std::ios::beg, std::ios::in); - } - - // read in the ASCII file and write back to the stream - std::strstreambuf sbuf(ulSize); - file >> &sbuf; - writer.Stream() << &sbuf; + writer.Stream() << buf; } file.close(); diff --git a/src/Mod/Fem/Gui/Command.cpp b/src/Mod/Fem/Gui/Command.cpp index 6a1d6fb8d..958b520bd 100644 --- a/src/Mod/Fem/Gui/Command.cpp +++ b/src/Mod/Fem/Gui/Command.cpp @@ -1310,7 +1310,7 @@ CmdFemPostApllyChanges::CmdFemPostApllyChanges() eType = eType|ForEdit; } -void CmdFemPostApllyChanges::activated(int) +void CmdFemPostApllyChanges::activated(int iMsg) { ParameterGrp::handle hGrp = App::GetApplication().GetParameterGroupByPath("User parameter:BaseApp/Preferences/Mod/Fem");