def save(self, path=None, filter_name=None):
if path is None:<EOL><INDENT>try:<EOL><INDENT>self._target.store()<EOL><DEDENT>except _IOException as e:<EOL><INDENT>raise IOError(e.Message)<EOL><DEDENT>return<EOL><DEDENT>url = uno.systemPathToFileUrl(os.path.abspath(path))<EOL>if filter_name:<EOL><INDENT>format_filter = uno.createUnoStruct('<STR_LIT>')<EOL>format_filter.Name = '<STR_LIT>'<EOL>format_filter.Value = filter_name<EOL>filters = (format_filter,)<EOL><DEDENT>else:<EOL><INDENT>filters = ()<EOL><DEDENT>try:<EOL><INDENT>self._target.storeToURL(url, filters)<EOL><DEDENT>except _IOException as e:<EOL><INDENT>raise IOError(e.Message)<EOL><DEDENT>
Saves this document to a local file system.

The optional first argument defaults to the document's path.

Accept optional second  argument which defines type of
the saved file. Use one of FILTER_* constants or see list of
available filters at http://wakka.net/archives/7 or
http://www.oooforum.org/forum/viewtopic.phtml?t=71294.