+ return false;
+
+#ifdef wxHAS_MULTIPLE_FILEDLG_FILTERS
+ wxString filter = docTemplate->GetDescription() + wxT(" (") +
+ docTemplate->GetFileFilter() + wxT(")|") +
+ docTemplate->GetFileFilter();
+
+ // Now see if there are some other template with identical view and document
+ // classes, whose filters may also be used.
+ if (docTemplate->GetViewClassInfo() && docTemplate->GetDocClassInfo())
+ {
+ wxList::compatibility_iterator
+ node = docTemplate->GetDocumentManager()->GetTemplates().GetFirst();
+ while (node)
+ {
+ wxDocTemplate *t = (wxDocTemplate*) node->GetData();
+
+ if (t->IsVisible() && t != docTemplate &&
+ t->GetViewClassInfo() == docTemplate->GetViewClassInfo() &&
+ t->GetDocClassInfo() == docTemplate->GetDocClassInfo())
+ {
+ // add a '|' to separate this filter from the previous one
+ if ( !filter.empty() )
+ filter << wxT('|');
+
+ filter << t->GetDescription()
+ << wxT(" (") << t->GetFileFilter() << wxT(") |")
+ << t->GetFileFilter();
+ }
+
+ node = node->GetNext();
+ }
+ }
+#else
+ wxString filter = docTemplate->GetFileFilter() ;
+#endif
+
+ wxString defaultDir = docTemplate->GetDirectory();
+ if ( defaultDir.empty() )
+ {
+ defaultDir = wxPathOnly(GetFilename());
+ if ( defaultDir.empty() )
+ defaultDir = GetDocumentManager()->GetLastDirectory();
+ }