]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/imagxpm.cpp
Remove fixed size of gs_encodingNames array in font mapper code.
[wxWidgets.git] / src / common / imagxpm.cpp
index 5aa6dded4392573a8c0372f77b49e9c8d777c733..2850e770e61d616ea871e434897134934b43cddd 100644 (file)
@@ -80,6 +80,7 @@ license is as follows:
 #include "wx/imagxpm.h"
 #include "wx/wfstream.h"
 #include "wx/xpmdecod.h"
 #include "wx/imagxpm.h"
 #include "wx/wfstream.h"
 #include "wx/xpmdecod.h"
+#include "wx/filename.h"
 
 IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler)
 
 
 IMPLEMENT_DYNAMIC_CLASS(wxXPMHandler,wxImageHandler)
 
@@ -123,8 +124,8 @@ bool wxXPMHandler::SaveFile(wxImage * image,
     wxString sName;
     if ( image->HasOption(wxIMAGE_OPTION_FILENAME) )
     {
     wxString sName;
     if ( image->HasOption(wxIMAGE_OPTION_FILENAME) )
     {
-        wxSplitPath(image->GetOption(wxIMAGE_OPTION_FILENAME),
-                    NULL, &sName, NULL);
+        wxFileName::SplitPath(image->GetOption(wxIMAGE_OPTION_FILENAME),
+                              NULL, &sName, NULL);
         sName << wxT("_xpm");
     }
 
         sName << wxT("_xpm");
     }
 
@@ -217,6 +218,7 @@ bool wxXPMHandler::DoCanRead(wxInputStream& stream)
 {
     wxXPMDecoder decoder;
     return decoder.CanRead(stream);
 {
     wxXPMDecoder decoder;
     return decoder.CanRead(stream);
+         // it's ok to modify the stream position here
 }
 
 #endif  // wxUSE_STREAMS
 }
 
 #endif  // wxUSE_STREAMS