+ wxString fileName(tmp);
+ wxString path("");
+ wxString name("");
+ wxString ext("");
+ wxSplitPath(fileName, & path, & name, & ext);
+
+ if (ext.IsEmpty() || ext == "")
+ {
+ fileName += ".";
+ fileName += docTemplate->GetDefaultExtension();
+ }
+
+ SetFilename(fileName);
+ SetTitle(wxFileNameFromPath(fileName));