? Linux_2.6.9-1.667.inotify.0.14__ ? bug9548.diff ? af/util/win/GNUmakefile.in ? af/xap/win/GNUmakefile.in ? wp/ap/win/GNUmakefile.in ? wp/impexp/win/GNUmakefile.in ? wp/main/win/GNUmakefile.in ? wp/test/win/GNUmakefile.in Index: af/xap/unix/xap_UnixDlg_FileOpenSaveAs.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/unix/xap_UnixDlg_FileOpenSaveAs.cpp,v retrieving revision 1.130 diff -u -r1.130 xap_UnixDlg_FileOpenSaveAs.cpp --- af/xap/unix/xap_UnixDlg_FileOpenSaveAs.cpp 3 Aug 2005 21:32:02 -0000 1.130 +++ af/xap/unix/xap_UnixDlg_FileOpenSaveAs.cpp 26 Sep 2005 13:47:45 -0000 @@ -472,10 +472,7 @@ sFileName = sFileName.substr(0,i); sFileName += sSuffix; - if (!gtk_file_chooser_select_filename(m_FC,sFileName.c_str())) - { - gtk_file_chooser_set_current_name(m_FC, UT_basename(sFileName.c_str())); - } + gtk_file_chooser_set_current_name(m_FC, UT_basename(sFileName.c_str())); } void XAP_UnixDialog_FileOpenSaveAs::onDeleteCancel() @@ -787,6 +784,33 @@ g_free (dir); g_free (file); } + if(m_id == XAP_DIALOG_ID_FILE_SAVEAS) + { + const char * szInitialSuffix = UT_pathSuffix(m_szInitialPathname); + const char * szSaveTypeSuffix = UT_pathSuffix(m_szSuffixes[m_nDefaultFileType]); + if(szInitialSuffix && szSaveTypeSuffix && (UT_strcmp(szInitialSuffix,szSaveTypeSuffix) != 0)) + { + UT_String sFileName = m_szInitialPathname; + bool bFoundSuffix = false; + UT_sint32 i = 0; + for(i= sFileName.length()-1; i> 0; i--) + { + if(sFileName[i] == '.') + { + bFoundSuffix = true; + break; + } + } + if( bFoundSuffix) + { + sFileName = sFileName.substr(0,i); + UT_String sSuffix = szSaveTypeSuffix; + sFileName += sSuffix; + FREEP(m_szInitialPathname); + UT_cloneString(m_szInitialPathname,sFileName.c_str()); + } + } + } gtk_file_chooser_set_filename(m_FC, m_szInitialPathname); } else Index: af/xap/xp/xap_Frame.cpp =================================================================== RCS file: /cvsroot/abi/src/af/xap/xp/xap_Frame.cpp,v retrieving revision 1.133 diff -u -r1.133 xap_Frame.cpp --- af/xap/xp/xap_Frame.cpp 26 Jun 2005 08:51:10 -0000 1.133 +++ af/xap/xp/xap_Frame.cpp 26 Sep 2005 13:47:49 -0000 @@ -864,10 +864,11 @@ // Don't put this auto-save in the most recent list. // getApp()->getPrefs()->setIgnoreNextRecent(); - + if(iEFT < 0) { - error = m_pDoc->saveAs(backupName.c_str(), m_pDoc->getLastSavedAsType(), false); + iEFT = 1; // *.abw format + error = m_pDoc->saveAs(backupName.c_str(), iEFT, false); } else { Index: text/ptbl/xp/pd_Document.cpp =================================================================== RCS file: /cvsroot/abi/src/text/ptbl/xp/pd_Document.cpp,v retrieving revision 1.375 diff -u -r1.375 pd_Document.cpp --- text/ptbl/xp/pd_Document.cpp 2 Aug 2005 16:56:54 -0000 1.375 +++ text/ptbl/xp/pd_Document.cpp 26 Sep 2005 13:48:06 -0000 @@ -3844,7 +3844,7 @@ if (ieft == IEFT_Unknown || ieft == IEFT_Bogus) { - UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN); + //UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN); return false; } Index: wp/impexp/xp/ie_exp.cpp =================================================================== RCS file: /cvsroot/abi/src/wp/impexp/xp/ie_exp.cpp,v retrieving revision 1.78 diff -u -r1.78 ie_exp.cpp --- wp/impexp/xp/ie_exp.cpp 3 Apr 2004 17:39:54 -0000 1.78 +++ wp/impexp/xp/ie_exp.cpp 26 Sep 2005 13:48:11 -0000 @@ -312,17 +312,17 @@ return static_cast(a+1); } - UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN); + // UT_ASSERT_HARMLESS(UT_SHOULD_NOT_HAPPEN); // Hm... an exporter has registered for the given suffix, // but refuses to support any file type we request. // Default to native format. - return IE_Exp::fileTypeForSuffix(".abw"); + return IEFT_Unknown; } } // No filter is registered for that extension, try native format // for default export. - return IE_Exp::fileTypeForSuffix(".abw"); + return IEFT_Unknown; }