diff options
author | Peter Jentsch <pjotr@guineapics.de> | 2011-11-13 23:09:23 +0100 |
---|---|---|
committer | Peter Jentsch <pjotr@guineapics.de> | 2011-12-25 18:20:08 +0100 |
commit | bf2857d88af137ba15939d81970be92b0310c915 (patch) | |
tree | 1d73cf6faf785d4bd46c51dcab240a03deca33a1 /filter | |
parent | fix threading problem in LibXSLTTransformer.cxx (diff) | |
download | core-bf2857d88af137ba15939d81970be92b0310c915.tar.gz core-bf2857d88af137ba15939d81970be92b0310c915.zip |
open xml filter test result in default xml editor
first commit to remove the broken xml filter source
view and validation service. The validation service
is currently broken in that it doesn't allow to refer
to or define an xml catalog or alternative validation
methods. All of this is included in current xml development
tools elsewhere, so we don't need to duplicate that in LO.
Diffstat (limited to 'filter')
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.cxx | 24 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfiltertestdialog.hxx | 1 |
2 files changed, 16 insertions, 9 deletions
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx index 33b6b28a3569..aaf274fa8e17 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx @@ -43,6 +43,9 @@ #include <com/sun/star/document/XExporter.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> +#include "com/sun/star/system/XSystemShellExecute.hpp" +#include "com/sun/star/system/SystemShellExecuteFlags.hpp" + #include "com/sun/star/ui/dialogs/TemplateDescription.hpp" #include <vcl/svapp.hxx> #include <osl/mutex.hxx> @@ -50,12 +53,12 @@ #include <osl/file.hxx> #include <unotools/tempfile.hxx> #include <tools/urlobj.hxx> +#include <comphelper/processfactory.hxx> #include "xmlfilterdialogstrings.hrc" #include "xmlfiltersettingsdialog.hxx" #include "xmlfiltertestdialog.hxx" #include "xmlfiltertestdialog.hrc" -#include "xmlfileview.hxx" using namespace utl; @@ -164,7 +167,6 @@ XMLFilterTestDialog::XMLFilterTestDialog( Window* pParent, ResMgr& rResMgr, cons maFTNameOfRecentFile( this, ResId( FT_NAME_OF_RECENT_FILE, rResMgr ) ), maPBClose( this, ResId( PB_CLOSE, rResMgr ) ), maPBHelp( this, ResId( PB_HELP, rResMgr ) ), - mpSourceDLG( NULL ), mpFilterInfo( NULL ), sDTDPath( RTL_CONSTASCII_USTRINGPARAM( "$(inst)/share/dtd/officedocument/1_0/office.dtd" ) ) { @@ -209,7 +211,6 @@ XMLFilterTestDialog::~XMLFilterTestDialog() OSL_FAIL( "XMLFilterTestDialog::~XMLFilterTestDialog exception catched!" ); } - delete mpSourceDLG; delete mpFilterInfo; } @@ -469,7 +470,9 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) Reference< XStorable > xStorable( xComp, UNO_QUERY ); if( xStorable.is() ) { - utl::TempFile aTempFile; + String leadingChars; + String ext(RTL_CONSTASCII_USTRINGPARAM(".xml")); + utl::TempFile aTempFile(leadingChars, &ext); OUString aTempFileURL( aTempFile.GetURL() ); const application_info_impl* pAppInfo = getApplicationInfo( mpFilterInfo->maExportService ); @@ -564,10 +567,13 @@ void XMLFilterTestDialog::doExport( Reference< XComponent > xComp ) void XMLFilterTestDialog::displayXMLFile( const OUString& rURL ) { - if( NULL == mpSourceDLG ) - mpSourceDLG = new XMLSourceFileDialog( NULL, mrResMgr, mxMSF ); + ::com::sun::star::uno::Reference< com::sun::star::system::XSystemShellExecute > xSystemShellExecute(comphelper::getProcessServiceFactory()->createInstance(DEFINE_CONST_UNICODE("com.sun.star.system.SystemShellExecute") ), com::sun::star::uno::UNO_QUERY_THROW ); + xSystemShellExecute->execute( rURL, rtl::OUString(), com::sun::star::system::SystemShellExecuteFlags::DEFAULTS ); - mpSourceDLG->ShowWindow( rURL, mpFilterInfo); +// if( NULL == mpSourceDLG ) +// mpSourceDLG = new XMLSourceFileDialog( NULL, mrResMgr, mxMSF ); +// +// mpSourceDLG->ShowWindow( rURL, mpFilterInfo); } void XMLFilterTestDialog::onImportBrowse() @@ -644,7 +650,9 @@ void XMLFilterTestDialog::import( const OUString& rURL ) if( maCBXDisplaySource.IsChecked() ) { - TempFile aTempFile; + String lead; + String ext(RTL_CONSTASCII_USTRINGPARAM(".xml")); + TempFile aTempFile(lead, &ext); OUString aTempFileURL( aTempFile.GetURL() ); Reference< XImportFilter > xImporter( mxMSF->createInstance( OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.documentconversion.XSLTFilter" )) ), UNO_QUERY ); diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.hxx b/filter/source/xsltdialog/xmlfiltertestdialog.hxx index b83cd9d3ac29..04457b9215d5 100644 --- a/filter/source/xsltdialog/xmlfiltertestdialog.hxx +++ b/filter/source/xsltdialog/xmlfiltertestdialog.hxx @@ -95,7 +95,6 @@ private: PushButton maPBClose; HelpButton maPBHelp; - XMLSourceFileDialog* mpSourceDLG; filter_info_impl* mpFilterInfo; String maDialogTitle; |